rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
if ($(form).find('form').valid()) { | if ($form.valid()) { | $(document).ready(function() { var validator = null; var title = $(callingButton).text() // Assign title to calling button's text var okButton = localizedButtons[0]; var cancelButton = localizedButtons[1]; var UID = new Date().getTime(); var form = '#' + UID; // Construct action to perform when OK and Cancels buttons are clicked var dialogOptions = {}; dialogOptions[okButton] = function() { validator = $(form).find('form').validate(); // Post to server and construct callback if ($(form).find('form').valid()) { $.post( $(form).attr("action"), $(form).serialize(), function(returnString) { if (returnString.status == true) { updateItem(actType, actOnId, returnString.content); $('#' + UID).dialog("close"); } else { // Display errors in error list $('#formErrors .formErrorList').html(returnString.content); } }, "json" ); } }; dialogOptions[cancelButton] = function() { $(this).dialog("close"); }; // Construct dialog var $dialog = $('<div id=' + UID + '></div>').dialog({ title: title, autoOpen: false, width: 600, modal: true, draggable: false, buttons: dialogOptions, open:function(event,ui) { $(this).load(url, null, function() { $('#loading').throbber("disable"); }); $(this).html("<div id='loading' class='throbber'></div>"); $('#loading').throbber({ bgcolor: "#CED7E1", speed: 1, }); $('#loading').throbber("enable"); }, close:function() { // Reset form validation errors and inputs on close if (validator != null) { validator.resetForm(); } clearFormFields(form); } }); // Tell the calling button to open this modal on click $(callingButton).live("click", (function() { $dialog.dialog('open') return false; })); }); |
$(form).attr("action"), $(form).serialize(), | $form.attr("action"), $form.serialize(), | $(document).ready(function() { var validator = null; var title = $(callingButton).text() // Assign title to calling button's text var okButton = localizedButtons[0]; var cancelButton = localizedButtons[1]; var UID = new Date().getTime(); var form = '#' + UID; // Construct action to perform when OK and Cancels buttons are clicked var dialogOptions = {}; dialogOptions[okButton] = function() { validator = $(form).find('form').validate(); // Post to server and construct callback if ($(form).find('form').valid()) { $.post( $(form).attr("action"), $(form).serialize(), function(returnString) { if (returnString.status == true) { updateItem(actType, actOnId, returnString.content); $('#' + UID).dialog("close"); } else { // Display errors in error list $('#formErrors .formErrorList').html(returnString.content); } }, "json" ); } }; dialogOptions[cancelButton] = function() { $(this).dialog("close"); }; // Construct dialog var $dialog = $('<div id=' + UID + '></div>').dialog({ title: title, autoOpen: false, width: 600, modal: true, draggable: false, buttons: dialogOptions, open:function(event,ui) { $(this).load(url, null, function() { $('#loading').throbber("disable"); }); $(this).html("<div id='loading' class='throbber'></div>"); $('#loading').throbber({ bgcolor: "#CED7E1", speed: 1, }); $('#loading').throbber("enable"); }, close:function() { // Reset form validation errors and inputs on close if (validator != null) { validator.resetForm(); } clearFormFields(form); } }); // Tell the calling button to open this modal on click $(callingButton).live("click", (function() { $dialog.dialog('open') return false; })); }); |
clearFormFields(form); | clearFormFields($(formContainer).find('form')); | $(document).ready(function() { var validator = null; var title = $(callingButton).text() // Assign title to calling button's text var okButton = localizedButtons[0]; var cancelButton = localizedButtons[1]; var UID = new Date().getTime(); var form = '#' + UID; // Construct action to perform when OK and Cancels buttons are clicked var dialogOptions = {}; dialogOptions[okButton] = function() { validator = $(form).find('form').validate(); // Post to server and construct callback if ($(form).find('form').valid()) { $.post( $(form).attr("action"), $(form).serialize(), function(returnString) { if (returnString.status == true) { updateItem(actType, actOnId, returnString.content); $('#' + UID).dialog("close"); } else { // Display errors in error list $('#formErrors .formErrorList').html(returnString.content); } }, "json" ); } }; dialogOptions[cancelButton] = function() { $(this).dialog("close"); }; // Construct dialog var $dialog = $('<div id=' + UID + '></div>').dialog({ title: title, autoOpen: false, width: 600, modal: true, draggable: false, buttons: dialogOptions, open:function(event,ui) { $(this).load(url, null, function() { $('#loading').throbber("disable"); }); $(this).html("<div id='loading' class='throbber'></div>"); $('#loading').throbber({ bgcolor: "#CED7E1", speed: 1, }); $('#loading').throbber("enable"); }, close:function() { // Reset form validation errors and inputs on close if (validator != null) { validator.resetForm(); } clearFormFields(form); } }); // Tell the calling button to open this modal on click $(callingButton).live("click", (function() { $dialog.dialog('open') return false; })); }); |
WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,t,g){var n=this;this.getId=function(){return t};this.WT=a;this.marginH=function(d){var k=d.parentNode;return a.px(d,"marginLeft")+a.px(d,"marginRight")+a.px(d,"borderLeftWidth")+a.px(d,"borderRightWidth")+a.px(k,"paddingLeft")+a.px(k,"paddingRight")};this.marginV=function(d){return a.px(d,"marginTop")+a.px(d,"marginBottom")+a.px(d,"borderTopWidth")+a.px(d,"borderBottomWidth")+a.px(d,"paddingTop")+a.px(d,"paddingBottom")};this.adjustRow=function(d,k){if(d.style.height!= k+"px")d.style.height=k+"px";d=d.childNodes;var l,o,f;l=0;for(o=d.length;l<o;++l){f=d[l];var j=k-a.pxself(f,"paddingTop")-a.pxself(f,"paddingBottom");if(j<=0)j=0;f.style.height=j+"px";if(!(f.style.verticalAlign||f.childNodes.length==0)){var b=f.childNodes[0];if(j<=0)j=0;if(b.className=="Wt-hcenter"){b.style.height=j+"px";b=b.firstChild.firstChild;if(!a.hasTag(b,"TD"))b=b.firstChild;if(b.style.height!=j+"px")b.style.height=j+"px";b=b.firstChild}if(f.childNodes.length==1)j+=-this.marginV(b);if(j<=0)j= 0;if(!a.hasTag(b,"TABLE"))if(b.wtResize){f=b.parentNode.offsetWidth-n.marginH(b);b.wtResize(b,f,j)}else if(b.style.height!=j+"px"){b.style.height=j+"px";if(b.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(b.firstChild,"TEXTAREA"))b.firstChild.style.height=j-a.pxself(b,"marginBottom")+"px"}}}};this.adjust=function(){var d=a.getElement(t);if(!d)return false;n.initResize&&n.initResize(a,t,g);if(a.isHidden(d))return true;var k=d.firstChild,l=d.parentNode;if(k.style.height!="")k.style.height="";if(!(d.dirty|| k.w!=l.clientWidth||k.h!=l.clientHeight))return true;d.dirty=null;var o=a.pxself(l,"height");if(o==0){o=l.clientHeight;o+=-a.px(l,"paddingTop")-a.px(l,"paddingBottom")}o+=-a.px(d,"marginTop")-a.px(d,"marginBottom");var f,j;if(l.children){f=0;for(j=l.children.length;f<j;++f){var b=l.children[f];if(b!=d)o-=$(b).outerHeight()}}var r=d=0,m,u;m=f=0;for(j=k.rows.length;f<j;f++){b=k.rows[f];if(b.className=="Wt-hrh")o-=b.offsetHeight;else{r+=g.minheight[m];if(g.stretch[m]<=0)o-=b.offsetHeight;else d+=g.stretch[m]; ++m}}o=o>r?o:r;if(d!=0&&o>0){r=o;var p;m=f=0;for(j=k.rows.length;f<j;f++)if(k.rows[f].className!="Wt-hrh"){b=k.rows[f];if(g.stretch[m]!=0){if(g.stretch[m]!=-1){p=o*g.stretch[m]/d;p=r>p?p:r;p=Math.round(g.minheight[m]>p?g.minheight[m]:p);r-=p}else p=b.offsetHeight;this.adjustRow(b,p)}++m}}k.w=l.clientWidth;k.h=l.clientHeight;if(k.style.tableLayout!="fixed")return true;d=0;m=k.childNodes;l=0;for(o=m.length;l<o;l++){r=m[l];var x,z,y;if(a.hasTag(r,"COLGROUP")){l=-1;m=r.childNodes;o=m.length}if(a.hasTag(r, "COL")){if(a.pctself(r,"width")==0){f=p=0;for(j=k.rows.length;f<j;f++){b=k.rows[f];b=b.childNodes;z=x=0;for(y=b.length;z<y;z++){u=b[z];if(u.colSpan==1&&x==d&&u.childNodes.length==1){b=u.firstChild;b=b.offsetWidth+n.marginH(b);p=Math.max(p,b);break}x+=u.colSpan;if(x>d)break}}if(p>0&&a.pxself(r,"width")!=p)r.style.width=p+"px"}++d}}return true};this.adjust()}); | WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,t,i){var o=this;this.getId=function(){return t};this.WT=a;this.marginH=function(d){var e=d.parentNode,g=a.px(d,"marginLeft");g+=a.px(d,"marginRight");g+=a.px(d,"borderLeftWidth");g+=a.px(d,"borderRightWidth");g+=a.px(e,"paddingLeft");g+=a.px(e,"paddingRight");return g};this.marginV=function(d){var e=a.px(d,"marginTop");e+=a.px(d,"marginBottom");e+=a.px(d,"borderTopWidth");e+=a.px(d,"borderBottomWidth");e+=a.px(d,"paddingTop");e+=a.px(d,"paddingBottom"); return e};this.adjustRow=function(d,e){if(d.style.height!=e+"px")d.style.height=e+"px";d=d.childNodes;var g,m,h;g=0;for(m=d.length;g<m;++g){h=d[g];var k=e;k-=a.pxself(h,"paddingTop");k-=a.pxself(h,"paddingBottom");if(k<=0)k=0;h.style.height=k+"px";if(!(h.style.verticalAlign||h.childNodes.length==0)){var b=h.childNodes[0];if(k<=0)k=0;if(b.className=="Wt-hcenter"){b.style.height=k+"px";b=b.firstChild.firstChild;if(!a.hasTag(b,"TD"))b=b.firstChild;if(b.style.height!=k+"px")b.style.height=k+"px";b=b.firstChild}if(h.childNodes.length== 1)k-=this.marginV(b);if(k<=0)k=0;if(!a.hasTag(b,"TABLE"))if(b.wtResize){h=b.parentNode.offsetWidth-o.marginH(b);b.wtResize(b,h,k)}else if(b.style.height!=k+"px"){b.style.height=k+"px";if(b.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(b.firstChild,"TEXTAREA"))b.firstChild.style.height=k-a.pxself(b,"marginBottom")+"px"}}}};this.adjust=function(){var d=a.getElement(t);if(!d)return false;o.initResize&&o.initResize(a,t,i);if(a.isHidden(d))return true;var e=d.firstChild,g=d.parentNode;if(e.style.height!= "")e.style.height="";if(!(d.dirty||e.w!=g.clientWidth||e.h!=g.clientHeight))return true;d.dirty=null;var m=a.pxself(g,"height");if(m==0){m=g.clientHeight;m-=a.px(g,"paddingTop");m-=a.px(g,"paddingBottom")}m-=a.px(d,"marginTop");m-=a.px(d,"marginBottom");var h,k;if(g.children){h=0;for(k=g.children.length;h<k;++h){var b=g.children[h];if(b!=d)m-=$(b).outerHeight()}}var r=d=0,n,u;n=h=0;for(k=e.rows.length;h<k;h++){b=e.rows[h];if(b.className=="Wt-hrh")m-=b.offsetHeight;else{r+=i.minheight[n];if(i.stretch[n]<= 0)m-=b.offsetHeight;else d+=i.stretch[n];++n}}m=m>r?m:r;if(d!=0&&m>0){r=m;var p;n=h=0;for(k=e.rows.length;h<k;h++)if(e.rows[h].className!="Wt-hrh"){b=e.rows[h];if(i.stretch[n]!=0){if(i.stretch[n]!=-1){p=m*i.stretch[n]/d;p=r>p?p:r;p=Math.round(i.minheight[n]>p?i.minheight[n]:p);r-=p}else p=b.offsetHeight;this.adjustRow(b,p)}++n}}e.w=g.clientWidth;e.h=g.clientHeight;if(e.style.tableLayout!="fixed")return true;d=0;n=e.childNodes;g=0;for(m=n.length;g<m;g++){r=n[g];var x,z,y;if(a.hasTag(r,"COLGROUP")){g= -1;n=r.childNodes;m=n.length}if(a.hasTag(r,"COL")){if(a.pctself(r,"width")==0){h=p=0;for(k=e.rows.length;h<k;h++){b=e.rows[h];b=b.childNodes;z=x=0;for(y=b.length;z<y;z++){u=b[z];if(u.colSpan==1&&x==d&&u.childNodes.length==1){b=u.firstChild;b=b.offsetWidth+o.marginH(b);p=Math.max(p,b);break}x+=u.colSpan;if(x>d)break}}if(p>0&&a.pxself(r,"width")!=p)r.style.width=p+"px"}++d}}return true};this.adjust()}); | WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,t,g){var n=this;this.getId=function(){return t};this.WT=a;this.marginH=function(d){var k=d.parentNode;return a.px(d,"marginLeft")+a.px(d,"marginRight")+a.px(d,"borderLeftWidth")+a.px(d,"borderRightWidth")+a.px(k,"paddingLeft")+a.px(k,"paddingRight")};this.marginV=function(d){return a.px(d,"marginTop")+a.px(d,"marginBottom")+a.px(d,"borderTopWidth")+a.px(d,"borderBottomWidth")+a.px(d,"paddingTop")+a.px(d,"paddingBottom")};this.adjustRow=function(d,k){if(d.style.height!=k+"px")d.style.height=k+"px";d=d.childNodes;var l,o,f;l=0;for(o=d.length;l<o;++l){f=d[l];var j=k-a.pxself(f,"paddingTop")-a.pxself(f,"paddingBottom");if(j<=0)j=0;f.style.height=j+"px";if(!(f.style.verticalAlign||f.childNodes.length==0)){var b=f.childNodes[0];if(j<=0)j=0;if(b.className=="Wt-hcenter"){b.style.height=j+"px";b=b.firstChild.firstChild;if(!a.hasTag(b,"TD"))b=b.firstChild;if(b.style.height!=j+"px")b.style.height=j+"px";b=b.firstChild}if(f.childNodes.length==1)j+=-this.marginV(b);if(j<=0)j=0;if(!a.hasTag(b,"TABLE"))if(b.wtResize){f=b.parentNode.offsetWidth-n.marginH(b);b.wtResize(b,f,j)}else if(b.style.height!=j+"px"){b.style.height=j+"px";if(b.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(b.firstChild,"TEXTAREA"))b.firstChild.style.height=j-a.pxself(b,"marginBottom")+"px"}}}};this.adjust=function(){var d=a.getElement(t);if(!d)return false;n.initResize&&n.initResize(a,t,g);if(a.isHidden(d))return true;var k=d.firstChild,l=d.parentNode;if(k.style.height!="")k.style.height="";if(!(d.dirty||k.w!=l.clientWidth||k.h!=l.clientHeight))return true;d.dirty=null;var o=a.pxself(l,"height");if(o==0){o=l.clientHeight;o+=-a.px(l,"paddingTop")-a.px(l,"paddingBottom")}o+=-a.px(d,"marginTop")-a.px(d,"marginBottom");var f,j;if(l.children){f=0;for(j=l.children.length;f<j;++f){var b=l.children[f];if(b!=d)o-=$(b).outerHeight()}}var r=d=0,m,u;m=f=0;for(j=k.rows.length;f<j;f++){b=k.rows[f];if(b.className=="Wt-hrh")o-=b.offsetHeight;else{r+=g.minheight[m];if(g.stretch[m]<=0)o-=b.offsetHeight;else d+=g.stretch[m];++m}}o=o>r?o:r;if(d!=0&&o>0){r=o;var p;m=f=0;for(j=k.rows.length;f<j;f++)if(k.rows[f].className!="Wt-hrh"){b=k.rows[f];if(g.stretch[m]!=0){if(g.stretch[m]!=-1){p=o*g.stretch[m]/d;p=r>p?p:r;p=Math.round(g.minheight[m]>p?g.minheight[m]:p);r-=p}else p=b.offsetHeight;this.adjustRow(b,p)}++m}}k.w=l.clientWidth;k.h=l.clientHeight;if(k.style.tableLayout!="fixed")return true;d=0;m=k.childNodes;l=0;for(o=m.length;l<o;l++){r=m[l];var x,z,y;if(a.hasTag(r,"COLGROUP")){l=-1;m=r.childNodes;o=m.length}if(a.hasTag(r,"COL")){if(a.pctself(r,"width")==0){f=p=0;for(j=k.rows.length;f<j;f++){b=k.rows[f];b=b.childNodes;z=x=0;for(y=b.length;z<y;z++){u=b[z];if(u.colSpan==1&&x==d&&u.childNodes.length==1){b=u.firstChild;b=b.offsetWidth+n.marginH(b);p=Math.max(p,b);break}x+=u.colSpan;if(x>d)break}}if(p>0&&a.pxself(r,"width")!=p)r.style.width=p+"px"}++d}}return true};this.adjust()}); |
(function(){if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'A39E',version:'3.2.1',revision:'5372',_:{},status:'unloaded',basePath:(function(){var d=window.CKEDITOR_BASEPATH||'';if(!d){var e=document.getElementsByTagName('script');for(var f=0;f<e.length;f++){var g=e[f].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(g){d=g[1];break;}}}if(d.indexOf(': }};})();}if(!a.editor){a.ELEMENT_MODE_NONE=0;a.ELEMENT_MODE_REPLACE=1;a.ELEMENT_MODE_APPENDTO=2;a.editor=function(b,c,d,e){var f=this;f._={instanceConfig:b,element:c,data:e};f.elementMode=d||0;a.event.call(f);f._init();};a.editor.replace=function(b,c){var d=b;if(typeof d!='object'){d=document.getElementById(b);if(!d){var e=0,f=document.getElementsByName(b);while((d=f[e++])&&d.tagName.toLowerCase()!='textarea'){}}if(!d)throw '[CKEDITOR.editor.replace] The element with id or name "'+b+'" was not found.';}d.style.visibility='hidden';return new a.editor(c,d,1);};a.editor.appendTo=function(b,c,d){var e=b;if(typeof e!='object'){e=document.getElementById(b);if(!e)throw '[CKEDITOR.editor.appendTo] The element with id "'+b+'" was not found.';}return new a.editor(c,e,2,d);};a.editor.prototype={_init:function(){var b=a.editor._pending||(a.editor._pending=[]);b.push(this);},fire:function(b,c){return a.event.prototype.fire.call(this,b,c,this);},fireOnce:function(b,c){return a.event.prototype.fireOnce.call(this,b,c,this);}};a.event.implementOn(a.editor.prototype,true);}if(!a.env)a.env=(function(){var b=navigator.userAgent.toLowerCase(),c=window.opera,d={ie:/*@cc_on!@*/false,opera:!!c&&c.version,webkit:b.indexOf(' applewebkit/')>-1,air:b.indexOf(' adobeair/')>-1,mac:b.indexOf('macintosh')>-1,quirks:document.compatMode=='BackCompat',mobile:b.indexOf('mobile')>-1,isCustomDomain:function(){return this.ie&&document.domain!=window.location.hostname;}};d.gecko=navigator.product=='Gecko'&&!d.webkit&&!d.opera;var e=0;if(d.ie){e=parseFloat(b.match(/msie (\d+)/)[1]);d.ie8=!!document.documentMode;d.ie8Compat=document.documentMode==8;d.ie7Compat=e==7&&!document.documentMode||document.documentMode==7;d.ie6Compat=e<7||d.quirks;}if(d.gecko){var f=b.match(/rv:([\d\.]+)/);if(f){f=f[1].split('.');e=f[0]*10000+(f[1]||0)*100+ +(f[2]||0);}}if(d.opera)e=parseFloat(c.version());if(d.air)e=parseFloat(b.match(/ adobeair\/(\d+)/)[1]);if(d.webkit)e=parseFloat(b.match(/ applewebkit\/(\d+)/)[1]);d.version=e;d.isCompatible=!d.mobile&&(d.ie&&e>=6||d.gecko&&e>=10801||d.opera&&e>=9.5||d.air&&e>=1||d.webkit&&e>=522||false);d.cssClass='cke_browser_'+(d.ie?'ie':d.gecko?'gecko':d.opera?'opera':d.air?'air':d.webkit?'webkit':'unknown');if(d.quirks)d.cssClass+=' cke_browser_quirks';if(d.ie){d.cssClass+=' cke_browser_ie'+(d.version<7?'6':d.version>=8?'8':'7');if(d.quirks)d.cssClass+=' cke_browser_iequirks';}if(d.gecko&&e<10900)d.cssClass+=' cke_browser_gecko18';return d;})();var b=a.env;var c=b.ie; if(a.status=='unloaded')(function(){a.event.implementOn(a);a.loadFullCore=function(){if(a.status!='basic_ready'){a.loadFullCore._load=true;return;}delete a.loadFullCore;var e=document.createElement('script');e.type='text/javascript';e.src=a.basePath+'ckeditor.js';document.getElementsByTagName('head')[0].appendChild(e);};a.loadFullCoreTimeout=0;a.replaceClass='ckeditor';a.replaceByClassEnabled=true;var d=function(e,f,g,h){if(b.isCompatible){if(a.loadFullCore)a.loadFullCore();var i=g(e,f,h);a.add(i);return i;}return null;};a.replace=function(e,f){return d(e,f,a.editor.replace);};a.appendTo=function(e,f,g){return d(e,f,a.editor.appendTo,g);};a.add=function(e){var f=this._.pending||(this._.pending=[]);f.push(e);};a.replaceAll=function(){var e=document.getElementsByTagName('textarea');for(var f=0;f<e.length;f++){var g=null,h=e[f],i=h.name;if(!h.name&&!h.id)continue;if(typeof arguments[0]=='string'){var j=new RegExp('(?:^| )'+arguments[0]+'(?:$| )');if(!j.test(h.className))continue;}else if(typeof arguments[0]=='function'){g={};if(arguments[0](h,g)===false)continue;}this.replace(h,g);}};(function(){var e=function(){var f=a.loadFullCore,g=a.loadFullCoreTimeout;if(a.replaceByClassEnabled)a.replaceAll(a.replaceClass);a.status='basic_ready';if(f&&f._load)f();else if(g)setTimeout(function(){if(a.loadFullCore)a.loadFullCore();},g*1000);};if(window.addEventListener)window.addEventListener('load',e,false);else if(window.attachEvent)window.attachEvent('onload',e);})();a.status='basic_loaded';})();})(); | (function(){if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'A8LE4JO',version:'3.4.1',revision:'5892',_:{},status:'unloaded',basePath:(function(){var d=window.CKEDITOR_BASEPATH||'';if(!d){var e=document.getElementsByTagName('script');for(var f=0;f<e.length;f++){var g=e[f].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(g){d=g[1];break;}}}if(d.indexOf(': return e&&e.listeners.length>0;}};})();}if(!a.editor){a.ELEMENT_MODE_NONE=0;a.ELEMENT_MODE_REPLACE=1;a.ELEMENT_MODE_APPENDTO=2;a.editor=function(b,c,d,e){var f=this;f._={instanceConfig:b,element:c,data:e};f.elementMode=d||0;a.event.call(f);f._init();};a.editor.replace=function(b,c){var d=b;if(typeof d!='object'){d=document.getElementById(b);if(!d){var e=0,f=document.getElementsByName(b);while((d=f[e++])&&d.tagName.toLowerCase()!='textarea'){}}if(!d)throw '[CKEDITOR.editor.replace] The element with id or name "'+b+'" was not found.';}d.style.visibility='hidden';return new a.editor(c,d,1);};a.editor.appendTo=function(b,c,d){var e=b;if(typeof e!='object'){e=document.getElementById(b);if(!e)throw '[CKEDITOR.editor.appendTo] The element with id "'+b+'" was not found.';}return new a.editor(c,e,2,d);};a.editor.prototype={_init:function(){var b=a.editor._pending||(a.editor._pending=[]);b.push(this);},fire:function(b,c){return a.event.prototype.fire.call(this,b,c,this);},fireOnce:function(b,c){return a.event.prototype.fireOnce.call(this,b,c,this);}};a.event.implementOn(a.editor.prototype,true);}if(!a.env)a.env=(function(){var b=navigator.userAgent.toLowerCase(),c=window.opera,d={ie:/*@cc_on!@*/false,opera:!!c&&c.version,webkit:b.indexOf(' applewebkit/')>-1,air:b.indexOf(' adobeair/')>-1,mac:b.indexOf('macintosh')>-1,quirks:document.compatMode=='BackCompat',mobile:b.indexOf('mobile')>-1,isCustomDomain:function(){if(!this.ie)return false;var g=document.domain,h=window.location.hostname;return g!=h&&g!='['+h+']';}};d.gecko=navigator.product=='Gecko'&&!d.webkit&&!d.opera;var e=0;if(d.ie){e=parseFloat(b.match(/msie (\d+)/)[1]);d.ie8=!!document.documentMode;d.ie8Compat=document.documentMode==8;d.ie7Compat=e==7&&!document.documentMode||document.documentMode==7;d.ie6Compat=e<7||d.quirks;}if(d.gecko){var f=b.match(/rv:([\d\.]+)/);if(f){f=f[1].split('.');e=f[0]*10000+(f[1]||0)*100+ +(f[2]||0);}}if(d.opera)e=parseFloat(c.version());if(d.air)e=parseFloat(b.match(/ adobeair\/(\d+)/)[1]);if(d.webkit)e=parseFloat(b.match(/ applewebkit\/(\d+)/)[1]);d.version=e;d.isCompatible=!d.mobile&&(d.ie&&e>=6||d.gecko&&e>=10801||d.opera&&e>=9.5||d.air&&e>=1||d.webkit&&e>=522||false);d.cssClass='cke_browser_'+(d.ie?'ie':d.gecko?'gecko':d.opera?'opera':d.air?'air':d.webkit?'webkit':'unknown');if(d.quirks)d.cssClass+=' cke_browser_quirks';if(d.ie){d.cssClass+=' cke_browser_ie'+(d.version<7?'6':d.version>=8?'8':'7');if(d.quirks)d.cssClass+=' cke_browser_iequirks';}if(d.gecko&&e<10900)d.cssClass+=' cke_browser_gecko18'; return d;})();var b=a.env;var c=b.ie;if(a.status=='unloaded')(function(){a.event.implementOn(a);a.loadFullCore=function(){if(a.status!='basic_ready'){a.loadFullCore._load=true;return;}delete a.loadFullCore;var e=document.createElement('script');e.type='text/javascript';e.src=a.basePath+'ckeditor.js';document.getElementsByTagName('head')[0].appendChild(e);};a.loadFullCoreTimeout=0;a.replaceClass='ckeditor';a.replaceByClassEnabled=true;var d=function(e,f,g,h){if(b.isCompatible){if(a.loadFullCore)a.loadFullCore();var i=g(e,f,h);a.add(i);return i;}return null;};a.replace=function(e,f){return d(e,f,a.editor.replace);};a.appendTo=function(e,f,g){return d(e,f,a.editor.appendTo,g);};a.add=function(e){var f=this._.pending||(this._.pending=[]);f.push(e);};a.replaceAll=function(){var e=document.getElementsByTagName('textarea');for(var f=0;f<e.length;f++){var g=null,h=e[f],i=h.name;if(!h.name&&!h.id)continue;if(typeof arguments[0]=='string'){var j=new RegExp('(?:^|\\s)'+arguments[0]+'(?:$|\\s)');if(!j.test(h.className))continue;}else if(typeof arguments[0]=='function'){g={};if(arguments[0](h,g)===false)continue;}this.replace(h,g);}};(function(){var e=function(){var f=a.loadFullCore,g=a.loadFullCoreTimeout;if(a.replaceByClassEnabled)a.replaceAll(a.replaceClass);a.status='basic_ready';if(f&&f._load)f();else if(g)setTimeout(function(){if(a.loadFullCore)a.loadFullCore();},g*1000);};if(window.addEventListener)window.addEventListener('load',e,false);else if(window.attachEvent)window.attachEvent('onload',e);})();a.status='basic_loaded';})();})(); | (function(){if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'A39E',version:'3.2.1',revision:'5372',_:{},status:'unloaded',basePath:(function(){var d=window.CKEDITOR_BASEPATH||'';if(!d){var e=document.getElementsByTagName('script');for(var f=0;f<e.length;f++){var g=e[f].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(g){d=g[1];break;}}}if(d.indexOf('://')==-1)if(d.indexOf('/')===0)d=location.href.match(/^.*?:\/\/[^\/]*/)[0]+d;else d=location.href.match(/^[^\?]*\/(?:)/)[0]+d;if(!d)throw 'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return d;})(),getUrl:function(d){if(d.indexOf('://')==-1&&d.indexOf('/')!==0)d=this.basePath+d;if(this.timestamp&&d.charAt(d.length-1)!='/')d+=(d.indexOf('?')>=0?'&':'?')+'t='+this.timestamp;return d;}},b=window.CKEDITOR_GETURL;if(b){var c=a.getUrl;a.getUrl=function(d){return b.call(a,d)||c.call(a,d);};}return a;})();var a=CKEDITOR;if(!a.event){a.event=function(){};a.event.implementOn=function(b,c){var d=a.event.prototype;for(var e in d){if(b[e]==undefined)b[e]=d[e];}};a.event.prototype=(function(){var b=function(d){var e=d.getPrivate&&d.getPrivate()||d._||(d._={});return e.events||(e.events={});},c=function(d){this.name=d;this.listeners=[];};c.prototype={getListenerIndex:function(d){for(var e=0,f=this.listeners;e<f.length;e++){if(f[e].fn==d)return e;}return-1;}};return{on:function(d,e,f,g,h){var i=b(this),j=i[d]||(i[d]=new c(d));if(j.getListenerIndex(e)<0){var k=j.listeners;if(!f)f=this;if(isNaN(h))h=10;var l=this,m=function(o,p,q,r){var s={name:d,sender:this,editor:o,data:p,listenerData:g,stop:q,cancel:r,removeListener:function(){l.removeListener(d,e);}};e.call(f,s);return s.data;};m.fn=e;m.priority=h;for(var n=k.length-1;n>=0;n--){if(k[n].priority<=h){k.splice(n+1,0,m);return;}}k.unshift(m);}},fire:(function(){var d=false,e=function(){d=true;},f=false,g=function(){f=true;};return function(h,i,j){var k=b(this)[h],l=d,m=f;d=f=false;if(k){var n=k.listeners;if(n.length){n=n.slice(0);for(var o=0;o<n.length;o++){var p=n[o].call(this,j,i,e,g);if(typeof p!='undefined')i=p;if(d||f)break;}}}var q=f||(typeof i=='undefined'?false:i);d=l;f=m;return q;};})(),fireOnce:function(d,e,f){var g=this.fire(d,e,f);delete b(this)[d];return g;},removeListener:function(d,e){var f=b(this)[d];if(f){var g=f.getListenerIndex(e);if(g>=0)f.listeners.splice(g,1);}},hasListeners:function(d){var e=b(this)[d];return e&&e.listeners.length>0;}};})();}if(!a.editor){a.ELEMENT_MODE_NONE=0;a.ELEMENT_MODE_REPLACE=1;a.ELEMENT_MODE_APPENDTO=2;a.editor=function(b,c,d,e){var f=this;f._={instanceConfig:b,element:c,data:e};f.elementMode=d||0;a.event.call(f);f._init();};a.editor.replace=function(b,c){var d=b;if(typeof d!='object'){d=document.getElementById(b);if(!d){var e=0,f=document.getElementsByName(b);while((d=f[e++])&&d.tagName.toLowerCase()!='textarea'){}}if(!d)throw '[CKEDITOR.editor.replace] The element with id or name "'+b+'" was not found.';}d.style.visibility='hidden';return new a.editor(c,d,1);};a.editor.appendTo=function(b,c,d){var e=b;if(typeof e!='object'){e=document.getElementById(b);if(!e)throw '[CKEDITOR.editor.appendTo] The element with id "'+b+'" was not found.';}return new a.editor(c,e,2,d);};a.editor.prototype={_init:function(){var b=a.editor._pending||(a.editor._pending=[]);b.push(this);},fire:function(b,c){return a.event.prototype.fire.call(this,b,c,this);},fireOnce:function(b,c){return a.event.prototype.fireOnce.call(this,b,c,this);}};a.event.implementOn(a.editor.prototype,true);}if(!a.env)a.env=(function(){var b=navigator.userAgent.toLowerCase(),c=window.opera,d={ie:/*@cc_on!@*/false,opera:!!c&&c.version,webkit:b.indexOf(' applewebkit/')>-1,air:b.indexOf(' adobeair/')>-1,mac:b.indexOf('macintosh')>-1,quirks:document.compatMode=='BackCompat',mobile:b.indexOf('mobile')>-1,isCustomDomain:function(){return this.ie&&document.domain!=window.location.hostname;}};d.gecko=navigator.product=='Gecko'&&!d.webkit&&!d.opera;var e=0;if(d.ie){e=parseFloat(b.match(/msie (\d+)/)[1]);d.ie8=!!document.documentMode;d.ie8Compat=document.documentMode==8;d.ie7Compat=e==7&&!document.documentMode||document.documentMode==7;d.ie6Compat=e<7||d.quirks;}if(d.gecko){var f=b.match(/rv:([\d\.]+)/);if(f){f=f[1].split('.');e=f[0]*10000+(f[1]||0)*100+ +(f[2]||0);}}if(d.opera)e=parseFloat(c.version());if(d.air)e=parseFloat(b.match(/ adobeair\/(\d+)/)[1]);if(d.webkit)e=parseFloat(b.match(/ applewebkit\/(\d+)/)[1]);d.version=e;d.isCompatible=!d.mobile&&(d.ie&&e>=6||d.gecko&&e>=10801||d.opera&&e>=9.5||d.air&&e>=1||d.webkit&&e>=522||false);d.cssClass='cke_browser_'+(d.ie?'ie':d.gecko?'gecko':d.opera?'opera':d.air?'air':d.webkit?'webkit':'unknown');if(d.quirks)d.cssClass+=' cke_browser_quirks';if(d.ie){d.cssClass+=' cke_browser_ie'+(d.version<7?'6':d.version>=8?'8':'7');if(d.quirks)d.cssClass+=' cke_browser_iequirks';}if(d.gecko&&e<10900)d.cssClass+=' cke_browser_gecko18';return d;})();var b=a.env;var c=b.ie;if(a.status=='unloaded')(function(){a.event.implementOn(a);a.loadFullCore=function(){if(a.status!='basic_ready'){a.loadFullCore._load=true;return;}delete a.loadFullCore;var e=document.createElement('script');e.type='text/javascript';e.src=a.basePath+'ckeditor.js';document.getElementsByTagName('head')[0].appendChild(e);};a.loadFullCoreTimeout=0;a.replaceClass='ckeditor';a.replaceByClassEnabled=true;var d=function(e,f,g,h){if(b.isCompatible){if(a.loadFullCore)a.loadFullCore();var i=g(e,f,h);a.add(i);return i;}return null;};a.replace=function(e,f){return d(e,f,a.editor.replace);};a.appendTo=function(e,f,g){return d(e,f,a.editor.appendTo,g);};a.add=function(e){var f=this._.pending||(this._.pending=[]);f.push(e);};a.replaceAll=function(){var e=document.getElementsByTagName('textarea');for(var f=0;f<e.length;f++){var g=null,h=e[f],i=h.name;if(!h.name&&!h.id)continue;if(typeof arguments[0]=='string'){var j=new RegExp('(?:^| )'+arguments[0]+'(?:$| )');if(!j.test(h.className))continue;}else if(typeof arguments[0]=='function'){g={};if(arguments[0](h,g)===false)continue;}this.replace(h,g);}};(function(){var e=function(){var f=a.loadFullCore,g=a.loadFullCoreTimeout;if(a.replaceByClassEnabled)a.replaceAll(a.replaceClass);a.status='basic_ready';if(f&&f._load)f();else if(g)setTimeout(function(){if(a.loadFullCore)a.loadFullCore();},g*1000);};if(window.addEventListener)window.addEventListener('load',e,false);else if(window.attachEvent)window.attachEvent('onload',e);})();a.status='basic_loaded';})();})(); |
prev.toggleClass(conf.disabledClass, i <= 0); next.toggleClass(conf.disabledClass, i >= self.getSize() -1); | setTimeout(function() { if (!e.isDefaultPrevented()) { prev.toggleClass(conf.disabledClass, i <= 0); next.toggleClass(conf.disabledClass, i >= self.getSize() -1); } }, 1); | (function($) { // static constructs $.tools = $.tools || {version: '@VERSION'}; $.tools.scrollable = { conf: { activeClass: 'active', circular: false, clonedClass: 'cloned', disabledClass: 'disabled', easing: 'swing', initialIndex: 0, item: null, items: '.items', keyboard: true, mousewheel: false, next: '.next', prev: '.prev', speed: 400, vertical: false, wheelSpeed: 0 } }; // get hidden element's width or height even though it's hidden function dim(el, key) { var v = parseInt(el.css(key), 10); if (v) { return v; } var s = el[0].currentStyle; return s && s.width && parseInt(s.width, 10); } function find(root, query) { var el = $(query); return el.length < 2 ? el : root.parent().find(query); } var current; // constructor function Scrollable(root, conf) { // current instance var self = this, fire = root.add(self), itemWrap = root.children(), index = 0, vertical = conf.vertical; if (!current) { current = self; } if (itemWrap.length > 1) { itemWrap = $(conf.items, root); } // methods $.extend(self, { getConf: function() { return conf; }, getIndex: function() { return index; }, getSize: function() { return self.getItems().size(); }, getNaviButtons: function() { return prev.add(next); }, getRoot: function() { return root; }, getItemWrap: function() { return itemWrap; }, getItems: function() { return itemWrap.children(conf.item).not("." + conf.clonedClass); }, move: function(offset, time) { return self.seekTo(index + offset, time); }, next: function(time) { return self.move(1, time); }, prev: function(time) { return self.move(-1, time); }, begin: function(time) { return self.seekTo(0, time); }, end: function(time) { return self.seekTo(self.getSize() -1, time); }, focus: function() { current = self; return self; }, addItem: function(item) { item = $(item); if (!conf.circular) { itemWrap.append(item); } else { $(".cloned:last").before(item); $(".cloned:first").replaceWith(item.clone().addClass(conf.clonedClass)); } fire.trigger("onAddItem", [item]); return self; }, /* all seeking functions depend on this */ seekTo: function(i, time, fn) { // avoid seeking from end clone to the beginning if (conf.circular && i === 0 && index == -1 && time !== 0) { return self; } // check that index is sane if (!conf.circular && i < 0 || i > self.getSize() || i < -1) { return self; } var item = i; if (i.jquery) { i = self.getItems().index(i); } else { item = self.getItems().eq(i); } // onBeforeSeek var e = $.Event("onBeforeSeek"); if (!fn) { fire.trigger(e, [i, time]); if (e.isDefaultPrevented() || !item.length) { return self; } } var props = vertical ? {top: -item.position().top} : {left: -item.position().left}; index = i; current = self; if (time === undefined) { time = conf.speed; } itemWrap.animate(props, time, conf.easing, fn || function() { fire.trigger("onSeek", [i]); }); return self; } }); // callbacks $.each(['onBeforeSeek', 'onSeek', 'onAddItem'], function(i, name) { // configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); // circular loop if (conf.circular) { var cloned1 = self.getItems().slice(-1).clone().prependTo(itemWrap), cloned2 = self.getItems().eq(1).clone().appendTo(itemWrap); cloned1.add(cloned2).addClass(conf.clonedClass); self.onBeforeSeek(function(e, i, time) { if (e.isDefaultPrevented()) { return; } /* 1. animate to the clone without event triggering 2. seek to correct position with 0 speed */ if (i == -1) { self.seekTo(cloned1, time, function() { self.end(0); }); return e.preventDefault(); } else if (i == self.getSize()) { self.seekTo(cloned2, time, function() { self.begin(0); }); } }); // seek over the cloned item self.seekTo(0, 0); } // next/prev buttons var prev = find(root, conf.prev).click(function() { self.prev(); }), next = find(root, conf.next).click(function() { self.next(); }); if (!conf.circular && self.getSize() > 1) { self.onBeforeSeek(function(e, i) { prev.toggleClass(conf.disabledClass, i <= 0); next.toggleClass(conf.disabledClass, i >= self.getSize() -1); }); } // mousewheel support if (conf.mousewheel && $.fn.mousewheel) { root.mousewheel(function(e, delta) { if (conf.mousewheel) { self.move(delta < 0 ? 1 : -1, conf.wheelSpeed || 50); return false; } }); } if (conf.keyboard) { $(document).bind("keydown.scrollable", function(evt) { // skip certain conditions if (!conf.keyboard || evt.altKey || evt.ctrlKey || $(evt.target).is(":input")) { return; } // does this instance have focus? if (conf.keyboard != 'static' && current != self) { return; } var key = evt.keyCode; if (vertical && (key == 38 || key == 40)) { self.move(key == 38 ? -1 : 1); return evt.preventDefault(); } if (!vertical && (key == 37 || key == 39)) { self.move(key == 37 ? -1 : 1); return evt.preventDefault(); } }); } // initial index $(self).trigger("onBeforeSeek", [conf.initialIndex]); } // jQuery plugin implementation $.fn.scrollable = function(conf) { // already constructed --> return API var el = this.data("scrollable"); if (el) { return el; } conf = $.extend({}, $.tools.scrollable.conf, conf); this.each(function() { el = new Scrollable($(this), conf); $(this).data("scrollable", el); }); return conf.api ? el: this; }; })(jQuery); |
isWidget = isInput && trigger.is(":checkbox, :radio, select, :button"), | isWidget = isInput && trigger.is(":checkbox, :radio, select, :button, :submit"), | (function($) { /* removed: oneInstance, lazy, tip must next to the trigger isShown(fully), layout, tipClass, layout */ // static constructs $.tools = $.tools || {version: '@VERSION'}; $.tools.tooltip = { conf: { // default effect variables effect: 'toggle', fadeOutSpeed: "fast", predelay: 0, delay: 30, opacity: 1, tip: 0, // 'top', 'bottom', 'right', 'left', 'center' position: ['top', 'center'], offset: [0, 0], relative: false, cancelDefault: true, // type to event mapping events: { def: "mouseenter,mouseleave", input: "focus,blur", widget: "focus mouseenter,blur mouseleave", tooltip: "mouseenter,mouseleave" }, // 1.2 layout: '<div/>', tipClass: 'tooltip' }, addEffect: function(name, loadFn, hideFn) { effects[name] = [loadFn, hideFn]; } }; var effects = { toggle: [ function(done) { var conf = this.getConf(), tip = this.getTip(), o = conf.opacity; if (o < 1) { tip.css({opacity: o}); } tip.show(); done.call(); }, function(done) { this.getTip().hide(); done.call(); } ], fade: [ function(done) { var conf = this.getConf(); this.getTip().fadeTo(conf.fadeInSpeed, conf.opacity, done); }, function(done) { this.getTip().fadeOut(this.getConf().fadeOutSpeed, done); } ] }; /* calculate tip position relative to the trigger */ function getPosition(trigger, tip, conf) { // get origin top/left position var top = conf.relative ? trigger.position().top : trigger.offset().top, left = conf.relative ? trigger.position().left : trigger.offset().left, pos = conf.position[0]; top -= tip.outerHeight() - conf.offset[0]; left += trigger.outerWidth() + conf.offset[1]; // adjust Y var height = tip.outerHeight() + trigger.outerHeight(); if (pos == 'center') { top += height / 2; } if (pos == 'bottom') { top += height; } // adjust X pos = conf.position[1]; var width = tip.outerWidth() + trigger.outerWidth(); if (pos == 'center') { left -= width / 2; } if (pos == 'left') { left -= width; } return {top: top, left: left}; } function Tooltip(trigger, conf) { var self = this, fire = trigger.add(self), tip, timer = 0, pretimer = 0, title = trigger.attr("title"), effect = effects[conf.effect], shown, // get show/hide configuration isInput = trigger.is(":input"), isWidget = isInput && trigger.is(":checkbox, :radio, select, :button"), type = trigger.attr("type"), evt = conf.events[type] || conf.events[isInput ? (isWidget ? 'widget' : 'input') : 'def']; // check that configuration is sane if (!effect) { throw "Nonexistent effect \"" + conf.effect + "\""; } evt = evt.split(/,\s*/); if (evt.length != 2) { throw "Tooltip: bad events configuration for " + type; } // trigger --> show trigger.bind(evt[0], function(e) { if (conf.predelay) { clearTimeout(timer); pretimer = setTimeout(function() { self.show(e); }, conf.predelay); } else { self.show(e); } // trigger --> hide }).bind(evt[1], function(e) { if (conf.delay) { clearTimeout(pretimer); timer = setTimeout(function() { self.hide(e); }, conf.delay); } else { self.hide(e); } }); // remove default title if (title && conf.cancelDefault) { trigger.removeAttr("title"); trigger.data("title", title); } $.extend(self, { show: function(e) { // tip not initialized yet if (!tip) { // autogenerated tooltip if (title) { tip = $(conf.layout).addClass(conf.tipClass).appendTo(document.body) .hide().append(title); // single tip element for all } else if (conf.tip) { tip = $(conf.tip).eq(0); // manual tooltip } else { tip = trigger.next(); if (!tip.length) { tip = trigger.parent().next(); } } if (!tip.length) { throw "Cannot find tooltip for " + trigger; } } if (self.isShown()) { return self; } // stop previous animation tip.stop(true, true); // get position var pos = getPosition(trigger, tip, conf); // onBeforeShow e = e || $.Event(); e.type = "onBeforeShow"; fire.trigger(e, [pos]); if (e.isDefaultPrevented()) { return self; } // onBeforeShow may have altered the configuration pos = getPosition(trigger, tip, conf); // set position tip.css({position:'absolute', top: pos.top, left: pos.left}); shown = true; // invoke effect effect[0].call(self, function() { e.type = "onShow"; shown = 'full'; fire.trigger(e); }); // tooltip events var event = conf.events.tooltip.split(/,\s*/); tip.bind(event[0], function() { clearTimeout(timer); clearTimeout(pretimer); }); if (event[1] && !trigger.is("input:not(:checkbox, :radio), textarea")) { tip.bind(event[1], function(e) { // being moved to the trigger element if (e.relatedTarget != trigger[0]) { trigger.trigger(evt[1].split(" ")[0]); } }); } return self; }, hide: function(e) { if (!tip || !self.isShown()) { return self; } // onBeforeHide e = e || $.Event(); e.type = "onBeforeHide"; fire.trigger(e); if (e.isDefaultPrevented()) { return; } shown = false; effects[conf.effect][1].call(self, function() { e.type = "onHide"; shown = false; fire.trigger(e); }); return self; }, isShown: function(fully) { return fully ? shown == 'full' : shown; }, getConf: function() { return conf; }, getTip: function() { return tip; }, getTrigger: function() { return trigger; } }); // callbacks $.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","), function(i, name) { // configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } // API self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); } // jQuery plugin implementation $.fn.tooltip = function(conf) { // return existing instance var api = this.data("tooltip"); if (api) { return api; } conf = $.extend(true, {}, $.tools.tooltip.conf, conf); // position can also be given as string if (typeof conf.position == 'string') { conf.position = conf.position.split(/,?\s/); } // install tooltip for each entry in jQuery object this.each(function() { api = new Tooltip($(this), conf); $(this).data("tooltip", api); }); return conf.api ? api: this; }; }) (jQuery); |
var ajax = new XMLHttpRequest(), | var ajax = new window.XMLHttpRequest(), | BF.include = (function (){ /// Stores files that have already been loaded so that they do not have to be downloaded more than once. ///TODO: Use this, and maybe make a way to ignore the cache is needed. var files = []; return function (path, context, timeout, retry) { var ajax = new XMLHttpRequest(), include_timeout; /** * Send the Ajax requst and start timeout timer. * * @return NULL. * @note This code is a separate function to reduce code duplication. * @note Called by the parent function. */ function begin_include() { ajax.send(); if (timeout) { /// Begin the timeout timer to ensure that the download does not freeze. include_timeout = window.setTimeout(function () { ajax.abort(); if (retry) { begin_include(); } }, timeout); } } /// Determine if arguments were passed to the last two parameters. If not, set the defaults. if (typeof timeout == "undefined") { /// Default to 10 seconds. ///TODO: This should be dynamic based on the quality of the connection to the server. timeout = 10000; } if (typeof retry == "undefined") { retry = true; } ///TODO: determine if the first parameter should be different. ajax.open("GET", path); ajax.onreadystatechange = function () { if (ajax.readyState == 4) { /// Stop the timeout timer that may be running so it does not try again. clearTimeout(include_timeout); /// Was the request successful? if (ajax.status == 200) { /// Load and run the new code. eval(ajax.responseText)(context); } else if (retry) { begin_include(); } } }; begin_include(); };}()); |
WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,s,h){var p=this;this.getId=function(){return s};this.WT=a;this.marginH=function(c){var f=a.px(c,"marginLeft");f+=a.px(c,"marginRight");f+=a.px(c,"borderLeftWidth");f+=a.px(c,"borderRightWidth");f+=a.px(c,"paddingLeft");f+=a.px(c,"paddingRight");return f};this.marginV=function(c){var f=a.px(c,"marginTop");f+=a.px(c,"marginBottom");f+=a.px(c,"borderTopWidth");f+=a.px(c,"borderBottomWidth");f+=a.px(c,"paddingTop");f+=a.px(c,"paddingBottom");return f};this.getColumn= function(c){var f,i,j,g=a.getElement(s).firstChild.childNodes;i=f=0;for(j=g.length;i<j;i++){var q=g[i];if(a.hasTag(q,"COLGROUP")){i=-1;g=q.childNodes;j=g.length}if(a.hasTag(q,"COL"))if(q.className!="Wt-vrh")if(f==c)return q;else++f}return null};this.adjustRow=function(c,f){if(c.style.height!=f+"px")c.style.height=f+"px";c=c.childNodes;var i,j,g,q;i=0;q=-1;for(j=c.length;i<j;++i){g=c[i];var d=f;d-=a.pxself(g,"paddingTop");d-=a.pxself(g,"paddingBottom");if(d<=0)d=0;g.className!="Wt-vrh"&&++q;g.style.height= d+"px";if(!(g.style.verticalAlign||g.childNodes.length==0)){var b=g.childNodes[0];if(d<=0)d=0;if(b.className=="Wt-hcenter"){b.style.height=d+"px";b=b.firstChild.firstChild;if(!a.hasTag(b,"TD"))b=b.firstChild;if(b.style.height!=d+"px")b.style.height=d+"px";b=b.firstChild}if(g.childNodes.length==1)d-=this.marginV(b);if(d<=0)d=0;if(!a.hasTag(b,"TABLE"))if(b.wtResize){g=b.parentNode.offsetWidth-p.marginH(b);if(p.getColumn(q).style.width!=""){b.style.position="absolute";b.style.width=g+"px"}b.wtResize(b, g,d)}else if(b.style.height!=d+"px"){b.style.height=d+"px";if(b.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(b.firstChild,"TEXTAREA"))b.firstChild.style.height=d-a.pxself(b,"marginBottom")+"px"}}}};this.adjust=function(){var c=a.getElement(s);if(!c)return false;p.initResize&&p.initResize(a,s,h);if(a.isHidden(c))return true;var f=c.firstChild,i=c.parentNode;if(f.style.height!="")f.style.height="";if(!(c.dirty||f.w!=i.clientWidth||f.h!=i.clientHeight))return true;c.dirty=null;var j=a.pxself(i,"height"); if(j==0){j=i.clientHeight;j-=a.px(i,"paddingTop");j-=a.px(i,"paddingBottom")}j-=a.px(c,"marginTop");j-=a.px(c,"marginBottom");var g,q;if(i.children){g=0;for(q=i.children.length;g<q;++g){var d=i.children[g];if(d!=c)j-=$(d).outerHeight()}}var b=c=0,l,t;l=g=0;for(q=f.rows.length;g<q;g++){d=f.rows[g];if(d.className=="Wt-hrh")j-=d.offsetHeight;else{b+=h.minheight[l];if(h.stretch[l]<=0)j-=d.offsetHeight;else c+=h.stretch[l];++l}}j=j>b?j:b;if(c!=0&&j>0){b=j;var o;l=g=0;for(q=f.rows.length;g<q;g++)if(f.rows[g].className!= "Wt-hrh"){d=f.rows[g];if(h.stretch[l]!=0){if(h.stretch[l]!=-1){o=j*h.stretch[l]/c;o=b>o?o:b;o=Math.round(h.minheight[l]>o?h.minheight[l]:o);b-=o}else o=d.offsetHeight;this.adjustRow(d,o)}++l}}f.w=i.clientWidth;f.h=i.clientHeight;if(f.style.tableLayout!="fixed")return true;c=0;l=f.childNodes;i=0;for(j=l.length;i<j;i++){b=l[i];var y,A,z;if(a.hasTag(b,"COLGROUP")){i=-1;l=b.childNodes;j=l.length}if(a.hasTag(b,"COL")){if(a.pctself(b,"width")==0){g=o=0;for(q=f.rows.length;g<q;g++){d=f.rows[g];d=d.childNodes; A=y=0;for(z=d.length;A<z;A++){t=d[A];if(t.colSpan==1&&y==c&&t.childNodes.length==1){d=t.firstChild;d=d.offsetWidth+p.marginH(d);o=Math.max(o,d);break}y+=t.colSpan;if(y>c)break}}if(o>0&&a.pxself(b,"width")!=o)b.style.width=o+"px"}++c}}return true};this.adjust()}); | WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,s,i){var o=this;this.getId=function(){return s};this.WT=a;this.marginH=function(b){var f=b.parentNode,g=a.px(b,"marginLeft");g+=a.px(b,"marginRight");g+=a.px(b,"borderLeftWidth");g+=a.px(b,"borderRightWidth");g+=a.px(b,"paddingLeft");g+=a.px(b,"paddingRight");g+=a.pxself(f,"paddingLeft");g+=a.pxself(f,"paddingRight");return g};this.marginV=function(b){var f=a.px(b,"marginTop");f+=a.px(b,"marginBottom");f+=a.px(b,"borderTopWidth");f+=a.px(b,"borderBottomWidth"); f+=a.px(b,"paddingTop");f+=a.px(b,"paddingBottom");return f};this.getColumn=function(b){var f,g,j,h=a.getElement(s).firstChild.childNodes;g=f=0;for(j=h.length;g<j;g++){var q=h[g];if(a.hasTag(q,"COLGROUP")){g=-1;h=q.childNodes;j=h.length}if(a.hasTag(q,"COL"))if(q.className!="Wt-vrh")if(f==b)return q;else++f}return null};this.adjustRow=function(b,f){if(b.style.height!=f+"px")b.style.height=f+"px";b=b.childNodes;var g,j,h,q;g=0;q=-1;for(j=b.length;g<j;++g){h=b[g];var d=f;d-=a.pxself(h,"paddingTop"); d-=a.pxself(h,"paddingBottom");if(d<=0)d=0;h.className!="Wt-vrh"&&++q;h.style.height=d+"px";if(!(h.style.verticalAlign||h.childNodes.length==0)){var c=h.childNodes[0];if(d<=0)d=0;if(c.className=="Wt-hcenter"){c.style.height=d+"px";c=c.firstChild.firstChild;if(!a.hasTag(c,"TD"))c=c.firstChild;if(c.style.height!=d+"px")c.style.height=d+"px";c=c.firstChild}if(h.childNodes.length==1)d-=this.marginV(c);if(d<=0)d=0;if(!a.hasTag(c,"TABLE"))if(c.wtResize){h=c.parentNode.offsetWidth-o.marginH(c);if(o.getColumn(q).style.width!= ""){c.style.position="absolute";c.style.width=h+"px"}c.wtResize(c,h,d)}else if(c.style.height!=d+"px"){c.style.height=d+"px";if(c.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(c.firstChild,"TEXTAREA"))c.firstChild.style.height=d-a.pxself(c,"marginBottom")+"px"}}}};this.adjust=function(){var b=a.getElement(s);if(!b)return false;o.initResize&&o.initResize(a,s,i);if(a.isHidden(b))return true;var f=b.firstChild,g=b.parentNode;if(f.style.height!="")f.style.height="";if(!(b.dirty||f.w!=g.clientWidth||f.h!= g.clientHeight))return true;b.dirty=null;var j=a.pxself(g,"height");if(j==0){j=g.clientHeight;j-=a.px(g,"paddingTop");j-=a.px(g,"paddingBottom")}j-=a.px(b,"marginTop");j-=a.px(b,"marginBottom");var h,q;if(g.children){h=0;for(q=g.children.length;h<q;++h){var d=g.children[h];if(d!=b)j-=$(d).outerHeight()}}var c=b=0,l,t;l=h=0;for(q=f.rows.length;h<q;h++){d=f.rows[h];if(d.className=="Wt-hrh")j-=d.offsetHeight;else{c+=i.minheight[l];if(i.stretch[l]<=0)j-=d.offsetHeight;else b+=i.stretch[l];++l}}j=j>c? j:c;if(b!=0&&j>0){c=j;var p;l=h=0;for(q=f.rows.length;h<q;h++)if(f.rows[h].className!="Wt-hrh"){d=f.rows[h];if(i.stretch[l]!=0){if(i.stretch[l]!=-1){p=j*i.stretch[l]/b;p=c>p?p:c;p=Math.round(i.minheight[l]>p?i.minheight[l]:p);c-=p}else p=d.offsetHeight;this.adjustRow(d,p)}++l}}f.w=g.clientWidth;f.h=g.clientHeight;if(f.style.tableLayout!="fixed")return true;b=0;l=f.childNodes;g=0;for(j=l.length;g<j;g++){c=l[g];var y,A,z;if(a.hasTag(c,"COLGROUP")){g=-1;l=c.childNodes;j=l.length}if(a.hasTag(c,"COL")){if(a.pctself(c, "width")==0){h=p=0;for(q=f.rows.length;h<q;h++){d=f.rows[h];d=d.childNodes;A=y=0;for(z=d.length;A<z;A++){t=d[A];if(t.colSpan==1&&y==b&&t.childNodes.length==1){d=t.firstChild;d=d.offsetWidth+o.marginH(d);p=Math.max(p,d);break}y+=t.colSpan;if(y>b)break}}if(p>0&&a.pxself(c,"width")!=p)c.style.width=p+"px"}++b}}return true};this.contains=function(b){var f=a.getElement(s);b=a.getElement(b.getId());return a.contains(f,b)};this.adjust()}); | WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,s,h){var p=this;this.getId=function(){return s};this.WT=a;this.marginH=function(c){var f=a.px(c,"marginLeft");f+=a.px(c,"marginRight");f+=a.px(c,"borderLeftWidth");f+=a.px(c,"borderRightWidth");f+=a.px(c,"paddingLeft");f+=a.px(c,"paddingRight");return f};this.marginV=function(c){var f=a.px(c,"marginTop");f+=a.px(c,"marginBottom");f+=a.px(c,"borderTopWidth");f+=a.px(c,"borderBottomWidth");f+=a.px(c,"paddingTop");f+=a.px(c,"paddingBottom");return f};this.getColumn=function(c){var f,i,j,g=a.getElement(s).firstChild.childNodes;i=f=0;for(j=g.length;i<j;i++){var q=g[i];if(a.hasTag(q,"COLGROUP")){i=-1;g=q.childNodes;j=g.length}if(a.hasTag(q,"COL"))if(q.className!="Wt-vrh")if(f==c)return q;else++f}return null};this.adjustRow=function(c,f){if(c.style.height!=f+"px")c.style.height=f+"px";c=c.childNodes;var i,j,g,q;i=0;q=-1;for(j=c.length;i<j;++i){g=c[i];var d=f;d-=a.pxself(g,"paddingTop");d-=a.pxself(g,"paddingBottom");if(d<=0)d=0;g.className!="Wt-vrh"&&++q;g.style.height=d+"px";if(!(g.style.verticalAlign||g.childNodes.length==0)){var b=g.childNodes[0];if(d<=0)d=0;if(b.className=="Wt-hcenter"){b.style.height=d+"px";b=b.firstChild.firstChild;if(!a.hasTag(b,"TD"))b=b.firstChild;if(b.style.height!=d+"px")b.style.height=d+"px";b=b.firstChild}if(g.childNodes.length==1)d-=this.marginV(b);if(d<=0)d=0;if(!a.hasTag(b,"TABLE"))if(b.wtResize){g=b.parentNode.offsetWidth-p.marginH(b);if(p.getColumn(q).style.width!=""){b.style.position="absolute";b.style.width=g+"px"}b.wtResize(b,g,d)}else if(b.style.height!=d+"px"){b.style.height=d+"px";if(b.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(b.firstChild,"TEXTAREA"))b.firstChild.style.height=d-a.pxself(b,"marginBottom")+"px"}}}};this.adjust=function(){var c=a.getElement(s);if(!c)return false;p.initResize&&p.initResize(a,s,h);if(a.isHidden(c))return true;var f=c.firstChild,i=c.parentNode;if(f.style.height!="")f.style.height="";if(!(c.dirty||f.w!=i.clientWidth||f.h!=i.clientHeight))return true;c.dirty=null;var j=a.pxself(i,"height");if(j==0){j=i.clientHeight;j-=a.px(i,"paddingTop");j-=a.px(i,"paddingBottom")}j-=a.px(c,"marginTop");j-=a.px(c,"marginBottom");var g,q;if(i.children){g=0;for(q=i.children.length;g<q;++g){var d=i.children[g];if(d!=c)j-=$(d).outerHeight()}}var b=c=0,l,t;l=g=0;for(q=f.rows.length;g<q;g++){d=f.rows[g];if(d.className=="Wt-hrh")j-=d.offsetHeight;else{b+=h.minheight[l];if(h.stretch[l]<=0)j-=d.offsetHeight;else c+=h.stretch[l];++l}}j=j>b?j:b;if(c!=0&&j>0){b=j;var o;l=g=0;for(q=f.rows.length;g<q;g++)if(f.rows[g].className!="Wt-hrh"){d=f.rows[g];if(h.stretch[l]!=0){if(h.stretch[l]!=-1){o=j*h.stretch[l]/c;o=b>o?o:b;o=Math.round(h.minheight[l]>o?h.minheight[l]:o);b-=o}else o=d.offsetHeight;this.adjustRow(d,o)}++l}}f.w=i.clientWidth;f.h=i.clientHeight;if(f.style.tableLayout!="fixed")return true;c=0;l=f.childNodes;i=0;for(j=l.length;i<j;i++){b=l[i];var y,A,z;if(a.hasTag(b,"COLGROUP")){i=-1;l=b.childNodes;j=l.length}if(a.hasTag(b,"COL")){if(a.pctself(b,"width")==0){g=o=0;for(q=f.rows.length;g<q;g++){d=f.rows[g];d=d.childNodes;A=y=0;for(z=d.length;A<z;A++){t=d[A];if(t.colSpan==1&&y==c&&t.childNodes.length==1){d=t.firstChild;d=d.offsetWidth+p.marginH(d);o=Math.max(o,d);break}y+=t.colSpan;if(y>c)break}}if(o>0&&a.pxself(b,"width")!=o)b.style.width=o+"px"}++c}}return true};this.adjust()}); |
WT_DECLARE_WT_MEMBER(1,"WSpinBox",function(m,b,g,h,f){function i(a){if(a>h)a=h;else if(a<g)a=g;b.value=a}function j(){var a=Number(b.value);a+=f;i(a);b.onchange()}function k(){var a=Number(b.value);a-=f;i(a);b.onchange()}jQuery.data(b,"obj",this);var d=m.WT,e=null,l;this.update=function(a,c,n){g=a;h=c;f=n};this.mouseMove=function(a,c){if(e){a=d.pageCoordinates(c).y-e.y;c=l;c-=a*f;i(c)}else{a=d.widgetCoordinates(b,c);if(a.x>b.offsetWidth-16){c=b.offsetHeight/2;b.style.cursor=a.y>=c-1&&a.y<=c+1?"crosshair": "default"}else b.style.cursor=""}};this.mouseDown=function(a,c){if(b.style.cursor=="crosshair"){d.capture(null);d.capture(b);e=d.pageCoordinates(c);l=Number(b.value)}else if(d.widgetCoordinates(b,c).x>b.offsetWidth-16){d.cancelEvent(c);d.capture(b)}};this.keyDown=function(a,c){if(c.keyCode==40)k();else c.keyCode==38&&j()};this.mouseUp=function(a,c){if(e!=null){e=null;a.onchange()}else{a=d.widgetCoordinates(b,c);if(a.x>b.offsetWidth-16)a.y<b.offsetHeight/2?j():k()}}}); | WT_DECLARE_WT_MEMBER(1,"WSpinBox",function(n,b,h,i,f){function j(a){if(a>i)a=i;else if(a<h)a=h;b.value=a}function k(){var a=Number(b.value);a+=f;j(a);b.onchange()}function l(){var a=Number(b.value);a-=f;j(a);b.onchange()}jQuery.data(b,"obj",this);var d=n.WT,g=$(b),e=null,m;this.update=function(a,c,o){h=a;i=c;f=o};this.mouseOut=function(){g.removeClass("Wt-spinbox-dn").removeClass("Wt-spinbox-up")};this.mouseMove=function(a,c){if(e){a=d.pageCoordinates(c).y-e.y;c=m;c-=a*f;j(c)}else{a=d.widgetCoordinates(b, c);g.removeClass("Wt-spinbox-dn").removeClass("Wt-spinbox-up");if(a.x>b.offsetWidth-16){c=b.offsetHeight/2;if(a.y>=c-1&&a.y<=c+1)b.style.cursor="crosshair";else{b.style.cursor="default";a.y<c-1?g.addClass("Wt-spinbox-up"):g.addClass("Wt-spinbox-dn")}}else b.style.cursor=""}};this.mouseDown=function(a,c){if(b.style.cursor=="crosshair"){d.capture(null);d.capture(b);e=d.pageCoordinates(c);m=Number(b.value)}else if(d.widgetCoordinates(b,c).x>b.offsetWidth-16){d.cancelEvent(c);d.capture(b)}};this.keyDown= function(a,c){if(c.keyCode==40)l();else c.keyCode==38&&k()};this.mouseUp=function(a,c){if(e!=null){e=null;a.onchange()}else{a=d.widgetCoordinates(b,c);if(a.x>b.offsetWidth-16)a.y<b.offsetHeight/2?k():l()}}}); | WT_DECLARE_WT_MEMBER(1,"WSpinBox",function(m,b,g,h,f){function i(a){if(a>h)a=h;else if(a<g)a=g;b.value=a}function j(){var a=Number(b.value);a+=f;i(a);b.onchange()}function k(){var a=Number(b.value);a-=f;i(a);b.onchange()}jQuery.data(b,"obj",this);var d=m.WT,e=null,l;this.update=function(a,c,n){g=a;h=c;f=n};this.mouseMove=function(a,c){if(e){a=d.pageCoordinates(c).y-e.y;c=l;c-=a*f;i(c)}else{a=d.widgetCoordinates(b,c);if(a.x>b.offsetWidth-16){c=b.offsetHeight/2;b.style.cursor=a.y>=c-1&&a.y<=c+1?"crosshair":"default"}else b.style.cursor=""}};this.mouseDown=function(a,c){if(b.style.cursor=="crosshair"){d.capture(null);d.capture(b);e=d.pageCoordinates(c);l=Number(b.value)}else if(d.widgetCoordinates(b,c).x>b.offsetWidth-16){d.cancelEvent(c);d.capture(b)}};this.keyDown=function(a,c){if(c.keyCode==40)k();else c.keyCode==38&&j()};this.mouseUp=function(a,c){if(e!=null){e=null;a.onchange()}else{a=d.widgetCoordinates(b,c);if(a.x>b.offsetWidth-16)a.y<b.offsetHeight/2?j():k()}}}); |
var submit_params = $.param(Pfs.UI.browserInfo()); $(this).attr('href', $(this).attr('href') + '?' + submit_params); | $(this).attr('href', $(this).attr('href')); | PluginDir = (function () { var $ = window.$ = jQuery.noConflict(); var $this = { pfs_endpoint: 'http://plugins.stage.mozilla.com/pfs/v2', /** * Initialize the package. */ init: function () { $(document).ready(function () { // Tweak the body tag to indicate JS is working. $(document.body).removeClass('noJS').addClass('hasJS'); // Wire up the advanced search toggle. $('#advanced_search_toggle > a').click(function () { $('#advanced_search').toggle(); return false; }); // Wire up the status selector to hide/show vulnerability // fields, also setting up the initial state. $('.contribute select#status').each(function () { var status = $(this), fn = function () { $('#vulnerability_url, #vulnerability_description') .parent() .toggle('vulnerable' == status.val()); }; fn(); status.change(fn); }); // Append 'create sandbox plugin' link on sandbox tab with // detected browser info. $('.listing a.new_plugin').each(function () { var submit_params = $.param(Pfs.UI.browserInfo()); $(this).attr('href', $(this).attr('href') + '?' + submit_params); }); // Set up toggle-all checkboxes $('form .toggle_all').each(function () { var parent = $(this); parent.find('.toggler').click(function () { var toggler = $(this); parent.find('.toggled') .attr('checked', toggler.attr('checked')); }); }); // Cheap zebra striping for static tables $("tr:not(.template):nth-child(odd)").addClass("odd"); $("tr:not(.template):nth-child(even)").addClass("even"); }); return this; }, EOF:null }; return $this.init();})(); |
(function(){var a=CKEDITOR.document;CKEDITOR.dialog.add('templates',function(b){function c(h,i){h.setHtml('');for(var j=0;j<i.length;j++){var k=CKEDITOR.getTemplates(i[j]),l=k.imagesPath,m=k.templates,n=m.length;for(var o=0;o<n;o++){var p=m[o],q=d(p,l);q.setAttribute('aria-posinset',o+1);q.setAttribute('aria-setsize',n);h.append(q);}}};function d(h,i){var j=CKEDITOR.dom.element.createFromHtml('<a href="javascript:void(0)" tabIndex="-1" role="option" ><div class="cke_tpl_item"></div></a>'),k='<table style="width:350px;" class="cke_tpl_preview" role="presentation"><tr>';if(h.image&&i)k+='<td class="cke_tpl_preview_img"><img src="'+CKEDITOR.getUrl(i+h.image)+'"'+(CKEDITOR.env.ie6Compat?' onload="this.width=this.width"':'')+' alt="" title=""></td>';k+='<td style="white-space:normal;"><span class="cke_tpl_title">'+h.title+'</span><br/>';if(h.description)k+='<span>'+h.description+'</span>';k+='</td></tr></table>';j.getFirst().setHtml(k);j.on('click',function(){e(h.html);});return j;};function e(h){var i=CKEDITOR.dialog.getCurrent(),j=i.getValueOf('selectTpl','chkInsertOpt');if(j){b.on('contentDom',function(k){k.removeListener();i.hide();var l=new CKEDITOR.dom.range(b.document);l.moveToElementEditStart(b.document.getBody());l.select(true);setTimeout(function(){b.fire('saveSnapshot');},0);});b.fire('saveSnapshot');b.setData(h);}else{b.insertHtml(h);i.hide();}};function f(h){var i=h.data.getTarget(),j=g.equals(i);if(j||g.contains(i)){var k=h.data.getKeystroke(),l=g.getElementsByTag('a'),m;if(l){if(j)m=l.getItem(0);else switch(k){case 40:m=i.getNext();break;case 38:m=i.getPrevious();break;case 13:case 32:i.fire('click');}if(m){m.focus();h.data.preventDefault();}}}};CKEDITOR.skins.load(b,'templates');var g;return{title:b.lang.templates.title,minWidth:CKEDITOR.env.ie?440:400,minHeight:340,contents:[{id:'selectTpl',label:b.lang.templates.title,elements:[{type:'vbox',padding:5,children:[{type:'html',html:'<span>'+b.lang.templates.selectPromptMsg+'</span>'},{id:'templatesList',type:'html',focus:true,html:'<div class="cke_tpl_list" tabIndex="-1" role="listbox" aria-labelledby="cke_tpl_list_label"><div class="cke_tpl_loading"><span></span></div></div><span class="cke_voice_label" id="cke_tpl_list_label">'+b.lang.templates.options+'</span>'},{id:'chkInsertOpt',type:'checkbox',label:b.lang.templates.insertOption,'default':b.config.templates_replaceContent}]}]}],buttons:[CKEDITOR.dialog.cancelButton],onShow:function(){var h=this.getContentElement('selectTpl','templatesList');g=h.getElement(); CKEDITOR.loadTemplates(b.config.templates_files,function(){var i=b.config.templates.split(',');if(i.length){c(g,i);h.focus();}else g.setHtml('<div class="cke_tpl_empty"><span>'+b.lang.templates.emptyListMsg+'</span>'+'</div>');});this._.element.on('keydown',f);},onHide:function(){this._.element.removeListener('keydown',f);}};});})(); | (function(){var a=CKEDITOR.document;CKEDITOR.dialog.add('templates',function(b){function c(i,j){i.setHtml('');for(var k=0;k<j.length;k++){var l=CKEDITOR.getTemplates(j[k]),m=l.imagesPath,n=l.templates,o=n.length;for(var p=0;p<o;p++){var q=n[p],r=d(q,m);r.setAttribute('aria-posinset',p+1);r.setAttribute('aria-setsize',o);i.append(r);}}};function d(i,j){var k=CKEDITOR.dom.element.createFromHtml('<a href="javascript:void(0)" tabIndex="-1" role="option" ><div class="cke_tpl_item"></div></a>'),l='<table style="width:350px;" class="cke_tpl_preview" role="presentation"><tr>';if(i.image&&j)l+='<td class="cke_tpl_preview_img"><img src="'+CKEDITOR.getUrl(j+i.image)+'"'+(CKEDITOR.env.ie6Compat?' onload="this.width=this.width"':'')+' alt="" title=""></td>';l+='<td style="white-space:normal;"><span class="cke_tpl_title">'+i.title+'</span><br/>';if(i.description)l+='<span>'+i.description+'</span>';l+='</td></tr></table>';k.getFirst().setHtml(l);k.on('click',function(){e(i.html);});return k;};function e(i){var j=CKEDITOR.dialog.getCurrent(),k=j.getValueOf('selectTpl','chkInsertOpt');if(k){b.on('contentDom',function(l){l.removeListener();j.hide();var m=new CKEDITOR.dom.range(b.document);m.moveToElementEditStart(b.document.getBody());m.select(true);setTimeout(function(){b.fire('saveSnapshot');},0);});b.fire('saveSnapshot');b.setData(i);}else{b.insertHtml(i);j.hide();}};function f(i){var j=i.data.getTarget(),k=g.equals(j);if(k||g.contains(j)){var l=i.data.getKeystroke(),m=g.getElementsByTag('a'),n;if(m){if(k)n=m.getItem(0);else switch(l){case 40:n=j.getNext();break;case 38:n=j.getPrevious();break;case 13:case 32:j.fire('click');}if(n){n.focus();i.data.preventDefault();}}}};CKEDITOR.skins.load(b,'templates');var g,h='cke_tpl_list_label_'+CKEDITOR.tools.getNextNumber();return{title:b.lang.templates.title,minWidth:CKEDITOR.env.ie?440:400,minHeight:340,contents:[{id:'selectTpl',label:b.lang.templates.title,elements:[{type:'vbox',padding:5,children:[{type:'html',html:'<span>'+b.lang.templates.selectPromptMsg+'</span>'},{id:'templatesList',type:'html',focus:true,html:'<div class="cke_tpl_list" tabIndex="-1" role="listbox" aria-labelledby="'+h+'">'+'<div class="cke_tpl_loading"><span></span></div>'+'</div>'+'<span class="cke_voice_label" id="'+h+'">'+b.lang.templates.options+'</span>'},{id:'chkInsertOpt',type:'checkbox',label:b.lang.templates.insertOption,'default':b.config.templates_replaceContent}]}]}],buttons:[CKEDITOR.dialog.cancelButton],onShow:function(){var i=this.getContentElement('selectTpl','templatesList'); g=i.getElement();CKEDITOR.loadTemplates(b.config.templates_files,function(){var j=b.config.templates.split(',');if(j.length){c(g,j);i.focus();}else g.setHtml('<div class="cke_tpl_empty"><span>'+b.lang.templates.emptyListMsg+'</span>'+'</div>');});this._.element.on('keydown',f);},onHide:function(){this._.element.removeListener('keydown',f);}};});})(); | (function(){var a=CKEDITOR.document;CKEDITOR.dialog.add('templates',function(b){function c(h,i){h.setHtml('');for(var j=0;j<i.length;j++){var k=CKEDITOR.getTemplates(i[j]),l=k.imagesPath,m=k.templates,n=m.length;for(var o=0;o<n;o++){var p=m[o],q=d(p,l);q.setAttribute('aria-posinset',o+1);q.setAttribute('aria-setsize',n);h.append(q);}}};function d(h,i){var j=CKEDITOR.dom.element.createFromHtml('<a href="javascript:void(0)" tabIndex="-1" role="option" ><div class="cke_tpl_item"></div></a>'),k='<table style="width:350px;" class="cke_tpl_preview" role="presentation"><tr>';if(h.image&&i)k+='<td class="cke_tpl_preview_img"><img src="'+CKEDITOR.getUrl(i+h.image)+'"'+(CKEDITOR.env.ie6Compat?' onload="this.width=this.width"':'')+' alt="" title=""></td>';k+='<td style="white-space:normal;"><span class="cke_tpl_title">'+h.title+'</span><br/>';if(h.description)k+='<span>'+h.description+'</span>';k+='</td></tr></table>';j.getFirst().setHtml(k);j.on('click',function(){e(h.html);});return j;};function e(h){var i=CKEDITOR.dialog.getCurrent(),j=i.getValueOf('selectTpl','chkInsertOpt');if(j){b.on('contentDom',function(k){k.removeListener();i.hide();var l=new CKEDITOR.dom.range(b.document);l.moveToElementEditStart(b.document.getBody());l.select(true);setTimeout(function(){b.fire('saveSnapshot');},0);});b.fire('saveSnapshot');b.setData(h);}else{b.insertHtml(h);i.hide();}};function f(h){var i=h.data.getTarget(),j=g.equals(i);if(j||g.contains(i)){var k=h.data.getKeystroke(),l=g.getElementsByTag('a'),m;if(l){if(j)m=l.getItem(0);else switch(k){case 40:m=i.getNext();break;case 38:m=i.getPrevious();break;case 13:case 32:i.fire('click');}if(m){m.focus();h.data.preventDefault();}}}};CKEDITOR.skins.load(b,'templates');var g;return{title:b.lang.templates.title,minWidth:CKEDITOR.env.ie?440:400,minHeight:340,contents:[{id:'selectTpl',label:b.lang.templates.title,elements:[{type:'vbox',padding:5,children:[{type:'html',html:'<span>'+b.lang.templates.selectPromptMsg+'</span>'},{id:'templatesList',type:'html',focus:true,html:'<div class="cke_tpl_list" tabIndex="-1" role="listbox" aria-labelledby="cke_tpl_list_label"><div class="cke_tpl_loading"><span></span></div></div><span class="cke_voice_label" id="cke_tpl_list_label">'+b.lang.templates.options+'</span>'},{id:'chkInsertOpt',type:'checkbox',label:b.lang.templates.insertOption,'default':b.config.templates_replaceContent}]}]}],buttons:[CKEDITOR.dialog.cancelButton],onShow:function(){var h=this.getContentElement('selectTpl','templatesList');g=h.getElement();CKEDITOR.loadTemplates(b.config.templates_files,function(){var i=b.config.templates.split(',');if(i.length){c(g,i);h.focus();}else g.setHtml('<div class="cke_tpl_empty"><span>'+b.lang.templates.emptyListMsg+'</span>'+'</div>');});this._.element.on('keydown',f);},onHide:function(){this._.element.removeListener('keydown',f);}};});})(); |
alert('MA JONG'); | editor.onActivate.add(function(editor) { alert('MA JONG'); $(editor.getContainer()).addClass('expanded'); }); |
|
WT_DECLARE_WT_MEMBER(1,"WTreeView",function(l,d,i,p,q){function n(c){var a=-1,b=null,f=false,e=false,h=null;for(c=c.target||c.srcElement;c;){if(c.className.indexOf("c1 rh")==0){if(a==-1)a=0}else if(c.className.indexOf("Wt-tv-c")==0){if(c.className.indexOf("Wt-tv-c")==0)a=c.className.split(" ")[0].substring(7)*1;else if(a==-1)a=0;if(c.getAttribute("drop")==="true")e=true;h=c}else if(c.className=="Wt-tv-node"){b=c.id;break}if(c.className==="Wt-selected")f=true;c=c.parentNode;if(g.hasTag(c,"BODY"))break}return{columnId:a, nodeId:b,selected:f,drop:e,el:h}}jQuery.data(d,"obj",this);var o=i.firstChild,j=p.firstChild,g=l.WT;this.click=function(c,a){var b=n(a);b.columnId!=-1&&l.emit(d,{name:"itemEvent",eventObject:c,event:a},b.nodeId,b.columnId,"clicked","","")};this.dblClick=function(c,a){var b=n(a);b.columnId!=-1&&l.emit(d,{name:"itemEvent",eventObject:c,event:a},b.nodeId,b.columnId,"dblclicked","","")};this.mouseDown=function(c,a){g.capture(null);var b=n(a);if(b.columnId!=-1){l.emit(d,{name:"itemEvent",eventObject:c, event:a},b.nodeId,b.columnId,"mousedown","","");d.getAttribute("drag")==="true"&&b.selected&&l._p_.dragStart(d,a)}};this.mouseUp=function(c,a){var b=n(a);b.columnId!=-1&&l.emit(d,{name:"itemEvent",eventObject:c,event:a},b.nodeId,b.columnId,"mouseup","","")};this.resizeHandleMDown=function(c,a){a=g.pageCoordinates(a);c.setAttribute("dsx",a.x)};this.resizeHandleMMoved=function(c,a){var b=c.getAttribute("dsx"),f=j.lastChild.className.split(" ")[0];g.getCssRule("#"+d.id+" ."+f);if(b!=null&&b!=""){f=g.pageCoordinates(a); var e=c.parentNode.parentNode;b=Math.max(f.x-b,-e.offsetWidth);if(e=e.className.split(" ")[0]){e=g.getCssRule("#"+d.id+" ."+e);var h=g.pxself(e,"width");e.style.width=Math.max(0,h+b)+"px"}this.adjustColumns();c.setAttribute("dsx",f.x);g.cancelEvent(a)}};this.resizeHandleMUp=function(c,a){c.removeAttribute("dsx");g.cancelEvent(a)};this.adjustColumns=function(){var c=o.firstChild,a=j.firstChild,b=0,f=0;f=j.lastChild.className.split(" ")[0];f=g.getCssRule("#"+d.id+" ."+f);if(q)a=a.firstChild;if(!g.isHidden(d)){for(var e= 0,h=a.childNodes.length;e<h;++e)if(a.childNodes[e].className){var m=a.childNodes[e].className.split(" ")[0];m=g.getCssRule("#"+d.id+" ."+m);b+=g.pxself(m,"width")+7}if(!f.style.width)f.style.width=j.offsetWidth-a.offsetWidth-8+"px";f=b+g.pxself(f,"width")+(g.isIE6?10:8);if(q){m=g.getCssRule("#"+d.id+" .Wt-tv-rowc");m.style.width=b+"px";$(d).find(" .Wt-tv-rowc").css("width",b+"px").css("width","");d.changed=true;this.autoJavaScript()}else{j.style.width=c.style.width=f+"px";a.style.width=b+"px"}}}; var k=null;d.handleDragDrop=function(c,a,b,f,e){if(k){k.className=k.classNameOrig;k=null}if(c!="end"){b=n(b);if(!b.selected&&b.drop&&b.columnId!=-1)if(c=="drop")l.emit(d.id,"itemEvent",b.nodeId,b.columnId,"drop",f,e);else{a.className="Wt-valid-drop";k=b.el;k.classNameOrig=k.className;k.className+=" Wt-drop-site"}else a.className=""}};this.autoJavaScript=function(){if(d.parentNode==null){d=i=p=o=j=null;this.autoJavaScript=function(){}}else if(!g.isHidden(d)){var c=$(d),a=c.innerWidth(),b=i.scrollHeight> i.offsetHeight,f,e=null;if(c.hasClass("column1")){f=c.find(".Wt-headerdiv").get(0).lastChild.className.split(" ")[0];e=g.pxself(g.getCssRule("#"+d.id+" ."+f),"width")}if(!g.isIE||a>100&&(a!=i.tw||b!=i.vscroll||e!=i.c0w||d.changed)){i.tw=a;i.vscroll=b;i.c0w=e;f=o.firstChild;var h=g.getCssRule("#"+d.id+" .cwidth"),m=h.style.width==j.style.width;h.style.width=a-(b?19:0)+"px";i.style.width=a+"px";j.style.width=f.offsetWidth+"px";if(e!=null){e=a-e-(g.isIE6?10:8)-(b?19:0);if(e>0){h=Math.min(e,g.pxself(g.getCssRule("#"+ d.id+" .Wt-tv-rowc"),"width"));a-=e-h;g.getCssRule("#"+d.id+" .Wt-tv-row").style.width=h+"px";c.find(" .Wt-tv-row").css("width",h+"px").css("width","");a-=b?19:0;j.style.width=a+"px";f.style.width=a+"px"}}else if(m){j.style.width=h.style.width;f.style.width=h.style.width}d.changed=false}}};this.adjustColumns()}); | WT_DECLARE_WT_MEMBER(1,"WTreeView",function(m,d,i,p,q){function n(c){var a=-1,b=null,e=false,f=false,j=null;for(c=c.target||c.srcElement;c;){if(c.className.indexOf("c1 rh")==0){if(a==-1)a=0}else if(c.className.indexOf("Wt-tv-c")==0){if(c.className.indexOf("Wt-tv-c")==0)a=c.className.split(" ")[0].substring(7)*1;else if(a==-1)a=0;if(c.getAttribute("drop")==="true")f=true;j=c}else if(c.className=="Wt-tv-node"){b=c.id;break}if(c.className==="Wt-selected")e=true;c=c.parentNode;if(g.hasTag(c,"BODY"))break}return{columnId:a, nodeId:b,selected:e,drop:f,el:j}}jQuery.data(d,"obj",this);var o=i.firstChild,k=p.firstChild,g=m.WT;this.click=function(c,a){var b=n(a);b.columnId!=-1&&m.emit(d,{name:"itemEvent",eventObject:c,event:a},b.nodeId,b.columnId,"clicked","","")};this.dblClick=function(c,a){var b=n(a);b.columnId!=-1&&m.emit(d,{name:"itemEvent",eventObject:c,event:a},b.nodeId,b.columnId,"dblclicked","","")};this.mouseDown=function(c,a){g.capture(null);var b=n(a);if(b.columnId!=-1){m.emit(d,{name:"itemEvent",eventObject:c, event:a},b.nodeId,b.columnId,"mousedown","","");d.getAttribute("drag")==="true"&&b.selected&&m._p_.dragStart(d,a)}};this.mouseUp=function(c,a){var b=n(a);b.columnId!=-1&&m.emit(d,{name:"itemEvent",eventObject:c,event:a},b.nodeId,b.columnId,"mouseup","","")};this.resizeHandleMDown=function(c,a){a=g.pageCoordinates(a);c.setAttribute("dsx",a.x)};this.resizeHandleMMoved=function(c,a){var b=c.getAttribute("dsx"),e=k.lastChild.className.split(" ")[0];g.getCssRule("#"+d.id+" ."+e);if(b!=null&&b!=""){e=g.pageCoordinates(a); var f=c.parentNode.parentNode;b=Math.max(e.x-b,-f.offsetWidth);if(f=f.className.split(" ")[0]){f=g.getCssRule("#"+d.id+" ."+f);var j=g.pxself(f,"width");f.style.width=Math.max(0,j+b)+"px"}this.adjustColumns();c.setAttribute("dsx",e.x);g.cancelEvent(a)}};this.resizeHandleMUp=function(c,a){c.removeAttribute("dsx");g.cancelEvent(a)};this.adjustColumns=function(){var c=o.firstChild,a=k.firstChild,b=0,e=0;e=k.lastChild.className.split(" ")[0];e=g.getCssRule("#"+d.id+" ."+e);if(q)a=a.firstChild;if(!g.isHidden(d)){for(var f= 0,j=a.childNodes.length;f<j;++f)if(a.childNodes[f].className){var h=a.childNodes[f].className.split(" ")[0];h=g.getCssRule("#"+d.id+" ."+h);b+=g.pxself(h,"width")+7}if(!e.style.width)e.style.width=k.offsetWidth-a.offsetWidth-8+"px";e=b+g.pxself(e,"width")+(g.isIE6?10:8);if(q){h=g.getCssRule("#"+d.id+" .Wt-tv-rowc");h.style.width=b+"px";$(d).find(" .Wt-tv-rowc").css("width",b+"px").css("width","");d.changed=true;this.autoJavaScript()}else{k.style.width=c.style.width=e+"px";a.style.width=b+"px"}}}; var l=null;d.handleDragDrop=function(c,a,b,e,f){if(l){l.className=l.classNameOrig;l=null}if(c!="end"){b=n(b);if(!b.selected&&b.drop&&b.columnId!=-1)if(c=="drop")m.emit(d.id,"itemEvent",b.nodeId,b.columnId,"drop",e,f);else{a.className="Wt-valid-drop";l=b.el;l.classNameOrig=l.className;l.className+=" Wt-drop-site"}else a.className=""}};this.autoJavaScript=function(){if(d.parentNode==null){d=i=p=o=k=null;this.autoJavaScript=function(){}}else if(!g.isHidden(d)){var c=$(d),a=c.innerWidth(),b=i.scrollHeight> i.offsetHeight,e,f=null;if(c.hasClass("column1")){e=c.find(".Wt-headerdiv").get(0).lastChild.className.split(" ")[0];e=g.getCssRule("#"+d.id+" ."+e);f=g.pxself(e,"width")}if((!g.isIE||a>100)&&(a!=i.tw||b!=i.vscroll||f!=i.c0w||d.changed)){i.tw=a;i.vscroll=b;i.c0w=f;e=c.find(".Wt-headerdiv").get(0).lastChild.className.split(" ")[0];e=g.getCssRule("#"+d.id+" ."+e);var j=o.firstChild,h=g.getCssRule("#"+d.id+" .cwidth"),r=h.style.width==k.style.width,s=k.firstChild;h.style.width=a-(b?19:0)+"px";i.style.width= a+"px";k.style.width=j.offsetWidth+"px";if(f!=null){f=a-f-(g.isIE6?10:8)-(b?19:0);if(f>0){h=Math.min(f,g.pxself(g.getCssRule("#"+d.id+" .Wt-tv-rowc"),"width"));a-=f-h;g.getCssRule("#"+d.id+" .Wt-tv-row").style.width=h+"px";c.find(" .Wt-tv-row").css("width",h+"px").css("width","");a-=b?19:0;k.style.width=a+"px";j.style.width=a+"px"}}else if(r){k.style.width=h.style.width;j.style.width=h.style.width}e.style.width=j.offsetWidth-s.offsetWidth-8+"px";d.changed=false}}};this.adjustColumns()}); | WT_DECLARE_WT_MEMBER(1,"WTreeView",function(l,d,i,p,q){function n(c){var a=-1,b=null,f=false,e=false,h=null;for(c=c.target||c.srcElement;c;){if(c.className.indexOf("c1 rh")==0){if(a==-1)a=0}else if(c.className.indexOf("Wt-tv-c")==0){if(c.className.indexOf("Wt-tv-c")==0)a=c.className.split(" ")[0].substring(7)*1;else if(a==-1)a=0;if(c.getAttribute("drop")==="true")e=true;h=c}else if(c.className=="Wt-tv-node"){b=c.id;break}if(c.className==="Wt-selected")f=true;c=c.parentNode;if(g.hasTag(c,"BODY"))break}return{columnId:a,nodeId:b,selected:f,drop:e,el:h}}jQuery.data(d,"obj",this);var o=i.firstChild,j=p.firstChild,g=l.WT;this.click=function(c,a){var b=n(a);b.columnId!=-1&&l.emit(d,{name:"itemEvent",eventObject:c,event:a},b.nodeId,b.columnId,"clicked","","")};this.dblClick=function(c,a){var b=n(a);b.columnId!=-1&&l.emit(d,{name:"itemEvent",eventObject:c,event:a},b.nodeId,b.columnId,"dblclicked","","")};this.mouseDown=function(c,a){g.capture(null);var b=n(a);if(b.columnId!=-1){l.emit(d,{name:"itemEvent",eventObject:c,event:a},b.nodeId,b.columnId,"mousedown","","");d.getAttribute("drag")==="true"&&b.selected&&l._p_.dragStart(d,a)}};this.mouseUp=function(c,a){var b=n(a);b.columnId!=-1&&l.emit(d,{name:"itemEvent",eventObject:c,event:a},b.nodeId,b.columnId,"mouseup","","")};this.resizeHandleMDown=function(c,a){a=g.pageCoordinates(a);c.setAttribute("dsx",a.x)};this.resizeHandleMMoved=function(c,a){var b=c.getAttribute("dsx"),f=j.lastChild.className.split(" ")[0];g.getCssRule("#"+d.id+" ."+f);if(b!=null&&b!=""){f=g.pageCoordinates(a);var e=c.parentNode.parentNode;b=Math.max(f.x-b,-e.offsetWidth);if(e=e.className.split(" ")[0]){e=g.getCssRule("#"+d.id+" ."+e);var h=g.pxself(e,"width");e.style.width=Math.max(0,h+b)+"px"}this.adjustColumns();c.setAttribute("dsx",f.x);g.cancelEvent(a)}};this.resizeHandleMUp=function(c,a){c.removeAttribute("dsx");g.cancelEvent(a)};this.adjustColumns=function(){var c=o.firstChild,a=j.firstChild,b=0,f=0;f=j.lastChild.className.split(" ")[0];f=g.getCssRule("#"+d.id+" ."+f);if(q)a=a.firstChild;if(!g.isHidden(d)){for(var e=0,h=a.childNodes.length;e<h;++e)if(a.childNodes[e].className){var m=a.childNodes[e].className.split(" ")[0];m=g.getCssRule("#"+d.id+" ."+m);b+=g.pxself(m,"width")+7}if(!f.style.width)f.style.width=j.offsetWidth-a.offsetWidth-8+"px";f=b+g.pxself(f,"width")+(g.isIE6?10:8);if(q){m=g.getCssRule("#"+d.id+" .Wt-tv-rowc");m.style.width=b+"px";$(d).find(" .Wt-tv-rowc").css("width",b+"px").css("width","");d.changed=true;this.autoJavaScript()}else{j.style.width=c.style.width=f+"px";a.style.width=b+"px"}}};var k=null;d.handleDragDrop=function(c,a,b,f,e){if(k){k.className=k.classNameOrig;k=null}if(c!="end"){b=n(b);if(!b.selected&&b.drop&&b.columnId!=-1)if(c=="drop")l.emit(d.id,"itemEvent",b.nodeId,b.columnId,"drop",f,e);else{a.className="Wt-valid-drop";k=b.el;k.classNameOrig=k.className;k.className+=" Wt-drop-site"}else a.className=""}};this.autoJavaScript=function(){if(d.parentNode==null){d=i=p=o=j=null;this.autoJavaScript=function(){}}else if(!g.isHidden(d)){var c=$(d),a=c.innerWidth(),b=i.scrollHeight>i.offsetHeight,f,e=null;if(c.hasClass("column1")){f=c.find(".Wt-headerdiv").get(0).lastChild.className.split(" ")[0];e=g.pxself(g.getCssRule("#"+d.id+" ."+f),"width")}if(!g.isIE||a>100&&(a!=i.tw||b!=i.vscroll||e!=i.c0w||d.changed)){i.tw=a;i.vscroll=b;i.c0w=e;f=o.firstChild;var h=g.getCssRule("#"+d.id+" .cwidth"),m=h.style.width==j.style.width;h.style.width=a-(b?19:0)+"px";i.style.width=a+"px";j.style.width=f.offsetWidth+"px";if(e!=null){e=a-e-(g.isIE6?10:8)-(b?19:0);if(e>0){h=Math.min(e,g.pxself(g.getCssRule("#"+d.id+" .Wt-tv-rowc"),"width"));a-=e-h;g.getCssRule("#"+d.id+" .Wt-tv-row").style.width=h+"px";c.find(" .Wt-tv-row").css("width",h+"px").css("width","");a-=b?19:0;j.style.width=a+"px";f.style.width=a+"px"}}else if(m){j.style.width=h.style.width;f.style.width=h.style.width}d.changed=false}}};this.adjustColumns()}); |
if (event.changedTouches) | if (!WT.isIE && event.changedTouches) | function(WT, orientation, width, height, minDelta, maxDelta, dragWidgetClass, doneFn, el, parent, event, offsetX, offsetY) { var handle = document.createElement('div'); handle.style.position = 'absolute'; handle.style.zIndex = '100'; if (orientation == 'v') { handle.style.width = height + 'px'; handle.style.height = width + 'px'; } else { handle.style.height = height + 'px'; handle.style.width = width + 'px'; } var offset, elpos = WT.widgetPageCoordinates(el), parentpos = WT.widgetPageCoordinates(parent); if (event.touches) { offset = WT.widgetCoordinates(el, event.touches[0]); } else { offset = WT.widgetCoordinates(el, event); WT.capture(null); WT.capture(handle); } offsetX -= WT.px(el, 'marginLeft'); offsetY -= WT.px(el, 'marginTop'); elpos.x += offsetX - parentpos.x; elpos.y += offsetY - parentpos.y; offset.x -= offsetX - parentpos.x; offset.y -= offsetY - parentpos.y; handle.style.left = elpos.x + 'px'; handle.style.top = elpos.y + 'px'; handle.className = dragWidgetClass; parent.appendChild(handle); WT.cancelEvent(event); function computeDelta(event) { var p, result; if (event.changedTouches) p = { x: event.changedTouches[0].pageX, y: event.changedTouches[0].pageY }; else p = WT.pageCoordinates(event); if (orientation == 'h') result = (p.x - offset.x) - elpos.x; else result = (p.y - offset.y) - elpos.y; return Math.min(Math.max(result, minDelta), maxDelta); } handle.onmousemove = parent.ontouchmove = function(event) { var delta = computeDelta(event); if (orientation == 'h') handle.style.left = (elpos.x + delta) + 'px'; else handle.style.top = (elpos.y + delta) + 'px'; WT.cancelEvent(event); }; handle.onmouseup = parent.ontouchend = function(event) { if (handle.parentNode != null) { handle.parentNode.removeChild(handle); doneFn(computeDelta(event)); parent.ontouchmove = null; } }; } |
WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,s,i){var p=this;this.getId=function(){return s};this.WT=a;this.marginH=function(c){var h=c.parentNode,g=a.px(c,"marginLeft");g+=a.px(c,"marginRight");g+=a.px(c,"borderLeftWidth");g+=a.px(c,"borderRightWidth");g+=a.px(h,"paddingLeft");g+=a.px(h,"paddingRight");return g};this.marginV=function(c){var h=a.px(c,"marginTop");h+=a.px(c,"marginBottom");h+=a.px(c,"borderTopWidth");h+=a.px(c,"borderBottomWidth");h+=a.px(c,"paddingTop");h+=a.px(c,"paddingBottom"); return h};this.getColumn=function(c){var h,g,j,f=a.getElement(s).firstChild.childNodes;g=h=0;for(j=f.length;g<j;g++){var q=f[g];if(a.hasTag(q,"COLGROUP")){g=-1;f=q.childNodes;j=f.length}if(a.hasTag(q,"COL"))if(q.className!="Wt-vrh")if(h==c)return q;else++h}return null};this.adjustRow=function(c,h){if(c.style.height!=h+"px")c.style.height=h+"px";c=c.childNodes;var g,j,f,q;g=0;q=-1;for(j=c.length;g<j;++g){f=c[g];var d=h;d-=a.pxself(f,"paddingTop");d-=a.pxself(f,"paddingBottom");if(d<=0)d=0;f.className!= "Wt-vrh"&&++q;f.style.height=d+"px";if(!(f.style.verticalAlign||f.childNodes.length==0)){var b=f.childNodes[0];if(d<=0)d=0;if(b.className=="Wt-hcenter"){b.style.height=d+"px";b=b.firstChild.firstChild;if(!a.hasTag(b,"TD"))b=b.firstChild;if(b.style.height!=d+"px")b.style.height=d+"px";b=b.firstChild}if(f.childNodes.length==1)d-=this.marginV(b);if(d<=0)d=0;if(!a.hasTag(b,"TABLE"))if(b.wtResize){f=b.parentNode.offsetWidth-p.marginH(b);if(p.getColumn(q).style.width!=""){b.style.position="absolute";b.style.width= f+"px"}b.wtResize(b,f,d)}else if(b.style.height!=d+"px"){b.style.height=d+"px";if(b.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(b.firstChild,"TEXTAREA"))b.firstChild.style.height=d-a.pxself(b,"marginBottom")+"px"}}}};this.adjust=function(){var c=a.getElement(s);if(!c)return false;p.initResize&&p.initResize(a,s,i);if(a.isHidden(c))return true;var h=c.firstChild,g=c.parentNode;if(h.style.height!="")h.style.height="";if(!(c.dirty||h.w!=g.clientWidth||h.h!=g.clientHeight))return true;c.dirty=null;var j= a.pxself(g,"height");if(j==0){j=g.clientHeight;j-=a.px(g,"paddingTop");j-=a.px(g,"paddingBottom")}j-=a.px(c,"marginTop");j-=a.px(c,"marginBottom");var f,q;if(g.children){f=0;for(q=g.children.length;f<q;++f){var d=g.children[f];if(d!=c)j-=$(d).outerHeight()}}var b=c=0,l,t;l=f=0;for(q=h.rows.length;f<q;f++){d=h.rows[f];if(d.className=="Wt-hrh")j-=d.offsetHeight;else{b+=i.minheight[l];if(i.stretch[l]<=0)j-=d.offsetHeight;else c+=i.stretch[l];++l}}j=j>b?j:b;if(c!=0&&j>0){b=j;var o;l=f=0;for(q=h.rows.length;f< q;f++)if(h.rows[f].className!="Wt-hrh"){d=h.rows[f];if(i.stretch[l]!=0){if(i.stretch[l]!=-1){o=j*i.stretch[l]/c;o=b>o?o:b;o=Math.round(i.minheight[l]>o?i.minheight[l]:o);b-=o}else o=d.offsetHeight;this.adjustRow(d,o)}++l}}h.w=g.clientWidth;h.h=g.clientHeight;if(h.style.tableLayout!="fixed")return true;c=0;l=h.childNodes;g=0;for(j=l.length;g<j;g++){b=l[g];var y,A,z;if(a.hasTag(b,"COLGROUP")){g=-1;l=b.childNodes;j=l.length}if(a.hasTag(b,"COL")){if(a.pctself(b,"width")==0){f=o=0;for(q=h.rows.length;f< q;f++){d=h.rows[f];d=d.childNodes;A=y=0;for(z=d.length;A<z;A++){t=d[A];if(t.colSpan==1&&y==c&&t.childNodes.length==1){d=t.firstChild;d=d.offsetWidth+p.marginH(d);o=Math.max(o,d);break}y+=t.colSpan;if(y>c)break}}if(o>0&&a.pxself(b,"width")!=o)b.style.width=o+"px"}++c}}return true};this.adjust()}); | WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,s,h){var p=this;this.getId=function(){return s};this.WT=a;this.marginH=function(c){var f=a.px(c,"marginLeft");f+=a.px(c,"marginRight");f+=a.px(c,"borderLeftWidth");f+=a.px(c,"borderRightWidth");f+=a.px(c,"paddingLeft");f+=a.px(c,"paddingRight");return f};this.marginV=function(c){var f=a.px(c,"marginTop");f+=a.px(c,"marginBottom");f+=a.px(c,"borderTopWidth");f+=a.px(c,"borderBottomWidth");f+=a.px(c,"paddingTop");f+=a.px(c,"paddingBottom");return f};this.getColumn= function(c){var f,i,j,g=a.getElement(s).firstChild.childNodes;i=f=0;for(j=g.length;i<j;i++){var q=g[i];if(a.hasTag(q,"COLGROUP")){i=-1;g=q.childNodes;j=g.length}if(a.hasTag(q,"COL"))if(q.className!="Wt-vrh")if(f==c)return q;else++f}return null};this.adjustRow=function(c,f){if(c.style.height!=f+"px")c.style.height=f+"px";c=c.childNodes;var i,j,g,q;i=0;q=-1;for(j=c.length;i<j;++i){g=c[i];var d=f;d-=a.pxself(g,"paddingTop");d-=a.pxself(g,"paddingBottom");if(d<=0)d=0;g.className!="Wt-vrh"&&++q;g.style.height= d+"px";if(!(g.style.verticalAlign||g.childNodes.length==0)){var b=g.childNodes[0];if(d<=0)d=0;if(b.className=="Wt-hcenter"){b.style.height=d+"px";b=b.firstChild.firstChild;if(!a.hasTag(b,"TD"))b=b.firstChild;if(b.style.height!=d+"px")b.style.height=d+"px";b=b.firstChild}if(g.childNodes.length==1)d-=this.marginV(b);if(d<=0)d=0;if(!a.hasTag(b,"TABLE"))if(b.wtResize){g=b.parentNode.offsetWidth-p.marginH(b);if(p.getColumn(q).style.width!=""){b.style.position="absolute";b.style.width=g+"px"}b.wtResize(b, g,d)}else if(b.style.height!=d+"px"){b.style.height=d+"px";if(b.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(b.firstChild,"TEXTAREA"))b.firstChild.style.height=d-a.pxself(b,"marginBottom")+"px"}}}};this.adjust=function(){var c=a.getElement(s);if(!c)return false;p.initResize&&p.initResize(a,s,h);if(a.isHidden(c))return true;var f=c.firstChild,i=c.parentNode;if(f.style.height!="")f.style.height="";if(!(c.dirty||f.w!=i.clientWidth||f.h!=i.clientHeight))return true;c.dirty=null;var j=a.pxself(i,"height"); if(j==0){j=i.clientHeight;j-=a.px(i,"paddingTop");j-=a.px(i,"paddingBottom")}j-=a.px(c,"marginTop");j-=a.px(c,"marginBottom");var g,q;if(i.children){g=0;for(q=i.children.length;g<q;++g){var d=i.children[g];if(d!=c)j-=$(d).outerHeight()}}var b=c=0,l,t;l=g=0;for(q=f.rows.length;g<q;g++){d=f.rows[g];if(d.className=="Wt-hrh")j-=d.offsetHeight;else{b+=h.minheight[l];if(h.stretch[l]<=0)j-=d.offsetHeight;else c+=h.stretch[l];++l}}j=j>b?j:b;if(c!=0&&j>0){b=j;var o;l=g=0;for(q=f.rows.length;g<q;g++)if(f.rows[g].className!= "Wt-hrh"){d=f.rows[g];if(h.stretch[l]!=0){if(h.stretch[l]!=-1){o=j*h.stretch[l]/c;o=b>o?o:b;o=Math.round(h.minheight[l]>o?h.minheight[l]:o);b-=o}else o=d.offsetHeight;this.adjustRow(d,o)}++l}}f.w=i.clientWidth;f.h=i.clientHeight;if(f.style.tableLayout!="fixed")return true;c=0;l=f.childNodes;i=0;for(j=l.length;i<j;i++){b=l[i];var y,A,z;if(a.hasTag(b,"COLGROUP")){i=-1;l=b.childNodes;j=l.length}if(a.hasTag(b,"COL")){if(a.pctself(b,"width")==0){g=o=0;for(q=f.rows.length;g<q;g++){d=f.rows[g];d=d.childNodes; A=y=0;for(z=d.length;A<z;A++){t=d[A];if(t.colSpan==1&&y==c&&t.childNodes.length==1){d=t.firstChild;d=d.offsetWidth+p.marginH(d);o=Math.max(o,d);break}y+=t.colSpan;if(y>c)break}}if(o>0&&a.pxself(b,"width")!=o)b.style.width=o+"px"}++c}}return true};this.adjust()}); | WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,s,i){var p=this;this.getId=function(){return s};this.WT=a;this.marginH=function(c){var h=c.parentNode,g=a.px(c,"marginLeft");g+=a.px(c,"marginRight");g+=a.px(c,"borderLeftWidth");g+=a.px(c,"borderRightWidth");g+=a.px(h,"paddingLeft");g+=a.px(h,"paddingRight");return g};this.marginV=function(c){var h=a.px(c,"marginTop");h+=a.px(c,"marginBottom");h+=a.px(c,"borderTopWidth");h+=a.px(c,"borderBottomWidth");h+=a.px(c,"paddingTop");h+=a.px(c,"paddingBottom");return h};this.getColumn=function(c){var h,g,j,f=a.getElement(s).firstChild.childNodes;g=h=0;for(j=f.length;g<j;g++){var q=f[g];if(a.hasTag(q,"COLGROUP")){g=-1;f=q.childNodes;j=f.length}if(a.hasTag(q,"COL"))if(q.className!="Wt-vrh")if(h==c)return q;else++h}return null};this.adjustRow=function(c,h){if(c.style.height!=h+"px")c.style.height=h+"px";c=c.childNodes;var g,j,f,q;g=0;q=-1;for(j=c.length;g<j;++g){f=c[g];var d=h;d-=a.pxself(f,"paddingTop");d-=a.pxself(f,"paddingBottom");if(d<=0)d=0;f.className!="Wt-vrh"&&++q;f.style.height=d+"px";if(!(f.style.verticalAlign||f.childNodes.length==0)){var b=f.childNodes[0];if(d<=0)d=0;if(b.className=="Wt-hcenter"){b.style.height=d+"px";b=b.firstChild.firstChild;if(!a.hasTag(b,"TD"))b=b.firstChild;if(b.style.height!=d+"px")b.style.height=d+"px";b=b.firstChild}if(f.childNodes.length==1)d-=this.marginV(b);if(d<=0)d=0;if(!a.hasTag(b,"TABLE"))if(b.wtResize){f=b.parentNode.offsetWidth-p.marginH(b);if(p.getColumn(q).style.width!=""){b.style.position="absolute";b.style.width=f+"px"}b.wtResize(b,f,d)}else if(b.style.height!=d+"px"){b.style.height=d+"px";if(b.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(b.firstChild,"TEXTAREA"))b.firstChild.style.height=d-a.pxself(b,"marginBottom")+"px"}}}};this.adjust=function(){var c=a.getElement(s);if(!c)return false;p.initResize&&p.initResize(a,s,i);if(a.isHidden(c))return true;var h=c.firstChild,g=c.parentNode;if(h.style.height!="")h.style.height="";if(!(c.dirty||h.w!=g.clientWidth||h.h!=g.clientHeight))return true;c.dirty=null;var j=a.pxself(g,"height");if(j==0){j=g.clientHeight;j-=a.px(g,"paddingTop");j-=a.px(g,"paddingBottom")}j-=a.px(c,"marginTop");j-=a.px(c,"marginBottom");var f,q;if(g.children){f=0;for(q=g.children.length;f<q;++f){var d=g.children[f];if(d!=c)j-=$(d).outerHeight()}}var b=c=0,l,t;l=f=0;for(q=h.rows.length;f<q;f++){d=h.rows[f];if(d.className=="Wt-hrh")j-=d.offsetHeight;else{b+=i.minheight[l];if(i.stretch[l]<=0)j-=d.offsetHeight;else c+=i.stretch[l];++l}}j=j>b?j:b;if(c!=0&&j>0){b=j;var o;l=f=0;for(q=h.rows.length;f<q;f++)if(h.rows[f].className!="Wt-hrh"){d=h.rows[f];if(i.stretch[l]!=0){if(i.stretch[l]!=-1){o=j*i.stretch[l]/c;o=b>o?o:b;o=Math.round(i.minheight[l]>o?i.minheight[l]:o);b-=o}else o=d.offsetHeight;this.adjustRow(d,o)}++l}}h.w=g.clientWidth;h.h=g.clientHeight;if(h.style.tableLayout!="fixed")return true;c=0;l=h.childNodes;g=0;for(j=l.length;g<j;g++){b=l[g];var y,A,z;if(a.hasTag(b,"COLGROUP")){g=-1;l=b.childNodes;j=l.length}if(a.hasTag(b,"COL")){if(a.pctself(b,"width")==0){f=o=0;for(q=h.rows.length;f<q;f++){d=h.rows[f];d=d.childNodes;A=y=0;for(z=d.length;A<z;A++){t=d[A];if(t.colSpan==1&&y==c&&t.childNodes.length==1){d=t.firstChild;d=d.offsetWidth+p.marginH(d);o=Math.max(o,d);break}y+=t.colSpan;if(y>c)break}}if(o>0&&a.pxself(b,"width")!=o)b.style.width=o+"px"}++c}}return true};this.adjust()}); |
return this[ fn ? "bind" : "trigger" ]( "wheel", fn ); | return this[ fn ? "bind" : "trigger" ]( "mousewheel", fn ); | (function($) { $.fn.mousewheel = function( fn ){ return this[ fn ? "bind" : "trigger" ]( "wheel", fn ); }; // special event config $.event.special.wheel = { setup: function(){ $.event.add( this, wheelEvents, wheelHandler, {} ); }, teardown: function(){ $.event.remove( this, wheelEvents, wheelHandler ); } }; // events to bind ( browser sniffed... ) var wheelEvents = !$.browser.mozilla ? "mousewheel" : // IE, opera, safari "DOMMouseScroll"+( $.browser.version<"1.9" ? " mousemove" : "" ); // firefox // shared event handler function wheelHandler( event ) { switch ( event.type ) { // FF2 has incorrect event positions case "mousemove": return $.extend( event.data, { // store the correct properties clientX: event.clientX, clientY: event.clientY, pageX: event.pageX, pageY: event.pageY }); // firefox case "DOMMouseScroll": $.extend( event, event.data ); // fix event properties in FF2 event.delta = -event.detail / 3; // normalize delta break; // IE, opera, safari case "mousewheel": event.delta = event.wheelDelta / 120; break; } event.type = "wheel"; // hijack the event return $.event.handle.call( this, event, event.delta ); } })(jQuery); |
event.type = "wheel"; | event.type = "mousewheel"; | (function($) { $.fn.mousewheel = function( fn ){ return this[ fn ? "bind" : "trigger" ]( "wheel", fn ); }; // special event config $.event.special.wheel = { setup: function(){ $.event.add( this, wheelEvents, wheelHandler, {} ); }, teardown: function(){ $.event.remove( this, wheelEvents, wheelHandler ); } }; // events to bind ( browser sniffed... ) var wheelEvents = !$.browser.mozilla ? "mousewheel" : // IE, opera, safari "DOMMouseScroll"+( $.browser.version<"1.9" ? " mousemove" : "" ); // firefox // shared event handler function wheelHandler( event ) { switch ( event.type ) { // FF2 has incorrect event positions case "mousemove": return $.extend( event.data, { // store the correct properties clientX: event.clientX, clientY: event.clientY, pageX: event.pageX, pageY: event.pageY }); // firefox case "DOMMouseScroll": $.extend( event, event.data ); // fix event properties in FF2 event.delta = -event.detail / 3; // normalize delta break; // IE, opera, safari case "mousewheel": event.delta = event.wheelDelta / 120; break; } event.type = "wheel"; // hijack the event return $.event.handle.call( this, event, event.delta ); } })(jQuery); |
WT_DECLARE_WT_MEMBER(1,"WGLWidget",function(r,j){jQuery.data(j,"obj",this);var f=r.WT,l=f.glMatrix.vec3,b=f.glMatrix.mat4;this.ctx=null;this.initializeGL=function(){};this.paintGL=function(){};var h=null,i=null,m=null,n=0,o=0,e=null,p=0,q=0;this.discoverContext=function(a){if(j.getContext){try{this.ctx=j.getContext("webgl")}catch(c){}if(this.ctx==null)try{this.ctx=j.getContext("experimental-webgl")}catch(d){}if(this.ctx==null){j.parentNode.replaceChild(j.firstChild,j);a()}}return this.ctx};this.setLookAtParams= function(a,c,d,g,k){e=a;i=c;m=d;n=g;o=k};this.mouseDragLookAt=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=l.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var k=b.create();b.identity(k);b.translate(k,i);b.rotate(k,d*n,g);b.rotate(k,a*o,m);l.negate(i);b.translate(k,i);l.negate(i);b.multiply(e,k,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseWheelLookAt=function(a,c){if(this.ctx!=null){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e, [a,a,a]);l.negate(i);b.translate(e,i);l.negate(i);this.paintGL()}};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=l.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseDown=function(a,c){f.capture(null);f.capture(j);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); | WT_DECLARE_WT_MEMBER(1,"WGLWidget",function(r,j){jQuery.data(j,"obj",this);var f=r.WT,l=f.glMatrix.vec3,b=f.glMatrix.mat4;this.ctx=null;this.initializeGL=function(){};this.paintGL=function(){};this.resizeGL=function(){};this.updates=[];this.initialized=false;var h=null,i=null,m=null,n=0,o=0,e=null,p=0,q=0;this.discoverContext=function(a){if(j.getContext){try{this.ctx=j.getContext("webgl",{antialias:true})}catch(c){}if(this.ctx==null)try{this.ctx=j.getContext("experimental-webgl")}catch(d){}if(this.ctx== null){j.parentNode.replaceChild(j.firstChild,j);a()}}return this.ctx};this.setLookAtParams=function(a,c,d,g,k){e=a;i=c;m=d;n=g;o=k};this.mouseDragLookAt=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=l.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var k=b.create();b.identity(k);b.translate(k,i);b.rotate(k,d*n,g);b.rotate(k,a*o,m);l.negate(i);b.translate(k,i);l.negate(i);b.multiply(e,k,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseWheelLookAt=function(a,c){if(this.ctx!= null){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e,[a,a,a]);l.negate(i);b.translate(e,i);l.negate(i);this.paintGL()}};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=l.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseDown=function(a,c){f.capture(null); f.capture(j);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); | WT_DECLARE_WT_MEMBER(1,"WGLWidget",function(r,j){jQuery.data(j,"obj",this);var f=r.WT,l=f.glMatrix.vec3,b=f.glMatrix.mat4;this.ctx=null;this.initializeGL=function(){};this.paintGL=function(){};var h=null,i=null,m=null,n=0,o=0,e=null,p=0,q=0;this.discoverContext=function(a){if(j.getContext){try{this.ctx=j.getContext("webgl")}catch(c){}if(this.ctx==null)try{this.ctx=j.getContext("experimental-webgl")}catch(d){}if(this.ctx==null){j.parentNode.replaceChild(j.firstChild,j);a()}}return this.ctx};this.setLookAtParams=function(a,c,d,g,k){e=a;i=c;m=d;n=g;o=k};this.mouseDragLookAt=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=l.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var k=b.create();b.identity(k);b.translate(k,i);b.rotate(k,d*n,g);b.rotate(k,a*o,m);l.negate(i);b.translate(k,i);l.negate(i);b.multiply(e,k,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseWheelLookAt=function(a,c){if(this.ctx!=null){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e,[a,a,a]);l.negate(i);b.translate(e,i);l.negate(i);this.paintGL()}};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=l.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseDown=function(a,c){f.capture(null);f.capture(j);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); |
(function(){var a=1,b=2,c=4,d={id:[{type:a,name:'id'}],classid:[{type:a,name:'classid'}],codebase:[{type:a,name:'codebase'}],pluginspage:[{type:c,name:'pluginspage'}],src:[{type:b,name:'movie'},{type:c,name:'src'}],name:[{type:c,name:'name'}],align:[{type:a,name:'align'}],title:[{type:a,name:'title'},{type:c,name:'title'}],'class':[{type:a,name:'class'},{type:c,name:'class'}],width:[{type:a,name:'width'},{type:c,name:'width'}],height:[{type:a,name:'height'},{type:c,name:'height'}],hSpace:[{type:a,name:'hSpace'},{type:c,name:'hSpace'}],vSpace:[{type:a,name:'vSpace'},{type:c,name:'vSpace'}],style:[{type:a,name:'style'},{type:c,name:'style'}],type:[{type:c,name:'type'}]},e=['play','loop','menu','quality','scale','salign','wmode','bgcolor','base','flashvars','allowScriptAccess','allowFullScreen'];for(var f=0;f<e.length;f++)d[e[f]]=[{type:c,name:e[f]},{type:b,name:e[f]}];e=['allowFullScreen','play','loop','menu'];for(f=0;f<e.length;f++)d[e[f]][0]['default']=d[e[f]][1]['default']=true;function g(i,j,k){var q=this;var l=d[q.id];if(!l)return;var m=q instanceof CKEDITOR.ui.dialog.checkbox;for(var n=0;n<l.length;n++){var o=l[n];switch(o.type){case a:if(!i)continue;if(i.getAttribute(o.name)!==null){var p=i.getAttribute(o.name);if(m)q.setValue(p.toLowerCase()=='true');else q.setValue(p);return;}else if(m)q.setValue(!!o['default']);break;case b:if(!i)continue;if(o.name in k){p=k[o.name];if(m)q.setValue(p.toLowerCase()=='true');else q.setValue(p);return;}else if(m)q.setValue(!!o['default']);break;case c:if(!j)continue;if(j.getAttribute(o.name)){p=j.getAttribute(o.name);if(m)q.setValue(p.toLowerCase()=='true');else q.setValue(p);return;}else if(m)q.setValue(!!o['default']);}}};function h(i,j,k){var s=this;var l=d[s.id];if(!l)return;var m=s.getValue()==='',n=s instanceof CKEDITOR.ui.dialog.checkbox;for(var o=0;o<l.length;o++){var p=l[o];switch(p.type){case a:if(!i)continue;var q=s.getValue();if(m||n&&q===p['default'])i.removeAttribute(p.name);else i.setAttribute(p.name,q);break;case b:if(!i)continue;q=s.getValue();if(m||n&&q===p['default']){if(p.name in k)k[p.name].remove();}else if(p.name in k)k[p.name].setAttribute('value',q);else{var r=CKEDITOR.dom.element.createFromHtml('<cke:param></cke:param>',i.getDocument());r.setAttributes({name:p.name,value:q});if(i.getChildCount()<1)r.appendTo(i);else r.insertBefore(i.getFirst());}break;case c:if(!j)continue;q=s.getValue();if(m||n&&q===p['default'])j.removeAttribute(p.name);else j.setAttribute(p.name,q);}}};CKEDITOR.dialog.add('flash',function(i){var j=!i.config.flashEmbedTagOnly,k=i.config.flashAddEmbedTag||i.config.flashEmbedTagOnly,l,m='<div>'+CKEDITOR.tools.htmlEncode(i.lang.common.preview)+'<br>'+'<div id="FlashPreviewLoader" style="display:none"><div class="loading"> </div></div>'+'<div id="FlashPreviewBox"></div></div>'; return{title:i.lang.flash.title,minWidth:420,minHeight:310,onShow:function(){var z=this;z.fakeImage=z.objectNode=z.embedNode=null;l=new CKEDITOR.dom.element('embeded',i.document);var n=z.getSelectedElement();if(n&&n.getAttribute('_cke_real_element_type')&&n.getAttribute('_cke_real_element_type')=='flash'){z.fakeImage=n;var o=i.restoreRealElement(n),p=null,q=null,r={};if(o.getName()=='cke:object'){p=o;var s=p.getElementsByTag('embed','cke');if(s.count()>0)q=s.getItem(0);var t=p.getElementsByTag('param','cke');for(var u=0,v=t.count();u<v;u++){var w=t.getItem(u),x=w.getAttribute('name'),y=w.getAttribute('value');r[x]=y;}}else if(o.getName()=='cke:embed')q=o;z.objectNode=p;z.embedNode=q;z.setupContent(p,q,r,n);}},onOk:function(){var x=this;var n=null,o=null,p=null;if(!x.fakeImage){if(j){n=CKEDITOR.dom.element.createFromHtml('<cke:object></cke:object>',i.document);var q={classid:'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000',codebase:'http: | (function(){var a=1,b=2,c=4,d={id:[{type:a,name:'id'}],classid:[{type:a,name:'classid'}],codebase:[{type:a,name:'codebase'}],pluginspage:[{type:c,name:'pluginspage'}],src:[{type:b,name:'movie'},{type:c,name:'src'}],name:[{type:c,name:'name'}],align:[{type:a,name:'align'}],title:[{type:a,name:'title'},{type:c,name:'title'}],'class':[{type:a,name:'class'},{type:c,name:'class'}],width:[{type:a,name:'width'},{type:c,name:'width'}],height:[{type:a,name:'height'},{type:c,name:'height'}],hSpace:[{type:a,name:'hSpace'},{type:c,name:'hSpace'}],vSpace:[{type:a,name:'vSpace'},{type:c,name:'vSpace'}],style:[{type:a,name:'style'},{type:c,name:'style'}],type:[{type:c,name:'type'}]},e=['play','loop','menu','quality','scale','salign','wmode','bgcolor','base','flashvars','allowScriptAccess','allowFullScreen'];for(var f=0;f<e.length;f++)d[e[f]]=[{type:c,name:e[f]},{type:b,name:e[f]}];e=['allowFullScreen','play','loop','menu'];for(f=0;f<e.length;f++)d[e[f]][0]['default']=d[e[f]][1]['default']=true;function g(i,j,k){var q=this;var l=d[q.id];if(!l)return;var m=q instanceof CKEDITOR.ui.dialog.checkbox;for(var n=0;n<l.length;n++){var o=l[n];switch(o.type){case a:if(!i)continue;if(i.getAttribute(o.name)!==null){var p=i.getAttribute(o.name);if(m)q.setValue(p.toLowerCase()=='true');else q.setValue(p);return;}else if(m)q.setValue(!!o['default']);break;case b:if(!i)continue;if(o.name in k){p=k[o.name];if(m)q.setValue(p.toLowerCase()=='true');else q.setValue(p);return;}else if(m)q.setValue(!!o['default']);break;case c:if(!j)continue;if(j.getAttribute(o.name)){p=j.getAttribute(o.name);if(m)q.setValue(p.toLowerCase()=='true');else q.setValue(p);return;}else if(m)q.setValue(!!o['default']);}}};function h(i,j,k){var s=this;var l=d[s.id];if(!l)return;var m=s.getValue()==='',n=s instanceof CKEDITOR.ui.dialog.checkbox;for(var o=0;o<l.length;o++){var p=l[o];switch(p.type){case a:if(!i)continue;var q=s.getValue();if(m||n&&q===p['default'])i.removeAttribute(p.name);else i.setAttribute(p.name,q);break;case b:if(!i)continue;q=s.getValue();if(m||n&&q===p['default']){if(p.name in k)k[p.name].remove();}else if(p.name in k)k[p.name].setAttribute('value',q);else{var r=CKEDITOR.dom.element.createFromHtml('<cke:param></cke:param>',i.getDocument());r.setAttributes({name:p.name,value:q});if(i.getChildCount()<1)r.appendTo(i);else r.insertBefore(i.getFirst());}break;case c:if(!j)continue;q=s.getValue();if(m||n&&q===p['default'])j.removeAttribute(p.name);else j.setAttribute(p.name,q);}}};CKEDITOR.dialog.add('flash',function(i){var j=!i.config.flashEmbedTagOnly,k=i.config.flashAddEmbedTag||i.config.flashEmbedTagOnly,l,m='<div>'+CKEDITOR.tools.htmlEncode(i.lang.common.preview)+'<br>'+'<div id="cke_FlashPreviewLoader'+CKEDITOR.tools.getNextNumber()+'" style="display:none"><div class="loading"> </div></div>'+'<div id="cke_FlashPreviewBox'+CKEDITOR.tools.getNextNumber()+'" class="FlashPreviewBox"></div></div>'; return{title:i.lang.flash.title,minWidth:420,minHeight:310,onShow:function(){var z=this;z.fakeImage=z.objectNode=z.embedNode=null;l=new CKEDITOR.dom.element('embed',i.document);var n=z.getSelectedElement();if(n&&n.getAttribute('_cke_real_element_type')&&n.getAttribute('_cke_real_element_type')=='flash'){z.fakeImage=n;var o=i.restoreRealElement(n),p=null,q=null,r={};if(o.getName()=='cke:object'){p=o;var s=p.getElementsByTag('embed','cke');if(s.count()>0)q=s.getItem(0);var t=p.getElementsByTag('param','cke');for(var u=0,v=t.count();u<v;u++){var w=t.getItem(u),x=w.getAttribute('name'),y=w.getAttribute('value');r[x]=y;}}else if(o.getName()=='cke:embed')q=o;z.objectNode=p;z.embedNode=q;z.setupContent(p,q,r,n);}},onOk:function(){var x=this;var n=null,o=null,p=null;if(!x.fakeImage){if(j){n=CKEDITOR.dom.element.createFromHtml('<cke:object></cke:object>',i.document);var q={classid:'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000',codebase:'http: | (function(){var a=1,b=2,c=4,d={id:[{type:a,name:'id'}],classid:[{type:a,name:'classid'}],codebase:[{type:a,name:'codebase'}],pluginspage:[{type:c,name:'pluginspage'}],src:[{type:b,name:'movie'},{type:c,name:'src'}],name:[{type:c,name:'name'}],align:[{type:a,name:'align'}],title:[{type:a,name:'title'},{type:c,name:'title'}],'class':[{type:a,name:'class'},{type:c,name:'class'}],width:[{type:a,name:'width'},{type:c,name:'width'}],height:[{type:a,name:'height'},{type:c,name:'height'}],hSpace:[{type:a,name:'hSpace'},{type:c,name:'hSpace'}],vSpace:[{type:a,name:'vSpace'},{type:c,name:'vSpace'}],style:[{type:a,name:'style'},{type:c,name:'style'}],type:[{type:c,name:'type'}]},e=['play','loop','menu','quality','scale','salign','wmode','bgcolor','base','flashvars','allowScriptAccess','allowFullScreen'];for(var f=0;f<e.length;f++)d[e[f]]=[{type:c,name:e[f]},{type:b,name:e[f]}];e=['allowFullScreen','play','loop','menu'];for(f=0;f<e.length;f++)d[e[f]][0]['default']=d[e[f]][1]['default']=true;function g(i,j,k){var q=this;var l=d[q.id];if(!l)return;var m=q instanceof CKEDITOR.ui.dialog.checkbox;for(var n=0;n<l.length;n++){var o=l[n];switch(o.type){case a:if(!i)continue;if(i.getAttribute(o.name)!==null){var p=i.getAttribute(o.name);if(m)q.setValue(p.toLowerCase()=='true');else q.setValue(p);return;}else if(m)q.setValue(!!o['default']);break;case b:if(!i)continue;if(o.name in k){p=k[o.name];if(m)q.setValue(p.toLowerCase()=='true');else q.setValue(p);return;}else if(m)q.setValue(!!o['default']);break;case c:if(!j)continue;if(j.getAttribute(o.name)){p=j.getAttribute(o.name);if(m)q.setValue(p.toLowerCase()=='true');else q.setValue(p);return;}else if(m)q.setValue(!!o['default']);}}};function h(i,j,k){var s=this;var l=d[s.id];if(!l)return;var m=s.getValue()==='',n=s instanceof CKEDITOR.ui.dialog.checkbox;for(var o=0;o<l.length;o++){var p=l[o];switch(p.type){case a:if(!i)continue;var q=s.getValue();if(m||n&&q===p['default'])i.removeAttribute(p.name);else i.setAttribute(p.name,q);break;case b:if(!i)continue;q=s.getValue();if(m||n&&q===p['default']){if(p.name in k)k[p.name].remove();}else if(p.name in k)k[p.name].setAttribute('value',q);else{var r=CKEDITOR.dom.element.createFromHtml('<cke:param></cke:param>',i.getDocument());r.setAttributes({name:p.name,value:q});if(i.getChildCount()<1)r.appendTo(i);else r.insertBefore(i.getFirst());}break;case c:if(!j)continue;q=s.getValue();if(m||n&&q===p['default'])j.removeAttribute(p.name);else j.setAttribute(p.name,q);}}};CKEDITOR.dialog.add('flash',function(i){var j=!i.config.flashEmbedTagOnly,k=i.config.flashAddEmbedTag||i.config.flashEmbedTagOnly,l,m='<div>'+CKEDITOR.tools.htmlEncode(i.lang.common.preview)+'<br>'+'<div id="FlashPreviewLoader" style="display:none"><div class="loading"> </div></div>'+'<div id="FlashPreviewBox"></div></div>';return{title:i.lang.flash.title,minWidth:420,minHeight:310,onShow:function(){var z=this;z.fakeImage=z.objectNode=z.embedNode=null;l=new CKEDITOR.dom.element('embeded',i.document);var n=z.getSelectedElement();if(n&&n.getAttribute('_cke_real_element_type')&&n.getAttribute('_cke_real_element_type')=='flash'){z.fakeImage=n;var o=i.restoreRealElement(n),p=null,q=null,r={};if(o.getName()=='cke:object'){p=o;var s=p.getElementsByTag('embed','cke');if(s.count()>0)q=s.getItem(0);var t=p.getElementsByTag('param','cke');for(var u=0,v=t.count();u<v;u++){var w=t.getItem(u),x=w.getAttribute('name'),y=w.getAttribute('value');r[x]=y;}}else if(o.getName()=='cke:embed')q=o;z.objectNode=p;z.embedNode=q;z.setupContent(p,q,r,n);}},onOk:function(){var x=this;var n=null,o=null,p=null;if(!x.fakeImage){if(j){n=CKEDITOR.dom.element.createFromHtml('<cke:object></cke:object>',i.document);var q={classid:'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000',codebase:'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'};n.setAttributes(q);}if(k){o=CKEDITOR.dom.element.createFromHtml('<cke:embed></cke:embed>',i.document);o.setAttributes({type:'application/x-shockwave-flash',pluginspage:'http://www.macromedia.com/go/getflashplayer'});if(n)o.appendTo(n);}}else{n=x.objectNode;o=x.embedNode;}if(n){p={};var r=n.getElementsByTag('param','cke');for(var s=0,t=r.count();s<t;s++)p[r.getItem(s).getAttribute('name')]=r.getItem(s);}var u={},v={};x.commitContent(n,o,p,u,v);var w=i.createFakeElement(n||o,'cke_flash','flash',true);w.setAttributes(v);w.setStyles(u);if(x.fakeImage){w.replace(x.fakeImage);i.getSelection().selectElement(w);}else i.insertElement(w);},onHide:function(){if(this.preview)this.preview.setHtml('');},contents:[{id:'info',label:i.lang.common.generalTab,accessKey:'I',elements:[{type:'vbox',padding:0,children:[{type:'hbox',widths:['280px','110px'],align:'right',children:[{id:'src',type:'text',label:i.lang.common.url,required:true,validate:CKEDITOR.dialog.validate.notEmpty(i.lang.flash.validateSrc),setup:g,commit:h,onLoad:function(){var n=this.getDialog(),o=function(p){l.setAttribute('src',p);n.preview.setHtml('<embed height="100%" width="100%" src="'+CKEDITOR.tools.htmlEncode(l.getAttribute('src'))+'" type="application/x-shockwave-flash"></embed>');};n.preview=n.getContentElement('info','preview').getElement().getChild(3);this.on('change',function(p){if(p.data&&p.data.value)o(p.data.value);});this.getInputElement().on('change',function(p){o(this.getValue());},this);}},{type:'button',id:'browse',filebrowser:'info:src',hidden:true,style:'display:inline-block;margin-top:10px;',label:i.lang.common.browseServer}]}]},{type:'hbox',widths:['25%','25%','25%','25%','25%'],children:[{type:'text',id:'width',style:'width:95px',label:i.lang.flash.width,validate:CKEDITOR.dialog.validate.integer(i.lang.flash.validateWidth),setup:function(n,o,p,q){g.apply(this,arguments);if(q){var r=parseInt(q.$.style.width,10);if(!isNaN(r))this.setValue(r);}},commit:function(n,o,p,q){h.apply(this,arguments);if(this.getValue())q.width=this.getValue()+'px';}},{type:'text',id:'height',style:'width:95px',label:i.lang.flash.height,validate:CKEDITOR.dialog.validate.integer(i.lang.flash.validateHeight),setup:function(n,o,p,q){g.apply(this,arguments);if(q){var r=parseInt(q.$.style.height,10);if(!isNaN(r))this.setValue(r);}},commit:function(n,o,p,q){h.apply(this,arguments);if(this.getValue())q.height=this.getValue()+'px';}},{type:'text',id:'hSpace',style:'width:95px',label:i.lang.flash.hSpace,validate:CKEDITOR.dialog.validate.integer(i.lang.flash.validateHSpace),setup:g,commit:h},{type:'text',id:'vSpace',style:'width:95px',label:i.lang.flash.vSpace,validate:CKEDITOR.dialog.validate.integer(i.lang.flash.validateVSpace),setup:g,commit:h}]},{type:'vbox',children:[{type:'html',id:'preview',style:'width:95%;',html:m}]}]},{id:'Upload',hidden:true,filebrowser:'uploadButton',label:i.lang.common.upload,elements:[{type:'file',id:'upload',label:i.lang.common.upload,size:38},{type:'fileButton',id:'uploadButton',label:i.lang.common.uploadSubmit,filebrowser:'info:src','for':['Upload','upload']}]},{id:'properties',label:i.lang.flash.propertiesTab,elements:[{type:'hbox',widths:['50%','50%'],children:[{id:'scale',type:'select',label:i.lang.flash.scale,'default':'',style:'width : 100%;',items:[[i.lang.common.notSet,''],[i.lang.flash.scaleAll,'showall'],[i.lang.flash.scaleNoBorder,'noborder'],[i.lang.flash.scaleFit,'exactfit']],setup:g,commit:h},{id:'allowScriptAccess',type:'select',label:i.lang.flash.access,'default':'',style:'width : 100%;',items:[[i.lang.common.notSet,''],[i.lang.flash.accessAlways,'always'],[i.lang.flash.accessSameDomain,'samedomain'],[i.lang.flash.accessNever,'never']],setup:g,commit:h}]},{type:'hbox',widths:['50%','50%'],children:[{id:'wmode',type:'select',label:i.lang.flash.windowMode,'default':'',style:'width : 100%;',items:[[i.lang.common.notSet,''],[i.lang.flash.windowModeWindow,'window'],[i.lang.flash.windowModeOpaque,'opaque'],[i.lang.flash.windowModeTransparent,'transparent']],setup:g,commit:h},{id:'quality',type:'select',label:i.lang.flash.quality,'default':'high',style:'width : 100%;',items:[[i.lang.common.notSet,''],[i.lang.flash.qualityBest,'best'],[i.lang.flash.qualityHigh,'high'],[i.lang.flash.qualityAutoHigh,'autohigh'],[i.lang.flash.qualityMedium,'medium'],[i.lang.flash.qualityAutoLow,'autolow'],[i.lang.flash.qualityLow,'low']],setup:g,commit:h}]},{type:'hbox',widths:['50%','50%'],children:[{id:'align',type:'select',label:i.lang.flash.align,'default':'',style:'width : 100%;',items:[[i.lang.common.notSet,''],[i.lang.flash.alignLeft,'left'],[i.lang.flash.alignAbsBottom,'absBottom'],[i.lang.flash.alignAbsMiddle,'absMiddle'],[i.lang.flash.alignBaseline,'baseline'],[i.lang.flash.alignBottom,'bottom'],[i.lang.flash.alignMiddle,'middle'],[i.lang.flash.alignRight,'right'],[i.lang.flash.alignTextTop,'textTop'],[i.lang.flash.alignTop,'top']],setup:g,commit:function(n,o,p,q,r){var s=this.getValue();h.apply(this,arguments);s&&(r.align=s);}},{type:'html',html:'<div></div>'}]},{type:'fieldset',label:CKEDITOR.tools.htmlEncode(i.lang.flash.flashvars),children:[{type:'vbox',padding:0,children:[{type:'checkbox',id:'menu',label:i.lang.flash.chkMenu,'default':true,setup:g,commit:h},{type:'checkbox',id:'play',label:i.lang.flash.chkPlay,'default':true,setup:g,commit:h},{type:'checkbox',id:'loop',label:i.lang.flash.chkLoop,'default':true,setup:g,commit:h},{type:'checkbox',id:'allowFullScreen',label:i.lang.flash.chkFull,'default':true,setup:g,commit:h}]}]}]},{id:'advanced',label:i.lang.common.advancedTab,elements:[{type:'hbox',widths:['45%','55%'],children:[{type:'text',id:'id',label:i.lang.common.id,setup:g,commit:h},{type:'text',id:'title',label:i.lang.common.advisoryTitle,setup:g,commit:h}]},{type:'hbox',widths:['45%','55%'],children:[{type:'text',id:'bgcolor',label:i.lang.flash.bgcolor,setup:g,commit:h},{type:'text',id:'class',label:i.lang.common.cssClass,setup:g,commit:h}]},{type:'text',id:'style',label:i.lang.common.cssStyle,setup:g,commit:h}]}]};});})(); |
var t = $.tools.overlay; | var t = $.tools.overlay, w = $(window); | (function($) { // version number var t = $.tools.overlay; // extend global configuragion with effect specific defaults $.extend(t.conf, { start: { absolute: true, top: null, left: null }, fadeInSpeed: 'fast', zIndex: 9999 }); // utility function function getPosition(el) { var p = el.offset(); return [p.top + el.height() / 2, p.left + el.width() / 2]; } //{{{ load var loadEffect = function(onLoad) { var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), self = this, oWidth = overlay.outerWidth({margin:true}), img = overlay.data("img"); // growing image is required. if (!img) { var bg = overlay.css("backgroundImage"); if (!bg) { throw "background-image CSS property not set for overlay"; } // url("bg.jpg") --> bg.jpg bg = bg.slice(bg.indexOf("(") + 1, bg.indexOf(")")).replace(/\"/g, ""); overlay.css("backgroundImage", "none"); img = $('<img src="' + bg + '"/>'); img.css({border:0, position: opts.fixed ? 'fixed' : 'absolute', display:'none'}).width(oWidth); $('body').append(img); overlay.data("img", img); } // initial top & left var w = $(window), itop = opts.start.top || Math.round(w.height() / 2), ileft = opts.start.left || Math.round(w.width() / 2); if (trigger) { var p = getPosition(trigger); itop = p[0]; ileft = p[1]; } // adjust positioning relative to overlay scrolling position if (!opts.start.absolute) { itop += w.scrollTop(); ileft += w.scrollLeft(); } // initialize background image and make it visible img.css({ top: itop, left: ileft, width: 0, zIndex: opts.zIndex }).show(); // begin growing img.animate({ top: overlay.css("top"), left: overlay.css("left"), width: oWidth}, opts.speed, function() { // set close button and content over the image overlay.css("zIndex", opts.zIndex + 1).fadeIn(opts.fadeInSpeed, function() { if (self.isOpened() && !$(this).index(overlay)) { onLoad.call(); } else { overlay.hide(); } }); }); };//}}} var closeEffect = function(onClose) { // variables var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), top = opts.start.top, left = opts.start.left; // hide overlay & closers overlay.hide(); // trigger position if (trigger) { var p = getPosition(trigger); top = p[0]; left = p[1]; } // shrink image overlay.data("img").animate({top: top, left: left, width:0}, opts.closeSpeed, onClose); }; // add overlay effect t.addEffect("apple", loadEffect, closeEffect); })(jQuery); |
absolute: true, | (function($) { // version number var t = $.tools.overlay; // extend global configuragion with effect specific defaults $.extend(t.conf, { start: { absolute: true, top: null, left: null }, fadeInSpeed: 'fast', zIndex: 9999 }); // utility function function getPosition(el) { var p = el.offset(); return [p.top + el.height() / 2, p.left + el.width() / 2]; } //{{{ load var loadEffect = function(onLoad) { var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), self = this, oWidth = overlay.outerWidth({margin:true}), img = overlay.data("img"); // growing image is required. if (!img) { var bg = overlay.css("backgroundImage"); if (!bg) { throw "background-image CSS property not set for overlay"; } // url("bg.jpg") --> bg.jpg bg = bg.slice(bg.indexOf("(") + 1, bg.indexOf(")")).replace(/\"/g, ""); overlay.css("backgroundImage", "none"); img = $('<img src="' + bg + '"/>'); img.css({border:0, position: opts.fixed ? 'fixed' : 'absolute', display:'none'}).width(oWidth); $('body').append(img); overlay.data("img", img); } // initial top & left var w = $(window), itop = opts.start.top || Math.round(w.height() / 2), ileft = opts.start.left || Math.round(w.width() / 2); if (trigger) { var p = getPosition(trigger); itop = p[0]; ileft = p[1]; } // adjust positioning relative to overlay scrolling position if (!opts.start.absolute) { itop += w.scrollTop(); ileft += w.scrollLeft(); } // initialize background image and make it visible img.css({ top: itop, left: ileft, width: 0, zIndex: opts.zIndex }).show(); // begin growing img.animate({ top: overlay.css("top"), left: overlay.css("left"), width: oWidth}, opts.speed, function() { // set close button and content over the image overlay.css("zIndex", opts.zIndex + 1).fadeIn(opts.fadeInSpeed, function() { if (self.isOpened() && !$(this).index(overlay)) { onLoad.call(); } else { overlay.hide(); } }); }); };//}}} var closeEffect = function(onClose) { // variables var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), top = opts.start.top, left = opts.start.left; // hide overlay & closers overlay.hide(); // trigger position if (trigger) { var p = getPosition(trigger); top = p[0]; left = p[1]; } // shrink image overlay.data("img").animate({top: top, left: left, width:0}, opts.closeSpeed, onClose); }; // add overlay effect t.addEffect("apple", loadEffect, closeEffect); })(jQuery); |
|
return [p.top + el.height() / 2, p.left + el.width() / 2]; | return { top: p.top + el.height() / 2, left: p.left + el.width() / 2 }; | (function($) { // version number var t = $.tools.overlay; // extend global configuragion with effect specific defaults $.extend(t.conf, { start: { absolute: true, top: null, left: null }, fadeInSpeed: 'fast', zIndex: 9999 }); // utility function function getPosition(el) { var p = el.offset(); return [p.top + el.height() / 2, p.left + el.width() / 2]; } //{{{ load var loadEffect = function(onLoad) { var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), self = this, oWidth = overlay.outerWidth({margin:true}), img = overlay.data("img"); // growing image is required. if (!img) { var bg = overlay.css("backgroundImage"); if (!bg) { throw "background-image CSS property not set for overlay"; } // url("bg.jpg") --> bg.jpg bg = bg.slice(bg.indexOf("(") + 1, bg.indexOf(")")).replace(/\"/g, ""); overlay.css("backgroundImage", "none"); img = $('<img src="' + bg + '"/>'); img.css({border:0, position: opts.fixed ? 'fixed' : 'absolute', display:'none'}).width(oWidth); $('body').append(img); overlay.data("img", img); } // initial top & left var w = $(window), itop = opts.start.top || Math.round(w.height() / 2), ileft = opts.start.left || Math.round(w.width() / 2); if (trigger) { var p = getPosition(trigger); itop = p[0]; ileft = p[1]; } // adjust positioning relative to overlay scrolling position if (!opts.start.absolute) { itop += w.scrollTop(); ileft += w.scrollLeft(); } // initialize background image and make it visible img.css({ top: itop, left: ileft, width: 0, zIndex: opts.zIndex }).show(); // begin growing img.animate({ top: overlay.css("top"), left: overlay.css("left"), width: oWidth}, opts.speed, function() { // set close button and content over the image overlay.css("zIndex", opts.zIndex + 1).fadeIn(opts.fadeInSpeed, function() { if (self.isOpened() && !$(this).index(overlay)) { onLoad.call(); } else { overlay.hide(); } }); }); };//}}} var closeEffect = function(onClose) { // variables var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), top = opts.start.top, left = opts.start.left; // hide overlay & closers overlay.hide(); // trigger position if (trigger) { var p = getPosition(trigger); top = p[0]; left = p[1]; } // shrink image overlay.data("img").animate({top: top, left: left, width:0}, opts.closeSpeed, onClose); }; // add overlay effect t.addEffect("apple", loadEffect, closeEffect); })(jQuery); |
var loadEffect = function(onLoad) { | var loadEffect = function(pos, onLoad) { | (function($) { // version number var t = $.tools.overlay; // extend global configuragion with effect specific defaults $.extend(t.conf, { start: { absolute: true, top: null, left: null }, fadeInSpeed: 'fast', zIndex: 9999 }); // utility function function getPosition(el) { var p = el.offset(); return [p.top + el.height() / 2, p.left + el.width() / 2]; } //{{{ load var loadEffect = function(onLoad) { var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), self = this, oWidth = overlay.outerWidth({margin:true}), img = overlay.data("img"); // growing image is required. if (!img) { var bg = overlay.css("backgroundImage"); if (!bg) { throw "background-image CSS property not set for overlay"; } // url("bg.jpg") --> bg.jpg bg = bg.slice(bg.indexOf("(") + 1, bg.indexOf(")")).replace(/\"/g, ""); overlay.css("backgroundImage", "none"); img = $('<img src="' + bg + '"/>'); img.css({border:0, position: opts.fixed ? 'fixed' : 'absolute', display:'none'}).width(oWidth); $('body').append(img); overlay.data("img", img); } // initial top & left var w = $(window), itop = opts.start.top || Math.round(w.height() / 2), ileft = opts.start.left || Math.round(w.width() / 2); if (trigger) { var p = getPosition(trigger); itop = p[0]; ileft = p[1]; } // adjust positioning relative to overlay scrolling position if (!opts.start.absolute) { itop += w.scrollTop(); ileft += w.scrollLeft(); } // initialize background image and make it visible img.css({ top: itop, left: ileft, width: 0, zIndex: opts.zIndex }).show(); // begin growing img.animate({ top: overlay.css("top"), left: overlay.css("left"), width: oWidth}, opts.speed, function() { // set close button and content over the image overlay.css("zIndex", opts.zIndex + 1).fadeIn(opts.fadeInSpeed, function() { if (self.isOpened() && !$(this).index(overlay)) { onLoad.call(); } else { overlay.hide(); } }); }); };//}}} var closeEffect = function(onClose) { // variables var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), top = opts.start.top, left = opts.start.left; // hide overlay & closers overlay.hide(); // trigger position if (trigger) { var p = getPosition(trigger); top = p[0]; left = p[1]; } // shrink image overlay.data("img").animate({top: top, left: left, width:0}, opts.closeSpeed, onClose); }; // add overlay effect t.addEffect("apple", loadEffect, closeEffect); })(jQuery); |
opts = this.getConf(), | conf = this.getConf(), | (function($) { // version number var t = $.tools.overlay; // extend global configuragion with effect specific defaults $.extend(t.conf, { start: { absolute: true, top: null, left: null }, fadeInSpeed: 'fast', zIndex: 9999 }); // utility function function getPosition(el) { var p = el.offset(); return [p.top + el.height() / 2, p.left + el.width() / 2]; } //{{{ load var loadEffect = function(onLoad) { var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), self = this, oWidth = overlay.outerWidth({margin:true}), img = overlay.data("img"); // growing image is required. if (!img) { var bg = overlay.css("backgroundImage"); if (!bg) { throw "background-image CSS property not set for overlay"; } // url("bg.jpg") --> bg.jpg bg = bg.slice(bg.indexOf("(") + 1, bg.indexOf(")")).replace(/\"/g, ""); overlay.css("backgroundImage", "none"); img = $('<img src="' + bg + '"/>'); img.css({border:0, position: opts.fixed ? 'fixed' : 'absolute', display:'none'}).width(oWidth); $('body').append(img); overlay.data("img", img); } // initial top & left var w = $(window), itop = opts.start.top || Math.round(w.height() / 2), ileft = opts.start.left || Math.round(w.width() / 2); if (trigger) { var p = getPosition(trigger); itop = p[0]; ileft = p[1]; } // adjust positioning relative to overlay scrolling position if (!opts.start.absolute) { itop += w.scrollTop(); ileft += w.scrollLeft(); } // initialize background image and make it visible img.css({ top: itop, left: ileft, width: 0, zIndex: opts.zIndex }).show(); // begin growing img.animate({ top: overlay.css("top"), left: overlay.css("left"), width: oWidth}, opts.speed, function() { // set close button and content over the image overlay.css("zIndex", opts.zIndex + 1).fadeIn(opts.fadeInSpeed, function() { if (self.isOpened() && !$(this).index(overlay)) { onLoad.call(); } else { overlay.hide(); } }); }); };//}}} var closeEffect = function(onClose) { // variables var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), top = opts.start.top, left = opts.start.left; // hide overlay & closers overlay.hide(); // trigger position if (trigger) { var p = getPosition(trigger); top = p[0]; left = p[1]; } // shrink image overlay.data("img").animate({top: top, left: left, width:0}, opts.closeSpeed, onClose); }; // add overlay effect t.addEffect("apple", loadEffect, closeEffect); })(jQuery); |
img.css({border:0, position: opts.fixed ? 'fixed' : 'absolute', display:'none'}).width(oWidth); | img.css({border:0, display:'none'}).width(oWidth); | (function($) { // version number var t = $.tools.overlay; // extend global configuragion with effect specific defaults $.extend(t.conf, { start: { absolute: true, top: null, left: null }, fadeInSpeed: 'fast', zIndex: 9999 }); // utility function function getPosition(el) { var p = el.offset(); return [p.top + el.height() / 2, p.left + el.width() / 2]; } //{{{ load var loadEffect = function(onLoad) { var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), self = this, oWidth = overlay.outerWidth({margin:true}), img = overlay.data("img"); // growing image is required. if (!img) { var bg = overlay.css("backgroundImage"); if (!bg) { throw "background-image CSS property not set for overlay"; } // url("bg.jpg") --> bg.jpg bg = bg.slice(bg.indexOf("(") + 1, bg.indexOf(")")).replace(/\"/g, ""); overlay.css("backgroundImage", "none"); img = $('<img src="' + bg + '"/>'); img.css({border:0, position: opts.fixed ? 'fixed' : 'absolute', display:'none'}).width(oWidth); $('body').append(img); overlay.data("img", img); } // initial top & left var w = $(window), itop = opts.start.top || Math.round(w.height() / 2), ileft = opts.start.left || Math.round(w.width() / 2); if (trigger) { var p = getPosition(trigger); itop = p[0]; ileft = p[1]; } // adjust positioning relative to overlay scrolling position if (!opts.start.absolute) { itop += w.scrollTop(); ileft += w.scrollLeft(); } // initialize background image and make it visible img.css({ top: itop, left: ileft, width: 0, zIndex: opts.zIndex }).show(); // begin growing img.animate({ top: overlay.css("top"), left: overlay.css("left"), width: oWidth}, opts.speed, function() { // set close button and content over the image overlay.css("zIndex", opts.zIndex + 1).fadeIn(opts.fadeInSpeed, function() { if (self.isOpened() && !$(this).index(overlay)) { onLoad.call(); } else { overlay.hide(); } }); }); };//}}} var closeEffect = function(onClose) { // variables var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), top = opts.start.top, left = opts.start.left; // hide overlay & closers overlay.hide(); // trigger position if (trigger) { var p = getPosition(trigger); top = p[0]; left = p[1]; } // shrink image overlay.data("img").animate({top: top, left: left, width:0}, opts.closeSpeed, onClose); }; // add overlay effect t.addEffect("apple", loadEffect, closeEffect); })(jQuery); |
var w = $(window), itop = opts.start.top || Math.round(w.height() / 2), ileft = opts.start.left || Math.round(w.width() / 2); | var itop = conf.start.top || Math.round(w.height() / 2), ileft = conf.start.left || Math.round(w.width() / 2); | (function($) { // version number var t = $.tools.overlay; // extend global configuragion with effect specific defaults $.extend(t.conf, { start: { absolute: true, top: null, left: null }, fadeInSpeed: 'fast', zIndex: 9999 }); // utility function function getPosition(el) { var p = el.offset(); return [p.top + el.height() / 2, p.left + el.width() / 2]; } //{{{ load var loadEffect = function(onLoad) { var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), self = this, oWidth = overlay.outerWidth({margin:true}), img = overlay.data("img"); // growing image is required. if (!img) { var bg = overlay.css("backgroundImage"); if (!bg) { throw "background-image CSS property not set for overlay"; } // url("bg.jpg") --> bg.jpg bg = bg.slice(bg.indexOf("(") + 1, bg.indexOf(")")).replace(/\"/g, ""); overlay.css("backgroundImage", "none"); img = $('<img src="' + bg + '"/>'); img.css({border:0, position: opts.fixed ? 'fixed' : 'absolute', display:'none'}).width(oWidth); $('body').append(img); overlay.data("img", img); } // initial top & left var w = $(window), itop = opts.start.top || Math.round(w.height() / 2), ileft = opts.start.left || Math.round(w.width() / 2); if (trigger) { var p = getPosition(trigger); itop = p[0]; ileft = p[1]; } // adjust positioning relative to overlay scrolling position if (!opts.start.absolute) { itop += w.scrollTop(); ileft += w.scrollLeft(); } // initialize background image and make it visible img.css({ top: itop, left: ileft, width: 0, zIndex: opts.zIndex }).show(); // begin growing img.animate({ top: overlay.css("top"), left: overlay.css("left"), width: oWidth}, opts.speed, function() { // set close button and content over the image overlay.css("zIndex", opts.zIndex + 1).fadeIn(opts.fadeInSpeed, function() { if (self.isOpened() && !$(this).index(overlay)) { onLoad.call(); } else { overlay.hide(); } }); }); };//}}} var closeEffect = function(onClose) { // variables var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), top = opts.start.top, left = opts.start.left; // hide overlay & closers overlay.hide(); // trigger position if (trigger) { var p = getPosition(trigger); top = p[0]; left = p[1]; } // shrink image overlay.data("img").animate({top: top, left: left, width:0}, opts.closeSpeed, onClose); }; // add overlay effect t.addEffect("apple", loadEffect, closeEffect); })(jQuery); |
itop = p[0]; ileft = p[1]; | itop = p.top; ileft = p.left; | (function($) { // version number var t = $.tools.overlay; // extend global configuragion with effect specific defaults $.extend(t.conf, { start: { absolute: true, top: null, left: null }, fadeInSpeed: 'fast', zIndex: 9999 }); // utility function function getPosition(el) { var p = el.offset(); return [p.top + el.height() / 2, p.left + el.width() / 2]; } //{{{ load var loadEffect = function(onLoad) { var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), self = this, oWidth = overlay.outerWidth({margin:true}), img = overlay.data("img"); // growing image is required. if (!img) { var bg = overlay.css("backgroundImage"); if (!bg) { throw "background-image CSS property not set for overlay"; } // url("bg.jpg") --> bg.jpg bg = bg.slice(bg.indexOf("(") + 1, bg.indexOf(")")).replace(/\"/g, ""); overlay.css("backgroundImage", "none"); img = $('<img src="' + bg + '"/>'); img.css({border:0, position: opts.fixed ? 'fixed' : 'absolute', display:'none'}).width(oWidth); $('body').append(img); overlay.data("img", img); } // initial top & left var w = $(window), itop = opts.start.top || Math.round(w.height() / 2), ileft = opts.start.left || Math.round(w.width() / 2); if (trigger) { var p = getPosition(trigger); itop = p[0]; ileft = p[1]; } // adjust positioning relative to overlay scrolling position if (!opts.start.absolute) { itop += w.scrollTop(); ileft += w.scrollLeft(); } // initialize background image and make it visible img.css({ top: itop, left: ileft, width: 0, zIndex: opts.zIndex }).show(); // begin growing img.animate({ top: overlay.css("top"), left: overlay.css("left"), width: oWidth}, opts.speed, function() { // set close button and content over the image overlay.css("zIndex", opts.zIndex + 1).fadeIn(opts.fadeInSpeed, function() { if (self.isOpened() && !$(this).index(overlay)) { onLoad.call(); } else { overlay.hide(); } }); }); };//}}} var closeEffect = function(onClose) { // variables var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), top = opts.start.top, left = opts.start.left; // hide overlay & closers overlay.hide(); // trigger position if (trigger) { var p = getPosition(trigger); top = p[0]; left = p[1]; } // shrink image overlay.data("img").animate({top: top, left: left, width:0}, opts.closeSpeed, onClose); }; // add overlay effect t.addEffect("apple", loadEffect, closeEffect); })(jQuery); |
if (!opts.start.absolute) { itop += w.scrollTop(); ileft += w.scrollLeft(); } | (function($) { // version number var t = $.tools.overlay; // extend global configuragion with effect specific defaults $.extend(t.conf, { start: { absolute: true, top: null, left: null }, fadeInSpeed: 'fast', zIndex: 9999 }); // utility function function getPosition(el) { var p = el.offset(); return [p.top + el.height() / 2, p.left + el.width() / 2]; } //{{{ load var loadEffect = function(onLoad) { var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), self = this, oWidth = overlay.outerWidth({margin:true}), img = overlay.data("img"); // growing image is required. if (!img) { var bg = overlay.css("backgroundImage"); if (!bg) { throw "background-image CSS property not set for overlay"; } // url("bg.jpg") --> bg.jpg bg = bg.slice(bg.indexOf("(") + 1, bg.indexOf(")")).replace(/\"/g, ""); overlay.css("backgroundImage", "none"); img = $('<img src="' + bg + '"/>'); img.css({border:0, position: opts.fixed ? 'fixed' : 'absolute', display:'none'}).width(oWidth); $('body').append(img); overlay.data("img", img); } // initial top & left var w = $(window), itop = opts.start.top || Math.round(w.height() / 2), ileft = opts.start.left || Math.round(w.width() / 2); if (trigger) { var p = getPosition(trigger); itop = p[0]; ileft = p[1]; } // adjust positioning relative to overlay scrolling position if (!opts.start.absolute) { itop += w.scrollTop(); ileft += w.scrollLeft(); } // initialize background image and make it visible img.css({ top: itop, left: ileft, width: 0, zIndex: opts.zIndex }).show(); // begin growing img.animate({ top: overlay.css("top"), left: overlay.css("left"), width: oWidth}, opts.speed, function() { // set close button and content over the image overlay.css("zIndex", opts.zIndex + 1).fadeIn(opts.fadeInSpeed, function() { if (self.isOpened() && !$(this).index(overlay)) { onLoad.call(); } else { overlay.hide(); } }); }); };//}}} var closeEffect = function(onClose) { // variables var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), top = opts.start.top, left = opts.start.left; // hide overlay & closers overlay.hide(); // trigger position if (trigger) { var p = getPosition(trigger); top = p[0]; left = p[1]; } // shrink image overlay.data("img").animate({top: top, left: left, width:0}, opts.closeSpeed, onClose); }; // add overlay effect t.addEffect("apple", loadEffect, closeEffect); })(jQuery); |
|
zIndex: opts.zIndex | zIndex: conf.zIndex | (function($) { // version number var t = $.tools.overlay; // extend global configuragion with effect specific defaults $.extend(t.conf, { start: { absolute: true, top: null, left: null }, fadeInSpeed: 'fast', zIndex: 9999 }); // utility function function getPosition(el) { var p = el.offset(); return [p.top + el.height() / 2, p.left + el.width() / 2]; } //{{{ load var loadEffect = function(onLoad) { var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), self = this, oWidth = overlay.outerWidth({margin:true}), img = overlay.data("img"); // growing image is required. if (!img) { var bg = overlay.css("backgroundImage"); if (!bg) { throw "background-image CSS property not set for overlay"; } // url("bg.jpg") --> bg.jpg bg = bg.slice(bg.indexOf("(") + 1, bg.indexOf(")")).replace(/\"/g, ""); overlay.css("backgroundImage", "none"); img = $('<img src="' + bg + '"/>'); img.css({border:0, position: opts.fixed ? 'fixed' : 'absolute', display:'none'}).width(oWidth); $('body').append(img); overlay.data("img", img); } // initial top & left var w = $(window), itop = opts.start.top || Math.round(w.height() / 2), ileft = opts.start.left || Math.round(w.width() / 2); if (trigger) { var p = getPosition(trigger); itop = p[0]; ileft = p[1]; } // adjust positioning relative to overlay scrolling position if (!opts.start.absolute) { itop += w.scrollTop(); ileft += w.scrollLeft(); } // initialize background image and make it visible img.css({ top: itop, left: ileft, width: 0, zIndex: opts.zIndex }).show(); // begin growing img.animate({ top: overlay.css("top"), left: overlay.css("left"), width: oWidth}, opts.speed, function() { // set close button and content over the image overlay.css("zIndex", opts.zIndex + 1).fadeIn(opts.fadeInSpeed, function() { if (self.isOpened() && !$(this).index(overlay)) { onLoad.call(); } else { overlay.hide(); } }); }); };//}}} var closeEffect = function(onClose) { // variables var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), top = opts.start.top, left = opts.start.left; // hide overlay & closers overlay.hide(); // trigger position if (trigger) { var p = getPosition(trigger); top = p[0]; left = p[1]; } // shrink image overlay.data("img").animate({top: top, left: left, width:0}, opts.closeSpeed, onClose); }; // add overlay effect t.addEffect("apple", loadEffect, closeEffect); })(jQuery); |
width: oWidth}, opts.speed, function() { | width: oWidth}, conf.speed, function() { | (function($) { // version number var t = $.tools.overlay; // extend global configuragion with effect specific defaults $.extend(t.conf, { start: { absolute: true, top: null, left: null }, fadeInSpeed: 'fast', zIndex: 9999 }); // utility function function getPosition(el) { var p = el.offset(); return [p.top + el.height() / 2, p.left + el.width() / 2]; } //{{{ load var loadEffect = function(onLoad) { var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), self = this, oWidth = overlay.outerWidth({margin:true}), img = overlay.data("img"); // growing image is required. if (!img) { var bg = overlay.css("backgroundImage"); if (!bg) { throw "background-image CSS property not set for overlay"; } // url("bg.jpg") --> bg.jpg bg = bg.slice(bg.indexOf("(") + 1, bg.indexOf(")")).replace(/\"/g, ""); overlay.css("backgroundImage", "none"); img = $('<img src="' + bg + '"/>'); img.css({border:0, position: opts.fixed ? 'fixed' : 'absolute', display:'none'}).width(oWidth); $('body').append(img); overlay.data("img", img); } // initial top & left var w = $(window), itop = opts.start.top || Math.round(w.height() / 2), ileft = opts.start.left || Math.round(w.width() / 2); if (trigger) { var p = getPosition(trigger); itop = p[0]; ileft = p[1]; } // adjust positioning relative to overlay scrolling position if (!opts.start.absolute) { itop += w.scrollTop(); ileft += w.scrollLeft(); } // initialize background image and make it visible img.css({ top: itop, left: ileft, width: 0, zIndex: opts.zIndex }).show(); // begin growing img.animate({ top: overlay.css("top"), left: overlay.css("left"), width: oWidth}, opts.speed, function() { // set close button and content over the image overlay.css("zIndex", opts.zIndex + 1).fadeIn(opts.fadeInSpeed, function() { if (self.isOpened() && !$(this).index(overlay)) { onLoad.call(); } else { overlay.hide(); } }); }); };//}}} var closeEffect = function(onClose) { // variables var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), top = opts.start.top, left = opts.start.left; // hide overlay & closers overlay.hide(); // trigger position if (trigger) { var p = getPosition(trigger); top = p[0]; left = p[1]; } // shrink image overlay.data("img").animate({top: top, left: left, width:0}, opts.closeSpeed, onClose); }; // add overlay effect t.addEffect("apple", loadEffect, closeEffect); })(jQuery); |
overlay.css("zIndex", opts.zIndex + 1).fadeIn(opts.fadeInSpeed, function() { | overlay.css("zIndex", conf.zIndex + 1).fadeIn(conf.fadeInSpeed, function() { | (function($) { // version number var t = $.tools.overlay; // extend global configuragion with effect specific defaults $.extend(t.conf, { start: { absolute: true, top: null, left: null }, fadeInSpeed: 'fast', zIndex: 9999 }); // utility function function getPosition(el) { var p = el.offset(); return [p.top + el.height() / 2, p.left + el.width() / 2]; } //{{{ load var loadEffect = function(onLoad) { var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), self = this, oWidth = overlay.outerWidth({margin:true}), img = overlay.data("img"); // growing image is required. if (!img) { var bg = overlay.css("backgroundImage"); if (!bg) { throw "background-image CSS property not set for overlay"; } // url("bg.jpg") --> bg.jpg bg = bg.slice(bg.indexOf("(") + 1, bg.indexOf(")")).replace(/\"/g, ""); overlay.css("backgroundImage", "none"); img = $('<img src="' + bg + '"/>'); img.css({border:0, position: opts.fixed ? 'fixed' : 'absolute', display:'none'}).width(oWidth); $('body').append(img); overlay.data("img", img); } // initial top & left var w = $(window), itop = opts.start.top || Math.round(w.height() / 2), ileft = opts.start.left || Math.round(w.width() / 2); if (trigger) { var p = getPosition(trigger); itop = p[0]; ileft = p[1]; } // adjust positioning relative to overlay scrolling position if (!opts.start.absolute) { itop += w.scrollTop(); ileft += w.scrollLeft(); } // initialize background image and make it visible img.css({ top: itop, left: ileft, width: 0, zIndex: opts.zIndex }).show(); // begin growing img.animate({ top: overlay.css("top"), left: overlay.css("left"), width: oWidth}, opts.speed, function() { // set close button and content over the image overlay.css("zIndex", opts.zIndex + 1).fadeIn(opts.fadeInSpeed, function() { if (self.isOpened() && !$(this).index(overlay)) { onLoad.call(); } else { overlay.hide(); } }); }); };//}}} var closeEffect = function(onClose) { // variables var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), top = opts.start.top, left = opts.start.left; // hide overlay & closers overlay.hide(); // trigger position if (trigger) { var p = getPosition(trigger); top = p[0]; left = p[1]; } // shrink image overlay.data("img").animate({top: top, left: left, width:0}, opts.closeSpeed, onClose); }; // add overlay effect t.addEffect("apple", loadEffect, closeEffect); })(jQuery); |
var overlay = this.getOverlay(), opts = this.getConf(), | var overlay = this.getOverlay().hide(), conf = this.getConf(), | (function($) { // version number var t = $.tools.overlay; // extend global configuragion with effect specific defaults $.extend(t.conf, { start: { absolute: true, top: null, left: null }, fadeInSpeed: 'fast', zIndex: 9999 }); // utility function function getPosition(el) { var p = el.offset(); return [p.top + el.height() / 2, p.left + el.width() / 2]; } //{{{ load var loadEffect = function(onLoad) { var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), self = this, oWidth = overlay.outerWidth({margin:true}), img = overlay.data("img"); // growing image is required. if (!img) { var bg = overlay.css("backgroundImage"); if (!bg) { throw "background-image CSS property not set for overlay"; } // url("bg.jpg") --> bg.jpg bg = bg.slice(bg.indexOf("(") + 1, bg.indexOf(")")).replace(/\"/g, ""); overlay.css("backgroundImage", "none"); img = $('<img src="' + bg + '"/>'); img.css({border:0, position: opts.fixed ? 'fixed' : 'absolute', display:'none'}).width(oWidth); $('body').append(img); overlay.data("img", img); } // initial top & left var w = $(window), itop = opts.start.top || Math.round(w.height() / 2), ileft = opts.start.left || Math.round(w.width() / 2); if (trigger) { var p = getPosition(trigger); itop = p[0]; ileft = p[1]; } // adjust positioning relative to overlay scrolling position if (!opts.start.absolute) { itop += w.scrollTop(); ileft += w.scrollLeft(); } // initialize background image and make it visible img.css({ top: itop, left: ileft, width: 0, zIndex: opts.zIndex }).show(); // begin growing img.animate({ top: overlay.css("top"), left: overlay.css("left"), width: oWidth}, opts.speed, function() { // set close button and content over the image overlay.css("zIndex", opts.zIndex + 1).fadeIn(opts.fadeInSpeed, function() { if (self.isOpened() && !$(this).index(overlay)) { onLoad.call(); } else { overlay.hide(); } }); }); };//}}} var closeEffect = function(onClose) { // variables var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), top = opts.start.top, left = opts.start.left; // hide overlay & closers overlay.hide(); // trigger position if (trigger) { var p = getPosition(trigger); top = p[0]; left = p[1]; } // shrink image overlay.data("img").animate({top: top, left: left, width:0}, opts.closeSpeed, onClose); }; // add overlay effect t.addEffect("apple", loadEffect, closeEffect); })(jQuery); |
top = opts.start.top, left = opts.start.left; | img = overlay.data("img"), css = { top: conf.start.top, left: conf.start.left, width: 0 }; if (trigger) { $.extend(css, getPosition(trigger)); } | (function($) { // version number var t = $.tools.overlay; // extend global configuragion with effect specific defaults $.extend(t.conf, { start: { absolute: true, top: null, left: null }, fadeInSpeed: 'fast', zIndex: 9999 }); // utility function function getPosition(el) { var p = el.offset(); return [p.top + el.height() / 2, p.left + el.width() / 2]; } //{{{ load var loadEffect = function(onLoad) { var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), self = this, oWidth = overlay.outerWidth({margin:true}), img = overlay.data("img"); // growing image is required. if (!img) { var bg = overlay.css("backgroundImage"); if (!bg) { throw "background-image CSS property not set for overlay"; } // url("bg.jpg") --> bg.jpg bg = bg.slice(bg.indexOf("(") + 1, bg.indexOf(")")).replace(/\"/g, ""); overlay.css("backgroundImage", "none"); img = $('<img src="' + bg + '"/>'); img.css({border:0, position: opts.fixed ? 'fixed' : 'absolute', display:'none'}).width(oWidth); $('body').append(img); overlay.data("img", img); } // initial top & left var w = $(window), itop = opts.start.top || Math.round(w.height() / 2), ileft = opts.start.left || Math.round(w.width() / 2); if (trigger) { var p = getPosition(trigger); itop = p[0]; ileft = p[1]; } // adjust positioning relative to overlay scrolling position if (!opts.start.absolute) { itop += w.scrollTop(); ileft += w.scrollLeft(); } // initialize background image and make it visible img.css({ top: itop, left: ileft, width: 0, zIndex: opts.zIndex }).show(); // begin growing img.animate({ top: overlay.css("top"), left: overlay.css("left"), width: oWidth}, opts.speed, function() { // set close button and content over the image overlay.css("zIndex", opts.zIndex + 1).fadeIn(opts.fadeInSpeed, function() { if (self.isOpened() && !$(this).index(overlay)) { onLoad.call(); } else { overlay.hide(); } }); }); };//}}} var closeEffect = function(onClose) { // variables var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), top = opts.start.top, left = opts.start.left; // hide overlay & closers overlay.hide(); // trigger position if (trigger) { var p = getPosition(trigger); top = p[0]; left = p[1]; } // shrink image overlay.data("img").animate({top: top, left: left, width:0}, opts.closeSpeed, onClose); }; // add overlay effect t.addEffect("apple", loadEffect, closeEffect); })(jQuery); |
overlay.hide(); if (trigger) { var p = getPosition(trigger); top = p[0]; left = p[1]; } | if (conf.fixed) { img.css({position: 'absolute'}) .animate({ top: "+=" + w.scrollTop(), left: "+=" + w.scrollLeft()}, 0); } | (function($) { // version number var t = $.tools.overlay; // extend global configuragion with effect specific defaults $.extend(t.conf, { start: { absolute: true, top: null, left: null }, fadeInSpeed: 'fast', zIndex: 9999 }); // utility function function getPosition(el) { var p = el.offset(); return [p.top + el.height() / 2, p.left + el.width() / 2]; } //{{{ load var loadEffect = function(onLoad) { var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), self = this, oWidth = overlay.outerWidth({margin:true}), img = overlay.data("img"); // growing image is required. if (!img) { var bg = overlay.css("backgroundImage"); if (!bg) { throw "background-image CSS property not set for overlay"; } // url("bg.jpg") --> bg.jpg bg = bg.slice(bg.indexOf("(") + 1, bg.indexOf(")")).replace(/\"/g, ""); overlay.css("backgroundImage", "none"); img = $('<img src="' + bg + '"/>'); img.css({border:0, position: opts.fixed ? 'fixed' : 'absolute', display:'none'}).width(oWidth); $('body').append(img); overlay.data("img", img); } // initial top & left var w = $(window), itop = opts.start.top || Math.round(w.height() / 2), ileft = opts.start.left || Math.round(w.width() / 2); if (trigger) { var p = getPosition(trigger); itop = p[0]; ileft = p[1]; } // adjust positioning relative to overlay scrolling position if (!opts.start.absolute) { itop += w.scrollTop(); ileft += w.scrollLeft(); } // initialize background image and make it visible img.css({ top: itop, left: ileft, width: 0, zIndex: opts.zIndex }).show(); // begin growing img.animate({ top: overlay.css("top"), left: overlay.css("left"), width: oWidth}, opts.speed, function() { // set close button and content over the image overlay.css("zIndex", opts.zIndex + 1).fadeIn(opts.fadeInSpeed, function() { if (self.isOpened() && !$(this).index(overlay)) { onLoad.call(); } else { overlay.hide(); } }); }); };//}}} var closeEffect = function(onClose) { // variables var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), top = opts.start.top, left = opts.start.left; // hide overlay & closers overlay.hide(); // trigger position if (trigger) { var p = getPosition(trigger); top = p[0]; left = p[1]; } // shrink image overlay.data("img").animate({top: top, left: left, width:0}, opts.closeSpeed, onClose); }; // add overlay effect t.addEffect("apple", loadEffect, closeEffect); })(jQuery); |
overlay.data("img").animate({top: top, left: left, width:0}, opts.closeSpeed, onClose); | img.animate(css, conf.closeSpeed, onClose); | (function($) { // version number var t = $.tools.overlay; // extend global configuragion with effect specific defaults $.extend(t.conf, { start: { absolute: true, top: null, left: null }, fadeInSpeed: 'fast', zIndex: 9999 }); // utility function function getPosition(el) { var p = el.offset(); return [p.top + el.height() / 2, p.left + el.width() / 2]; } //{{{ load var loadEffect = function(onLoad) { var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), self = this, oWidth = overlay.outerWidth({margin:true}), img = overlay.data("img"); // growing image is required. if (!img) { var bg = overlay.css("backgroundImage"); if (!bg) { throw "background-image CSS property not set for overlay"; } // url("bg.jpg") --> bg.jpg bg = bg.slice(bg.indexOf("(") + 1, bg.indexOf(")")).replace(/\"/g, ""); overlay.css("backgroundImage", "none"); img = $('<img src="' + bg + '"/>'); img.css({border:0, position: opts.fixed ? 'fixed' : 'absolute', display:'none'}).width(oWidth); $('body').append(img); overlay.data("img", img); } // initial top & left var w = $(window), itop = opts.start.top || Math.round(w.height() / 2), ileft = opts.start.left || Math.round(w.width() / 2); if (trigger) { var p = getPosition(trigger); itop = p[0]; ileft = p[1]; } // adjust positioning relative to overlay scrolling position if (!opts.start.absolute) { itop += w.scrollTop(); ileft += w.scrollLeft(); } // initialize background image and make it visible img.css({ top: itop, left: ileft, width: 0, zIndex: opts.zIndex }).show(); // begin growing img.animate({ top: overlay.css("top"), left: overlay.css("left"), width: oWidth}, opts.speed, function() { // set close button and content over the image overlay.css("zIndex", opts.zIndex + 1).fadeIn(opts.fadeInSpeed, function() { if (self.isOpened() && !$(this).index(overlay)) { onLoad.call(); } else { overlay.hide(); } }); }); };//}}} var closeEffect = function(onClose) { // variables var overlay = this.getOverlay(), opts = this.getConf(), trigger = this.getTrigger(), top = opts.start.top, left = opts.start.left; // hide overlay & closers overlay.hide(); // trigger position if (trigger) { var p = getPosition(trigger); top = p[0]; left = p[1]; } // shrink image overlay.data("img").animate({top: top, left: left, width:0}, opts.closeSpeed, onClose); }; // add overlay effect t.addEffect("apple", loadEffect, closeEffect); })(jQuery); |
WT_DECLARE_WT_MEMBER(1,"WGLWidget",function(r,l){jQuery.data(l,"obj",this);var f=r.WT,k=f.glMatrix.vec3,b=f.glMatrix.mat4;this.ctx=null;this.initializeGL=function(){};this.paintGL=function(){};var h=null,i=null,m=null,n=0,o=0,e=null,p=0,q=0;this.discoverContext=function(){if(l.getContext){this.ctx=l.getContext("experimental-webgl");if(this.ctx==null)this.ctx=l.getContext("webgl")}return this.ctx};this.setLookAtParams=function(a,c,d,g,j){e=a;i=c;m=d;n=g;o=j};this.mouseDragLookAt=function(a,c){var d= f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=k.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var j=b.create();b.identity(j);b.translate(j,i);b.rotate(j,d*n,g);b.rotate(j,a*o,m);k.negate(i);b.translate(j,i);k.negate(i);b.multiply(e,j,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseWheelLookAt=function(a,c){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e,[a,a,a]);k.negate(i);b.translate(e,i);k.negate(i);this.paintGl()};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk= function(a,c){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=k.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseDown=function(a,c){f.capture(null);f.capture(l);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); | WT_DECLARE_WT_MEMBER(1,"WGLWidget",function(r,j){jQuery.data(j,"obj",this);var f=r.WT,l=f.glMatrix.vec3,b=f.glMatrix.mat4;this.ctx=null;this.initializeGL=function(){};this.paintGL=function(){};var h=null,i=null,m=null,n=0,o=0,e=null,p=0,q=0;this.discoverContext=function(a){if(j.getContext){try{this.ctx=j.getContext("webgl")}catch(c){}if(this.ctx==null)try{this.ctx=j.getContext("experimental-webgl")}catch(d){}if(this.ctx==null){j.parentNode.replaceChild(j.firstChild,j);a()}}return this.ctx};this.setLookAtParams= function(a,c,d,g,k){e=a;i=c;m=d;n=g;o=k};this.mouseDragLookAt=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=l.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var k=b.create();b.identity(k);b.translate(k,i);b.rotate(k,d*n,g);b.rotate(k,a*o,m);l.negate(i);b.translate(k,i);l.negate(i);b.multiply(e,k,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseWheelLookAt=function(a,c){if(this.ctx!=null){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e, [a,a,a]);l.negate(i);b.translate(e,i);l.negate(i);this.paintGL()}};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=l.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseDown=function(a,c){f.capture(null);f.capture(j);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); | WT_DECLARE_WT_MEMBER(1,"WGLWidget",function(r,l){jQuery.data(l,"obj",this);var f=r.WT,k=f.glMatrix.vec3,b=f.glMatrix.mat4;this.ctx=null;this.initializeGL=function(){};this.paintGL=function(){};var h=null,i=null,m=null,n=0,o=0,e=null,p=0,q=0;this.discoverContext=function(){if(l.getContext){this.ctx=l.getContext("experimental-webgl");if(this.ctx==null)this.ctx=l.getContext("webgl")}return this.ctx};this.setLookAtParams=function(a,c,d,g,j){e=a;i=c;m=d;n=g;o=j};this.mouseDragLookAt=function(a,c){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=k.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var j=b.create();b.identity(j);b.translate(j,i);b.rotate(j,d*n,g);b.rotate(j,a*o,m);k.negate(i);b.translate(j,i);k.negate(i);b.multiply(e,j,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseWheelLookAt=function(a,c){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e,[a,a,a]);k.negate(i);b.translate(e,i);k.negate(i);this.paintGl()};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=k.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseDown=function(a,c){f.capture(null);f.capture(l);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); |
var pitch = pitches[acc.note]; pitch = pitch + 6 - mid; acc.verticalPos = pitch % 14; }) | var pitch = pitches[acc.note]; pitch = pitch + 6 - mid; acc.verticalPos = pitch % 14; }); | key.extraAccidentals.each(function(acc) { var pitch = pitches[acc.note]; pitch = pitch + 6 - mid; acc.verticalPos = pitch % 14; // Always keep this on the two octaves on the staff }) |
Zotero.debug(text); | Zotero.Utilities.HTTP.doGet(unAPIResolver, function(text) { Zotero.debug(text); var format = checkFormats(text); if(format) { // move unsearchedIds to foundIds foundIds = unsearchedIds; unsearchedIds = []; // save format and formatName foundFormat = format[0]; foundFormatName = format[1]; Zotero.done("multiple"); } else { getItemType(); } }); |
|
$.fn.tagBox = function(options) { | $.fn.doMeta = function(options) { | (function($) { $.fn.tagBox = function(options) { // define defaults var defaults = { splitChar: ',', emptyMessage: '', addLabel: 'add', removeLabel: 'delete', autoCompleteUrl: '', canAddNew: false, showIconOnly: true }; // extend options var options = $.extend(defaults, options); // loop all elements return this.each(function() { // define some vars var id = $(this).attr('id'); var elements = get(); var blockSubmit = false; // bind submit $(this.form).submit(function() { return !blockSubmit; }) // build replace html var html = '<div class="tagsWrapper">'+ ' <div class="oneLiner">'+ ' <p><input class="inputText dontSubmit" id="addValue-'+ id +'" name="addValue-'+ id +'" type="text" /></p>'+ ' <div class="buttonHolder">'+ ' <a href="#" id="addButton-'+ id +'" class="button icon iconAdd disabledButton'; if(options.showIconOnly) html += ' iconOnly'; html += '">'+ ' <span>'+ options.addLabel +'</span>'+ ' </a>'+ ' </div>'+ ' </div>'+ ' <div id="elementList-'+ id +'" class="tagList">'+ ' </div>'+ '</div>'; // hide current element $(this).css('visibility', 'hidden') .css('position', 'absolute') .css('top', '-9000px') .css('left', '-9000px') .attr('tabindex', '-1'); // prepend html $(this).before(html); // add elements list build(); // bind autocomplete if needed if(options.autoCompleteUrl != '') { $('#addValue-'+ id).autocomplete({ delay: 200, minLength: 2, source: function(request, response) { $.ajax({ url: options.autoCompleteUrl, type: 'GET', data: 'term=' + request.term, success: function(data, textStatus) { // init var var realData = []; // alert the user if(data.code != 200 && jsBackend.debug) { alert(data.message); } if(data.code == 200) { for(var i in data.data) realData.push({ label: data.data[i].name, value: data.data[i].name }); } // set response response(realData); } }); } }); } // bind keypress on value-field $('#addValue-'+ id).bind('keyup', function(evt) { blockSubmit = true; // grab code var code = evt.which; // enter of splitchar should add an element if(code == 13 || String.fromCharCode(code) == options.splitChar) { // prevent default behaviour evt.preventDefault(); evt.stopPropagation(); // add element add(); } // disable or enable button if($(this).val().replace(/^\s+|\s+$/g, '') == '') { blockSubmit = false; $('#addButton-'+ id).addClass('disabledButton'); } else $('#addButton-'+ id).removeClass('disabledButton'); }); // bind click on add-button $('#addButton-'+ id).bind('click', function(evt) { // dont submit evt.preventDefault(); evt.stopPropagation(); // add element add(); }); // bind click on delete-button $('.deleteButton-'+ id).live('click', function(evt) { // dont submit evt.preventDefault(); evt.stopPropagation(); // remove element remove($(this).attr('rel')); }); // add an element function add() { blockSubmit = false; // init some vars var value = $('#addValue-'+ id).val().replace(/^\s+|\s+$/g, ''); var inElements = false; // reset box $('#addValue-'+ id).val('').focus(); $('#addButton-'+ id).addClass('disabledButton'); // only add new element if it isn't empty if(value != '') { // already in elements? for(var i in elements) if(value == elements[i]) inElements = true; // only add if not already in elements if(!inElements) { // add elements elements.push(value); // set new value $('#'+ id).val(elements.join(options.splitChar)); // rebuild element list build(); } } } // build the list function build() { // init var var html = ''; // no items and message given? if(elements.length == 0 && options.emptyMessage != '') html = '<p class="helpTxt">'+ options.emptyMessage +'</p>'; // items available else { // start html html = '<ul>'; // loop elements for(var i in elements) { html += ' <li><span><strong>'+ elements[i] +'</strong>'+ ' <a href="#" class="deleteButton-'+ id +'" rel="'+ elements[i] +'" title="'+ options.removeLabel +'">'+ options.removeLabel +'</a></span>'+ ' </li>'; } // end html html += '</ul>'; } // set html $('#elementList-'+ id).html(html); } // get all items function get() { // get chunks var chunks = $('#'+ id).val().split(options.splitChar); var elements = []; // loop elements and trim them from spaces for(var i in chunks) { value = chunks[i].replace(/^\s+|\s+$/g,''); if(value != '') elements.push(value) } return elements; } // remove an item function remove(value) { // get index for element var index = elements.indexOf(value); // remove element if(index > -1) elements.splice(index, 1); // set new value $('#'+ id).val(elements.join(options.splitChar)); // rebuild element list build(); } }); };})(jQuery); |
var defaults = { splitChar: ',', emptyMessage: '', addLabel: 'add', removeLabel: 'delete', autoCompleteUrl: '', canAddNew: false, showIconOnly: true }; | var defaults = {}; | (function($) { $.fn.tagBox = function(options) { // define defaults var defaults = { splitChar: ',', emptyMessage: '', addLabel: 'add', removeLabel: 'delete', autoCompleteUrl: '', canAddNew: false, showIconOnly: true }; // extend options var options = $.extend(defaults, options); // loop all elements return this.each(function() { // define some vars var id = $(this).attr('id'); var elements = get(); var blockSubmit = false; // bind submit $(this.form).submit(function() { return !blockSubmit; }) // build replace html var html = '<div class="tagsWrapper">'+ ' <div class="oneLiner">'+ ' <p><input class="inputText dontSubmit" id="addValue-'+ id +'" name="addValue-'+ id +'" type="text" /></p>'+ ' <div class="buttonHolder">'+ ' <a href="#" id="addButton-'+ id +'" class="button icon iconAdd disabledButton'; if(options.showIconOnly) html += ' iconOnly'; html += '">'+ ' <span>'+ options.addLabel +'</span>'+ ' </a>'+ ' </div>'+ ' </div>'+ ' <div id="elementList-'+ id +'" class="tagList">'+ ' </div>'+ '</div>'; // hide current element $(this).css('visibility', 'hidden') .css('position', 'absolute') .css('top', '-9000px') .css('left', '-9000px') .attr('tabindex', '-1'); // prepend html $(this).before(html); // add elements list build(); // bind autocomplete if needed if(options.autoCompleteUrl != '') { $('#addValue-'+ id).autocomplete({ delay: 200, minLength: 2, source: function(request, response) { $.ajax({ url: options.autoCompleteUrl, type: 'GET', data: 'term=' + request.term, success: function(data, textStatus) { // init var var realData = []; // alert the user if(data.code != 200 && jsBackend.debug) { alert(data.message); } if(data.code == 200) { for(var i in data.data) realData.push({ label: data.data[i].name, value: data.data[i].name }); } // set response response(realData); } }); } }); } // bind keypress on value-field $('#addValue-'+ id).bind('keyup', function(evt) { blockSubmit = true; // grab code var code = evt.which; // enter of splitchar should add an element if(code == 13 || String.fromCharCode(code) == options.splitChar) { // prevent default behaviour evt.preventDefault(); evt.stopPropagation(); // add element add(); } // disable or enable button if($(this).val().replace(/^\s+|\s+$/g, '') == '') { blockSubmit = false; $('#addButton-'+ id).addClass('disabledButton'); } else $('#addButton-'+ id).removeClass('disabledButton'); }); // bind click on add-button $('#addButton-'+ id).bind('click', function(evt) { // dont submit evt.preventDefault(); evt.stopPropagation(); // add element add(); }); // bind click on delete-button $('.deleteButton-'+ id).live('click', function(evt) { // dont submit evt.preventDefault(); evt.stopPropagation(); // remove element remove($(this).attr('rel')); }); // add an element function add() { blockSubmit = false; // init some vars var value = $('#addValue-'+ id).val().replace(/^\s+|\s+$/g, ''); var inElements = false; // reset box $('#addValue-'+ id).val('').focus(); $('#addButton-'+ id).addClass('disabledButton'); // only add new element if it isn't empty if(value != '') { // already in elements? for(var i in elements) if(value == elements[i]) inElements = true; // only add if not already in elements if(!inElements) { // add elements elements.push(value); // set new value $('#'+ id).val(elements.join(options.splitChar)); // rebuild element list build(); } } } // build the list function build() { // init var var html = ''; // no items and message given? if(elements.length == 0 && options.emptyMessage != '') html = '<p class="helpTxt">'+ options.emptyMessage +'</p>'; // items available else { // start html html = '<ul>'; // loop elements for(var i in elements) { html += ' <li><span><strong>'+ elements[i] +'</strong>'+ ' <a href="#" class="deleteButton-'+ id +'" rel="'+ elements[i] +'" title="'+ options.removeLabel +'">'+ options.removeLabel +'</a></span>'+ ' </li>'; } // end html html += '</ul>'; } // set html $('#elementList-'+ id).html(html); } // get all items function get() { // get chunks var chunks = $('#'+ id).val().split(options.splitChar); var elements = []; // loop elements and trim them from spaces for(var i in chunks) { value = chunks[i].replace(/^\s+|\s+$/g,''); if(value != '') elements.push(value) } return elements; } // remove an item function remove(value) { // get index for element var index = elements.indexOf(value); // remove element if(index > -1) elements.splice(index, 1); // set new value $('#'+ id).val(elements.join(options.splitChar)); // rebuild element list build(); } }); };})(jQuery); |
var id = $(this).attr('id'); var elements = get(); var blockSubmit = false; | var element = $(this); calculateMeta(null, $(this)); $(this).bind('keyup', calculateMeta); if($('#pageTitle').length > 0 && $('#pageTitleOverwrite').length > 0) { $('#pageTitleOverwrite').change(function(evt) { if(!$(this).is(':checked')) { $('#pageTitle').val(element.val()); } }); } if($('#navigationTitle').length > 0 && $('#navigationTitleOverwrite').length > 0) { $('#navigationTitleOverwrite').change(function(evt) { if(!$(this).is(':checked')) { $('#navigationTitle').val(element.val()); } }); } $('#metaDescriptionOverwrite').change(function(evt) { if(!$(this).is(':checked')) { $('#metaDescription').val(element.val()); } }); $('#metaKeywordsOverwrite').change(function(evt) { if(!$(this).is(':checked')) { $('#metaKeywords').val(element.val()); } }); $('#urlOverwrite').change(function(evt) { if(!$(this).is(':checked')) { $('#url').val(utils.string.urlise(element.val())); $('#generatedUrl').html(utils.string.urlise(element.val())); } }); | (function($) { $.fn.tagBox = function(options) { // define defaults var defaults = { splitChar: ',', emptyMessage: '', addLabel: 'add', removeLabel: 'delete', autoCompleteUrl: '', canAddNew: false, showIconOnly: true }; // extend options var options = $.extend(defaults, options); // loop all elements return this.each(function() { // define some vars var id = $(this).attr('id'); var elements = get(); var blockSubmit = false; // bind submit $(this.form).submit(function() { return !blockSubmit; }) // build replace html var html = '<div class="tagsWrapper">'+ ' <div class="oneLiner">'+ ' <p><input class="inputText dontSubmit" id="addValue-'+ id +'" name="addValue-'+ id +'" type="text" /></p>'+ ' <div class="buttonHolder">'+ ' <a href="#" id="addButton-'+ id +'" class="button icon iconAdd disabledButton'; if(options.showIconOnly) html += ' iconOnly'; html += '">'+ ' <span>'+ options.addLabel +'</span>'+ ' </a>'+ ' </div>'+ ' </div>'+ ' <div id="elementList-'+ id +'" class="tagList">'+ ' </div>'+ '</div>'; // hide current element $(this).css('visibility', 'hidden') .css('position', 'absolute') .css('top', '-9000px') .css('left', '-9000px') .attr('tabindex', '-1'); // prepend html $(this).before(html); // add elements list build(); // bind autocomplete if needed if(options.autoCompleteUrl != '') { $('#addValue-'+ id).autocomplete({ delay: 200, minLength: 2, source: function(request, response) { $.ajax({ url: options.autoCompleteUrl, type: 'GET', data: 'term=' + request.term, success: function(data, textStatus) { // init var var realData = []; // alert the user if(data.code != 200 && jsBackend.debug) { alert(data.message); } if(data.code == 200) { for(var i in data.data) realData.push({ label: data.data[i].name, value: data.data[i].name }); } // set response response(realData); } }); } }); } // bind keypress on value-field $('#addValue-'+ id).bind('keyup', function(evt) { blockSubmit = true; // grab code var code = evt.which; // enter of splitchar should add an element if(code == 13 || String.fromCharCode(code) == options.splitChar) { // prevent default behaviour evt.preventDefault(); evt.stopPropagation(); // add element add(); } // disable or enable button if($(this).val().replace(/^\s+|\s+$/g, '') == '') { blockSubmit = false; $('#addButton-'+ id).addClass('disabledButton'); } else $('#addButton-'+ id).removeClass('disabledButton'); }); // bind click on add-button $('#addButton-'+ id).bind('click', function(evt) { // dont submit evt.preventDefault(); evt.stopPropagation(); // add element add(); }); // bind click on delete-button $('.deleteButton-'+ id).live('click', function(evt) { // dont submit evt.preventDefault(); evt.stopPropagation(); // remove element remove($(this).attr('rel')); }); // add an element function add() { blockSubmit = false; // init some vars var value = $('#addValue-'+ id).val().replace(/^\s+|\s+$/g, ''); var inElements = false; // reset box $('#addValue-'+ id).val('').focus(); $('#addButton-'+ id).addClass('disabledButton'); // only add new element if it isn't empty if(value != '') { // already in elements? for(var i in elements) if(value == elements[i]) inElements = true; // only add if not already in elements if(!inElements) { // add elements elements.push(value); // set new value $('#'+ id).val(elements.join(options.splitChar)); // rebuild element list build(); } } } // build the list function build() { // init var var html = ''; // no items and message given? if(elements.length == 0 && options.emptyMessage != '') html = '<p class="helpTxt">'+ options.emptyMessage +'</p>'; // items available else { // start html html = '<ul>'; // loop elements for(var i in elements) { html += ' <li><span><strong>'+ elements[i] +'</strong>'+ ' <a href="#" class="deleteButton-'+ id +'" rel="'+ elements[i] +'" title="'+ options.removeLabel +'">'+ options.removeLabel +'</a></span>'+ ' </li>'; } // end html html += '</ul>'; } // set html $('#elementList-'+ id).html(html); } // get all items function get() { // get chunks var chunks = $('#'+ id).val().split(options.splitChar); var elements = []; // loop elements and trim them from spaces for(var i in chunks) { value = chunks[i].replace(/^\s+|\s+$/g,''); if(value != '') elements.push(value) } return elements; } // remove an item function remove(value) { // get index for element var index = elements.indexOf(value); // remove element if(index > -1) elements.splice(index, 1); // set new value $('#'+ id).val(elements.join(options.splitChar)); // rebuild element list build(); } }); };})(jQuery); |
$(this.form).submit(function() { return !blockSubmit; }) var html = '<div class="tagsWrapper">'+ ' <div class="oneLiner">'+ ' <p><input class="inputText dontSubmit" id="addValue-'+ id +'" name="addValue-'+ id +'" type="text" /></p>'+ ' <div class="buttonHolder">'+ ' <a href="#" id="addButton-'+ id +'" class="button icon iconAdd disabledButton'; if(options.showIconOnly) html += ' iconOnly'; html += '">'+ ' <span>'+ options.addLabel +'</span>'+ ' </a>'+ ' </div>'+ ' </div>'+ ' <div id="elementList-'+ id +'" class="tagList">'+ ' </div>'+ '</div>'; $(this).css('visibility', 'hidden') .css('position', 'absolute') .css('top', '-9000px') .css('left', '-9000px') .attr('tabindex', '-1'); $(this).before(html); | function calculateMeta(evt, element) { if(typeof element != 'undefined') var title = element.val(); else var title = $(this).val(); | (function($) { $.fn.tagBox = function(options) { // define defaults var defaults = { splitChar: ',', emptyMessage: '', addLabel: 'add', removeLabel: 'delete', autoCompleteUrl: '', canAddNew: false, showIconOnly: true }; // extend options var options = $.extend(defaults, options); // loop all elements return this.each(function() { // define some vars var id = $(this).attr('id'); var elements = get(); var blockSubmit = false; // bind submit $(this.form).submit(function() { return !blockSubmit; }) // build replace html var html = '<div class="tagsWrapper">'+ ' <div class="oneLiner">'+ ' <p><input class="inputText dontSubmit" id="addValue-'+ id +'" name="addValue-'+ id +'" type="text" /></p>'+ ' <div class="buttonHolder">'+ ' <a href="#" id="addButton-'+ id +'" class="button icon iconAdd disabledButton'; if(options.showIconOnly) html += ' iconOnly'; html += '">'+ ' <span>'+ options.addLabel +'</span>'+ ' </a>'+ ' </div>'+ ' </div>'+ ' <div id="elementList-'+ id +'" class="tagList">'+ ' </div>'+ '</div>'; // hide current element $(this).css('visibility', 'hidden') .css('position', 'absolute') .css('top', '-9000px') .css('left', '-9000px') .attr('tabindex', '-1'); // prepend html $(this).before(html); // add elements list build(); // bind autocomplete if needed if(options.autoCompleteUrl != '') { $('#addValue-'+ id).autocomplete({ delay: 200, minLength: 2, source: function(request, response) { $.ajax({ url: options.autoCompleteUrl, type: 'GET', data: 'term=' + request.term, success: function(data, textStatus) { // init var var realData = []; // alert the user if(data.code != 200 && jsBackend.debug) { alert(data.message); } if(data.code == 200) { for(var i in data.data) realData.push({ label: data.data[i].name, value: data.data[i].name }); } // set response response(realData); } }); } }); } // bind keypress on value-field $('#addValue-'+ id).bind('keyup', function(evt) { blockSubmit = true; // grab code var code = evt.which; // enter of splitchar should add an element if(code == 13 || String.fromCharCode(code) == options.splitChar) { // prevent default behaviour evt.preventDefault(); evt.stopPropagation(); // add element add(); } // disable or enable button if($(this).val().replace(/^\s+|\s+$/g, '') == '') { blockSubmit = false; $('#addButton-'+ id).addClass('disabledButton'); } else $('#addButton-'+ id).removeClass('disabledButton'); }); // bind click on add-button $('#addButton-'+ id).bind('click', function(evt) { // dont submit evt.preventDefault(); evt.stopPropagation(); // add element add(); }); // bind click on delete-button $('.deleteButton-'+ id).live('click', function(evt) { // dont submit evt.preventDefault(); evt.stopPropagation(); // remove element remove($(this).attr('rel')); }); // add an element function add() { blockSubmit = false; // init some vars var value = $('#addValue-'+ id).val().replace(/^\s+|\s+$/g, ''); var inElements = false; // reset box $('#addValue-'+ id).val('').focus(); $('#addButton-'+ id).addClass('disabledButton'); // only add new element if it isn't empty if(value != '') { // already in elements? for(var i in elements) if(value == elements[i]) inElements = true; // only add if not already in elements if(!inElements) { // add elements elements.push(value); // set new value $('#'+ id).val(elements.join(options.splitChar)); // rebuild element list build(); } } } // build the list function build() { // init var var html = ''; // no items and message given? if(elements.length == 0 && options.emptyMessage != '') html = '<p class="helpTxt">'+ options.emptyMessage +'</p>'; // items available else { // start html html = '<ul>'; // loop elements for(var i in elements) { html += ' <li><span><strong>'+ elements[i] +'</strong>'+ ' <a href="#" class="deleteButton-'+ id +'" rel="'+ elements[i] +'" title="'+ options.removeLabel +'">'+ options.removeLabel +'</a></span>'+ ' </li>'; } // end html html += '</ul>'; } // set html $('#elementList-'+ id).html(html); } // get all items function get() { // get chunks var chunks = $('#'+ id).val().split(options.splitChar); var elements = []; // loop elements and trim them from spaces for(var i in chunks) { value = chunks[i].replace(/^\s+|\s+$/g,''); if(value != '') elements.push(value) } return elements; } // remove an item function remove(value) { // get index for element var index = elements.indexOf(value); // remove element if(index > -1) elements.splice(index, 1); // set new value $('#'+ id).val(elements.join(options.splitChar)); // rebuild element list build(); } }); };})(jQuery); |
build(); if(options.autoCompleteUrl != '') { $('#addValue-'+ id).autocomplete({ delay: 200, minLength: 2, source: function(request, response) { $.ajax({ url: options.autoCompleteUrl, type: 'GET', data: 'term=' + request.term, success: function(data, textStatus) { var realData = []; if(data.code != 200 && jsBackend.debug) { alert(data.message); } if(data.code == 200) { for(var i in data.data) realData.push({ label: data.data[i].name, value: data.data[i].name }); } response(realData); } }); } }); } $('#addValue-'+ id).bind('keyup', function(evt) { blockSubmit = true; var code = evt.which; if(code == 13 || String.fromCharCode(code) == options.splitChar) { evt.preventDefault(); evt.stopPropagation(); add(); } if($(this).val().replace(/^\s+|\s+$/g, '') == '') { blockSubmit = false; $('#addButton-'+ id).addClass('disabledButton'); } else $('#addButton-'+ id).removeClass('disabledButton'); }); $('#addButton-'+ id).bind('click', function(evt) { evt.preventDefault(); evt.stopPropagation(); add(); }); $('.deleteButton-'+ id).live('click', function(evt) { evt.preventDefault(); evt.stopPropagation(); remove($(this).attr('rel')); }); function add() { blockSubmit = false; var value = $('#addValue-'+ id).val().replace(/^\s+|\s+$/g, ''); var inElements = false; $('#addValue-'+ id).val('').focus(); $('#addButton-'+ id).addClass('disabledButton'); if(value != '') { for(var i in elements) if(value == elements[i]) inElements = true; if(!inElements) { elements.push(value); $('#'+ id).val(elements.join(options.splitChar)); build(); | if($('#pageTitle').length > 0 && $('#pageTitleOverwrite').length > 0) { if(!$('#pageTitleOverwrite').is(':checked')) { $('#pageTitle').val(title); | (function($) { $.fn.tagBox = function(options) { // define defaults var defaults = { splitChar: ',', emptyMessage: '', addLabel: 'add', removeLabel: 'delete', autoCompleteUrl: '', canAddNew: false, showIconOnly: true }; // extend options var options = $.extend(defaults, options); // loop all elements return this.each(function() { // define some vars var id = $(this).attr('id'); var elements = get(); var blockSubmit = false; // bind submit $(this.form).submit(function() { return !blockSubmit; }) // build replace html var html = '<div class="tagsWrapper">'+ ' <div class="oneLiner">'+ ' <p><input class="inputText dontSubmit" id="addValue-'+ id +'" name="addValue-'+ id +'" type="text" /></p>'+ ' <div class="buttonHolder">'+ ' <a href="#" id="addButton-'+ id +'" class="button icon iconAdd disabledButton'; if(options.showIconOnly) html += ' iconOnly'; html += '">'+ ' <span>'+ options.addLabel +'</span>'+ ' </a>'+ ' </div>'+ ' </div>'+ ' <div id="elementList-'+ id +'" class="tagList">'+ ' </div>'+ '</div>'; // hide current element $(this).css('visibility', 'hidden') .css('position', 'absolute') .css('top', '-9000px') .css('left', '-9000px') .attr('tabindex', '-1'); // prepend html $(this).before(html); // add elements list build(); // bind autocomplete if needed if(options.autoCompleteUrl != '') { $('#addValue-'+ id).autocomplete({ delay: 200, minLength: 2, source: function(request, response) { $.ajax({ url: options.autoCompleteUrl, type: 'GET', data: 'term=' + request.term, success: function(data, textStatus) { // init var var realData = []; // alert the user if(data.code != 200 && jsBackend.debug) { alert(data.message); } if(data.code == 200) { for(var i in data.data) realData.push({ label: data.data[i].name, value: data.data[i].name }); } // set response response(realData); } }); } }); } // bind keypress on value-field $('#addValue-'+ id).bind('keyup', function(evt) { blockSubmit = true; // grab code var code = evt.which; // enter of splitchar should add an element if(code == 13 || String.fromCharCode(code) == options.splitChar) { // prevent default behaviour evt.preventDefault(); evt.stopPropagation(); // add element add(); } // disable or enable button if($(this).val().replace(/^\s+|\s+$/g, '') == '') { blockSubmit = false; $('#addButton-'+ id).addClass('disabledButton'); } else $('#addButton-'+ id).removeClass('disabledButton'); }); // bind click on add-button $('#addButton-'+ id).bind('click', function(evt) { // dont submit evt.preventDefault(); evt.stopPropagation(); // add element add(); }); // bind click on delete-button $('.deleteButton-'+ id).live('click', function(evt) { // dont submit evt.preventDefault(); evt.stopPropagation(); // remove element remove($(this).attr('rel')); }); // add an element function add() { blockSubmit = false; // init some vars var value = $('#addValue-'+ id).val().replace(/^\s+|\s+$/g, ''); var inElements = false; // reset box $('#addValue-'+ id).val('').focus(); $('#addButton-'+ id).addClass('disabledButton'); // only add new element if it isn't empty if(value != '') { // already in elements? for(var i in elements) if(value == elements[i]) inElements = true; // only add if not already in elements if(!inElements) { // add elements elements.push(value); // set new value $('#'+ id).val(elements.join(options.splitChar)); // rebuild element list build(); } } } // build the list function build() { // init var var html = ''; // no items and message given? if(elements.length == 0 && options.emptyMessage != '') html = '<p class="helpTxt">'+ options.emptyMessage +'</p>'; // items available else { // start html html = '<ul>'; // loop elements for(var i in elements) { html += ' <li><span><strong>'+ elements[i] +'</strong>'+ ' <a href="#" class="deleteButton-'+ id +'" rel="'+ elements[i] +'" title="'+ options.removeLabel +'">'+ options.removeLabel +'</a></span>'+ ' </li>'; } // end html html += '</ul>'; } // set html $('#elementList-'+ id).html(html); } // get all items function get() { // get chunks var chunks = $('#'+ id).val().split(options.splitChar); var elements = []; // loop elements and trim them from spaces for(var i in chunks) { value = chunks[i].replace(/^\s+|\s+$/g,''); if(value != '') elements.push(value) } return elements; } // remove an item function remove(value) { // get index for element var index = elements.indexOf(value); // remove element if(index > -1) elements.splice(index, 1); // set new value $('#'+ id).val(elements.join(options.splitChar)); // rebuild element list build(); } }); };})(jQuery); |
} function build() { var html = ''; if(elements.length == 0 && options.emptyMessage != '') html = '<p class="helpTxt">'+ options.emptyMessage +'</p>'; else { html = '<ul>'; for(var i in elements) { html += ' <li><span><strong>'+ elements[i] +'</strong>'+ ' <a href="#" class="deleteButton-'+ id +'" rel="'+ elements[i] +'" title="'+ options.removeLabel +'">'+ options.removeLabel +'</a></span>'+ ' </li>'; | if($('#navigationTitle').length > 0 && $('#navigationTitleOverwrite').length > 0) { if(!$('#navigationTitleOverwrite').is(':checked')) { $('#navigationTitle').val(title); | (function($) { $.fn.tagBox = function(options) { // define defaults var defaults = { splitChar: ',', emptyMessage: '', addLabel: 'add', removeLabel: 'delete', autoCompleteUrl: '', canAddNew: false, showIconOnly: true }; // extend options var options = $.extend(defaults, options); // loop all elements return this.each(function() { // define some vars var id = $(this).attr('id'); var elements = get(); var blockSubmit = false; // bind submit $(this.form).submit(function() { return !blockSubmit; }) // build replace html var html = '<div class="tagsWrapper">'+ ' <div class="oneLiner">'+ ' <p><input class="inputText dontSubmit" id="addValue-'+ id +'" name="addValue-'+ id +'" type="text" /></p>'+ ' <div class="buttonHolder">'+ ' <a href="#" id="addButton-'+ id +'" class="button icon iconAdd disabledButton'; if(options.showIconOnly) html += ' iconOnly'; html += '">'+ ' <span>'+ options.addLabel +'</span>'+ ' </a>'+ ' </div>'+ ' </div>'+ ' <div id="elementList-'+ id +'" class="tagList">'+ ' </div>'+ '</div>'; // hide current element $(this).css('visibility', 'hidden') .css('position', 'absolute') .css('top', '-9000px') .css('left', '-9000px') .attr('tabindex', '-1'); // prepend html $(this).before(html); // add elements list build(); // bind autocomplete if needed if(options.autoCompleteUrl != '') { $('#addValue-'+ id).autocomplete({ delay: 200, minLength: 2, source: function(request, response) { $.ajax({ url: options.autoCompleteUrl, type: 'GET', data: 'term=' + request.term, success: function(data, textStatus) { // init var var realData = []; // alert the user if(data.code != 200 && jsBackend.debug) { alert(data.message); } if(data.code == 200) { for(var i in data.data) realData.push({ label: data.data[i].name, value: data.data[i].name }); } // set response response(realData); } }); } }); } // bind keypress on value-field $('#addValue-'+ id).bind('keyup', function(evt) { blockSubmit = true; // grab code var code = evt.which; // enter of splitchar should add an element if(code == 13 || String.fromCharCode(code) == options.splitChar) { // prevent default behaviour evt.preventDefault(); evt.stopPropagation(); // add element add(); } // disable or enable button if($(this).val().replace(/^\s+|\s+$/g, '') == '') { blockSubmit = false; $('#addButton-'+ id).addClass('disabledButton'); } else $('#addButton-'+ id).removeClass('disabledButton'); }); // bind click on add-button $('#addButton-'+ id).bind('click', function(evt) { // dont submit evt.preventDefault(); evt.stopPropagation(); // add element add(); }); // bind click on delete-button $('.deleteButton-'+ id).live('click', function(evt) { // dont submit evt.preventDefault(); evt.stopPropagation(); // remove element remove($(this).attr('rel')); }); // add an element function add() { blockSubmit = false; // init some vars var value = $('#addValue-'+ id).val().replace(/^\s+|\s+$/g, ''); var inElements = false; // reset box $('#addValue-'+ id).val('').focus(); $('#addButton-'+ id).addClass('disabledButton'); // only add new element if it isn't empty if(value != '') { // already in elements? for(var i in elements) if(value == elements[i]) inElements = true; // only add if not already in elements if(!inElements) { // add elements elements.push(value); // set new value $('#'+ id).val(elements.join(options.splitChar)); // rebuild element list build(); } } } // build the list function build() { // init var var html = ''; // no items and message given? if(elements.length == 0 && options.emptyMessage != '') html = '<p class="helpTxt">'+ options.emptyMessage +'</p>'; // items available else { // start html html = '<ul>'; // loop elements for(var i in elements) { html += ' <li><span><strong>'+ elements[i] +'</strong>'+ ' <a href="#" class="deleteButton-'+ id +'" rel="'+ elements[i] +'" title="'+ options.removeLabel +'">'+ options.removeLabel +'</a></span>'+ ' </li>'; } // end html html += '</ul>'; } // set html $('#elementList-'+ id).html(html); } // get all items function get() { // get chunks var chunks = $('#'+ id).val().split(options.splitChar); var elements = []; // loop elements and trim them from spaces for(var i in chunks) { value = chunks[i].replace(/^\s+|\s+$/g,''); if(value != '') elements.push(value) } return elements; } // remove an item function remove(value) { // get index for element var index = elements.indexOf(value); // remove element if(index > -1) elements.splice(index, 1); // set new value $('#'+ id).val(elements.join(options.splitChar)); // rebuild element list build(); } }); };})(jQuery); |
html += '</ul>'; | (function($) { $.fn.tagBox = function(options) { // define defaults var defaults = { splitChar: ',', emptyMessage: '', addLabel: 'add', removeLabel: 'delete', autoCompleteUrl: '', canAddNew: false, showIconOnly: true }; // extend options var options = $.extend(defaults, options); // loop all elements return this.each(function() { // define some vars var id = $(this).attr('id'); var elements = get(); var blockSubmit = false; // bind submit $(this.form).submit(function() { return !blockSubmit; }) // build replace html var html = '<div class="tagsWrapper">'+ ' <div class="oneLiner">'+ ' <p><input class="inputText dontSubmit" id="addValue-'+ id +'" name="addValue-'+ id +'" type="text" /></p>'+ ' <div class="buttonHolder">'+ ' <a href="#" id="addButton-'+ id +'" class="button icon iconAdd disabledButton'; if(options.showIconOnly) html += ' iconOnly'; html += '">'+ ' <span>'+ options.addLabel +'</span>'+ ' </a>'+ ' </div>'+ ' </div>'+ ' <div id="elementList-'+ id +'" class="tagList">'+ ' </div>'+ '</div>'; // hide current element $(this).css('visibility', 'hidden') .css('position', 'absolute') .css('top', '-9000px') .css('left', '-9000px') .attr('tabindex', '-1'); // prepend html $(this).before(html); // add elements list build(); // bind autocomplete if needed if(options.autoCompleteUrl != '') { $('#addValue-'+ id).autocomplete({ delay: 200, minLength: 2, source: function(request, response) { $.ajax({ url: options.autoCompleteUrl, type: 'GET', data: 'term=' + request.term, success: function(data, textStatus) { // init var var realData = []; // alert the user if(data.code != 200 && jsBackend.debug) { alert(data.message); } if(data.code == 200) { for(var i in data.data) realData.push({ label: data.data[i].name, value: data.data[i].name }); } // set response response(realData); } }); } }); } // bind keypress on value-field $('#addValue-'+ id).bind('keyup', function(evt) { blockSubmit = true; // grab code var code = evt.which; // enter of splitchar should add an element if(code == 13 || String.fromCharCode(code) == options.splitChar) { // prevent default behaviour evt.preventDefault(); evt.stopPropagation(); // add element add(); } // disable or enable button if($(this).val().replace(/^\s+|\s+$/g, '') == '') { blockSubmit = false; $('#addButton-'+ id).addClass('disabledButton'); } else $('#addButton-'+ id).removeClass('disabledButton'); }); // bind click on add-button $('#addButton-'+ id).bind('click', function(evt) { // dont submit evt.preventDefault(); evt.stopPropagation(); // add element add(); }); // bind click on delete-button $('.deleteButton-'+ id).live('click', function(evt) { // dont submit evt.preventDefault(); evt.stopPropagation(); // remove element remove($(this).attr('rel')); }); // add an element function add() { blockSubmit = false; // init some vars var value = $('#addValue-'+ id).val().replace(/^\s+|\s+$/g, ''); var inElements = false; // reset box $('#addValue-'+ id).val('').focus(); $('#addButton-'+ id).addClass('disabledButton'); // only add new element if it isn't empty if(value != '') { // already in elements? for(var i in elements) if(value == elements[i]) inElements = true; // only add if not already in elements if(!inElements) { // add elements elements.push(value); // set new value $('#'+ id).val(elements.join(options.splitChar)); // rebuild element list build(); } } } // build the list function build() { // init var var html = ''; // no items and message given? if(elements.length == 0 && options.emptyMessage != '') html = '<p class="helpTxt">'+ options.emptyMessage +'</p>'; // items available else { // start html html = '<ul>'; // loop elements for(var i in elements) { html += ' <li><span><strong>'+ elements[i] +'</strong>'+ ' <a href="#" class="deleteButton-'+ id +'" rel="'+ elements[i] +'" title="'+ options.removeLabel +'">'+ options.removeLabel +'</a></span>'+ ' </li>'; } // end html html += '</ul>'; } // set html $('#elementList-'+ id).html(html); } // get all items function get() { // get chunks var chunks = $('#'+ id).val().split(options.splitChar); var elements = []; // loop elements and trim them from spaces for(var i in chunks) { value = chunks[i].replace(/^\s+|\s+$/g,''); if(value != '') elements.push(value) } return elements; } // remove an item function remove(value) { // get index for element var index = elements.indexOf(value); // remove element if(index > -1) elements.splice(index, 1); // set new value $('#'+ id).val(elements.join(options.splitChar)); // rebuild element list build(); } }); };})(jQuery); |
|
$('#elementList-'+ id).html(html); } function get() { var chunks = $('#'+ id).val().split(options.splitChar); var elements = []; for(var i in chunks) { value = chunks[i].replace(/^\s+|\s+$/g,''); if(value != '') elements.push(value) | if(!$('#metaDescriptionOverwrite').is(':checked')) { $('#metaDescription').val(title); | (function($) { $.fn.tagBox = function(options) { // define defaults var defaults = { splitChar: ',', emptyMessage: '', addLabel: 'add', removeLabel: 'delete', autoCompleteUrl: '', canAddNew: false, showIconOnly: true }; // extend options var options = $.extend(defaults, options); // loop all elements return this.each(function() { // define some vars var id = $(this).attr('id'); var elements = get(); var blockSubmit = false; // bind submit $(this.form).submit(function() { return !blockSubmit; }) // build replace html var html = '<div class="tagsWrapper">'+ ' <div class="oneLiner">'+ ' <p><input class="inputText dontSubmit" id="addValue-'+ id +'" name="addValue-'+ id +'" type="text" /></p>'+ ' <div class="buttonHolder">'+ ' <a href="#" id="addButton-'+ id +'" class="button icon iconAdd disabledButton'; if(options.showIconOnly) html += ' iconOnly'; html += '">'+ ' <span>'+ options.addLabel +'</span>'+ ' </a>'+ ' </div>'+ ' </div>'+ ' <div id="elementList-'+ id +'" class="tagList">'+ ' </div>'+ '</div>'; // hide current element $(this).css('visibility', 'hidden') .css('position', 'absolute') .css('top', '-9000px') .css('left', '-9000px') .attr('tabindex', '-1'); // prepend html $(this).before(html); // add elements list build(); // bind autocomplete if needed if(options.autoCompleteUrl != '') { $('#addValue-'+ id).autocomplete({ delay: 200, minLength: 2, source: function(request, response) { $.ajax({ url: options.autoCompleteUrl, type: 'GET', data: 'term=' + request.term, success: function(data, textStatus) { // init var var realData = []; // alert the user if(data.code != 200 && jsBackend.debug) { alert(data.message); } if(data.code == 200) { for(var i in data.data) realData.push({ label: data.data[i].name, value: data.data[i].name }); } // set response response(realData); } }); } }); } // bind keypress on value-field $('#addValue-'+ id).bind('keyup', function(evt) { blockSubmit = true; // grab code var code = evt.which; // enter of splitchar should add an element if(code == 13 || String.fromCharCode(code) == options.splitChar) { // prevent default behaviour evt.preventDefault(); evt.stopPropagation(); // add element add(); } // disable or enable button if($(this).val().replace(/^\s+|\s+$/g, '') == '') { blockSubmit = false; $('#addButton-'+ id).addClass('disabledButton'); } else $('#addButton-'+ id).removeClass('disabledButton'); }); // bind click on add-button $('#addButton-'+ id).bind('click', function(evt) { // dont submit evt.preventDefault(); evt.stopPropagation(); // add element add(); }); // bind click on delete-button $('.deleteButton-'+ id).live('click', function(evt) { // dont submit evt.preventDefault(); evt.stopPropagation(); // remove element remove($(this).attr('rel')); }); // add an element function add() { blockSubmit = false; // init some vars var value = $('#addValue-'+ id).val().replace(/^\s+|\s+$/g, ''); var inElements = false; // reset box $('#addValue-'+ id).val('').focus(); $('#addButton-'+ id).addClass('disabledButton'); // only add new element if it isn't empty if(value != '') { // already in elements? for(var i in elements) if(value == elements[i]) inElements = true; // only add if not already in elements if(!inElements) { // add elements elements.push(value); // set new value $('#'+ id).val(elements.join(options.splitChar)); // rebuild element list build(); } } } // build the list function build() { // init var var html = ''; // no items and message given? if(elements.length == 0 && options.emptyMessage != '') html = '<p class="helpTxt">'+ options.emptyMessage +'</p>'; // items available else { // start html html = '<ul>'; // loop elements for(var i in elements) { html += ' <li><span><strong>'+ elements[i] +'</strong>'+ ' <a href="#" class="deleteButton-'+ id +'" rel="'+ elements[i] +'" title="'+ options.removeLabel +'">'+ options.removeLabel +'</a></span>'+ ' </li>'; } // end html html += '</ul>'; } // set html $('#elementList-'+ id).html(html); } // get all items function get() { // get chunks var chunks = $('#'+ id).val().split(options.splitChar); var elements = []; // loop elements and trim them from spaces for(var i in chunks) { value = chunks[i].replace(/^\s+|\s+$/g,''); if(value != '') elements.push(value) } return elements; } // remove an item function remove(value) { // get index for element var index = elements.indexOf(value); // remove element if(index > -1) elements.splice(index, 1); // set new value $('#'+ id).val(elements.join(options.splitChar)); // rebuild element list build(); } }); };})(jQuery); |
return elements; } function remove(value) { var index = elements.indexOf(value); if(index > -1) elements.splice(index, 1); $('#'+ id).val(elements.join(options.splitChar)); build(); | if(!$('#metaKeywordsOverwrite').is(':checked')) { $('#metaKeywords').val(title); } if(!$('#urlOverwrite').is(':checked')) { $('#url').val(utils.string.urlise(title)); $('#generatedUrl').html(utils.string.urlise(title)); } | (function($) { $.fn.tagBox = function(options) { // define defaults var defaults = { splitChar: ',', emptyMessage: '', addLabel: 'add', removeLabel: 'delete', autoCompleteUrl: '', canAddNew: false, showIconOnly: true }; // extend options var options = $.extend(defaults, options); // loop all elements return this.each(function() { // define some vars var id = $(this).attr('id'); var elements = get(); var blockSubmit = false; // bind submit $(this.form).submit(function() { return !blockSubmit; }) // build replace html var html = '<div class="tagsWrapper">'+ ' <div class="oneLiner">'+ ' <p><input class="inputText dontSubmit" id="addValue-'+ id +'" name="addValue-'+ id +'" type="text" /></p>'+ ' <div class="buttonHolder">'+ ' <a href="#" id="addButton-'+ id +'" class="button icon iconAdd disabledButton'; if(options.showIconOnly) html += ' iconOnly'; html += '">'+ ' <span>'+ options.addLabel +'</span>'+ ' </a>'+ ' </div>'+ ' </div>'+ ' <div id="elementList-'+ id +'" class="tagList">'+ ' </div>'+ '</div>'; // hide current element $(this).css('visibility', 'hidden') .css('position', 'absolute') .css('top', '-9000px') .css('left', '-9000px') .attr('tabindex', '-1'); // prepend html $(this).before(html); // add elements list build(); // bind autocomplete if needed if(options.autoCompleteUrl != '') { $('#addValue-'+ id).autocomplete({ delay: 200, minLength: 2, source: function(request, response) { $.ajax({ url: options.autoCompleteUrl, type: 'GET', data: 'term=' + request.term, success: function(data, textStatus) { // init var var realData = []; // alert the user if(data.code != 200 && jsBackend.debug) { alert(data.message); } if(data.code == 200) { for(var i in data.data) realData.push({ label: data.data[i].name, value: data.data[i].name }); } // set response response(realData); } }); } }); } // bind keypress on value-field $('#addValue-'+ id).bind('keyup', function(evt) { blockSubmit = true; // grab code var code = evt.which; // enter of splitchar should add an element if(code == 13 || String.fromCharCode(code) == options.splitChar) { // prevent default behaviour evt.preventDefault(); evt.stopPropagation(); // add element add(); } // disable or enable button if($(this).val().replace(/^\s+|\s+$/g, '') == '') { blockSubmit = false; $('#addButton-'+ id).addClass('disabledButton'); } else $('#addButton-'+ id).removeClass('disabledButton'); }); // bind click on add-button $('#addButton-'+ id).bind('click', function(evt) { // dont submit evt.preventDefault(); evt.stopPropagation(); // add element add(); }); // bind click on delete-button $('.deleteButton-'+ id).live('click', function(evt) { // dont submit evt.preventDefault(); evt.stopPropagation(); // remove element remove($(this).attr('rel')); }); // add an element function add() { blockSubmit = false; // init some vars var value = $('#addValue-'+ id).val().replace(/^\s+|\s+$/g, ''); var inElements = false; // reset box $('#addValue-'+ id).val('').focus(); $('#addButton-'+ id).addClass('disabledButton'); // only add new element if it isn't empty if(value != '') { // already in elements? for(var i in elements) if(value == elements[i]) inElements = true; // only add if not already in elements if(!inElements) { // add elements elements.push(value); // set new value $('#'+ id).val(elements.join(options.splitChar)); // rebuild element list build(); } } } // build the list function build() { // init var var html = ''; // no items and message given? if(elements.length == 0 && options.emptyMessage != '') html = '<p class="helpTxt">'+ options.emptyMessage +'</p>'; // items available else { // start html html = '<ul>'; // loop elements for(var i in elements) { html += ' <li><span><strong>'+ elements[i] +'</strong>'+ ' <a href="#" class="deleteButton-'+ id +'" rel="'+ elements[i] +'" title="'+ options.removeLabel +'">'+ options.removeLabel +'</a></span>'+ ' </li>'; } // end html html += '</ul>'; } // set html $('#elementList-'+ id).html(html); } // get all items function get() { // get chunks var chunks = $('#'+ id).val().split(options.splitChar); var elements = []; // loop elements and trim them from spaces for(var i in chunks) { value = chunks[i].replace(/^\s+|\s+$/g,''); if(value != '') elements.push(value) } return elements; } // remove an item function remove(value) { // get index for element var index = elements.indexOf(value); // remove element if(index > -1) elements.splice(index, 1); // set new value $('#'+ id).val(elements.join(options.splitChar)); // rebuild element list build(); } }); };})(jQuery); |
function (args) { liberator.assert(!options['private'], "Cannot sanitize items in private mode"); let timespan = args["-timespan"] || options["sanitizetimespan"]; sanitizer.range = Sanitizer.getClearRange(timespan); sanitizer.ignoreTimespan = !sanitizer.range; if (args.bang) { liberator.assert(args.length == 0, "E488: Trailing characters"); liberator.log("Sanitizing all items in 'sanitizeitems'..."); let errors = sanitizer.sanitize(); if (errors) { for (let item in errors) liberator.echoerr("Error sanitizing " + item + ": " + errors[item]); } } else { liberator.assert(args.length > 0, "E471: Argument required"); for (let [, item] in Iterator(args.map(Sanitizer.argToPref))) { liberator.log("Sanitizing " + item + " items..."); if (sanitizer.canClearItem(item)) { try { sanitizer.items[item].range = sanitizer.range; sanitizer.clearItem(item); } catch (e) { liberator.echoerr("Error sanitizing " + item + ": " + e); } } else liberator.echomsg("Cannot sanitize " + item); } } }, | argToPref: function (arg) ["commandLine", "offlineApps", "siteSettings"].filter(function (pref) pref.toLowerCase() == arg)[0] || arg, | function (args) { liberator.assert(!options['private'], "Cannot sanitize items in private mode"); let timespan = args["-timespan"] || options["sanitizetimespan"]; sanitizer.range = Sanitizer.getClearRange(timespan); sanitizer.ignoreTimespan = !sanitizer.range; if (args.bang) { liberator.assert(args.length == 0, "E488: Trailing characters"); liberator.log("Sanitizing all items in 'sanitizeitems'..."); let errors = sanitizer.sanitize(); if (errors) { for (let item in errors) liberator.echoerr("Error sanitizing " + item + ": " + errors[item]); } } else { liberator.assert(args.length > 0, "E471: Argument required"); for (let [, item] in Iterator(args.map(Sanitizer.argToPref))) { liberator.log("Sanitizing " + item + " items..."); if (sanitizer.canClearItem(item)) { try { sanitizer.items[item].range = sanitizer.range; sanitizer.clearItem(item); } catch (e) { liberator.echoerr("Error sanitizing " + item + ": " + e); } } else liberator.echomsg("Cannot sanitize " + item); } } }, |
WT_DECLARE_WT_MEMBER(1,"WSuggestionPopup",function(q,d,y,z,r){function m(a){return $(a).hasClass("Wt-suggest-onedit")||$(a).hasClass("Wt-suggest-dropdown")}function s(){return d.style.display!="none"}function k(){d.style.display="none"}function A(a){c.positionAtWidget(d.id,a.id,c.Vertical)}function B(a){a=a||window.event;a=a.target||a.srcElement;if(a.className!="content"){for(;a&&!c.hasTag(a,"DIV");)a=a.parentNode;a&&t(a)}}function t(a){var b=a.firstChild,h=c.getElement(f),e=b.innerHTML;b=b.getAttribute("sug"); h.focus();q.emit(d,"select",a.id,h.id);y(h,e,b);k();f=null}function C(a,b){for(a=b?a.nextSibling:a.previousSibling;a;a=b?a.nextSibling:a.previousSibling)if(c.hasTag(a,"DIV"))if(a.style.display!="none")return a;return null}$(".Wt-domRoot").add(d);jQuery.data(d,"obj",this);var n=this,c=q.WT,l=null,f=null,u=false,v=null,w=null,o=null;this.showPopup=function(){d.style.display="";l=null};this.editMouseMove=function(a,b){if(m(a))a.style.cursor=c.widgetCoordinates(a,b).x>a.offsetWidth-16?"default":""};this.editClick= function(a,b){if(m(a))if(c.widgetCoordinates(a,b).x>a.offsetWidth-16)if(f!=a.id){k();f=a.id;n.refilter()}else{f=null;k()}};this.editKeyDown=function(a,b){if(!m(a))return true;if(f!=a.id)if($(a).hasClass("Wt-suggest-onedit"))f=a.id;else if($(a).hasClass("Wt-suggest-dropdown")&&b.keyCode==40)f=a.id;else{f=null;return true}var h=l?c.getElement(l):null;if(s()&&h)if(b.keyCode==13||b.keyCode==9){t(h);c.cancelEvent(b);setTimeout(function(){a.focus()},0);return false}else if(b.keyCode==40||b.keyCode==38|| b.keyCode==34||b.keyCode==33){if(b.type.toUpperCase()=="KEYDOWN"){u=true;c.cancelEvent(b,c.CancelDefaultAction)}if(b.type.toUpperCase()=="KEYPRESS"&&u==true){c.cancelEvent(b);return false}var e=h,p=b.keyCode==40||b.keyCode==34;b=b.keyCode==34||b.keyCode==33?d.clientHeight/h.offsetHeight:1;var j;for(j=0;e&&j<b;++j){var g=C(e,p);if(!g)break;e=g}if(e&&c.hasTag(e,"DIV")){h.className="";e.className="sel";l=e.id}return false}return b.keyCode!=13&&b.keyCode!=9};this.filtered=function(a){v=a;n.refilter()}; this.refilter=function(){var a=l?c.getElement(l):null,b=c.getElement(f),h=z(b),e=!$(b).hasClass("Wt-suggest-dropdown"),p=d.lastChild.childNodes,j=h(null);if(r)if(e&&j.length<r){k();return}else{var g=j.substring(0,r);if(g!=v){if(g!=w){w=g;q.emit(d,"filter",g)}if(e){k();return}}}g=null;e=!e&&j.length==0;for(j=0;j<p.length;j++){var i=p[j];if(c.hasTag(i,"DIV")){if(i.orig==null)i.orig=i.firstChild.innerHTML;else i.firstChild.innerHTML=i.orig;var x=h(i.firstChild.innerHTML),D=e||x.match;i.firstChild.innerHTML= x.suggestion;if(D){i.style.display="";if(g==null)g=i}else i.style.display="none";i.className=""}}if(g==null)k();else{if(!s()){A(b);n.showPopup();a=null}if(!a||a.style.display=="none"){l=g.id;a=g;a.parentNode.scrollTop=0}a.className="sel";b=a.parentNode;if(a.offsetTop+a.offsetHeight>b.scrollTop+b.clientHeight)b.scrollTop=a.offsetTop+a.offsetHeight-b.clientHeight;else if(a.offsetTop<b.scrollTop)b.scrollTop=a.offsetTop}};this.editKeyUp=function(a,b){if(f!=null)if(m(a))if(!((b.keyCode==13||b.keyCode== 9)&&d.style.display=="none"))if(b.keyCode==27||b.keyCode==37||b.keyCode==39){d.style.display="none";if(b.keyCode==27){f=null;$(a).hasClass("Wt-suggest-dropdown")?k():a.blur()}}else n.refilter()};d.lastChild.onclick=B;d.lastChild.onscroll=function(){if(o){clearTimeout(o);var a=c.getElement(f);a&&a.focus()}};this.delayHide=function(a){o=setTimeout(function(){o=null;if(d&&(a==null||f==a.id))k()},300)}}); | WT_DECLARE_WT_MEMBER(1,"WSuggestionPopup",function(q,d,A,B,r){function m(a){return $(a).hasClass("Wt-suggest-onedit")||$(a).hasClass("Wt-suggest-dropdown")}function t(){return d.style.display!="none"}function l(){d.style.display="none"}function C(a){c.positionAtWidget(d.id,a.id,c.Vertical)}function D(a){a=a||window.event;a=a.target||a.srcElement;if(a.className!="content"){for(;a&&!c.hasTag(a,"DIV");)a=a.parentNode;a&&u(a)}}function u(a){var b=a.firstChild,h=c.getElement(f),e=b.innerHTML;b=b.getAttribute("sug"); h.focus();q.emit(d,"select",a.id,h.id);A(h,e,b);l();f=null}function E(a,b){for(a=b?a.nextSibling:a.previousSibling;a;a=b?a.nextSibling:a.previousSibling)if(c.hasTag(a,"DIV"))if(a.style.display!="none")return a;return null}function v(a){var b=a.parentNode;if(a.offsetTop+a.offsetHeight>b.scrollTop+b.clientHeight)b.scrollTop=a.offsetTop+a.offsetHeight-b.clientHeight;else if(a.offsetTop<b.scrollTop)b.scrollTop=a.offsetTop}$(".Wt-domRoot").add(d);jQuery.data(d,"obj",this);var n=this,c=q.WT,k=null,f=null, w=false,x=null,y=null,o=null,s=null;this.showPopup=function(){d.style.display="";s=k=null};this.editMouseMove=function(a,b){if(m(a))a.style.cursor=c.widgetCoordinates(a,b).x>a.offsetWidth-16?"default":""};this.editClick=function(a,b){if(m(a))if(c.widgetCoordinates(a,b).x>a.offsetWidth-16)if(f!=a.id){l();f=a.id;n.refilter()}else{f=null;l()}};this.editKeyDown=function(a,b){if(!m(a))return true;if(f!=a.id)if($(a).hasClass("Wt-suggest-onedit"))f=a.id;else if($(a).hasClass("Wt-suggest-dropdown")&&b.keyCode== 40)f=a.id;else{f=null;return true}var h=k?c.getElement(k):null;if(t()&&h)if(b.keyCode==13||b.keyCode==9){u(h);c.cancelEvent(b);setTimeout(function(){a.focus()},0);return false}else if(b.keyCode==40||b.keyCode==38||b.keyCode==34||b.keyCode==33){if(b.type.toUpperCase()=="KEYDOWN"){w=true;c.cancelEvent(b,c.CancelDefaultAction)}if(b.type.toUpperCase()=="KEYPRESS"&&w==true){c.cancelEvent(b);return false}var e=h,p=b.keyCode==40||b.keyCode==34;b=b.keyCode==34||b.keyCode==33?d.clientHeight/h.offsetHeight: 1;var j;for(j=0;e&&j<b;++j){var g=E(e,p);if(!g)break;e=g}if(e&&c.hasTag(e,"DIV")){h.className="";e.className="sel";k=e.id}return false}return b.keyCode!=13&&b.keyCode!=9};this.filtered=function(a){x=a;n.refilter()};this.refilter=function(){var a=k?c.getElement(k):null,b=c.getElement(f),h=B(b),e=!$(b).hasClass("Wt-suggest-dropdown"),p=d.lastChild.childNodes,j=h(null);s=b.value;if(r)if(e&&j.length<r){l();return}else{var g=j.substring(0,r);if(g!=x){if(g!=y){y=g;q.emit(d,"filter",g)}if(e){l();return}}}g= null;e=!e&&j.length==0;for(j=0;j<p.length;j++){var i=p[j];if(c.hasTag(i,"DIV")){if(i.orig==null)i.orig=i.firstChild.innerHTML;else i.firstChild.innerHTML=i.orig;var z=h(i.firstChild.innerHTML),F=e||z.match;i.firstChild.innerHTML=z.suggestion;if(F){i.style.display="";if(g==null)g=i}else i.style.display="none";i.className=""}}if(g==null)l();else{if(!t()){C(b);n.showPopup();a=null}if(!a||a.style.display=="none"){k=g.id;a=g;a.parentNode.scrollTop=0}a.className="sel";v(a)}};this.editKeyUp=function(a,b){if(f!= null)if(m(a))if(!((b.keyCode==13||b.keyCode==9)&&d.style.display=="none"))if(b.keyCode==27||b.keyCode==37||b.keyCode==39){d.style.display="none";if(b.keyCode==27){f=null;$(a).hasClass("Wt-suggest-dropdown")?l():a.blur()}}else if(a.value!=s)n.refilter();else(a=k?c.getElement(k):null)&&v(a)};d.lastChild.onclick=D;d.lastChild.onscroll=function(){if(o){clearTimeout(o);var a=c.getElement(f);a&&a.focus()}};this.delayHide=function(a){o=setTimeout(function(){o=null;if(d&&(a==null||f==a.id))l()},300)}}); | WT_DECLARE_WT_MEMBER(1,"WSuggestionPopup",function(q,d,y,z,r){function m(a){return $(a).hasClass("Wt-suggest-onedit")||$(a).hasClass("Wt-suggest-dropdown")}function s(){return d.style.display!="none"}function k(){d.style.display="none"}function A(a){c.positionAtWidget(d.id,a.id,c.Vertical)}function B(a){a=a||window.event;a=a.target||a.srcElement;if(a.className!="content"){for(;a&&!c.hasTag(a,"DIV");)a=a.parentNode;a&&t(a)}}function t(a){var b=a.firstChild,h=c.getElement(f),e=b.innerHTML;b=b.getAttribute("sug");h.focus();q.emit(d,"select",a.id,h.id);y(h,e,b);k();f=null}function C(a,b){for(a=b?a.nextSibling:a.previousSibling;a;a=b?a.nextSibling:a.previousSibling)if(c.hasTag(a,"DIV"))if(a.style.display!="none")return a;return null}$(".Wt-domRoot").add(d);jQuery.data(d,"obj",this);var n=this,c=q.WT,l=null,f=null,u=false,v=null,w=null,o=null;this.showPopup=function(){d.style.display="";l=null};this.editMouseMove=function(a,b){if(m(a))a.style.cursor=c.widgetCoordinates(a,b).x>a.offsetWidth-16?"default":""};this.editClick=function(a,b){if(m(a))if(c.widgetCoordinates(a,b).x>a.offsetWidth-16)if(f!=a.id){k();f=a.id;n.refilter()}else{f=null;k()}};this.editKeyDown=function(a,b){if(!m(a))return true;if(f!=a.id)if($(a).hasClass("Wt-suggest-onedit"))f=a.id;else if($(a).hasClass("Wt-suggest-dropdown")&&b.keyCode==40)f=a.id;else{f=null;return true}var h=l?c.getElement(l):null;if(s()&&h)if(b.keyCode==13||b.keyCode==9){t(h);c.cancelEvent(b);setTimeout(function(){a.focus()},0);return false}else if(b.keyCode==40||b.keyCode==38||b.keyCode==34||b.keyCode==33){if(b.type.toUpperCase()=="KEYDOWN"){u=true;c.cancelEvent(b,c.CancelDefaultAction)}if(b.type.toUpperCase()=="KEYPRESS"&&u==true){c.cancelEvent(b);return false}var e=h,p=b.keyCode==40||b.keyCode==34;b=b.keyCode==34||b.keyCode==33?d.clientHeight/h.offsetHeight:1;var j;for(j=0;e&&j<b;++j){var g=C(e,p);if(!g)break;e=g}if(e&&c.hasTag(e,"DIV")){h.className="";e.className="sel";l=e.id}return false}return b.keyCode!=13&&b.keyCode!=9};this.filtered=function(a){v=a;n.refilter()};this.refilter=function(){var a=l?c.getElement(l):null,b=c.getElement(f),h=z(b),e=!$(b).hasClass("Wt-suggest-dropdown"),p=d.lastChild.childNodes,j=h(null);if(r)if(e&&j.length<r){k();return}else{var g=j.substring(0,r);if(g!=v){if(g!=w){w=g;q.emit(d,"filter",g)}if(e){k();return}}}g=null;e=!e&&j.length==0;for(j=0;j<p.length;j++){var i=p[j];if(c.hasTag(i,"DIV")){if(i.orig==null)i.orig=i.firstChild.innerHTML;else i.firstChild.innerHTML=i.orig;var x=h(i.firstChild.innerHTML),D=e||x.match;i.firstChild.innerHTML=x.suggestion;if(D){i.style.display="";if(g==null)g=i}else i.style.display="none";i.className=""}}if(g==null)k();else{if(!s()){A(b);n.showPopup();a=null}if(!a||a.style.display=="none"){l=g.id;a=g;a.parentNode.scrollTop=0}a.className="sel";b=a.parentNode;if(a.offsetTop+a.offsetHeight>b.scrollTop+b.clientHeight)b.scrollTop=a.offsetTop+a.offsetHeight-b.clientHeight;else if(a.offsetTop<b.scrollTop)b.scrollTop=a.offsetTop}};this.editKeyUp=function(a,b){if(f!=null)if(m(a))if(!((b.keyCode==13||b.keyCode==9)&&d.style.display=="none"))if(b.keyCode==27||b.keyCode==37||b.keyCode==39){d.style.display="none";if(b.keyCode==27){f=null;$(a).hasClass("Wt-suggest-dropdown")?k():a.blur()}}else n.refilter()};d.lastChild.onclick=B;d.lastChild.onscroll=function(){if(o){clearTimeout(o);var a=c.getElement(f);a&&a.focus()}};this.delayHide=function(a){o=setTimeout(function(){o=null;if(d&&(a==null||f==a.id))k()},300)}}); |
var _$_WT_CLASS_$_=new (function(){function w(a,b){return a.style[b]?a.style[b]:document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(a,null)[b]:a.currentStyle?a.currentStyle[b]:null}function t(a){if(B==null)return null;if(!a)a=window.event;if(a){for(var b=a=g.target(a);b&&b!=B;)b=b.parentNode;return b==B?g.isIE?a:null:B}else return B}function D(a){var b=t(a);if(b&&!S){if(!a)a=window.event;S=true;if(g.isIE){g.firedTarget=a.srcElement||b;b.fireEvent("onmousemove", a);g.firedTarget=null}else g.condCall(b,"onmousemove",a);return S=false}else return true}function T(a){var b=t(a);g.capture(null);if(b){if(!a)a=window.event;if(g.isIE){g.firedTarget=a.srcElement||b;b.fireEvent("onmouseup",a);g.firedTarget=null}else g.condCall(b,"onmouseup",a);g.cancelEvent(a,g.CancelPropagate);return false}else return true}function ca(){if(!Y){Y=true;if(document.body.addEventListener){var a=document.body;a.addEventListener("mousemove",D,true);a.addEventListener("mouseup",T,true); | var _$_WT_CLASS_$_=new (function(){function x(a,b){return a.style[b]?a.style[b]:document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(a,null)[b]:a.currentStyle?a.currentStyle[b]:null}function u(a){if(B==null)return null;if(!a)a=window.event;if(a){for(var b=a=g.target(a);b&&b!=B;)b=b.parentNode;return b==B?g.isIE?a:null:B}else return B}function D(a){var b=u(a);if(b&&!S){if(!a)a=window.event;S=true;if(g.isIE){g.firedTarget=a.srcElement||b;b.fireEvent("onmousemove", a);g.firedTarget=null}else g.condCall(b,"onmousemove",a);return S=false}else return true}function T(a){var b=u(a);g.capture(null);if(b){if(!a)a=window.event;if(g.isIE){g.firedTarget=a.srcElement||b;b.fireEvent("onmouseup",a);g.firedTarget=null}else g.condCall(b,"onmouseup",a);g.cancelEvent(a,g.CancelPropagate);return false}else return true}function ca(){if(!U){U=true;if(document.body.addEventListener){var a=document.body;a.addEventListener("mousemove",D,true);a.addEventListener("mouseup",T,true); | var _$_WT_CLASS_$_=new (function(){function w(a,b){return a.style[b]?a.style[b]:document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(a,null)[b]:a.currentStyle?a.currentStyle[b]:null}function t(a){if(B==null)return null;if(!a)a=window.event;if(a){for(var b=a=g.target(a);b&&b!=B;)b=b.parentNode;return b==B?g.isIE?a:null:B}else return B}function D(a){var b=t(a);if(b&&!S){if(!a)a=window.event;S=true;if(g.isIE){g.firedTarget=a.srcElement||b;b.fireEvent("onmousemove",a);g.firedTarget=null}else g.condCall(b,"onmousemove",a);return S=false}else return true}function T(a){var b=t(a);g.capture(null);if(b){if(!a)a=window.event;if(g.isIE){g.firedTarget=a.srcElement||b;b.fireEvent("onmouseup",a);g.firedTarget=null}else g.condCall(b,"onmouseup",a);g.cancelEvent(a,g.CancelPropagate);return false}else return true}function ca(){if(!Y){Y=true;if(document.body.addEventListener){var a=document.body;a.addEventListener("mousemove",D,true);a.addEventListener("mouseup",T,true);g.isGecko&&window.addEventListener("mouseout",function(b){!b.relatedTarget&&g.hasTag(b.target,"HTML")&&T(b)},true)}else{a=document.body;a.attachEvent("onmousemove",D);a.attachEvent("onmouseup",T)}}}var g=this;this.buttons=0;this.mouseDown=function(a){g.buttons|=g.button(a)};this.mouseUp=function(a){g.buttons^=g.button(a)};this.arrayRemove=function(a,b,f){f=a.slice((f||b)+1||a.length);a.length=b<0?a.length+b:b;return a.push.apply(a,f)};this.isIE6=(this.isIE=navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1)&&navigator.userAgent.toLowerCase().indexOf("msie 6")!=-1;this.isGecko=navigator.userAgent.toLowerCase().indexOf("gecko")!=-1;this.isIEMobile=navigator.userAgent.toLowerCase().indexOf("msie 4")!=-1||navigator.userAgent.toLowerCase().indexOf("msie 5")!=-1;this.isOpera=typeof window.opera!=="undefined";this.updateDelay=this.isIE?10:51;this.setHtml=function(a,b,f){function k(o,E){var u,s,z;switch(o.nodeType){case 1:u=o.namespaceURI==null?document.createElement(o.nodeName):document.createElementNS(o.namespaceURI,o.nodeName);if(o.attributes&&o.attributes.length>0){s=0;for(z=o.attributes.length;s<z;)u.setAttribute(o.attributes[s].nodeName,o.getAttribute(o.attributes[s++].nodeName))}if(E&&o.childNodes.length>0){s=0;for(z=o.childNodes.length;s<z;){var x=k(o.childNodes[s++],E);x&&u.appendChild(x)}}return u;case 3:case 4:case 5:return document.createTextNode(o.nodeValue)}return null}if(g.isIE||_$_INNER_HTML_$_&&!f)if(f)a.innerHTML+=b;else a.innerHTML=b;else{var h;h=new DOMParser;h=h.parseFromString("<div>"+b+"</div>","application/xhtml+xml").documentElement;if(h.nodeType!=1)h=h.nextSibling;if(!f)a.innerHTML="";b=0;for(f=h.childNodes.length;b<f;)a.appendChild(k(h.childNodes[b++],true))}};this.hasTag=function(a,b){return a.nodeType==1&&a.tagName.toUpperCase()===b};this.insertAt=function(a,b,f){a.childNodes.length==0?a.appendChild(b):a.insertBefore(b,a.childNodes[f])};this.remove=function(a){(a=g.getElement(a))&&a.parentNode.removeChild(a)};this.unstub=function(a,b,f){if(f==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8);g.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(g.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var f,k;f=0;for(k=a.attributes.length;f<k;f++){var h=a.attributes[f].nodeName;h!="type"&&h!="name"&&b.setAttribute(h,a.getAttribute(h))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?g.CancelAll:b;if(b&g.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&g.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;try{document.activeElement&&document.activeElement.blur&&g.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}catch(f){}}};this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(k){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,k;if(g.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}k=a.offsetParent;if(k==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=k)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:f}};this.windowCoordinates=function(a){a=g.pageCoordinates(a);return{x:a.x-document.body.scrollLeft-document.documentElement.scrollLeft,y:a.y-document.body.scrollTop-document.documentElement.scrollTop}};this.scrollIntoView=function(a){(a=document.getElementById(a))&&a.scrollIntoView&&a.scrollIntoView(true)};this.getSelectionRange=function(a){if(document.selection)if(g.hasTag(a,"TEXTAREA")){var b=document.selection.createRange(),f=b.duplicate();f.moveToElementText(a);var k=0;if(b.text.length>1){k-=b.text.length;if(k<0)k=0}a=-1+k;for(f.moveStart("character",k);f.inRange(b);){f.moveStart("character");a++}b=b.text.replace(/\r/g,"");return{start:a,end:b.length+a}}else{f=$(a).val();a=document.selection.createRange().duplicate();a.moveEnd("character",f.length);b=a.text==""?f.length:f.lastIndexOf(a.text);a=document.selection.createRange().duplicate();a.moveStart("character",-f.length);return{start:b,end:a.text.length}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,f){var k=$(a).val();if(typeof b!="number")b=-1;if(typeof f!="number")f=-1;if(b<0)b=0;if(f>k.length)f=k.length;if(f<b)f=b;if(b>f)b=f;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=f}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",f-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};var Z=/^-?\d+(?:px)?$/i;this.px=function(a,b){a=w(a,b);if(a=="auto"||a==null)return 0;return Z.test(a)?parseFloat(a):0};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?g.isHidden(a):false}};this.pxself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.pctself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.IEwidth=function(a,b,f){if(a.parentNode){var k=a.parentNode.clientWidth-g.px(a,"marginLeft")-g.px(a,"marginRight")-g.px(a,"borderLeftWidth")-g.px(a,"borderRightWidth")-g.px(a.parentNode,"paddingLeft")-g.px(a.parentNode,"paddingRight"),h=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(b);b=(h=h&&h.length==2?h[1]:"0")?parseFloat(h):0;f=(h=(h=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(f))&&h.length==2?h[1]:"100000")?parseFloat(h):1E5;return k<b?b-1:k>f?f+1:a.style.styleFloat!=""?b-1:"auto"}else return"auto"};this.hide=function(a){g.getElement(a).style.display="none"};this.inline=function(a){g.getElement(a).style.display="inline"};this.block=function(a){g.getElement(a).style.display="block"};this.show=function(a){g.getElement(a).style.display=""};var B=null;this.firedTarget=null;this.target=function(a){return g.firedTarget||a.target||a.srcElement};var S=false,Y=false;this.capture=function(a){ca();if(!(B&&a)){B=a;var b=document.body;if(b.setCapture)a!=null?b.setCapture():b.releaseCapture();if(a!=null){$(b).addClass("unselectable");b.setAttribute("unselectable","on");b.onselectstart="return false;"}else{$(b).removeClass("unselectable");b.setAttribute("unselectable","off");b.onselectstart=""}}};this.checkReleaseCapture=function(a,b){B&&a==B&&b.type=="mouseup"&&this.capture(null)};this.getElementsByClassName=function(a,b){if(document.getElementsByClassName)return b.getElementsByClassName(a);else{b=b.getElementsByTagName("*");for(var f=[],k,h=0,o=b.length;h<o;h++){k=b[h];k.className.indexOf(a)!=-1&&f.push(k)}return f}};this.addCss=function(a,b){var f=document.styleSheets[0];f.insertRule(a+" { "+b+" }",f.cssRules.length)};this.addCssText=function(a){var b=document.getElementById("Wt-inline-css");if(!b){b=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(b)}if(b.styleSheet){var f=document.createElement("style");if(b)b.parentNode.insertBefore(f,b);else{f.id="Wt-inline-css";document.getElementsByTagName("head")[0].appendChild(f)}f.styleSheet.cssText=a}else{a=document.createTextNode(a);b.appendChild(a)}};this.getCssRule=function(a,b){a=a.toLowerCase();if(document.styleSheets)for(var f=0;f<document.styleSheets.length;f++){var k=document.styleSheets[f],h=0,o;do{o=null;if(k.cssRules)o=k.cssRules[h];else if(k.rules)o=k.rules[h];if(o&&o.selectorText)if(o.selectorText.toLowerCase()==a)if(b=="delete"){k.cssRules?k.deleteRule(h):k.removeRule(h);return true}else return o;++h}while(o)}return false};this.removeCssRule=function(a){return g.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var f=document.createElement("link");f.setAttribute("type","text/css");f.setAttribute("href",a);f.setAttribute("type","text/css");f.setAttribute("rel","stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,k,h){var o=g.windowSize(),E=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,s=g.widgetPageCoordinates(a.offsetParent),z=["left","right"],x=["top","bottom"],F=g.px(a,"maxWidth")||a.offsetWidth,v=g.px(a,"maxHeight")||a.offsetHeight;if(b+F>E+o.x){k-=s.x;b=a.offsetParent.offsetWidth-(k+g.px(a,"marginRight"));k=1}else{b-=s.x;b-=g.px(a,"marginLeft");k=0}if(f+v>u+o.y){if(h>u+o.y)h=u+o.y;h-=s.y;f=a.offsetParent.offsetHeight-(h+g.px(a,"marginBottom"));h=1}else{f-=s.y;f-=g.px(a,"marginTop");h=0}a.style[z[k]]=b+"px";a.style[z[1-k]]="";a.style[x[h]]=f+"px";a.style[x[1-h]]=""};this.positionXY=function(a,b,f){a=g.getElement(a);g.isHidden(a)||g.fitToWindow(a,b,f,b,f)};this.Horizontal=1;this.Vertical=2;this.positionAtWidget=function(a,b,f,k){a=g.getElement(a);b=g.getElement(b);var h=g.widgetPageCoordinates(b),o;if(k){a.parentNode.removeChild(a);$(".Wt-domRoot").get(0).appendChild(a)}a.style.display="block";if(f==g.Horizontal){f=h.x+b.offsetWidth;k=h.y;o=h.x;b=h.y+b.offsetHeight}else{f=h.x;k=h.y+b.offsetHeight;o=h.x+b.offsetWidth;b=h.y}g.fitToWindow(a,f,k,o,b)};this.hasFocus=function(a){return a==document.activeElement};this.history=function(){function a(){var l,p;p=location.href;l=p.indexOf("#");return l>=0?p.substr(l+1):null}function b(){v.value=G+"|"+C;if(u)v.value+="|"+M.join(",")}function f(l){if(l){if(!l||C!==l){C=l||G;H(unescape(C))}}else{C=G;H(unescape(C))}}function k(l){var p;l='<html><body><div id="state">'+l+"</div></body></html>";try{p=F.contentWindow.document;p.open();p.write(l);p.close();return true}catch(q){return false}}function h(){var l,p,q,m;if(!F.contentWindow||!F.contentWindow.document)setTimeout(h,10);else{l=F.contentWindow.document;q=(p=l.getElementById("state"))?p.innerText:null;m=a();setInterval(function(){var N,J;l=F.contentWindow.document;N=(p=l.getElementById("state"))?p.innerText:null;J=a();if(N!==q){q=N;f(q);J=q?q:G;m=location.hash=J;b()}else if(J!==m){m=J;k(J)}},50);I=true;x!=null&&x()}}function o(){if(!s){var l=a(),p=history.length;U&&clearInterval(U);U=setInterval(function(){var q,m;q=a();m=history.length;if(q!==l){l=q;p=m;f(l);b()}else if(m!==p&&u){l=q;p=m;q=M[p-1];f(q);b()}},50)}}function E(){var l;l=v.value.split("|");if(l.length>1){G=l[0];C=l[1]}if(l.length>2)M=l[2].split(",");if(s)h();else{o();I=true;x!=null&&x()}}var u=false,s=false,z=false,x=null,F=null,v=null,I=false,U=null,M=[],G,C,H=function(){};return{onReady:function(l){if(I)setTimeout(function(){l()},0);else x=l},_initialize:function(){v!=null&&E()},_initTimeout:function(){o()},register:function(l,p){if(!I){C=G=escape(l);H=p}},initialize:function(l,p){if(!I){var q=navigator.vendor||"";if(q!=="KDE")if(typeof window.opera!=="undefined")z=true;else if(typeof document.all!=="undefined")s=true;else if(q.indexOf("Apple Computer, Inc.")>-1)u=true;if(typeof l==="string")l=document.getElementById(l);if(!(!l||l.tagName.toUpperCase()!=="TEXTAREA"&&(l.tagName.toUpperCase()!=="INPUT"||l.type!=="hidden"&&l.type!=="text"))){v=l;if(s){if(typeof p==="string")p=document.getElementById(p);!p||p.tagName.toUpperCase()!=="IFRAME"||(F=p)}}}},navigate:function(l){if(I){fqstate=l;if(s)k(fqstate);else{location.hash=fqstate;if(u){M[history.length]=fqstate;b()}}}},getCurrentState:function(){if(!I)return"";return C}}}()}),_$_APP_CLASS_$_=new (function(){function w(d){d=m.pageCoordinates(d);N=d.x;J=d.y}function t(){var d=m.history.getCurrentState();if(O!=d){O=d;setTimeout(function(){z(null,"hash",null,true)},1)}}function D(d){if(O!=d){O=d;m.history.navigate(escape(d))}}function T(){window.onresize=function(){E()};document.body.ondragstart=function(){return false}}function ca(d,c){var e=aa;e.object=m.getElement(d.getAttribute("dwid"));if(e.object== |
-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1)&&navigator.userAgent.toLowerCase().indexOf("msie 6")!=-1;this.isGecko=navigator.userAgent.toLowerCase().indexOf("gecko")!=-1;this.isIEMobile=navigator.userAgent.toLowerCase().indexOf("msie 4")!=-1||navigator.userAgent.toLowerCase().indexOf("msie 5")!=-1;this.isOpera=typeof window.opera!=="undefined";this.updateDelay=this.isIE?10:51;this.setHtml=function(a,b,f){function k(o,E){var u,s,z;switch(o.nodeType){case 1:u=o.namespaceURI==null?document.createElement(o.nodeName): document.createElementNS(o.namespaceURI,o.nodeName);if(o.attributes&&o.attributes.length>0){s=0;for(z=o.attributes.length;s<z;)u.setAttribute(o.attributes[s].nodeName,o.getAttribute(o.attributes[s++].nodeName))}if(E&&o.childNodes.length>0){s=0;for(z=o.childNodes.length;s<z;){var x=k(o.childNodes[s++],E);x&&u.appendChild(x)}}return u;case 3:case 4:case 5:return document.createTextNode(o.nodeValue)}return null}if(g.isIE||_$_INNER_HTML_$_&&!f)if(f)a.innerHTML+=b;else a.innerHTML=b;else{var h;h=new DOMParser; | -1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1)&&navigator.userAgent.toLowerCase().indexOf("msie 6")!=-1;this.isGecko=navigator.userAgent.toLowerCase().indexOf("gecko")!=-1;this.isIEMobile=navigator.userAgent.toLowerCase().indexOf("msie 4")!=-1||navigator.userAgent.toLowerCase().indexOf("msie 5")!=-1;this.isOpera=typeof window.opera!=="undefined";this.updateDelay=this.isIE?10:51;this.setHtml=function(a,b,f){function k(o,E){var v,s,z;switch(o.nodeType){case 1:v=o.namespaceURI==null?document.createElement(o.nodeName): document.createElementNS(o.namespaceURI,o.nodeName);if(o.attributes&&o.attributes.length>0){s=0;for(z=o.attributes.length;s<z;)v.setAttribute(o.attributes[s].nodeName,o.getAttribute(o.attributes[s++].nodeName))}if(E&&o.childNodes.length>0){s=0;for(z=o.childNodes.length;s<z;){var y=k(o.childNodes[s++],E);y&&v.appendChild(y)}}return v;case 3:case 4:case 5:return document.createTextNode(o.nodeValue)}return null}if(g.isIE||_$_INNER_HTML_$_&&!f)if(f)a.innerHTML+=b;else a.innerHTML=b;else{var h;h=new DOMParser; | var _$_WT_CLASS_$_=new (function(){function w(a,b){return a.style[b]?a.style[b]:document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(a,null)[b]:a.currentStyle?a.currentStyle[b]:null}function t(a){if(B==null)return null;if(!a)a=window.event;if(a){for(var b=a=g.target(a);b&&b!=B;)b=b.parentNode;return b==B?g.isIE?a:null:B}else return B}function D(a){var b=t(a);if(b&&!S){if(!a)a=window.event;S=true;if(g.isIE){g.firedTarget=a.srcElement||b;b.fireEvent("onmousemove",a);g.firedTarget=null}else g.condCall(b,"onmousemove",a);return S=false}else return true}function T(a){var b=t(a);g.capture(null);if(b){if(!a)a=window.event;if(g.isIE){g.firedTarget=a.srcElement||b;b.fireEvent("onmouseup",a);g.firedTarget=null}else g.condCall(b,"onmouseup",a);g.cancelEvent(a,g.CancelPropagate);return false}else return true}function ca(){if(!Y){Y=true;if(document.body.addEventListener){var a=document.body;a.addEventListener("mousemove",D,true);a.addEventListener("mouseup",T,true);g.isGecko&&window.addEventListener("mouseout",function(b){!b.relatedTarget&&g.hasTag(b.target,"HTML")&&T(b)},true)}else{a=document.body;a.attachEvent("onmousemove",D);a.attachEvent("onmouseup",T)}}}var g=this;this.buttons=0;this.mouseDown=function(a){g.buttons|=g.button(a)};this.mouseUp=function(a){g.buttons^=g.button(a)};this.arrayRemove=function(a,b,f){f=a.slice((f||b)+1||a.length);a.length=b<0?a.length+b:b;return a.push.apply(a,f)};this.isIE6=(this.isIE=navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1)&&navigator.userAgent.toLowerCase().indexOf("msie 6")!=-1;this.isGecko=navigator.userAgent.toLowerCase().indexOf("gecko")!=-1;this.isIEMobile=navigator.userAgent.toLowerCase().indexOf("msie 4")!=-1||navigator.userAgent.toLowerCase().indexOf("msie 5")!=-1;this.isOpera=typeof window.opera!=="undefined";this.updateDelay=this.isIE?10:51;this.setHtml=function(a,b,f){function k(o,E){var u,s,z;switch(o.nodeType){case 1:u=o.namespaceURI==null?document.createElement(o.nodeName):document.createElementNS(o.namespaceURI,o.nodeName);if(o.attributes&&o.attributes.length>0){s=0;for(z=o.attributes.length;s<z;)u.setAttribute(o.attributes[s].nodeName,o.getAttribute(o.attributes[s++].nodeName))}if(E&&o.childNodes.length>0){s=0;for(z=o.childNodes.length;s<z;){var x=k(o.childNodes[s++],E);x&&u.appendChild(x)}}return u;case 3:case 4:case 5:return document.createTextNode(o.nodeValue)}return null}if(g.isIE||_$_INNER_HTML_$_&&!f)if(f)a.innerHTML+=b;else a.innerHTML=b;else{var h;h=new DOMParser;h=h.parseFromString("<div>"+b+"</div>","application/xhtml+xml").documentElement;if(h.nodeType!=1)h=h.nextSibling;if(!f)a.innerHTML="";b=0;for(f=h.childNodes.length;b<f;)a.appendChild(k(h.childNodes[b++],true))}};this.hasTag=function(a,b){return a.nodeType==1&&a.tagName.toUpperCase()===b};this.insertAt=function(a,b,f){a.childNodes.length==0?a.appendChild(b):a.insertBefore(b,a.childNodes[f])};this.remove=function(a){(a=g.getElement(a))&&a.parentNode.removeChild(a)};this.unstub=function(a,b,f){if(f==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8);g.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(g.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var f,k;f=0;for(k=a.attributes.length;f<k;f++){var h=a.attributes[f].nodeName;h!="type"&&h!="name"&&b.setAttribute(h,a.getAttribute(h))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?g.CancelAll:b;if(b&g.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&g.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;try{document.activeElement&&document.activeElement.blur&&g.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}catch(f){}}};this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(k){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,k;if(g.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}k=a.offsetParent;if(k==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=k)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:f}};this.windowCoordinates=function(a){a=g.pageCoordinates(a);return{x:a.x-document.body.scrollLeft-document.documentElement.scrollLeft,y:a.y-document.body.scrollTop-document.documentElement.scrollTop}};this.scrollIntoView=function(a){(a=document.getElementById(a))&&a.scrollIntoView&&a.scrollIntoView(true)};this.getSelectionRange=function(a){if(document.selection)if(g.hasTag(a,"TEXTAREA")){var b=document.selection.createRange(),f=b.duplicate();f.moveToElementText(a);var k=0;if(b.text.length>1){k-=b.text.length;if(k<0)k=0}a=-1+k;for(f.moveStart("character",k);f.inRange(b);){f.moveStart("character");a++}b=b.text.replace(/\r/g,"");return{start:a,end:b.length+a}}else{f=$(a).val();a=document.selection.createRange().duplicate();a.moveEnd("character",f.length);b=a.text==""?f.length:f.lastIndexOf(a.text);a=document.selection.createRange().duplicate();a.moveStart("character",-f.length);return{start:b,end:a.text.length}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,f){var k=$(a).val();if(typeof b!="number")b=-1;if(typeof f!="number")f=-1;if(b<0)b=0;if(f>k.length)f=k.length;if(f<b)f=b;if(b>f)b=f;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=f}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",f-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};var Z=/^-?\d+(?:px)?$/i;this.px=function(a,b){a=w(a,b);if(a=="auto"||a==null)return 0;return Z.test(a)?parseFloat(a):0};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?g.isHidden(a):false}};this.pxself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.pctself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.IEwidth=function(a,b,f){if(a.parentNode){var k=a.parentNode.clientWidth-g.px(a,"marginLeft")-g.px(a,"marginRight")-g.px(a,"borderLeftWidth")-g.px(a,"borderRightWidth")-g.px(a.parentNode,"paddingLeft")-g.px(a.parentNode,"paddingRight"),h=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(b);b=(h=h&&h.length==2?h[1]:"0")?parseFloat(h):0;f=(h=(h=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(f))&&h.length==2?h[1]:"100000")?parseFloat(h):1E5;return k<b?b-1:k>f?f+1:a.style.styleFloat!=""?b-1:"auto"}else return"auto"};this.hide=function(a){g.getElement(a).style.display="none"};this.inline=function(a){g.getElement(a).style.display="inline"};this.block=function(a){g.getElement(a).style.display="block"};this.show=function(a){g.getElement(a).style.display=""};var B=null;this.firedTarget=null;this.target=function(a){return g.firedTarget||a.target||a.srcElement};var S=false,Y=false;this.capture=function(a){ca();if(!(B&&a)){B=a;var b=document.body;if(b.setCapture)a!=null?b.setCapture():b.releaseCapture();if(a!=null){$(b).addClass("unselectable");b.setAttribute("unselectable","on");b.onselectstart="return false;"}else{$(b).removeClass("unselectable");b.setAttribute("unselectable","off");b.onselectstart=""}}};this.checkReleaseCapture=function(a,b){B&&a==B&&b.type=="mouseup"&&this.capture(null)};this.getElementsByClassName=function(a,b){if(document.getElementsByClassName)return b.getElementsByClassName(a);else{b=b.getElementsByTagName("*");for(var f=[],k,h=0,o=b.length;h<o;h++){k=b[h];k.className.indexOf(a)!=-1&&f.push(k)}return f}};this.addCss=function(a,b){var f=document.styleSheets[0];f.insertRule(a+" { "+b+" }",f.cssRules.length)};this.addCssText=function(a){var b=document.getElementById("Wt-inline-css");if(!b){b=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(b)}if(b.styleSheet){var f=document.createElement("style");if(b)b.parentNode.insertBefore(f,b);else{f.id="Wt-inline-css";document.getElementsByTagName("head")[0].appendChild(f)}f.styleSheet.cssText=a}else{a=document.createTextNode(a);b.appendChild(a)}};this.getCssRule=function(a,b){a=a.toLowerCase();if(document.styleSheets)for(var f=0;f<document.styleSheets.length;f++){var k=document.styleSheets[f],h=0,o;do{o=null;if(k.cssRules)o=k.cssRules[h];else if(k.rules)o=k.rules[h];if(o&&o.selectorText)if(o.selectorText.toLowerCase()==a)if(b=="delete"){k.cssRules?k.deleteRule(h):k.removeRule(h);return true}else return o;++h}while(o)}return false};this.removeCssRule=function(a){return g.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var f=document.createElement("link");f.setAttribute("type","text/css");f.setAttribute("href",a);f.setAttribute("type","text/css");f.setAttribute("rel","stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,k,h){var o=g.windowSize(),E=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,s=g.widgetPageCoordinates(a.offsetParent),z=["left","right"],x=["top","bottom"],F=g.px(a,"maxWidth")||a.offsetWidth,v=g.px(a,"maxHeight")||a.offsetHeight;if(b+F>E+o.x){k-=s.x;b=a.offsetParent.offsetWidth-(k+g.px(a,"marginRight"));k=1}else{b-=s.x;b-=g.px(a,"marginLeft");k=0}if(f+v>u+o.y){if(h>u+o.y)h=u+o.y;h-=s.y;f=a.offsetParent.offsetHeight-(h+g.px(a,"marginBottom"));h=1}else{f-=s.y;f-=g.px(a,"marginTop");h=0}a.style[z[k]]=b+"px";a.style[z[1-k]]="";a.style[x[h]]=f+"px";a.style[x[1-h]]=""};this.positionXY=function(a,b,f){a=g.getElement(a);g.isHidden(a)||g.fitToWindow(a,b,f,b,f)};this.Horizontal=1;this.Vertical=2;this.positionAtWidget=function(a,b,f,k){a=g.getElement(a);b=g.getElement(b);var h=g.widgetPageCoordinates(b),o;if(k){a.parentNode.removeChild(a);$(".Wt-domRoot").get(0).appendChild(a)}a.style.display="block";if(f==g.Horizontal){f=h.x+b.offsetWidth;k=h.y;o=h.x;b=h.y+b.offsetHeight}else{f=h.x;k=h.y+b.offsetHeight;o=h.x+b.offsetWidth;b=h.y}g.fitToWindow(a,f,k,o,b)};this.hasFocus=function(a){return a==document.activeElement};this.history=function(){function a(){var l,p;p=location.href;l=p.indexOf("#");return l>=0?p.substr(l+1):null}function b(){v.value=G+"|"+C;if(u)v.value+="|"+M.join(",")}function f(l){if(l){if(!l||C!==l){C=l||G;H(unescape(C))}}else{C=G;H(unescape(C))}}function k(l){var p;l='<html><body><div id="state">'+l+"</div></body></html>";try{p=F.contentWindow.document;p.open();p.write(l);p.close();return true}catch(q){return false}}function h(){var l,p,q,m;if(!F.contentWindow||!F.contentWindow.document)setTimeout(h,10);else{l=F.contentWindow.document;q=(p=l.getElementById("state"))?p.innerText:null;m=a();setInterval(function(){var N,J;l=F.contentWindow.document;N=(p=l.getElementById("state"))?p.innerText:null;J=a();if(N!==q){q=N;f(q);J=q?q:G;m=location.hash=J;b()}else if(J!==m){m=J;k(J)}},50);I=true;x!=null&&x()}}function o(){if(!s){var l=a(),p=history.length;U&&clearInterval(U);U=setInterval(function(){var q,m;q=a();m=history.length;if(q!==l){l=q;p=m;f(l);b()}else if(m!==p&&u){l=q;p=m;q=M[p-1];f(q);b()}},50)}}function E(){var l;l=v.value.split("|");if(l.length>1){G=l[0];C=l[1]}if(l.length>2)M=l[2].split(",");if(s)h();else{o();I=true;x!=null&&x()}}var u=false,s=false,z=false,x=null,F=null,v=null,I=false,U=null,M=[],G,C,H=function(){};return{onReady:function(l){if(I)setTimeout(function(){l()},0);else x=l},_initialize:function(){v!=null&&E()},_initTimeout:function(){o()},register:function(l,p){if(!I){C=G=escape(l);H=p}},initialize:function(l,p){if(!I){var q=navigator.vendor||"";if(q!=="KDE")if(typeof window.opera!=="undefined")z=true;else if(typeof document.all!=="undefined")s=true;else if(q.indexOf("Apple Computer, Inc.")>-1)u=true;if(typeof l==="string")l=document.getElementById(l);if(!(!l||l.tagName.toUpperCase()!=="TEXTAREA"&&(l.tagName.toUpperCase()!=="INPUT"||l.type!=="hidden"&&l.type!=="text"))){v=l;if(s){if(typeof p==="string")p=document.getElementById(p);!p||p.tagName.toUpperCase()!=="IFRAME"||(F=p)}}}},navigate:function(l){if(I){fqstate=l;if(s)k(fqstate);else{location.hash=fqstate;if(u){M[history.length]=fqstate;b()}}}},getCurrentState:function(){if(!I)return"";return C}}}()}),_$_APP_CLASS_$_=new (function(){function w(d){d=m.pageCoordinates(d);N=d.x;J=d.y}function t(){var d=m.history.getCurrentState();if(O!=d){O=d;setTimeout(function(){z(null,"hash",null,true)},1)}}function D(d){if(O!=d){O=d;m.history.navigate(escape(d))}}function T(){window.onresize=function(){E()};document.body.ondragstart=function(){return false}}function ca(d,c){var e=aa;e.object=m.getElement(d.getAttribute("dwid"));if(e.object== |
if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(k){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,k;if(g.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}k=a.offsetParent;if(k==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a, | if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(k){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,k;if(g.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(x(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}k=a.offsetParent;if(k==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a, | var _$_WT_CLASS_$_=new (function(){function w(a,b){return a.style[b]?a.style[b]:document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(a,null)[b]:a.currentStyle?a.currentStyle[b]:null}function t(a){if(B==null)return null;if(!a)a=window.event;if(a){for(var b=a=g.target(a);b&&b!=B;)b=b.parentNode;return b==B?g.isIE?a:null:B}else return B}function D(a){var b=t(a);if(b&&!S){if(!a)a=window.event;S=true;if(g.isIE){g.firedTarget=a.srcElement||b;b.fireEvent("onmousemove",a);g.firedTarget=null}else g.condCall(b,"onmousemove",a);return S=false}else return true}function T(a){var b=t(a);g.capture(null);if(b){if(!a)a=window.event;if(g.isIE){g.firedTarget=a.srcElement||b;b.fireEvent("onmouseup",a);g.firedTarget=null}else g.condCall(b,"onmouseup",a);g.cancelEvent(a,g.CancelPropagate);return false}else return true}function ca(){if(!Y){Y=true;if(document.body.addEventListener){var a=document.body;a.addEventListener("mousemove",D,true);a.addEventListener("mouseup",T,true);g.isGecko&&window.addEventListener("mouseout",function(b){!b.relatedTarget&&g.hasTag(b.target,"HTML")&&T(b)},true)}else{a=document.body;a.attachEvent("onmousemove",D);a.attachEvent("onmouseup",T)}}}var g=this;this.buttons=0;this.mouseDown=function(a){g.buttons|=g.button(a)};this.mouseUp=function(a){g.buttons^=g.button(a)};this.arrayRemove=function(a,b,f){f=a.slice((f||b)+1||a.length);a.length=b<0?a.length+b:b;return a.push.apply(a,f)};this.isIE6=(this.isIE=navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1)&&navigator.userAgent.toLowerCase().indexOf("msie 6")!=-1;this.isGecko=navigator.userAgent.toLowerCase().indexOf("gecko")!=-1;this.isIEMobile=navigator.userAgent.toLowerCase().indexOf("msie 4")!=-1||navigator.userAgent.toLowerCase().indexOf("msie 5")!=-1;this.isOpera=typeof window.opera!=="undefined";this.updateDelay=this.isIE?10:51;this.setHtml=function(a,b,f){function k(o,E){var u,s,z;switch(o.nodeType){case 1:u=o.namespaceURI==null?document.createElement(o.nodeName):document.createElementNS(o.namespaceURI,o.nodeName);if(o.attributes&&o.attributes.length>0){s=0;for(z=o.attributes.length;s<z;)u.setAttribute(o.attributes[s].nodeName,o.getAttribute(o.attributes[s++].nodeName))}if(E&&o.childNodes.length>0){s=0;for(z=o.childNodes.length;s<z;){var x=k(o.childNodes[s++],E);x&&u.appendChild(x)}}return u;case 3:case 4:case 5:return document.createTextNode(o.nodeValue)}return null}if(g.isIE||_$_INNER_HTML_$_&&!f)if(f)a.innerHTML+=b;else a.innerHTML=b;else{var h;h=new DOMParser;h=h.parseFromString("<div>"+b+"</div>","application/xhtml+xml").documentElement;if(h.nodeType!=1)h=h.nextSibling;if(!f)a.innerHTML="";b=0;for(f=h.childNodes.length;b<f;)a.appendChild(k(h.childNodes[b++],true))}};this.hasTag=function(a,b){return a.nodeType==1&&a.tagName.toUpperCase()===b};this.insertAt=function(a,b,f){a.childNodes.length==0?a.appendChild(b):a.insertBefore(b,a.childNodes[f])};this.remove=function(a){(a=g.getElement(a))&&a.parentNode.removeChild(a)};this.unstub=function(a,b,f){if(f==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8);g.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(g.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var f,k;f=0;for(k=a.attributes.length;f<k;f++){var h=a.attributes[f].nodeName;h!="type"&&h!="name"&&b.setAttribute(h,a.getAttribute(h))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?g.CancelAll:b;if(b&g.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&g.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;try{document.activeElement&&document.activeElement.blur&&g.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}catch(f){}}};this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(k){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,k;if(g.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}k=a.offsetParent;if(k==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=k)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:f}};this.windowCoordinates=function(a){a=g.pageCoordinates(a);return{x:a.x-document.body.scrollLeft-document.documentElement.scrollLeft,y:a.y-document.body.scrollTop-document.documentElement.scrollTop}};this.scrollIntoView=function(a){(a=document.getElementById(a))&&a.scrollIntoView&&a.scrollIntoView(true)};this.getSelectionRange=function(a){if(document.selection)if(g.hasTag(a,"TEXTAREA")){var b=document.selection.createRange(),f=b.duplicate();f.moveToElementText(a);var k=0;if(b.text.length>1){k-=b.text.length;if(k<0)k=0}a=-1+k;for(f.moveStart("character",k);f.inRange(b);){f.moveStart("character");a++}b=b.text.replace(/\r/g,"");return{start:a,end:b.length+a}}else{f=$(a).val();a=document.selection.createRange().duplicate();a.moveEnd("character",f.length);b=a.text==""?f.length:f.lastIndexOf(a.text);a=document.selection.createRange().duplicate();a.moveStart("character",-f.length);return{start:b,end:a.text.length}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,f){var k=$(a).val();if(typeof b!="number")b=-1;if(typeof f!="number")f=-1;if(b<0)b=0;if(f>k.length)f=k.length;if(f<b)f=b;if(b>f)b=f;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=f}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",f-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};var Z=/^-?\d+(?:px)?$/i;this.px=function(a,b){a=w(a,b);if(a=="auto"||a==null)return 0;return Z.test(a)?parseFloat(a):0};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?g.isHidden(a):false}};this.pxself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.pctself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.IEwidth=function(a,b,f){if(a.parentNode){var k=a.parentNode.clientWidth-g.px(a,"marginLeft")-g.px(a,"marginRight")-g.px(a,"borderLeftWidth")-g.px(a,"borderRightWidth")-g.px(a.parentNode,"paddingLeft")-g.px(a.parentNode,"paddingRight"),h=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(b);b=(h=h&&h.length==2?h[1]:"0")?parseFloat(h):0;f=(h=(h=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(f))&&h.length==2?h[1]:"100000")?parseFloat(h):1E5;return k<b?b-1:k>f?f+1:a.style.styleFloat!=""?b-1:"auto"}else return"auto"};this.hide=function(a){g.getElement(a).style.display="none"};this.inline=function(a){g.getElement(a).style.display="inline"};this.block=function(a){g.getElement(a).style.display="block"};this.show=function(a){g.getElement(a).style.display=""};var B=null;this.firedTarget=null;this.target=function(a){return g.firedTarget||a.target||a.srcElement};var S=false,Y=false;this.capture=function(a){ca();if(!(B&&a)){B=a;var b=document.body;if(b.setCapture)a!=null?b.setCapture():b.releaseCapture();if(a!=null){$(b).addClass("unselectable");b.setAttribute("unselectable","on");b.onselectstart="return false;"}else{$(b).removeClass("unselectable");b.setAttribute("unselectable","off");b.onselectstart=""}}};this.checkReleaseCapture=function(a,b){B&&a==B&&b.type=="mouseup"&&this.capture(null)};this.getElementsByClassName=function(a,b){if(document.getElementsByClassName)return b.getElementsByClassName(a);else{b=b.getElementsByTagName("*");for(var f=[],k,h=0,o=b.length;h<o;h++){k=b[h];k.className.indexOf(a)!=-1&&f.push(k)}return f}};this.addCss=function(a,b){var f=document.styleSheets[0];f.insertRule(a+" { "+b+" }",f.cssRules.length)};this.addCssText=function(a){var b=document.getElementById("Wt-inline-css");if(!b){b=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(b)}if(b.styleSheet){var f=document.createElement("style");if(b)b.parentNode.insertBefore(f,b);else{f.id="Wt-inline-css";document.getElementsByTagName("head")[0].appendChild(f)}f.styleSheet.cssText=a}else{a=document.createTextNode(a);b.appendChild(a)}};this.getCssRule=function(a,b){a=a.toLowerCase();if(document.styleSheets)for(var f=0;f<document.styleSheets.length;f++){var k=document.styleSheets[f],h=0,o;do{o=null;if(k.cssRules)o=k.cssRules[h];else if(k.rules)o=k.rules[h];if(o&&o.selectorText)if(o.selectorText.toLowerCase()==a)if(b=="delete"){k.cssRules?k.deleteRule(h):k.removeRule(h);return true}else return o;++h}while(o)}return false};this.removeCssRule=function(a){return g.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var f=document.createElement("link");f.setAttribute("type","text/css");f.setAttribute("href",a);f.setAttribute("type","text/css");f.setAttribute("rel","stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,k,h){var o=g.windowSize(),E=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,s=g.widgetPageCoordinates(a.offsetParent),z=["left","right"],x=["top","bottom"],F=g.px(a,"maxWidth")||a.offsetWidth,v=g.px(a,"maxHeight")||a.offsetHeight;if(b+F>E+o.x){k-=s.x;b=a.offsetParent.offsetWidth-(k+g.px(a,"marginRight"));k=1}else{b-=s.x;b-=g.px(a,"marginLeft");k=0}if(f+v>u+o.y){if(h>u+o.y)h=u+o.y;h-=s.y;f=a.offsetParent.offsetHeight-(h+g.px(a,"marginBottom"));h=1}else{f-=s.y;f-=g.px(a,"marginTop");h=0}a.style[z[k]]=b+"px";a.style[z[1-k]]="";a.style[x[h]]=f+"px";a.style[x[1-h]]=""};this.positionXY=function(a,b,f){a=g.getElement(a);g.isHidden(a)||g.fitToWindow(a,b,f,b,f)};this.Horizontal=1;this.Vertical=2;this.positionAtWidget=function(a,b,f,k){a=g.getElement(a);b=g.getElement(b);var h=g.widgetPageCoordinates(b),o;if(k){a.parentNode.removeChild(a);$(".Wt-domRoot").get(0).appendChild(a)}a.style.display="block";if(f==g.Horizontal){f=h.x+b.offsetWidth;k=h.y;o=h.x;b=h.y+b.offsetHeight}else{f=h.x;k=h.y+b.offsetHeight;o=h.x+b.offsetWidth;b=h.y}g.fitToWindow(a,f,k,o,b)};this.hasFocus=function(a){return a==document.activeElement};this.history=function(){function a(){var l,p;p=location.href;l=p.indexOf("#");return l>=0?p.substr(l+1):null}function b(){v.value=G+"|"+C;if(u)v.value+="|"+M.join(",")}function f(l){if(l){if(!l||C!==l){C=l||G;H(unescape(C))}}else{C=G;H(unescape(C))}}function k(l){var p;l='<html><body><div id="state">'+l+"</div></body></html>";try{p=F.contentWindow.document;p.open();p.write(l);p.close();return true}catch(q){return false}}function h(){var l,p,q,m;if(!F.contentWindow||!F.contentWindow.document)setTimeout(h,10);else{l=F.contentWindow.document;q=(p=l.getElementById("state"))?p.innerText:null;m=a();setInterval(function(){var N,J;l=F.contentWindow.document;N=(p=l.getElementById("state"))?p.innerText:null;J=a();if(N!==q){q=N;f(q);J=q?q:G;m=location.hash=J;b()}else if(J!==m){m=J;k(J)}},50);I=true;x!=null&&x()}}function o(){if(!s){var l=a(),p=history.length;U&&clearInterval(U);U=setInterval(function(){var q,m;q=a();m=history.length;if(q!==l){l=q;p=m;f(l);b()}else if(m!==p&&u){l=q;p=m;q=M[p-1];f(q);b()}},50)}}function E(){var l;l=v.value.split("|");if(l.length>1){G=l[0];C=l[1]}if(l.length>2)M=l[2].split(",");if(s)h();else{o();I=true;x!=null&&x()}}var u=false,s=false,z=false,x=null,F=null,v=null,I=false,U=null,M=[],G,C,H=function(){};return{onReady:function(l){if(I)setTimeout(function(){l()},0);else x=l},_initialize:function(){v!=null&&E()},_initTimeout:function(){o()},register:function(l,p){if(!I){C=G=escape(l);H=p}},initialize:function(l,p){if(!I){var q=navigator.vendor||"";if(q!=="KDE")if(typeof window.opera!=="undefined")z=true;else if(typeof document.all!=="undefined")s=true;else if(q.indexOf("Apple Computer, Inc.")>-1)u=true;if(typeof l==="string")l=document.getElementById(l);if(!(!l||l.tagName.toUpperCase()!=="TEXTAREA"&&(l.tagName.toUpperCase()!=="INPUT"||l.type!=="hidden"&&l.type!=="text"))){v=l;if(s){if(typeof p==="string")p=document.getElementById(p);!p||p.tagName.toUpperCase()!=="IFRAME"||(F=p)}}}},navigate:function(l){if(I){fqstate=l;if(s)k(fqstate);else{location.hash=fqstate;if(u){M[history.length]=fqstate;b()}}}},getCurrentState:function(){if(!I)return"";return C}}}()}),_$_APP_CLASS_$_=new (function(){function w(d){d=m.pageCoordinates(d);N=d.x;J=d.y}function t(){var d=m.history.getCurrentState();if(O!=d){O=d;setTimeout(function(){z(null,"hash",null,true)},1)}}function D(d){if(O!=d){O=d;m.history.navigate(escape(d))}}function T(){window.onresize=function(){E()};document.body.ondragstart=function(){return false}}function ca(d,c){var e=aa;e.object=m.getElement(d.getAttribute("dwid"));if(e.object== |
"undefined"?a.charCode:0)>0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};var Z=/^-?\d+(?:px)?$/i;this.px=function(a,b){a=w(a,b);if(a=="auto"||a==null)return 0;return Z.test(a)?parseFloat(a):0};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?g.isHidden(a):false}};this.pxself=function(a,b){a=a.style[b];if(a== | "undefined"?a.charCode:0)>0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};var Z=/^-?\d+(?:px)?$/i;this.px=function(a,b){a=x(a,b);if(a=="auto"||a==null)return 0;return Z.test(a)?parseFloat(a):0};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?g.isHidden(a):false}};this.pxself=function(a,b){a=a.style[b];if(a== | var _$_WT_CLASS_$_=new (function(){function w(a,b){return a.style[b]?a.style[b]:document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(a,null)[b]:a.currentStyle?a.currentStyle[b]:null}function t(a){if(B==null)return null;if(!a)a=window.event;if(a){for(var b=a=g.target(a);b&&b!=B;)b=b.parentNode;return b==B?g.isIE?a:null:B}else return B}function D(a){var b=t(a);if(b&&!S){if(!a)a=window.event;S=true;if(g.isIE){g.firedTarget=a.srcElement||b;b.fireEvent("onmousemove",a);g.firedTarget=null}else g.condCall(b,"onmousemove",a);return S=false}else return true}function T(a){var b=t(a);g.capture(null);if(b){if(!a)a=window.event;if(g.isIE){g.firedTarget=a.srcElement||b;b.fireEvent("onmouseup",a);g.firedTarget=null}else g.condCall(b,"onmouseup",a);g.cancelEvent(a,g.CancelPropagate);return false}else return true}function ca(){if(!Y){Y=true;if(document.body.addEventListener){var a=document.body;a.addEventListener("mousemove",D,true);a.addEventListener("mouseup",T,true);g.isGecko&&window.addEventListener("mouseout",function(b){!b.relatedTarget&&g.hasTag(b.target,"HTML")&&T(b)},true)}else{a=document.body;a.attachEvent("onmousemove",D);a.attachEvent("onmouseup",T)}}}var g=this;this.buttons=0;this.mouseDown=function(a){g.buttons|=g.button(a)};this.mouseUp=function(a){g.buttons^=g.button(a)};this.arrayRemove=function(a,b,f){f=a.slice((f||b)+1||a.length);a.length=b<0?a.length+b:b;return a.push.apply(a,f)};this.isIE6=(this.isIE=navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1)&&navigator.userAgent.toLowerCase().indexOf("msie 6")!=-1;this.isGecko=navigator.userAgent.toLowerCase().indexOf("gecko")!=-1;this.isIEMobile=navigator.userAgent.toLowerCase().indexOf("msie 4")!=-1||navigator.userAgent.toLowerCase().indexOf("msie 5")!=-1;this.isOpera=typeof window.opera!=="undefined";this.updateDelay=this.isIE?10:51;this.setHtml=function(a,b,f){function k(o,E){var u,s,z;switch(o.nodeType){case 1:u=o.namespaceURI==null?document.createElement(o.nodeName):document.createElementNS(o.namespaceURI,o.nodeName);if(o.attributes&&o.attributes.length>0){s=0;for(z=o.attributes.length;s<z;)u.setAttribute(o.attributes[s].nodeName,o.getAttribute(o.attributes[s++].nodeName))}if(E&&o.childNodes.length>0){s=0;for(z=o.childNodes.length;s<z;){var x=k(o.childNodes[s++],E);x&&u.appendChild(x)}}return u;case 3:case 4:case 5:return document.createTextNode(o.nodeValue)}return null}if(g.isIE||_$_INNER_HTML_$_&&!f)if(f)a.innerHTML+=b;else a.innerHTML=b;else{var h;h=new DOMParser;h=h.parseFromString("<div>"+b+"</div>","application/xhtml+xml").documentElement;if(h.nodeType!=1)h=h.nextSibling;if(!f)a.innerHTML="";b=0;for(f=h.childNodes.length;b<f;)a.appendChild(k(h.childNodes[b++],true))}};this.hasTag=function(a,b){return a.nodeType==1&&a.tagName.toUpperCase()===b};this.insertAt=function(a,b,f){a.childNodes.length==0?a.appendChild(b):a.insertBefore(b,a.childNodes[f])};this.remove=function(a){(a=g.getElement(a))&&a.parentNode.removeChild(a)};this.unstub=function(a,b,f){if(f==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8);g.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(g.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var f,k;f=0;for(k=a.attributes.length;f<k;f++){var h=a.attributes[f].nodeName;h!="type"&&h!="name"&&b.setAttribute(h,a.getAttribute(h))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?g.CancelAll:b;if(b&g.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&g.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;try{document.activeElement&&document.activeElement.blur&&g.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}catch(f){}}};this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(k){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,k;if(g.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}k=a.offsetParent;if(k==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=k)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:f}};this.windowCoordinates=function(a){a=g.pageCoordinates(a);return{x:a.x-document.body.scrollLeft-document.documentElement.scrollLeft,y:a.y-document.body.scrollTop-document.documentElement.scrollTop}};this.scrollIntoView=function(a){(a=document.getElementById(a))&&a.scrollIntoView&&a.scrollIntoView(true)};this.getSelectionRange=function(a){if(document.selection)if(g.hasTag(a,"TEXTAREA")){var b=document.selection.createRange(),f=b.duplicate();f.moveToElementText(a);var k=0;if(b.text.length>1){k-=b.text.length;if(k<0)k=0}a=-1+k;for(f.moveStart("character",k);f.inRange(b);){f.moveStart("character");a++}b=b.text.replace(/\r/g,"");return{start:a,end:b.length+a}}else{f=$(a).val();a=document.selection.createRange().duplicate();a.moveEnd("character",f.length);b=a.text==""?f.length:f.lastIndexOf(a.text);a=document.selection.createRange().duplicate();a.moveStart("character",-f.length);return{start:b,end:a.text.length}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,f){var k=$(a).val();if(typeof b!="number")b=-1;if(typeof f!="number")f=-1;if(b<0)b=0;if(f>k.length)f=k.length;if(f<b)f=b;if(b>f)b=f;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=f}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",f-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};var Z=/^-?\d+(?:px)?$/i;this.px=function(a,b){a=w(a,b);if(a=="auto"||a==null)return 0;return Z.test(a)?parseFloat(a):0};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?g.isHidden(a):false}};this.pxself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.pctself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.IEwidth=function(a,b,f){if(a.parentNode){var k=a.parentNode.clientWidth-g.px(a,"marginLeft")-g.px(a,"marginRight")-g.px(a,"borderLeftWidth")-g.px(a,"borderRightWidth")-g.px(a.parentNode,"paddingLeft")-g.px(a.parentNode,"paddingRight"),h=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(b);b=(h=h&&h.length==2?h[1]:"0")?parseFloat(h):0;f=(h=(h=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(f))&&h.length==2?h[1]:"100000")?parseFloat(h):1E5;return k<b?b-1:k>f?f+1:a.style.styleFloat!=""?b-1:"auto"}else return"auto"};this.hide=function(a){g.getElement(a).style.display="none"};this.inline=function(a){g.getElement(a).style.display="inline"};this.block=function(a){g.getElement(a).style.display="block"};this.show=function(a){g.getElement(a).style.display=""};var B=null;this.firedTarget=null;this.target=function(a){return g.firedTarget||a.target||a.srcElement};var S=false,Y=false;this.capture=function(a){ca();if(!(B&&a)){B=a;var b=document.body;if(b.setCapture)a!=null?b.setCapture():b.releaseCapture();if(a!=null){$(b).addClass("unselectable");b.setAttribute("unselectable","on");b.onselectstart="return false;"}else{$(b).removeClass("unselectable");b.setAttribute("unselectable","off");b.onselectstart=""}}};this.checkReleaseCapture=function(a,b){B&&a==B&&b.type=="mouseup"&&this.capture(null)};this.getElementsByClassName=function(a,b){if(document.getElementsByClassName)return b.getElementsByClassName(a);else{b=b.getElementsByTagName("*");for(var f=[],k,h=0,o=b.length;h<o;h++){k=b[h];k.className.indexOf(a)!=-1&&f.push(k)}return f}};this.addCss=function(a,b){var f=document.styleSheets[0];f.insertRule(a+" { "+b+" }",f.cssRules.length)};this.addCssText=function(a){var b=document.getElementById("Wt-inline-css");if(!b){b=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(b)}if(b.styleSheet){var f=document.createElement("style");if(b)b.parentNode.insertBefore(f,b);else{f.id="Wt-inline-css";document.getElementsByTagName("head")[0].appendChild(f)}f.styleSheet.cssText=a}else{a=document.createTextNode(a);b.appendChild(a)}};this.getCssRule=function(a,b){a=a.toLowerCase();if(document.styleSheets)for(var f=0;f<document.styleSheets.length;f++){var k=document.styleSheets[f],h=0,o;do{o=null;if(k.cssRules)o=k.cssRules[h];else if(k.rules)o=k.rules[h];if(o&&o.selectorText)if(o.selectorText.toLowerCase()==a)if(b=="delete"){k.cssRules?k.deleteRule(h):k.removeRule(h);return true}else return o;++h}while(o)}return false};this.removeCssRule=function(a){return g.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var f=document.createElement("link");f.setAttribute("type","text/css");f.setAttribute("href",a);f.setAttribute("type","text/css");f.setAttribute("rel","stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,k,h){var o=g.windowSize(),E=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,s=g.widgetPageCoordinates(a.offsetParent),z=["left","right"],x=["top","bottom"],F=g.px(a,"maxWidth")||a.offsetWidth,v=g.px(a,"maxHeight")||a.offsetHeight;if(b+F>E+o.x){k-=s.x;b=a.offsetParent.offsetWidth-(k+g.px(a,"marginRight"));k=1}else{b-=s.x;b-=g.px(a,"marginLeft");k=0}if(f+v>u+o.y){if(h>u+o.y)h=u+o.y;h-=s.y;f=a.offsetParent.offsetHeight-(h+g.px(a,"marginBottom"));h=1}else{f-=s.y;f-=g.px(a,"marginTop");h=0}a.style[z[k]]=b+"px";a.style[z[1-k]]="";a.style[x[h]]=f+"px";a.style[x[1-h]]=""};this.positionXY=function(a,b,f){a=g.getElement(a);g.isHidden(a)||g.fitToWindow(a,b,f,b,f)};this.Horizontal=1;this.Vertical=2;this.positionAtWidget=function(a,b,f,k){a=g.getElement(a);b=g.getElement(b);var h=g.widgetPageCoordinates(b),o;if(k){a.parentNode.removeChild(a);$(".Wt-domRoot").get(0).appendChild(a)}a.style.display="block";if(f==g.Horizontal){f=h.x+b.offsetWidth;k=h.y;o=h.x;b=h.y+b.offsetHeight}else{f=h.x;k=h.y+b.offsetHeight;o=h.x+b.offsetWidth;b=h.y}g.fitToWindow(a,f,k,o,b)};this.hasFocus=function(a){return a==document.activeElement};this.history=function(){function a(){var l,p;p=location.href;l=p.indexOf("#");return l>=0?p.substr(l+1):null}function b(){v.value=G+"|"+C;if(u)v.value+="|"+M.join(",")}function f(l){if(l){if(!l||C!==l){C=l||G;H(unescape(C))}}else{C=G;H(unescape(C))}}function k(l){var p;l='<html><body><div id="state">'+l+"</div></body></html>";try{p=F.contentWindow.document;p.open();p.write(l);p.close();return true}catch(q){return false}}function h(){var l,p,q,m;if(!F.contentWindow||!F.contentWindow.document)setTimeout(h,10);else{l=F.contentWindow.document;q=(p=l.getElementById("state"))?p.innerText:null;m=a();setInterval(function(){var N,J;l=F.contentWindow.document;N=(p=l.getElementById("state"))?p.innerText:null;J=a();if(N!==q){q=N;f(q);J=q?q:G;m=location.hash=J;b()}else if(J!==m){m=J;k(J)}},50);I=true;x!=null&&x()}}function o(){if(!s){var l=a(),p=history.length;U&&clearInterval(U);U=setInterval(function(){var q,m;q=a();m=history.length;if(q!==l){l=q;p=m;f(l);b()}else if(m!==p&&u){l=q;p=m;q=M[p-1];f(q);b()}},50)}}function E(){var l;l=v.value.split("|");if(l.length>1){G=l[0];C=l[1]}if(l.length>2)M=l[2].split(",");if(s)h();else{o();I=true;x!=null&&x()}}var u=false,s=false,z=false,x=null,F=null,v=null,I=false,U=null,M=[],G,C,H=function(){};return{onReady:function(l){if(I)setTimeout(function(){l()},0);else x=l},_initialize:function(){v!=null&&E()},_initTimeout:function(){o()},register:function(l,p){if(!I){C=G=escape(l);H=p}},initialize:function(l,p){if(!I){var q=navigator.vendor||"";if(q!=="KDE")if(typeof window.opera!=="undefined")z=true;else if(typeof document.all!=="undefined")s=true;else if(q.indexOf("Apple Computer, Inc.")>-1)u=true;if(typeof l==="string")l=document.getElementById(l);if(!(!l||l.tagName.toUpperCase()!=="TEXTAREA"&&(l.tagName.toUpperCase()!=="INPUT"||l.type!=="hidden"&&l.type!=="text"))){v=l;if(s){if(typeof p==="string")p=document.getElementById(p);!p||p.tagName.toUpperCase()!=="IFRAME"||(F=p)}}}},navigate:function(l){if(I){fqstate=l;if(s)k(fqstate);else{location.hash=fqstate;if(u){M[history.length]=fqstate;b()}}}},getCurrentState:function(){if(!I)return"";return C}}}()}),_$_APP_CLASS_$_=new (function(){function w(d){d=m.pageCoordinates(d);N=d.x;J=d.y}function t(){var d=m.history.getCurrentState();if(O!=d){O=d;setTimeout(function(){z(null,"hash",null,true)},1)}}function D(d){if(O!=d){O=d;m.history.navigate(escape(d))}}function T(){window.onresize=function(){E()};document.body.ondragstart=function(){return false}}function ca(d,c){var e=aa;e.object=m.getElement(d.getAttribute("dwid"));if(e.object== |
""};var B=null;this.firedTarget=null;this.target=function(a){return g.firedTarget||a.target||a.srcElement};var S=false,Y=false;this.capture=function(a){ca();if(!(B&&a)){B=a;var b=document.body;if(b.setCapture)a!=null?b.setCapture():b.releaseCapture();if(a!=null){$(b).addClass("unselectable");b.setAttribute("unselectable","on");b.onselectstart="return false;"}else{$(b).removeClass("unselectable");b.setAttribute("unselectable","off");b.onselectstart=""}}};this.checkReleaseCapture=function(a,b){B&&a== | ""};var B=null;this.firedTarget=null;this.target=function(a){return g.firedTarget||a.target||a.srcElement};var S=false,U=false;this.capture=function(a){ca();if(!(B&&a)){B=a;var b=document.body;if(b.setCapture)a!=null?b.setCapture():b.releaseCapture();if(a!=null){$(b).addClass("unselectable");b.setAttribute("unselectable","on");b.onselectstart="return false;"}else{$(b).removeClass("unselectable");b.setAttribute("unselectable","off");b.onselectstart=""}}};this.checkReleaseCapture=function(a,b){B&&a== | var _$_WT_CLASS_$_=new (function(){function w(a,b){return a.style[b]?a.style[b]:document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(a,null)[b]:a.currentStyle?a.currentStyle[b]:null}function t(a){if(B==null)return null;if(!a)a=window.event;if(a){for(var b=a=g.target(a);b&&b!=B;)b=b.parentNode;return b==B?g.isIE?a:null:B}else return B}function D(a){var b=t(a);if(b&&!S){if(!a)a=window.event;S=true;if(g.isIE){g.firedTarget=a.srcElement||b;b.fireEvent("onmousemove",a);g.firedTarget=null}else g.condCall(b,"onmousemove",a);return S=false}else return true}function T(a){var b=t(a);g.capture(null);if(b){if(!a)a=window.event;if(g.isIE){g.firedTarget=a.srcElement||b;b.fireEvent("onmouseup",a);g.firedTarget=null}else g.condCall(b,"onmouseup",a);g.cancelEvent(a,g.CancelPropagate);return false}else return true}function ca(){if(!Y){Y=true;if(document.body.addEventListener){var a=document.body;a.addEventListener("mousemove",D,true);a.addEventListener("mouseup",T,true);g.isGecko&&window.addEventListener("mouseout",function(b){!b.relatedTarget&&g.hasTag(b.target,"HTML")&&T(b)},true)}else{a=document.body;a.attachEvent("onmousemove",D);a.attachEvent("onmouseup",T)}}}var g=this;this.buttons=0;this.mouseDown=function(a){g.buttons|=g.button(a)};this.mouseUp=function(a){g.buttons^=g.button(a)};this.arrayRemove=function(a,b,f){f=a.slice((f||b)+1||a.length);a.length=b<0?a.length+b:b;return a.push.apply(a,f)};this.isIE6=(this.isIE=navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1)&&navigator.userAgent.toLowerCase().indexOf("msie 6")!=-1;this.isGecko=navigator.userAgent.toLowerCase().indexOf("gecko")!=-1;this.isIEMobile=navigator.userAgent.toLowerCase().indexOf("msie 4")!=-1||navigator.userAgent.toLowerCase().indexOf("msie 5")!=-1;this.isOpera=typeof window.opera!=="undefined";this.updateDelay=this.isIE?10:51;this.setHtml=function(a,b,f){function k(o,E){var u,s,z;switch(o.nodeType){case 1:u=o.namespaceURI==null?document.createElement(o.nodeName):document.createElementNS(o.namespaceURI,o.nodeName);if(o.attributes&&o.attributes.length>0){s=0;for(z=o.attributes.length;s<z;)u.setAttribute(o.attributes[s].nodeName,o.getAttribute(o.attributes[s++].nodeName))}if(E&&o.childNodes.length>0){s=0;for(z=o.childNodes.length;s<z;){var x=k(o.childNodes[s++],E);x&&u.appendChild(x)}}return u;case 3:case 4:case 5:return document.createTextNode(o.nodeValue)}return null}if(g.isIE||_$_INNER_HTML_$_&&!f)if(f)a.innerHTML+=b;else a.innerHTML=b;else{var h;h=new DOMParser;h=h.parseFromString("<div>"+b+"</div>","application/xhtml+xml").documentElement;if(h.nodeType!=1)h=h.nextSibling;if(!f)a.innerHTML="";b=0;for(f=h.childNodes.length;b<f;)a.appendChild(k(h.childNodes[b++],true))}};this.hasTag=function(a,b){return a.nodeType==1&&a.tagName.toUpperCase()===b};this.insertAt=function(a,b,f){a.childNodes.length==0?a.appendChild(b):a.insertBefore(b,a.childNodes[f])};this.remove=function(a){(a=g.getElement(a))&&a.parentNode.removeChild(a)};this.unstub=function(a,b,f){if(f==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8);g.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(g.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var f,k;f=0;for(k=a.attributes.length;f<k;f++){var h=a.attributes[f].nodeName;h!="type"&&h!="name"&&b.setAttribute(h,a.getAttribute(h))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?g.CancelAll:b;if(b&g.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&g.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;try{document.activeElement&&document.activeElement.blur&&g.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}catch(f){}}};this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(k){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,k;if(g.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}k=a.offsetParent;if(k==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=k)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:f}};this.windowCoordinates=function(a){a=g.pageCoordinates(a);return{x:a.x-document.body.scrollLeft-document.documentElement.scrollLeft,y:a.y-document.body.scrollTop-document.documentElement.scrollTop}};this.scrollIntoView=function(a){(a=document.getElementById(a))&&a.scrollIntoView&&a.scrollIntoView(true)};this.getSelectionRange=function(a){if(document.selection)if(g.hasTag(a,"TEXTAREA")){var b=document.selection.createRange(),f=b.duplicate();f.moveToElementText(a);var k=0;if(b.text.length>1){k-=b.text.length;if(k<0)k=0}a=-1+k;for(f.moveStart("character",k);f.inRange(b);){f.moveStart("character");a++}b=b.text.replace(/\r/g,"");return{start:a,end:b.length+a}}else{f=$(a).val();a=document.selection.createRange().duplicate();a.moveEnd("character",f.length);b=a.text==""?f.length:f.lastIndexOf(a.text);a=document.selection.createRange().duplicate();a.moveStart("character",-f.length);return{start:b,end:a.text.length}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,f){var k=$(a).val();if(typeof b!="number")b=-1;if(typeof f!="number")f=-1;if(b<0)b=0;if(f>k.length)f=k.length;if(f<b)f=b;if(b>f)b=f;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=f}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",f-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};var Z=/^-?\d+(?:px)?$/i;this.px=function(a,b){a=w(a,b);if(a=="auto"||a==null)return 0;return Z.test(a)?parseFloat(a):0};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?g.isHidden(a):false}};this.pxself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.pctself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.IEwidth=function(a,b,f){if(a.parentNode){var k=a.parentNode.clientWidth-g.px(a,"marginLeft")-g.px(a,"marginRight")-g.px(a,"borderLeftWidth")-g.px(a,"borderRightWidth")-g.px(a.parentNode,"paddingLeft")-g.px(a.parentNode,"paddingRight"),h=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(b);b=(h=h&&h.length==2?h[1]:"0")?parseFloat(h):0;f=(h=(h=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(f))&&h.length==2?h[1]:"100000")?parseFloat(h):1E5;return k<b?b-1:k>f?f+1:a.style.styleFloat!=""?b-1:"auto"}else return"auto"};this.hide=function(a){g.getElement(a).style.display="none"};this.inline=function(a){g.getElement(a).style.display="inline"};this.block=function(a){g.getElement(a).style.display="block"};this.show=function(a){g.getElement(a).style.display=""};var B=null;this.firedTarget=null;this.target=function(a){return g.firedTarget||a.target||a.srcElement};var S=false,Y=false;this.capture=function(a){ca();if(!(B&&a)){B=a;var b=document.body;if(b.setCapture)a!=null?b.setCapture():b.releaseCapture();if(a!=null){$(b).addClass("unselectable");b.setAttribute("unselectable","on");b.onselectstart="return false;"}else{$(b).removeClass("unselectable");b.setAttribute("unselectable","off");b.onselectstart=""}}};this.checkReleaseCapture=function(a,b){B&&a==B&&b.type=="mouseup"&&this.capture(null)};this.getElementsByClassName=function(a,b){if(document.getElementsByClassName)return b.getElementsByClassName(a);else{b=b.getElementsByTagName("*");for(var f=[],k,h=0,o=b.length;h<o;h++){k=b[h];k.className.indexOf(a)!=-1&&f.push(k)}return f}};this.addCss=function(a,b){var f=document.styleSheets[0];f.insertRule(a+" { "+b+" }",f.cssRules.length)};this.addCssText=function(a){var b=document.getElementById("Wt-inline-css");if(!b){b=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(b)}if(b.styleSheet){var f=document.createElement("style");if(b)b.parentNode.insertBefore(f,b);else{f.id="Wt-inline-css";document.getElementsByTagName("head")[0].appendChild(f)}f.styleSheet.cssText=a}else{a=document.createTextNode(a);b.appendChild(a)}};this.getCssRule=function(a,b){a=a.toLowerCase();if(document.styleSheets)for(var f=0;f<document.styleSheets.length;f++){var k=document.styleSheets[f],h=0,o;do{o=null;if(k.cssRules)o=k.cssRules[h];else if(k.rules)o=k.rules[h];if(o&&o.selectorText)if(o.selectorText.toLowerCase()==a)if(b=="delete"){k.cssRules?k.deleteRule(h):k.removeRule(h);return true}else return o;++h}while(o)}return false};this.removeCssRule=function(a){return g.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var f=document.createElement("link");f.setAttribute("type","text/css");f.setAttribute("href",a);f.setAttribute("type","text/css");f.setAttribute("rel","stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,k,h){var o=g.windowSize(),E=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,s=g.widgetPageCoordinates(a.offsetParent),z=["left","right"],x=["top","bottom"],F=g.px(a,"maxWidth")||a.offsetWidth,v=g.px(a,"maxHeight")||a.offsetHeight;if(b+F>E+o.x){k-=s.x;b=a.offsetParent.offsetWidth-(k+g.px(a,"marginRight"));k=1}else{b-=s.x;b-=g.px(a,"marginLeft");k=0}if(f+v>u+o.y){if(h>u+o.y)h=u+o.y;h-=s.y;f=a.offsetParent.offsetHeight-(h+g.px(a,"marginBottom"));h=1}else{f-=s.y;f-=g.px(a,"marginTop");h=0}a.style[z[k]]=b+"px";a.style[z[1-k]]="";a.style[x[h]]=f+"px";a.style[x[1-h]]=""};this.positionXY=function(a,b,f){a=g.getElement(a);g.isHidden(a)||g.fitToWindow(a,b,f,b,f)};this.Horizontal=1;this.Vertical=2;this.positionAtWidget=function(a,b,f,k){a=g.getElement(a);b=g.getElement(b);var h=g.widgetPageCoordinates(b),o;if(k){a.parentNode.removeChild(a);$(".Wt-domRoot").get(0).appendChild(a)}a.style.display="block";if(f==g.Horizontal){f=h.x+b.offsetWidth;k=h.y;o=h.x;b=h.y+b.offsetHeight}else{f=h.x;k=h.y+b.offsetHeight;o=h.x+b.offsetWidth;b=h.y}g.fitToWindow(a,f,k,o,b)};this.hasFocus=function(a){return a==document.activeElement};this.history=function(){function a(){var l,p;p=location.href;l=p.indexOf("#");return l>=0?p.substr(l+1):null}function b(){v.value=G+"|"+C;if(u)v.value+="|"+M.join(",")}function f(l){if(l){if(!l||C!==l){C=l||G;H(unescape(C))}}else{C=G;H(unescape(C))}}function k(l){var p;l='<html><body><div id="state">'+l+"</div></body></html>";try{p=F.contentWindow.document;p.open();p.write(l);p.close();return true}catch(q){return false}}function h(){var l,p,q,m;if(!F.contentWindow||!F.contentWindow.document)setTimeout(h,10);else{l=F.contentWindow.document;q=(p=l.getElementById("state"))?p.innerText:null;m=a();setInterval(function(){var N,J;l=F.contentWindow.document;N=(p=l.getElementById("state"))?p.innerText:null;J=a();if(N!==q){q=N;f(q);J=q?q:G;m=location.hash=J;b()}else if(J!==m){m=J;k(J)}},50);I=true;x!=null&&x()}}function o(){if(!s){var l=a(),p=history.length;U&&clearInterval(U);U=setInterval(function(){var q,m;q=a();m=history.length;if(q!==l){l=q;p=m;f(l);b()}else if(m!==p&&u){l=q;p=m;q=M[p-1];f(q);b()}},50)}}function E(){var l;l=v.value.split("|");if(l.length>1){G=l[0];C=l[1]}if(l.length>2)M=l[2].split(",");if(s)h();else{o();I=true;x!=null&&x()}}var u=false,s=false,z=false,x=null,F=null,v=null,I=false,U=null,M=[],G,C,H=function(){};return{onReady:function(l){if(I)setTimeout(function(){l()},0);else x=l},_initialize:function(){v!=null&&E()},_initTimeout:function(){o()},register:function(l,p){if(!I){C=G=escape(l);H=p}},initialize:function(l,p){if(!I){var q=navigator.vendor||"";if(q!=="KDE")if(typeof window.opera!=="undefined")z=true;else if(typeof document.all!=="undefined")s=true;else if(q.indexOf("Apple Computer, Inc.")>-1)u=true;if(typeof l==="string")l=document.getElementById(l);if(!(!l||l.tagName.toUpperCase()!=="TEXTAREA"&&(l.tagName.toUpperCase()!=="INPUT"||l.type!=="hidden"&&l.type!=="text"))){v=l;if(s){if(typeof p==="string")p=document.getElementById(p);!p||p.tagName.toUpperCase()!=="IFRAME"||(F=p)}}}},navigate:function(l){if(I){fqstate=l;if(s)k(fqstate);else{location.hash=fqstate;if(u){M[history.length]=fqstate;b()}}}},getCurrentState:function(){if(!I)return"";return C}}}()}),_$_APP_CLASS_$_=new (function(){function w(d){d=m.pageCoordinates(d);N=d.x;J=d.y}function t(){var d=m.history.getCurrentState();if(O!=d){O=d;setTimeout(function(){z(null,"hash",null,true)},1)}}function D(d){if(O!=d){O=d;m.history.navigate(escape(d))}}function T(){window.onresize=function(){E()};document.body.ondragstart=function(){return false}}function ca(d,c){var e=aa;e.object=m.getElement(d.getAttribute("dwid"));if(e.object== |
"stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,k,h){var o=g.windowSize(),E=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop, s=g.widgetPageCoordinates(a.offsetParent),z=["left","right"],x=["top","bottom"],F=g.px(a,"maxWidth")||a.offsetWidth,v=g.px(a,"maxHeight")||a.offsetHeight;if(b+F>E+o.x){k-=s.x;b=a.offsetParent.offsetWidth-(k+g.px(a,"marginRight"));k=1}else{b-=s.x;b-=g.px(a,"marginLeft");k=0}if(f+v>u+o.y){if(h>u+o.y)h=u+o.y;h-=s.y;f=a.offsetParent.offsetHeight-(h+g.px(a,"marginBottom"));h=1}else{f-=s.y;f-=g.px(a,"marginTop");h=0}a.style[z[k]]=b+"px";a.style[z[1-k]]="";a.style[x[h]]=f+"px";a.style[x[1-h]]=""};this.positionXY= function(a,b,f){a=g.getElement(a);g.isHidden(a)||g.fitToWindow(a,b,f,b,f)};this.Horizontal=1;this.Vertical=2;this.positionAtWidget=function(a,b,f,k){a=g.getElement(a);b=g.getElement(b);var h=g.widgetPageCoordinates(b),o;if(k){a.parentNode.removeChild(a);$(".Wt-domRoot").get(0).appendChild(a)}a.style.display="block";if(f==g.Horizontal){f=h.x+b.offsetWidth;k=h.y;o=h.x;b=h.y+b.offsetHeight}else{f=h.x;k=h.y+b.offsetHeight;o=h.x+b.offsetWidth;b=h.y}g.fitToWindow(a,f,k,o,b)};this.hasFocus=function(a){return a== document.activeElement};this.history=function(){function a(){var l,p;p=location.href;l=p.indexOf("#");return l>=0?p.substr(l+1):null}function b(){v.value=G+"|"+C;if(u)v.value+="|"+M.join(",")}function f(l){if(l){if(!l||C!==l){C=l||G;H(unescape(C))}}else{C=G;H(unescape(C))}}function k(l){var p;l='<html><body><div id="state">'+l+"</div></body></html>";try{p=F.contentWindow.document;p.open();p.write(l);p.close();return true}catch(q){return false}}function h(){var l,p,q,m;if(!F.contentWindow||!F.contentWindow.document)setTimeout(h, 10);else{l=F.contentWindow.document;q=(p=l.getElementById("state"))?p.innerText:null;m=a();setInterval(function(){var N,J;l=F.contentWindow.document;N=(p=l.getElementById("state"))?p.innerText:null;J=a();if(N!==q){q=N;f(q);J=q?q:G;m=location.hash=J;b()}else if(J!==m){m=J;k(J)}},50);I=true;x!=null&&x()}}function o(){if(!s){var l=a(),p=history.length;U&&clearInterval(U);U=setInterval(function(){var q,m;q=a();m=history.length;if(q!==l){l=q;p=m;f(l);b()}else if(m!==p&&u){l=q;p=m;q=M[p-1];f(q);b()}},50)}} function E(){var l;l=v.value.split("|");if(l.length>1){G=l[0];C=l[1]}if(l.length>2)M=l[2].split(",");if(s)h();else{o();I=true;x!=null&&x()}}var u=false,s=false,z=false,x=null,F=null,v=null,I=false,U=null,M=[],G,C,H=function(){};return{onReady:function(l){if(I)setTimeout(function(){l()},0);else x=l},_initialize:function(){v!=null&&E()},_initTimeout:function(){o()},register:function(l,p){if(!I){C=G=escape(l);H=p}},initialize:function(l,p){if(!I){var q=navigator.vendor||"";if(q!=="KDE")if(typeof window.opera!== "undefined")z=true;else if(typeof document.all!=="undefined")s=true;else if(q.indexOf("Apple Computer, Inc.")>-1)u=true;if(typeof l==="string")l=document.getElementById(l);if(!(!l||l.tagName.toUpperCase()!=="TEXTAREA"&&(l.tagName.toUpperCase()!=="INPUT"||l.type!=="hidden"&&l.type!=="text"))){v=l;if(s){if(typeof p==="string")p=document.getElementById(p);!p||p.tagName.toUpperCase()!=="IFRAME"||(F=p)}}}},navigate:function(l){if(I){fqstate=l;if(s)k(fqstate);else{location.hash=fqstate;if(u){M[history.length]= fqstate;b()}}}},getCurrentState:function(){if(!I)return"";return C}}}()}),_$_APP_CLASS_$_=new (function(){function w(d){d=m.pageCoordinates(d);N=d.x;J=d.y}function t(){var d=m.history.getCurrentState();if(O!=d){O=d;setTimeout(function(){z(null,"hash",null,true)},1)}}function D(d){if(O!=d){O=d;m.history.navigate(escape(d))}}function T(){window.onresize=function(){E()};document.body.ondragstart=function(){return false}}function ca(d,c){var e=aa;e.object=m.getElement(d.getAttribute("dwid"));if(e.object== | "stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,k,h){var o=g.windowSize(),E=document.body.scrollLeft+document.documentElement.scrollLeft,v=document.body.scrollTop+document.documentElement.scrollTop, s=g.widgetPageCoordinates(a.offsetParent),z=["left","right"],y=["top","bottom"],F=g.px(a,"maxWidth")||a.offsetWidth,w=g.px(a,"maxHeight")||a.offsetHeight;if(b+F>E+o.x){k-=s.x;b=a.offsetParent.offsetWidth-(k+g.px(a,"marginRight"));k=1}else{b-=s.x;b-=g.px(a,"marginLeft");k=0}if(f+w>v+o.y){if(h>v+o.y)h=v+o.y;h-=s.y;f=a.offsetParent.offsetHeight-(h+g.px(a,"marginBottom"));h=1}else{f-=s.y;f-=g.px(a,"marginTop");h=0}a.style[z[k]]=b+"px";a.style[z[1-k]]="";a.style[y[h]]=f+"px";a.style[y[1-h]]=""};this.positionXY= function(a,b,f){a=g.getElement(a);g.isHidden(a)||g.fitToWindow(a,b,f,b,f)};this.Horizontal=1;this.Vertical=2;this.positionAtWidget=function(a,b,f,k){a=g.getElement(a);b=g.getElement(b);var h=g.widgetPageCoordinates(b),o;if(k){a.parentNode.removeChild(a);$(".Wt-domRoot").get(0).appendChild(a)}a.style.position="absolute";a.style.display="block";if(f==g.Horizontal){f=h.x+b.offsetWidth;k=h.y;o=h.x;b=h.y+b.offsetHeight}else{f=h.x;k=h.y+b.offsetHeight;o=h.x+b.offsetWidth;b=h.y}g.fitToWindow(a,f,k,o,b); a.style.visibility=""};this.hasFocus=function(a){return a==document.activeElement};this.history=function(){function a(){var l,q;q=location.href;l=q.indexOf("#");return l>=0?q.substr(l+1):null}function b(){w.value=G+"|"+C;if(v)w.value+="|"+M.join(",")}function f(l){if(l){if(!l||C!==l){C=l||G;H(unescape(C))}}else{C=G;H(unescape(C))}}function k(l){var q;l='<html><body><div id="state">'+l+"</div></body></html>";try{q=F.contentWindow.document;q.open();q.write(l);q.close();return true}catch(r){return false}} function h(){var l,q,r,m;if(!F.contentWindow||!F.contentWindow.document)setTimeout(h,10);else{l=F.contentWindow.document;r=(q=l.getElementById("state"))?q.innerText:null;m=a();setInterval(function(){var N,J;l=F.contentWindow.document;N=(q=l.getElementById("state"))?q.innerText:null;J=a();if(N!==r){r=N;f(r);J=r?r:G;m=location.hash=J;b()}else if(J!==m){m=J;k(J)}},50);I=true;y!=null&&y()}}function o(){if(!s){var l=a(),q=history.length;V&&clearInterval(V);V=setInterval(function(){var r,m;r=a();m=history.length; if(r!==l){l=r;q=m;f(l);b()}else if(m!==q&&v){l=r;q=m;r=M[q-1];f(r);b()}},50)}}function E(){var l;l=w.value.split("|");if(l.length>1){G=l[0];C=l[1]}if(l.length>2)M=l[2].split(",");if(s)h();else{o();I=true;y!=null&&y()}}var v=false,s=false,z=false,y=null,F=null,w=null,I=false,V=null,M=[],G,C,H=function(){};return{onReady:function(l){if(I)setTimeout(function(){l()},0);else y=l},_initialize:function(){w!=null&&E()},_initTimeout:function(){o()},register:function(l,q){if(!I){C=G=escape(l);H=q}},initialize:function(l, q){if(!I){var r=navigator.vendor||"";if(r!=="KDE")if(typeof window.opera!=="undefined")z=true;else if(typeof document.all!=="undefined")s=true;else if(r.indexOf("Apple Computer, Inc.")>-1)v=true;if(typeof l==="string")l=document.getElementById(l);if(!(!l||l.tagName.toUpperCase()!=="TEXTAREA"&&(l.tagName.toUpperCase()!=="INPUT"||l.type!=="hidden"&&l.type!=="text"))){w=l;if(s){if(typeof q==="string")q=document.getElementById(q);!q||q.tagName.toUpperCase()!=="IFRAME"||(F=q)}}}},navigate:function(l){if(I){fqstate= l;if(s)k(fqstate);else{location.hash=fqstate;if(v){M[history.length]=fqstate;b()}}}},getCurrentState:function(){if(!I)return"";return C}}}()}),_$_APP_CLASS_$_=new (function(){function x(d){d=m.pageCoordinates(d);N=d.x;J=d.y}function u(){var d=m.history.getCurrentState();if(O!=d){O=d;setTimeout(function(){z(null,"hash",null,true)},1)}}function D(d){if(O!=d){O=d;m.history.navigate(escape(d))}}function T(){window.onresize=function(){E()};document.body.ondragstart=function(){return false}}function ca(d, | var _$_WT_CLASS_$_=new (function(){function w(a,b){return a.style[b]?a.style[b]:document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(a,null)[b]:a.currentStyle?a.currentStyle[b]:null}function t(a){if(B==null)return null;if(!a)a=window.event;if(a){for(var b=a=g.target(a);b&&b!=B;)b=b.parentNode;return b==B?g.isIE?a:null:B}else return B}function D(a){var b=t(a);if(b&&!S){if(!a)a=window.event;S=true;if(g.isIE){g.firedTarget=a.srcElement||b;b.fireEvent("onmousemove",a);g.firedTarget=null}else g.condCall(b,"onmousemove",a);return S=false}else return true}function T(a){var b=t(a);g.capture(null);if(b){if(!a)a=window.event;if(g.isIE){g.firedTarget=a.srcElement||b;b.fireEvent("onmouseup",a);g.firedTarget=null}else g.condCall(b,"onmouseup",a);g.cancelEvent(a,g.CancelPropagate);return false}else return true}function ca(){if(!Y){Y=true;if(document.body.addEventListener){var a=document.body;a.addEventListener("mousemove",D,true);a.addEventListener("mouseup",T,true);g.isGecko&&window.addEventListener("mouseout",function(b){!b.relatedTarget&&g.hasTag(b.target,"HTML")&&T(b)},true)}else{a=document.body;a.attachEvent("onmousemove",D);a.attachEvent("onmouseup",T)}}}var g=this;this.buttons=0;this.mouseDown=function(a){g.buttons|=g.button(a)};this.mouseUp=function(a){g.buttons^=g.button(a)};this.arrayRemove=function(a,b,f){f=a.slice((f||b)+1||a.length);a.length=b<0?a.length+b:b;return a.push.apply(a,f)};this.isIE6=(this.isIE=navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1)&&navigator.userAgent.toLowerCase().indexOf("msie 6")!=-1;this.isGecko=navigator.userAgent.toLowerCase().indexOf("gecko")!=-1;this.isIEMobile=navigator.userAgent.toLowerCase().indexOf("msie 4")!=-1||navigator.userAgent.toLowerCase().indexOf("msie 5")!=-1;this.isOpera=typeof window.opera!=="undefined";this.updateDelay=this.isIE?10:51;this.setHtml=function(a,b,f){function k(o,E){var u,s,z;switch(o.nodeType){case 1:u=o.namespaceURI==null?document.createElement(o.nodeName):document.createElementNS(o.namespaceURI,o.nodeName);if(o.attributes&&o.attributes.length>0){s=0;for(z=o.attributes.length;s<z;)u.setAttribute(o.attributes[s].nodeName,o.getAttribute(o.attributes[s++].nodeName))}if(E&&o.childNodes.length>0){s=0;for(z=o.childNodes.length;s<z;){var x=k(o.childNodes[s++],E);x&&u.appendChild(x)}}return u;case 3:case 4:case 5:return document.createTextNode(o.nodeValue)}return null}if(g.isIE||_$_INNER_HTML_$_&&!f)if(f)a.innerHTML+=b;else a.innerHTML=b;else{var h;h=new DOMParser;h=h.parseFromString("<div>"+b+"</div>","application/xhtml+xml").documentElement;if(h.nodeType!=1)h=h.nextSibling;if(!f)a.innerHTML="";b=0;for(f=h.childNodes.length;b<f;)a.appendChild(k(h.childNodes[b++],true))}};this.hasTag=function(a,b){return a.nodeType==1&&a.tagName.toUpperCase()===b};this.insertAt=function(a,b,f){a.childNodes.length==0?a.appendChild(b):a.insertBefore(b,a.childNodes[f])};this.remove=function(a){(a=g.getElement(a))&&a.parentNode.removeChild(a)};this.unstub=function(a,b,f){if(f==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8);g.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(g.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var f,k;f=0;for(k=a.attributes.length;f<k;f++){var h=a.attributes[f].nodeName;h!="type"&&h!="name"&&b.setAttribute(h,a.getAttribute(h))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?g.CancelAll:b;if(b&g.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&g.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;try{document.activeElement&&document.activeElement.blur&&g.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}catch(f){}}};this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(k){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,k;if(g.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}k=a.offsetParent;if(k==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=k)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:f}};this.windowCoordinates=function(a){a=g.pageCoordinates(a);return{x:a.x-document.body.scrollLeft-document.documentElement.scrollLeft,y:a.y-document.body.scrollTop-document.documentElement.scrollTop}};this.scrollIntoView=function(a){(a=document.getElementById(a))&&a.scrollIntoView&&a.scrollIntoView(true)};this.getSelectionRange=function(a){if(document.selection)if(g.hasTag(a,"TEXTAREA")){var b=document.selection.createRange(),f=b.duplicate();f.moveToElementText(a);var k=0;if(b.text.length>1){k-=b.text.length;if(k<0)k=0}a=-1+k;for(f.moveStart("character",k);f.inRange(b);){f.moveStart("character");a++}b=b.text.replace(/\r/g,"");return{start:a,end:b.length+a}}else{f=$(a).val();a=document.selection.createRange().duplicate();a.moveEnd("character",f.length);b=a.text==""?f.length:f.lastIndexOf(a.text);a=document.selection.createRange().duplicate();a.moveStart("character",-f.length);return{start:b,end:a.text.length}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,f){var k=$(a).val();if(typeof b!="number")b=-1;if(typeof f!="number")f=-1;if(b<0)b=0;if(f>k.length)f=k.length;if(f<b)f=b;if(b>f)b=f;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=f}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",f-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};var Z=/^-?\d+(?:px)?$/i;this.px=function(a,b){a=w(a,b);if(a=="auto"||a==null)return 0;return Z.test(a)?parseFloat(a):0};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?g.isHidden(a):false}};this.pxself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.pctself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.IEwidth=function(a,b,f){if(a.parentNode){var k=a.parentNode.clientWidth-g.px(a,"marginLeft")-g.px(a,"marginRight")-g.px(a,"borderLeftWidth")-g.px(a,"borderRightWidth")-g.px(a.parentNode,"paddingLeft")-g.px(a.parentNode,"paddingRight"),h=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(b);b=(h=h&&h.length==2?h[1]:"0")?parseFloat(h):0;f=(h=(h=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(f))&&h.length==2?h[1]:"100000")?parseFloat(h):1E5;return k<b?b-1:k>f?f+1:a.style.styleFloat!=""?b-1:"auto"}else return"auto"};this.hide=function(a){g.getElement(a).style.display="none"};this.inline=function(a){g.getElement(a).style.display="inline"};this.block=function(a){g.getElement(a).style.display="block"};this.show=function(a){g.getElement(a).style.display=""};var B=null;this.firedTarget=null;this.target=function(a){return g.firedTarget||a.target||a.srcElement};var S=false,Y=false;this.capture=function(a){ca();if(!(B&&a)){B=a;var b=document.body;if(b.setCapture)a!=null?b.setCapture():b.releaseCapture();if(a!=null){$(b).addClass("unselectable");b.setAttribute("unselectable","on");b.onselectstart="return false;"}else{$(b).removeClass("unselectable");b.setAttribute("unselectable","off");b.onselectstart=""}}};this.checkReleaseCapture=function(a,b){B&&a==B&&b.type=="mouseup"&&this.capture(null)};this.getElementsByClassName=function(a,b){if(document.getElementsByClassName)return b.getElementsByClassName(a);else{b=b.getElementsByTagName("*");for(var f=[],k,h=0,o=b.length;h<o;h++){k=b[h];k.className.indexOf(a)!=-1&&f.push(k)}return f}};this.addCss=function(a,b){var f=document.styleSheets[0];f.insertRule(a+" { "+b+" }",f.cssRules.length)};this.addCssText=function(a){var b=document.getElementById("Wt-inline-css");if(!b){b=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(b)}if(b.styleSheet){var f=document.createElement("style");if(b)b.parentNode.insertBefore(f,b);else{f.id="Wt-inline-css";document.getElementsByTagName("head")[0].appendChild(f)}f.styleSheet.cssText=a}else{a=document.createTextNode(a);b.appendChild(a)}};this.getCssRule=function(a,b){a=a.toLowerCase();if(document.styleSheets)for(var f=0;f<document.styleSheets.length;f++){var k=document.styleSheets[f],h=0,o;do{o=null;if(k.cssRules)o=k.cssRules[h];else if(k.rules)o=k.rules[h];if(o&&o.selectorText)if(o.selectorText.toLowerCase()==a)if(b=="delete"){k.cssRules?k.deleteRule(h):k.removeRule(h);return true}else return o;++h}while(o)}return false};this.removeCssRule=function(a){return g.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var f=document.createElement("link");f.setAttribute("type","text/css");f.setAttribute("href",a);f.setAttribute("type","text/css");f.setAttribute("rel","stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,k,h){var o=g.windowSize(),E=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,s=g.widgetPageCoordinates(a.offsetParent),z=["left","right"],x=["top","bottom"],F=g.px(a,"maxWidth")||a.offsetWidth,v=g.px(a,"maxHeight")||a.offsetHeight;if(b+F>E+o.x){k-=s.x;b=a.offsetParent.offsetWidth-(k+g.px(a,"marginRight"));k=1}else{b-=s.x;b-=g.px(a,"marginLeft");k=0}if(f+v>u+o.y){if(h>u+o.y)h=u+o.y;h-=s.y;f=a.offsetParent.offsetHeight-(h+g.px(a,"marginBottom"));h=1}else{f-=s.y;f-=g.px(a,"marginTop");h=0}a.style[z[k]]=b+"px";a.style[z[1-k]]="";a.style[x[h]]=f+"px";a.style[x[1-h]]=""};this.positionXY=function(a,b,f){a=g.getElement(a);g.isHidden(a)||g.fitToWindow(a,b,f,b,f)};this.Horizontal=1;this.Vertical=2;this.positionAtWidget=function(a,b,f,k){a=g.getElement(a);b=g.getElement(b);var h=g.widgetPageCoordinates(b),o;if(k){a.parentNode.removeChild(a);$(".Wt-domRoot").get(0).appendChild(a)}a.style.display="block";if(f==g.Horizontal){f=h.x+b.offsetWidth;k=h.y;o=h.x;b=h.y+b.offsetHeight}else{f=h.x;k=h.y+b.offsetHeight;o=h.x+b.offsetWidth;b=h.y}g.fitToWindow(a,f,k,o,b)};this.hasFocus=function(a){return a==document.activeElement};this.history=function(){function a(){var l,p;p=location.href;l=p.indexOf("#");return l>=0?p.substr(l+1):null}function b(){v.value=G+"|"+C;if(u)v.value+="|"+M.join(",")}function f(l){if(l){if(!l||C!==l){C=l||G;H(unescape(C))}}else{C=G;H(unescape(C))}}function k(l){var p;l='<html><body><div id="state">'+l+"</div></body></html>";try{p=F.contentWindow.document;p.open();p.write(l);p.close();return true}catch(q){return false}}function h(){var l,p,q,m;if(!F.contentWindow||!F.contentWindow.document)setTimeout(h,10);else{l=F.contentWindow.document;q=(p=l.getElementById("state"))?p.innerText:null;m=a();setInterval(function(){var N,J;l=F.contentWindow.document;N=(p=l.getElementById("state"))?p.innerText:null;J=a();if(N!==q){q=N;f(q);J=q?q:G;m=location.hash=J;b()}else if(J!==m){m=J;k(J)}},50);I=true;x!=null&&x()}}function o(){if(!s){var l=a(),p=history.length;U&&clearInterval(U);U=setInterval(function(){var q,m;q=a();m=history.length;if(q!==l){l=q;p=m;f(l);b()}else if(m!==p&&u){l=q;p=m;q=M[p-1];f(q);b()}},50)}}function E(){var l;l=v.value.split("|");if(l.length>1){G=l[0];C=l[1]}if(l.length>2)M=l[2].split(",");if(s)h();else{o();I=true;x!=null&&x()}}var u=false,s=false,z=false,x=null,F=null,v=null,I=false,U=null,M=[],G,C,H=function(){};return{onReady:function(l){if(I)setTimeout(function(){l()},0);else x=l},_initialize:function(){v!=null&&E()},_initTimeout:function(){o()},register:function(l,p){if(!I){C=G=escape(l);H=p}},initialize:function(l,p){if(!I){var q=navigator.vendor||"";if(q!=="KDE")if(typeof window.opera!=="undefined")z=true;else if(typeof document.all!=="undefined")s=true;else if(q.indexOf("Apple Computer, Inc.")>-1)u=true;if(typeof l==="string")l=document.getElementById(l);if(!(!l||l.tagName.toUpperCase()!=="TEXTAREA"&&(l.tagName.toUpperCase()!=="INPUT"||l.type!=="hidden"&&l.type!=="text"))){v=l;if(s){if(typeof p==="string")p=document.getElementById(p);!p||p.tagName.toUpperCase()!=="IFRAME"||(F=p)}}}},navigate:function(l){if(I){fqstate=l;if(s)k(fqstate);else{location.hash=fqstate;if(u){M[history.length]=fqstate;b()}}}},getCurrentState:function(){if(!I)return"";return C}}}()}),_$_APP_CLASS_$_=new (function(){function w(d){d=m.pageCoordinates(d);N=d.x;J=d.y}function t(){var d=m.history.getCurrentState();if(O!=d){O=d;setTimeout(function(){z(null,"hash",null,true)},1)}}function D(d){if(O!=d){O=d;m.history.navigate(escape(d))}}function T(){window.onresize=function(){E()};document.body.ondragstart=function(){return false}}function ca(d,c){var e=aa;e.object=m.getElement(d.getAttribute("dwid"));if(e.object== |
var ver; | var fo, ver; | (function() { var IE = document.all, URL = 'http://www.adobe.com/go/getflashplayer', JQUERY = typeof jQuery == 'function', RE = /(\d+)[^\d]+(\d+)[^\d]*(\d*)/, GLOBAL_OPTS = { // very common opts width: '100%', height: '100%', id: "_" + ("" + Math.random()).slice(9), // flashembed defaults allowfullscreen: true, allowscriptaccess: 'always', quality: 'high', // flashembed specific options version: [3, 0], onFail: null, expressInstall: null, w3c: false, cachebusting: false }; // version 9 bugfix: (http://blog.deconcept.com/2006/07/28/swfobject-143-released/) if (window.attachEvent) { window.attachEvent("onbeforeunload", function() { __flash_unloadHandler = function() {}; __flash_savedUnloadHandler = function() {}; }); } // simple extend function extend(to, from) { if (from) { for (var key in from) { if (from.hasOwnProperty(key)) { to[key] = from[key]; } } } return to; } // used by asString method function map(arr, func) { var newArr = []; for (var i in arr) { if (arr.hasOwnProperty(i)) { newArr[i] = func(arr[i]); } } return newArr; } window.flashembed = function(root, opts, conf) { // root must be found / loaded if (typeof root == 'string') { root = document.getElementById(root.replace("#", "")); } // not found if (!root) { return; } if (typeof opts == 'string') { opts = {src: opts}; } return new Flash(root, extend(extend({}, GLOBAL_OPTS), opts), conf); }; // flashembed "static" API var f = extend(window.flashembed, { conf: GLOBAL_OPTS, getVersion: function() { var ver; try { ver = navigator.plugins["Shockwave Flash"].description.slice(16); } catch(e) { try { var fo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); ver = fo && fo.GetVariable("$version"); } catch(err) { } } ver = RE.exec(ver); return ver ? [ver[1], ver[3]] : [0, 0]; }, asString: function(obj) { if (obj === null || obj === undefined) { return null; } var type = typeof obj; if (type == 'object' && obj.push) { type = 'array'; } switch (type){ case 'string': obj = obj.replace(new RegExp('(["\\\\])', 'g'), '\\$1'); // flash does not handle %- characters well. transforms "50%" to "50pct" (a dirty hack, I admit) obj = obj.replace(/^\s?(\d+\.?\d+)%/, "$1pct"); return '"' +obj+ '"'; case 'array': return '['+ map(obj, function(el) { return f.asString(el); }).join(',') +']'; case 'function': return '"function()"'; case 'object': var str = []; for (var prop in obj) { if (obj.hasOwnProperty(prop)) { str.push('"'+prop+'":'+ f.asString(obj[prop])); } } return '{'+str.join(',')+'}'; } // replace ' --> " and remove spaces return String(obj).replace(/\s/g, " ").replace(/\'/g, "\""); }, getHTML: function(opts, conf) { opts = extend({}, opts); /******* OBJECT tag and it's attributes *******/ var html = '<object width="' + opts.width + '" height="' + opts.height + '" id="' + opts.id + '" name="' + opts.id + '"'; if (opts.cachebusting) { opts.src += ((opts.src.indexOf("?") != -1 ? "&" : "?") + Math.random()); } if (opts.w3c || !IE) { html += ' data="' +opts.src+ '" type="application/x-shockwave-flash"'; } else { html += ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'; } html += '>'; /******* nested PARAM tags *******/ if (opts.w3c || IE) { html += '<param name="movie" value="' +opts.src+ '" />'; } // not allowed params opts.width = opts.height = opts.id = opts.w3c = opts.src = null; opts.onFail = opts.version = opts.expressInstall = null; for (var key in opts) { if (opts[key]) { html += '<param name="'+ key +'" value="'+ opts[key] +'" />'; } } /******* FLASHVARS *******/ var vars = ""; if (conf) { for (var k in conf) { if (conf[k]) { var val = conf[k]; vars += k +'='+ (/function|object/.test(typeof val) ? f.asString(val) : val) + '&'; } } vars = vars.slice(0, -1); html += '<param name="flashvars" value=\'' + vars + '\' />'; } html += "</object>"; return html; }, isSupported: function(ver) { return VERSION[0] > ver[0] || VERSION[0] == ver[0] && VERSION[1] >= ver[1]; } }); var VERSION = f.getVersion(); function Flash(root, opts, conf) { // version is ok if (f.isSupported(opts.version)) { root.innerHTML = f.getHTML(opts, conf); // express install } else if (opts.expressInstall && f.isSupported([6, 65])) { root.innerHTML = f.getHTML(extend(opts, {src: opts.expressInstall}), { MMredirectURL: location.href, MMplayerType: 'PlugIn', MMdoctitle: document.title }); } else { // fail #2.1 custom content inside container if (!root.innerHTML.replace(/\s/g, '')) { root.innerHTML = "<h2>Flash version " + opts.version + " or greater is required</h2>" + "<h3>" + (VERSION[0] > 0 ? "Your version is " + VERSION : "You have no flash plugin installed") + "</h3>" + (root.tagName == 'A' ? "<p>Click here to download latest version</p>" : "<p>Download latest version from <a href='" + URL + "'>here</a></p>"); if (root.tagName == 'A') { root.onclick = function() { location.href = URL; }; } } // onFail if (opts.onFail) { var ret = opts.onFail.call(this); if (typeof ret == 'string') { root.innerHTML = ret; } } } // http://flowplayer.org/forum/8/18186#post-18593 if (IE) { window[opts.id] = document.getElementById(opts.id); } // API methods for callback extend(this, { getRoot: function() { return root; }, getOptions: function() { return opts; }, getConf: function() { return conf; }, getApi: function() { return root.firstChild; } }); } // setup jquery support if (JQUERY) { // tools version number jQuery.tools = jQuery.tools || {version: '@VERSION'}; jQuery.tools.flashembed = { conf: GLOBAL_OPTS }; jQuery.fn.flashembed = function(opts, conf) { return this.each(function() { $(this).data("flashembed", flashembed(this, opts, conf)); }); }; } })(); |
var fo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); ver = fo && fo.GetVariable("$version"); | fo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); ver = fo && fo.GetVariable("$version"); | (function() { var IE = document.all, URL = 'http://www.adobe.com/go/getflashplayer', JQUERY = typeof jQuery == 'function', RE = /(\d+)[^\d]+(\d+)[^\d]*(\d*)/, GLOBAL_OPTS = { // very common opts width: '100%', height: '100%', id: "_" + ("" + Math.random()).slice(9), // flashembed defaults allowfullscreen: true, allowscriptaccess: 'always', quality: 'high', // flashembed specific options version: [3, 0], onFail: null, expressInstall: null, w3c: false, cachebusting: false }; // version 9 bugfix: (http://blog.deconcept.com/2006/07/28/swfobject-143-released/) if (window.attachEvent) { window.attachEvent("onbeforeunload", function() { __flash_unloadHandler = function() {}; __flash_savedUnloadHandler = function() {}; }); } // simple extend function extend(to, from) { if (from) { for (var key in from) { if (from.hasOwnProperty(key)) { to[key] = from[key]; } } } return to; } // used by asString method function map(arr, func) { var newArr = []; for (var i in arr) { if (arr.hasOwnProperty(i)) { newArr[i] = func(arr[i]); } } return newArr; } window.flashembed = function(root, opts, conf) { // root must be found / loaded if (typeof root == 'string') { root = document.getElementById(root.replace("#", "")); } // not found if (!root) { return; } if (typeof opts == 'string') { opts = {src: opts}; } return new Flash(root, extend(extend({}, GLOBAL_OPTS), opts), conf); }; // flashembed "static" API var f = extend(window.flashembed, { conf: GLOBAL_OPTS, getVersion: function() { var ver; try { ver = navigator.plugins["Shockwave Flash"].description.slice(16); } catch(e) { try { var fo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); ver = fo && fo.GetVariable("$version"); } catch(err) { } } ver = RE.exec(ver); return ver ? [ver[1], ver[3]] : [0, 0]; }, asString: function(obj) { if (obj === null || obj === undefined) { return null; } var type = typeof obj; if (type == 'object' && obj.push) { type = 'array'; } switch (type){ case 'string': obj = obj.replace(new RegExp('(["\\\\])', 'g'), '\\$1'); // flash does not handle %- characters well. transforms "50%" to "50pct" (a dirty hack, I admit) obj = obj.replace(/^\s?(\d+\.?\d+)%/, "$1pct"); return '"' +obj+ '"'; case 'array': return '['+ map(obj, function(el) { return f.asString(el); }).join(',') +']'; case 'function': return '"function()"'; case 'object': var str = []; for (var prop in obj) { if (obj.hasOwnProperty(prop)) { str.push('"'+prop+'":'+ f.asString(obj[prop])); } } return '{'+str.join(',')+'}'; } // replace ' --> " and remove spaces return String(obj).replace(/\s/g, " ").replace(/\'/g, "\""); }, getHTML: function(opts, conf) { opts = extend({}, opts); /******* OBJECT tag and it's attributes *******/ var html = '<object width="' + opts.width + '" height="' + opts.height + '" id="' + opts.id + '" name="' + opts.id + '"'; if (opts.cachebusting) { opts.src += ((opts.src.indexOf("?") != -1 ? "&" : "?") + Math.random()); } if (opts.w3c || !IE) { html += ' data="' +opts.src+ '" type="application/x-shockwave-flash"'; } else { html += ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'; } html += '>'; /******* nested PARAM tags *******/ if (opts.w3c || IE) { html += '<param name="movie" value="' +opts.src+ '" />'; } // not allowed params opts.width = opts.height = opts.id = opts.w3c = opts.src = null; opts.onFail = opts.version = opts.expressInstall = null; for (var key in opts) { if (opts[key]) { html += '<param name="'+ key +'" value="'+ opts[key] +'" />'; } } /******* FLASHVARS *******/ var vars = ""; if (conf) { for (var k in conf) { if (conf[k]) { var val = conf[k]; vars += k +'='+ (/function|object/.test(typeof val) ? f.asString(val) : val) + '&'; } } vars = vars.slice(0, -1); html += '<param name="flashvars" value=\'' + vars + '\' />'; } html += "</object>"; return html; }, isSupported: function(ver) { return VERSION[0] > ver[0] || VERSION[0] == ver[0] && VERSION[1] >= ver[1]; } }); var VERSION = f.getVersion(); function Flash(root, opts, conf) { // version is ok if (f.isSupported(opts.version)) { root.innerHTML = f.getHTML(opts, conf); // express install } else if (opts.expressInstall && f.isSupported([6, 65])) { root.innerHTML = f.getHTML(extend(opts, {src: opts.expressInstall}), { MMredirectURL: location.href, MMplayerType: 'PlugIn', MMdoctitle: document.title }); } else { // fail #2.1 custom content inside container if (!root.innerHTML.replace(/\s/g, '')) { root.innerHTML = "<h2>Flash version " + opts.version + " or greater is required</h2>" + "<h3>" + (VERSION[0] > 0 ? "Your version is " + VERSION : "You have no flash plugin installed") + "</h3>" + (root.tagName == 'A' ? "<p>Click here to download latest version</p>" : "<p>Download latest version from <a href='" + URL + "'>here</a></p>"); if (root.tagName == 'A') { root.onclick = function() { location.href = URL; }; } } // onFail if (opts.onFail) { var ret = opts.onFail.call(this); if (typeof ret == 'string') { root.innerHTML = ret; } } } // http://flowplayer.org/forum/8/18186#post-18593 if (IE) { window[opts.id] = document.getElementById(opts.id); } // API methods for callback extend(this, { getRoot: function() { return root; }, getOptions: function() { return opts; }, getConf: function() { return conf; }, getApi: function() { return root.firstChild; } }); } // setup jquery support if (JQUERY) { // tools version number jQuery.tools = jQuery.tools || {version: '@VERSION'}; jQuery.tools.flashembed = { conf: GLOBAL_OPTS }; jQuery.fn.flashembed = function(opts, conf) { return this.each(function() { $(this).data("flashembed", flashembed(this, opts, conf)); }); }; } })(); |
try { fo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); ver = fo && fo.GetVariable("$version"); } catch(err2) { } | (function() { var IE = document.all, URL = 'http://www.adobe.com/go/getflashplayer', JQUERY = typeof jQuery == 'function', RE = /(\d+)[^\d]+(\d+)[^\d]*(\d*)/, GLOBAL_OPTS = { // very common opts width: '100%', height: '100%', id: "_" + ("" + Math.random()).slice(9), // flashembed defaults allowfullscreen: true, allowscriptaccess: 'always', quality: 'high', // flashembed specific options version: [3, 0], onFail: null, expressInstall: null, w3c: false, cachebusting: false }; // version 9 bugfix: (http://blog.deconcept.com/2006/07/28/swfobject-143-released/) if (window.attachEvent) { window.attachEvent("onbeforeunload", function() { __flash_unloadHandler = function() {}; __flash_savedUnloadHandler = function() {}; }); } // simple extend function extend(to, from) { if (from) { for (var key in from) { if (from.hasOwnProperty(key)) { to[key] = from[key]; } } } return to; } // used by asString method function map(arr, func) { var newArr = []; for (var i in arr) { if (arr.hasOwnProperty(i)) { newArr[i] = func(arr[i]); } } return newArr; } window.flashembed = function(root, opts, conf) { // root must be found / loaded if (typeof root == 'string') { root = document.getElementById(root.replace("#", "")); } // not found if (!root) { return; } if (typeof opts == 'string') { opts = {src: opts}; } return new Flash(root, extend(extend({}, GLOBAL_OPTS), opts), conf); }; // flashembed "static" API var f = extend(window.flashembed, { conf: GLOBAL_OPTS, getVersion: function() { var ver; try { ver = navigator.plugins["Shockwave Flash"].description.slice(16); } catch(e) { try { var fo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); ver = fo && fo.GetVariable("$version"); } catch(err) { } } ver = RE.exec(ver); return ver ? [ver[1], ver[3]] : [0, 0]; }, asString: function(obj) { if (obj === null || obj === undefined) { return null; } var type = typeof obj; if (type == 'object' && obj.push) { type = 'array'; } switch (type){ case 'string': obj = obj.replace(new RegExp('(["\\\\])', 'g'), '\\$1'); // flash does not handle %- characters well. transforms "50%" to "50pct" (a dirty hack, I admit) obj = obj.replace(/^\s?(\d+\.?\d+)%/, "$1pct"); return '"' +obj+ '"'; case 'array': return '['+ map(obj, function(el) { return f.asString(el); }).join(',') +']'; case 'function': return '"function()"'; case 'object': var str = []; for (var prop in obj) { if (obj.hasOwnProperty(prop)) { str.push('"'+prop+'":'+ f.asString(obj[prop])); } } return '{'+str.join(',')+'}'; } // replace ' --> " and remove spaces return String(obj).replace(/\s/g, " ").replace(/\'/g, "\""); }, getHTML: function(opts, conf) { opts = extend({}, opts); /******* OBJECT tag and it's attributes *******/ var html = '<object width="' + opts.width + '" height="' + opts.height + '" id="' + opts.id + '" name="' + opts.id + '"'; if (opts.cachebusting) { opts.src += ((opts.src.indexOf("?") != -1 ? "&" : "?") + Math.random()); } if (opts.w3c || !IE) { html += ' data="' +opts.src+ '" type="application/x-shockwave-flash"'; } else { html += ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'; } html += '>'; /******* nested PARAM tags *******/ if (opts.w3c || IE) { html += '<param name="movie" value="' +opts.src+ '" />'; } // not allowed params opts.width = opts.height = opts.id = opts.w3c = opts.src = null; opts.onFail = opts.version = opts.expressInstall = null; for (var key in opts) { if (opts[key]) { html += '<param name="'+ key +'" value="'+ opts[key] +'" />'; } } /******* FLASHVARS *******/ var vars = ""; if (conf) { for (var k in conf) { if (conf[k]) { var val = conf[k]; vars += k +'='+ (/function|object/.test(typeof val) ? f.asString(val) : val) + '&'; } } vars = vars.slice(0, -1); html += '<param name="flashvars" value=\'' + vars + '\' />'; } html += "</object>"; return html; }, isSupported: function(ver) { return VERSION[0] > ver[0] || VERSION[0] == ver[0] && VERSION[1] >= ver[1]; } }); var VERSION = f.getVersion(); function Flash(root, opts, conf) { // version is ok if (f.isSupported(opts.version)) { root.innerHTML = f.getHTML(opts, conf); // express install } else if (opts.expressInstall && f.isSupported([6, 65])) { root.innerHTML = f.getHTML(extend(opts, {src: opts.expressInstall}), { MMredirectURL: location.href, MMplayerType: 'PlugIn', MMdoctitle: document.title }); } else { // fail #2.1 custom content inside container if (!root.innerHTML.replace(/\s/g, '')) { root.innerHTML = "<h2>Flash version " + opts.version + " or greater is required</h2>" + "<h3>" + (VERSION[0] > 0 ? "Your version is " + VERSION : "You have no flash plugin installed") + "</h3>" + (root.tagName == 'A' ? "<p>Click here to download latest version</p>" : "<p>Download latest version from <a href='" + URL + "'>here</a></p>"); if (root.tagName == 'A') { root.onclick = function() { location.href = URL; }; } } // onFail if (opts.onFail) { var ret = opts.onFail.call(this); if (typeof ret == 'string') { root.innerHTML = ret; } } } // http://flowplayer.org/forum/8/18186#post-18593 if (IE) { window[opts.id] = document.getElementById(opts.id); } // API methods for callback extend(this, { getRoot: function() { return root; }, getOptions: function() { return opts; }, getConf: function() { return conf; }, getApi: function() { return root.firstChild; } }); } // setup jquery support if (JQUERY) { // tools version number jQuery.tools = jQuery.tools || {version: '@VERSION'}; jQuery.tools.flashembed = { conf: GLOBAL_OPTS }; jQuery.fn.flashembed = function(opts, conf) { return this.each(function() { $(this).data("flashembed", flashembed(this, opts, conf)); }); }; } })(); |
|
0)m-=b.offsetHeight;else d+=i.stretch[n];++n}}m=m>r?m:r;if(d!=0&&m>0){r=m;var p;n=h=0;for(k=e.rows.length;h<k;h++)if(e.rows[h].className!="Wt-hrh"){b=e.rows[h];if(i.stretch[n]!=0){if(i.stretch[n]!=-1){p=m*i.stretch[n]/d;p=r>p?p:r;p=Math.round(i.minheight[n]>p?i.minheight[n]:p);r-=p}else p=b.offsetHeight;this.adjustRow(b,p)}++n}}e.w=g.clientWidth;e.h=g.clientHeight;if(e.style.tableLayout!="fixed")return true;d=0;n=e.childNodes;g=0;for(m=n.length;g<m;g++){r=n[g];var x,z,y;if(a.hasTag(r,"COLGROUP")){g= -1;n=r.childNodes;m=n.length}if(a.hasTag(r,"COL")){if(a.pctself(r,"width")==0){h=p=0;for(k=e.rows.length;h<k;h++){b=e.rows[h];b=b.childNodes;z=x=0;for(y=b.length;z<y;z++){u=b[z];if(u.colSpan==1&&x==d&&u.childNodes.length==1){b=u.firstChild;b=b.offsetWidth+o.marginH(b);p=Math.max(p,b);break}x+=u.colSpan;if(x>d)break}}if(p>0&&a.pxself(r,"width")!=p)r.style.width=p+"px"}++d}}return true};this.adjust()}); | 0)m-=b.offsetHeight;else d+=i.stretch[n];++n}}m=m>r?m:r;if(d!=0&&m>0){r=m;var p;n=h=0;for(k=e.rows.length;h<k;h++)if(e.rows[h].className!="Wt-hrh"){b=e.rows[h];if(i.stretch[n]!=0){if(i.stretch[n]!=-1){p=m*i.stretch[n]/d;p=r>p?p:r;p=Math.round(i.minheight[n]>p?i.minheight[n]:p);r-=p}else p=b.offsetHeight;this.adjustRow(b,p)}++n}}e.w=g.clientWidth;e.h=g.clientHeight;if(e.style.tableLayout!="fixed")return true;d=0;n=e.childNodes;g=0;for(m=n.length;g<m;g++){r=n[g];var y,A,z;if(a.hasTag(r,"COLGROUP")){g= -1;n=r.childNodes;m=n.length}if(a.hasTag(r,"COL")){if(a.pctself(r,"width")==0){h=p=0;for(k=e.rows.length;h<k;h++){b=e.rows[h];b=b.childNodes;A=y=0;for(z=b.length;A<z;A++){u=b[A];if(u.colSpan==1&&y==d&&u.childNodes.length==1){b=u.firstChild;b=b.offsetWidth+o.marginH(b);p=Math.max(p,b);break}y+=u.colSpan;if(y>d)break}}if(p>0&&a.pxself(r,"width")!=p)r.style.width=p+"px"}++d}}return true};this.adjust()}); | WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,t,i){var o=this;this.getId=function(){return t};this.WT=a;this.marginH=function(d){var e=d.parentNode,g=a.px(d,"marginLeft");g+=a.px(d,"marginRight");g+=a.px(d,"borderLeftWidth");g+=a.px(d,"borderRightWidth");g+=a.px(e,"paddingLeft");g+=a.px(e,"paddingRight");return g};this.marginV=function(d){var e=a.px(d,"marginTop");e+=a.px(d,"marginBottom");e+=a.px(d,"borderTopWidth");e+=a.px(d,"borderBottomWidth");e+=a.px(d,"paddingTop");e+=a.px(d,"paddingBottom");return e};this.adjustRow=function(d,e){if(d.style.height!=e+"px")d.style.height=e+"px";d=d.childNodes;var g,m,h;g=0;for(m=d.length;g<m;++g){h=d[g];var k=e;k-=a.pxself(h,"paddingTop");k-=a.pxself(h,"paddingBottom");if(k<=0)k=0;h.style.height=k+"px";if(!(h.style.verticalAlign||h.childNodes.length==0)){var b=h.childNodes[0];if(k<=0)k=0;if(b.className=="Wt-hcenter"){b.style.height=k+"px";b=b.firstChild.firstChild;if(!a.hasTag(b,"TD"))b=b.firstChild;if(b.style.height!=k+"px")b.style.height=k+"px";b=b.firstChild}if(h.childNodes.length==1)k-=this.marginV(b);if(k<=0)k=0;if(!a.hasTag(b,"TABLE"))if(b.wtResize){h=b.parentNode.offsetWidth-o.marginH(b);b.wtResize(b,h,k)}else if(b.style.height!=k+"px"){b.style.height=k+"px";if(b.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(b.firstChild,"TEXTAREA"))b.firstChild.style.height=k-a.pxself(b,"marginBottom")+"px"}}}};this.adjust=function(){var d=a.getElement(t);if(!d)return false;o.initResize&&o.initResize(a,t,i);if(a.isHidden(d))return true;var e=d.firstChild,g=d.parentNode;if(e.style.height!="")e.style.height="";if(!(d.dirty||e.w!=g.clientWidth||e.h!=g.clientHeight))return true;d.dirty=null;var m=a.pxself(g,"height");if(m==0){m=g.clientHeight;m-=a.px(g,"paddingTop");m-=a.px(g,"paddingBottom")}m-=a.px(d,"marginTop");m-=a.px(d,"marginBottom");var h,k;if(g.children){h=0;for(k=g.children.length;h<k;++h){var b=g.children[h];if(b!=d)m-=$(b).outerHeight()}}var r=d=0,n,u;n=h=0;for(k=e.rows.length;h<k;h++){b=e.rows[h];if(b.className=="Wt-hrh")m-=b.offsetHeight;else{r+=i.minheight[n];if(i.stretch[n]<=0)m-=b.offsetHeight;else d+=i.stretch[n];++n}}m=m>r?m:r;if(d!=0&&m>0){r=m;var p;n=h=0;for(k=e.rows.length;h<k;h++)if(e.rows[h].className!="Wt-hrh"){b=e.rows[h];if(i.stretch[n]!=0){if(i.stretch[n]!=-1){p=m*i.stretch[n]/d;p=r>p?p:r;p=Math.round(i.minheight[n]>p?i.minheight[n]:p);r-=p}else p=b.offsetHeight;this.adjustRow(b,p)}++n}}e.w=g.clientWidth;e.h=g.clientHeight;if(e.style.tableLayout!="fixed")return true;d=0;n=e.childNodes;g=0;for(m=n.length;g<m;g++){r=n[g];var x,z,y;if(a.hasTag(r,"COLGROUP")){g=-1;n=r.childNodes;m=n.length}if(a.hasTag(r,"COL")){if(a.pctself(r,"width")==0){h=p=0;for(k=e.rows.length;h<k;h++){b=e.rows[h];b=b.childNodes;z=x=0;for(y=b.length;z<y;z++){u=b[z];if(u.colSpan==1&&x==d&&u.childNodes.length==1){b=u.firstChild;b=b.offsetWidth+o.marginH(b);p=Math.max(p,b);break}x+=u.colSpan;if(x>d)break}}if(p>0&&a.pxself(r,"width")!=p)r.style.width=p+"px"}++d}}return true};this.adjust()}); |
(function(e){var d=e.DOM,b=e.dom.Event,h=e.extend,f=e.each,a=e.util.Cookie,g,c=e.explode;e.ThemeManager.requireLangPack("advanced");e.create("tinymce.themes.AdvancedTheme",{sizes:[8,10,12,14,18,24,36],controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],justifyfull:["justifyfull_desc","JustifyFull"],bullist:["bullist_desc","InsertUnorderedList"],numlist:["numlist_desc","InsertOrderedList"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],cut:["cut_desc","Cut"],copy:["copy_desc","Copy"],paste:["paste_desc","Paste"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],link:["link_desc","mceLink"],unlink:["unlink_desc","unlink"],image:["image_desc","mceImage"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc","mceCodeEditor"],hr:["hr_desc","InsertHorizontalRule"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","mceForeColor"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","mceBackColor"],charmap:["charmap_desc","mceCharMap"],visualaid:["visualaid_desc","mceToggleVisualAid"],anchor:["anchor_desc","mceInsertAnchor"],newdocument:["newdocument_desc","mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","bullist","numlist","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],init:function(j,k){var l=this,m,i,n;l.editor=j;l.url=k;l.onResolveName=new e.util.Dispatcher(this);l.settings=m=h({theme_advanced_path:true,theme_advanced_toolbar_location:"bottom",theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"center",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",readonly:j.settings.readonly},j.settings);if(!m.font_size_style_values){m.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(e.is(m.theme_advanced_font_sizes,"string")){m.font_size_style_values=e.explode(m.font_size_style_values);m.font_size_classes=e.explode(m.font_size_classes||"");n={};j.settings.theme_advanced_font_sizes=m.theme_advanced_font_sizes;f(j.getParam("theme_advanced_font_sizes","","hash"),function(q,p){var o;if(p==q&&q>=1&&q<=7){p=q+" ("+l.sizes[q-1]+"pt)";o=m.font_size_classes[q-1];q=m.font_size_style_values[q-1]||(l.sizes[q-1]+"pt")}if(/^\s*\./.test(q)){o=q.replace(/\./g,"")}n[p]=o?{"class":o}:{fontSize:q}});m.theme_advanced_font_sizes=n}if((i=m.theme_advanced_path_location)&&i!="none"){m.theme_advanced_statusbar_location=m.theme_advanced_path_location}if(m.theme_advanced_statusbar_location=="none"){m.theme_advanced_statusbar_location=0}j.onInit.add(function(){if(!j.settings.readonly){j.onNodeChange.add(l._nodeChanged,l)}if(j.settings.content_css!==false){j.dom.loadCSS(j.baseURI.toAbsolute("themes/advanced/skins/"+j.settings.skin+"/content.css"))}});j.onSetProgressState.add(function(q,o,r){var s,t=q.id,p;if(o){l.progressTimer=setTimeout(function(){s=q.getContainer();s=s.insertBefore(d.create("DIV",{style:"position:relative"}),s.firstChild);p=d.get(q.id+"_tbl");d.add(s,"div",{id:t+"_blocker","class":"mceBlocker",style:{width:p.clientWidth+2,height:p.clientHeight+2}});d.add(s,"div",{id:t+"_progress","class":"mceProgress",style:{left:p.clientWidth/2,top:p.clientHeight/2}})},r||0)}else{d.remove(t+"_blocker");d.remove(t+"_progress");clearTimeout(l.progressTimer)}});d.loadCSS(m.editor_css?j.documentBaseURI.toAbsolute(m.editor_css):k+"/skins/"+j.settings.skin+"/ui.css");if(m.skin_variant){d.loadCSS(k+"/skins/"+j.settings.skin+"/ui_"+m.skin_variant+".css")}},createControl:function(l,i){var j,k;if(k=i.createControl(l)){return k}switch(l){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}if((j=this.controls[l])){return i.createButton(l,{title:"advanced."+j[0],cmd:j[1],ui:j[2],value:j[3]})}},execCommand:function(k,j,l){var i=this["_"+k];if(i){i.call(this,j,l);return true}return false},_importClasses:function(k){var i=this.editor,j=i.controlManager.get("styleselect");if(j.getLength()==0){f(i.dom.getClasses(),function(n,l){var m="style_"+l;i.formatter.register(m,{inline:"span",attributes:{"class":n["class"]},selector:"*"});j.add(n["class"],m)})}},_createStyleSelect:function(m){var k=this,i=k.editor,j=i.controlManager,l;l=j.createListBox("styleselect",{title:"advanced.style_select",onselect:function(o){var p,n=[];f(l.items,function(q){n.push(q.value)});i.focus();i.undoManager.add();p=i.formatter.matchAll(n);if(p[0]==o){i.formatter.remove(o)}else{i.formatter.apply(o)}i.undoManager.add();i.nodeChanged();return false}});i.onInit.add(function(){var o=0,n=i.getParam("style_formats");if(n){f(n,function(p){var q,r=0;f(p,function(){r++});if(r>1){q=p.name=p.name||"style_"+(o++);i.formatter.register(q,p);l.add(p.title,q)}else{l.add(p.title)}})}else{f(i.getParam("theme_advanced_styles","","hash"),function(r,q){var p;if(r){p="style_"+(o++);i.formatter.register(p,{inline:"span",classes:r,selector:"*"});l.add(k.editor.translate(q),p)}})}});if(l.getLength()==0){l.onPostRender.add(function(o,p){if(!l.NativeListBox){b.add(p.id+"_text","focus",k._importClasses,k);b.add(p.id+"_text","mousedown",k._importClasses,k);b.add(p.id+"_open","focus",k._importClasses,k);b.add(p.id+"_open","mousedown",k._importClasses,k)}else{b.add(p.id,"focus",k._importClasses,k)}})}return l},_createFontSelect:function(){var k,j=this,i=j.editor;k=i.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(l){i.execCommand("FontName",false,l);k.select(function(m){return l==m});return false}});if(k){f(i.getParam("theme_advanced_fonts",j.settings.theme_advanced_fonts,"hash"),function(m,l){k.add(i.translate(l),m,{style:m.indexOf("dings")==-1?"font-family:"+m:""})})}return k},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(i){if(i["class"]){k.focus();k.undoManager.add();k.formatter.toggle("fontsize_class",{value:i["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,i.fontSize)}n.select(function(o){return i==o});return false}});if(n){f(m.settings.theme_advanced_font_sizes,function(o,i){var p=o.fontSize;if(p>=1&&p<=7){p=m.sizes[parseInt(p)-1]+"pt"}n.add(i,o,{style:"font-size:"+p,"class":"mceFontSize"+(l++)+(" "+(o["class"]||""))})})}return n},_createBlockFormats:function(){var k,i={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",samp:"advanced.samp"},j=this;k=j.editor.controlManager.createListBox("formatselect",{title:"advanced.block",cmd:"FormatBlock"});if(k){f(j.editor.getParam("theme_advanced_blockformats",j.settings.theme_advanced_blockformats,"hash"),function(m,l){k.add(j.editor.translate(l!=m?l:i[m]),m,{"class":"mce_formatPreview mce_"+m})})}return k},_createForeColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_text_colors){l.colors=i}if(k.theme_advanced_default_foreground_color){l.default_color=k.theme_advanced_default_foreground_color}l.title="advanced.forecolor_desc";l.cmd="ForeColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("forecolor",l);return m},_createBackColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_background_colors){l.colors=i}if(k.theme_advanced_default_background_color){l.default_color=k.theme_advanced_default_background_color}l.title="advanced.backcolor_desc";l.cmd="HiliteColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("backcolor",l);return m},renderUI:function(k){var m,l,q,v=this,r=v.editor,w=v.settings,u,j,i;m=j=d.create("span",{id:r.id+"_parent","class":"mceEditor "+r.settings.skin+"Skin"+(w.skin_variant?" "+r.settings.skin+"Skin"+v._ufirst(w.skin_variant):"")});if(!d.boxModel){m=d.add(m,"div",{"class":"mceOldBoxModel"})}m=u=d.add(m,"table",{id:r.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});m=q=d.add(m,"tbody");switch((w.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":l=v._rowLayout(w,q,k);break;case"customlayout":l=r.execCallback("theme_advanced_custom_layout",w,q,k,j);break;default:l=v._simpleLayout(w,q,k,j)}m=k.targetNode;i=d.stdMode?u.getElementsByTagName("tr"):u.rows;d.addClass(i[0],"mceFirst");d.addClass(i[i.length-1],"mceLast");f(d.select("tr",q),function(o){d.addClass(o.firstChild,"mceFirst");d.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(d.get(w.theme_advanced_toolbar_container)){d.get(w.theme_advanced_toolbar_container).appendChild(j)}else{d.insertAfter(j,m)}b.add(r.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){v._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return b.cancel(n)}});if(!r.getParam("accessibility_focus")){b.add(d.add(j,"a",{href:"#"},"<!-- IE -->"),"focus",function(){tinyMCE.get(r.id).focus()})}if(w.theme_advanced_toolbar_location=="external"){k.deltaHeight=0}v.deltaHeight=k.deltaHeight;k.targetNode=null;return{iframeContainer:l,editorContainer:r.id+"_parent",sizeContainer:u,deltaHeight:k.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http: | (function(e){var d=e.DOM,b=e.dom.Event,h=e.extend,f=e.each,a=e.util.Cookie,g,c=e.explode;e.ThemeManager.requireLangPack("advanced");e.create("tinymce.themes.AdvancedTheme",{sizes:[8,10,12,14,18,24,36],controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],justifyfull:["justifyfull_desc","JustifyFull"],bullist:["bullist_desc","InsertUnorderedList"],numlist:["numlist_desc","InsertOrderedList"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],cut:["cut_desc","Cut"],copy:["copy_desc","Copy"],paste:["paste_desc","Paste"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],link:["link_desc","mceLink"],unlink:["unlink_desc","unlink"],image:["image_desc","mceImage"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc","mceCodeEditor"],hr:["hr_desc","InsertHorizontalRule"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","mceForeColor"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","mceBackColor"],charmap:["charmap_desc","mceCharMap"],visualaid:["visualaid_desc","mceToggleVisualAid"],anchor:["anchor_desc","mceInsertAnchor"],newdocument:["newdocument_desc","mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","bullist","numlist","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],init:function(j,k){var l=this,m,i,n;l.editor=j;l.url=k;l.onResolveName=new e.util.Dispatcher(this);l.settings=m=h({theme_advanced_path:true,theme_advanced_toolbar_location:"bottom",theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"center",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",readonly:j.settings.readonly},j.settings);if(!m.font_size_style_values){m.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(e.is(m.theme_advanced_font_sizes,"string")){m.font_size_style_values=e.explode(m.font_size_style_values);m.font_size_classes=e.explode(m.font_size_classes||"");n={};j.settings.theme_advanced_font_sizes=m.theme_advanced_font_sizes;f(j.getParam("theme_advanced_font_sizes","","hash"),function(q,p){var o;if(p==q&&q>=1&&q<=7){p=q+" ("+l.sizes[q-1]+"pt)";o=m.font_size_classes[q-1];q=m.font_size_style_values[q-1]||(l.sizes[q-1]+"pt")}if(/^\s*\./.test(q)){o=q.replace(/\./g,"")}n[p]=o?{"class":o}:{fontSize:q}});m.theme_advanced_font_sizes=n}if((i=m.theme_advanced_path_location)&&i!="none"){m.theme_advanced_statusbar_location=m.theme_advanced_path_location}if(m.theme_advanced_statusbar_location=="none"){m.theme_advanced_statusbar_location=0}j.onInit.add(function(){if(!j.settings.readonly){j.onNodeChange.add(l._nodeChanged,l)}if(j.settings.content_css!==false){j.dom.loadCSS(j.baseURI.toAbsolute(k+"/skins/"+j.settings.skin+"/content.css"))}});j.onSetProgressState.add(function(q,o,r){var s,t=q.id,p;if(o){l.progressTimer=setTimeout(function(){s=q.getContainer();s=s.insertBefore(d.create("DIV",{style:"position:relative"}),s.firstChild);p=d.get(q.id+"_tbl");d.add(s,"div",{id:t+"_blocker","class":"mceBlocker",style:{width:p.clientWidth+2,height:p.clientHeight+2}});d.add(s,"div",{id:t+"_progress","class":"mceProgress",style:{left:p.clientWidth/2,top:p.clientHeight/2}})},r||0)}else{d.remove(t+"_blocker");d.remove(t+"_progress");clearTimeout(l.progressTimer)}});d.loadCSS(m.editor_css?j.documentBaseURI.toAbsolute(m.editor_css):k+"/skins/"+j.settings.skin+"/ui.css");if(m.skin_variant){d.loadCSS(k+"/skins/"+j.settings.skin+"/ui_"+m.skin_variant+".css")}},createControl:function(l,i){var j,k;if(k=i.createControl(l)){return k}switch(l){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}if((j=this.controls[l])){return i.createButton(l,{title:"advanced."+j[0],cmd:j[1],ui:j[2],value:j[3]})}},execCommand:function(k,j,l){var i=this["_"+k];if(i){i.call(this,j,l);return true}return false},_importClasses:function(k){var i=this.editor,j=i.controlManager.get("styleselect");if(j.getLength()==0){f(i.dom.getClasses(),function(n,l){var m="style_"+l;i.formatter.register(m,{inline:"span",attributes:{"class":n["class"]},selector:"*"});j.add(n["class"],m)})}},_createStyleSelect:function(m){var k=this,i=k.editor,j=i.controlManager,l;l=j.createListBox("styleselect",{title:"advanced.style_select",onselect:function(o){var p,n=[];f(l.items,function(q){n.push(q.value)});i.focus();i.undoManager.add();p=i.formatter.matchAll(n);if(!o||p[0]==o){i.formatter.remove(p[0])}else{i.formatter.apply(o)}i.undoManager.add();i.nodeChanged();return false}});i.onInit.add(function(){var o=0,n=i.getParam("style_formats");if(n){f(n,function(p){var q,r=0;f(p,function(){r++});if(r>1){q=p.name=p.name||"style_"+(o++);i.formatter.register(q,p);l.add(p.title,q)}else{l.add(p.title)}})}else{f(i.getParam("theme_advanced_styles","","hash"),function(r,q){var p;if(r){p="style_"+(o++);i.formatter.register(p,{inline:"span",classes:r,selector:"*"});l.add(k.editor.translate(q),p)}})}});if(l.getLength()==0){l.onPostRender.add(function(o,p){if(!l.NativeListBox){b.add(p.id+"_text","focus",k._importClasses,k);b.add(p.id+"_text","mousedown",k._importClasses,k);b.add(p.id+"_open","focus",k._importClasses,k);b.add(p.id+"_open","mousedown",k._importClasses,k)}else{b.add(p.id,"focus",k._importClasses,k)}})}return l},_createFontSelect:function(){var k,j=this,i=j.editor;k=i.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(l){var m=k.items[k.selectedIndex];if(!l&&m){i.execCommand("FontName",false,m.value);return}i.execCommand("FontName",false,l);k.select(function(n){return l==n});return false}});if(k){f(i.getParam("theme_advanced_fonts",j.settings.theme_advanced_fonts,"hash"),function(m,l){k.add(i.translate(l),m,{style:m.indexOf("dings")==-1?"font-family:"+m:""})})}return k},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(i){var o=n.items[n.selectedIndex];if(!i&&o){o=o.value;if(o["class"]){k.formatter.toggle("fontsize_class",{value:o["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,o.fontSize)}return}if(i["class"]){k.focus();k.undoManager.add();k.formatter.toggle("fontsize_class",{value:i["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,i.fontSize)}n.select(function(p){return i==p});return false}});if(n){f(m.settings.theme_advanced_font_sizes,function(o,i){var p=o.fontSize;if(p>=1&&p<=7){p=m.sizes[parseInt(p)-1]+"pt"}n.add(i,o,{style:"font-size:"+p,"class":"mceFontSize"+(l++)+(" "+(o["class"]||""))})})}return n},_createBlockFormats:function(){var k,i={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",samp:"advanced.samp"},j=this;k=j.editor.controlManager.createListBox("formatselect",{title:"advanced.block",cmd:"FormatBlock"});if(k){f(j.editor.getParam("theme_advanced_blockformats",j.settings.theme_advanced_blockformats,"hash"),function(m,l){k.add(j.editor.translate(l!=m?l:i[m]),m,{"class":"mce_formatPreview mce_"+m})})}return k},_createForeColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_text_colors){l.colors=i}if(k.theme_advanced_default_foreground_color){l.default_color=k.theme_advanced_default_foreground_color}l.title="advanced.forecolor_desc";l.cmd="ForeColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("forecolor",l);return m},_createBackColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_background_colors){l.colors=i}if(k.theme_advanced_default_background_color){l.default_color=k.theme_advanced_default_background_color}l.title="advanced.backcolor_desc";l.cmd="HiliteColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("backcolor",l);return m},renderUI:function(k){var m,l,q,v=this,r=v.editor,w=v.settings,u,j,i;m=j=d.create("span",{id:r.id+"_parent","class":"mceEditor "+r.settings.skin+"Skin"+(w.skin_variant?" "+r.settings.skin+"Skin"+v._ufirst(w.skin_variant):"")});if(!d.boxModel){m=d.add(m,"div",{"class":"mceOldBoxModel"})}m=u=d.add(m,"table",{id:r.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});m=q=d.add(m,"tbody");switch((w.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":l=v._rowLayout(w,q,k);break;case"customlayout":l=r.execCallback("theme_advanced_custom_layout",w,q,k,j);break;default:l=v._simpleLayout(w,q,k,j)}m=k.targetNode;i=d.stdMode?u.getElementsByTagName("tr"):u.rows;d.addClass(i[0],"mceFirst");d.addClass(i[i.length-1],"mceLast");f(d.select("tr",q),function(o){d.addClass(o.firstChild,"mceFirst");d.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(d.get(w.theme_advanced_toolbar_container)){d.get(w.theme_advanced_toolbar_container).appendChild(j)}else{d.insertAfter(j,m)}b.add(r.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){v._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return b.cancel(n)}});if(!r.getParam("accessibility_focus")){b.add(d.add(j,"a",{href:"#"},"<!-- IE -->"),"focus",function(){tinyMCE.get(r.id).focus()})}if(w.theme_advanced_toolbar_location=="external"){k.deltaHeight=0}v.deltaHeight=k.deltaHeight;k.targetNode=null;return{iframeContainer:l,editorContainer:r.id+"_parent",sizeContainer:u,deltaHeight:k.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http: | (function(e){var d=e.DOM,b=e.dom.Event,h=e.extend,f=e.each,a=e.util.Cookie,g,c=e.explode;e.ThemeManager.requireLangPack("advanced");e.create("tinymce.themes.AdvancedTheme",{sizes:[8,10,12,14,18,24,36],controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],justifyfull:["justifyfull_desc","JustifyFull"],bullist:["bullist_desc","InsertUnorderedList"],numlist:["numlist_desc","InsertOrderedList"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],cut:["cut_desc","Cut"],copy:["copy_desc","Copy"],paste:["paste_desc","Paste"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],link:["link_desc","mceLink"],unlink:["unlink_desc","unlink"],image:["image_desc","mceImage"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc","mceCodeEditor"],hr:["hr_desc","InsertHorizontalRule"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","mceForeColor"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","mceBackColor"],charmap:["charmap_desc","mceCharMap"],visualaid:["visualaid_desc","mceToggleVisualAid"],anchor:["anchor_desc","mceInsertAnchor"],newdocument:["newdocument_desc","mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","bullist","numlist","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],init:function(j,k){var l=this,m,i,n;l.editor=j;l.url=k;l.onResolveName=new e.util.Dispatcher(this);l.settings=m=h({theme_advanced_path:true,theme_advanced_toolbar_location:"bottom",theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"center",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",readonly:j.settings.readonly},j.settings);if(!m.font_size_style_values){m.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(e.is(m.theme_advanced_font_sizes,"string")){m.font_size_style_values=e.explode(m.font_size_style_values);m.font_size_classes=e.explode(m.font_size_classes||"");n={};j.settings.theme_advanced_font_sizes=m.theme_advanced_font_sizes;f(j.getParam("theme_advanced_font_sizes","","hash"),function(q,p){var o;if(p==q&&q>=1&&q<=7){p=q+" ("+l.sizes[q-1]+"pt)";o=m.font_size_classes[q-1];q=m.font_size_style_values[q-1]||(l.sizes[q-1]+"pt")}if(/^\s*\./.test(q)){o=q.replace(/\./g,"")}n[p]=o?{"class":o}:{fontSize:q}});m.theme_advanced_font_sizes=n}if((i=m.theme_advanced_path_location)&&i!="none"){m.theme_advanced_statusbar_location=m.theme_advanced_path_location}if(m.theme_advanced_statusbar_location=="none"){m.theme_advanced_statusbar_location=0}j.onInit.add(function(){if(!j.settings.readonly){j.onNodeChange.add(l._nodeChanged,l)}if(j.settings.content_css!==false){j.dom.loadCSS(j.baseURI.toAbsolute("themes/advanced/skins/"+j.settings.skin+"/content.css"))}});j.onSetProgressState.add(function(q,o,r){var s,t=q.id,p;if(o){l.progressTimer=setTimeout(function(){s=q.getContainer();s=s.insertBefore(d.create("DIV",{style:"position:relative"}),s.firstChild);p=d.get(q.id+"_tbl");d.add(s,"div",{id:t+"_blocker","class":"mceBlocker",style:{width:p.clientWidth+2,height:p.clientHeight+2}});d.add(s,"div",{id:t+"_progress","class":"mceProgress",style:{left:p.clientWidth/2,top:p.clientHeight/2}})},r||0)}else{d.remove(t+"_blocker");d.remove(t+"_progress");clearTimeout(l.progressTimer)}});d.loadCSS(m.editor_css?j.documentBaseURI.toAbsolute(m.editor_css):k+"/skins/"+j.settings.skin+"/ui.css");if(m.skin_variant){d.loadCSS(k+"/skins/"+j.settings.skin+"/ui_"+m.skin_variant+".css")}},createControl:function(l,i){var j,k;if(k=i.createControl(l)){return k}switch(l){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}if((j=this.controls[l])){return i.createButton(l,{title:"advanced."+j[0],cmd:j[1],ui:j[2],value:j[3]})}},execCommand:function(k,j,l){var i=this["_"+k];if(i){i.call(this,j,l);return true}return false},_importClasses:function(k){var i=this.editor,j=i.controlManager.get("styleselect");if(j.getLength()==0){f(i.dom.getClasses(),function(n,l){var m="style_"+l;i.formatter.register(m,{inline:"span",attributes:{"class":n["class"]},selector:"*"});j.add(n["class"],m)})}},_createStyleSelect:function(m){var k=this,i=k.editor,j=i.controlManager,l;l=j.createListBox("styleselect",{title:"advanced.style_select",onselect:function(o){var p,n=[];f(l.items,function(q){n.push(q.value)});i.focus();i.undoManager.add();p=i.formatter.matchAll(n);if(p[0]==o){i.formatter.remove(o)}else{i.formatter.apply(o)}i.undoManager.add();i.nodeChanged();return false}});i.onInit.add(function(){var o=0,n=i.getParam("style_formats");if(n){f(n,function(p){var q,r=0;f(p,function(){r++});if(r>1){q=p.name=p.name||"style_"+(o++);i.formatter.register(q,p);l.add(p.title,q)}else{l.add(p.title)}})}else{f(i.getParam("theme_advanced_styles","","hash"),function(r,q){var p;if(r){p="style_"+(o++);i.formatter.register(p,{inline:"span",classes:r,selector:"*"});l.add(k.editor.translate(q),p)}})}});if(l.getLength()==0){l.onPostRender.add(function(o,p){if(!l.NativeListBox){b.add(p.id+"_text","focus",k._importClasses,k);b.add(p.id+"_text","mousedown",k._importClasses,k);b.add(p.id+"_open","focus",k._importClasses,k);b.add(p.id+"_open","mousedown",k._importClasses,k)}else{b.add(p.id,"focus",k._importClasses,k)}})}return l},_createFontSelect:function(){var k,j=this,i=j.editor;k=i.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(l){i.execCommand("FontName",false,l);k.select(function(m){return l==m});return false}});if(k){f(i.getParam("theme_advanced_fonts",j.settings.theme_advanced_fonts,"hash"),function(m,l){k.add(i.translate(l),m,{style:m.indexOf("dings")==-1?"font-family:"+m:""})})}return k},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(i){if(i["class"]){k.focus();k.undoManager.add();k.formatter.toggle("fontsize_class",{value:i["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,i.fontSize)}n.select(function(o){return i==o});return false}});if(n){f(m.settings.theme_advanced_font_sizes,function(o,i){var p=o.fontSize;if(p>=1&&p<=7){p=m.sizes[parseInt(p)-1]+"pt"}n.add(i,o,{style:"font-size:"+p,"class":"mceFontSize"+(l++)+(" "+(o["class"]||""))})})}return n},_createBlockFormats:function(){var k,i={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",samp:"advanced.samp"},j=this;k=j.editor.controlManager.createListBox("formatselect",{title:"advanced.block",cmd:"FormatBlock"});if(k){f(j.editor.getParam("theme_advanced_blockformats",j.settings.theme_advanced_blockformats,"hash"),function(m,l){k.add(j.editor.translate(l!=m?l:i[m]),m,{"class":"mce_formatPreview mce_"+m})})}return k},_createForeColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_text_colors){l.colors=i}if(k.theme_advanced_default_foreground_color){l.default_color=k.theme_advanced_default_foreground_color}l.title="advanced.forecolor_desc";l.cmd="ForeColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("forecolor",l);return m},_createBackColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_background_colors){l.colors=i}if(k.theme_advanced_default_background_color){l.default_color=k.theme_advanced_default_background_color}l.title="advanced.backcolor_desc";l.cmd="HiliteColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("backcolor",l);return m},renderUI:function(k){var m,l,q,v=this,r=v.editor,w=v.settings,u,j,i;m=j=d.create("span",{id:r.id+"_parent","class":"mceEditor "+r.settings.skin+"Skin"+(w.skin_variant?" "+r.settings.skin+"Skin"+v._ufirst(w.skin_variant):"")});if(!d.boxModel){m=d.add(m,"div",{"class":"mceOldBoxModel"})}m=u=d.add(m,"table",{id:r.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});m=q=d.add(m,"tbody");switch((w.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":l=v._rowLayout(w,q,k);break;case"customlayout":l=r.execCallback("theme_advanced_custom_layout",w,q,k,j);break;default:l=v._simpleLayout(w,q,k,j)}m=k.targetNode;i=d.stdMode?u.getElementsByTagName("tr"):u.rows;d.addClass(i[0],"mceFirst");d.addClass(i[i.length-1],"mceLast");f(d.select("tr",q),function(o){d.addClass(o.firstChild,"mceFirst");d.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(d.get(w.theme_advanced_toolbar_container)){d.get(w.theme_advanced_toolbar_container).appendChild(j)}else{d.insertAfter(j,m)}b.add(r.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){v._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return b.cancel(n)}});if(!r.getParam("accessibility_focus")){b.add(d.add(j,"a",{href:"#"},"<!-- IE -->"),"focus",function(){tinyMCE.get(r.id).focus()})}if(w.theme_advanced_toolbar_location=="external"){k.deltaHeight=0}v.deltaHeight=k.deltaHeight;k.targetNode=null;return{iframeContainer:l,editorContainer:r.id+"_parent",sizeContainer:u,deltaHeight:k.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:e.majorVersion+"."+e.minorVersion}},resizeBy:function(i,j){var k=d.get(this.editor.id+"_tbl");this.resizeTo(k.clientWidth+i,k.clientHeight+j)},resizeTo:function(i,l){var j=this.editor,k=this.settings,m=d.get(j.id+"_tbl"),n=d.get(j.id+"_ifr");i=Math.max(k.theme_advanced_resizing_min_width||100,i);l=Math.max(k.theme_advanced_resizing_min_height||100,l);i=Math.min(k.theme_advanced_resizing_max_width||65535,i);l=Math.min(k.theme_advanced_resizing_max_height||65535,l);d.setStyle(m,"height","");d.setStyle(n,"height",l);if(k.theme_advanced_resize_horizontal){d.setStyle(m,"width","");d.setStyle(n,"width",i);if(i<m.clientWidth){d.setStyle(n,"width",m.clientWidth)}}},destroy:function(){var i=this.editor.id;b.clear(i+"_resize");b.clear(i+"_path_row");b.clear(i+"_external_close")},_simpleLayout:function(y,r,k,i){var x=this,u=x.editor,v=y.theme_advanced_toolbar_location,m=y.theme_advanced_statusbar_location,l,j,q,w;if(y.readonly){l=d.add(r,"tr");l=j=d.add(l,"td",{"class":"mceIframeContainer"});return j}if(v=="top"){x._addToolbars(r,k)}if(v=="external"){l=w=d.create("div",{style:"position:relative"});l=d.add(l,"div",{id:u.id+"_external","class":"mceExternalToolbar"});d.add(l,"a",{id:u.id+"_external_close",href:"javascript:;","class":"mceExternalClose"});l=d.add(l,"table",{id:u.id+"_tblext",cellSpacing:0,cellPadding:0});q=d.add(l,"tbody");if(i.firstChild.className=="mceOldBoxModel"){i.firstChild.appendChild(w)}else{i.insertBefore(w,i.firstChild)}x._addToolbars(q,k);u.onMouseUp.add(function(){var o=d.get(u.id+"_external");d.show(o);d.hide(g);var n=b.add(u.id+"_external_close","click",function(){d.hide(u.id+"_external");b.remove(u.id+"_external_close","click",n)});d.show(o);d.setStyle(o,"top",0-d.getRect(u.id+"_tblext").h-1);d.hide(o);d.show(o);o.style.filter="";g=u.id+"_external";o=null})}if(m=="top"){x._addStatusBar(r,k)}if(!y.theme_advanced_toolbar_container){l=d.add(r,"tr");l=j=d.add(l,"td",{"class":"mceIframeContainer"})}if(v=="bottom"){x._addToolbars(r,k)}if(m=="bottom"){x._addStatusBar(r,k)}return j},_rowLayout:function(w,m,k){var v=this,p=v.editor,u,x,i=p.controlManager,l,j,r,q;u=w.theme_advanced_containers_default_class||"";x=w.theme_advanced_containers_default_align||"center";f(c(w.theme_advanced_containers||""),function(s,o){var n=w["theme_advanced_container_"+s]||"";switch(n.toLowerCase()){case"mceeditor":l=d.add(m,"tr");l=j=d.add(l,"td",{"class":"mceIframeContainer"});break;case"mceelementpath":v._addStatusBar(m,k);break;default:q=(w["theme_advanced_container_"+s+"_align"]||x).toLowerCase();q="mce"+v._ufirst(q);l=d.add(d.add(m,"tr"),"td",{"class":"mceToolbar "+(w["theme_advanced_container_"+s+"_class"]||u)+" "+q||x});r=i.createToolbar("toolbar"+o);v._addControls(n,r);d.setHTML(l,r.renderHTML());k.deltaHeight-=w.theme_advanced_row_height}});return j},_addControls:function(j,i){var k=this,l=k.settings,m,n=k.editor.controlManager;if(l.theme_advanced_disable&&!k._disabled){m={};f(c(l.theme_advanced_disable),function(o){m[o]=1});k._disabled=m}else{m=k._disabled}f(c(j),function(p){var o;if(m&&m[p]){return}if(p=="tablecontrols"){f(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"],function(q){q=k.createControl(q,n);if(q){i.add(q)}});return}o=k.createControl(p,n);if(o){i.add(o)}})},_addToolbars:function(w,k){var z=this,p,m,r=z.editor,A=z.settings,y,j=r.controlManager,u,l,q=[],x;x=A.theme_advanced_toolbar_align.toLowerCase();x="mce"+z._ufirst(x);l=d.add(d.add(w,"tr"),"td",{"class":"mceToolbar "+x});if(!r.getParam("accessibility_focus")){q.push(d.createHTML("a",{href:"#",onfocus:"tinyMCE.get('"+r.id+"').focus();"},"<!-- IE -->"))}q.push(d.createHTML("a",{href:"#",accesskey:"q",title:r.getLang("advanced.toolbar_focus")},"<!-- IE -->"));for(p=1;(y=A["theme_advanced_buttons"+p]);p++){m=j.createToolbar("toolbar"+p,{"class":"mceToolbarRow"+p});if(A["theme_advanced_buttons"+p+"_add"]){y+=","+A["theme_advanced_buttons"+p+"_add"]}if(A["theme_advanced_buttons"+p+"_add_before"]){y=A["theme_advanced_buttons"+p+"_add_before"]+","+y}z._addControls(y,m);q.push(m.renderHTML());k.deltaHeight-=A.theme_advanced_row_height}q.push(d.createHTML("a",{href:"#",accesskey:"z",title:r.getLang("advanced.toolbar_focus"),onfocus:"tinyMCE.getInstanceById('"+r.id+"').focus();"},"<!-- IE -->"));d.setHTML(l,q.join(""))},_addStatusBar:function(m,j){var k,v=this,p=v.editor,w=v.settings,i,q,u,l;k=d.add(m,"tr");k=l=d.add(k,"td",{"class":"mceStatusbar"});k=d.add(k,"div",{id:p.id+"_path_row"},w.theme_advanced_path?p.translate("advanced.path")+": ":" ");d.add(k,"a",{href:"#",accesskey:"x"});if(w.theme_advanced_resizing){d.add(l,"a",{id:p.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize"});if(w.theme_advanced_resizing_use_cookie){p.onPostRender.add(function(){var n=a.getHash("TinyMCE_"+p.id+"_size"),r=d.get(p.id+"_tbl");if(!n){return}v.resizeTo(n.cw,n.ch)})}p.onPostRender.add(function(){b.add(p.id+"_resize","mousedown",function(D){var t,r,s,o,C,z,A,F,n,E,x;function y(G){n=A+(G.screenX-C);E=F+(G.screenY-z);v.resizeTo(n,E)}function B(G){b.remove(d.doc,"mousemove",t);b.remove(p.getDoc(),"mousemove",r);b.remove(d.doc,"mouseup",s);b.remove(p.getDoc(),"mouseup",o);if(w.theme_advanced_resizing_use_cookie){a.setHash("TinyMCE_"+p.id+"_size",{cw:n,ch:E})}}D.preventDefault();C=D.screenX;z=D.screenY;x=d.get(v.editor.id+"_ifr");A=n=x.clientWidth;F=E=x.clientHeight;t=b.add(d.doc,"mousemove",y);r=b.add(p.getDoc(),"mousemove",y);s=b.add(d.doc,"mouseup",B);o=b.add(p.getDoc(),"mouseup",B)})})}j.deltaHeight-=21;k=m=null},_nodeChanged:function(r,z,l,x,j){var C=this,i,y=0,B,u,D=C.settings,A,k,w,m,q;e.each(C.stateControls,function(n){z.setActive(n,r.queryCommandState(C.controls[n][1]))});function o(p){var s,n=j.parents,t=p;if(typeof(p)=="string"){t=function(v){return v.nodeName==p}}for(s=0;s<n.length;s++){if(t(n[s])){return n[s]}}}z.setActive("visualaid",r.hasVisual);z.setDisabled("undo",!r.undoManager.hasUndo()&&!r.typing);z.setDisabled("redo",!r.undoManager.hasRedo());z.setDisabled("outdent",!r.queryCommandState("Outdent"));i=o("A");if(u=z.get("link")){if(!i||!i.name){u.setDisabled(!i&&x);u.setActive(!!i)}}if(u=z.get("unlink")){u.setDisabled(!i&&x);u.setActive(!!i&&!i.name)}if(u=z.get("anchor")){u.setActive(!!i&&i.name)}i=o("IMG");if(u=z.get("image")){u.setActive(!!i&&l.className.indexOf("mceItem")==-1)}if(u=z.get("styleselect")){C._importClasses();m=[];f(u.items,function(n){m.push(n.value)});q=r.formatter.matchAll(m);u.select(q[0])}if(u=z.get("formatselect")){i=o(d.isBlock);if(i){u.select(i.nodeName.toLowerCase())}}o(function(p){if(p.nodeName==="SPAN"){if(!A&&p.className){A=p.className}if(!k&&p.style.fontSize){k=p.style.fontSize}if(!w&&p.style.fontFamily){w=p.style.fontFamily.replace(/[\"\']+/g,"").replace(/^([^,]+).*/,"$1").toLowerCase()}}return false});if(u=z.get("fontselect")){u.select(function(n){return n.replace(/^([^,]+).*/,"$1").toLowerCase()==w})}if(u=z.get("fontsizeselect")){if(D.theme_advanced_runtime_fontsize&&!k&&!A){k=r.dom.getStyle(l,"fontSize",true)}u.select(function(n){if(n.fontSize&&n.fontSize===k){return true}if(n["class"]&&n["class"]===A){return true}})}if(D.theme_advanced_path&&D.theme_advanced_statusbar_location){i=d.get(r.id+"_path")||d.add(r.id+"_path_row","span",{id:r.id+"_path"});d.setHTML(i,"");o(function(E){var p=E.nodeName.toLowerCase(),s,v,t="";if(E.nodeType!=1||E.nodeName==="BR"||(d.hasClass(E,"mceItemHidden")||d.hasClass(E,"mceItemRemoved"))){return}if(B=d.getAttrib(E,"mce_name")){p=B}if(e.isIE&&E.scopeName!=="HTML"){p=E.scopeName+":"+p}p=p.replace(/mce\:/g,"");switch(p){case"b":p="strong";break;case"i":p="em";break;case"img":if(B=d.getAttrib(E,"src")){t+="src: "+B+" "}break;case"a":if(B=d.getAttrib(E,"name")){t+="name: "+B+" ";p+="#"+B}if(B=d.getAttrib(E,"href")){t+="href: "+B+" "}break;case"font":if(B=d.getAttrib(E,"face")){t+="font: "+B+" "}if(B=d.getAttrib(E,"size")){t+="size: "+B+" "}if(B=d.getAttrib(E,"color")){t+="color: "+B+" "}break;case"span":if(B=d.getAttrib(E,"style")){t+="style: "+B+" "}break}if(B=d.getAttrib(E,"id")){t+="id: "+B+" "}if(B=E.className){B=B.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g,"");if(B){t+="class: "+B+" ";if(d.isBlock(E)||p=="img"||p=="span"){p+="."+B}}}p=p.replace(/(html:)/g,"");p={name:p,node:E,title:t};C.onResolveName.dispatch(C,p);t=p.title;p=p.name;v=d.create("a",{href:"javascript:;",onmousedown:"return false;",title:t,"class":"mcePath_"+(y++)},p);if(i.hasChildNodes()){i.insertBefore(d.doc.createTextNode(" \u00bb "),i.firstChild);i.insertBefore(v,i.firstChild)}else{i.appendChild(v)}},r.getBody())}},_sel:function(i){this.editor.execCommand("mceSelectNodeDepth",false,i)},_mceInsertAnchor:function(k,j){var i=this.editor;i.windowManager.open({url:e.baseURL+"/themes/advanced/anchor.htm",width:320+parseInt(i.getLang("advanced.anchor_delta_width",0)),height:90+parseInt(i.getLang("advanced.anchor_delta_height",0)),inline:true},{theme_url:this.url})},_mceCharMap:function(){var i=this.editor;i.windowManager.open({url:e.baseURL+"/themes/advanced/charmap.htm",width:550+parseInt(i.getLang("advanced.charmap_delta_width",0)),height:250+parseInt(i.getLang("advanced.charmap_delta_height",0)),inline:true},{theme_url:this.url})},_mceHelp:function(){var i=this.editor;i.windowManager.open({url:e.baseURL+"/themes/advanced/about.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceColorPicker:function(k,j){var i=this.editor;j=j||{};i.windowManager.open({url:e.baseURL+"/themes/advanced/color_picker.htm",width:375+parseInt(i.getLang("advanced.colorpicker_delta_width",0)),height:250+parseInt(i.getLang("advanced.colorpicker_delta_height",0)),close_previous:false,inline:true},{input_color:j.color,func:j.func,theme_url:this.url})},_mceCodeEditor:function(j,k){var i=this.editor;i.windowManager.open({url:e.baseURL+"/themes/advanced/source_editor.htm",width:parseInt(i.getParam("theme_advanced_source_editor_width",720)),height:parseInt(i.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url})},_mceImage:function(j,k){var i=this.editor;if(i.dom.getAttrib(i.selection.getNode(),"class").indexOf("mceItem")!=-1){return}i.windowManager.open({url:e.baseURL+"/themes/advanced/image.htm",width:355+parseInt(i.getLang("advanced.image_delta_width",0)),height:275+parseInt(i.getLang("advanced.image_delta_height",0)),inline:true},{theme_url:this.url})},_mceLink:function(j,k){var i=this.editor;i.windowManager.open({url:e.baseURL+"/themes/advanced/link.htm",width:310+parseInt(i.getLang("advanced.link_delta_width",0)),height:200+parseInt(i.getLang("advanced.link_delta_height",0)),inline:true},{theme_url:this.url})},_mceNewDocument:function(){var i=this.editor;i.windowManager.confirm("advanced.newdocument",function(j){if(j){i.execCommand("mceSetContent",false,"")}})},_mceForeColor:function(){var i=this;this._mceColorPicker(0,{color:i.fgColor,func:function(j){i.fgColor=j;i.editor.execCommand("ForeColor",false,j)}})},_mceBackColor:function(){var i=this;this._mceColorPicker(0,{color:i.bgColor,func:function(j){i.bgColor=j;i.editor.execCommand("HiliteColor",false,j)}})},_ufirst:function(i){return i.substring(0,1).toUpperCase()+i.substring(1)}});e.ThemeManager.add("advanced",e.themes.AdvancedTheme)}(tinymce)); |
s=["left","right"],y=["top","bottom"],I=h.px(a,"maxWidth")||a.offsetWidth,J=h.px(a,"maxHeight")||a.offsetHeight;if(b+I>H+n.x){j-=q.x;b=a.offsetParent.offsetWidth-(j+h.px(a,"marginRight"));j=1}else{b-=q.x;b-=h.px(a,"marginLeft");j=0}if(e+J>u+n.y){if(l>u+n.y)l=u+n.y;l-=q.y;e=a.offsetParent.offsetHeight-(l+h.px(a,"marginBottom"));l=1}else{e-=q.y;e-=h.px(a,"marginTop");l=0}a.style[s[j]]=b+"px";a.style[s[1-j]]="";a.style[y[l]]=e+"px";a.style[y[1-l]]=""};this.positionXY=function(a,b,e){a=h.getElement(a); | s=["left","right"],y=["top","bottom"],I=h.px(a,"maxWidth")||a.offsetWidth,K=h.px(a,"maxHeight")||a.offsetHeight;if(b+I>H+n.x){j-=q.x;b=a.offsetParent.offsetWidth-(j+h.px(a,"marginRight"));j=1}else{b-=q.x;b-=h.px(a,"marginLeft");j=0}if(e+K>u+n.y){if(l>u+n.y)l=u+n.y;l-=q.y;e=a.offsetParent.offsetHeight-(l+h.px(a,"marginBottom"));l=1}else{e-=q.y;e-=h.px(a,"marginTop");l=0}a.style[s[j]]=b+"px";a.style[s[1-j]]="";a.style[y[l]]=e+"px";a.style[y[1-l]]=""};this.positionXY=function(a,b,e){a=h.getElement(a); | var _$_WT_CLASS_$_=new (function(){function x(a,b){return a.style[b]?a.style[b]:document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(a,null)[b]:a.currentStyle?a.currentStyle[b]:null}function w(a,b,e){if(a=="auto"||a==null)return e;return(a=(a=b.exec(a))&&a.length==2?a[1]:null)?parseFloat(a):e}function G(a){return w(a,/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/i,0)}function U(a,b){return w(a,/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/i,b)}function Z(a){if(A==null)return null;if(!a)a=window.event;if(a){for(var b=a=h.target(a);b&&b!=A;)b=b.parentNode;return b==A?h.isIElt9?a:null:A}else return A}function V(a){var b=Z(a);if(b&&!W){if(!a)a=window.event;W=true;if(h.isIElt9){h.firedTarget=a.srcElement||b;b.fireEvent("onmousemove",a);h.firedTarget=null}else h.condCall(b,"onmousemove",a);return W=false}else return true}function O(a){var b=Z(a);h.capture(null);if(b){if(!a)a=window.event;if(h.isIElt9){h.firedTarget=a.srcElement||b;b.fireEvent("onmouseup",a);h.firedTarget=null}else h.condCall(b,"onmouseup",a);h.cancelEvent(a,h.CancelPropagate);return false}else return true}function aa(){if(!ba){ba=true;if(document.body.addEventListener){var a=document.body;a.addEventListener("mousemove",V,true);a.addEventListener("mouseup",O,true);h.isGecko&&window.addEventListener("mouseout",function(b){!b.relatedTarget&&h.hasTag(b.target,"HTML")&&O(b)},true)}else{a=document.body;a.attachEvent("onmousemove",V);a.attachEvent("onmouseup",O)}}}var h=this;this.buttons=0;this.mouseDown=function(a){h.buttons|=h.button(a)};this.mouseUp=function(a){h.buttons^=h.button(a)};this.arrayRemove=function(a,b,e){e=a.slice((e||b)+1||a.length);a.length=b<0?a.length+b:b;return a.push.apply(a,e)};var P=function(){for(var a,b=3,e=document.createElement("div"),j=e.getElementsByTagName("i");e.innerHTML="<!--[if gt IE "+ ++b+"]><i></i><![endif]--\>",j[0];);return b>4?b:a}();this.isIE=P!==undefined;this.isIE6=P===6;this.isIElt9=P<9;this.isGecko=navigator.userAgent.toLowerCase().indexOf("gecko")!=-1;this.isIEMobile=navigator.userAgent.toLowerCase().indexOf("msie 4")!=-1||navigator.userAgent.toLowerCase().indexOf("msie 5")!=-1;this.isOpera=typeof window.opera!=="undefined";this.updateDelay=this.isIE?10:51;this.setHtml=function(a,b,e){function j(n,H){var u,q,s;switch(n.nodeType){case 1:u=n.namespaceURI==null?document.createElement(n.nodeName):document.createElementNS(n.namespaceURI,n.nodeName);if(n.attributes&&n.attributes.length>0){q=0;for(s=n.attributes.length;q<s;)u.setAttribute(n.attributes[q].nodeName,n.getAttribute(n.attributes[q++].nodeName))}if(H&&n.childNodes.length>0){q=0;for(s=n.childNodes.length;q<s;){var y=j(n.childNodes[q++],H);y&&u.appendChild(y)}}return u;case 3:case 4:case 5:return document.createTextNode(n.nodeValue)}return null}if(h.isIE||_$_INNER_HTML_$_&&!e)if(e)a.innerHTML+=b;else a.innerHTML=b;else{var l;l=new DOMParser;l=l.parseFromString("<div>"+b+"</div>","application/xhtml+xml").documentElement;if(l.nodeType!=1)l=l.nextSibling;if(!e)a.innerHTML="";b=0;for(e=l.childNodes.length;b<e;)a.appendChild(j(l.childNodes[b++],true))}};this.hasTag=function(a,b){return a.nodeType==1&&a.tagName.toUpperCase()===b};this.insertAt=function(a,b,e){a.childNodes.length==0?a.appendChild(b):a.insertBefore(b,a.childNodes[e])};this.remove=function(a){(a=h.getElement(a))&&a.parentNode.removeChild(a)};this.unstub=function(a,b,e){if(e==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=h.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8);h.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(h.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var e,j;e=0;for(j=a.attributes.length;e<j;e++){var l=a.attributes[e].nodeName;l!="type"&&l!="name"&&b.setAttribute(l,a.getAttribute(l))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?h.CancelAll:b;if(b&h.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&h.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;try{document.activeElement&&document.activeElement.blur&&h.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}catch(e){}}};this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var e=0;e<window.frames.length;++e)try{if(b=window.frames[e].document.getElementById(a))return b}catch(j){}return b};this.widgetPageCoordinates=function(a){var b=0,e=0,j;if(h.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;e+=a.offsetTop;if(x(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;e+=document.body.scrollTop+document.documentElement.scrollTop;break}j=a.offsetParent;if(j==null)a=null;else{do{a=a.parentNode;if(h.hasTag(a,"DIV")){b-=a.scrollLeft;e-=a.scrollTop}}while(a!=null&&a!=j)}}return{x:b,y:e}};this.widgetCoordinates=function(a,b){b=h.pageCoordinates(b);a=h.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,e=0;if(a.pageX||a.pageY){b=a.pageX;e=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;e=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:e}};this.windowCoordinates=function(a){a=h.pageCoordinates(a);return{x:a.x-document.body.scrollLeft-document.documentElement.scrollLeft,y:a.y-document.body.scrollTop-document.documentElement.scrollTop}};this.wheelDelta=function(a){var b=0;if(a.wheelDelta)b=a.wheelDelta>0?1:-1;else if(a.detail)b=a.detail<0?1:-1;return b};this.scrollIntoView=function(a){(a=document.getElementById(a))&&a.scrollIntoView&&a.scrollIntoView(true)};this.getSelectionRange=function(a){if(document.selection)if(h.hasTag(a,"TEXTAREA")){var b=document.selection.createRange(),e=b.duplicate();e.moveToElementText(a);var j=0;if(b.text.length>1){j-=b.text.length;if(j<0)j=0}a=-1+j;for(e.moveStart("character",j);e.inRange(b);){e.moveStart("character");a++}b=b.text.replace(/\r/g,"");return{start:a,end:b.length+a}}else{e=$(a).val();a=document.selection.createRange().duplicate();a.moveEnd("character",e.length);b=a.text==""?e.length:e.lastIndexOf(a.text);a=document.selection.createRange().duplicate();a.moveStart("character",-e.length);return{start:b,end:a.text.length}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,e){var j=$(a).val();if(typeof b!="number")b=-1;if(typeof e!="number")e=-1;if(b<0)b=0;if(e>j.length)e=j.length;if(e<b)e=b;if(b>e)b=e;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=e}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",e-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||h.isIE?true:h.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};this.px=function(a,b){return G(x(a,b))};this.pxself=function(a,b){return G(a.style[b])};this.pctself=function(a,b){return U(a.style[b],0)};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?h.isHidden(a):false}};this.IEwidth=function(a,b,e){if(a.parentNode){var j=a.parentNode.clientWidth-h.px(a,"marginLeft")-h.px(a,"marginRight")-h.px(a,"borderLeftWidth")-h.px(a,"borderRightWidth")-h.px(a.parentNode,"paddingLeft")-h.px(a.parentNode,"paddingRight");b=U(b,0);e=U(e,1E5);return j<b?b-1:j>e?e+1:a.style.styleFloat!=""?b-1:"auto"}else return"auto"};this.hide=function(a){h.getElement(a).style.display="none"};this.inline=function(a){h.getElement(a).style.display="inline"};this.block=function(a){h.getElement(a).style.display="block"};this.show=function(a){h.getElement(a).style.display=""};var A=null;this.firedTarget=null;this.target=function(a){return h.firedTarget||a.target||a.srcElement};var W=false,ba=false;this.capture=function(a){aa();if(!(A&&a)){A=a;var b=document.body;if(b.setCapture)a!=null?b.setCapture():b.releaseCapture();if(a!=null){$(b).addClass("unselectable");b.setAttribute("unselectable","on");b.onselectstart="return false;"}else{$(b).removeClass("unselectable");b.setAttribute("unselectable","off");b.onselectstart=""}}};this.checkReleaseCapture=function(a,b){A&&a==A&&b.type=="mouseup"&&this.capture(null)};this.getElementsByClassName=function(a,b){if(document.getElementsByClassName)return b.getElementsByClassName(a);else{b=b.getElementsByTagName("*");for(var e=[],j,l=0,n=b.length;l<n;l++){j=b[l];j.className.indexOf(a)!=-1&&e.push(j)}return e}};this.addCss=function(a,b){var e=document.styleSheets[0];e.insertRule(a+" { "+b+" }",e.cssRules.length)};this.addCssText=function(a){var b=document.getElementById("Wt-inline-css");if(!b){b=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(b)}if(b.styleSheet){var e=document.createElement("style");if(b)b.parentNode.insertBefore(e,b);else{e.id="Wt-inline-css";document.getElementsByTagName("head")[0].appendChild(e)}e.styleSheet.cssText=a}else{a=document.createTextNode(a);b.appendChild(a)}};this.getCssRule=function(a,b){a=a.toLowerCase();if(document.styleSheets)for(var e=0;e<document.styleSheets.length;e++){var j=document.styleSheets[e],l=0,n;do{n=null;if(j.cssRules)n=j.cssRules[l];else if(j.rules)n=j.rules[l];if(n&&n.selectorText)if(n.selectorText.toLowerCase()==a)if(b=="delete"){j.cssRules?j.deleteRule(l):j.removeRule(l);return true}else return n;++l}while(n)}return false};this.removeCssRule=function(a){return h.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var e=document.createElement("link");e.setAttribute("type","text/css");e.setAttribute("href",a);e.setAttribute("type","text/css");e.setAttribute("rel","stylesheet");b!=""&&b!="all"&&e.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(e)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,e,j,l){var n=h.windowSize(),H=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,q=h.widgetPageCoordinates(a.offsetParent),s=["left","right"],y=["top","bottom"],I=h.px(a,"maxWidth")||a.offsetWidth,J=h.px(a,"maxHeight")||a.offsetHeight;if(b+I>H+n.x){j-=q.x;b=a.offsetParent.offsetWidth-(j+h.px(a,"marginRight"));j=1}else{b-=q.x;b-=h.px(a,"marginLeft");j=0}if(e+J>u+n.y){if(l>u+n.y)l=u+n.y;l-=q.y;e=a.offsetParent.offsetHeight-(l+h.px(a,"marginBottom"));l=1}else{e-=q.y;e-=h.px(a,"marginTop");l=0}a.style[s[j]]=b+"px";a.style[s[1-j]]="";a.style[y[l]]=e+"px";a.style[y[1-l]]=""};this.positionXY=function(a,b,e){a=h.getElement(a);a.style.display="";h.isHidden(a)||h.fitToWindow(a,b,e,b,e)};this.Horizontal=1;this.Vertical=2;this.positionAtWidget=function(a,b,e,j){a=h.getElement(a);b=h.getElement(b);var l=h.widgetPageCoordinates(b),n;if(j){a.parentNode.removeChild(a);$(".Wt-domRoot").get(0).appendChild(a)}a.style.position="absolute";a.style.display="block";if(e==h.Horizontal){e=l.x+b.offsetWidth;j=l.y;n=l.x;b=l.y+b.offsetHeight}else{e=l.x;j=l.y+b.offsetHeight;n=l.x+b.offsetWidth;b=l.y}h.fitToWindow(a,e,j,n,b);a.style.visibility=""};this.hasFocus=function(a){return a==document.activeElement};this.history=function(){function a(){var g,p;p=location.href;g=p.indexOf("#");return g>=0?p.substr(g+1):null}function b(){J.value=L+"|"+C;if(u)J.value+="|"+D.join(",")}function e(g){if(g){if(!g||C!==g){C=g||L;E(unescape(C))}}else{C=L;E(unescape(C))}}function j(g){var p;g='<html><body><div id="state">'+g+"</div></body></html>";try{p=I.contentWindow.document;p.open();p.write(g);p.close();return true}catch(r){return false}}function l(){var g,p,r,v;if(!I.contentWindow||!I.contentWindow.document)setTimeout(l,10);else{g=I.contentWindow.document;r=(p=g.getElementById("state"))?p.innerText:null;v=a();setInterval(function(){var M,B;g=I.contentWindow.document;M=(p=g.getElementById("state"))?p.innerText:null;B=a();if(M!==r){r=M;e(r);B=r?r:L;v=location.hash=B;b()}else if(B!==v){v=B;j(B)}},50);F=true;y!=null&&y()}}function n(){if(!q){var g=a(),p=history.length;Q&&clearInterval(Q);Q=setInterval(function(){var r,v;r=a();v=history.length;if(r!==g){g=r;p=v;e(g);b()}else if(v!==p&&u){g=r;p=v;r=D[p-1];e(r);b()}},50)}}function H(){var g;g=J.value.split("|");if(g.length>1){L=g[0];C=g[1]}if(g.length>2)D=g[2].split(",");if(q)l();else{n();F=true;y!=null&&y()}}var u=false,q=self.isIElt9,s=false,y=null,I=null,J=null,F=false,Q=null,D=[],L,C,E=function(){};return{onReady:function(g){if(F)setTimeout(function(){g()},0);else y=g},_initialize:function(){J!=null&&H()},_initTimeout:function(){n()},register:function(g,p){if(!F){C=L=escape(g);E=p}},initialize:function(g,p){if(!F){var r=navigator.vendor||"";if(r!=="KDE")if(typeof window.opera!=="undefined")s=true;else if(!q&&r.indexOf("Apple Computer, Inc.")>-1)u=true;if(typeof g==="string")g=document.getElementById(g);if(!(!g||g.tagName.toUpperCase()!=="TEXTAREA"&&(g.tagName.toUpperCase()!=="INPUT"||g.type!=="hidden"&&g.type!=="text"))){J=g;if(q){if(typeof p==="string")p=document.getElementById(p);!p||p.tagName.toUpperCase()!=="IFRAME"||(I=p)}}}},navigate:function(g){if(F){fqstate=g;if(q)j(fqstate);else{location.hash=fqstate;if(u){D[history.length]=fqstate;b()}}}},getCurrentState:function(){if(!F)return"";return C}}}()}),_$_APP_CLASS_$_=new (function(){function x(d){d=g.pageCoordinates(d);p=d.x;r=d.y}function w(){var d=g.history.getCurrentState();if(v!=d){v=d;setTimeout(function(){H(null,"hash",null,true)},1)}}function G(d){if(v!=d){v=d;g.history.navigate(escape(d))}}function U(){window.onresize=function(){j()};document.body.ondragstart=function(){return false}}function Z(d,c){var f=M;f.object=g.getElement(d.getAttribute("dwid")); |
""};this.hasFocus=function(a){return a==document.activeElement};this.history=function(){function a(){var g,p;p=location.href;g=p.indexOf("#");return g>=0?p.substr(g+1):null}function b(){J.value=L+"|"+C;if(u)J.value+="|"+D.join(",")}function e(g){if(g){if(!g||C!==g){C=g||L;E(unescape(C))}}else{C=L;E(unescape(C))}}function j(g){var p;g='<html><body><div id="state">'+g+"</div></body></html>";try{p=I.contentWindow.document;p.open();p.write(g);p.close();return true}catch(r){return false}}function l(){var g, | ""};this.hasFocus=function(a){return a==document.activeElement};this.history=function(){function a(){var g,p;p=location.href;g=p.indexOf("#");return g>=0?p.substr(g+1):null}function b(){K.value=L+"|"+C;if(u)K.value+="|"+D.join(",")}function e(g){if(g){if(!g||C!==g){C=g||L;E(unescape(C))}}else{C=L;E(unescape(C))}}function j(g){var p;g='<html><body><div id="state">'+g+"</div></body></html>";try{p=I.contentWindow.document;p.open();p.write(g);p.close();return true}catch(r){return false}}function l(){var g, | var _$_WT_CLASS_$_=new (function(){function x(a,b){return a.style[b]?a.style[b]:document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(a,null)[b]:a.currentStyle?a.currentStyle[b]:null}function w(a,b,e){if(a=="auto"||a==null)return e;return(a=(a=b.exec(a))&&a.length==2?a[1]:null)?parseFloat(a):e}function G(a){return w(a,/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/i,0)}function U(a,b){return w(a,/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/i,b)}function Z(a){if(A==null)return null;if(!a)a=window.event;if(a){for(var b=a=h.target(a);b&&b!=A;)b=b.parentNode;return b==A?h.isIElt9?a:null:A}else return A}function V(a){var b=Z(a);if(b&&!W){if(!a)a=window.event;W=true;if(h.isIElt9){h.firedTarget=a.srcElement||b;b.fireEvent("onmousemove",a);h.firedTarget=null}else h.condCall(b,"onmousemove",a);return W=false}else return true}function O(a){var b=Z(a);h.capture(null);if(b){if(!a)a=window.event;if(h.isIElt9){h.firedTarget=a.srcElement||b;b.fireEvent("onmouseup",a);h.firedTarget=null}else h.condCall(b,"onmouseup",a);h.cancelEvent(a,h.CancelPropagate);return false}else return true}function aa(){if(!ba){ba=true;if(document.body.addEventListener){var a=document.body;a.addEventListener("mousemove",V,true);a.addEventListener("mouseup",O,true);h.isGecko&&window.addEventListener("mouseout",function(b){!b.relatedTarget&&h.hasTag(b.target,"HTML")&&O(b)},true)}else{a=document.body;a.attachEvent("onmousemove",V);a.attachEvent("onmouseup",O)}}}var h=this;this.buttons=0;this.mouseDown=function(a){h.buttons|=h.button(a)};this.mouseUp=function(a){h.buttons^=h.button(a)};this.arrayRemove=function(a,b,e){e=a.slice((e||b)+1||a.length);a.length=b<0?a.length+b:b;return a.push.apply(a,e)};var P=function(){for(var a,b=3,e=document.createElement("div"),j=e.getElementsByTagName("i");e.innerHTML="<!--[if gt IE "+ ++b+"]><i></i><![endif]--\>",j[0];);return b>4?b:a}();this.isIE=P!==undefined;this.isIE6=P===6;this.isIElt9=P<9;this.isGecko=navigator.userAgent.toLowerCase().indexOf("gecko")!=-1;this.isIEMobile=navigator.userAgent.toLowerCase().indexOf("msie 4")!=-1||navigator.userAgent.toLowerCase().indexOf("msie 5")!=-1;this.isOpera=typeof window.opera!=="undefined";this.updateDelay=this.isIE?10:51;this.setHtml=function(a,b,e){function j(n,H){var u,q,s;switch(n.nodeType){case 1:u=n.namespaceURI==null?document.createElement(n.nodeName):document.createElementNS(n.namespaceURI,n.nodeName);if(n.attributes&&n.attributes.length>0){q=0;for(s=n.attributes.length;q<s;)u.setAttribute(n.attributes[q].nodeName,n.getAttribute(n.attributes[q++].nodeName))}if(H&&n.childNodes.length>0){q=0;for(s=n.childNodes.length;q<s;){var y=j(n.childNodes[q++],H);y&&u.appendChild(y)}}return u;case 3:case 4:case 5:return document.createTextNode(n.nodeValue)}return null}if(h.isIE||_$_INNER_HTML_$_&&!e)if(e)a.innerHTML+=b;else a.innerHTML=b;else{var l;l=new DOMParser;l=l.parseFromString("<div>"+b+"</div>","application/xhtml+xml").documentElement;if(l.nodeType!=1)l=l.nextSibling;if(!e)a.innerHTML="";b=0;for(e=l.childNodes.length;b<e;)a.appendChild(j(l.childNodes[b++],true))}};this.hasTag=function(a,b){return a.nodeType==1&&a.tagName.toUpperCase()===b};this.insertAt=function(a,b,e){a.childNodes.length==0?a.appendChild(b):a.insertBefore(b,a.childNodes[e])};this.remove=function(a){(a=h.getElement(a))&&a.parentNode.removeChild(a)};this.unstub=function(a,b,e){if(e==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=h.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8);h.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(h.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var e,j;e=0;for(j=a.attributes.length;e<j;e++){var l=a.attributes[e].nodeName;l!="type"&&l!="name"&&b.setAttribute(l,a.getAttribute(l))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?h.CancelAll:b;if(b&h.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&h.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;try{document.activeElement&&document.activeElement.blur&&h.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}catch(e){}}};this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var e=0;e<window.frames.length;++e)try{if(b=window.frames[e].document.getElementById(a))return b}catch(j){}return b};this.widgetPageCoordinates=function(a){var b=0,e=0,j;if(h.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;e+=a.offsetTop;if(x(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;e+=document.body.scrollTop+document.documentElement.scrollTop;break}j=a.offsetParent;if(j==null)a=null;else{do{a=a.parentNode;if(h.hasTag(a,"DIV")){b-=a.scrollLeft;e-=a.scrollTop}}while(a!=null&&a!=j)}}return{x:b,y:e}};this.widgetCoordinates=function(a,b){b=h.pageCoordinates(b);a=h.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,e=0;if(a.pageX||a.pageY){b=a.pageX;e=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;e=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:e}};this.windowCoordinates=function(a){a=h.pageCoordinates(a);return{x:a.x-document.body.scrollLeft-document.documentElement.scrollLeft,y:a.y-document.body.scrollTop-document.documentElement.scrollTop}};this.wheelDelta=function(a){var b=0;if(a.wheelDelta)b=a.wheelDelta>0?1:-1;else if(a.detail)b=a.detail<0?1:-1;return b};this.scrollIntoView=function(a){(a=document.getElementById(a))&&a.scrollIntoView&&a.scrollIntoView(true)};this.getSelectionRange=function(a){if(document.selection)if(h.hasTag(a,"TEXTAREA")){var b=document.selection.createRange(),e=b.duplicate();e.moveToElementText(a);var j=0;if(b.text.length>1){j-=b.text.length;if(j<0)j=0}a=-1+j;for(e.moveStart("character",j);e.inRange(b);){e.moveStart("character");a++}b=b.text.replace(/\r/g,"");return{start:a,end:b.length+a}}else{e=$(a).val();a=document.selection.createRange().duplicate();a.moveEnd("character",e.length);b=a.text==""?e.length:e.lastIndexOf(a.text);a=document.selection.createRange().duplicate();a.moveStart("character",-e.length);return{start:b,end:a.text.length}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,e){var j=$(a).val();if(typeof b!="number")b=-1;if(typeof e!="number")e=-1;if(b<0)b=0;if(e>j.length)e=j.length;if(e<b)e=b;if(b>e)b=e;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=e}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",e-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||h.isIE?true:h.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};this.px=function(a,b){return G(x(a,b))};this.pxself=function(a,b){return G(a.style[b])};this.pctself=function(a,b){return U(a.style[b],0)};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?h.isHidden(a):false}};this.IEwidth=function(a,b,e){if(a.parentNode){var j=a.parentNode.clientWidth-h.px(a,"marginLeft")-h.px(a,"marginRight")-h.px(a,"borderLeftWidth")-h.px(a,"borderRightWidth")-h.px(a.parentNode,"paddingLeft")-h.px(a.parentNode,"paddingRight");b=U(b,0);e=U(e,1E5);return j<b?b-1:j>e?e+1:a.style.styleFloat!=""?b-1:"auto"}else return"auto"};this.hide=function(a){h.getElement(a).style.display="none"};this.inline=function(a){h.getElement(a).style.display="inline"};this.block=function(a){h.getElement(a).style.display="block"};this.show=function(a){h.getElement(a).style.display=""};var A=null;this.firedTarget=null;this.target=function(a){return h.firedTarget||a.target||a.srcElement};var W=false,ba=false;this.capture=function(a){aa();if(!(A&&a)){A=a;var b=document.body;if(b.setCapture)a!=null?b.setCapture():b.releaseCapture();if(a!=null){$(b).addClass("unselectable");b.setAttribute("unselectable","on");b.onselectstart="return false;"}else{$(b).removeClass("unselectable");b.setAttribute("unselectable","off");b.onselectstart=""}}};this.checkReleaseCapture=function(a,b){A&&a==A&&b.type=="mouseup"&&this.capture(null)};this.getElementsByClassName=function(a,b){if(document.getElementsByClassName)return b.getElementsByClassName(a);else{b=b.getElementsByTagName("*");for(var e=[],j,l=0,n=b.length;l<n;l++){j=b[l];j.className.indexOf(a)!=-1&&e.push(j)}return e}};this.addCss=function(a,b){var e=document.styleSheets[0];e.insertRule(a+" { "+b+" }",e.cssRules.length)};this.addCssText=function(a){var b=document.getElementById("Wt-inline-css");if(!b){b=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(b)}if(b.styleSheet){var e=document.createElement("style");if(b)b.parentNode.insertBefore(e,b);else{e.id="Wt-inline-css";document.getElementsByTagName("head")[0].appendChild(e)}e.styleSheet.cssText=a}else{a=document.createTextNode(a);b.appendChild(a)}};this.getCssRule=function(a,b){a=a.toLowerCase();if(document.styleSheets)for(var e=0;e<document.styleSheets.length;e++){var j=document.styleSheets[e],l=0,n;do{n=null;if(j.cssRules)n=j.cssRules[l];else if(j.rules)n=j.rules[l];if(n&&n.selectorText)if(n.selectorText.toLowerCase()==a)if(b=="delete"){j.cssRules?j.deleteRule(l):j.removeRule(l);return true}else return n;++l}while(n)}return false};this.removeCssRule=function(a){return h.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var e=document.createElement("link");e.setAttribute("type","text/css");e.setAttribute("href",a);e.setAttribute("type","text/css");e.setAttribute("rel","stylesheet");b!=""&&b!="all"&&e.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(e)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,e,j,l){var n=h.windowSize(),H=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,q=h.widgetPageCoordinates(a.offsetParent),s=["left","right"],y=["top","bottom"],I=h.px(a,"maxWidth")||a.offsetWidth,J=h.px(a,"maxHeight")||a.offsetHeight;if(b+I>H+n.x){j-=q.x;b=a.offsetParent.offsetWidth-(j+h.px(a,"marginRight"));j=1}else{b-=q.x;b-=h.px(a,"marginLeft");j=0}if(e+J>u+n.y){if(l>u+n.y)l=u+n.y;l-=q.y;e=a.offsetParent.offsetHeight-(l+h.px(a,"marginBottom"));l=1}else{e-=q.y;e-=h.px(a,"marginTop");l=0}a.style[s[j]]=b+"px";a.style[s[1-j]]="";a.style[y[l]]=e+"px";a.style[y[1-l]]=""};this.positionXY=function(a,b,e){a=h.getElement(a);a.style.display="";h.isHidden(a)||h.fitToWindow(a,b,e,b,e)};this.Horizontal=1;this.Vertical=2;this.positionAtWidget=function(a,b,e,j){a=h.getElement(a);b=h.getElement(b);var l=h.widgetPageCoordinates(b),n;if(j){a.parentNode.removeChild(a);$(".Wt-domRoot").get(0).appendChild(a)}a.style.position="absolute";a.style.display="block";if(e==h.Horizontal){e=l.x+b.offsetWidth;j=l.y;n=l.x;b=l.y+b.offsetHeight}else{e=l.x;j=l.y+b.offsetHeight;n=l.x+b.offsetWidth;b=l.y}h.fitToWindow(a,e,j,n,b);a.style.visibility=""};this.hasFocus=function(a){return a==document.activeElement};this.history=function(){function a(){var g,p;p=location.href;g=p.indexOf("#");return g>=0?p.substr(g+1):null}function b(){J.value=L+"|"+C;if(u)J.value+="|"+D.join(",")}function e(g){if(g){if(!g||C!==g){C=g||L;E(unescape(C))}}else{C=L;E(unescape(C))}}function j(g){var p;g='<html><body><div id="state">'+g+"</div></body></html>";try{p=I.contentWindow.document;p.open();p.write(g);p.close();return true}catch(r){return false}}function l(){var g,p,r,v;if(!I.contentWindow||!I.contentWindow.document)setTimeout(l,10);else{g=I.contentWindow.document;r=(p=g.getElementById("state"))?p.innerText:null;v=a();setInterval(function(){var M,B;g=I.contentWindow.document;M=(p=g.getElementById("state"))?p.innerText:null;B=a();if(M!==r){r=M;e(r);B=r?r:L;v=location.hash=B;b()}else if(B!==v){v=B;j(B)}},50);F=true;y!=null&&y()}}function n(){if(!q){var g=a(),p=history.length;Q&&clearInterval(Q);Q=setInterval(function(){var r,v;r=a();v=history.length;if(r!==g){g=r;p=v;e(g);b()}else if(v!==p&&u){g=r;p=v;r=D[p-1];e(r);b()}},50)}}function H(){var g;g=J.value.split("|");if(g.length>1){L=g[0];C=g[1]}if(g.length>2)D=g[2].split(",");if(q)l();else{n();F=true;y!=null&&y()}}var u=false,q=self.isIElt9,s=false,y=null,I=null,J=null,F=false,Q=null,D=[],L,C,E=function(){};return{onReady:function(g){if(F)setTimeout(function(){g()},0);else y=g},_initialize:function(){J!=null&&H()},_initTimeout:function(){n()},register:function(g,p){if(!F){C=L=escape(g);E=p}},initialize:function(g,p){if(!F){var r=navigator.vendor||"";if(r!=="KDE")if(typeof window.opera!=="undefined")s=true;else if(!q&&r.indexOf("Apple Computer, Inc.")>-1)u=true;if(typeof g==="string")g=document.getElementById(g);if(!(!g||g.tagName.toUpperCase()!=="TEXTAREA"&&(g.tagName.toUpperCase()!=="INPUT"||g.type!=="hidden"&&g.type!=="text"))){J=g;if(q){if(typeof p==="string")p=document.getElementById(p);!p||p.tagName.toUpperCase()!=="IFRAME"||(I=p)}}}},navigate:function(g){if(F){fqstate=g;if(q)j(fqstate);else{location.hash=fqstate;if(u){D[history.length]=fqstate;b()}}}},getCurrentState:function(){if(!F)return"";return C}}}()}),_$_APP_CLASS_$_=new (function(){function x(d){d=g.pageCoordinates(d);p=d.x;r=d.y}function w(){var d=g.history.getCurrentState();if(v!=d){v=d;setTimeout(function(){H(null,"hash",null,true)},1)}}function G(d){if(v!=d){v=d;g.history.navigate(escape(d))}}function U(){window.onresize=function(){j()};document.body.ondragstart=function(){return false}}function Z(d,c){var f=M;f.object=g.getElement(d.getAttribute("dwid")); |
r;p=v;e(g);b()}else if(v!==p&&u){g=r;p=v;r=D[p-1];e(r);b()}},50)}}function H(){var g;g=J.value.split("|");if(g.length>1){L=g[0];C=g[1]}if(g.length>2)D=g[2].split(",");if(q)l();else{n();F=true;y!=null&&y()}}var u=false,q=self.isIElt9,s=false,y=null,I=null,J=null,F=false,Q=null,D=[],L,C,E=function(){};return{onReady:function(g){if(F)setTimeout(function(){g()},0);else y=g},_initialize:function(){J!=null&&H()},_initTimeout:function(){n()},register:function(g,p){if(!F){C=L=escape(g);E=p}},initialize:function(g, p){if(!F){var r=navigator.vendor||"";if(r!=="KDE")if(typeof window.opera!=="undefined")s=true;else if(!q&&r.indexOf("Apple Computer, Inc.")>-1)u=true;if(typeof g==="string")g=document.getElementById(g);if(!(!g||g.tagName.toUpperCase()!=="TEXTAREA"&&(g.tagName.toUpperCase()!=="INPUT"||g.type!=="hidden"&&g.type!=="text"))){J=g;if(q){if(typeof p==="string")p=document.getElementById(p);!p||p.tagName.toUpperCase()!=="IFRAME"||(I=p)}}}},navigate:function(g){if(F){fqstate=g;if(q)j(fqstate);else{location.hash= | r;p=v;e(g);b()}else if(v!==p&&u){g=r;p=v;r=D[p-1];e(r);b()}},50)}}function H(){var g;g=K.value.split("|");if(g.length>1){L=g[0];C=g[1]}if(g.length>2)D=g[2].split(",");if(q)l();else{n();F=true;y!=null&&y()}}var u=false,q=self.isIElt9,s=false,y=null,I=null,K=null,F=false,Q=null,D=[],L,C,E=function(){};return{onReady:function(g){if(F)setTimeout(function(){g()},0);else y=g},_initialize:function(){K!=null&&H()},_initTimeout:function(){n()},register:function(g,p){if(!F){C=L=escape(g);E=p}},initialize:function(g, p){if(!F){var r=navigator.vendor||"";if(r!=="KDE")if(typeof window.opera!=="undefined")s=true;else if(!q&&r.indexOf("Apple Computer, Inc.")>-1)u=true;if(typeof g==="string")g=document.getElementById(g);if(!(!g||g.tagName.toUpperCase()!=="TEXTAREA"&&(g.tagName.toUpperCase()!=="INPUT"||g.type!=="hidden"&&g.type!=="text"))){K=g;if(q){if(typeof p==="string")p=document.getElementById(p);!p||p.tagName.toUpperCase()!=="IFRAME"||(I=p)}}}},navigate:function(g){if(F){fqstate=g;if(q)j(fqstate);else{location.hash= | var _$_WT_CLASS_$_=new (function(){function x(a,b){return a.style[b]?a.style[b]:document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(a,null)[b]:a.currentStyle?a.currentStyle[b]:null}function w(a,b,e){if(a=="auto"||a==null)return e;return(a=(a=b.exec(a))&&a.length==2?a[1]:null)?parseFloat(a):e}function G(a){return w(a,/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/i,0)}function U(a,b){return w(a,/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/i,b)}function Z(a){if(A==null)return null;if(!a)a=window.event;if(a){for(var b=a=h.target(a);b&&b!=A;)b=b.parentNode;return b==A?h.isIElt9?a:null:A}else return A}function V(a){var b=Z(a);if(b&&!W){if(!a)a=window.event;W=true;if(h.isIElt9){h.firedTarget=a.srcElement||b;b.fireEvent("onmousemove",a);h.firedTarget=null}else h.condCall(b,"onmousemove",a);return W=false}else return true}function O(a){var b=Z(a);h.capture(null);if(b){if(!a)a=window.event;if(h.isIElt9){h.firedTarget=a.srcElement||b;b.fireEvent("onmouseup",a);h.firedTarget=null}else h.condCall(b,"onmouseup",a);h.cancelEvent(a,h.CancelPropagate);return false}else return true}function aa(){if(!ba){ba=true;if(document.body.addEventListener){var a=document.body;a.addEventListener("mousemove",V,true);a.addEventListener("mouseup",O,true);h.isGecko&&window.addEventListener("mouseout",function(b){!b.relatedTarget&&h.hasTag(b.target,"HTML")&&O(b)},true)}else{a=document.body;a.attachEvent("onmousemove",V);a.attachEvent("onmouseup",O)}}}var h=this;this.buttons=0;this.mouseDown=function(a){h.buttons|=h.button(a)};this.mouseUp=function(a){h.buttons^=h.button(a)};this.arrayRemove=function(a,b,e){e=a.slice((e||b)+1||a.length);a.length=b<0?a.length+b:b;return a.push.apply(a,e)};var P=function(){for(var a,b=3,e=document.createElement("div"),j=e.getElementsByTagName("i");e.innerHTML="<!--[if gt IE "+ ++b+"]><i></i><![endif]--\>",j[0];);return b>4?b:a}();this.isIE=P!==undefined;this.isIE6=P===6;this.isIElt9=P<9;this.isGecko=navigator.userAgent.toLowerCase().indexOf("gecko")!=-1;this.isIEMobile=navigator.userAgent.toLowerCase().indexOf("msie 4")!=-1||navigator.userAgent.toLowerCase().indexOf("msie 5")!=-1;this.isOpera=typeof window.opera!=="undefined";this.updateDelay=this.isIE?10:51;this.setHtml=function(a,b,e){function j(n,H){var u,q,s;switch(n.nodeType){case 1:u=n.namespaceURI==null?document.createElement(n.nodeName):document.createElementNS(n.namespaceURI,n.nodeName);if(n.attributes&&n.attributes.length>0){q=0;for(s=n.attributes.length;q<s;)u.setAttribute(n.attributes[q].nodeName,n.getAttribute(n.attributes[q++].nodeName))}if(H&&n.childNodes.length>0){q=0;for(s=n.childNodes.length;q<s;){var y=j(n.childNodes[q++],H);y&&u.appendChild(y)}}return u;case 3:case 4:case 5:return document.createTextNode(n.nodeValue)}return null}if(h.isIE||_$_INNER_HTML_$_&&!e)if(e)a.innerHTML+=b;else a.innerHTML=b;else{var l;l=new DOMParser;l=l.parseFromString("<div>"+b+"</div>","application/xhtml+xml").documentElement;if(l.nodeType!=1)l=l.nextSibling;if(!e)a.innerHTML="";b=0;for(e=l.childNodes.length;b<e;)a.appendChild(j(l.childNodes[b++],true))}};this.hasTag=function(a,b){return a.nodeType==1&&a.tagName.toUpperCase()===b};this.insertAt=function(a,b,e){a.childNodes.length==0?a.appendChild(b):a.insertBefore(b,a.childNodes[e])};this.remove=function(a){(a=h.getElement(a))&&a.parentNode.removeChild(a)};this.unstub=function(a,b,e){if(e==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=h.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8);h.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(h.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var e,j;e=0;for(j=a.attributes.length;e<j;e++){var l=a.attributes[e].nodeName;l!="type"&&l!="name"&&b.setAttribute(l,a.getAttribute(l))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?h.CancelAll:b;if(b&h.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&h.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;try{document.activeElement&&document.activeElement.blur&&h.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}catch(e){}}};this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var e=0;e<window.frames.length;++e)try{if(b=window.frames[e].document.getElementById(a))return b}catch(j){}return b};this.widgetPageCoordinates=function(a){var b=0,e=0,j;if(h.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;e+=a.offsetTop;if(x(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;e+=document.body.scrollTop+document.documentElement.scrollTop;break}j=a.offsetParent;if(j==null)a=null;else{do{a=a.parentNode;if(h.hasTag(a,"DIV")){b-=a.scrollLeft;e-=a.scrollTop}}while(a!=null&&a!=j)}}return{x:b,y:e}};this.widgetCoordinates=function(a,b){b=h.pageCoordinates(b);a=h.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,e=0;if(a.pageX||a.pageY){b=a.pageX;e=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;e=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:e}};this.windowCoordinates=function(a){a=h.pageCoordinates(a);return{x:a.x-document.body.scrollLeft-document.documentElement.scrollLeft,y:a.y-document.body.scrollTop-document.documentElement.scrollTop}};this.wheelDelta=function(a){var b=0;if(a.wheelDelta)b=a.wheelDelta>0?1:-1;else if(a.detail)b=a.detail<0?1:-1;return b};this.scrollIntoView=function(a){(a=document.getElementById(a))&&a.scrollIntoView&&a.scrollIntoView(true)};this.getSelectionRange=function(a){if(document.selection)if(h.hasTag(a,"TEXTAREA")){var b=document.selection.createRange(),e=b.duplicate();e.moveToElementText(a);var j=0;if(b.text.length>1){j-=b.text.length;if(j<0)j=0}a=-1+j;for(e.moveStart("character",j);e.inRange(b);){e.moveStart("character");a++}b=b.text.replace(/\r/g,"");return{start:a,end:b.length+a}}else{e=$(a).val();a=document.selection.createRange().duplicate();a.moveEnd("character",e.length);b=a.text==""?e.length:e.lastIndexOf(a.text);a=document.selection.createRange().duplicate();a.moveStart("character",-e.length);return{start:b,end:a.text.length}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,e){var j=$(a).val();if(typeof b!="number")b=-1;if(typeof e!="number")e=-1;if(b<0)b=0;if(e>j.length)e=j.length;if(e<b)e=b;if(b>e)b=e;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=e}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",e-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||h.isIE?true:h.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};this.px=function(a,b){return G(x(a,b))};this.pxself=function(a,b){return G(a.style[b])};this.pctself=function(a,b){return U(a.style[b],0)};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?h.isHidden(a):false}};this.IEwidth=function(a,b,e){if(a.parentNode){var j=a.parentNode.clientWidth-h.px(a,"marginLeft")-h.px(a,"marginRight")-h.px(a,"borderLeftWidth")-h.px(a,"borderRightWidth")-h.px(a.parentNode,"paddingLeft")-h.px(a.parentNode,"paddingRight");b=U(b,0);e=U(e,1E5);return j<b?b-1:j>e?e+1:a.style.styleFloat!=""?b-1:"auto"}else return"auto"};this.hide=function(a){h.getElement(a).style.display="none"};this.inline=function(a){h.getElement(a).style.display="inline"};this.block=function(a){h.getElement(a).style.display="block"};this.show=function(a){h.getElement(a).style.display=""};var A=null;this.firedTarget=null;this.target=function(a){return h.firedTarget||a.target||a.srcElement};var W=false,ba=false;this.capture=function(a){aa();if(!(A&&a)){A=a;var b=document.body;if(b.setCapture)a!=null?b.setCapture():b.releaseCapture();if(a!=null){$(b).addClass("unselectable");b.setAttribute("unselectable","on");b.onselectstart="return false;"}else{$(b).removeClass("unselectable");b.setAttribute("unselectable","off");b.onselectstart=""}}};this.checkReleaseCapture=function(a,b){A&&a==A&&b.type=="mouseup"&&this.capture(null)};this.getElementsByClassName=function(a,b){if(document.getElementsByClassName)return b.getElementsByClassName(a);else{b=b.getElementsByTagName("*");for(var e=[],j,l=0,n=b.length;l<n;l++){j=b[l];j.className.indexOf(a)!=-1&&e.push(j)}return e}};this.addCss=function(a,b){var e=document.styleSheets[0];e.insertRule(a+" { "+b+" }",e.cssRules.length)};this.addCssText=function(a){var b=document.getElementById("Wt-inline-css");if(!b){b=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(b)}if(b.styleSheet){var e=document.createElement("style");if(b)b.parentNode.insertBefore(e,b);else{e.id="Wt-inline-css";document.getElementsByTagName("head")[0].appendChild(e)}e.styleSheet.cssText=a}else{a=document.createTextNode(a);b.appendChild(a)}};this.getCssRule=function(a,b){a=a.toLowerCase();if(document.styleSheets)for(var e=0;e<document.styleSheets.length;e++){var j=document.styleSheets[e],l=0,n;do{n=null;if(j.cssRules)n=j.cssRules[l];else if(j.rules)n=j.rules[l];if(n&&n.selectorText)if(n.selectorText.toLowerCase()==a)if(b=="delete"){j.cssRules?j.deleteRule(l):j.removeRule(l);return true}else return n;++l}while(n)}return false};this.removeCssRule=function(a){return h.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var e=document.createElement("link");e.setAttribute("type","text/css");e.setAttribute("href",a);e.setAttribute("type","text/css");e.setAttribute("rel","stylesheet");b!=""&&b!="all"&&e.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(e)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,e,j,l){var n=h.windowSize(),H=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,q=h.widgetPageCoordinates(a.offsetParent),s=["left","right"],y=["top","bottom"],I=h.px(a,"maxWidth")||a.offsetWidth,J=h.px(a,"maxHeight")||a.offsetHeight;if(b+I>H+n.x){j-=q.x;b=a.offsetParent.offsetWidth-(j+h.px(a,"marginRight"));j=1}else{b-=q.x;b-=h.px(a,"marginLeft");j=0}if(e+J>u+n.y){if(l>u+n.y)l=u+n.y;l-=q.y;e=a.offsetParent.offsetHeight-(l+h.px(a,"marginBottom"));l=1}else{e-=q.y;e-=h.px(a,"marginTop");l=0}a.style[s[j]]=b+"px";a.style[s[1-j]]="";a.style[y[l]]=e+"px";a.style[y[1-l]]=""};this.positionXY=function(a,b,e){a=h.getElement(a);a.style.display="";h.isHidden(a)||h.fitToWindow(a,b,e,b,e)};this.Horizontal=1;this.Vertical=2;this.positionAtWidget=function(a,b,e,j){a=h.getElement(a);b=h.getElement(b);var l=h.widgetPageCoordinates(b),n;if(j){a.parentNode.removeChild(a);$(".Wt-domRoot").get(0).appendChild(a)}a.style.position="absolute";a.style.display="block";if(e==h.Horizontal){e=l.x+b.offsetWidth;j=l.y;n=l.x;b=l.y+b.offsetHeight}else{e=l.x;j=l.y+b.offsetHeight;n=l.x+b.offsetWidth;b=l.y}h.fitToWindow(a,e,j,n,b);a.style.visibility=""};this.hasFocus=function(a){return a==document.activeElement};this.history=function(){function a(){var g,p;p=location.href;g=p.indexOf("#");return g>=0?p.substr(g+1):null}function b(){J.value=L+"|"+C;if(u)J.value+="|"+D.join(",")}function e(g){if(g){if(!g||C!==g){C=g||L;E(unescape(C))}}else{C=L;E(unescape(C))}}function j(g){var p;g='<html><body><div id="state">'+g+"</div></body></html>";try{p=I.contentWindow.document;p.open();p.write(g);p.close();return true}catch(r){return false}}function l(){var g,p,r,v;if(!I.contentWindow||!I.contentWindow.document)setTimeout(l,10);else{g=I.contentWindow.document;r=(p=g.getElementById("state"))?p.innerText:null;v=a();setInterval(function(){var M,B;g=I.contentWindow.document;M=(p=g.getElementById("state"))?p.innerText:null;B=a();if(M!==r){r=M;e(r);B=r?r:L;v=location.hash=B;b()}else if(B!==v){v=B;j(B)}},50);F=true;y!=null&&y()}}function n(){if(!q){var g=a(),p=history.length;Q&&clearInterval(Q);Q=setInterval(function(){var r,v;r=a();v=history.length;if(r!==g){g=r;p=v;e(g);b()}else if(v!==p&&u){g=r;p=v;r=D[p-1];e(r);b()}},50)}}function H(){var g;g=J.value.split("|");if(g.length>1){L=g[0];C=g[1]}if(g.length>2)D=g[2].split(",");if(q)l();else{n();F=true;y!=null&&y()}}var u=false,q=self.isIElt9,s=false,y=null,I=null,J=null,F=false,Q=null,D=[],L,C,E=function(){};return{onReady:function(g){if(F)setTimeout(function(){g()},0);else y=g},_initialize:function(){J!=null&&H()},_initTimeout:function(){n()},register:function(g,p){if(!F){C=L=escape(g);E=p}},initialize:function(g,p){if(!F){var r=navigator.vendor||"";if(r!=="KDE")if(typeof window.opera!=="undefined")s=true;else if(!q&&r.indexOf("Apple Computer, Inc.")>-1)u=true;if(typeof g==="string")g=document.getElementById(g);if(!(!g||g.tagName.toUpperCase()!=="TEXTAREA"&&(g.tagName.toUpperCase()!=="INPUT"||g.type!=="hidden"&&g.type!=="text"))){J=g;if(q){if(typeof p==="string")p=document.getElementById(p);!p||p.tagName.toUpperCase()!=="IFRAME"||(I=p)}}}},navigate:function(g){if(F){fqstate=g;if(q)j(fqstate);else{location.hash=fqstate;if(u){D[history.length]=fqstate;b()}}}},getCurrentState:function(){if(!F)return"";return C}}}()}),_$_APP_CLASS_$_=new (function(){function x(d){d=g.pageCoordinates(d);p=d.x;r=d.y}function w(){var d=g.history.getCurrentState();if(v!=d){v=d;setTimeout(function(){H(null,"hash",null,true)},1)}}function G(d){if(v!=d){v=d;g.history.navigate(escape(d))}}function U(){window.onresize=function(){j()};document.body.ondragstart=function(){return false}}function Z(d,c){var f=M;f.object=g.getElement(d.getAttribute("dwid")); |
var last_suggestion_text = "", suggestion_cache = {}, suggest_interval, suggest_delay = 250, ajax_suggestions = new win.XMLHttpRequest(); | var ajax_suggestions = new win.XMLHttpRequest(), last_suggestion_text = "", suggest_cache = {}, suggest_delay = 250, suggest_interval; | q_obj.onkeypress = (function () { /// Auto Suggest variables var last_suggestion_text = "", suggestion_cache = {}, suggest_interval, suggest_delay = 250, ajax_suggestions = new win.XMLHttpRequest(); /** * */ function request_suggestions() { clearInterval(suggest_interval); if (q_obj.value == last_suggestion_text) return; ///TODO: Determine if there is a better way to write this code so that we don't need to use q_obj twice. last_suggestion_text = q_obj.value.trim(); if (last_suggestion_text == "") return; /// Stop a previous, unfinished request. if (ajax_suggestions.readyState % 4) ajax_suggestions.abort(); /// Check to see if we already have this in the cache. /// Do we need to request the suggestions from the server? if (typeof suggestion_cache[last_suggestion_text] == "undefined") { post_to_server("suggest.php", "q=" + encodeURIComponent(last_suggestion_text), ajax_suggestions, handle_suggest); } else { show_suggestions(suggestion_cache[last_suggestion_text]); } } /** * */ function handle_suggest(res) { } /** * Handle keyboard events (onkeypress). * * This function is called as the user types in the input box. * It then analyzes the type of key strokes and determines if * BibleForge needs to look up suggestions for the user. * * @param event (event object) (optional) The event object (Mozilla/Safari/Opera). * @return ??? * @note This function is returned into the window.onkeypress event. */ return function (event) { if (!event) event = win.event; /// IE does not send the event object. /// keyCode meanings: /// 0 (any letter) /// 13 enter /// 8 backspace /// 38 up /// 40 down switch (event.keyCode) { case 38: ///TODO: Move the highlighting up. break; case 40: ///TODO: Move the highlighting down. break; default: clearInterval(suggest_interval); suggest_interval = setInterval(request_suggestions, suggest_delay); break; } return true; }; }()); |
if (typeof suggestion_cache[last_suggestion_text] == "undefined") { | if (typeof suggest_cache[last_suggestion_text] == "undefined") { | q_obj.onkeypress = (function () { /// Auto Suggest variables var last_suggestion_text = "", suggestion_cache = {}, suggest_interval, suggest_delay = 250, ajax_suggestions = new win.XMLHttpRequest(); /** * */ function request_suggestions() { clearInterval(suggest_interval); if (q_obj.value == last_suggestion_text) return; ///TODO: Determine if there is a better way to write this code so that we don't need to use q_obj twice. last_suggestion_text = q_obj.value.trim(); if (last_suggestion_text == "") return; /// Stop a previous, unfinished request. if (ajax_suggestions.readyState % 4) ajax_suggestions.abort(); /// Check to see if we already have this in the cache. /// Do we need to request the suggestions from the server? if (typeof suggestion_cache[last_suggestion_text] == "undefined") { post_to_server("suggest.php", "q=" + encodeURIComponent(last_suggestion_text), ajax_suggestions, handle_suggest); } else { show_suggestions(suggestion_cache[last_suggestion_text]); } } /** * */ function handle_suggest(res) { } /** * Handle keyboard events (onkeypress). * * This function is called as the user types in the input box. * It then analyzes the type of key strokes and determines if * BibleForge needs to look up suggestions for the user. * * @param event (event object) (optional) The event object (Mozilla/Safari/Opera). * @return ??? * @note This function is returned into the window.onkeypress event. */ return function (event) { if (!event) event = win.event; /// IE does not send the event object. /// keyCode meanings: /// 0 (any letter) /// 13 enter /// 8 backspace /// 38 up /// 40 down switch (event.keyCode) { case 38: ///TODO: Move the highlighting up. break; case 40: ///TODO: Move the highlighting down. break; default: clearInterval(suggest_interval); suggest_interval = setInterval(request_suggestions, suggest_delay); break; } return true; }; }()); |
show_suggestions(suggestion_cache[last_suggestion_text]); | show_suggestions(suggest_cache[last_suggestion_text]); | q_obj.onkeypress = (function () { /// Auto Suggest variables var last_suggestion_text = "", suggestion_cache = {}, suggest_interval, suggest_delay = 250, ajax_suggestions = new win.XMLHttpRequest(); /** * */ function request_suggestions() { clearInterval(suggest_interval); if (q_obj.value == last_suggestion_text) return; ///TODO: Determine if there is a better way to write this code so that we don't need to use q_obj twice. last_suggestion_text = q_obj.value.trim(); if (last_suggestion_text == "") return; /// Stop a previous, unfinished request. if (ajax_suggestions.readyState % 4) ajax_suggestions.abort(); /// Check to see if we already have this in the cache. /// Do we need to request the suggestions from the server? if (typeof suggestion_cache[last_suggestion_text] == "undefined") { post_to_server("suggest.php", "q=" + encodeURIComponent(last_suggestion_text), ajax_suggestions, handle_suggest); } else { show_suggestions(suggestion_cache[last_suggestion_text]); } } /** * */ function handle_suggest(res) { } /** * Handle keyboard events (onkeypress). * * This function is called as the user types in the input box. * It then analyzes the type of key strokes and determines if * BibleForge needs to look up suggestions for the user. * * @param event (event object) (optional) The event object (Mozilla/Safari/Opera). * @return ??? * @note This function is returned into the window.onkeypress event. */ return function (event) { if (!event) event = win.event; /// IE does not send the event object. /// keyCode meanings: /// 0 (any letter) /// 13 enter /// 8 backspace /// 38 up /// 40 down switch (event.keyCode) { case 38: ///TODO: Move the highlighting up. break; case 40: ///TODO: Move the highlighting down. break; default: clearInterval(suggest_interval); suggest_interval = setInterval(request_suggestions, suggest_delay); break; } return true; }; }()); |
j+"</div></body></html>";try{o=F.contentWindow.document;o.open();o.write(j);o.close();return true}catch(p){return false}}function k(){var j,o,p,w;if(!F.contentWindow||!F.contentWindow.document)setTimeout(k,10);else{j=F.contentWindow.document;p=(o=j.getElementById("state"))?o.innerText:null;w=a();setInterval(function(){var O,G;j=F.contentWindow.document;O=(o=j.getElementById("state"))?o.innerText:null;G=a();if(O!==p){p=O;f(p);G=p?p:D;w=location.hash=G;b()}else if(G!==w){w=G;n(G)}},50);B=true;z!=null&& z()}}function m(){if(!t){var j=a(),o=history.length;P&&clearInterval(P);P=setInterval(function(){var p,w;p=a();w=history.length;if(p!==j){j=p;o=w;f(j);b()}else if(w!==o&&r){j=p;o=w;p=E[o-1];f(p);b()}},50)}}function x(){var j;j=I.value.split("|");if(j.length>1){D=j[0];y=j[1]}if(j.length>2)E=j[2].split(",");if(t)k();else{m();B=true;z!=null&&z()}}var r=false,t=false,A=false,z=null,F=null,I=null,B=false,P=null,E=[],D,y,J=function(){};return{onReady:function(j){if(B)setTimeout(function(){j()},0);else z= | j+"</div></body></html>";try{o=F.contentWindow.document;o.open();o.write(j);o.close();return true}catch(p){return false}}function k(){var j,o,p,w;if(!F.contentWindow||!F.contentWindow.document)setTimeout(k,10);else{j=F.contentWindow.document;p=(o=j.getElementById("state"))?o.innerText:null;w=a();setInterval(function(){var P,G;j=F.contentWindow.document;P=(o=j.getElementById("state"))?o.innerText:null;G=a();if(P!==p){p=P;f(p);G=p?p:D;w=location.hash=G;b()}else if(G!==w){w=G;n(G)}},50);B=true;z!=null&& z()}}function m(){if(!t){var j=a(),o=history.length;Q&&clearInterval(Q);Q=setInterval(function(){var p,w;p=a();w=history.length;if(p!==j){j=p;o=w;f(j);b()}else if(w!==o&&r){j=p;o=w;p=E[o-1];f(p);b()}},50)}}function x(){var j;j=I.value.split("|");if(j.length>1){D=j[0];y=j[1]}if(j.length>2)E=j[2].split(",");if(t)k();else{m();B=true;z!=null&&z()}}var r=false,t=false,A=false,z=null,F=null,I=null,B=false,Q=null,E=[],D,y,J=function(){};return{onReady:function(j){if(B)setTimeout(function(){j()},0);else z= | var _$_WT_CLASS_$_=new (function(){var l=this;this.arrayRemove=function(a,b,f){f=a.slice((f||b)+1||a.length);a.length=b<0?a.length+b:b;return a.push.apply(a,f)};this.isIE=navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1;this.isGecko=navigator.userAgent.toLowerCase().indexOf("gecko")!=-1;this.isIEMobile=navigator.userAgent.toLowerCase().indexOf("msie 4")!=-1||navigator.userAgent.toLowerCase().indexOf("msie 5")!=-1;this.updateDelay=this.isIE?10:51;this.setHtml=function(a,b,f){function n(m,x){var r,t,A;switch(m.nodeType){case 1:r=m.namespaceURI==null?document.createElement(m.nodeName):document.createElementNS(m.namespaceURI,m.nodeName);if(m.attributes&&m.attributes.length>0){t=0;for(A=m.attributes.length;t<A;)r.setAttribute(m.attributes[t].nodeName,m.getAttribute(m.attributes[t++].nodeName))}if(x&&m.childNodes.length>0){t=0;for(A=m.childNodes.length;t<A;){var z=n(m.childNodes[t++],x);z&&r.appendChild(z)}}return r;case 3:case 4:case 5:return document.createTextNode(m.nodeValue)}}if(l.isIE||_$_INNER_HTML_$_&&!f)if(f)a.innerHTML+=b;else a.innerHTML=b;else{var k;k=new DOMParser;k=k.parseFromString("<div>"+b+"</div>","application/xhtml+xml").documentElement;if(k.nodeType!=1)k=k.nextSibling;if(!f)a.innerHTML="";b=0;for(f=k.childNodes.length;b<f;)a.appendChild(n(k.childNodes[b++],true))}};this.hasTag=function(a,b){return a.tagName.toUpperCase()===b};this.insertAt=function(a,b,f){a.childNodes.length==0?a.appendChild(b):a.insertBefore(b,a.childNodes[f])};this.unstub=function(a,b,f){if(f==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=l.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){wrapped=a;a=a.parentNode;wrapped.style.margin=a.style.margin;a.parentNode.replaceChild(wrapped,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(l.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){var b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var f,n;f=0;for(n=a.attributes.length;f<n;f++){var k=a.attributes[f].nodeName;k!="type"&&k!="name"&&b.setAttribute(k,a.getAttribute(k))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?l.CancelAll:b;if(b&l.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&l.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;document.activeElement&&document.activeElement.blur&&l.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}};this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(n){}return b};this.widgetPageCoordinates=function(a){var b=objY=0,f;if(l.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;objY+=a.offsetTop;f=a.offsetParent;if(f==null)a=null;else{do{a=a.parentNode;if(l.hasTag(a,"DIV")){b-=a.scrollLeft;objY-=a.scrollTop}}while(a!=null&&a!=f)}}return{x:b,y:objY}};this.widgetCoordinates=function(a,b){b=l.pageCoordinates(b);a=l.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=posY=0;if(a.pageX||a.pageY){b=a.pageX;posY=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;posY=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:posY}};this.scrollIntoView=function(a){(a=document.getElementById(a))&&a.scrollIntoView&&a.scrollIntoView(true)};this.getSelectionRange=function(a){if(document.selection){var b=document.selection.createRange(),f=b.duplicate();f.moveToElementText(a);f.setEndPoint("EndToEnd",b);a=f.text.length-b.text.length;return{start:a,end:a+b.text.length}}else return{start:a.selectionStart,end:a.selectionEnd}};this.setSelectionRange=function(a,b,f){if(a.createTextRange){a=a.createTextRange();a.collapse(true);a.moveEnd("character",f);a.moveStart("character",b);a.select()}else if(a.setSelectionRange){a.focus();a.setSelectionRange(b,f)}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||l.isIE?true:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};this.px=function(a,b){var f=null;f=document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(a,null)[b]:a.currentStyle?a.currentStyle[b]:a.style[b];if(f=="auto"||f==null)return 0;return(f=(a=/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/.exec(f))&&a.length==2?a[1]:"0")?parseFloat(f):0};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?l.isHidden(a):false}};this.pxself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.pctself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.IEwidth=function(a,b,f){if(a.parentNode){var n=a.parentNode.clientWidth-l.px(a,"marginLeft")-l.px(a,"marginRight")-l.px(a,"borderLeftWidth")-l.px(a,"borderRightWidth")-l.px(a.parentNode,"paddingLeft")-l.px(a.parentNode,"paddingRight"),k=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(b);b=(k=k&&k.length==2?k[1]:"0")?parseFloat(k):0;f=(k=(k=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(f))&&k.length==2?k[1]:"100000")?parseFloat(k):1E5;return n<b?b-1:n>f?f+1:a.style.styleFloat!=""?b-1:"auto"}else return"auto"};this.hide=function(a){l.getElement(a).style.display="none"};this.inline=function(a){l.getElement(a).style.display="inline"};this.block=function(a){l.getElement(a).style.display="block"};this.show=function(a){l.getElement(a).style.display=""};this.getElementsByClassName=function(a,b){if(document.getElementsByClassName)return b.getElementsByClassName(a);else{b=b.getElementsByTagName("*");for(var f=[],n,k=0,m=b.length;k<m;k++){n=b[k];n.className.indexOf(a)!=-1&&f.push(n)}return f}};this.addCss=function(a,b){var f=document.styleSheets[0];f.insertRule(a+" { "+b+" }",f.cssRules.length)};this.addCssText=function(a){var b=document.getElementById("Wt-inline-css");if(!b){b=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(b)}if(b.styleSheet){var f=document.createElement("style");if(b)b.parentNode.insertBefore(f,b);else{f.id="Wt-inline-css";document.getElementsByTagName("head")[0].appendChild(f)}f.styleSheet.cssText=a}else{a=document.createTextNode(a);b.appendChild(a)}};this.getCssRule=function(a,b){a=a.toLowerCase();if(document.styleSheets)for(var f=0;f<document.styleSheets.length;f++){var n=document.styleSheets[f],k=0,m=false;do{if((m=n.cssRules?n.cssRules[k]:n.rules[k])&&m.selectorText)if(m.selectorText.toLowerCase()==a)if(b=="delete"){n.cssRules?n.deleteRule(k):n.removeRule(k);return true}else return m;++k}while(m)}return false};this.removeCssRule=function(a){return l.getCssRule(a,"delete")};this.addStyleSheet=function(a){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var b=document.createElement("link");b.setAttribute("type","text/css");b.setAttribute("href",a);b.setAttribute("type","text/css");b.setAttribute("rel","stylesheet");document.getElementsByTagName("head")[0].appendChild(b)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,n,k){var m=l.windowSize(),x=document.body.scrollLeft+document.documentElement.scrollLeft,r=document.body.scrollTop+document.documentElement.scrollTop;if(b+a.offsetWidth>x+m.x)b=n-a.offsetWidth-l.px(a,"marginRight");else b-=l.px(a,"marginLeft");if(f+a.offsetHeight>r+m.y){if(k>r+m.y)k=r+m.y;f=k-a.offsetHeight-l.px(a,"marginBottom")}else f-=l.px(a,"marginTop");if(b<x)b=x+m.x-a.offsetWidth-3;if(f<r)f=r+m.y-a.offsetHeight-3;n=l.widgetPageCoordinates(a.offsetParent);a.style.left=b-n.x+"px";a.style.top=f-n.y+"px"};this.positionXY=function(a,b,f){a=l.getElement(a);l.isHidden(a)||l.fitToWindow(a,b,f,b,f)};this.Horizontal=1;this.Vertical=2;this.positionAtWidget=function(a,b,f){a=l.getElement(a);b=l.getElement(b);var n=l.widgetPageCoordinates(b),k,m;a.style.display="block";if(f==l.Horizontal){f=n.x+b.offsetWidth;k=n.y;m=n.x;b=n.y+b.offsetHeight}else{f=n.x;k=n.y+b.offsetHeight;m=n.x+b.offsetWidth;b=n.y}l.fitToWindow(a,f,k,m,b)};this.history=function(){function a(){var j,o;o=location.href;j=o.indexOf("#");return j>=0?o.substr(j+1):null}function b(){I.value=D+"|"+y;if(r)I.value+="|"+E.join(",")}function f(j){if(j){if(!j||y!==j){y=j||D;J(unescape(y))}}else{y=D;J(unescape(y))}}function n(j){var o;j='<html><body><div id="state">'+j+"</div></body></html>";try{o=F.contentWindow.document;o.open();o.write(j);o.close();return true}catch(p){return false}}function k(){var j,o,p,w;if(!F.contentWindow||!F.contentWindow.document)setTimeout(k,10);else{j=F.contentWindow.document;p=(o=j.getElementById("state"))?o.innerText:null;w=a();setInterval(function(){var O,G;j=F.contentWindow.document;O=(o=j.getElementById("state"))?o.innerText:null;G=a();if(O!==p){p=O;f(p);G=p?p:D;w=location.hash=G;b()}else if(G!==w){w=G;n(G)}},50);B=true;z!=null&&z()}}function m(){if(!t){var j=a(),o=history.length;P&&clearInterval(P);P=setInterval(function(){var p,w;p=a();w=history.length;if(p!==j){j=p;o=w;f(j);b()}else if(w!==o&&r){j=p;o=w;p=E[o-1];f(p);b()}},50)}}function x(){var j;j=I.value.split("|");if(j.length>1){D=j[0];y=j[1]}if(j.length>2)E=j[2].split(",");if(t)k();else{m();B=true;z!=null&&z()}}var r=false,t=false,A=false,z=null,F=null,I=null,B=false,P=null,E=[],D,y,J=function(){};return{onReady:function(j){if(B)setTimeout(function(){j()},0);else z=j},_initialize:function(){I!=null&&x()},_initTimeout:function(){m()},register:function(j,o){if(!B){y=D=escape(j);J=o}},initialize:function(j,o){if(!B){var p=navigator.vendor||"";if(p!=="KDE")if(typeof window.opera!=="undefined")A=true;else if(typeof document.all!=="undefined")t=true;else if(p.indexOf("Apple Computer, Inc.")>-1)r=true;if(typeof j==="string")j=document.getElementById(j);if(!(!j||j.tagName.toUpperCase()!=="TEXTAREA"&&(j.tagName.toUpperCase()!=="INPUT"||j.type!=="hidden"&&j.type!=="text"))){I=j;if(t){if(typeof o==="string")o=document.getElementById(o);!o||o.tagName.toUpperCase()!=="IFRAME"||(F=o)}}}},navigate:function(j){if(B){fqstate=j;if(t)return n(fqstate);else{location.hash=fqstate;if(r){E[history.length]=fqstate;b()}return true}}},getCurrentState:function(){if(!B)return"";return y}}}()}),_$_APP_CLASS_$_=new (function(){function l(c){c=q.pageCoordinates(c);$=c.x;aa=c.y}function a(){var c=q.history.getCurrentState();if(L!=c){L=c;setTimeout(function(){J(null,"hash",null,true)},1)}}function b(c){if(L!= |
if(!a)a=window.event;if(a){for(var b=a=g.target(a);b&&b!=z;)b=b.parentNode;return b==z?g.isIElt9?a:null:z}else return z}function V(a){var b=ca(a);if(b&&!P){if(!a)a=window.event;P=true;if(g.isIElt9){g.firedTarget=a.srcElement||b;b.fireEvent("onmousemove",a);g.firedTarget=null}else g.condCall(b,"onmousemove",a);return P=false}else return true}function Q(a){var b=ca(a);g.capture(null);if(b){if(!a)a=window.event;if(g.isIElt9){g.firedTarget=a.srcElement||b;b.fireEvent("onmouseup",a);g.firedTarget=null}else g.condCall(b, | if(!a)a=window.event;if(a){for(var b=a=g.target(a);b&&b!=z;)b=b.parentNode;return b==z?g.isIElt9?a:null:z}else return z}function V(a){var b=ca(a);if(b&&!N){if(!a)a=window.event;N=true;if(g.isIElt9){g.firedTarget=a.srcElement||b;b.fireEvent("onmousemove",a);g.firedTarget=null}else g.condCall(b,"onmousemove",a);return N=false}else return true}function Q(a){var b=ca(a);g.capture(null);if(b){if(!a)a=window.event;if(g.isIElt9){g.firedTarget=a.srcElement||b;b.fireEvent("onmouseup",a);g.firedTarget=null}else g.condCall(b, | window._$_WT_CLASS_$_=new (function(){function w(a,b){return a.style[b]?a.style[b]:document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(a,null)[b]:a.currentStyle?a.currentStyle[b]:null}function v(a,b,f){if(a=="auto"||a==null)return f;return(a=(a=b.exec(a))&&a.length==2?a[1]:null)?parseFloat(a):f}function G(a){return v(a,/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/i,0)}function U(a,b){return v(a,/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/i,b)}function ca(a){if(z==null)return null;if(!a)a=window.event;if(a){for(var b=a=g.target(a);b&&b!=z;)b=b.parentNode;return b==z?g.isIElt9?a:null:z}else return z}function V(a){var b=ca(a);if(b&&!P){if(!a)a=window.event;P=true;if(g.isIElt9){g.firedTarget=a.srcElement||b;b.fireEvent("onmousemove",a);g.firedTarget=null}else g.condCall(b,"onmousemove",a);return P=false}else return true}function Q(a){var b=ca(a);g.capture(null);if(b){if(!a)a=window.event;if(g.isIElt9){g.firedTarget=a.srcElement||b;b.fireEvent("onmouseup",a);g.firedTarget=null}else g.condCall(b,"onmouseup",a);g.cancelEvent(a,g.CancelPropagate);return false}else return true}function W(){if(!da){da=true;if(document.body.addEventListener){var a=document.body;a.addEventListener("mousemove",V,true);a.addEventListener("mouseup",Q,true);g.isGecko&&window.addEventListener("mouseout",function(b){!b.relatedTarget&&g.hasTag(b.target,"HTML")&&Q(b)},true)}else{a=document.body;a.attachEvent("onmousemove",V);a.attachEvent("onmouseup",Q)}}}var g=this;this.buttons=0;this.mouseDown=function(a){g.buttons|=g.button(a)};this.mouseUp=function(a){g.buttons^=g.button(a)};this.arrayRemove=function(a,b,f){f=a.slice((f||b)+1||a.length);a.length=b<0?a.length+b:b;return a.push.apply(a,f)};var X=function(){for(var a,b=3,f=document.createElement("div"),l=f.getElementsByTagName("i");f.innerHTML="<!--[if gt IE "+ ++b+"]><i></i><![endif]--\>",l[0];);return b>4?b:a}();this.isIE=X!==undefined;this.isIE6=X===6;this.isIElt9=X<9;this.isGecko=navigator.userAgent.toLowerCase().indexOf("gecko")!=-1;this.isIEMobile=navigator.userAgent.toLowerCase().indexOf("msie 4")!=-1||navigator.userAgent.toLowerCase().indexOf("msie 5")!=-1;this.isOpera=window.opera!=="undefined";this.updateDelay=this.isIE?10:51;this.setHtml=function(a,b,f){function l(o,L){var u,q,B;switch(o.nodeType){case 1:u=o.namespaceURI==null?document.createElement(o.nodeName):document.createElementNS(o.namespaceURI,o.nodeName);if(o.attributes&&o.attributes.length>0){q=0;for(B=o.attributes.length;q<B;)u.setAttribute(o.attributes[q].nodeName,o.getAttribute(o.attributes[q++].nodeName))}if(L&&o.childNodes.length>0){q=0;for(B=o.childNodes.length;q<B;){var r=l(o.childNodes[q++],L);r&&u.appendChild(r)}}return u;case 3:case 4:case 5:return document.createTextNode(o.nodeValue)}return null}if(g.isIE||_$_INNER_HTML_$_&&!f)if(f)a.innerHTML+=b;else a.innerHTML=b;else{var n;n=new DOMParser;n=n.parseFromString("<div>"+b+"</div>","application/xhtml+xml").documentElement;if(n.nodeType!=1)n=n.nextSibling;if(!f)a.innerHTML="";b=0;for(f=n.childNodes.length;b<f;)a.appendChild(l(n.childNodes[b++],true))}};this.hasTag=function(a,b){return a.nodeType==1&&a.tagName.toUpperCase()===b};this.insertAt=function(a,b,f){a.childNodes.length==0?a.appendChild(b):a.insertBefore(b,a.childNodes[f])};this.remove=function(a){(a=g.getElement(a))&&a.parentNode.removeChild(a)};this.unstub=function(a,b,f){if(f==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8);g.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(g.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var f,l;f=0;for(l=a.attributes.length;f<l;f++){var n=a.attributes[f].nodeName;n!="type"&&n!="name"&&b.setAttribute(n,a.getAttribute(n))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?g.CancelAll:b;if(b&g.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&g.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;try{document.activeElement&&document.activeElement.blur&&g.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}catch(f){}}};this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(l){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,l;if(g.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}l=a.offsetParent;if(l==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=l)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:f}};this.windowCoordinates=function(a){a=g.pageCoordinates(a);return{x:a.x-document.body.scrollLeft-document.documentElement.scrollLeft,y:a.y-document.body.scrollTop-document.documentElement.scrollTop}};this.wheelDelta=function(a){var b=0;if(a.wheelDelta)b=a.wheelDelta>0?1:-1;else if(a.detail)b=a.detail<0?1:-1;return b};this.scrollIntoView=function(a){(a=document.getElementById(a))&&a.scrollIntoView&&a.scrollIntoView(true)};this.getSelectionRange=function(a){if(document.selection)if(g.hasTag(a,"TEXTAREA")){var b=document.selection.createRange(),f=b.duplicate();f.moveToElementText(a);var l=0;if(b.text.length>1){l-=b.text.length;if(l<0)l=0}a=-1+l;for(f.moveStart("character",l);f.inRange(b);){f.moveStart("character");a++}b=b.text.replace(/\r/g,"");return{start:a,end:b.length+a}}else{f=$(a).val();a=document.selection.createRange().duplicate();a.moveEnd("character",f.length);b=a.text==""?f.length:f.lastIndexOf(a.text);a=document.selection.createRange().duplicate();a.moveStart("character",-f.length);return{start:b,end:a.text.length}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,f){var l=$(a).val();if(typeof b!="number")b=-1;if(typeof f!="number")f=-1;if(b<0)b=0;if(f>l.length)f=l.length;if(f<b)f=b;if(b>f)b=f;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=f}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",f-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};this.px=function(a,b){return G(w(a,b))};this.pxself=function(a,b){return G(a.style[b])};this.pctself=function(a,b){return U(a.style[b],0)};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?g.isHidden(a):false}};this.IEwidth=function(a,b,f){if(a.parentNode){var l=a.parentNode.clientWidth-g.px(a,"marginLeft")-g.px(a,"marginRight")-g.px(a,"borderLeftWidth")-g.px(a,"borderRightWidth")-g.px(a.parentNode,"paddingLeft")-g.px(a.parentNode,"paddingRight");b=U(b,0);f=U(f,1E5);return l<b?b-1:l>f?f+1:a.style.styleFloat!=""?b-1:"auto"}else return"auto"};this.hide=function(a){g.getElement(a).style.display="none"};this.inline=function(a){g.getElement(a).style.display="inline"};this.block=function(a){g.getElement(a).style.display="block"};this.show=function(a){g.getElement(a).style.display=""};var z=null;this.firedTarget=null;this.target=function(a){return g.firedTarget||a.target||a.srcElement};var P=false,da=false;this.capture=function(a){W();if(!(z&&a)){z=a;var b=document.body;if(b.setCapture)a!=null?b.setCapture():b.releaseCapture();if(a!=null){$(b).addClass("unselectable");b.setAttribute("unselectable","on");b.onselectstart="return false;"}else{$(b).removeClass("unselectable");b.setAttribute("unselectable","off");b.onselectstart=""}}};this.checkReleaseCapture=function(a,b){z&&a==z&&b.type=="mouseup"&&this.capture(null)};this.getElementsByClassName=function(a,b){if(document.getElementsByClassName)return b.getElementsByClassName(a);else{b=b.getElementsByTagName("*");for(var f=[],l,n=0,o=b.length;n<o;n++){l=b[n];l.className.indexOf(a)!=-1&&f.push(l)}return f}};this.addCss=function(a,b){var f=document.styleSheets[0];f.insertRule(a+" { "+b+" }",f.cssRules.length)};this.addCssText=function(a){var b=document.getElementById("Wt-inline-css");if(!b){b=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(b)}if(b.styleSheet){var f=document.createElement("style");if(b)b.parentNode.insertBefore(f,b);else{f.id="Wt-inline-css";document.getElementsByTagName("head")[0].appendChild(f)}f.styleSheet.cssText=a}else{a=document.createTextNode(a);b.appendChild(a)}};this.getCssRule=function(a,b){a=a.toLowerCase();if(document.styleSheets)for(var f=0;f<document.styleSheets.length;f++){var l=document.styleSheets[f],n=0,o;do{o=null;if(l.cssRules)o=l.cssRules[n];else if(l.rules)o=l.rules[n];if(o&&o.selectorText)if(o.selectorText.toLowerCase()==a)if(b=="delete"){l.cssRules?l.deleteRule(n):l.removeRule(n);return true}else return o;++n}while(o)}return false};this.removeCssRule=function(a){return g.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var f=document.createElement("link");f.setAttribute("type","text/css");f.setAttribute("href",a);f.setAttribute("type","text/css");f.setAttribute("rel","stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,l,n){var o=g.windowSize(),L=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,q=g.widgetPageCoordinates(a.offsetParent),B=["left","right"],r=["top","bottom"],C=g.px(a,"maxWidth")||a.offsetWidth,J=g.px(a,"maxHeight")||a.offsetHeight;if(b+C>L+o.x){l-=q.x;b=a.offsetParent.offsetWidth-(l+g.px(a,"marginRight"));l=1}else{b-=q.x;b-=g.px(a,"marginLeft");l=0}if(f+J>u+o.y){if(n>u+o.y)n=u+o.y;n-=q.y;f=a.offsetParent.offsetHeight-(n+g.px(a,"marginBottom"));n=1}else{f-=q.y;f-=g.px(a,"marginTop");n=0}a.style[B[l]]=b+"px";a.style[B[1-l]]="";a.style[r[n]]=f+"px";a.style[r[1-n]]=""};this.positionXY=function(a,b,f){a=g.getElement(a);a.style.display="";g.isHidden(a)||g.fitToWindow(a,b,f,b,f)};this.Horizontal=1;this.Vertical=2;this.positionAtWidget=function(a,b,f,l){a=g.getElement(a);b=g.getElement(b);var n=g.widgetPageCoordinates(b),o;if(l){a.parentNode.removeChild(a);$(".Wt-domRoot").get(0).appendChild(a)}a.style.position="absolute";a.style.display="block";if(f==g.Horizontal){f=n.x+b.offsetWidth;l=n.y;o=n.x;b=n.y+b.offsetHeight}else{f=n.x;l=n.y+b.offsetHeight;o=n.x+b.offsetWidth;b=n.y}g.fitToWindow(a,f,l,o,b);a.style.visibility=""};this.hasFocus=function(a){return a==document.activeElement};this.history=function(){function a(){var k,h;h=location.href;k=h.indexOf("#");return k>=0?h.substr(k+1):null}function b(){J.value=x+"|"+D;if(u)J.value+="|"+N.join(",")}function f(k){if(k){if(!k||D!==k){D=k||x;Y(unescape(D))}}else{D=x;Y(unescape(D))}}function l(k){var h;k='<html><body><div id="state">'+k+"</div></body></html>";try{h=C.contentWindow.document;h.open();h.write(k);h.close();return true}catch(s){return false}}function n(){var k,h,s,A;if(!C.contentWindow||!C.contentWindow.document)setTimeout(n,10);else{k=C.contentWindow.document;s=(h=k.getElementById("state"))?h.innerText:null;A=a();setInterval(function(){var H,E;k=C.contentWindow.document;H=(h=k.getElementById("state"))?h.innerText:null;E=a();if(H!==s){s=H;f(s);E=s?s:x;A=location.hash=E;b()}else if(E!==A){A=E;l(E)}},50);K=true;r!=null&&r()}}function o(){if(!q){var k=a(),h=history.length;M&&clearInterval(M);M=setInterval(function(){var s,A;s=a();A=history.length;if(s!==k){k=s;h=A;f(k);b()}else if(A!==h&&u){k=s;h=A;s=N[h-1];f(s);b()}},50)}}function L(){var k;k=J.value.split("|");if(k.length>1){x=k[0];D=k[1]}if(k.length>2)N=k[2].split(",");if(q)n();else{o();K=true;r!=null&&r()}}var u=false,q=self.isIElt9,B=false,r=null,C=null,J=null,K=false,M=null,N=[],x,D,Y=function(){};return{onReady:function(k){if(K)setTimeout(function(){k()},0);else r=k},_initialize:function(){J!=null&&L()},_initTimeout:function(){o()},register:function(k,h){if(!K){D=x=escape(k);Y=h}},initialize:function(k,h){if(!K){var s=navigator.vendor||"";if(s!=="KDE")if(typeof window.opera!=="undefined")B=true;else if(!q&&s.indexOf("Apple Computer, Inc.")>-1)u=true;if(typeof k==="string")k=document.getElementById(k);if(!(!k||k.tagName.toUpperCase()!=="TEXTAREA"&&(k.tagName.toUpperCase()!=="INPUT"||k.type!=="hidden"&&k.type!=="text"))){J=k;if(q){if(typeof h==="string")h=document.getElementById(h);!h||h.tagName.toUpperCase()!=="IFRAME"||(C=h)}}}},navigate:function(k){if(K){fqstate=k;if(q)l(fqstate);else{location.hash=fqstate;if(u){N[history.length]=fqstate;b()}}}},getCurrentState:function(){if(!K)return"";return D}}}()}); |
-1||navigator.userAgent.toLowerCase().indexOf("msie 5")!=-1;this.isOpera=window.opera!=="undefined";this.updateDelay=this.isIE?10:51;this.setHtml=function(a,b,f){function l(o,L){var u,q,B;switch(o.nodeType){case 1:u=o.namespaceURI==null?document.createElement(o.nodeName):document.createElementNS(o.namespaceURI,o.nodeName);if(o.attributes&&o.attributes.length>0){q=0;for(B=o.attributes.length;q<B;)u.setAttribute(o.attributes[q].nodeName,o.getAttribute(o.attributes[q++].nodeName))}if(L&&o.childNodes.length> | -1||navigator.userAgent.toLowerCase().indexOf("msie 5")!=-1;this.isOpera=typeof window.opera!=="undefined";this.updateDelay=this.isIE?10:51;this.setHtml=function(a,b,f){function l(o,L){var u,q,B;switch(o.nodeType){case 1:u=o.namespaceURI==null?document.createElement(o.nodeName):document.createElementNS(o.namespaceURI,o.nodeName);if(o.attributes&&o.attributes.length>0){q=0;for(B=o.attributes.length;q<B;)u.setAttribute(o.attributes[q].nodeName,o.getAttribute(o.attributes[q++].nodeName))}if(L&&o.childNodes.length> | window._$_WT_CLASS_$_=new (function(){function w(a,b){return a.style[b]?a.style[b]:document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(a,null)[b]:a.currentStyle?a.currentStyle[b]:null}function v(a,b,f){if(a=="auto"||a==null)return f;return(a=(a=b.exec(a))&&a.length==2?a[1]:null)?parseFloat(a):f}function G(a){return v(a,/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/i,0)}function U(a,b){return v(a,/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/i,b)}function ca(a){if(z==null)return null;if(!a)a=window.event;if(a){for(var b=a=g.target(a);b&&b!=z;)b=b.parentNode;return b==z?g.isIElt9?a:null:z}else return z}function V(a){var b=ca(a);if(b&&!P){if(!a)a=window.event;P=true;if(g.isIElt9){g.firedTarget=a.srcElement||b;b.fireEvent("onmousemove",a);g.firedTarget=null}else g.condCall(b,"onmousemove",a);return P=false}else return true}function Q(a){var b=ca(a);g.capture(null);if(b){if(!a)a=window.event;if(g.isIElt9){g.firedTarget=a.srcElement||b;b.fireEvent("onmouseup",a);g.firedTarget=null}else g.condCall(b,"onmouseup",a);g.cancelEvent(a,g.CancelPropagate);return false}else return true}function W(){if(!da){da=true;if(document.body.addEventListener){var a=document.body;a.addEventListener("mousemove",V,true);a.addEventListener("mouseup",Q,true);g.isGecko&&window.addEventListener("mouseout",function(b){!b.relatedTarget&&g.hasTag(b.target,"HTML")&&Q(b)},true)}else{a=document.body;a.attachEvent("onmousemove",V);a.attachEvent("onmouseup",Q)}}}var g=this;this.buttons=0;this.mouseDown=function(a){g.buttons|=g.button(a)};this.mouseUp=function(a){g.buttons^=g.button(a)};this.arrayRemove=function(a,b,f){f=a.slice((f||b)+1||a.length);a.length=b<0?a.length+b:b;return a.push.apply(a,f)};var X=function(){for(var a,b=3,f=document.createElement("div"),l=f.getElementsByTagName("i");f.innerHTML="<!--[if gt IE "+ ++b+"]><i></i><![endif]--\>",l[0];);return b>4?b:a}();this.isIE=X!==undefined;this.isIE6=X===6;this.isIElt9=X<9;this.isGecko=navigator.userAgent.toLowerCase().indexOf("gecko")!=-1;this.isIEMobile=navigator.userAgent.toLowerCase().indexOf("msie 4")!=-1||navigator.userAgent.toLowerCase().indexOf("msie 5")!=-1;this.isOpera=window.opera!=="undefined";this.updateDelay=this.isIE?10:51;this.setHtml=function(a,b,f){function l(o,L){var u,q,B;switch(o.nodeType){case 1:u=o.namespaceURI==null?document.createElement(o.nodeName):document.createElementNS(o.namespaceURI,o.nodeName);if(o.attributes&&o.attributes.length>0){q=0;for(B=o.attributes.length;q<B;)u.setAttribute(o.attributes[q].nodeName,o.getAttribute(o.attributes[q++].nodeName))}if(L&&o.childNodes.length>0){q=0;for(B=o.childNodes.length;q<B;){var r=l(o.childNodes[q++],L);r&&u.appendChild(r)}}return u;case 3:case 4:case 5:return document.createTextNode(o.nodeValue)}return null}if(g.isIE||_$_INNER_HTML_$_&&!f)if(f)a.innerHTML+=b;else a.innerHTML=b;else{var n;n=new DOMParser;n=n.parseFromString("<div>"+b+"</div>","application/xhtml+xml").documentElement;if(n.nodeType!=1)n=n.nextSibling;if(!f)a.innerHTML="";b=0;for(f=n.childNodes.length;b<f;)a.appendChild(l(n.childNodes[b++],true))}};this.hasTag=function(a,b){return a.nodeType==1&&a.tagName.toUpperCase()===b};this.insertAt=function(a,b,f){a.childNodes.length==0?a.appendChild(b):a.insertBefore(b,a.childNodes[f])};this.remove=function(a){(a=g.getElement(a))&&a.parentNode.removeChild(a)};this.unstub=function(a,b,f){if(f==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8);g.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(g.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var f,l;f=0;for(l=a.attributes.length;f<l;f++){var n=a.attributes[f].nodeName;n!="type"&&n!="name"&&b.setAttribute(n,a.getAttribute(n))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?g.CancelAll:b;if(b&g.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&g.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;try{document.activeElement&&document.activeElement.blur&&g.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}catch(f){}}};this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(l){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,l;if(g.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}l=a.offsetParent;if(l==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=l)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:f}};this.windowCoordinates=function(a){a=g.pageCoordinates(a);return{x:a.x-document.body.scrollLeft-document.documentElement.scrollLeft,y:a.y-document.body.scrollTop-document.documentElement.scrollTop}};this.wheelDelta=function(a){var b=0;if(a.wheelDelta)b=a.wheelDelta>0?1:-1;else if(a.detail)b=a.detail<0?1:-1;return b};this.scrollIntoView=function(a){(a=document.getElementById(a))&&a.scrollIntoView&&a.scrollIntoView(true)};this.getSelectionRange=function(a){if(document.selection)if(g.hasTag(a,"TEXTAREA")){var b=document.selection.createRange(),f=b.duplicate();f.moveToElementText(a);var l=0;if(b.text.length>1){l-=b.text.length;if(l<0)l=0}a=-1+l;for(f.moveStart("character",l);f.inRange(b);){f.moveStart("character");a++}b=b.text.replace(/\r/g,"");return{start:a,end:b.length+a}}else{f=$(a).val();a=document.selection.createRange().duplicate();a.moveEnd("character",f.length);b=a.text==""?f.length:f.lastIndexOf(a.text);a=document.selection.createRange().duplicate();a.moveStart("character",-f.length);return{start:b,end:a.text.length}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,f){var l=$(a).val();if(typeof b!="number")b=-1;if(typeof f!="number")f=-1;if(b<0)b=0;if(f>l.length)f=l.length;if(f<b)f=b;if(b>f)b=f;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=f}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",f-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};this.px=function(a,b){return G(w(a,b))};this.pxself=function(a,b){return G(a.style[b])};this.pctself=function(a,b){return U(a.style[b],0)};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?g.isHidden(a):false}};this.IEwidth=function(a,b,f){if(a.parentNode){var l=a.parentNode.clientWidth-g.px(a,"marginLeft")-g.px(a,"marginRight")-g.px(a,"borderLeftWidth")-g.px(a,"borderRightWidth")-g.px(a.parentNode,"paddingLeft")-g.px(a.parentNode,"paddingRight");b=U(b,0);f=U(f,1E5);return l<b?b-1:l>f?f+1:a.style.styleFloat!=""?b-1:"auto"}else return"auto"};this.hide=function(a){g.getElement(a).style.display="none"};this.inline=function(a){g.getElement(a).style.display="inline"};this.block=function(a){g.getElement(a).style.display="block"};this.show=function(a){g.getElement(a).style.display=""};var z=null;this.firedTarget=null;this.target=function(a){return g.firedTarget||a.target||a.srcElement};var P=false,da=false;this.capture=function(a){W();if(!(z&&a)){z=a;var b=document.body;if(b.setCapture)a!=null?b.setCapture():b.releaseCapture();if(a!=null){$(b).addClass("unselectable");b.setAttribute("unselectable","on");b.onselectstart="return false;"}else{$(b).removeClass("unselectable");b.setAttribute("unselectable","off");b.onselectstart=""}}};this.checkReleaseCapture=function(a,b){z&&a==z&&b.type=="mouseup"&&this.capture(null)};this.getElementsByClassName=function(a,b){if(document.getElementsByClassName)return b.getElementsByClassName(a);else{b=b.getElementsByTagName("*");for(var f=[],l,n=0,o=b.length;n<o;n++){l=b[n];l.className.indexOf(a)!=-1&&f.push(l)}return f}};this.addCss=function(a,b){var f=document.styleSheets[0];f.insertRule(a+" { "+b+" }",f.cssRules.length)};this.addCssText=function(a){var b=document.getElementById("Wt-inline-css");if(!b){b=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(b)}if(b.styleSheet){var f=document.createElement("style");if(b)b.parentNode.insertBefore(f,b);else{f.id="Wt-inline-css";document.getElementsByTagName("head")[0].appendChild(f)}f.styleSheet.cssText=a}else{a=document.createTextNode(a);b.appendChild(a)}};this.getCssRule=function(a,b){a=a.toLowerCase();if(document.styleSheets)for(var f=0;f<document.styleSheets.length;f++){var l=document.styleSheets[f],n=0,o;do{o=null;if(l.cssRules)o=l.cssRules[n];else if(l.rules)o=l.rules[n];if(o&&o.selectorText)if(o.selectorText.toLowerCase()==a)if(b=="delete"){l.cssRules?l.deleteRule(n):l.removeRule(n);return true}else return o;++n}while(o)}return false};this.removeCssRule=function(a){return g.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var f=document.createElement("link");f.setAttribute("type","text/css");f.setAttribute("href",a);f.setAttribute("type","text/css");f.setAttribute("rel","stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,l,n){var o=g.windowSize(),L=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,q=g.widgetPageCoordinates(a.offsetParent),B=["left","right"],r=["top","bottom"],C=g.px(a,"maxWidth")||a.offsetWidth,J=g.px(a,"maxHeight")||a.offsetHeight;if(b+C>L+o.x){l-=q.x;b=a.offsetParent.offsetWidth-(l+g.px(a,"marginRight"));l=1}else{b-=q.x;b-=g.px(a,"marginLeft");l=0}if(f+J>u+o.y){if(n>u+o.y)n=u+o.y;n-=q.y;f=a.offsetParent.offsetHeight-(n+g.px(a,"marginBottom"));n=1}else{f-=q.y;f-=g.px(a,"marginTop");n=0}a.style[B[l]]=b+"px";a.style[B[1-l]]="";a.style[r[n]]=f+"px";a.style[r[1-n]]=""};this.positionXY=function(a,b,f){a=g.getElement(a);a.style.display="";g.isHidden(a)||g.fitToWindow(a,b,f,b,f)};this.Horizontal=1;this.Vertical=2;this.positionAtWidget=function(a,b,f,l){a=g.getElement(a);b=g.getElement(b);var n=g.widgetPageCoordinates(b),o;if(l){a.parentNode.removeChild(a);$(".Wt-domRoot").get(0).appendChild(a)}a.style.position="absolute";a.style.display="block";if(f==g.Horizontal){f=n.x+b.offsetWidth;l=n.y;o=n.x;b=n.y+b.offsetHeight}else{f=n.x;l=n.y+b.offsetHeight;o=n.x+b.offsetWidth;b=n.y}g.fitToWindow(a,f,l,o,b);a.style.visibility=""};this.hasFocus=function(a){return a==document.activeElement};this.history=function(){function a(){var k,h;h=location.href;k=h.indexOf("#");return k>=0?h.substr(k+1):null}function b(){J.value=x+"|"+D;if(u)J.value+="|"+N.join(",")}function f(k){if(k){if(!k||D!==k){D=k||x;Y(unescape(D))}}else{D=x;Y(unescape(D))}}function l(k){var h;k='<html><body><div id="state">'+k+"</div></body></html>";try{h=C.contentWindow.document;h.open();h.write(k);h.close();return true}catch(s){return false}}function n(){var k,h,s,A;if(!C.contentWindow||!C.contentWindow.document)setTimeout(n,10);else{k=C.contentWindow.document;s=(h=k.getElementById("state"))?h.innerText:null;A=a();setInterval(function(){var H,E;k=C.contentWindow.document;H=(h=k.getElementById("state"))?h.innerText:null;E=a();if(H!==s){s=H;f(s);E=s?s:x;A=location.hash=E;b()}else if(E!==A){A=E;l(E)}},50);K=true;r!=null&&r()}}function o(){if(!q){var k=a(),h=history.length;M&&clearInterval(M);M=setInterval(function(){var s,A;s=a();A=history.length;if(s!==k){k=s;h=A;f(k);b()}else if(A!==h&&u){k=s;h=A;s=N[h-1];f(s);b()}},50)}}function L(){var k;k=J.value.split("|");if(k.length>1){x=k[0];D=k[1]}if(k.length>2)N=k[2].split(",");if(q)n();else{o();K=true;r!=null&&r()}}var u=false,q=self.isIElt9,B=false,r=null,C=null,J=null,K=false,M=null,N=[],x,D,Y=function(){};return{onReady:function(k){if(K)setTimeout(function(){k()},0);else r=k},_initialize:function(){J!=null&&L()},_initTimeout:function(){o()},register:function(k,h){if(!K){D=x=escape(k);Y=h}},initialize:function(k,h){if(!K){var s=navigator.vendor||"";if(s!=="KDE")if(typeof window.opera!=="undefined")B=true;else if(!q&&s.indexOf("Apple Computer, Inc.")>-1)u=true;if(typeof k==="string")k=document.getElementById(k);if(!(!k||k.tagName.toUpperCase()!=="TEXTAREA"&&(k.tagName.toUpperCase()!=="INPUT"||k.type!=="hidden"&&k.type!=="text"))){J=k;if(q){if(typeof h==="string")h=document.getElementById(h);!h||h.tagName.toUpperCase()!=="IFRAME"||(C=h)}}}},navigate:function(k){if(K){fqstate=k;if(q)l(fqstate);else{location.hash=fqstate;if(u){N[history.length]=fqstate;b()}}}},getCurrentState:function(){if(!K)return"";return D}}}()}); |
if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var f,l;f=0;for(l=a.attributes.length;f<l;f++){var n=a.attributes[f].nodeName;n!="type"&&n!="name"&&b.setAttribute(n,a.getAttribute(n))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?g.CancelAll:b;if(b&g.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b& g.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;try{document.activeElement&&document.activeElement.blur&&g.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}catch(f){}}};this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(l){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,l;if(g.hasTag(a,"AREA"))a=a.parentNode.nextSibling; for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}l=a.offsetParent;if(l==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=l)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a= window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:f}};this.windowCoordinates=function(a){a=g.pageCoordinates(a);return{x:a.x-document.body.scrollLeft-document.documentElement.scrollLeft,y:a.y-document.body.scrollTop-document.documentElement.scrollTop}};this.wheelDelta=function(a){var b=0;if(a.wheelDelta)b= a.wheelDelta>0?1:-1;else if(a.detail)b=a.detail<0?1:-1;return b};this.scrollIntoView=function(a){(a=document.getElementById(a))&&a.scrollIntoView&&a.scrollIntoView(true)};this.getSelectionRange=function(a){if(document.selection)if(g.hasTag(a,"TEXTAREA")){var b=document.selection.createRange(),f=b.duplicate();f.moveToElementText(a);var l=0;if(b.text.length>1){l-=b.text.length;if(l<0)l=0}a=-1+l;for(f.moveStart("character",l);f.inRange(b);){f.moveStart("character");a++}b=b.text.replace(/\r/g,"");return{start:a, end:b.length+a}}else{f=$(a).val();a=document.selection.createRange().duplicate();a.moveEnd("character",f.length);b=a.text==""?f.length:f.lastIndexOf(a.text);a=document.selection.createRange().duplicate();a.moveStart("character",-f.length);return{start:b,end:a.text.length}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,f){var l=$(a).val();if(typeof b!="number")b=-1;if(typeof f!="number")f=-1;if(b< 0)b=0;if(f>l.length)f=l.length;if(f<b)f=b;if(b>f)b=f;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=f}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",f-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode== 13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};this.px=function(a,b){return G(w(a,b))};this.pxself=function(a,b){return G(a.style[b])};this.pctself=function(a,b){return U(a.style[b],0)};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?g.isHidden(a):false}};this.IEwidth=function(a,b,f){if(a.parentNode){var l=a.parentNode.clientWidth-g.px(a,"marginLeft")-g.px(a,"marginRight")-g.px(a,"borderLeftWidth")- g.px(a,"borderRightWidth")-g.px(a.parentNode,"paddingLeft")-g.px(a.parentNode,"paddingRight");b=U(b,0);f=U(f,1E5);return l<b?b-1:l>f?f+1:a.style.styleFloat!=""?b-1:"auto"}else return"auto"};this.hide=function(a){g.getElement(a).style.display="none"};this.inline=function(a){g.getElement(a).style.display="inline"};this.block=function(a){g.getElement(a).style.display="block"};this.show=function(a){g.getElement(a).style.display=""};var z=null;this.firedTarget=null;this.target=function(a){return g.firedTarget|| a.target||a.srcElement};var P=false,da=false;this.capture=function(a){W();if(!(z&&a)){z=a;var b=document.body;if(b.setCapture)a!=null?b.setCapture():b.releaseCapture();if(a!=null){$(b).addClass("unselectable");b.setAttribute("unselectable","on");b.onselectstart="return false;"}else{$(b).removeClass("unselectable");b.setAttribute("unselectable","off");b.onselectstart=""}}};this.checkReleaseCapture=function(a,b){z&&a==z&&b.type=="mouseup"&&this.capture(null)};this.getElementsByClassName=function(a, b){if(document.getElementsByClassName)return b.getElementsByClassName(a);else{b=b.getElementsByTagName("*");for(var f=[],l,n=0,o=b.length;n<o;n++){l=b[n];l.className.indexOf(a)!=-1&&f.push(l)}return f}};this.addCss=function(a,b){var f=document.styleSheets[0];f.insertRule(a+" { "+b+" }",f.cssRules.length)};this.addCssText=function(a){var b=document.getElementById("Wt-inline-css");if(!b){b=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(b)}if(b.styleSheet){var f= | if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var f,l;f=0;for(l=a.attributes.length;f<l;f++){var n=a.attributes[f].nodeName;n!="type"&&n!="name"&&b.setAttribute(n,a.getAttribute(n))}}a.parentNode.replaceChild(b,a)}}};var N=false;this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){if(!N){b=b===undefined?g.CancelAll:b;if(b&g.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue= false;if(b&g.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;try{document.activeElement&&document.activeElement.blur&&g.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}catch(f){}}}};this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(l){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,l;if(g.hasTag(a,"AREA"))a= a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}l=a.offsetParent;if(l==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=l)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates= function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:f}};this.windowCoordinates=function(a){a=g.pageCoordinates(a);return{x:a.x-document.body.scrollLeft-document.documentElement.scrollLeft,y:a.y-document.body.scrollTop-document.documentElement.scrollTop}};this.wheelDelta=function(a){var b= 0;if(a.wheelDelta)b=a.wheelDelta>0?1:-1;else if(a.detail)b=a.detail<0?1:-1;return b};this.scrollIntoView=function(a){(a=document.getElementById(a))&&a.scrollIntoView&&a.scrollIntoView(true)};this.getSelectionRange=function(a){if(document.selection)if(g.hasTag(a,"TEXTAREA")){var b=document.selection.createRange(),f=b.duplicate();f.moveToElementText(a);var l=0;if(b.text.length>1){l-=b.text.length;if(l<0)l=0}a=-1+l;for(f.moveStart("character",l);f.inRange(b);){f.moveStart("character");a++}b=b.text.replace(/\r/g, "");return{start:a,end:b.length+a}}else{f=$(a).val();a=document.selection.createRange().duplicate();a.moveEnd("character",f.length);b=a.text==""?f.length:f.lastIndexOf(a.text);a=document.selection.createRange().duplicate();a.moveStart("character",-f.length);return{start:b,end:a.text.length}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,f){var l=$(a).val();if(typeof b!="number")b=-1;if(typeof f!= "number")f=-1;if(b<0)b=0;if(f>l.length)f=l.length;if(f<b)f=b;if(b>f)b=f;a.focus();if(typeof a.selectionStart!=="undefined"){a.selectionStart=b;a.selectionEnd=f}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",f-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>= 32&&a.keyCode<125:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};this.px=function(a,b){return G(w(a,b))};this.pxself=function(a,b){return G(a.style[b])};this.pctself=function(a,b){return U(a.style[b],0)};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?g.isHidden(a):false}};this.IEwidth=function(a,b,f){if(a.parentNode){var l=a.parentNode.clientWidth-g.px(a,"marginLeft")-g.px(a,"marginRight")- g.px(a,"borderLeftWidth")-g.px(a,"borderRightWidth")-g.px(a.parentNode,"paddingLeft")-g.px(a.parentNode,"paddingRight");b=U(b,0);f=U(f,1E5);return l<b?b-1:l>f?f+1:a.style.styleFloat!=""?b-1:"auto"}else return"auto"};this.hide=function(a){g.getElement(a).style.display="none"};this.inline=function(a){g.getElement(a).style.display="inline"};this.block=function(a){g.getElement(a).style.display="block"};this.show=function(a){g.getElement(a).style.display=""};var z=null;this.firedTarget=null;this.target= function(a){return g.firedTarget||a.target||a.srcElement};var da=false;this.capture=function(a){W();if(!(z&&a)){z=a;var b=document.body;if(b.setCapture)a!=null?b.setCapture():b.releaseCapture();if(a!=null){$(b).addClass("unselectable");b.setAttribute("unselectable","on");b.onselectstart="return false;"}else{$(b).removeClass("unselectable");b.setAttribute("unselectable","off");b.onselectstart=""}}};this.checkReleaseCapture=function(a,b){z&&a==z&&b.type=="mouseup"&&this.capture(null)};this.getElementsByClassName= function(a,b){if(document.getElementsByClassName)return b.getElementsByClassName(a);else{b=b.getElementsByTagName("*");for(var f=[],l,n=0,o=b.length;n<o;n++){l=b[n];l.className.indexOf(a)!=-1&&f.push(l)}return f}};this.addCss=function(a,b){var f=document.styleSheets[0];f.insertRule(a+" { "+b+" }",f.cssRules.length)};this.addCssText=function(a){var b=document.getElementById("Wt-inline-css");if(!b){b=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(b)}if(b.styleSheet){var f= | window._$_WT_CLASS_$_=new (function(){function w(a,b){return a.style[b]?a.style[b]:document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(a,null)[b]:a.currentStyle?a.currentStyle[b]:null}function v(a,b,f){if(a=="auto"||a==null)return f;return(a=(a=b.exec(a))&&a.length==2?a[1]:null)?parseFloat(a):f}function G(a){return v(a,/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/i,0)}function U(a,b){return v(a,/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/i,b)}function ca(a){if(z==null)return null;if(!a)a=window.event;if(a){for(var b=a=g.target(a);b&&b!=z;)b=b.parentNode;return b==z?g.isIElt9?a:null:z}else return z}function V(a){var b=ca(a);if(b&&!P){if(!a)a=window.event;P=true;if(g.isIElt9){g.firedTarget=a.srcElement||b;b.fireEvent("onmousemove",a);g.firedTarget=null}else g.condCall(b,"onmousemove",a);return P=false}else return true}function Q(a){var b=ca(a);g.capture(null);if(b){if(!a)a=window.event;if(g.isIElt9){g.firedTarget=a.srcElement||b;b.fireEvent("onmouseup",a);g.firedTarget=null}else g.condCall(b,"onmouseup",a);g.cancelEvent(a,g.CancelPropagate);return false}else return true}function W(){if(!da){da=true;if(document.body.addEventListener){var a=document.body;a.addEventListener("mousemove",V,true);a.addEventListener("mouseup",Q,true);g.isGecko&&window.addEventListener("mouseout",function(b){!b.relatedTarget&&g.hasTag(b.target,"HTML")&&Q(b)},true)}else{a=document.body;a.attachEvent("onmousemove",V);a.attachEvent("onmouseup",Q)}}}var g=this;this.buttons=0;this.mouseDown=function(a){g.buttons|=g.button(a)};this.mouseUp=function(a){g.buttons^=g.button(a)};this.arrayRemove=function(a,b,f){f=a.slice((f||b)+1||a.length);a.length=b<0?a.length+b:b;return a.push.apply(a,f)};var X=function(){for(var a,b=3,f=document.createElement("div"),l=f.getElementsByTagName("i");f.innerHTML="<!--[if gt IE "+ ++b+"]><i></i><![endif]--\>",l[0];);return b>4?b:a}();this.isIE=X!==undefined;this.isIE6=X===6;this.isIElt9=X<9;this.isGecko=navigator.userAgent.toLowerCase().indexOf("gecko")!=-1;this.isIEMobile=navigator.userAgent.toLowerCase().indexOf("msie 4")!=-1||navigator.userAgent.toLowerCase().indexOf("msie 5")!=-1;this.isOpera=window.opera!=="undefined";this.updateDelay=this.isIE?10:51;this.setHtml=function(a,b,f){function l(o,L){var u,q,B;switch(o.nodeType){case 1:u=o.namespaceURI==null?document.createElement(o.nodeName):document.createElementNS(o.namespaceURI,o.nodeName);if(o.attributes&&o.attributes.length>0){q=0;for(B=o.attributes.length;q<B;)u.setAttribute(o.attributes[q].nodeName,o.getAttribute(o.attributes[q++].nodeName))}if(L&&o.childNodes.length>0){q=0;for(B=o.childNodes.length;q<B;){var r=l(o.childNodes[q++],L);r&&u.appendChild(r)}}return u;case 3:case 4:case 5:return document.createTextNode(o.nodeValue)}return null}if(g.isIE||_$_INNER_HTML_$_&&!f)if(f)a.innerHTML+=b;else a.innerHTML=b;else{var n;n=new DOMParser;n=n.parseFromString("<div>"+b+"</div>","application/xhtml+xml").documentElement;if(n.nodeType!=1)n=n.nextSibling;if(!f)a.innerHTML="";b=0;for(f=n.childNodes.length;b<f;)a.appendChild(l(n.childNodes[b++],true))}};this.hasTag=function(a,b){return a.nodeType==1&&a.tagName.toUpperCase()===b};this.insertAt=function(a,b,f){a.childNodes.length==0?a.appendChild(b):a.insertBefore(b,a.childNodes[f])};this.remove=function(a){(a=g.getElement(a))&&a.parentNode.removeChild(a)};this.unstub=function(a,b,f){if(f==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8);g.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(g.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var f,l;f=0;for(l=a.attributes.length;f<l;f++){var n=a.attributes[f].nodeName;n!="type"&&n!="name"&&b.setAttribute(n,a.getAttribute(n))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?g.CancelAll:b;if(b&g.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&g.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;try{document.activeElement&&document.activeElement.blur&&g.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}catch(f){}}};this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(l){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,l;if(g.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}l=a.offsetParent;if(l==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=l)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:f}};this.windowCoordinates=function(a){a=g.pageCoordinates(a);return{x:a.x-document.body.scrollLeft-document.documentElement.scrollLeft,y:a.y-document.body.scrollTop-document.documentElement.scrollTop}};this.wheelDelta=function(a){var b=0;if(a.wheelDelta)b=a.wheelDelta>0?1:-1;else if(a.detail)b=a.detail<0?1:-1;return b};this.scrollIntoView=function(a){(a=document.getElementById(a))&&a.scrollIntoView&&a.scrollIntoView(true)};this.getSelectionRange=function(a){if(document.selection)if(g.hasTag(a,"TEXTAREA")){var b=document.selection.createRange(),f=b.duplicate();f.moveToElementText(a);var l=0;if(b.text.length>1){l-=b.text.length;if(l<0)l=0}a=-1+l;for(f.moveStart("character",l);f.inRange(b);){f.moveStart("character");a++}b=b.text.replace(/\r/g,"");return{start:a,end:b.length+a}}else{f=$(a).val();a=document.selection.createRange().duplicate();a.moveEnd("character",f.length);b=a.text==""?f.length:f.lastIndexOf(a.text);a=document.selection.createRange().duplicate();a.moveStart("character",-f.length);return{start:b,end:a.text.length}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,f){var l=$(a).val();if(typeof b!="number")b=-1;if(typeof f!="number")f=-1;if(b<0)b=0;if(f>l.length)f=l.length;if(f<b)f=b;if(b>f)b=f;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=f}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",f-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};this.px=function(a,b){return G(w(a,b))};this.pxself=function(a,b){return G(a.style[b])};this.pctself=function(a,b){return U(a.style[b],0)};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?g.isHidden(a):false}};this.IEwidth=function(a,b,f){if(a.parentNode){var l=a.parentNode.clientWidth-g.px(a,"marginLeft")-g.px(a,"marginRight")-g.px(a,"borderLeftWidth")-g.px(a,"borderRightWidth")-g.px(a.parentNode,"paddingLeft")-g.px(a.parentNode,"paddingRight");b=U(b,0);f=U(f,1E5);return l<b?b-1:l>f?f+1:a.style.styleFloat!=""?b-1:"auto"}else return"auto"};this.hide=function(a){g.getElement(a).style.display="none"};this.inline=function(a){g.getElement(a).style.display="inline"};this.block=function(a){g.getElement(a).style.display="block"};this.show=function(a){g.getElement(a).style.display=""};var z=null;this.firedTarget=null;this.target=function(a){return g.firedTarget||a.target||a.srcElement};var P=false,da=false;this.capture=function(a){W();if(!(z&&a)){z=a;var b=document.body;if(b.setCapture)a!=null?b.setCapture():b.releaseCapture();if(a!=null){$(b).addClass("unselectable");b.setAttribute("unselectable","on");b.onselectstart="return false;"}else{$(b).removeClass("unselectable");b.setAttribute("unselectable","off");b.onselectstart=""}}};this.checkReleaseCapture=function(a,b){z&&a==z&&b.type=="mouseup"&&this.capture(null)};this.getElementsByClassName=function(a,b){if(document.getElementsByClassName)return b.getElementsByClassName(a);else{b=b.getElementsByTagName("*");for(var f=[],l,n=0,o=b.length;n<o;n++){l=b[n];l.className.indexOf(a)!=-1&&f.push(l)}return f}};this.addCss=function(a,b){var f=document.styleSheets[0];f.insertRule(a+" { "+b+" }",f.cssRules.length)};this.addCssText=function(a){var b=document.getElementById("Wt-inline-css");if(!b){b=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(b)}if(b.styleSheet){var f=document.createElement("style");if(b)b.parentNode.insertBefore(f,b);else{f.id="Wt-inline-css";document.getElementsByTagName("head")[0].appendChild(f)}f.styleSheet.cssText=a}else{a=document.createTextNode(a);b.appendChild(a)}};this.getCssRule=function(a,b){a=a.toLowerCase();if(document.styleSheets)for(var f=0;f<document.styleSheets.length;f++){var l=document.styleSheets[f],n=0,o;do{o=null;if(l.cssRules)o=l.cssRules[n];else if(l.rules)o=l.rules[n];if(o&&o.selectorText)if(o.selectorText.toLowerCase()==a)if(b=="delete"){l.cssRules?l.deleteRule(n):l.removeRule(n);return true}else return o;++n}while(o)}return false};this.removeCssRule=function(a){return g.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var f=document.createElement("link");f.setAttribute("type","text/css");f.setAttribute("href",a);f.setAttribute("type","text/css");f.setAttribute("rel","stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,l,n){var o=g.windowSize(),L=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,q=g.widgetPageCoordinates(a.offsetParent),B=["left","right"],r=["top","bottom"],C=g.px(a,"maxWidth")||a.offsetWidth,J=g.px(a,"maxHeight")||a.offsetHeight;if(b+C>L+o.x){l-=q.x;b=a.offsetParent.offsetWidth-(l+g.px(a,"marginRight"));l=1}else{b-=q.x;b-=g.px(a,"marginLeft");l=0}if(f+J>u+o.y){if(n>u+o.y)n=u+o.y;n-=q.y;f=a.offsetParent.offsetHeight-(n+g.px(a,"marginBottom"));n=1}else{f-=q.y;f-=g.px(a,"marginTop");n=0}a.style[B[l]]=b+"px";a.style[B[1-l]]="";a.style[r[n]]=f+"px";a.style[r[1-n]]=""};this.positionXY=function(a,b,f){a=g.getElement(a);a.style.display="";g.isHidden(a)||g.fitToWindow(a,b,f,b,f)};this.Horizontal=1;this.Vertical=2;this.positionAtWidget=function(a,b,f,l){a=g.getElement(a);b=g.getElement(b);var n=g.widgetPageCoordinates(b),o;if(l){a.parentNode.removeChild(a);$(".Wt-domRoot").get(0).appendChild(a)}a.style.position="absolute";a.style.display="block";if(f==g.Horizontal){f=n.x+b.offsetWidth;l=n.y;o=n.x;b=n.y+b.offsetHeight}else{f=n.x;l=n.y+b.offsetHeight;o=n.x+b.offsetWidth;b=n.y}g.fitToWindow(a,f,l,o,b);a.style.visibility=""};this.hasFocus=function(a){return a==document.activeElement};this.history=function(){function a(){var k,h;h=location.href;k=h.indexOf("#");return k>=0?h.substr(k+1):null}function b(){J.value=x+"|"+D;if(u)J.value+="|"+N.join(",")}function f(k){if(k){if(!k||D!==k){D=k||x;Y(unescape(D))}}else{D=x;Y(unescape(D))}}function l(k){var h;k='<html><body><div id="state">'+k+"</div></body></html>";try{h=C.contentWindow.document;h.open();h.write(k);h.close();return true}catch(s){return false}}function n(){var k,h,s,A;if(!C.contentWindow||!C.contentWindow.document)setTimeout(n,10);else{k=C.contentWindow.document;s=(h=k.getElementById("state"))?h.innerText:null;A=a();setInterval(function(){var H,E;k=C.contentWindow.document;H=(h=k.getElementById("state"))?h.innerText:null;E=a();if(H!==s){s=H;f(s);E=s?s:x;A=location.hash=E;b()}else if(E!==A){A=E;l(E)}},50);K=true;r!=null&&r()}}function o(){if(!q){var k=a(),h=history.length;M&&clearInterval(M);M=setInterval(function(){var s,A;s=a();A=history.length;if(s!==k){k=s;h=A;f(k);b()}else if(A!==h&&u){k=s;h=A;s=N[h-1];f(s);b()}},50)}}function L(){var k;k=J.value.split("|");if(k.length>1){x=k[0];D=k[1]}if(k.length>2)N=k[2].split(",");if(q)n();else{o();K=true;r!=null&&r()}}var u=false,q=self.isIElt9,B=false,r=null,C=null,J=null,K=false,M=null,N=[],x,D,Y=function(){};return{onReady:function(k){if(K)setTimeout(function(){k()},0);else r=k},_initialize:function(){J!=null&&L()},_initTimeout:function(){o()},register:function(k,h){if(!K){D=x=escape(k);Y=h}},initialize:function(k,h){if(!K){var s=navigator.vendor||"";if(s!=="KDE")if(typeof window.opera!=="undefined")B=true;else if(!q&&s.indexOf("Apple Computer, Inc.")>-1)u=true;if(typeof k==="string")k=document.getElementById(k);if(!(!k||k.tagName.toUpperCase()!=="TEXTAREA"&&(k.tagName.toUpperCase()!=="INPUT"||k.type!=="hidden"&&k.type!=="text"))){J=k;if(q){if(typeof h==="string")h=document.getElementById(h);!h||h.tagName.toUpperCase()!=="IFRAME"||(C=h)}}}},navigate:function(k){if(K){fqstate=k;if(q)l(fqstate);else{location.hash=fqstate;if(u){N[history.length]=fqstate;b()}}}},getCurrentState:function(){if(!K)return"";return D}}}()}); |
""};this.hasFocus=function(a){return a==document.activeElement};this.history=function(){function a(){var k,h;h=location.href;k=h.indexOf("#");return k>=0?h.substr(k+1):null}function b(){J.value=x+"|"+D;if(u)J.value+="|"+N.join(",")}function f(k){if(k){if(!k||D!==k){D=k||x;Y(unescape(D))}}else{D=x;Y(unescape(D))}}function l(k){var h;k='<html><body><div id="state">'+k+"</div></body></html>";try{h=C.contentWindow.document;h.open();h.write(k);h.close();return true}catch(s){return false}}function n(){var k, | ""};this.hasFocus=function(a){return a==document.activeElement};this.history=function(){function a(){var k,h;h=location.href;k=h.indexOf("#");return k>=0?h.substr(k+1):null}function b(){J.value=x+"|"+D;if(u)J.value+="|"+O.join(",")}function f(k){if(k){if(!k||D!==k){D=k||x;Y(unescape(D))}}else{D=x;Y(unescape(D))}}function l(k){var h;k='<html><body><div id="state">'+k+"</div></body></html>";try{h=C.contentWindow.document;h.open();h.write(k);h.close();return true}catch(s){return false}}function n(){var k, | window._$_WT_CLASS_$_=new (function(){function w(a,b){return a.style[b]?a.style[b]:document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(a,null)[b]:a.currentStyle?a.currentStyle[b]:null}function v(a,b,f){if(a=="auto"||a==null)return f;return(a=(a=b.exec(a))&&a.length==2?a[1]:null)?parseFloat(a):f}function G(a){return v(a,/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/i,0)}function U(a,b){return v(a,/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/i,b)}function ca(a){if(z==null)return null;if(!a)a=window.event;if(a){for(var b=a=g.target(a);b&&b!=z;)b=b.parentNode;return b==z?g.isIElt9?a:null:z}else return z}function V(a){var b=ca(a);if(b&&!P){if(!a)a=window.event;P=true;if(g.isIElt9){g.firedTarget=a.srcElement||b;b.fireEvent("onmousemove",a);g.firedTarget=null}else g.condCall(b,"onmousemove",a);return P=false}else return true}function Q(a){var b=ca(a);g.capture(null);if(b){if(!a)a=window.event;if(g.isIElt9){g.firedTarget=a.srcElement||b;b.fireEvent("onmouseup",a);g.firedTarget=null}else g.condCall(b,"onmouseup",a);g.cancelEvent(a,g.CancelPropagate);return false}else return true}function W(){if(!da){da=true;if(document.body.addEventListener){var a=document.body;a.addEventListener("mousemove",V,true);a.addEventListener("mouseup",Q,true);g.isGecko&&window.addEventListener("mouseout",function(b){!b.relatedTarget&&g.hasTag(b.target,"HTML")&&Q(b)},true)}else{a=document.body;a.attachEvent("onmousemove",V);a.attachEvent("onmouseup",Q)}}}var g=this;this.buttons=0;this.mouseDown=function(a){g.buttons|=g.button(a)};this.mouseUp=function(a){g.buttons^=g.button(a)};this.arrayRemove=function(a,b,f){f=a.slice((f||b)+1||a.length);a.length=b<0?a.length+b:b;return a.push.apply(a,f)};var X=function(){for(var a,b=3,f=document.createElement("div"),l=f.getElementsByTagName("i");f.innerHTML="<!--[if gt IE "+ ++b+"]><i></i><![endif]--\>",l[0];);return b>4?b:a}();this.isIE=X!==undefined;this.isIE6=X===6;this.isIElt9=X<9;this.isGecko=navigator.userAgent.toLowerCase().indexOf("gecko")!=-1;this.isIEMobile=navigator.userAgent.toLowerCase().indexOf("msie 4")!=-1||navigator.userAgent.toLowerCase().indexOf("msie 5")!=-1;this.isOpera=window.opera!=="undefined";this.updateDelay=this.isIE?10:51;this.setHtml=function(a,b,f){function l(o,L){var u,q,B;switch(o.nodeType){case 1:u=o.namespaceURI==null?document.createElement(o.nodeName):document.createElementNS(o.namespaceURI,o.nodeName);if(o.attributes&&o.attributes.length>0){q=0;for(B=o.attributes.length;q<B;)u.setAttribute(o.attributes[q].nodeName,o.getAttribute(o.attributes[q++].nodeName))}if(L&&o.childNodes.length>0){q=0;for(B=o.childNodes.length;q<B;){var r=l(o.childNodes[q++],L);r&&u.appendChild(r)}}return u;case 3:case 4:case 5:return document.createTextNode(o.nodeValue)}return null}if(g.isIE||_$_INNER_HTML_$_&&!f)if(f)a.innerHTML+=b;else a.innerHTML=b;else{var n;n=new DOMParser;n=n.parseFromString("<div>"+b+"</div>","application/xhtml+xml").documentElement;if(n.nodeType!=1)n=n.nextSibling;if(!f)a.innerHTML="";b=0;for(f=n.childNodes.length;b<f;)a.appendChild(l(n.childNodes[b++],true))}};this.hasTag=function(a,b){return a.nodeType==1&&a.tagName.toUpperCase()===b};this.insertAt=function(a,b,f){a.childNodes.length==0?a.appendChild(b):a.insertBefore(b,a.childNodes[f])};this.remove=function(a){(a=g.getElement(a))&&a.parentNode.removeChild(a)};this.unstub=function(a,b,f){if(f==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8);g.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(g.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var f,l;f=0;for(l=a.attributes.length;f<l;f++){var n=a.attributes[f].nodeName;n!="type"&&n!="name"&&b.setAttribute(n,a.getAttribute(n))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?g.CancelAll:b;if(b&g.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&g.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;try{document.activeElement&&document.activeElement.blur&&g.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}catch(f){}}};this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(l){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,l;if(g.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}l=a.offsetParent;if(l==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=l)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:f}};this.windowCoordinates=function(a){a=g.pageCoordinates(a);return{x:a.x-document.body.scrollLeft-document.documentElement.scrollLeft,y:a.y-document.body.scrollTop-document.documentElement.scrollTop}};this.wheelDelta=function(a){var b=0;if(a.wheelDelta)b=a.wheelDelta>0?1:-1;else if(a.detail)b=a.detail<0?1:-1;return b};this.scrollIntoView=function(a){(a=document.getElementById(a))&&a.scrollIntoView&&a.scrollIntoView(true)};this.getSelectionRange=function(a){if(document.selection)if(g.hasTag(a,"TEXTAREA")){var b=document.selection.createRange(),f=b.duplicate();f.moveToElementText(a);var l=0;if(b.text.length>1){l-=b.text.length;if(l<0)l=0}a=-1+l;for(f.moveStart("character",l);f.inRange(b);){f.moveStart("character");a++}b=b.text.replace(/\r/g,"");return{start:a,end:b.length+a}}else{f=$(a).val();a=document.selection.createRange().duplicate();a.moveEnd("character",f.length);b=a.text==""?f.length:f.lastIndexOf(a.text);a=document.selection.createRange().duplicate();a.moveStart("character",-f.length);return{start:b,end:a.text.length}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,f){var l=$(a).val();if(typeof b!="number")b=-1;if(typeof f!="number")f=-1;if(b<0)b=0;if(f>l.length)f=l.length;if(f<b)f=b;if(b>f)b=f;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=f}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",f-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};this.px=function(a,b){return G(w(a,b))};this.pxself=function(a,b){return G(a.style[b])};this.pctself=function(a,b){return U(a.style[b],0)};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?g.isHidden(a):false}};this.IEwidth=function(a,b,f){if(a.parentNode){var l=a.parentNode.clientWidth-g.px(a,"marginLeft")-g.px(a,"marginRight")-g.px(a,"borderLeftWidth")-g.px(a,"borderRightWidth")-g.px(a.parentNode,"paddingLeft")-g.px(a.parentNode,"paddingRight");b=U(b,0);f=U(f,1E5);return l<b?b-1:l>f?f+1:a.style.styleFloat!=""?b-1:"auto"}else return"auto"};this.hide=function(a){g.getElement(a).style.display="none"};this.inline=function(a){g.getElement(a).style.display="inline"};this.block=function(a){g.getElement(a).style.display="block"};this.show=function(a){g.getElement(a).style.display=""};var z=null;this.firedTarget=null;this.target=function(a){return g.firedTarget||a.target||a.srcElement};var P=false,da=false;this.capture=function(a){W();if(!(z&&a)){z=a;var b=document.body;if(b.setCapture)a!=null?b.setCapture():b.releaseCapture();if(a!=null){$(b).addClass("unselectable");b.setAttribute("unselectable","on");b.onselectstart="return false;"}else{$(b).removeClass("unselectable");b.setAttribute("unselectable","off");b.onselectstart=""}}};this.checkReleaseCapture=function(a,b){z&&a==z&&b.type=="mouseup"&&this.capture(null)};this.getElementsByClassName=function(a,b){if(document.getElementsByClassName)return b.getElementsByClassName(a);else{b=b.getElementsByTagName("*");for(var f=[],l,n=0,o=b.length;n<o;n++){l=b[n];l.className.indexOf(a)!=-1&&f.push(l)}return f}};this.addCss=function(a,b){var f=document.styleSheets[0];f.insertRule(a+" { "+b+" }",f.cssRules.length)};this.addCssText=function(a){var b=document.getElementById("Wt-inline-css");if(!b){b=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(b)}if(b.styleSheet){var f=document.createElement("style");if(b)b.parentNode.insertBefore(f,b);else{f.id="Wt-inline-css";document.getElementsByTagName("head")[0].appendChild(f)}f.styleSheet.cssText=a}else{a=document.createTextNode(a);b.appendChild(a)}};this.getCssRule=function(a,b){a=a.toLowerCase();if(document.styleSheets)for(var f=0;f<document.styleSheets.length;f++){var l=document.styleSheets[f],n=0,o;do{o=null;if(l.cssRules)o=l.cssRules[n];else if(l.rules)o=l.rules[n];if(o&&o.selectorText)if(o.selectorText.toLowerCase()==a)if(b=="delete"){l.cssRules?l.deleteRule(n):l.removeRule(n);return true}else return o;++n}while(o)}return false};this.removeCssRule=function(a){return g.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var f=document.createElement("link");f.setAttribute("type","text/css");f.setAttribute("href",a);f.setAttribute("type","text/css");f.setAttribute("rel","stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,l,n){var o=g.windowSize(),L=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,q=g.widgetPageCoordinates(a.offsetParent),B=["left","right"],r=["top","bottom"],C=g.px(a,"maxWidth")||a.offsetWidth,J=g.px(a,"maxHeight")||a.offsetHeight;if(b+C>L+o.x){l-=q.x;b=a.offsetParent.offsetWidth-(l+g.px(a,"marginRight"));l=1}else{b-=q.x;b-=g.px(a,"marginLeft");l=0}if(f+J>u+o.y){if(n>u+o.y)n=u+o.y;n-=q.y;f=a.offsetParent.offsetHeight-(n+g.px(a,"marginBottom"));n=1}else{f-=q.y;f-=g.px(a,"marginTop");n=0}a.style[B[l]]=b+"px";a.style[B[1-l]]="";a.style[r[n]]=f+"px";a.style[r[1-n]]=""};this.positionXY=function(a,b,f){a=g.getElement(a);a.style.display="";g.isHidden(a)||g.fitToWindow(a,b,f,b,f)};this.Horizontal=1;this.Vertical=2;this.positionAtWidget=function(a,b,f,l){a=g.getElement(a);b=g.getElement(b);var n=g.widgetPageCoordinates(b),o;if(l){a.parentNode.removeChild(a);$(".Wt-domRoot").get(0).appendChild(a)}a.style.position="absolute";a.style.display="block";if(f==g.Horizontal){f=n.x+b.offsetWidth;l=n.y;o=n.x;b=n.y+b.offsetHeight}else{f=n.x;l=n.y+b.offsetHeight;o=n.x+b.offsetWidth;b=n.y}g.fitToWindow(a,f,l,o,b);a.style.visibility=""};this.hasFocus=function(a){return a==document.activeElement};this.history=function(){function a(){var k,h;h=location.href;k=h.indexOf("#");return k>=0?h.substr(k+1):null}function b(){J.value=x+"|"+D;if(u)J.value+="|"+N.join(",")}function f(k){if(k){if(!k||D!==k){D=k||x;Y(unescape(D))}}else{D=x;Y(unescape(D))}}function l(k){var h;k='<html><body><div id="state">'+k+"</div></body></html>";try{h=C.contentWindow.document;h.open();h.write(k);h.close();return true}catch(s){return false}}function n(){var k,h,s,A;if(!C.contentWindow||!C.contentWindow.document)setTimeout(n,10);else{k=C.contentWindow.document;s=(h=k.getElementById("state"))?h.innerText:null;A=a();setInterval(function(){var H,E;k=C.contentWindow.document;H=(h=k.getElementById("state"))?h.innerText:null;E=a();if(H!==s){s=H;f(s);E=s?s:x;A=location.hash=E;b()}else if(E!==A){A=E;l(E)}},50);K=true;r!=null&&r()}}function o(){if(!q){var k=a(),h=history.length;M&&clearInterval(M);M=setInterval(function(){var s,A;s=a();A=history.length;if(s!==k){k=s;h=A;f(k);b()}else if(A!==h&&u){k=s;h=A;s=N[h-1];f(s);b()}},50)}}function L(){var k;k=J.value.split("|");if(k.length>1){x=k[0];D=k[1]}if(k.length>2)N=k[2].split(",");if(q)n();else{o();K=true;r!=null&&r()}}var u=false,q=self.isIElt9,B=false,r=null,C=null,J=null,K=false,M=null,N=[],x,D,Y=function(){};return{onReady:function(k){if(K)setTimeout(function(){k()},0);else r=k},_initialize:function(){J!=null&&L()},_initTimeout:function(){o()},register:function(k,h){if(!K){D=x=escape(k);Y=h}},initialize:function(k,h){if(!K){var s=navigator.vendor||"";if(s!=="KDE")if(typeof window.opera!=="undefined")B=true;else if(!q&&s.indexOf("Apple Computer, Inc.")>-1)u=true;if(typeof k==="string")k=document.getElementById(k);if(!(!k||k.tagName.toUpperCase()!=="TEXTAREA"&&(k.tagName.toUpperCase()!=="INPUT"||k.type!=="hidden"&&k.type!=="text"))){J=k;if(q){if(typeof h==="string")h=document.getElementById(h);!h||h.tagName.toUpperCase()!=="IFRAME"||(C=h)}}}},navigate:function(k){if(K){fqstate=k;if(q)l(fqstate);else{location.hash=fqstate;if(u){N[history.length]=fqstate;b()}}}},getCurrentState:function(){if(!K)return"";return D}}}()}); |
s;h=A;f(k);b()}else if(A!==h&&u){k=s;h=A;s=N[h-1];f(s);b()}},50)}}function L(){var k;k=J.value.split("|");if(k.length>1){x=k[0];D=k[1]}if(k.length>2)N=k[2].split(",");if(q)n();else{o();K=true;r!=null&&r()}}var u=false,q=self.isIElt9,B=false,r=null,C=null,J=null,K=false,M=null,N=[],x,D,Y=function(){};return{onReady:function(k){if(K)setTimeout(function(){k()},0);else r=k},_initialize:function(){J!=null&&L()},_initTimeout:function(){o()},register:function(k,h){if(!K){D=x=escape(k);Y=h}},initialize:function(k, | s;h=A;f(k);b()}else if(A!==h&&u){k=s;h=A;s=O[h-1];f(s);b()}},50)}}function L(){var k;k=J.value.split("|");if(k.length>1){x=k[0];D=k[1]}if(k.length>2)O=k[2].split(",");if(q)n();else{o();K=true;r!=null&&r()}}var u=false,q=self.isIElt9,B=false,r=null,C=null,J=null,K=false,M=null,O=[],x,D,Y=function(){};return{onReady:function(k){if(K)setTimeout(function(){k()},0);else r=k},_initialize:function(){J!=null&&L()},_initTimeout:function(){o()},register:function(k,h){if(!K){D=x=escape(k);Y=h}},initialize:function(k, | window._$_WT_CLASS_$_=new (function(){function w(a,b){return a.style[b]?a.style[b]:document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(a,null)[b]:a.currentStyle?a.currentStyle[b]:null}function v(a,b,f){if(a=="auto"||a==null)return f;return(a=(a=b.exec(a))&&a.length==2?a[1]:null)?parseFloat(a):f}function G(a){return v(a,/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/i,0)}function U(a,b){return v(a,/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/i,b)}function ca(a){if(z==null)return null;if(!a)a=window.event;if(a){for(var b=a=g.target(a);b&&b!=z;)b=b.parentNode;return b==z?g.isIElt9?a:null:z}else return z}function V(a){var b=ca(a);if(b&&!P){if(!a)a=window.event;P=true;if(g.isIElt9){g.firedTarget=a.srcElement||b;b.fireEvent("onmousemove",a);g.firedTarget=null}else g.condCall(b,"onmousemove",a);return P=false}else return true}function Q(a){var b=ca(a);g.capture(null);if(b){if(!a)a=window.event;if(g.isIElt9){g.firedTarget=a.srcElement||b;b.fireEvent("onmouseup",a);g.firedTarget=null}else g.condCall(b,"onmouseup",a);g.cancelEvent(a,g.CancelPropagate);return false}else return true}function W(){if(!da){da=true;if(document.body.addEventListener){var a=document.body;a.addEventListener("mousemove",V,true);a.addEventListener("mouseup",Q,true);g.isGecko&&window.addEventListener("mouseout",function(b){!b.relatedTarget&&g.hasTag(b.target,"HTML")&&Q(b)},true)}else{a=document.body;a.attachEvent("onmousemove",V);a.attachEvent("onmouseup",Q)}}}var g=this;this.buttons=0;this.mouseDown=function(a){g.buttons|=g.button(a)};this.mouseUp=function(a){g.buttons^=g.button(a)};this.arrayRemove=function(a,b,f){f=a.slice((f||b)+1||a.length);a.length=b<0?a.length+b:b;return a.push.apply(a,f)};var X=function(){for(var a,b=3,f=document.createElement("div"),l=f.getElementsByTagName("i");f.innerHTML="<!--[if gt IE "+ ++b+"]><i></i><![endif]--\>",l[0];);return b>4?b:a}();this.isIE=X!==undefined;this.isIE6=X===6;this.isIElt9=X<9;this.isGecko=navigator.userAgent.toLowerCase().indexOf("gecko")!=-1;this.isIEMobile=navigator.userAgent.toLowerCase().indexOf("msie 4")!=-1||navigator.userAgent.toLowerCase().indexOf("msie 5")!=-1;this.isOpera=window.opera!=="undefined";this.updateDelay=this.isIE?10:51;this.setHtml=function(a,b,f){function l(o,L){var u,q,B;switch(o.nodeType){case 1:u=o.namespaceURI==null?document.createElement(o.nodeName):document.createElementNS(o.namespaceURI,o.nodeName);if(o.attributes&&o.attributes.length>0){q=0;for(B=o.attributes.length;q<B;)u.setAttribute(o.attributes[q].nodeName,o.getAttribute(o.attributes[q++].nodeName))}if(L&&o.childNodes.length>0){q=0;for(B=o.childNodes.length;q<B;){var r=l(o.childNodes[q++],L);r&&u.appendChild(r)}}return u;case 3:case 4:case 5:return document.createTextNode(o.nodeValue)}return null}if(g.isIE||_$_INNER_HTML_$_&&!f)if(f)a.innerHTML+=b;else a.innerHTML=b;else{var n;n=new DOMParser;n=n.parseFromString("<div>"+b+"</div>","application/xhtml+xml").documentElement;if(n.nodeType!=1)n=n.nextSibling;if(!f)a.innerHTML="";b=0;for(f=n.childNodes.length;b<f;)a.appendChild(l(n.childNodes[b++],true))}};this.hasTag=function(a,b){return a.nodeType==1&&a.tagName.toUpperCase()===b};this.insertAt=function(a,b,f){a.childNodes.length==0?a.appendChild(b):a.insertBefore(b,a.childNodes[f])};this.remove=function(a){(a=g.getElement(a))&&a.parentNode.removeChild(a)};this.unstub=function(a,b,f){if(f==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8);g.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(g.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var f,l;f=0;for(l=a.attributes.length;f<l;f++){var n=a.attributes[f].nodeName;n!="type"&&n!="name"&&b.setAttribute(n,a.getAttribute(n))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?g.CancelAll:b;if(b&g.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&g.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;try{document.activeElement&&document.activeElement.blur&&g.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}catch(f){}}};this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(l){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,l;if(g.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}l=a.offsetParent;if(l==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=l)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:f}};this.windowCoordinates=function(a){a=g.pageCoordinates(a);return{x:a.x-document.body.scrollLeft-document.documentElement.scrollLeft,y:a.y-document.body.scrollTop-document.documentElement.scrollTop}};this.wheelDelta=function(a){var b=0;if(a.wheelDelta)b=a.wheelDelta>0?1:-1;else if(a.detail)b=a.detail<0?1:-1;return b};this.scrollIntoView=function(a){(a=document.getElementById(a))&&a.scrollIntoView&&a.scrollIntoView(true)};this.getSelectionRange=function(a){if(document.selection)if(g.hasTag(a,"TEXTAREA")){var b=document.selection.createRange(),f=b.duplicate();f.moveToElementText(a);var l=0;if(b.text.length>1){l-=b.text.length;if(l<0)l=0}a=-1+l;for(f.moveStart("character",l);f.inRange(b);){f.moveStart("character");a++}b=b.text.replace(/\r/g,"");return{start:a,end:b.length+a}}else{f=$(a).val();a=document.selection.createRange().duplicate();a.moveEnd("character",f.length);b=a.text==""?f.length:f.lastIndexOf(a.text);a=document.selection.createRange().duplicate();a.moveStart("character",-f.length);return{start:b,end:a.text.length}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,f){var l=$(a).val();if(typeof b!="number")b=-1;if(typeof f!="number")f=-1;if(b<0)b=0;if(f>l.length)f=l.length;if(f<b)f=b;if(b>f)b=f;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=f}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",f-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};this.px=function(a,b){return G(w(a,b))};this.pxself=function(a,b){return G(a.style[b])};this.pctself=function(a,b){return U(a.style[b],0)};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?g.isHidden(a):false}};this.IEwidth=function(a,b,f){if(a.parentNode){var l=a.parentNode.clientWidth-g.px(a,"marginLeft")-g.px(a,"marginRight")-g.px(a,"borderLeftWidth")-g.px(a,"borderRightWidth")-g.px(a.parentNode,"paddingLeft")-g.px(a.parentNode,"paddingRight");b=U(b,0);f=U(f,1E5);return l<b?b-1:l>f?f+1:a.style.styleFloat!=""?b-1:"auto"}else return"auto"};this.hide=function(a){g.getElement(a).style.display="none"};this.inline=function(a){g.getElement(a).style.display="inline"};this.block=function(a){g.getElement(a).style.display="block"};this.show=function(a){g.getElement(a).style.display=""};var z=null;this.firedTarget=null;this.target=function(a){return g.firedTarget||a.target||a.srcElement};var P=false,da=false;this.capture=function(a){W();if(!(z&&a)){z=a;var b=document.body;if(b.setCapture)a!=null?b.setCapture():b.releaseCapture();if(a!=null){$(b).addClass("unselectable");b.setAttribute("unselectable","on");b.onselectstart="return false;"}else{$(b).removeClass("unselectable");b.setAttribute("unselectable","off");b.onselectstart=""}}};this.checkReleaseCapture=function(a,b){z&&a==z&&b.type=="mouseup"&&this.capture(null)};this.getElementsByClassName=function(a,b){if(document.getElementsByClassName)return b.getElementsByClassName(a);else{b=b.getElementsByTagName("*");for(var f=[],l,n=0,o=b.length;n<o;n++){l=b[n];l.className.indexOf(a)!=-1&&f.push(l)}return f}};this.addCss=function(a,b){var f=document.styleSheets[0];f.insertRule(a+" { "+b+" }",f.cssRules.length)};this.addCssText=function(a){var b=document.getElementById("Wt-inline-css");if(!b){b=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(b)}if(b.styleSheet){var f=document.createElement("style");if(b)b.parentNode.insertBefore(f,b);else{f.id="Wt-inline-css";document.getElementsByTagName("head")[0].appendChild(f)}f.styleSheet.cssText=a}else{a=document.createTextNode(a);b.appendChild(a)}};this.getCssRule=function(a,b){a=a.toLowerCase();if(document.styleSheets)for(var f=0;f<document.styleSheets.length;f++){var l=document.styleSheets[f],n=0,o;do{o=null;if(l.cssRules)o=l.cssRules[n];else if(l.rules)o=l.rules[n];if(o&&o.selectorText)if(o.selectorText.toLowerCase()==a)if(b=="delete"){l.cssRules?l.deleteRule(n):l.removeRule(n);return true}else return o;++n}while(o)}return false};this.removeCssRule=function(a){return g.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var f=document.createElement("link");f.setAttribute("type","text/css");f.setAttribute("href",a);f.setAttribute("type","text/css");f.setAttribute("rel","stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,l,n){var o=g.windowSize(),L=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,q=g.widgetPageCoordinates(a.offsetParent),B=["left","right"],r=["top","bottom"],C=g.px(a,"maxWidth")||a.offsetWidth,J=g.px(a,"maxHeight")||a.offsetHeight;if(b+C>L+o.x){l-=q.x;b=a.offsetParent.offsetWidth-(l+g.px(a,"marginRight"));l=1}else{b-=q.x;b-=g.px(a,"marginLeft");l=0}if(f+J>u+o.y){if(n>u+o.y)n=u+o.y;n-=q.y;f=a.offsetParent.offsetHeight-(n+g.px(a,"marginBottom"));n=1}else{f-=q.y;f-=g.px(a,"marginTop");n=0}a.style[B[l]]=b+"px";a.style[B[1-l]]="";a.style[r[n]]=f+"px";a.style[r[1-n]]=""};this.positionXY=function(a,b,f){a=g.getElement(a);a.style.display="";g.isHidden(a)||g.fitToWindow(a,b,f,b,f)};this.Horizontal=1;this.Vertical=2;this.positionAtWidget=function(a,b,f,l){a=g.getElement(a);b=g.getElement(b);var n=g.widgetPageCoordinates(b),o;if(l){a.parentNode.removeChild(a);$(".Wt-domRoot").get(0).appendChild(a)}a.style.position="absolute";a.style.display="block";if(f==g.Horizontal){f=n.x+b.offsetWidth;l=n.y;o=n.x;b=n.y+b.offsetHeight}else{f=n.x;l=n.y+b.offsetHeight;o=n.x+b.offsetWidth;b=n.y}g.fitToWindow(a,f,l,o,b);a.style.visibility=""};this.hasFocus=function(a){return a==document.activeElement};this.history=function(){function a(){var k,h;h=location.href;k=h.indexOf("#");return k>=0?h.substr(k+1):null}function b(){J.value=x+"|"+D;if(u)J.value+="|"+N.join(",")}function f(k){if(k){if(!k||D!==k){D=k||x;Y(unescape(D))}}else{D=x;Y(unescape(D))}}function l(k){var h;k='<html><body><div id="state">'+k+"</div></body></html>";try{h=C.contentWindow.document;h.open();h.write(k);h.close();return true}catch(s){return false}}function n(){var k,h,s,A;if(!C.contentWindow||!C.contentWindow.document)setTimeout(n,10);else{k=C.contentWindow.document;s=(h=k.getElementById("state"))?h.innerText:null;A=a();setInterval(function(){var H,E;k=C.contentWindow.document;H=(h=k.getElementById("state"))?h.innerText:null;E=a();if(H!==s){s=H;f(s);E=s?s:x;A=location.hash=E;b()}else if(E!==A){A=E;l(E)}},50);K=true;r!=null&&r()}}function o(){if(!q){var k=a(),h=history.length;M&&clearInterval(M);M=setInterval(function(){var s,A;s=a();A=history.length;if(s!==k){k=s;h=A;f(k);b()}else if(A!==h&&u){k=s;h=A;s=N[h-1];f(s);b()}},50)}}function L(){var k;k=J.value.split("|");if(k.length>1){x=k[0];D=k[1]}if(k.length>2)N=k[2].split(",");if(q)n();else{o();K=true;r!=null&&r()}}var u=false,q=self.isIElt9,B=false,r=null,C=null,J=null,K=false,M=null,N=[],x,D,Y=function(){};return{onReady:function(k){if(K)setTimeout(function(){k()},0);else r=k},_initialize:function(){J!=null&&L()},_initTimeout:function(){o()},register:function(k,h){if(!K){D=x=escape(k);Y=h}},initialize:function(k,h){if(!K){var s=navigator.vendor||"";if(s!=="KDE")if(typeof window.opera!=="undefined")B=true;else if(!q&&s.indexOf("Apple Computer, Inc.")>-1)u=true;if(typeof k==="string")k=document.getElementById(k);if(!(!k||k.tagName.toUpperCase()!=="TEXTAREA"&&(k.tagName.toUpperCase()!=="INPUT"||k.type!=="hidden"&&k.type!=="text"))){J=k;if(q){if(typeof h==="string")h=document.getElementById(h);!h||h.tagName.toUpperCase()!=="IFRAME"||(C=h)}}}},navigate:function(k){if(K){fqstate=k;if(q)l(fqstate);else{location.hash=fqstate;if(u){N[history.length]=fqstate;b()}}}},getCurrentState:function(){if(!K)return"";return D}}}()}); |
fqstate;if(u){N[history.length]=fqstate;b()}}}},getCurrentState:function(){if(!K)return"";return D}}}()}); | fqstate;if(u){O[history.length]=fqstate;b()}}}},getCurrentState:function(){if(!K)return"";return D}}}()}); | window._$_WT_CLASS_$_=new (function(){function w(a,b){return a.style[b]?a.style[b]:document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(a,null)[b]:a.currentStyle?a.currentStyle[b]:null}function v(a,b,f){if(a=="auto"||a==null)return f;return(a=(a=b.exec(a))&&a.length==2?a[1]:null)?parseFloat(a):f}function G(a){return v(a,/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/i,0)}function U(a,b){return v(a,/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/i,b)}function ca(a){if(z==null)return null;if(!a)a=window.event;if(a){for(var b=a=g.target(a);b&&b!=z;)b=b.parentNode;return b==z?g.isIElt9?a:null:z}else return z}function V(a){var b=ca(a);if(b&&!P){if(!a)a=window.event;P=true;if(g.isIElt9){g.firedTarget=a.srcElement||b;b.fireEvent("onmousemove",a);g.firedTarget=null}else g.condCall(b,"onmousemove",a);return P=false}else return true}function Q(a){var b=ca(a);g.capture(null);if(b){if(!a)a=window.event;if(g.isIElt9){g.firedTarget=a.srcElement||b;b.fireEvent("onmouseup",a);g.firedTarget=null}else g.condCall(b,"onmouseup",a);g.cancelEvent(a,g.CancelPropagate);return false}else return true}function W(){if(!da){da=true;if(document.body.addEventListener){var a=document.body;a.addEventListener("mousemove",V,true);a.addEventListener("mouseup",Q,true);g.isGecko&&window.addEventListener("mouseout",function(b){!b.relatedTarget&&g.hasTag(b.target,"HTML")&&Q(b)},true)}else{a=document.body;a.attachEvent("onmousemove",V);a.attachEvent("onmouseup",Q)}}}var g=this;this.buttons=0;this.mouseDown=function(a){g.buttons|=g.button(a)};this.mouseUp=function(a){g.buttons^=g.button(a)};this.arrayRemove=function(a,b,f){f=a.slice((f||b)+1||a.length);a.length=b<0?a.length+b:b;return a.push.apply(a,f)};var X=function(){for(var a,b=3,f=document.createElement("div"),l=f.getElementsByTagName("i");f.innerHTML="<!--[if gt IE "+ ++b+"]><i></i><![endif]--\>",l[0];);return b>4?b:a}();this.isIE=X!==undefined;this.isIE6=X===6;this.isIElt9=X<9;this.isGecko=navigator.userAgent.toLowerCase().indexOf("gecko")!=-1;this.isIEMobile=navigator.userAgent.toLowerCase().indexOf("msie 4")!=-1||navigator.userAgent.toLowerCase().indexOf("msie 5")!=-1;this.isOpera=window.opera!=="undefined";this.updateDelay=this.isIE?10:51;this.setHtml=function(a,b,f){function l(o,L){var u,q,B;switch(o.nodeType){case 1:u=o.namespaceURI==null?document.createElement(o.nodeName):document.createElementNS(o.namespaceURI,o.nodeName);if(o.attributes&&o.attributes.length>0){q=0;for(B=o.attributes.length;q<B;)u.setAttribute(o.attributes[q].nodeName,o.getAttribute(o.attributes[q++].nodeName))}if(L&&o.childNodes.length>0){q=0;for(B=o.childNodes.length;q<B;){var r=l(o.childNodes[q++],L);r&&u.appendChild(r)}}return u;case 3:case 4:case 5:return document.createTextNode(o.nodeValue)}return null}if(g.isIE||_$_INNER_HTML_$_&&!f)if(f)a.innerHTML+=b;else a.innerHTML=b;else{var n;n=new DOMParser;n=n.parseFromString("<div>"+b+"</div>","application/xhtml+xml").documentElement;if(n.nodeType!=1)n=n.nextSibling;if(!f)a.innerHTML="";b=0;for(f=n.childNodes.length;b<f;)a.appendChild(l(n.childNodes[b++],true))}};this.hasTag=function(a,b){return a.nodeType==1&&a.tagName.toUpperCase()===b};this.insertAt=function(a,b,f){a.childNodes.length==0?a.appendChild(b):a.insertBefore(b,a.childNodes[f])};this.remove=function(a){(a=g.getElement(a))&&a.parentNode.removeChild(a)};this.unstub=function(a,b,f){if(f==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8);g.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(g.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var f,l;f=0;for(l=a.attributes.length;f<l;f++){var n=a.attributes[f].nodeName;n!="type"&&n!="name"&&b.setAttribute(n,a.getAttribute(n))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?g.CancelAll:b;if(b&g.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&g.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;try{document.activeElement&&document.activeElement.blur&&g.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}catch(f){}}};this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(l){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,l;if(g.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}l=a.offsetParent;if(l==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=l)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:f}};this.windowCoordinates=function(a){a=g.pageCoordinates(a);return{x:a.x-document.body.scrollLeft-document.documentElement.scrollLeft,y:a.y-document.body.scrollTop-document.documentElement.scrollTop}};this.wheelDelta=function(a){var b=0;if(a.wheelDelta)b=a.wheelDelta>0?1:-1;else if(a.detail)b=a.detail<0?1:-1;return b};this.scrollIntoView=function(a){(a=document.getElementById(a))&&a.scrollIntoView&&a.scrollIntoView(true)};this.getSelectionRange=function(a){if(document.selection)if(g.hasTag(a,"TEXTAREA")){var b=document.selection.createRange(),f=b.duplicate();f.moveToElementText(a);var l=0;if(b.text.length>1){l-=b.text.length;if(l<0)l=0}a=-1+l;for(f.moveStart("character",l);f.inRange(b);){f.moveStart("character");a++}b=b.text.replace(/\r/g,"");return{start:a,end:b.length+a}}else{f=$(a).val();a=document.selection.createRange().duplicate();a.moveEnd("character",f.length);b=a.text==""?f.length:f.lastIndexOf(a.text);a=document.selection.createRange().duplicate();a.moveStart("character",-f.length);return{start:b,end:a.text.length}}else return a.selectionStart||a.selectionStart==0?{start:a.selectionStart,end:a.selectionEnd}:{start:-1,end:-1}};this.setSelectionRange=function(a,b,f){var l=$(a).val();if(typeof b!="number")b=-1;if(typeof f!="number")f=-1;if(b<0)b=0;if(f>l.length)f=l.length;if(f<b)f=b;if(b>f)b=f;a.focus();if(a.selectionStart!=undefined){a.selectionStart=b;a.selectionEnd=f}else if(document.selection){a=a.createTextRange();a.collapse(true);a.moveStart("character",b);a.moveEnd("character",f-b);a.select()}};this.isKeyPress=function(a){if(!a)a=window.event;if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};this.px=function(a,b){return G(w(a,b))};this.pxself=function(a,b){return G(a.style[b])};this.pctself=function(a,b){return U(a.style[b],0)};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?g.isHidden(a):false}};this.IEwidth=function(a,b,f){if(a.parentNode){var l=a.parentNode.clientWidth-g.px(a,"marginLeft")-g.px(a,"marginRight")-g.px(a,"borderLeftWidth")-g.px(a,"borderRightWidth")-g.px(a.parentNode,"paddingLeft")-g.px(a.parentNode,"paddingRight");b=U(b,0);f=U(f,1E5);return l<b?b-1:l>f?f+1:a.style.styleFloat!=""?b-1:"auto"}else return"auto"};this.hide=function(a){g.getElement(a).style.display="none"};this.inline=function(a){g.getElement(a).style.display="inline"};this.block=function(a){g.getElement(a).style.display="block"};this.show=function(a){g.getElement(a).style.display=""};var z=null;this.firedTarget=null;this.target=function(a){return g.firedTarget||a.target||a.srcElement};var P=false,da=false;this.capture=function(a){W();if(!(z&&a)){z=a;var b=document.body;if(b.setCapture)a!=null?b.setCapture():b.releaseCapture();if(a!=null){$(b).addClass("unselectable");b.setAttribute("unselectable","on");b.onselectstart="return false;"}else{$(b).removeClass("unselectable");b.setAttribute("unselectable","off");b.onselectstart=""}}};this.checkReleaseCapture=function(a,b){z&&a==z&&b.type=="mouseup"&&this.capture(null)};this.getElementsByClassName=function(a,b){if(document.getElementsByClassName)return b.getElementsByClassName(a);else{b=b.getElementsByTagName("*");for(var f=[],l,n=0,o=b.length;n<o;n++){l=b[n];l.className.indexOf(a)!=-1&&f.push(l)}return f}};this.addCss=function(a,b){var f=document.styleSheets[0];f.insertRule(a+" { "+b+" }",f.cssRules.length)};this.addCssText=function(a){var b=document.getElementById("Wt-inline-css");if(!b){b=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(b)}if(b.styleSheet){var f=document.createElement("style");if(b)b.parentNode.insertBefore(f,b);else{f.id="Wt-inline-css";document.getElementsByTagName("head")[0].appendChild(f)}f.styleSheet.cssText=a}else{a=document.createTextNode(a);b.appendChild(a)}};this.getCssRule=function(a,b){a=a.toLowerCase();if(document.styleSheets)for(var f=0;f<document.styleSheets.length;f++){var l=document.styleSheets[f],n=0,o;do{o=null;if(l.cssRules)o=l.cssRules[n];else if(l.rules)o=l.rules[n];if(o&&o.selectorText)if(o.selectorText.toLowerCase()==a)if(b=="delete"){l.cssRules?l.deleteRule(n):l.removeRule(n);return true}else return o;++n}while(o)}return false};this.removeCssRule=function(a){return g.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var f=document.createElement("link");f.setAttribute("type","text/css");f.setAttribute("href",a);f.setAttribute("type","text/css");f.setAttribute("rel","stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,l,n){var o=g.windowSize(),L=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,q=g.widgetPageCoordinates(a.offsetParent),B=["left","right"],r=["top","bottom"],C=g.px(a,"maxWidth")||a.offsetWidth,J=g.px(a,"maxHeight")||a.offsetHeight;if(b+C>L+o.x){l-=q.x;b=a.offsetParent.offsetWidth-(l+g.px(a,"marginRight"));l=1}else{b-=q.x;b-=g.px(a,"marginLeft");l=0}if(f+J>u+o.y){if(n>u+o.y)n=u+o.y;n-=q.y;f=a.offsetParent.offsetHeight-(n+g.px(a,"marginBottom"));n=1}else{f-=q.y;f-=g.px(a,"marginTop");n=0}a.style[B[l]]=b+"px";a.style[B[1-l]]="";a.style[r[n]]=f+"px";a.style[r[1-n]]=""};this.positionXY=function(a,b,f){a=g.getElement(a);a.style.display="";g.isHidden(a)||g.fitToWindow(a,b,f,b,f)};this.Horizontal=1;this.Vertical=2;this.positionAtWidget=function(a,b,f,l){a=g.getElement(a);b=g.getElement(b);var n=g.widgetPageCoordinates(b),o;if(l){a.parentNode.removeChild(a);$(".Wt-domRoot").get(0).appendChild(a)}a.style.position="absolute";a.style.display="block";if(f==g.Horizontal){f=n.x+b.offsetWidth;l=n.y;o=n.x;b=n.y+b.offsetHeight}else{f=n.x;l=n.y+b.offsetHeight;o=n.x+b.offsetWidth;b=n.y}g.fitToWindow(a,f,l,o,b);a.style.visibility=""};this.hasFocus=function(a){return a==document.activeElement};this.history=function(){function a(){var k,h;h=location.href;k=h.indexOf("#");return k>=0?h.substr(k+1):null}function b(){J.value=x+"|"+D;if(u)J.value+="|"+N.join(",")}function f(k){if(k){if(!k||D!==k){D=k||x;Y(unescape(D))}}else{D=x;Y(unescape(D))}}function l(k){var h;k='<html><body><div id="state">'+k+"</div></body></html>";try{h=C.contentWindow.document;h.open();h.write(k);h.close();return true}catch(s){return false}}function n(){var k,h,s,A;if(!C.contentWindow||!C.contentWindow.document)setTimeout(n,10);else{k=C.contentWindow.document;s=(h=k.getElementById("state"))?h.innerText:null;A=a();setInterval(function(){var H,E;k=C.contentWindow.document;H=(h=k.getElementById("state"))?h.innerText:null;E=a();if(H!==s){s=H;f(s);E=s?s:x;A=location.hash=E;b()}else if(E!==A){A=E;l(E)}},50);K=true;r!=null&&r()}}function o(){if(!q){var k=a(),h=history.length;M&&clearInterval(M);M=setInterval(function(){var s,A;s=a();A=history.length;if(s!==k){k=s;h=A;f(k);b()}else if(A!==h&&u){k=s;h=A;s=N[h-1];f(s);b()}},50)}}function L(){var k;k=J.value.split("|");if(k.length>1){x=k[0];D=k[1]}if(k.length>2)N=k[2].split(",");if(q)n();else{o();K=true;r!=null&&r()}}var u=false,q=self.isIElt9,B=false,r=null,C=null,J=null,K=false,M=null,N=[],x,D,Y=function(){};return{onReady:function(k){if(K)setTimeout(function(){k()},0);else r=k},_initialize:function(){J!=null&&L()},_initTimeout:function(){o()},register:function(k,h){if(!K){D=x=escape(k);Y=h}},initialize:function(k,h){if(!K){var s=navigator.vendor||"";if(s!=="KDE")if(typeof window.opera!=="undefined")B=true;else if(!q&&s.indexOf("Apple Computer, Inc.")>-1)u=true;if(typeof k==="string")k=document.getElementById(k);if(!(!k||k.tagName.toUpperCase()!=="TEXTAREA"&&(k.tagName.toUpperCase()!=="INPUT"||k.type!=="hidden"&&k.type!=="text"))){J=k;if(q){if(typeof h==="string")h=document.getElementById(h);!h||h.tagName.toUpperCase()!=="IFRAME"||(C=h)}}}},navigate:function(k){if(K){fqstate=k;if(q)l(fqstate);else{location.hash=fqstate;if(u){N[history.length]=fqstate;b()}}}},getCurrentState:function(){if(!K)return"";return D}}}()}); |
if (panes.eq(i).is(":visible")) { return; } | (function($) { // static constructs $.tools = $.tools || {version: '@VERSION'}; $.tools.tabs = { conf: { tabs: 'a', current: 'current', onBeforeClick: null, onClick: null, effect: 'default', initialIndex: 0, event: 'click', rotate: false, // 1.2 history: false }, addEffect: function(name, fn) { effects[name] = fn; } }; var effects = { // simple "toggle" effect 'default': function(i, done) { this.getPanes().hide().eq(i).show(); done.call(); }, /* configuration: - fadeOutSpeed (positive value does "crossfading") - fadeInSpeed */ fade: function(i, done) { var conf = this.getConf(), speed = conf.fadeOutSpeed, panes = this.getPanes(); if (panes.eq(i).is(":visible")) { return; } if (speed) { panes.fadeOut(speed); } else { panes.hide(); } panes.eq(i).fadeIn(conf.fadeInSpeed, done); }, // for basic accordions slide: function(i, done) { this.getPanes().slideUp(200); this.getPanes().eq(i).slideDown(400, done); }, /** * AJAX effect */ ajax: function(i, done) { this.getPanes().eq(0).load(this.getTabs().eq(i).attr("href"), done); } }; var w; /** * Horizontal accordion * * @deprecated will be replaced with a more robust implementation */ $.tools.tabs.addEffect("horizontal", function(i, done) { // store original width of a pane into memory if (!w) { w = this.getPanes().eq(0).width(); } // set current pane's width to zero this.getCurrentPane().animate({width: 0}, function() { $(this).hide(); }); // grow opened pane to it's original width this.getPanes().eq(i).animate({width: w}, function() { $(this).show(); done.call(); }); }); function Tabs(root, paneSelector, conf) { var self = this, trigger = root.add(this), tabs = root.find(conf.tabs), panes = paneSelector.jquery ? paneSelector : root.children(paneSelector), current; // make sure tabs and panes are found if (!tabs.length) { tabs = root.children(); } if (!panes.length) { panes = root.parent().find(paneSelector); } if (!panes.length) { panes = $(paneSelector); } // public methods $.extend(this, { click: function(i, e) { var tab = tabs.eq(i); if (typeof i == 'string' && i.replace("#", "")) { tab = tabs.filter("[href*=" + i.replace("#", "") + "]"); i = Math.max(tabs.index(tab), 0); } if (conf.rotate) { var last = tabs.length -1; if (i < 0) { return self.click(last, e); } if (i > last) { return self.click(0, e); } } if (!tab.length) { if (current >= 0) { return self; } i = conf.initialIndex; tab = tabs.eq(i); } // current tab is being clicked if (i === current) { return self; } // possibility to cancel click action e = e || $.Event(); e.type = "onBeforeClick"; trigger.trigger(e, [i]); if (e.isDefaultPrevented()) { return; } // call the effect effects[conf.effect].call(self, i, function() { // onClick callback e.type = "onClick"; trigger.trigger(e, [i]); }); // default behaviour current = i; tabs.removeClass(conf.current); tab.addClass(conf.current); return self; }, getConf: function() { return conf; }, getTabs: function() { return tabs; }, getPanes: function() { return panes; }, getCurrentPane: function() { return panes.eq(current); }, getCurrentTab: function() { return tabs.eq(current); }, getIndex: function() { return current; }, next: function() { return self.click(current + 1); }, prev: function() { return self.click(current - 1); } }); // callbacks $.each("onBeforeClick,onClick".split(","), function(i, name) { // configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } // API self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); if (conf.history && $.fn.history) { $.tools.history.init(tabs); conf.event = 'history'; } // setup click actions for each tab tabs.each(function(i) { $(this).bind(conf.event, function(e) { self.click(i, e); return e.preventDefault(); }); }); // cross tab anchor link panes.find("a[href^=#]").click(function(e) { self.click($(this).attr("href"), e); }); // open initial tab if (location.hash) { self.click(location.hash); } else { if (conf.initialIndex === 0 || conf.initialIndex > 0) { self.click(conf.initialIndex); } } } // jQuery plugin implementation $.fn.tabs = function(paneSelector, conf) { // return existing instance var el = this.data("tabs"); if (el) { return el; } if ($.isFunction(conf)) { conf = {onBeforeClick: conf}; } // setup conf conf = $.extend({}, $.tools.tabs.conf, conf); this.each(function() { el = new Tabs($(this), paneSelector, conf); $(this).data("tabs", el); }); return conf.api ? el: this; }; }) (jQuery); |
|
(function(){var C="http: | var Xmla;(function(){var D="http: | (function(){var C="http://schemas.xmlsoap.org/soap/",d=C+"envelope/",g="SOAP-ENV",k="xmlns:"+g+'="'+d+'"',u=g+':encodingStyle="'+C+'encoding/"',i="urn:schemas-microsoft-com:",v=i+"xml-analysis",h='xmlns="'+v+'"',H="sql",j=i+"xml-sql",D="http://www.w3.org/2001/XMLSchema",c="xsd",E="http://www.w3.org/2001/XMLSchema-instance",G="xsi",b=v+":rowset",a=window.ActiveXObject?true:false;function f(J){var L;if(a){L=new ActiveXObject("MSXML2.XMLHTTP.3.0")}else{L=new XMLHttpRequest()}L.open("POST",J.url,J.async);var I=false;var K=function(){I=true;switch(L.readyState){case 0:J.aborted(L);break;case 4:if(L.status===200){J.complete(L)}else{J.error(Xmla.Exception._newError("HTTP_ERROR","_ajax",J))}break}};L.onreadystatechange=K;L.setRequestHeader("Content-Type","text/xml");L.send(J.data);if(!J.async&&!I){K.call(L)}return L}function s(I){return typeof(I)==="undefined"}function F(I){return typeof(I)==="function"}function y(I){return typeof(I)==="string"}function A(I){return typeof(I)==="number"}function w(I){return typeof(I)==="object"}function p(I){return I.replace(/\&/g,"&").replace(/</g,"<").replace(/>/g,">")}var n=function(K,J,L,I){if(F(K.getElementsByTagNameNS)){return K.getElementsByTagNameNS(J,I)}else{if(L){return K.getElementsByTagName(L+":"+I)}else{return K.getElementsByTagName(I)}}};var o=function(J,K,L,I){if(F(J.getAttributeNS)){return J.getAttributeNS(K,I)}else{if(L){return J.getAttribute(L+":"+I)}else{return J.getAttribute(I)}}};function t(I,O,M,K){if(!K){K=""}var J="\n"+K+"<"+I+">";if(M){var R;J+="\n"+K+" <"+O+">";for(var Q in M){if(M.hasOwnProperty(Q)){R=M[Q];J+="\n"+K+" <"+Q+">";if(typeof(R)==="array"){for(var P,L=0,N=R.length;L<N;L++){P=R[L];J+="<Value>"+p(P)+"</Value>"}}else{J+=p(R)}J+="</"+Q+">"}}J+="\n"+K+" </"+O+">"}J+="\n"+K+"</"+I+">";return J}var m="RequestType";function B(I){var K="";var L=I.method;K+="\n<"+g+":Envelope "+k+" "+u+">\n <"+g+":Body>\n <"+L+" "+h+" "+u+">";var J=null;switch(L){case Xmla.METHOD_DISCOVER:if(s(I.requestType)){J=Xmla.Exception._newError("MISSING_REQUEST_TYPE","Xmla._getXmlaSoapMessage",I)}else{K+="\n <"+m+">"+I.requestType+"</"+m+">"+t("Restrictions","RestrictionList",I.restrictions," ")+t("Properties","PropertyList",I.properties," ")}break;case Xmla.METHOD_EXECUTE:if(s(I.statement)){J=Xmla.Exception._newError("MISSING_REQUEST_TYPE","Xmla._getXmlaSoapMessage",I)}else{K+="\n <Command>\n <Statement>"+I.statement+"</Statement>\n </Command>"+t("Properties","PropertyList",I.properties," ")}break;default:}if(J!==null){J._throw()}K+="\n </"+L+">\n </"+g+":Body>\n</"+g+":Envelope>";return K}function x(J,K,I){if(K&&(!J)){J={}}for(var L in K){if(K.hasOwnProperty(L)){if(I||s(J[L])){J[L]=K[L]}}}return J}Xmla=function(I){this.listeners={};this.listeners[Xmla.EVENT_REQUEST]=[];this.listeners[Xmla.EVENT_SUCCESS]=[];this.listeners[Xmla.EVENT_ERROR]=[];this.listeners[Xmla.EVENT_DISCOVER]=[];this.listeners[Xmla.EVENT_DISCOVER_SUCCESS]=[];this.listeners[Xmla.EVENT_DISCOVER_ERROR]=[];this.listeners[Xmla.EVENT_EXECUTE]=[];this.listeners[Xmla.EVENT_EXECUTE_SUCCESS]=[];this.listeners[Xmla.EVENT_EXECUTE_ERROR]=[];this.options=x(x({},Xmla.defaultOptions,true),I,true);return this};Xmla.defaultOptions={requestTimeout:30000,async:false};Xmla.METHOD_DISCOVER="Discover";Xmla.METHOD_EXECUTE="Execute";var q="DISCOVER_";var l="MDSCHEMA_";var r="DBSCHEMA_";Xmla.DISCOVER_DATASOURCES=q+"DATASOURCES";Xmla.DISCOVER_PROPERTIES=q+"PROPERTIES";Xmla.DISCOVER_SCHEMA_ROWSETS=q+"SCHEMA_ROWSETS";Xmla.DISCOVER_ENUMERATORS=q+"ENUMERATORS";Xmla.DISCOVER_KEYWORDS=q+"KEYWORDS";Xmla.DISCOVER_LITERALS=q+"LITERALS";Xmla.DBSCHEMA_CATALOGS=r+"CATALOGS";Xmla.DBSCHEMA_COLUMNS=r+"COLUMNS";Xmla.DBSCHEMA_PROVIDER_TYPES=r+"PROVIDER_TYPES";Xmla.DBSCHEMA_SCHEMATA=r+"SCHEMATA";Xmla.DBSCHEMA_TABLES=r+"TABLES";Xmla.DBSCHEMA_TABLES_INFO=r+"TABLES_INFO";Xmla.MDSCHEMA_ACTIONS=l+"ACTIONS";Xmla.MDSCHEMA_CUBES=l+"CUBES";Xmla.MDSCHEMA_DIMENSIONS=l+"DIMENSIONS";Xmla.MDSCHEMA_FUNCTIONS=l+"FUNCTIONS";Xmla.MDSCHEMA_HIERARCHIES=l+"HIERARCHIES";Xmla.MDSCHEMA_LEVELS=l+"LEVELS";Xmla.MDSCHEMA_MEASURES=l+"MEASURES";Xmla.MDSCHEMA_MEMBERS=l+"MEMBERS";Xmla.MDSCHEMA_PROPERTIES=l+"PROPERTIES";Xmla.MDSCHEMA_SETS=l+"SETS";Xmla.EVENT_REQUEST="request";Xmla.EVENT_SUCCESS="success";Xmla.EVENT_ERROR="error";Xmla.EVENT_EXECUTE="execute";Xmla.EVENT_EXECUTE_SUCCESS="executesuccess";Xmla.EVENT_EXECUTE_ERROR="executeerror";Xmla.EVENT_DISCOVER="discover";Xmla.EVENT_DISCOVER_SUCCESS="discoversuccess";Xmla.EVENT_DISCOVER_ERROR="discovererror";Xmla.EVENT_GENERAL=[Xmla.EVENT_REQUEST,Xmla.EVENT_SUCCESS,Xmla.EVENT_ERROR];Xmla.EVENT_DISCOVER_ALL=[Xmla.EVENT_DISCOVER,Xmla.EVENT_DISCOVER_SUCCESS,Xmla.EVENT_DISCOVER_ERROR];Xmla.EVENT_EXECUTE_ALL=[Xmla.EVENT_EXECUTE,Xmla.EVENT_EXECUTE_SUCCESS,Xmla.EVENT_EXECUTE_ERROR];Xmla.EVENT_ALL=[].concat(Xmla.EVENT_GENERAL,Xmla.EVENT_DISCOVER_ALL,Xmla.EVENT_EXECUTE_ALL);Xmla.PROP_DATASOURCEINFO="DataSourceInfo";Xmla.PROP_CATALOG="Catalog";Xmla.PROP_CUBE="Cube";Xmla.PROP_FORMAT="Format";Xmla.PROP_FORMAT_TABULAR="Tabular";Xmla.PROP_FORMAT_MULTIDIMENSIONAL="Multidimensional";Xmla.PROP_AXISFORMAT="AxisFormat";Xmla.PROP_AXISFORMAT_TUPLE="TupleFormat";Xmla.PROP_AXISFORMAT_CLUSTER="ClusterFormat";Xmla.PROP_AXISFORMAT_CUSTOM="CustomFormat";Xmla.PROP_CONTENT="Content";Xmla.PROP_CONTENT_DATA="Data";Xmla.PROP_CONTENT_NONE="None";Xmla.PROP_CONTENT_SCHEMA="Schema";Xmla.PROP_CONTENT_SCHEMADATA="SchemaData";Xmla.prototype={listeners:null,soapMessage:null,response:null,responseText:null,responseXml:null,setOptions:function(I){x(this.options,I,true)},addListener:function(N){var L=N.events;if(s(L)){Xmla.Exception._newError("NO_EVENTS_SPECIFIED","Xmla.addListener",N)._throw()}if(y(L)){if(L==="all"){L=Xmla.EVENT_ALL}else{L=L.split(",")}}if(!(L instanceof Array)){Xmla.Exception._newError("WRONG_EVENTS_FORMAT","Xmla.addListener",N)._throw()}var K=L.length;var I,M;for(var J=0;J<K;J++){I=L[J].replace(/\s+/g,"");M=this.listeners[I];if(!M){Xmla.Exception._newError("UNKNOWN_EVENT","Xmla.addListener",N)._throw()}if(F(N.handler)){if(!w(N.scope)){N.scope=window}M.push(N)}else{Xmla.Exception._newError("INVALID_EVENT_HANDLER","Xmla.addListener",N)._throw()}}},_fireEvent:function(N,Q,J){var O=this.listeners[N];if(!O){Xmla.Exception._newError("UNKNOWN_EVENT","Xmla._fireEvent",N)._throw()}var M=O.length;var I=true;if(M){var K,P;for(var L=0;L<M;L++){K=O[L];P=K.handler.call(K.scope,N,Q,this);if(J&&P===false){I=false;break}}}else{if(N==="error"){Q.exception._throw()}}return I},request:function(J){var K=this;if(this.response){this.response.close()}this.response=null;this.responseText=null;this.responseXml=null;J.url=s(J.url)?this.options.url:J.url;if(s(J.url)){ex=Xmla.Exception._newError("MISSING_URL","Xmla.request",J);ex._throw()}J.properties=x(J.properties,this.options.properties,false);J.restrictions=x(J.restrictions,this.options.restrictions,false);J.async=s(J.async)?this.options.async:J.async;J.requestTimeout=s(J.requestTimeout)?this.options.requestTimeout:J.requestTimeout;var L=B(J);this.soapMessage=L;var M;var I={async:J.async,timeout:J.requestTimeout,data:L,error:function(N){J.exception=exeception;K._requestError(J)},complete:function(N){J.xhr=N;K._requestSuccess(J)},url:J.url};if(J.username){I.username=J.username}if(J.password){I.password=J.password}if(this._fireEvent(Xmla.EVENT_REQUEST,J,true)&&((J.method==Xmla.METHOD_DISCOVER&&this._fireEvent(Xmla.EVENT_DISCOVER,J))||(J.method==Xmla.METHOD_EXECUTE&&this._fireEvent(Xmla.EVENT_EXECUTE,J)))){M=f(I)}return this.response},_requestError:function(I){this._fireEvent("error",I)},_requestSuccess:function(J){var N=J.xhr;this.responseXML=N.responseXML;this.responseText=N.responseText;var O=J.method;var I=n(this.responseXML,d,g,"Fault");if(I.length){I=I.item(0);J.exception=new Xmla.Exception(Xmla.Exception.TYPE_ERROR,I.getElementsByTagName("faultcode").item(0).childNodes.item(0).data,I.getElementsByTagName("faultstring").item(0).childNodes.item(0).data,null,"_requestSuccess",J);switch(O){case Xmla.METHOD_DISCOVER:this._fireEvent(Xmla.EVENT_DISCOVER_ERROR,J);break;case Xmla.METHOD_EXECUTE:this._fireEvent(Xmla.EVENT_EXECUTE_ERROR,J);break}this._fireEvent(Xmla.EVENT_ERROR,J)}else{switch(O){case Xmla.METHOD_DISCOVER:var M=new Xmla.Rowset(this.responseXML,J.requestType);J.rowset=M;this.response=M;this._fireEvent(Xmla.EVENT_DISCOVER_SUCCESS,J);break;case Xmla.METHOD_EXECUTE:var L;var K=J.properties[Xmla.PROP_FORMAT];switch(K){case Xmla.PROP_FORMAT_TABULAR:L=new Xmla.Rowset(this.responseXML);break;case Xmla.PROP_FORMAT_MULTIDIMENSIONAL:break}J.resultset=L;this.response=L;this._fireEvent(Xmla.EVENT_EXECUTE_SUCCESS,J);break}this._fireEvent(Xmla.EVENT_SUCCESS,J)}},execute:function(I){var J=I.properties;if(s(J)){J={};I.properties=J}if(s(J[Xmla.PROP_CONTENT])){J[Xmla.PROP_CONTENT]=Xmla.PROP_CONTENT_SCHEMADATA}if(s(J[Xmla.PROP_FORMAT])){I.properties[Xmla.PROP_FORMAT]=Xmla.PROP_FORMAT_MULTIDIMENSIONAL}var K=x(I,{method:Xmla.METHOD_EXECUTE},true);return this.request(K)},executeTabular:function(I){if(!I.properties){I.properties={}}I.properties[Xmla.PROP_FORMAT]=Xmla.PROP_FORMAT_TABULAR;return this.execute(I)},executeMultiDimensional:function(I){if(!I.properties){I.properties={}}I.properties[Xmla.PROP_FORMAT]=Xmla.PROP_FORMAT_MULTIDIMENSIONAL;return this.execute(I)},discover:function(I){var J=x(I,{method:Xmla.METHOD_DISCOVER},true);return this.request(J)},discoverDataSources:function(I){var J=x(I,{requestType:Xmla.DISCOVER_DATASOURCES},true);return this.discover(J)},discoverProperties:function(I){var J=x(I,{requestType:Xmla.DISCOVER_PROPERTIES},true);return this.discover(J)},discoverSchemaRowsets:function(I){var J=x(I,{requestType:Xmla.DISCOVER_SCHEMA_ROWSETS},true);return this.discover(J)},discoverEnumerators:function(I){var J=x(I,{requestType:Xmla.DISCOVER_ENUMERATORS},true);return this.discover(J)},discoverKeywords:function(I){var J=x(I,{requestType:Xmla.DISCOVER_KEYWORDS},true);return this.discover(J)},discoverLiterals:function(I){var J=x(I,{requestType:Xmla.DISCOVER_LITERALS},true);return this.discover(J)},discoverDBCatalogs:function(I){var J=x(I,{requestType:Xmla.DBSCHEMA_CATALOGS},true);return this.discover(J)},discoverDBColumns:function(I){var J=x(I,{requestType:Xmla.DBSCHEMA_COLUMNS},true);return this.discover(J)},discoverDBProviderTypes:function(I){var J=x(I,{requestType:Xmla.DBSCHEMA_PROVIDER_TYPES},true);return this.discover(J)},discoverDBSchemata:function(I){var J=x(I,{requestType:Xmla.DBSCHEMA_SCHEMATA},true);return this.discover(J)},discoverDBTables:function(I){var J=x(I,{requestType:Xmla.DBSCHEMA_TABLES},true);return this.discover(J)},discoverDBTablesInfo:function(I){var J=x(I,{requestType:Xmla.DBSCHEMA_TABLES_INFO},true);return this.discover(J)},discoverMDActions:function(I){var J=x(I,{requestType:Xmla.MDSCHEMA_ACTIONS},true);return this.discover(J)},discoverMDCubes:function(I){var J=x(I,{requestType:Xmla.MDSCHEMA_CUBES},true);return this.discover(J)},discoverMDDimensions:function(I){var J=x(I,{requestType:Xmla.MDSCHEMA_DIMENSIONS},true);return this.discover(J)},discoverMDFunctions:function(I){var J=x(I,{requestType:Xmla.MDSCHEMA_FUNCTIONS},true);return this.discover(J)},discoverMDHierarchies:function(I){var J=x(I,{requestType:Xmla.MDSCHEMA_HIERARCHIES},true);return this.discover(J)},discoverMDLevels:function(I){var J=x(I,{requestType:Xmla.MDSCHEMA_LEVELS},true);return this.discover(J)},discoverMDMeasures:function(I){var J=x(I,{requestType:Xmla.MDSCHEMA_MEASURES},true);return this.discover(J)},discoverMDMembers:function(I){var J=x(I,{requestType:Xmla.MDSCHEMA_MEMBERS},true);return this.discover(J)},discoverMDProperties:function(I){var J=x(I,{requestType:Xmla.MDSCHEMA_PROPERTIES},true);return this.discover(J)},discoverMDSets:function(I){var J=x(I,{requestType:Xmla.MDSCHEMA_SETS},true);return this.discover(J)}};function z(M){var J=n(M,D,c,"complexType"),L=J.length,K,I;for(I=0;I<L;I++){K=J.item(I);if(K.getAttribute("name")==="row"){return K}}return null}Xmla.Rowset=function(J,I){this._initData(J,I);return this};Xmla.Rowset.MD_DIMTYPE_UNKNOWN=0;Xmla.Rowset.MD_DIMTYPE_TIME=1;Xmla.Rowset.MD_DIMTYPE_MEASURE=2;Xmla.Rowset.MD_DIMTYPE_OTHER=3;Xmla.Rowset.MD_DIMTYPE_QUANTITATIVE=5;Xmla.Rowset.MD_DIMTYPE_ACCOUNTS=6;Xmla.Rowset.MD_DIMTYPE_CUSTOMERS=7;Xmla.Rowset.MD_DIMTYPE_PRODUCTS=8;Xmla.Rowset.MD_DIMTYPE_SCENARIO=9;Xmla.Rowset.MD_DIMTYPE_UTILIY=10;Xmla.Rowset.MD_DIMTYPE_CURRENCY=11;Xmla.Rowset.MD_DIMTYPE_RATES=12;Xmla.Rowset.MD_DIMTYPE_CHANNEL=13;Xmla.Rowset.MD_DIMTYPE_PROMOTION=14;Xmla.Rowset.MD_DIMTYPE_ORGANIZATION=15;Xmla.Rowset.MD_DIMTYPE_BILL_OF_MATERIALS=16;Xmla.Rowset.MD_DIMTYPE_GEOGRAPHY=17;Xmla.Rowset.KEYS={};Xmla.Rowset.KEYS[Xmla.DBSCHEMA_CATALOGS]=["CATALOG_NAME"];Xmla.Rowset.KEYS[Xmla.DBSCHEMA_COLUMNS]=[];Xmla.Rowset.KEYS[Xmla.DBSCHEMA_PROVIDER_TYPES]=[];Xmla.Rowset.KEYS[Xmla.DBSCHEMA_SCHEMATA]=[];Xmla.Rowset.KEYS[Xmla.DBSCHEMA_TABLES]=[];Xmla.Rowset.KEYS[Xmla.DBSCHEMA_TABLES_INFO]=[];Xmla.Rowset.KEYS[Xmla.DISCOVER_DATASOURCES]=["DataSourceName"];Xmla.Rowset.KEYS[Xmla.DISCOVER_ENUMERATORS]=["EnumName","ElementName"];Xmla.Rowset.KEYS[Xmla.DISCOVER_KEYWORDS]=["Keyword"];Xmla.Rowset.KEYS[Xmla.DISCOVER_LITERALS]=["LiteralName"];Xmla.Rowset.KEYS[Xmla.DISCOVER_PROPERTIES]=["PropertyName"];Xmla.Rowset.KEYS[Xmla.DISCOVER_SCHEMA_ROWSETS]=["SchemaName"];Xmla.Rowset.KEYS[Xmla.MDSCHEMA_ACTIONS]=[];Xmla.Rowset.KEYS[Xmla.MDSCHEMA_CUBES]=["CATALOG_NAME","SCHEMA_NAME","CUBE_NAME"];Xmla.Rowset.KEYS[Xmla.MDSCHEMA_DIMENSIONS]=["CATALOG_NAME","SCHEMA_NAME","CUBE_NAME","DIMENSION_NAME"];Xmla.Rowset.KEYS[Xmla.MDSCHEMA_FUNCTIONS]=[];Xmla.Rowset.KEYS[Xmla.MDSCHEMA_HIERARCHIES]=["CATALOG_NAME","SCHEMA_NAME","CUBE_NAME","HIERARCHY_NAME"];Xmla.Rowset.KEYS[Xmla.MDSCHEMA_LEVELS]=[];Xmla.Rowset.KEYS[Xmla.MDSCHEMA_MEASURES]=["CATALOG_NAME","SCHEMA_NAME","CUBE_NAME","MEASURE_NAME"];Xmla.Rowset.KEYS[Xmla.MDSCHEMA_MEMBERS]=[];Xmla.Rowset.KEYS[Xmla.MDSCHEMA_PROPERTIES]=[];Xmla.Rowset.KEYS[Xmla.MDSCHEMA_SETS]=[];Xmla.Rowset.prototype={_type:null,rows:null,numRows:null,fieldOrder:null,fields:null,_fieldCount:null,_initData:function(L,R){this._type=R;this.rows=n(L,b,null,"row");this.numRows=this.rows?this.rows.length:0;this.reset();this.fieldOrder=[];this.fields={};this._fieldCount=0;var Q=z(L);if(Q){var W=n(Q,D,c,"sequence").item(0),N=W.childNodes,P=N.length,U,I,V,S,M,T,J;for(var O=0;O<P;O++){U=N.item(O);if(U.nodeType!=1){continue}I=o(U,j,H,"field");V=U.getAttribute("name");T=U.getAttribute("type");if(T==null&&this.row){var K=this.row.getElementsByTagName(V);if(K.length){T=o(K.item(0),E,G,"type")}}if(!T&&R==Xmla.DISCOVER_SCHEMA_ROWSETS&&V=="Restrictions"){T="Restrictions"}S=U.getAttribute("minOccurs");M=U.getAttribute("maxOccurs");J=this._getValueConverter(T);this.fields[I]={name:V,label:I,index:this._fieldCount++,type:T,jsType:J.jsType,minOccurs:s(S)?1:S,maxOccurs:s(M)?1:(M==="unbounded"?Infinity:M),getter:this._createFieldGetter(V,J.func,S,M)};this.fieldOrder.push(I)}}else{Xmla.Exception._newError("ERROR_PARSING_RESPONSE","Xmla.Rowset",L)._throw()}},_boolConverter:function(I){return I==="true"?true:false},_intConverter:function(I){return parseInt(I,10)},_floatConverter:function(I){return parseFloat(I,10)},_textConverter:function(I){return I},_restrictionsConverter:function(I){return I},_arrayConverter:function(K,J){var I=[],M=K.length,N;for(var L=0;L<M;L++){N=K.item(L);I.push(J(this._elementText(N)))}return I},_elementText:function(J){if(J.innerText){return J.innerText}else{if(J.textContent){return J.textContent}else{var M="",L=J.childNodes,K=L.length;for(var I=0;I<K;I++){M+=L.item(I).data}return M}}},_getValueConverter:function(J){var I={};switch(J){case"xsd:boolean":I.func=this._boolConverter;I.jsType="boolean";break;case"xsd:decimal":case"xsd:double":case"xsd:float":I.func=this._floatConverter;I.jsType="number";break;case"xsd:int":case"xsd:integer":case"xsd:nonPositiveInteger":case"xsd:negativeInteger":case"xsd:nonNegativeInteger":case"xsd:positiveInteger":case"xsd:short":case"xsd:byte":case"xsd:long":case"xsd:unsignedLong":case"xsd:unsignedInt":case"xsd:unsignedShort":case"xsd:unsignedByte":I.func=this._intConverter;I.jsType="number";break;case"xsd:string":I.func=this._textConverter;I.jsType="string";break;case"Restrictions":I.func=this._restrictionsConverter;I.jsType="object";break;default:I.func=this._textConverter;I.jsType="object";break}return I},_createFieldGetter:function(N,J,M,K){if(M===null){M="1"}if(K===null){K="1"}var L=this;var I;if(K==="1"){if(M==="1"){I=function(){var O=n(this.row,b,null,N);return J(L._elementText(O.item(0)))}}else{if(M==="0"){I=function(){var O=n(this.row,b,null,N);if(!O.length){return null}else{return J(L._elementText(O.item(0)))}}}}}else{if(M==="1"){I=function(){var O=n(this.row,b,null,N);return L._arrayConverter(O,J)}}else{if(M==="0"){I=function(){var O=n(this.row,b,null,N);if(!O.length){return null}else{return L._arrayConverter(O,J)}}}}}return I},getType:function(){return this._type},getFields:function(){var L=[],K=this._fieldCount,I=this.fieldOrder;for(var J=0;J<K;J++){L[J]=this.fieldDef(I[J])}return L},getFieldNames:function(){var K=[];for(var I=0,J=this.fieldCount();I<J;I++){K[I]=this.fieldOrder[I]}return K},hasMoreRows:function(){return this.numRows>this.rowIndex},next:function(){this.row=this.rows.item(++this.rowIndex)},curr:function(){return this.rowIndex},rowCount:function(){return this.numRows},reset:function(){this.rowIndex=0;this.row=(this.hasMoreRows())?this.rows.item(this.rowIndex):null},fieldDef:function(I){var J=this.fields[I];if(s(J)){Xmla.Exception._newError("INVALID_FIELD","Xmla.Rowset.fieldDef",I)._throw()}return J},fieldIndex:function(I){var J=this.fieldDef(I);return J.index},fieldName:function(I){var J=this.fieldOrder[I];if(s(J)){Xmla.Exception._newError("INVALID_FIELD","Xmla.Rowset.fieldDef",I)._throw()}return J},fieldVal:function(I){if(A(I)){I=this.fieldName(I)}var J=this.fieldDef(I);return J.getter.call(this)},fieldCount:function(){return this._fieldCount},close:function(){this.row=null;this.rows=null},readAsArray:function(){var L=[],I=this.fields,K,J;for(K in I){if(I.hasOwnProperty(K)){J=I[K];L[J.index]=J.getter.call(this)}}return L},fetchAsArray:function(){var I;if(this.hasMoreRows()){I=this.readAsArray();this.next()}else{I=false}return I},readAsObject:function(){var J={},I=this.fields,L,K;for(L in I){if(I.hasOwnProperty(L)){K=I[L];J[L]=K.getter.call(this)}}return J},fetchAsObject:function(){var I;if(this.hasMoreRows()){I=this.readAsObject();this.next()}else{I=false}return I},fetchCustom:function(J){var I;if(this.hasMoreRows()){I=J.call(this);this.next()}else{I=false}return I},fetchAllAsArray:function(I){var J;if(!I){I=[]}while((J=this.fetchAsArray())){I.push(J)}return I},fetchAllAsObject:function(I){var J;if(!I){I=[]}while((J=this.fetchAsObject())){I.push(J)}return I},fetchAllCustom:function(J,I){var K;if(!J){J=[]}while((K=this.fetchCustom(I))){J.push(K)}return J},mapAsObject:function(I,Q,S){var N,R,J,K,L=I;for(var O=0,M=Q.length,P=M-1;O<M;O++){N=Q[O];R=S[N];J=L[R];if(J){if(O===P){if(J instanceof Array){J.push(S)}else{L[R]=[J,S]}}else{L=J}}else{if(O===P){L[R]=S}else{L=L[R]={}}}}},mapAllAsObject:function(I,J){if(!J){J={}}if(!I){I=this.getKey()}var K;while(K=this.fetchAsObject()){this.mapAsObject(J,I,K)}return J},getKey:function(){var I;if(this._type){I=Xmla.Rowset.KEYS[this._type]}else{I=this.getFieldNames()}return I}};Xmla.Exception=function(J,L,K,I,N,M){this.type=J;this.code=L;this.message=K;this.source=N;this.helpfile=I;this.data=M;return this};Xmla.Exception.TYPE_WARNING="warning";Xmla.Exception.TYPE_ERROR="error";var e="http://code.google.com/p/xmla4js/wiki/ExceptionCodes";Xmla.Exception.MISSING_REQUEST_TYPE_CDE=-1;Xmla.Exception.MISSING_REQUEST_TYPE_MSG="Missing_Request_Type";Xmla.Exception.MISSING_REQUEST_TYPE_HLP=e+"#"+Xmla.Exception.MISSING_REQUEST_TYPE_CDE+"_"+Xmla.Exception.MISSING_REQUEST_TYPE_MSG;Xmla.Exception.MISSING_STATEMENT_CDE=-2;Xmla.Exception.MISSING_STATEMENT_MSG="Missing_Statement";Xmla.Exception.MISSING_STATEMENT_HLP=e+"#"+Xmla.Exception.MISSING_STATEMENT_CDE+"_"+Xmla.Exception.MISSING_STATEMENT_MSG;Xmla.Exception.MISSING_URL_CDE=-3;Xmla.Exception.MISSING_URL_MSG="Missing_URL";Xmla.Exception.MISSING_URL_HLP=e+"#"+Xmla.Exception.MISSING_URL_CDE+"_"+Xmla.Exception.MISSING_URL_MSG;Xmla.Exception.NO_EVENTS_SPECIFIED_CDE=-4;Xmla.Exception.NO_EVENTS_SPECIFIED_MSG="No_Events_Specified";Xmla.Exception.NO_EVENTS_SPECIFIED_HLP=e+"#"+Xmla.Exception.NO_EVENTS_SPECIFIED_CDE+"_"+Xmla.Exception.NO_EVENTS_SPECIFIED_MSG;Xmla.Exception.WRONG_EVENTS_FORMAT_CDE=-5;Xmla.Exception.WRONG_EVENTS_FORMAT_MSG="Wrong_Events_Format";Xmla.Exception.WRONG_EVENTS_FORMAT_HLP=e+"#"+Xmla.Exception.NO_EVENTS_SPECIFIED_CDE+"_"+Xmla.Exception.NO_EVENTS_SPECIFIED_MSG;Xmla.Exception.UNKNOWN_EVENT_CDE=-6;Xmla.Exception.UNKNOWN_EVENT_MSG="Unknown_Event";Xmla.Exception.UNKNOWN_EVENT_HLP=e+"#"+Xmla.Exception.UNKNOWN_EVENT_CDE+"_"+Xmla.Exception.UNKNOWN_EVENT_MSG;Xmla.Exception.INVALID_EVENT_HANDLER_CDE=-7;Xmla.Exception.INVALID_EVENT_HANDLER_MSG="Invalid_Events_Handler";Xmla.Exception.INVALID_EVENT_HANDLER_HLP=e+"#"+Xmla.Exception.INVALID_EVENT_HANDLER_CDE+"_"+Xmla.Exception.INVALID_EVENT_HANDLER_MSG;Xmla.Exception.ERROR_PARSING_RESPONSE_CDE=-8;Xmla.Exception.ERROR_PARSING_RESPONSE_MSG="Error_Parsing_Response";Xmla.Exception.ERROR_PARSING_RESPONSE_HLP=e+"#"+Xmla.Exception.ERROR_PARSING_RESPONSE_CDE+"_"+Xmla.Exception.ERROR_PARSING_RESPONSE_MSG;Xmla.Exception.INVALID_FIELD_CDE=-9;Xmla.Exception.INVALID_FIELD_MSG="Invalid_Field";Xmla.Exception.INVALID_FIELD_HLP=e+"#"+Xmla.Exception.INVALID_FIELD_CDE+"_"+Xmla.Exception.INVALID_FIELD_MSG;Xmla.Exception.HTTP_ERROR_CDE=-10;Xmla.Exception.HTTP_ERROR_MSG="HTTP Error";Xmla.Exception.HTTP_ERROR_HLP=e+"#"+Xmla.Exception.INVALID_FIELD_CDE+"_"+Xmla.Exception.INVALID_FIELD_MSG;Xmla.Exception._newError=function(I,K,J){return new Xmla.Exception(Xmla.Exception.TYPE_ERROR,Xmla.Exception[I+"_CDE"],Xmla.Exception[I+"_MSG"],Xmla.Exception[I+"_HLP"],K,J)};Xmla.Exception.prototype={type:null,code:null,message:null,source:null,helpfile:null,data:null,_throw:function(){throw this}}}()); |
seekTo: function(i, time, fn) { | seekTo: function(i, time, fn) { if (conf.circular && i === 0 && index == -1 && time !== 0) { return self; } | (function($) { // static constructs $.tools = $.tools || {version: '@VERSION'}; $.tools.scrollable = { conf: { activeClass: 'active', circular: false, clonedClass: 'cloned', disabledClass: 'disabled', easing: 'swing', initialIndex: 0, item: null, items: '.items', keyboard: true, mousewheel: false, next: '.next', prev: '.prev', speed: 400, vertical: false, wheelSpeed: 0 } }; // get hidden element's width or height even though it's hidden function dim(el, key) { var v = parseInt(el.css(key), 10); if (v) { return v; } var s = el[0].currentStyle; return s && s.width && parseInt(s.width, 10); } function find(root, query) { var el = $(query); return el.length < 2 ? el : root.parent().find(query); } var current; // constructor function Scrollable(root, conf) { // current instance var self = this, fire = root.add(self), itemWrap = root.children(), index = 0, vertical = conf.vertical; if (!current) { current = self; } if (itemWrap.length > 1) { itemWrap = $(conf.items, root); } // methods $.extend(self, { getConf: function() { return conf; }, getIndex: function() { return index; }, getSize: function() { return self.getItems().size(); }, getNaviButtons: function() { return prev.add(next); }, getRoot: function() { return root; }, getItemWrap: function() { return itemWrap; }, getItems: function() { return itemWrap.children(conf.item).not("." + conf.clonedClass); }, move: function(offset, time) { return self.seekTo(index + offset, time); }, next: function(time) { return self.move(1, time); }, prev: function(time) { return self.move(-1, time); }, begin: function(time) { return self.seekTo(0, time); }, end: function(time) { return self.seekTo(self.getSize() -1, time); }, focus: function() { current = self; return self; }, addItem: function(item) { item = $(item); if (!conf.circular) { itemWrap.append(item); } else { $(".cloned:last").before(item); $(".cloned:first").replaceWith(item.clone().addClass(conf.clonedClass)); } fire.trigger("onAddItem", [item]); return self; }, /* all seeking functions depend on this */ seekTo: function(i, time, fn) { // check that index is sane if (!conf.circular && i < 0 || i > self.getSize()) { return self; } var item = i; if (i.jquery) { i = self.getItems().index(i); } else { item = self.getItems().eq(i); } // onBeforeSeek var e = $.Event("onBeforeSeek"); if (!fn) { fire.trigger(e, [i, time]); if (e.isDefaultPrevented() || !item.length) { return self; } } var props = vertical ? {top: -item.position().top} : {left: -item.position().left}; index = i; current = self; time = time || conf.speed; itemWrap.animate(props, time, conf.easing, fn || function() { fire.trigger("onSeek", [i]); }); return self; } }); // callbacks $.each(['onBeforeSeek', 'onSeek', 'onAddItem'], function(i, name) { // configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); // circular loop if (conf.circular) { var cloned1 = self.getItems().slice(-1).clone().prependTo(itemWrap), cloned2 = self.getItems().eq(1).clone().appendTo(itemWrap); cloned1.add(cloned2).addClass(conf.clonedClass); self.onBeforeSeek(function(e, i, time) { if (e.isDefaultPrevented()) { return; } /* 1. animate to the clone without event triggering 2. seek to correct position with 0 speed */ if (i == -1) { self.seekTo(cloned1, time, function() { self.end(0); }); return e.preventDefault(); } else if (i == self.getSize()) { self.seekTo(cloned2, time, function() { self.begin(0); }); } }); // seek over the cloned item self.seekTo(0, 0); } // next/prev buttons var prev = find(root, conf.prev).click(function() { self.prev(); }), next = find(root, conf.next).click(function() { self.next(); }); if (!conf.circular && self.getSize() > 1) { self.onBeforeSeek(function(e, i) { prev.toggleClass(conf.disabledClass, i <= 0); next.toggleClass(conf.disabledClass, i >= self.getSize() -1); }); } // mousewheel support if (conf.mousewheel && $.fn.mousewheel) { root.mousewheel(function(e, delta) { if (conf.mousewheel) { self.move(delta < 0 ? 1 : -1, conf.wheelSpeed || 50); return false; } }); } if (conf.keyboard) { $(document).bind("keydown.scrollable", function(evt) { // skip certain conditions if (!conf.keyboard || evt.altKey || evt.ctrlKey || $(evt.target).is(":input")) { return; } // does this instance have focus? if (conf.keyboard != 'static' && current != self) { return; } var key = evt.keyCode; if (vertical && (key == 38 || key == 40)) { self.move(key == 38 ? -1 : 1); return evt.preventDefault(); } if (!vertical && (key == 37 || key == 39)) { self.move(key == 37 ? -1 : 1); return evt.preventDefault(); } }); } // initial index $(self).trigger("onBeforeSeek", [conf.initialIndex]); } // jQuery plugin implementation $.fn.scrollable = function(conf) { // already constructed --> return API var el = this.data("scrollable"); if (el) { return el; } conf = $.extend({}, $.tools.scrollable.conf, conf); this.each(function() { el = new Scrollable($(this), conf); $(this).data("scrollable", el); }); return conf.api ? el: this; }; })(jQuery); |
if (!conf.circular && i < 0 || i > self.getSize()) { return self; } | if (!conf.circular && i < 0 || i > self.getSize() || i < -1) { return self; } | (function($) { // static constructs $.tools = $.tools || {version: '@VERSION'}; $.tools.scrollable = { conf: { activeClass: 'active', circular: false, clonedClass: 'cloned', disabledClass: 'disabled', easing: 'swing', initialIndex: 0, item: null, items: '.items', keyboard: true, mousewheel: false, next: '.next', prev: '.prev', speed: 400, vertical: false, wheelSpeed: 0 } }; // get hidden element's width or height even though it's hidden function dim(el, key) { var v = parseInt(el.css(key), 10); if (v) { return v; } var s = el[0].currentStyle; return s && s.width && parseInt(s.width, 10); } function find(root, query) { var el = $(query); return el.length < 2 ? el : root.parent().find(query); } var current; // constructor function Scrollable(root, conf) { // current instance var self = this, fire = root.add(self), itemWrap = root.children(), index = 0, vertical = conf.vertical; if (!current) { current = self; } if (itemWrap.length > 1) { itemWrap = $(conf.items, root); } // methods $.extend(self, { getConf: function() { return conf; }, getIndex: function() { return index; }, getSize: function() { return self.getItems().size(); }, getNaviButtons: function() { return prev.add(next); }, getRoot: function() { return root; }, getItemWrap: function() { return itemWrap; }, getItems: function() { return itemWrap.children(conf.item).not("." + conf.clonedClass); }, move: function(offset, time) { return self.seekTo(index + offset, time); }, next: function(time) { return self.move(1, time); }, prev: function(time) { return self.move(-1, time); }, begin: function(time) { return self.seekTo(0, time); }, end: function(time) { return self.seekTo(self.getSize() -1, time); }, focus: function() { current = self; return self; }, addItem: function(item) { item = $(item); if (!conf.circular) { itemWrap.append(item); } else { $(".cloned:last").before(item); $(".cloned:first").replaceWith(item.clone().addClass(conf.clonedClass)); } fire.trigger("onAddItem", [item]); return self; }, /* all seeking functions depend on this */ seekTo: function(i, time, fn) { // check that index is sane if (!conf.circular && i < 0 || i > self.getSize()) { return self; } var item = i; if (i.jquery) { i = self.getItems().index(i); } else { item = self.getItems().eq(i); } // onBeforeSeek var e = $.Event("onBeforeSeek"); if (!fn) { fire.trigger(e, [i, time]); if (e.isDefaultPrevented() || !item.length) { return self; } } var props = vertical ? {top: -item.position().top} : {left: -item.position().left}; index = i; current = self; time = time || conf.speed; itemWrap.animate(props, time, conf.easing, fn || function() { fire.trigger("onSeek", [i]); }); return self; } }); // callbacks $.each(['onBeforeSeek', 'onSeek', 'onAddItem'], function(i, name) { // configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); // circular loop if (conf.circular) { var cloned1 = self.getItems().slice(-1).clone().prependTo(itemWrap), cloned2 = self.getItems().eq(1).clone().appendTo(itemWrap); cloned1.add(cloned2).addClass(conf.clonedClass); self.onBeforeSeek(function(e, i, time) { if (e.isDefaultPrevented()) { return; } /* 1. animate to the clone without event triggering 2. seek to correct position with 0 speed */ if (i == -1) { self.seekTo(cloned1, time, function() { self.end(0); }); return e.preventDefault(); } else if (i == self.getSize()) { self.seekTo(cloned2, time, function() { self.begin(0); }); } }); // seek over the cloned item self.seekTo(0, 0); } // next/prev buttons var prev = find(root, conf.prev).click(function() { self.prev(); }), next = find(root, conf.next).click(function() { self.next(); }); if (!conf.circular && self.getSize() > 1) { self.onBeforeSeek(function(e, i) { prev.toggleClass(conf.disabledClass, i <= 0); next.toggleClass(conf.disabledClass, i >= self.getSize() -1); }); } // mousewheel support if (conf.mousewheel && $.fn.mousewheel) { root.mousewheel(function(e, delta) { if (conf.mousewheel) { self.move(delta < 0 ? 1 : -1, conf.wheelSpeed || 50); return false; } }); } if (conf.keyboard) { $(document).bind("keydown.scrollable", function(evt) { // skip certain conditions if (!conf.keyboard || evt.altKey || evt.ctrlKey || $(evt.target).is(":input")) { return; } // does this instance have focus? if (conf.keyboard != 'static' && current != self) { return; } var key = evt.keyCode; if (vertical && (key == 38 || key == 40)) { self.move(key == 38 ? -1 : 1); return evt.preventDefault(); } if (!vertical && (key == 37 || key == 39)) { self.move(key == 37 ? -1 : 1); return evt.preventDefault(); } }); } // initial index $(self).trigger("onBeforeSeek", [conf.initialIndex]); } // jQuery plugin implementation $.fn.scrollable = function(conf) { // already constructed --> return API var el = this.data("scrollable"); if (el) { return el; } conf = $.extend({}, $.tools.scrollable.conf, conf); this.each(function() { el = new Scrollable($(this), conf); $(this).data("scrollable", el); }); return conf.api ? el: this; }; })(jQuery); |
time = time || conf.speed; | if (time === undefined) { time = conf.speed; } | (function($) { // static constructs $.tools = $.tools || {version: '@VERSION'}; $.tools.scrollable = { conf: { activeClass: 'active', circular: false, clonedClass: 'cloned', disabledClass: 'disabled', easing: 'swing', initialIndex: 0, item: null, items: '.items', keyboard: true, mousewheel: false, next: '.next', prev: '.prev', speed: 400, vertical: false, wheelSpeed: 0 } }; // get hidden element's width or height even though it's hidden function dim(el, key) { var v = parseInt(el.css(key), 10); if (v) { return v; } var s = el[0].currentStyle; return s && s.width && parseInt(s.width, 10); } function find(root, query) { var el = $(query); return el.length < 2 ? el : root.parent().find(query); } var current; // constructor function Scrollable(root, conf) { // current instance var self = this, fire = root.add(self), itemWrap = root.children(), index = 0, vertical = conf.vertical; if (!current) { current = self; } if (itemWrap.length > 1) { itemWrap = $(conf.items, root); } // methods $.extend(self, { getConf: function() { return conf; }, getIndex: function() { return index; }, getSize: function() { return self.getItems().size(); }, getNaviButtons: function() { return prev.add(next); }, getRoot: function() { return root; }, getItemWrap: function() { return itemWrap; }, getItems: function() { return itemWrap.children(conf.item).not("." + conf.clonedClass); }, move: function(offset, time) { return self.seekTo(index + offset, time); }, next: function(time) { return self.move(1, time); }, prev: function(time) { return self.move(-1, time); }, begin: function(time) { return self.seekTo(0, time); }, end: function(time) { return self.seekTo(self.getSize() -1, time); }, focus: function() { current = self; return self; }, addItem: function(item) { item = $(item); if (!conf.circular) { itemWrap.append(item); } else { $(".cloned:last").before(item); $(".cloned:first").replaceWith(item.clone().addClass(conf.clonedClass)); } fire.trigger("onAddItem", [item]); return self; }, /* all seeking functions depend on this */ seekTo: function(i, time, fn) { // check that index is sane if (!conf.circular && i < 0 || i > self.getSize()) { return self; } var item = i; if (i.jquery) { i = self.getItems().index(i); } else { item = self.getItems().eq(i); } // onBeforeSeek var e = $.Event("onBeforeSeek"); if (!fn) { fire.trigger(e, [i, time]); if (e.isDefaultPrevented() || !item.length) { return self; } } var props = vertical ? {top: -item.position().top} : {left: -item.position().left}; index = i; current = self; time = time || conf.speed; itemWrap.animate(props, time, conf.easing, fn || function() { fire.trigger("onSeek", [i]); }); return self; } }); // callbacks $.each(['onBeforeSeek', 'onSeek', 'onAddItem'], function(i, name) { // configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); // circular loop if (conf.circular) { var cloned1 = self.getItems().slice(-1).clone().prependTo(itemWrap), cloned2 = self.getItems().eq(1).clone().appendTo(itemWrap); cloned1.add(cloned2).addClass(conf.clonedClass); self.onBeforeSeek(function(e, i, time) { if (e.isDefaultPrevented()) { return; } /* 1. animate to the clone without event triggering 2. seek to correct position with 0 speed */ if (i == -1) { self.seekTo(cloned1, time, function() { self.end(0); }); return e.preventDefault(); } else if (i == self.getSize()) { self.seekTo(cloned2, time, function() { self.begin(0); }); } }); // seek over the cloned item self.seekTo(0, 0); } // next/prev buttons var prev = find(root, conf.prev).click(function() { self.prev(); }), next = find(root, conf.next).click(function() { self.next(); }); if (!conf.circular && self.getSize() > 1) { self.onBeforeSeek(function(e, i) { prev.toggleClass(conf.disabledClass, i <= 0); next.toggleClass(conf.disabledClass, i >= self.getSize() -1); }); } // mousewheel support if (conf.mousewheel && $.fn.mousewheel) { root.mousewheel(function(e, delta) { if (conf.mousewheel) { self.move(delta < 0 ? 1 : -1, conf.wheelSpeed || 50); return false; } }); } if (conf.keyboard) { $(document).bind("keydown.scrollable", function(evt) { // skip certain conditions if (!conf.keyboard || evt.altKey || evt.ctrlKey || $(evt.target).is(":input")) { return; } // does this instance have focus? if (conf.keyboard != 'static' && current != self) { return; } var key = evt.keyCode; if (vertical && (key == 38 || key == 40)) { self.move(key == 38 ? -1 : 1); return evt.preventDefault(); } if (!vertical && (key == 37 || key == 39)) { self.move(key == 37 ? -1 : 1); return evt.preventDefault(); } }); } // initial index $(self).trigger("onBeforeSeek", [conf.initialIndex]); } // jQuery plugin implementation $.fn.scrollable = function(conf) { // already constructed --> return API var el = this.data("scrollable"); if (el) { return el; } conf = $.extend({}, $.tools.scrollable.conf, conf); this.each(function() { el = new Scrollable($(this), conf); $(this).data("scrollable", el); }); return conf.api ? el: this; }; })(jQuery); |
$(self).bind(name, fn); | if (fn) { $(self).bind(name, fn); } | (function($) { // static constructs $.tools = $.tools || {version: '@VERSION'}; $.tools.overlay = { addEffect: function(name, loadFn, closeFn) { effects[name] = [loadFn, closeFn]; }, conf: { close: null, closeOnClick: true, closeOnEsc: true, closeSpeed: 'fast', effect: 'default', // since 1.2. fixed positioning not supported by IE6 fixed: !$.browser.msie || $.browser.version > 6, left: 'center', load: false, // 1.2 mask: null, oneInstance: true, speed: 'normal', target: null, // target element to be overlayed. by default taken from [rel] top: '10%' } }; var instances = [], effects = {}; // the default effect. nice and easy! $.tools.overlay.addEffect('default', /* onLoad/onClose functions must be called otherwise none of the user supplied callback methods won't be called */ function(pos, onLoad) { var conf = this.getConf(), w = $(window); if (!conf.fixed) { pos.top += w.scrollTop(); pos.left += w.scrollLeft(); } pos.position = conf.fixed ? 'fixed' : 'absolute'; this.getOverlay().css(pos).fadeIn(conf.speed, onLoad); }, function(onClose) { this.getOverlay().fadeOut(this.getConf().closeSpeed, onClose); } ); function Overlay(trigger, conf) { // private variables var self = this, fire = trigger.add(self), w = $(window), closers, overlay, opened, maskConf = $.tools.expose && (conf.mask || conf.expose), uid = Math.random().toString().slice(10); // mask configuration if (maskConf) { if (typeof maskConf == 'string') { maskConf = {color: maskConf}; } maskConf.closeOnClick = maskConf.closeOnEsc = false; } // get overlay and triggerr var jq = conf.target || trigger.attr("rel"); overlay = jq ? $(jq) : null || trigger; // overlay not found. cannot continue if (!overlay.length) { throw "Could not find Overlay: " + jq; } // trigger's click event if (trigger && trigger.index(overlay) == -1) { trigger.click(function(e) { self.load(e); return e.preventDefault(); }); } // API methods $.extend(self, { load: function(e) { // can be opened only once if (self.isOpened()) { return self; } // find the effect var eff = effects[conf.effect]; if (!eff) { throw "Overlay: cannot find effect : \"" + conf.effect + "\""; } // close other instances? if (conf.oneInstance) { $.each(instances, function() { this.close(e); }); } // onBeforeLoad e = e || $.Event(); e.type = "onBeforeLoad"; fire.trigger(e); if (e.isDefaultPrevented()) { return self; } // opened opened = true; // possible mask effect if (maskConf) { $(overlay).expose(maskConf); } // position & dimensions var top = conf.top, left = conf.left, oWidth = overlay.outerWidth({margin:true}), oHeight = overlay.outerHeight({margin:true}); if (typeof top == 'string') { top = top == 'center' ? Math.max((w.height() - oHeight) / 2, 0) : parseInt(top, 10) / 100 * w.height(); } if (left == 'center') { left = Math.max((w.width() - oWidth) / 2, 0); } // load effect eff[0].call(self, {top: top, left: left}, function() { if (opened) { e.type = "onLoad"; fire.trigger(e); } }); // mask.click closes overlay if (maskConf && conf.closeOnClick) { $.mask.getMask().one("click", self.close); } // when window is clicked outside overlay, we close if (conf.closeOnClick) { $(document).bind("click." + uid, function(e) { if (!$(e.target).parents(overlay).length) { self.close(e); } }); } // keyboard::escape if (conf.closeOnEsc) { // one callback is enough if multiple instances are loaded simultaneously $(document).bind("keydown." + uid, function(e) { if (e.keyCode == 27) { self.close(e); } }); } return self; }, close: function(e) { if (!self.isOpened()) { return self; } e = e || $.Event(); e.type = "onBeforeClose"; fire.trigger(e); if (e.isDefaultPrevented()) { return; } opened = false; // close effect effects[conf.effect][1].call(self, function() { e.type = "onClose"; fire.trigger(e); }); // unbind the keyboard / clicking actions $(document).unbind("click." + uid).unbind("keydown." + uid); if (maskConf) { $.mask.close(); } return self; }, getOverlay: function() { return overlay; }, getTrigger: function() { return trigger; }, getClosers: function() { return closers; }, isOpened: function() { return opened; }, // manipulate start, finish and speeds getConf: function() { return conf; } }); // callbacks $.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","), function(i, name) { // configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } // API self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); // close button closers = overlay.find(conf.close || ".close"); if (!closers.length && !conf.close) { closers = $('<a class="close"></a>'); overlay.prepend(closers); } closers.click(function(e) { self.close(e); }); // autoload if (conf.load) { self.load(); } } // jQuery plugin initialization $.fn.overlay = function(conf) { // already constructed --> return API var el = this.data("overlay"); if (el) { return el; } if ($.isFunction(conf)) { conf = {onBeforeLoad: conf}; } conf = $.extend(true, {}, $.tools.overlay.conf, conf); this.each(function() { el = new Overlay($(this), conf); instances.push(el); $(this).data("overlay", el); }); return conf.api ? el: this; }; })(jQuery); |
$(yesId).observe("click", function() { | $(yesId).observe("click", function(event) { event.stop(); | $(yesId).observe("click", function() { Modalbox.hide(); proceed.defer(); }); |
WT_DECLARE_WT_MEMBER(1,"WHTML5Media",function(c,b){jQuery.data(b,"obj",this);this.alternativeEl=this.mediaEl=null;this.play=function(){if(b.mediaId){var a=$("#"+b.mediaId).get(0);if(a){a.play();return}}if(b.alternativeId)(a=$("#"+b.alternativeId).get(0))&&a.WtPlay&&a.WtPlay()};this.pause=function(){if(b.mediaId){var a=$("#"+b.mediaId).get(0);if(a){a.pause();return}}if(b.alternativeId)(a=$("#"+b.alternativeId).get(0))&&a.WtPlay&&a.WtPause()}}); | WT_DECLARE_WT_MEMBER(1,"WHTML5Media",function(c,b){jQuery.data(b,"obj",this);this.play=function(){if(b.mediaId){var a=$("#"+b.mediaId).get(0);if(a){a.play();return}}if(b.alternativeId)(a=$("#"+b.alternativeId).get(0))&&a.WtPlay&&a.WtPlay()};this.pause=function(){if(b.mediaId){var a=$("#"+b.mediaId).get(0);if(a){a.pause();return}}if(b.alternativeId)(a=$("#"+b.alternativeId).get(0))&&a.WtPlay&&a.WtPause()}}); | WT_DECLARE_WT_MEMBER(1,"WHTML5Media",function(c,b){jQuery.data(b,"obj",this);this.alternativeEl=this.mediaEl=null;this.play=function(){if(b.mediaId){var a=$("#"+b.mediaId).get(0);if(a){a.play();return}}if(b.alternativeId)(a=$("#"+b.alternativeId).get(0))&&a.WtPlay&&a.WtPlay()};this.pause=function(){if(b.mediaId){var a=$("#"+b.mediaId).get(0);if(a){a.pause();return}}if(b.alternativeId)(a=$("#"+b.alternativeId).get(0))&&a.WtPlay&&a.WtPause()}}); |
var abs = Zotero.Utilities.trimInternal(newDoc.evaluate(' | if (newDoc.evaluate(' | Zotero.Utilities.processDocuments(arts, function(newDoc) { Zotero.debug(newDoc.title); var abs = Zotero.Utilities.trimInternal(newDoc.evaluate('//div[contains(@class, "aps-abstractbox")]/p', newDoc, null, XPathResult.ANY_TYPE, null).iterateNext().textContent); var urlRIS = newDoc.location.href; // so far several more or less identical url possible // one is with "abstract" other with "searchabstract" urlRIS = urlRIS.replace(/(searchabstract|abstract)/,"export"); var post = "type=ris"; var snapurl = newDoc.location.href; var pdfurl = snapurl.replace(/(searchabstract|abstract)/, "pdf"); Zotero.Utilities.HTTP.doPost(urlRIS, post, function(text) { // load translator for RIS var translator = Zotero.loadTranslator("import"); translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7"); translator.setString(text); translator.setHandler("itemDone", function(obj, item) { if (item.itemID) { item.DOI = item.itemID; } item.attachments = [ {url:snapurl, title:"PROLA Snapshot", mimeType:"text/html"}, {url:pdfurl, title:"PROLA Full Text PDF", mimeType:"application/pdf"} ]; item.abstractNote = abs; item.complete(); }); translator.translate(); }, null, 'latin1'); }, function() {Zotero.done();}); |
item.abstractNote = abs; | if (abs) item.abstractNote = abs; | Zotero.Utilities.processDocuments(arts, function(newDoc) { Zotero.debug(newDoc.title); var abs = Zotero.Utilities.trimInternal(newDoc.evaluate('//div[contains(@class, "aps-abstractbox")]/p', newDoc, null, XPathResult.ANY_TYPE, null).iterateNext().textContent); var urlRIS = newDoc.location.href; // so far several more or less identical url possible // one is with "abstract" other with "searchabstract" urlRIS = urlRIS.replace(/(searchabstract|abstract)/,"export"); var post = "type=ris"; var snapurl = newDoc.location.href; var pdfurl = snapurl.replace(/(searchabstract|abstract)/, "pdf"); Zotero.Utilities.HTTP.doPost(urlRIS, post, function(text) { // load translator for RIS var translator = Zotero.loadTranslator("import"); translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7"); translator.setString(text); translator.setHandler("itemDone", function(obj, item) { if (item.itemID) { item.DOI = item.itemID; } item.attachments = [ {url:snapurl, title:"PROLA Snapshot", mimeType:"text/html"}, {url:pdfurl, title:"PROLA Full Text PDF", mimeType:"application/pdf"} ]; item.abstractNote = abs; item.complete(); }); translator.translate(); }, null, 'latin1'); }, function() {Zotero.done();}); |
for (var i = 0; i < countryId.length; i++) { | var VM = (function($){ var undefined, /** * Configuration Class */ VMConfig = window.VMConfig = (function(){ props = { //CSS selector for dependent combos dependentSelector: 'select[class*=dependent]', //Regular Expr to parse parent list dependentExpr: /dependent\[(.*)\]/i, baseUrl: '' }; return { get: function(name){ if( name.constructor == String && props[name] !== undefined ){ return props[name]; } return false; }, set: function(items, value){ if( items.constructor == String && props[items] !== undefined ){ props[items] = value; return props[items]; } else if(items.constructor === Object){ for(var i in items){ props[i] = items[i]; } } return; } }; })(), /** * Cache namespace. Useful for temporal data * * @author jseros * */ VMCache = window.VMCache = (function(){ var slots = {}; return { get: function(name){ if( name.constructor == String && slots[name] !== undefined ){ return slots[name]; } return false; }, set: function(name, value){ if( name.constructor == String ){ slots[name] = value; return slots[name]; } return; }, add: function(name, values, index){ if( name.constructor == String ){ if( !slots[name] ){ slots[name] = {}; } if(index !== undefined){ if(!slots[name][index]){ return slots[name][index] = VM.merge({}, values); } else{ return slots[name][index] = VM.merge(slots[name][index], values); } } } return this.set(name, VM.merge({}, values)); } } })(); return { merge: function(destin, source){ for(var i in source){ destin[i] = source[i]; } return destin; }, inArray: function(obj, item){ for(var i = 0, n = obj.length; i < n; i++){ if(obj[i] === item){ return i; } } }, /** * Parse country-state dependent combos * The Select Element must have class="dependent[parent_id]" * * TODO: Performance issues * * @author jseros */ countryStateList: function(){ var populateStates = function(statesCombo, countries){ var statesC = $(statesCombo), statesCache = VMCache.get('states'), statesGroup = [], states2add = ''; statesCombo.$countries = statesCombo.$countries ? statesCombo.$countries : []; for(var i = 0, n = statesCombo.$countries.length; i < n; i++){ if( VM.inArray( countries, statesCombo.$countries[i]) === undefined ){ for( var state in statesCache[ statesCombo.$countries[i] ] ){ statesC.find('[value='+ statesCache[ statesCombo.$countries[i] ][state].state_id +']').remove(); } } } for(var i = 0, n = countries.length; i < n; i++){ if( VM.inArray( statesCombo.$countries, countries[i]) === undefined ){ statesGroup = statesCache[ countries[i] ]; for(var j in statesGroup){ if(statesGroup[j].state_id){ states2add += '<option value="'+ statesGroup[j].state_id +'">'+ statesGroup[j].state_name +'</option>'; } } } } statesCombo.$countries = countries; statesC.append( states2add ).removeAttr('disabled'); }; $( VMConfig.get('dependentSelector') ).each(function(){ var params = VMConfig.get('dependentExpr').exec( this.className ), //parse parent id that = this; this.className = this.className || ''; if( params && params[1]){ $('#'+ params[1]).change(function(){ var countries = $(this).val(), statesCache = VMCache.get('states'), //shortchut to [[this]] and scope solution country = 0, countriesSend = [], cStack = []; for (var i = 0; i < countryId.length; i++) { countries = countries.push ? countries : [countries]; $(that).attr('disabled', 'disabled'); for(var i = 0, n = countries.length; i < n; i++){ country = countries[i]; //use cache solution to speed up the process if( statesCache[country] ){ cStack.push( country ); } else{ countriesSend.push(country); } } if( countriesSend.length ){ $.ajax({ url: VMConfig.get('countryStateURL') + countriesSend.toString(), dataType: 'json', success: function(states){ for(var country in states){ cStack.push( country ); VMCache.add('states', states[country], country); } populateStates( that, cStack ); return true; } }); } else{ populateStates( that, cStack ); } }); } }); return this; }, add: function(props){ if(props.constructor === Object){ for(var i in props){ this[i] = props[i]; } } return this; } }; })(jQuery); |
|
tool = $.tools.mask = { | tool = $.tools.expose = { | (function($) { // static constructs $.tools = $.tools || {version: '@VERSION'}; var tool; tool = $.tools.mask = { conf: { maskId: 'exposeMask', loadSpeed: 'slow', closeSpeed: 'fast', closeOnClick: true, closeOnEsc: true, // css settings zIndex: 9998, opacity: 0.8, startOpacity: 0, color: '#fff', // callbacks onLoad: null, onClose: null } }; /* one of the greatest headaches in the tool. finally made it */ function viewport() { // the horror case if ($.browser.msie) { // if there are no scrollbars then use window.height var d = $(document).height(), w = $(window).height(); return [ window.innerWidth || // ie7+ document.documentElement.clientWidth || // ie6 document.body.clientWidth, // ie6 quirks mode d - w < 20 ? w : d ]; } // other well behaving browsers return [$(window).width(), $(document).height()]; } function call(fn) { if (fn) { return fn.call($.mask); } } var mask, exposed, loaded, config, overlayIndex; $.mask = { load: function(conf, els) { // already loaded ? if (loaded) { return this; } // configuration if (typeof conf == 'string') { conf = {color: conf}; } // use latest config conf = conf || config; config = conf = $.extend($.extend({}, tool.conf), conf); // get the mask mask = $("#" + conf.maskId); // or create it if (!mask.length) { mask = $('<div/>').attr("id", conf.maskId); $("body").append(mask); } // set position and dimensions var size = viewport(); mask.css({ position:'absolute', top: 0, left: 0, width: size[0], height: size[1], display: 'none', opacity: conf.startOpacity, zIndex: conf.zIndex }); // background color var bg = mask.css("backgroundColor"); if (!bg || bg == 'transparent' || bg == 'rgba(0, 0, 0, 0)') { mask.css("backgroundColor", conf.color); } // onBeforeLoad if (call(conf.onBeforeLoad) === false) { return this; } // esc button if (conf.closeOnEsc) { $(document).bind("keydown.mask", function(e) { if (e.keyCode == 27) { $.mask.close(e); } }); } // mask click closes if (conf.closeOnClick) { mask.bind("click.mask", function(e) { $.mask.close(e); }); } // resize mask when window is resized $(window).bind("resize.mask", function() { $.mask.fit(); }); // exposed elements if (els && els.length) { overlayIndex = els.eq(0).css("zIndex"); // make sure element is positioned absolutely or relatively $.each(els, function() { var el = $(this); if (!/relative|absolute|fixed/i.test(el.css("position"))) { el.css("position", "relative"); } }); // make elements sit on top of the mask exposed = els.css({ zIndex: Math.max(conf.zIndex + 1, overlayIndex == 'auto' ? 0 : overlayIndex)}); } // reveal mask mask.css({display: 'block'}).fadeTo(conf.loadSpeed, conf.opacity, function() { $.mask.fit(); call(conf.onLoad); }); loaded = true; return this; }, close: function() { if (loaded) { // onBeforeClose if (call(config.onBeforeClose) === false) { return this; } mask.fadeOut(config.closeSpeed, function() { call(config.onClose); if (exposed) { exposed.css({zIndex: overlayIndex}); } }); // unbind various event listeners $(document).unbind("keydown.mask"); mask.unbind("click.mask"); $(window).unbind("resize.mask"); loaded = false; } return this; }, fit: function() { if (loaded) { var size = viewport(); mask.css({width: size[0], height: size[1]}); } }, getMask: function() { return mask; }, isLoaded: function() { return loaded; }, getConf: function() { return config; }, getExposed: function() { return exposed; } }; $.fn.mask = function(conf) { $.mask.load(conf); return this; }; $.fn.expose = function(conf) { $.mask.load(conf, this); return this; };})(jQuery); |
c+=a.px(b,"paddingTop");c+=a.px(b,"paddingBottom");return c};this.getColumn=function(b){var c,f,d,i=a.getElement(t).firstChild.childNodes;f=c=0;for(d=i.length;f<d;f++){var k=i[f];if(a.hasTag(k,"COLGROUP")){f=-1;i=k.childNodes;d=i.length}if(a.hasTag(k,"COL"))if(k.className!="Wt-vrh")if(c==b)return k;else++c}return null};this.adjustCell=function(b,c){var f=c==0;c-=a.pxself(b,"paddingTop");c-=a.pxself(b,"paddingBottom");if(c<=0)c=0;b.style.height=c+"px";if(!(b.style.verticalAlign||b.childNodes.length== 0)){var d=b.childNodes[0];if(c<=0)c=0;if(d.className=="Wt-hcenter"){d.style.height=c+"px";d=d.firstChild.firstChild;if(!a.hasTag(d,"TD"))d=d.firstChild;if(d.style.height!=c+"px")d.style.height=c+"px";d=d.firstChild}if(b.childNodes.length==1)c-=this.marginV(d);if(c<=0)c=0;if(!a.hasTag(d,"TABLE"))if(!f&&d.wtResize){b=d.parentNode.offsetWidth-o.marginH(d);if(o.getColumn(col).style.width!=""){d.style.position="absolute";d.style.width=b+"px"}d.wtResize(d,b,c)}else if(d.style.height!=c+"px"){d.style.height= c+"px";if(d.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(d.firstChild,"TEXTAREA"))d.firstChild.style.height=c-a.pxself(d,"marginBottom")+"px"}}};this.adjustRow=function(b,c){var f=[];if(b.style.height!=c+"px")b.style.height=c+"px";b=b.childNodes;var d,i,k,g;d=0;g=-1;for(i=b.length;d<i;++d){k=b[d];k.className!="Wt-vrh"&&++g;if(k.rowSpan!=1){this.adjustCell(k,0);f.push(k)}else this.adjustCell(k,c)}return f};this.adjust=function(){var b=a.getElement(t);if(!b)return false;o.initResize&&o.initResize(a, t,h);if(a.isHidden(b))return true;var c=b.firstChild,f=b.parentNode;if(c.style.height!="")c.style.height="";if(!(b.dirty||c.w!=f.clientWidth||c.h!=f.clientHeight))return true;b.dirty=null;var d=a.pxself(f,"height");if(d==0){d=f.clientHeight;d-=a.px(f,"paddingTop");d-=a.px(f,"paddingBottom")}d-=a.px(b,"marginTop");d-=a.px(b,"marginBottom");var i,k;if(f.children){i=0;for(k=f.children.length;i<k;++i){var g=f.children[i];if(g!=b)d-=$(g).outerHeight()}}var p=b=0,l,q;l=i=0;for(k=c.rows.length;i<k;i++){g= c.rows[i];if(g.className=="Wt-hrh")d-=g.offsetHeight;else{p+=h.minheight[l];if(h.stretch[l]<=0)d-=g.offsetHeight;else b+=h.stretch[l];++l}}d=d>p?d:p;p=[];if(b!=0&&d>0){var s=d;l=i=0;for(k=c.rows.length;i<k;i++)if(c.rows[i].className!="Wt-hrh"){g=c.rows[i];if(h.stretch[l]!=0){if(h.stretch[l]!=-1){q=d*h.stretch[l]/b;q=s>q?q:s;q=Math.round(h.minheight[l]>q?h.minheight[l]:q);s-=q}else q=g.offsetHeight;a.addAll(p,this.adjustRow(g,q))}++l}}i=0;for(k=p.length;i<k;++i){g=p[i];this.adjustCell(g,g.offsetHeight)}c.w= f.clientWidth;c.h=f.clientHeight;if(c.style.tableLayout!="fixed")return true;b=0;l=c.childNodes;f=0;for(d=l.length;f<d;f++){p=l[f];var y,A,z;if(a.hasTag(p,"COLGROUP")){f=-1;l=p.childNodes;d=l.length}if(a.hasTag(p,"COL")){if(a.pctself(p,"width")==0){i=s=0;for(k=c.rows.length;i<k;i++){g=c.rows[i];q=g.childNodes;A=y=0;for(z=q.length;A<z;A++){g=q[A];if(g.colSpan==1&&y==b&&g.childNodes.length==1){g=g.firstChild;g=g.offsetWidth+o.marginH(g);s=Math.max(s,g);break}y+=g.colSpan;if(y>b)break}}if(s>0&&a.pxself(p, "width")!=s)p.style.width=s+"px"}++b}}return true};this.contains=function(b){var c=a.getElement(t);b=a.getElement(b.getId());return a.contains(c,b)};this.adjust()}); | c+=a.px(b,"paddingTop");c+=a.px(b,"paddingBottom");return c};this.getColumn=function(b){var c,f,i,d=a.getElement(t).firstChild.childNodes;f=c=0;for(i=d.length;f<i;f++){var k=d[f];if(a.hasTag(k,"COLGROUP")){f=-1;d=k.childNodes;i=d.length}if(a.hasTag(k,"COL"))if(k.className!="Wt-vrh")if(c==b)return k;else++c}return null};this.adjustCell=function(b,c,f){var i=c==0;c-=a.pxself(b,"paddingTop");c-=a.pxself(b,"paddingBottom");if(c<=0)c=0;b.style.height=c+"px";if(!(b.style.verticalAlign||b.childNodes.length== 0)){var d=b.childNodes[0];if(c<=0)c=0;if(d.className=="Wt-hcenter"){d.style.height=c+"px";d=d.firstChild.firstChild;if(!a.hasTag(d,"TD"))d=d.firstChild;if(d.style.height!=c+"px")d.style.height=c+"px";d=d.firstChild}if(b.childNodes.length==1)c-=this.marginV(d);if(c<=0)c=0;if(!a.hasTag(d,"TABLE"))if(!i&&d.wtResize){b=d.parentNode.offsetWidth-o.marginH(d);if(f!=-1&&o.getColumn(f).style.width!=""){d.style.position="absolute";d.style.width=b+"px"}d.wtResize(d,b,c)}else if(d.style.height!=c+"px"){d.style.height= c+"px";if(d.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(d.firstChild,"TEXTAREA"))d.firstChild.style.height=c-a.pxself(d,"marginBottom")+"px"}}};this.adjustRow=function(b,c){var f=[];if(b.style.height!=c+"px")b.style.height=c+"px";b=b.childNodes;var i,d,k,g;i=0;g=-1;for(d=b.length;i<d;++i){k=b[i];k.className!="Wt-vrh"&&++g;if(k.rowSpan!=1){this.adjustCell(k,0,-1);f.push(k)}else this.adjustCell(k,c,-1)}return f};this.adjust=function(){var b=a.getElement(t);if(!b)return false;o.initResize&&o.initResize(a, t,h);if(a.isHidden(b))return true;var c=b.firstChild,f=b.parentNode;if(c.style.height!="")c.style.height="";if(!(b.dirty||c.w!=f.clientWidth||c.h!=f.clientHeight))return true;b.dirty=null;var i=a.pxself(f,"height");if(i==0){i=f.clientHeight;i-=a.px(f,"paddingTop");i-=a.px(f,"paddingBottom")}i-=a.px(b,"marginTop");i-=a.px(b,"marginBottom");var d,k;if(f.children){d=0;for(k=f.children.length;d<k;++d){var g=f.children[d];if(g!=b)i-=$(g).outerHeight()}}var p=b=0,l,s;l=d=0;for(k=c.rows.length;d<k;d++){g= c.rows[d];if(g.className=="Wt-hrh")i-=g.offsetHeight;else{p+=h.minheight[l];if(h.stretch[l]<=0)i-=g.offsetHeight;else b+=h.stretch[l];++l}}i=i>p?i:p;p=[];if(b!=0&&i>0){s=i;var q;l=d=0;for(k=c.rows.length;d<k;d++)if(c.rows[d].className!="Wt-hrh"){g=c.rows[d];if(h.stretch[l]!=0){if(h.stretch[l]!=-1){q=i*h.stretch[l]/b;q=s>q?q:s;q=Math.round(h.minheight[l]>q?h.minheight[l]:q);s-=q}else q=g.offsetHeight;a.addAll(p,this.adjustRow(g,q))}++l}}d=0;for(k=p.length;d<k;++d){g=p[d];this.adjustCell(g,g.offsetHeight, v)}c.w=f.clientWidth;c.h=f.clientHeight;if(c.style.tableLayout!="fixed")return true;b=0;l=c.childNodes;f=0;for(i=l.length;f<i;f++){var v=l[f],A,z;if(a.hasTag(v,"COLGROUP")){f=-1;l=v.childNodes;i=l.length}if(a.hasTag(v,"COL")){if(a.pctself(v,"width")==0){d=p=0;for(k=c.rows.length;d<k;d++){g=c.rows[d];s=g.childNodes;A=q=0;for(z=s.length;A<z;A++){g=s[A];if(g.colSpan==1&&q==b&&g.childNodes.length==1){g=g.firstChild;g=g.offsetWidth+o.marginH(g);p=Math.max(p,g);break}q+=g.colSpan;if(q>b)break}}if(p>0&& a.pxself(v,"width")!=p)v.style.width=p+"px"}++b}}return true};this.contains=function(b){var c=a.getElement(t);b=a.getElement(b.getId());return a.contains(c,b)};this.adjust()}); | WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,t,h){var o=this;this.getId=function(){return t};this.WT=a;this.marginH=function(b){var c=b.parentNode,f=a.px(b,"marginLeft");f+=a.px(b,"marginRight");f+=a.px(b,"borderLeftWidth");f+=a.px(b,"borderRightWidth");f+=a.px(b,"paddingLeft");f+=a.px(b,"paddingRight");f+=a.pxself(c,"paddingLeft");f+=a.pxself(c,"paddingRight");return f};this.marginV=function(b){var c=a.px(b,"marginTop");c+=a.px(b,"marginBottom");c+=a.px(b,"borderTopWidth");c+=a.px(b,"borderBottomWidth");c+=a.px(b,"paddingTop");c+=a.px(b,"paddingBottom");return c};this.getColumn=function(b){var c,f,d,i=a.getElement(t).firstChild.childNodes;f=c=0;for(d=i.length;f<d;f++){var k=i[f];if(a.hasTag(k,"COLGROUP")){f=-1;i=k.childNodes;d=i.length}if(a.hasTag(k,"COL"))if(k.className!="Wt-vrh")if(c==b)return k;else++c}return null};this.adjustCell=function(b,c){var f=c==0;c-=a.pxself(b,"paddingTop");c-=a.pxself(b,"paddingBottom");if(c<=0)c=0;b.style.height=c+"px";if(!(b.style.verticalAlign||b.childNodes.length==0)){var d=b.childNodes[0];if(c<=0)c=0;if(d.className=="Wt-hcenter"){d.style.height=c+"px";d=d.firstChild.firstChild;if(!a.hasTag(d,"TD"))d=d.firstChild;if(d.style.height!=c+"px")d.style.height=c+"px";d=d.firstChild}if(b.childNodes.length==1)c-=this.marginV(d);if(c<=0)c=0;if(!a.hasTag(d,"TABLE"))if(!f&&d.wtResize){b=d.parentNode.offsetWidth-o.marginH(d);if(o.getColumn(col).style.width!=""){d.style.position="absolute";d.style.width=b+"px"}d.wtResize(d,b,c)}else if(d.style.height!=c+"px"){d.style.height=c+"px";if(d.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(d.firstChild,"TEXTAREA"))d.firstChild.style.height=c-a.pxself(d,"marginBottom")+"px"}}};this.adjustRow=function(b,c){var f=[];if(b.style.height!=c+"px")b.style.height=c+"px";b=b.childNodes;var d,i,k,g;d=0;g=-1;for(i=b.length;d<i;++d){k=b[d];k.className!="Wt-vrh"&&++g;if(k.rowSpan!=1){this.adjustCell(k,0);f.push(k)}else this.adjustCell(k,c)}return f};this.adjust=function(){var b=a.getElement(t);if(!b)return false;o.initResize&&o.initResize(a,t,h);if(a.isHidden(b))return true;var c=b.firstChild,f=b.parentNode;if(c.style.height!="")c.style.height="";if(!(b.dirty||c.w!=f.clientWidth||c.h!=f.clientHeight))return true;b.dirty=null;var d=a.pxself(f,"height");if(d==0){d=f.clientHeight;d-=a.px(f,"paddingTop");d-=a.px(f,"paddingBottom")}d-=a.px(b,"marginTop");d-=a.px(b,"marginBottom");var i,k;if(f.children){i=0;for(k=f.children.length;i<k;++i){var g=f.children[i];if(g!=b)d-=$(g).outerHeight()}}var p=b=0,l,q;l=i=0;for(k=c.rows.length;i<k;i++){g=c.rows[i];if(g.className=="Wt-hrh")d-=g.offsetHeight;else{p+=h.minheight[l];if(h.stretch[l]<=0)d-=g.offsetHeight;else b+=h.stretch[l];++l}}d=d>p?d:p;p=[];if(b!=0&&d>0){var s=d;l=i=0;for(k=c.rows.length;i<k;i++)if(c.rows[i].className!="Wt-hrh"){g=c.rows[i];if(h.stretch[l]!=0){if(h.stretch[l]!=-1){q=d*h.stretch[l]/b;q=s>q?q:s;q=Math.round(h.minheight[l]>q?h.minheight[l]:q);s-=q}else q=g.offsetHeight;a.addAll(p,this.adjustRow(g,q))}++l}}i=0;for(k=p.length;i<k;++i){g=p[i];this.adjustCell(g,g.offsetHeight)}c.w=f.clientWidth;c.h=f.clientHeight;if(c.style.tableLayout!="fixed")return true;b=0;l=c.childNodes;f=0;for(d=l.length;f<d;f++){p=l[f];var y,A,z;if(a.hasTag(p,"COLGROUP")){f=-1;l=p.childNodes;d=l.length}if(a.hasTag(p,"COL")){if(a.pctself(p,"width")==0){i=s=0;for(k=c.rows.length;i<k;i++){g=c.rows[i];q=g.childNodes;A=y=0;for(z=q.length;A<z;A++){g=q[A];if(g.colSpan==1&&y==b&&g.childNodes.length==1){g=g.firstChild;g=g.offsetWidth+o.marginH(g);s=Math.max(s,g);break}y+=g.colSpan;if(y>b)break}}if(s>0&&a.pxself(p,"width")!=s)p.style.width=s+"px"}++b}}return true};this.contains=function(b){var c=a.getElement(t);b=a.getElement(b.getId());return a.contains(c,b)};this.adjust()}); |
WT_DECLARE_WT_MEMBER(1,"WTableView",function(n,j,f,p){function q(a){var b=-1,c=false,d=false,k=null;for(a=a.target||a.srcElement;a;){var g=$(a);if(g.hasClass("Wt-tv-contents"))break;else if(g.hasClass("Wt-tv-c")){if(a.getAttribute("drop")==="true")d=true;if(g.hasClass("Wt-selected"))c=true;k=a;a=a.parentNode;b=a.className.split(" ")[0].substring(7)*1;break}a=a.parentNode}return{columnId:b,rowIdx:-1,selected:c,drop:d,el:k}}function r(a){var b,c,d=a.parentNode.childNodes;b=0;for(c=d.length;b<c;++b)if(d[b]== a)return b;return-1}function w(a,b){var c=a.className.split(" ")[0],d=c.substring(7)*1,k=p.firstChild,g=f.firstChild;c=$(g).find("."+c).get(0);var h=a.nextSibling,e=c.nextSibling,l=i.pxself(a,"width")-1+b;k.style.width=g.style.width=i.pxself(k,"width")+b+"px";a.style.width=l+1+"px";for(c.style.width=l+7+"px";h;h=h.nextSibling){h.style.left=i.pxself(h,"left")+b+"px";if(e){e.style.left=i.pxself(e,"left")+b+"px";e=e.nextSibling}}n.emit(j,"columnResized",d,l)}jQuery.data(j,"obj",this);var i=n.WT,s=0, t=0,u=0,v=0;f.onscroll=function(){p.scrollLeft=f.scrollLeft;if(f.scrollTop<u||f.scrollTop>v||f.scrollLeft<s||f.scrollLeft>t)n.emit(j,"scrolled",f.scrollLeft,f.scrollTop,f.clientWidth,f.clientHeight)};this.mouseDown=function(a,b){i.capture(null);a=q(b);j.getAttribute("drag")==="true"&&a.selected&&n._p_.dragStart(j,b)};this.resizeHandleMDown=function(a,b){var c=a.parentNode.parentNode,d=-(i.pxself(c,"width")-1);new i.SizeHandle(i,"h",a.offsetWidth,j.offsetHeight,d,1E4,"Wt-hsh",function(k){w(c,k)},a, j,b,-2,-1)};this.scrolled=function(a,b,c,d){s=a;t=b;u=c;v=d};var m=null;j.handleDragDrop=function(a,b,c,d,k){if(m){m.className=m.classNameOrig;m=null}if(a!="end"){var g=q(c);if(!g.selected&&g.drop)if(a=="drop")n.emit(j,{name:"dropEvent",eventObject:b,event:c},g.rowIdx,g.columnId,d,k);else{b.className="Wt-valid-drop";m=g.el;m.classNameOrig=m.className;m.className+=" Wt-drop-site"}else b.className=""}};j.onkeydown=function(a){var b=a||window.event;if(b.keyCode==9){i.cancelEvent(b);var c=q(b);if(c.el){a= c.el.parentNode;c=r(c.el);var d=r(a),k=a.parentNode.childNodes.length,g=a.childNodes.length;b=b.shiftKey;for(var h=false,e=c,l;;){for(;b?e>=0:e<g;e=b?e-1:e+1)for(l=e==c&&!h?b?d-1:d+1:b?k-1:0;b?l>=0:l<k;l=b?l-1:l+1){if(e==c&&l==d)return;a=a.parentNode.childNodes[l];var o=$(a.childNodes[e]).find(":input");if(o.size()>0){setTimeout(function(){o.focus()},0);return}}e=b?g-1:0;h=true}}}else if(b.keyCode>=37&&b.keyCode<=40){h=b.target||b.srcElement;if(h.nodeName!="select"){c=q(b);if(c.el){a=c.el.parentNode; c=r(c.el);d=r(a);k=a.parentNode.childNodes.length;g=a.childNodes.length;switch(b.keyCode){case 39:if(i.hasTag(h,"INPUT")&&h.type=="text"){e=i.getSelectionRange(h);if(e.start!=h.value.length)return}d++;break;case 38:c--;break;case 37:if(i.hasTag(h,"INPUT")&&h.type=="text"){e=i.getSelectionRange(h);if(e.start!=0)return}d--;break;case 40:c++;break;default:return}i.cancelEvent(b);if(c>-1&&c<g&&d>-1&&d<k){a=a.parentNode.childNodes[d];o=$(a.childNodes[c]).find(":input");o.size()>0&&setTimeout(function(){o.focus()}, 0)}}}}};this.autoJavaScript=function(){if(j.parentNode==null){j=f=p=null;this.autoJavaScript=function(){}}else if(!i.isHidden(j)){var a=j.offsetWidth-i.px(j,"borderLeftWidth")-i.px(j,"borderRightWidth"),b=f.offsetWidth-f.clientWidth;a-=b;if(a>200&&a!=f.tw){f.tw=a;f.style.width=a+b+"px";p.style.width=a+"px"}}}}); | WT_DECLARE_WT_MEMBER(1,"WTableView",function(n,h,f,p){function q(a){var b=-1,c=false,d=false,k=null;for(a=a.target||a.srcElement;a;){var g=$(a);if(g.hasClass("Wt-tv-contents"))break;else if(g.hasClass("Wt-tv-c")){if(a.getAttribute("drop")==="true")d=true;if(g.hasClass("Wt-selected"))c=true;k=a;a=a.parentNode;b=a.className.split(" ")[0].substring(7)*1;break}a=a.parentNode}return{columnId:b,rowIdx:-1,selected:c,drop:d,el:k}}function r(a){var b,c,d=a.parentNode.childNodes;b=0;for(c=d.length;b<c;++b)if(d[b]== a)return b;return-1}function w(a,b){var c=a.className.split(" ")[0],d=c.substring(7)*1,k=p.firstChild,g=f.firstChild;c=$(g).find("."+c).get(0);var j=a.nextSibling,e=c.nextSibling,l=i.pxself(a,"width")-1+b;k.style.width=g.style.width=i.pxself(k,"width")+b+"px";a.style.width=l+1+"px";for(c.style.width=l+7+"px";j;j=j.nextSibling)if(e){e.style.left=i.pxself(e,"left")+b+"px";e=e.nextSibling}n.emit(h,"columnResized",d,l)}jQuery.data(h,"obj",this);var i=n.WT,s=0,t=0,u=0,v=0;f.onscroll=function(){p.scrollLeft= f.scrollLeft;if(f.scrollTop<u||f.scrollTop>v||f.scrollLeft<s||f.scrollLeft>t)n.emit(h,"scrolled",f.scrollLeft,f.scrollTop,f.clientWidth,f.clientHeight)};this.mouseDown=function(a,b){i.capture(null);a=q(b);h.getAttribute("drag")==="true"&&a.selected&&n._p_.dragStart(h,b)};this.resizeHandleMDown=function(a,b){var c=a.parentNode.parentNode,d=-(i.pxself(c,"width")-1);new i.SizeHandle(i,"h",a.offsetWidth,h.offsetHeight,d,1E4,"Wt-hsh",function(k){w(c,k)},a,h,b,-2,-1)};this.scrolled=function(a,b,c,d){s= a;t=b;u=c;v=d};var m=null;h.handleDragDrop=function(a,b,c,d,k){if(m){m.className=m.classNameOrig;m=null}if(a!="end"){var g=q(c);if(!g.selected&&g.drop)if(a=="drop")n.emit(h,{name:"dropEvent",eventObject:b,event:c},g.rowIdx,g.columnId,d,k);else{b.className="Wt-valid-drop";m=g.el;m.classNameOrig=m.className;m.className+=" Wt-drop-site"}else b.className=""}};h.onkeydown=function(a){var b=a||window.event;if(b.keyCode==9){i.cancelEvent(b);var c=q(b);if(c.el){a=c.el.parentNode;c=r(c.el);var d=r(a),k=a.parentNode.childNodes.length, g=a.childNodes.length;b=b.shiftKey;for(var j=false,e=c,l;;){for(;b?e>=0:e<g;e=b?e-1:e+1)for(l=e==c&&!j?b?d-1:d+1:b?k-1:0;b?l>=0:l<k;l=b?l-1:l+1){if(e==c&&l==d)return;a=a.parentNode.childNodes[l];var o=$(a.childNodes[e]).find(":input");if(o.size()>0){setTimeout(function(){o.focus()},0);return}}e=b?g-1:0;j=true}}}else if(b.keyCode>=37&&b.keyCode<=40){j=b.target||b.srcElement;if(j.nodeName!="select"){c=q(b);if(c.el){a=c.el.parentNode;c=r(c.el);d=r(a);k=a.parentNode.childNodes.length;g=a.childNodes.length; switch(b.keyCode){case 39:if(i.hasTag(j,"INPUT")&&j.type=="text"){e=i.getSelectionRange(j);if(e.start!=j.value.length)return}d++;break;case 38:c--;break;case 37:if(i.hasTag(j,"INPUT")&&j.type=="text"){e=i.getSelectionRange(j);if(e.start!=0)return}d--;break;case 40:c++;break;default:return}i.cancelEvent(b);if(c>-1&&c<g&&d>-1&&d<k){a=a.parentNode.childNodes[d];o=$(a.childNodes[c]).find(":input");o.size()>0&&setTimeout(function(){o.focus()},0)}}}}};this.autoJavaScript=function(){if(h.parentNode==null){h= f=p=null;this.autoJavaScript=function(){}}else if(!i.isHidden(h)){var a=h.offsetWidth-i.px(h,"borderLeftWidth")-i.px(h,"borderRightWidth"),b=f.offsetWidth-f.clientWidth;a-=b;if(a>200&&a!=f.tw){f.tw=a;f.style.width=a+b+"px";p.style.width=a+"px"}}}}); | WT_DECLARE_WT_MEMBER(1,"WTableView",function(n,j,f,p){function q(a){var b=-1,c=false,d=false,k=null;for(a=a.target||a.srcElement;a;){var g=$(a);if(g.hasClass("Wt-tv-contents"))break;else if(g.hasClass("Wt-tv-c")){if(a.getAttribute("drop")==="true")d=true;if(g.hasClass("Wt-selected"))c=true;k=a;a=a.parentNode;b=a.className.split(" ")[0].substring(7)*1;break}a=a.parentNode}return{columnId:b,rowIdx:-1,selected:c,drop:d,el:k}}function r(a){var b,c,d=a.parentNode.childNodes;b=0;for(c=d.length;b<c;++b)if(d[b]==a)return b;return-1}function w(a,b){var c=a.className.split(" ")[0],d=c.substring(7)*1,k=p.firstChild,g=f.firstChild;c=$(g).find("."+c).get(0);var h=a.nextSibling,e=c.nextSibling,l=i.pxself(a,"width")-1+b;k.style.width=g.style.width=i.pxself(k,"width")+b+"px";a.style.width=l+1+"px";for(c.style.width=l+7+"px";h;h=h.nextSibling){h.style.left=i.pxself(h,"left")+b+"px";if(e){e.style.left=i.pxself(e,"left")+b+"px";e=e.nextSibling}}n.emit(j,"columnResized",d,l)}jQuery.data(j,"obj",this);var i=n.WT,s=0,t=0,u=0,v=0;f.onscroll=function(){p.scrollLeft=f.scrollLeft;if(f.scrollTop<u||f.scrollTop>v||f.scrollLeft<s||f.scrollLeft>t)n.emit(j,"scrolled",f.scrollLeft,f.scrollTop,f.clientWidth,f.clientHeight)};this.mouseDown=function(a,b){i.capture(null);a=q(b);j.getAttribute("drag")==="true"&&a.selected&&n._p_.dragStart(j,b)};this.resizeHandleMDown=function(a,b){var c=a.parentNode.parentNode,d=-(i.pxself(c,"width")-1);new i.SizeHandle(i,"h",a.offsetWidth,j.offsetHeight,d,1E4,"Wt-hsh",function(k){w(c,k)},a,j,b,-2,-1)};this.scrolled=function(a,b,c,d){s=a;t=b;u=c;v=d};var m=null;j.handleDragDrop=function(a,b,c,d,k){if(m){m.className=m.classNameOrig;m=null}if(a!="end"){var g=q(c);if(!g.selected&&g.drop)if(a=="drop")n.emit(j,{name:"dropEvent",eventObject:b,event:c},g.rowIdx,g.columnId,d,k);else{b.className="Wt-valid-drop";m=g.el;m.classNameOrig=m.className;m.className+=" Wt-drop-site"}else b.className=""}};j.onkeydown=function(a){var b=a||window.event;if(b.keyCode==9){i.cancelEvent(b);var c=q(b);if(c.el){a=c.el.parentNode;c=r(c.el);var d=r(a),k=a.parentNode.childNodes.length,g=a.childNodes.length;b=b.shiftKey;for(var h=false,e=c,l;;){for(;b?e>=0:e<g;e=b?e-1:e+1)for(l=e==c&&!h?b?d-1:d+1:b?k-1:0;b?l>=0:l<k;l=b?l-1:l+1){if(e==c&&l==d)return;a=a.parentNode.childNodes[l];var o=$(a.childNodes[e]).find(":input");if(o.size()>0){setTimeout(function(){o.focus()},0);return}}e=b?g-1:0;h=true}}}else if(b.keyCode>=37&&b.keyCode<=40){h=b.target||b.srcElement;if(h.nodeName!="select"){c=q(b);if(c.el){a=c.el.parentNode;c=r(c.el);d=r(a);k=a.parentNode.childNodes.length;g=a.childNodes.length;switch(b.keyCode){case 39:if(i.hasTag(h,"INPUT")&&h.type=="text"){e=i.getSelectionRange(h);if(e.start!=h.value.length)return}d++;break;case 38:c--;break;case 37:if(i.hasTag(h,"INPUT")&&h.type=="text"){e=i.getSelectionRange(h);if(e.start!=0)return}d--;break;case 40:c++;break;default:return}i.cancelEvent(b);if(c>-1&&c<g&&d>-1&&d<k){a=a.parentNode.childNodes[d];o=$(a.childNodes[c]).find(":input");o.size()>0&&setTimeout(function(){o.focus()},0)}}}}};this.autoJavaScript=function(){if(j.parentNode==null){j=f=p=null;this.autoJavaScript=function(){}}else if(!i.isHidden(j)){var a=j.offsetWidth-i.px(j,"borderLeftWidth")-i.px(j,"borderRightWidth"),b=f.offsetWidth-f.clientWidth;a-=b;if(a>200&&a!=f.tw){f.tw=a;f.style.width=a+b+"px";p.style.width=a+"px"}}}}); |
forward, | (function($) { // static constructs $.tools = $.tools || {version: '@VERSION'}; $.tools.scrollable = { conf: { activeClass: 'active', circular: false, clonedClass: 'cloned', disabledClass: 'disabled', easing: 'swing', initialIndex: 0, item: null, items: '.items', keyboard: true, mousewheel: false, next: '.next', prev: '.prev', speed: 400, vertical: false, wheelSpeed: 0 } }; // get hidden element's width or height even though it's hidden function dim(el, key) { var v = parseInt(el.css(key), 10); if (v) { return v; } var s = el[0].currentStyle; return s && s.width && parseInt(s.width, 10); } function find(root, query) { var el = $(query); return el.length < 2 ? el : root.parent().find(query); } var current; // constructor function Scrollable(root, conf) { // current instance var self = this, fire = root.add(self), itemWrap = root.children(), index = 0, forward, vertical = conf.vertical; if (!current) { current = self; } if (itemWrap.length > 1) { itemWrap = $(conf.items, root); } // methods $.extend(self, { getConf: function() { return conf; }, getIndex: function() { return index; }, getSize: function() { return self.getItems().size(); }, getNaviButtons: function() { return prev.add(next); }, getRoot: function() { return root; }, getItemWrap: function() { return itemWrap; }, getItems: function() { return itemWrap.children(conf.item).not("." + conf.clonedClass); }, move: function(offset, time) { return self.seekTo(index + offset, time); }, next: function(time) { return self.move(1, time); }, prev: function(time) { return self.move(-1, time); }, begin: function(time) { return self.seekTo(0, time); }, end: function(time) { return self.seekTo(self.getSize() -1, time); }, focus: function() { current = self; return self; }, addItem: function(item) { item = $(item); if (!conf.circular) { itemWrap.append(item); } else { $(".cloned:last").before(item); $(".cloned:first").replaceWith(item.clone().addClass(conf.clonedClass)); } fire.trigger("onAddItem", [item]); return self; }, /* all seeking functions depend on this */ seekTo: function(i, time, fn) { // check that index is sane if (!conf.circular && i < 0 || i > self.getSize()) { return self; } var item = i; if (i.jquery) { i = self.getItems().index(i); } else { item = self.getItems().eq(i); } // onBeforeSeek var e = $.Event("onBeforeSeek"); if (!fn) { fire.trigger(e, [i, time]); if (e.isDefaultPrevented() || !item.length) { return self; } } var props = vertical ? {top: -item.position().top} : {left: -item.position().left}; itemWrap.animate(props, time, conf.easing, fn || function() { fire.trigger("onSeek", [i]); }); current = self; index = i; return self; } }); // callbacks $.each(['onBeforeSeek', 'onSeek', 'onAddItem'], function(i, name) { // configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); // circular loop if (conf.circular) { var cloned1 = self.getItems().slice(-1).clone().prependTo(itemWrap), cloned2 = self.getItems().eq(1).clone().appendTo(itemWrap); cloned1.add(cloned2).addClass(conf.clonedClass); self.onBeforeSeek(function(e, i, time) { if (e.isDefaultPrevented()) { return; } /* 1. animate to the clone without event triggering 2. seek to correct position with 0 speed */ if (i == -1) { self.seekTo(cloned1, time, function() { self.end(0); }); return e.preventDefault(); } else if (i == self.getSize()) { self.seekTo(cloned2, time, function() { self.begin(0); }); } }); // seek over the cloned item self.seekTo(0, 0); } // next/prev buttons var prev = find(root, conf.prev).click(function() { self.prev(); }), next = find(root, conf.next).click(function() { self.next(); }); if (!conf.circular && self.getSize() > 1) { self.onBeforeSeek(function(e, i) { prev.toggleClass(conf.disabledClass, i <= 0); next.toggleClass(conf.disabledClass, i >= self.getSize() -1); }); } // mousewheel support if (conf.mousewheel && $.fn.mousewheel) { root.mousewheel(function(e, delta) { if (conf.mousewheel) { self.move(delta < 0 ? 1 : -1, conf.wheelSpeed || 50); return false; } }); } if (conf.keyboard) { $(document).bind("keydown.scrollable", function(evt) { // skip certain conditions if (!conf.keyboard || evt.altKey || evt.ctrlKey || $(evt.target).is(":input")) { return; } // does this instance have focus? if (conf.keyboard != 'static' && current != self) { return; } var key = evt.keyCode; if (vertical && (key == 38 || key == 40)) { self.move(key == 38 ? -1 : 1); return evt.preventDefault(); } if (!vertical && (key == 37 || key == 39)) { self.move(key == 37 ? -1 : 1); return evt.preventDefault(); } }); } // initial index $(self).trigger("onBeforeSeek", [conf.initialIndex]); } // jQuery plugin implementation $.fn.scrollable = function(conf) { // already constructed --> return API var el = this.data("scrollable"); if (el) { return el; } conf = $.extend({}, $.tools.scrollable.conf, conf); this.each(function() { el = new Scrollable($(this), conf); $(this).data("scrollable", el); }); return conf.api ? el: this; }; })(jQuery); |
|
}); current = self; index = i; | }); | (function($) { // static constructs $.tools = $.tools || {version: '@VERSION'}; $.tools.scrollable = { conf: { activeClass: 'active', circular: false, clonedClass: 'cloned', disabledClass: 'disabled', easing: 'swing', initialIndex: 0, item: null, items: '.items', keyboard: true, mousewheel: false, next: '.next', prev: '.prev', speed: 400, vertical: false, wheelSpeed: 0 } }; // get hidden element's width or height even though it's hidden function dim(el, key) { var v = parseInt(el.css(key), 10); if (v) { return v; } var s = el[0].currentStyle; return s && s.width && parseInt(s.width, 10); } function find(root, query) { var el = $(query); return el.length < 2 ? el : root.parent().find(query); } var current; // constructor function Scrollable(root, conf) { // current instance var self = this, fire = root.add(self), itemWrap = root.children(), index = 0, forward, vertical = conf.vertical; if (!current) { current = self; } if (itemWrap.length > 1) { itemWrap = $(conf.items, root); } // methods $.extend(self, { getConf: function() { return conf; }, getIndex: function() { return index; }, getSize: function() { return self.getItems().size(); }, getNaviButtons: function() { return prev.add(next); }, getRoot: function() { return root; }, getItemWrap: function() { return itemWrap; }, getItems: function() { return itemWrap.children(conf.item).not("." + conf.clonedClass); }, move: function(offset, time) { return self.seekTo(index + offset, time); }, next: function(time) { return self.move(1, time); }, prev: function(time) { return self.move(-1, time); }, begin: function(time) { return self.seekTo(0, time); }, end: function(time) { return self.seekTo(self.getSize() -1, time); }, focus: function() { current = self; return self; }, addItem: function(item) { item = $(item); if (!conf.circular) { itemWrap.append(item); } else { $(".cloned:last").before(item); $(".cloned:first").replaceWith(item.clone().addClass(conf.clonedClass)); } fire.trigger("onAddItem", [item]); return self; }, /* all seeking functions depend on this */ seekTo: function(i, time, fn) { // check that index is sane if (!conf.circular && i < 0 || i > self.getSize()) { return self; } var item = i; if (i.jquery) { i = self.getItems().index(i); } else { item = self.getItems().eq(i); } // onBeforeSeek var e = $.Event("onBeforeSeek"); if (!fn) { fire.trigger(e, [i, time]); if (e.isDefaultPrevented() || !item.length) { return self; } } var props = vertical ? {top: -item.position().top} : {left: -item.position().left}; itemWrap.animate(props, time, conf.easing, fn || function() { fire.trigger("onSeek", [i]); }); current = self; index = i; return self; } }); // callbacks $.each(['onBeforeSeek', 'onSeek', 'onAddItem'], function(i, name) { // configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); // circular loop if (conf.circular) { var cloned1 = self.getItems().slice(-1).clone().prependTo(itemWrap), cloned2 = self.getItems().eq(1).clone().appendTo(itemWrap); cloned1.add(cloned2).addClass(conf.clonedClass); self.onBeforeSeek(function(e, i, time) { if (e.isDefaultPrevented()) { return; } /* 1. animate to the clone without event triggering 2. seek to correct position with 0 speed */ if (i == -1) { self.seekTo(cloned1, time, function() { self.end(0); }); return e.preventDefault(); } else if (i == self.getSize()) { self.seekTo(cloned2, time, function() { self.begin(0); }); } }); // seek over the cloned item self.seekTo(0, 0); } // next/prev buttons var prev = find(root, conf.prev).click(function() { self.prev(); }), next = find(root, conf.next).click(function() { self.next(); }); if (!conf.circular && self.getSize() > 1) { self.onBeforeSeek(function(e, i) { prev.toggleClass(conf.disabledClass, i <= 0); next.toggleClass(conf.disabledClass, i >= self.getSize() -1); }); } // mousewheel support if (conf.mousewheel && $.fn.mousewheel) { root.mousewheel(function(e, delta) { if (conf.mousewheel) { self.move(delta < 0 ? 1 : -1, conf.wheelSpeed || 50); return false; } }); } if (conf.keyboard) { $(document).bind("keydown.scrollable", function(evt) { // skip certain conditions if (!conf.keyboard || evt.altKey || evt.ctrlKey || $(evt.target).is(":input")) { return; } // does this instance have focus? if (conf.keyboard != 'static' && current != self) { return; } var key = evt.keyCode; if (vertical && (key == 38 || key == 40)) { self.move(key == 38 ? -1 : 1); return evt.preventDefault(); } if (!vertical && (key == 37 || key == 39)) { self.move(key == 37 ? -1 : 1); return evt.preventDefault(); } }); } // initial index $(self).trigger("onBeforeSeek", [conf.initialIndex]); } // jQuery plugin implementation $.fn.scrollable = function(conf) { // already constructed --> return API var el = this.data("scrollable"); if (el) { return el; } conf = $.extend({}, $.tools.scrollable.conf, conf); this.each(function() { el = new Scrollable($(this), conf); $(this).data("scrollable", el); }); return conf.api ? el: this; }; })(jQuery); |
if (mainOptions.printMode == 'iframe') { if ($.browser.opera || (/chrome/.test(navigator.userAgent.toLowerCase()))) mainOptions.printMode = 'popup'; } | (function($) { $.fn.printElement = function(options) { var mainOptions = $.extend({}, $.fn.printElement.defaults, options); //Remove previously printed iframe if exists $("[id^='printElement_']").remove(); return this.each(function() { //Support Metadata Plug-in if available var opts = $.meta ? $.extend({}, mainOptions, $this.data()) : mainOptions; _printElement($(this), opts); }); }; $.fn.printElement.defaults = { printMode: 'iframe', //Usage : iframe / popup pageTitle: '', //Print Page Title overrideElementCSS: [], //array of paths to alternate css files (optimized for print) printBodyOptions: { styleToAdd: 'padding:10px;margin:10px;', //style attributes to add to the body of print document classNameToAdd: '' //css class to add to the body of print document }, leaveOpen: false, // in case of popup, leave the print page open or not iframeElementOptions: { styleToAdd: 'position:absolute;width:0px;height:0px;', //style attributes to add to the iframe element classNameToAdd: '' //css class to add to the iframe element } }; function _printElement(element, opts) { var $elementToPrint = $(element); //Create markup to be printed var html = _getMarkup($elementToPrint, opts); var popupOrIframe = null; var documentToWriteTo = null; if (opts.printMode.toLowerCase() == 'popup') { popupOrIframe = window.open('', 'printElementWindow', 'width=650,height=440,scrollbars=yes'); documentToWriteTo = popupOrIframe.document; } else { var printElementID = "printElement_" + (Math.random() * 99999).toString(); popupOrIframe = $('<iframe />').attr({ style: opts.iframeElementOptions.styleToAdd, id: printElementID, className: opts.iframeElementOptions.classNameToAdd }).appendTo('body')[0].contentWindow; documentToWriteTo = popupOrIframe.document; } window.focus(); documentToWriteTo.open(); documentToWriteTo.write(html); documentToWriteTo.close(); popupOrIframe.focus(); }; function _getMarkup(element, opts) { var $elementToPrint = $(element); var html = new Array(); html.push('<html><head><title>' + opts.pageTitle + '</title>'); if (opts.overrideElementCSS && opts.overrideElementCSS.length > 0) { for (var x = 0; x < opts.overrideElementCSS.length; x++) { html.push('<link type="text/css" rel="stylesheet" href="' + opts.overrideElementCSS[x] + '" >'); } } else { $(document).find("link ") .filter(function() { return $(this).attr("rel").toLowerCase() == "stylesheet"; }) .each(function() { html.push('<link type="text/css" rel="stylesheet" href="' + $(this).attr("href") + '" >'); }); } html.push('</head><body onload="printPage();" style="' + opts.printBodyOptions.styleToAdd + '" class="' + opts.printBodyOptions.classNameToAdd + '">'); html.push('<div class="' + $elementToPrint.attr("class") + '">' + $elementToPrint.html() + '</div>'); html.push('<script type="text/javascript">function printPage() { focus();print();' + (opts.leaveOpen ? '' : 'close();') + '}</script></body></html>'); return html.join(''); };})(jQuery); |
|
overrideElementCSS: [], printBodyOptions: { | overrideElementCSS: null, printBodyOptions: { | (function($) { $.fn.printElement = function(options) { var mainOptions = $.extend({}, $.fn.printElement.defaults, options); //Remove previously printed iframe if exists $("[id^='printElement_']").remove(); return this.each(function() { //Support Metadata Plug-in if available var opts = $.meta ? $.extend({}, mainOptions, $this.data()) : mainOptions; _printElement($(this), opts); }); }; $.fn.printElement.defaults = { printMode: 'iframe', //Usage : iframe / popup pageTitle: '', //Print Page Title overrideElementCSS: [], //array of paths to alternate css files (optimized for print) printBodyOptions: { styleToAdd: 'padding:10px;margin:10px;', //style attributes to add to the body of print document classNameToAdd: '' //css class to add to the body of print document }, leaveOpen: false, // in case of popup, leave the print page open or not iframeElementOptions: { styleToAdd: 'position:absolute;width:0px;height:0px;', //style attributes to add to the iframe element classNameToAdd: '' //css class to add to the iframe element } }; function _printElement(element, opts) { var $elementToPrint = $(element); //Create markup to be printed var html = _getMarkup($elementToPrint, opts); var popupOrIframe = null; var documentToWriteTo = null; if (opts.printMode.toLowerCase() == 'popup') { popupOrIframe = window.open('', 'printElementWindow', 'width=650,height=440,scrollbars=yes'); documentToWriteTo = popupOrIframe.document; } else { var printElementID = "printElement_" + (Math.random() * 99999).toString(); popupOrIframe = $('<iframe />').attr({ style: opts.iframeElementOptions.styleToAdd, id: printElementID, className: opts.iframeElementOptions.classNameToAdd }).appendTo('body')[0].contentWindow; documentToWriteTo = popupOrIframe.document; } window.focus(); documentToWriteTo.open(); documentToWriteTo.write(html); documentToWriteTo.close(); popupOrIframe.focus(); }; function _getMarkup(element, opts) { var $elementToPrint = $(element); var html = new Array(); html.push('<html><head><title>' + opts.pageTitle + '</title>'); if (opts.overrideElementCSS && opts.overrideElementCSS.length > 0) { for (var x = 0; x < opts.overrideElementCSS.length; x++) { html.push('<link type="text/css" rel="stylesheet" href="' + opts.overrideElementCSS[x] + '" >'); } } else { $(document).find("link ") .filter(function() { return $(this).attr("rel").toLowerCase() == "stylesheet"; }) .each(function() { html.push('<link type="text/css" rel="stylesheet" href="' + $(this).attr("href") + '" >'); }); } html.push('</head><body onload="printPage();" style="' + opts.printBodyOptions.styleToAdd + '" class="' + opts.printBodyOptions.classNameToAdd + '">'); html.push('<div class="' + $elementToPrint.attr("class") + '">' + $elementToPrint.html() + '</div>'); html.push('<script type="text/javascript">function printPage() { focus();print();' + (opts.leaveOpen ? '' : 'close();') + '}</script></body></html>'); return html.join(''); };})(jQuery); |
iframeElementOptions: { styleToAdd: 'position:absolute;width:0px;height:0px;', | iframeElementOptions: { styleToAdd: 'border:none;position:absolute;width:0px;height:0px;bottom:0px;left:0px;', | (function($) { $.fn.printElement = function(options) { var mainOptions = $.extend({}, $.fn.printElement.defaults, options); //Remove previously printed iframe if exists $("[id^='printElement_']").remove(); return this.each(function() { //Support Metadata Plug-in if available var opts = $.meta ? $.extend({}, mainOptions, $this.data()) : mainOptions; _printElement($(this), opts); }); }; $.fn.printElement.defaults = { printMode: 'iframe', //Usage : iframe / popup pageTitle: '', //Print Page Title overrideElementCSS: [], //array of paths to alternate css files (optimized for print) printBodyOptions: { styleToAdd: 'padding:10px;margin:10px;', //style attributes to add to the body of print document classNameToAdd: '' //css class to add to the body of print document }, leaveOpen: false, // in case of popup, leave the print page open or not iframeElementOptions: { styleToAdd: 'position:absolute;width:0px;height:0px;', //style attributes to add to the iframe element classNameToAdd: '' //css class to add to the iframe element } }; function _printElement(element, opts) { var $elementToPrint = $(element); //Create markup to be printed var html = _getMarkup($elementToPrint, opts); var popupOrIframe = null; var documentToWriteTo = null; if (opts.printMode.toLowerCase() == 'popup') { popupOrIframe = window.open('', 'printElementWindow', 'width=650,height=440,scrollbars=yes'); documentToWriteTo = popupOrIframe.document; } else { var printElementID = "printElement_" + (Math.random() * 99999).toString(); popupOrIframe = $('<iframe />').attr({ style: opts.iframeElementOptions.styleToAdd, id: printElementID, className: opts.iframeElementOptions.classNameToAdd }).appendTo('body')[0].contentWindow; documentToWriteTo = popupOrIframe.document; } window.focus(); documentToWriteTo.open(); documentToWriteTo.write(html); documentToWriteTo.close(); popupOrIframe.focus(); }; function _getMarkup(element, opts) { var $elementToPrint = $(element); var html = new Array(); html.push('<html><head><title>' + opts.pageTitle + '</title>'); if (opts.overrideElementCSS && opts.overrideElementCSS.length > 0) { for (var x = 0; x < opts.overrideElementCSS.length; x++) { html.push('<link type="text/css" rel="stylesheet" href="' + opts.overrideElementCSS[x] + '" >'); } } else { $(document).find("link ") .filter(function() { return $(this).attr("rel").toLowerCase() == "stylesheet"; }) .each(function() { html.push('<link type="text/css" rel="stylesheet" href="' + $(this).attr("href") + '" >'); }); } html.push('</head><body onload="printPage();" style="' + opts.printBodyOptions.styleToAdd + '" class="' + opts.printBodyOptions.classNameToAdd + '">'); html.push('<div class="' + $elementToPrint.attr("class") + '">' + $elementToPrint.html() + '</div>'); html.push('<script type="text/javascript">function printPage() { focus();print();' + (opts.leaveOpen ? '' : 'close();') + '}</script></body></html>'); return html.join(''); };})(jQuery); |
function _printElement(element, opts) { var $elementToPrint = $(element); | $.fn.printElement.cssElement = { href: '', media: '' }; function _printElement(element, opts){ | (function($) { $.fn.printElement = function(options) { var mainOptions = $.extend({}, $.fn.printElement.defaults, options); //Remove previously printed iframe if exists $("[id^='printElement_']").remove(); return this.each(function() { //Support Metadata Plug-in if available var opts = $.meta ? $.extend({}, mainOptions, $this.data()) : mainOptions; _printElement($(this), opts); }); }; $.fn.printElement.defaults = { printMode: 'iframe', //Usage : iframe / popup pageTitle: '', //Print Page Title overrideElementCSS: [], //array of paths to alternate css files (optimized for print) printBodyOptions: { styleToAdd: 'padding:10px;margin:10px;', //style attributes to add to the body of print document classNameToAdd: '' //css class to add to the body of print document }, leaveOpen: false, // in case of popup, leave the print page open or not iframeElementOptions: { styleToAdd: 'position:absolute;width:0px;height:0px;', //style attributes to add to the iframe element classNameToAdd: '' //css class to add to the iframe element } }; function _printElement(element, opts) { var $elementToPrint = $(element); //Create markup to be printed var html = _getMarkup($elementToPrint, opts); var popupOrIframe = null; var documentToWriteTo = null; if (opts.printMode.toLowerCase() == 'popup') { popupOrIframe = window.open('', 'printElementWindow', 'width=650,height=440,scrollbars=yes'); documentToWriteTo = popupOrIframe.document; } else { var printElementID = "printElement_" + (Math.random() * 99999).toString(); popupOrIframe = $('<iframe />').attr({ style: opts.iframeElementOptions.styleToAdd, id: printElementID, className: opts.iframeElementOptions.classNameToAdd }).appendTo('body')[0].contentWindow; documentToWriteTo = popupOrIframe.document; } window.focus(); documentToWriteTo.open(); documentToWriteTo.write(html); documentToWriteTo.close(); popupOrIframe.focus(); }; function _getMarkup(element, opts) { var $elementToPrint = $(element); var html = new Array(); html.push('<html><head><title>' + opts.pageTitle + '</title>'); if (opts.overrideElementCSS && opts.overrideElementCSS.length > 0) { for (var x = 0; x < opts.overrideElementCSS.length; x++) { html.push('<link type="text/css" rel="stylesheet" href="' + opts.overrideElementCSS[x] + '" >'); } } else { $(document).find("link ") .filter(function() { return $(this).attr("rel").toLowerCase() == "stylesheet"; }) .each(function() { html.push('<link type="text/css" rel="stylesheet" href="' + $(this).attr("href") + '" >'); }); } html.push('</head><body onload="printPage();" style="' + opts.printBodyOptions.styleToAdd + '" class="' + opts.printBodyOptions.classNameToAdd + '">'); html.push('<div class="' + $elementToPrint.attr("class") + '">' + $elementToPrint.html() + '</div>'); html.push('<script type="text/javascript">function printPage() { focus();print();' + (opts.leaveOpen ? '' : 'close();') + '}</script></body></html>'); return html.join(''); };})(jQuery); |
var html = _getMarkup($elementToPrint, opts); | var html = _getMarkup(element, opts); | (function($) { $.fn.printElement = function(options) { var mainOptions = $.extend({}, $.fn.printElement.defaults, options); //Remove previously printed iframe if exists $("[id^='printElement_']").remove(); return this.each(function() { //Support Metadata Plug-in if available var opts = $.meta ? $.extend({}, mainOptions, $this.data()) : mainOptions; _printElement($(this), opts); }); }; $.fn.printElement.defaults = { printMode: 'iframe', //Usage : iframe / popup pageTitle: '', //Print Page Title overrideElementCSS: [], //array of paths to alternate css files (optimized for print) printBodyOptions: { styleToAdd: 'padding:10px;margin:10px;', //style attributes to add to the body of print document classNameToAdd: '' //css class to add to the body of print document }, leaveOpen: false, // in case of popup, leave the print page open or not iframeElementOptions: { styleToAdd: 'position:absolute;width:0px;height:0px;', //style attributes to add to the iframe element classNameToAdd: '' //css class to add to the iframe element } }; function _printElement(element, opts) { var $elementToPrint = $(element); //Create markup to be printed var html = _getMarkup($elementToPrint, opts); var popupOrIframe = null; var documentToWriteTo = null; if (opts.printMode.toLowerCase() == 'popup') { popupOrIframe = window.open('', 'printElementWindow', 'width=650,height=440,scrollbars=yes'); documentToWriteTo = popupOrIframe.document; } else { var printElementID = "printElement_" + (Math.random() * 99999).toString(); popupOrIframe = $('<iframe />').attr({ style: opts.iframeElementOptions.styleToAdd, id: printElementID, className: opts.iframeElementOptions.classNameToAdd }).appendTo('body')[0].contentWindow; documentToWriteTo = popupOrIframe.document; } window.focus(); documentToWriteTo.open(); documentToWriteTo.write(html); documentToWriteTo.close(); popupOrIframe.focus(); }; function _getMarkup(element, opts) { var $elementToPrint = $(element); var html = new Array(); html.push('<html><head><title>' + opts.pageTitle + '</title>'); if (opts.overrideElementCSS && opts.overrideElementCSS.length > 0) { for (var x = 0; x < opts.overrideElementCSS.length; x++) { html.push('<link type="text/css" rel="stylesheet" href="' + opts.overrideElementCSS[x] + '" >'); } } else { $(document).find("link ") .filter(function() { return $(this).attr("rel").toLowerCase() == "stylesheet"; }) .each(function() { html.push('<link type="text/css" rel="stylesheet" href="' + $(this).attr("href") + '" >'); }); } html.push('</head><body onload="printPage();" style="' + opts.printBodyOptions.styleToAdd + '" class="' + opts.printBodyOptions.classNameToAdd + '">'); html.push('<div class="' + $elementToPrint.attr("class") + '">' + $elementToPrint.html() + '</div>'); html.push('<script type="text/javascript">function printPage() { focus();print();' + (opts.leaveOpen ? '' : 'close();') + '}</script></body></html>'); return html.join(''); };})(jQuery); |
popupOrIframe = window.open('', 'printElementWindow', 'width=650,height=440,scrollbars=yes'); | popupOrIframe = window.open('about:blank', 'printElementWindow', 'width=650,height=440,scrollbars=yes'); | (function($) { $.fn.printElement = function(options) { var mainOptions = $.extend({}, $.fn.printElement.defaults, options); //Remove previously printed iframe if exists $("[id^='printElement_']").remove(); return this.each(function() { //Support Metadata Plug-in if available var opts = $.meta ? $.extend({}, mainOptions, $this.data()) : mainOptions; _printElement($(this), opts); }); }; $.fn.printElement.defaults = { printMode: 'iframe', //Usage : iframe / popup pageTitle: '', //Print Page Title overrideElementCSS: [], //array of paths to alternate css files (optimized for print) printBodyOptions: { styleToAdd: 'padding:10px;margin:10px;', //style attributes to add to the body of print document classNameToAdd: '' //css class to add to the body of print document }, leaveOpen: false, // in case of popup, leave the print page open or not iframeElementOptions: { styleToAdd: 'position:absolute;width:0px;height:0px;', //style attributes to add to the iframe element classNameToAdd: '' //css class to add to the iframe element } }; function _printElement(element, opts) { var $elementToPrint = $(element); //Create markup to be printed var html = _getMarkup($elementToPrint, opts); var popupOrIframe = null; var documentToWriteTo = null; if (opts.printMode.toLowerCase() == 'popup') { popupOrIframe = window.open('', 'printElementWindow', 'width=650,height=440,scrollbars=yes'); documentToWriteTo = popupOrIframe.document; } else { var printElementID = "printElement_" + (Math.random() * 99999).toString(); popupOrIframe = $('<iframe />').attr({ style: opts.iframeElementOptions.styleToAdd, id: printElementID, className: opts.iframeElementOptions.classNameToAdd }).appendTo('body')[0].contentWindow; documentToWriteTo = popupOrIframe.document; } window.focus(); documentToWriteTo.open(); documentToWriteTo.write(html); documentToWriteTo.close(); popupOrIframe.focus(); }; function _getMarkup(element, opts) { var $elementToPrint = $(element); var html = new Array(); html.push('<html><head><title>' + opts.pageTitle + '</title>'); if (opts.overrideElementCSS && opts.overrideElementCSS.length > 0) { for (var x = 0; x < opts.overrideElementCSS.length; x++) { html.push('<link type="text/css" rel="stylesheet" href="' + opts.overrideElementCSS[x] + '" >'); } } else { $(document).find("link ") .filter(function() { return $(this).attr("rel").toLowerCase() == "stylesheet"; }) .each(function() { html.push('<link type="text/css" rel="stylesheet" href="' + $(this).attr("href") + '" >'); }); } html.push('</head><body onload="printPage();" style="' + opts.printBodyOptions.styleToAdd + '" class="' + opts.printBodyOptions.classNameToAdd + '">'); html.push('<div class="' + $elementToPrint.attr("class") + '">' + $elementToPrint.html() + '</div>'); html.push('<script type="text/javascript">function printPage() { focus();print();' + (opts.leaveOpen ? '' : 'close();') + '}</script></body></html>'); return html.join(''); };})(jQuery); |
var printElementID = "printElement_" + (Math.random() * 99999).toString(); popupOrIframe = $('<iframe />').attr({ style: opts.iframeElementOptions.styleToAdd, | var printElementID = "printElement_" + (Math.round(Math.random() * 99999)).toString(); var iframe = document.createElement('IFRAME'); $(iframe).attr({ style: opts.iframeElementOptions.styleToAdd, | (function($) { $.fn.printElement = function(options) { var mainOptions = $.extend({}, $.fn.printElement.defaults, options); //Remove previously printed iframe if exists $("[id^='printElement_']").remove(); return this.each(function() { //Support Metadata Plug-in if available var opts = $.meta ? $.extend({}, mainOptions, $this.data()) : mainOptions; _printElement($(this), opts); }); }; $.fn.printElement.defaults = { printMode: 'iframe', //Usage : iframe / popup pageTitle: '', //Print Page Title overrideElementCSS: [], //array of paths to alternate css files (optimized for print) printBodyOptions: { styleToAdd: 'padding:10px;margin:10px;', //style attributes to add to the body of print document classNameToAdd: '' //css class to add to the body of print document }, leaveOpen: false, // in case of popup, leave the print page open or not iframeElementOptions: { styleToAdd: 'position:absolute;width:0px;height:0px;', //style attributes to add to the iframe element classNameToAdd: '' //css class to add to the iframe element } }; function _printElement(element, opts) { var $elementToPrint = $(element); //Create markup to be printed var html = _getMarkup($elementToPrint, opts); var popupOrIframe = null; var documentToWriteTo = null; if (opts.printMode.toLowerCase() == 'popup') { popupOrIframe = window.open('', 'printElementWindow', 'width=650,height=440,scrollbars=yes'); documentToWriteTo = popupOrIframe.document; } else { var printElementID = "printElement_" + (Math.random() * 99999).toString(); popupOrIframe = $('<iframe />').attr({ style: opts.iframeElementOptions.styleToAdd, id: printElementID, className: opts.iframeElementOptions.classNameToAdd }).appendTo('body')[0].contentWindow; documentToWriteTo = popupOrIframe.document; } window.focus(); documentToWriteTo.open(); documentToWriteTo.write(html); documentToWriteTo.close(); popupOrIframe.focus(); }; function _getMarkup(element, opts) { var $elementToPrint = $(element); var html = new Array(); html.push('<html><head><title>' + opts.pageTitle + '</title>'); if (opts.overrideElementCSS && opts.overrideElementCSS.length > 0) { for (var x = 0; x < opts.overrideElementCSS.length; x++) { html.push('<link type="text/css" rel="stylesheet" href="' + opts.overrideElementCSS[x] + '" >'); } } else { $(document).find("link ") .filter(function() { return $(this).attr("rel").toLowerCase() == "stylesheet"; }) .each(function() { html.push('<link type="text/css" rel="stylesheet" href="' + $(this).attr("href") + '" >'); }); } html.push('</head><body onload="printPage();" style="' + opts.printBodyOptions.styleToAdd + '" class="' + opts.printBodyOptions.classNameToAdd + '">'); html.push('<div class="' + $elementToPrint.attr("class") + '">' + $elementToPrint.html() + '</div>'); html.push('<script type="text/javascript">function printPage() { focus();print();' + (opts.leaveOpen ? '' : 'close();') + '}</script></body></html>'); return html.join(''); };})(jQuery); |
className: opts.iframeElementOptions.classNameToAdd }).appendTo('body')[0].contentWindow; documentToWriteTo = popupOrIframe.document; | className: opts.iframeElementOptions.classNameToAdd, frameBorder: 0, scrolling: 'no', src: 'about:blank' }); document.body.appendChild(iframe); documentToWriteTo = (iframe.contentWindow || iframe.contentDocument); if (documentToWriteTo.document) documentToWriteTo = documentToWriteTo.document; iframe = document.frames ? document.frames[printElementID] : document.getElementById(printElementID); popupOrIframe = iframe.contentWindow || iframe; | (function($) { $.fn.printElement = function(options) { var mainOptions = $.extend({}, $.fn.printElement.defaults, options); //Remove previously printed iframe if exists $("[id^='printElement_']").remove(); return this.each(function() { //Support Metadata Plug-in if available var opts = $.meta ? $.extend({}, mainOptions, $this.data()) : mainOptions; _printElement($(this), opts); }); }; $.fn.printElement.defaults = { printMode: 'iframe', //Usage : iframe / popup pageTitle: '', //Print Page Title overrideElementCSS: [], //array of paths to alternate css files (optimized for print) printBodyOptions: { styleToAdd: 'padding:10px;margin:10px;', //style attributes to add to the body of print document classNameToAdd: '' //css class to add to the body of print document }, leaveOpen: false, // in case of popup, leave the print page open or not iframeElementOptions: { styleToAdd: 'position:absolute;width:0px;height:0px;', //style attributes to add to the iframe element classNameToAdd: '' //css class to add to the iframe element } }; function _printElement(element, opts) { var $elementToPrint = $(element); //Create markup to be printed var html = _getMarkup($elementToPrint, opts); var popupOrIframe = null; var documentToWriteTo = null; if (opts.printMode.toLowerCase() == 'popup') { popupOrIframe = window.open('', 'printElementWindow', 'width=650,height=440,scrollbars=yes'); documentToWriteTo = popupOrIframe.document; } else { var printElementID = "printElement_" + (Math.random() * 99999).toString(); popupOrIframe = $('<iframe />').attr({ style: opts.iframeElementOptions.styleToAdd, id: printElementID, className: opts.iframeElementOptions.classNameToAdd }).appendTo('body')[0].contentWindow; documentToWriteTo = popupOrIframe.document; } window.focus(); documentToWriteTo.open(); documentToWriteTo.write(html); documentToWriteTo.close(); popupOrIframe.focus(); }; function _getMarkup(element, opts) { var $elementToPrint = $(element); var html = new Array(); html.push('<html><head><title>' + opts.pageTitle + '</title>'); if (opts.overrideElementCSS && opts.overrideElementCSS.length > 0) { for (var x = 0; x < opts.overrideElementCSS.length; x++) { html.push('<link type="text/css" rel="stylesheet" href="' + opts.overrideElementCSS[x] + '" >'); } } else { $(document).find("link ") .filter(function() { return $(this).attr("rel").toLowerCase() == "stylesheet"; }) .each(function() { html.push('<link type="text/css" rel="stylesheet" href="' + $(this).attr("href") + '" >'); }); } html.push('</head><body onload="printPage();" style="' + opts.printBodyOptions.styleToAdd + '" class="' + opts.printBodyOptions.classNameToAdd + '">'); html.push('<div class="' + $elementToPrint.attr("class") + '">' + $elementToPrint.html() + '</div>'); html.push('<script type="text/javascript">function printPage() { focus();print();' + (opts.leaveOpen ? '' : 'close();') + '}</script></body></html>'); return html.join(''); };})(jQuery); |
window.focus(); | focus(); | (function($) { $.fn.printElement = function(options) { var mainOptions = $.extend({}, $.fn.printElement.defaults, options); //Remove previously printed iframe if exists $("[id^='printElement_']").remove(); return this.each(function() { //Support Metadata Plug-in if available var opts = $.meta ? $.extend({}, mainOptions, $this.data()) : mainOptions; _printElement($(this), opts); }); }; $.fn.printElement.defaults = { printMode: 'iframe', //Usage : iframe / popup pageTitle: '', //Print Page Title overrideElementCSS: [], //array of paths to alternate css files (optimized for print) printBodyOptions: { styleToAdd: 'padding:10px;margin:10px;', //style attributes to add to the body of print document classNameToAdd: '' //css class to add to the body of print document }, leaveOpen: false, // in case of popup, leave the print page open or not iframeElementOptions: { styleToAdd: 'position:absolute;width:0px;height:0px;', //style attributes to add to the iframe element classNameToAdd: '' //css class to add to the iframe element } }; function _printElement(element, opts) { var $elementToPrint = $(element); //Create markup to be printed var html = _getMarkup($elementToPrint, opts); var popupOrIframe = null; var documentToWriteTo = null; if (opts.printMode.toLowerCase() == 'popup') { popupOrIframe = window.open('', 'printElementWindow', 'width=650,height=440,scrollbars=yes'); documentToWriteTo = popupOrIframe.document; } else { var printElementID = "printElement_" + (Math.random() * 99999).toString(); popupOrIframe = $('<iframe />').attr({ style: opts.iframeElementOptions.styleToAdd, id: printElementID, className: opts.iframeElementOptions.classNameToAdd }).appendTo('body')[0].contentWindow; documentToWriteTo = popupOrIframe.document; } window.focus(); documentToWriteTo.open(); documentToWriteTo.write(html); documentToWriteTo.close(); popupOrIframe.focus(); }; function _getMarkup(element, opts) { var $elementToPrint = $(element); var html = new Array(); html.push('<html><head><title>' + opts.pageTitle + '</title>'); if (opts.overrideElementCSS && opts.overrideElementCSS.length > 0) { for (var x = 0; x < opts.overrideElementCSS.length; x++) { html.push('<link type="text/css" rel="stylesheet" href="' + opts.overrideElementCSS[x] + '" >'); } } else { $(document).find("link ") .filter(function() { return $(this).attr("rel").toLowerCase() == "stylesheet"; }) .each(function() { html.push('<link type="text/css" rel="stylesheet" href="' + $(this).attr("href") + '" >'); }); } html.push('</head><body onload="printPage();" style="' + opts.printBodyOptions.styleToAdd + '" class="' + opts.printBodyOptions.classNameToAdd + '">'); html.push('<div class="' + $elementToPrint.attr("class") + '">' + $elementToPrint.html() + '</div>'); html.push('<script type="text/javascript">function printPage() { focus();print();' + (opts.leaveOpen ? '' : 'close();') + '}</script></body></html>'); return html.join(''); };})(jQuery); |
popupOrIframe.focus(); | _callPrint(popupOrIframe); | (function($) { $.fn.printElement = function(options) { var mainOptions = $.extend({}, $.fn.printElement.defaults, options); //Remove previously printed iframe if exists $("[id^='printElement_']").remove(); return this.each(function() { //Support Metadata Plug-in if available var opts = $.meta ? $.extend({}, mainOptions, $this.data()) : mainOptions; _printElement($(this), opts); }); }; $.fn.printElement.defaults = { printMode: 'iframe', //Usage : iframe / popup pageTitle: '', //Print Page Title overrideElementCSS: [], //array of paths to alternate css files (optimized for print) printBodyOptions: { styleToAdd: 'padding:10px;margin:10px;', //style attributes to add to the body of print document classNameToAdd: '' //css class to add to the body of print document }, leaveOpen: false, // in case of popup, leave the print page open or not iframeElementOptions: { styleToAdd: 'position:absolute;width:0px;height:0px;', //style attributes to add to the iframe element classNameToAdd: '' //css class to add to the iframe element } }; function _printElement(element, opts) { var $elementToPrint = $(element); //Create markup to be printed var html = _getMarkup($elementToPrint, opts); var popupOrIframe = null; var documentToWriteTo = null; if (opts.printMode.toLowerCase() == 'popup') { popupOrIframe = window.open('', 'printElementWindow', 'width=650,height=440,scrollbars=yes'); documentToWriteTo = popupOrIframe.document; } else { var printElementID = "printElement_" + (Math.random() * 99999).toString(); popupOrIframe = $('<iframe />').attr({ style: opts.iframeElementOptions.styleToAdd, id: printElementID, className: opts.iframeElementOptions.classNameToAdd }).appendTo('body')[0].contentWindow; documentToWriteTo = popupOrIframe.document; } window.focus(); documentToWriteTo.open(); documentToWriteTo.write(html); documentToWriteTo.close(); popupOrIframe.focus(); }; function _getMarkup(element, opts) { var $elementToPrint = $(element); var html = new Array(); html.push('<html><head><title>' + opts.pageTitle + '</title>'); if (opts.overrideElementCSS && opts.overrideElementCSS.length > 0) { for (var x = 0; x < opts.overrideElementCSS.length; x++) { html.push('<link type="text/css" rel="stylesheet" href="' + opts.overrideElementCSS[x] + '" >'); } } else { $(document).find("link ") .filter(function() { return $(this).attr("rel").toLowerCase() == "stylesheet"; }) .each(function() { html.push('<link type="text/css" rel="stylesheet" href="' + $(this).attr("href") + '" >'); }); } html.push('</head><body onload="printPage();" style="' + opts.printBodyOptions.styleToAdd + '" class="' + opts.printBodyOptions.classNameToAdd + '">'); html.push('<div class="' + $elementToPrint.attr("class") + '">' + $elementToPrint.html() + '</div>'); html.push('<script type="text/javascript">function printPage() { focus();print();' + (opts.leaveOpen ? '' : 'close();') + '}</script></body></html>'); return html.join(''); };})(jQuery); |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.