// This file was produced by Orbeon Forms 3.7.0beta1.200808260135
/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.5.2
*/
if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=A[C].split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules;if(!I[A]){I[A]={versions:[],builds:[]};}var B=I[A],H=D.version,G=D.build,F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(var C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0};var B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple";}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0];}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){C.air=A[0];}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var A=YAHOO.lang,C=["toString","valueOf"],B={isArray:function(D){if(D){return A.isNumber(D.length)&&A.isFunction(D.splice);}return false;},isBoolean:function(D){return typeof D==="boolean";},isFunction:function(D){return typeof D==="function";},isNull:function(D){return D===null;},isNumber:function(D){return typeof D==="number"&&isFinite(D);},isObject:function(D){return(D&&(typeof D==="object"||A.isFunction(D)))||false;},isString:function(D){return typeof D==="string";},isUndefined:function(D){return typeof D==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(F,E){for(var D=0;D<C.length;D=D+1){var H=C[D],G=E[H];if(A.isFunction(G)&&G!=Object.prototype[H]){F[H]=G;}}}:function(){},extend:function(H,I,G){if(!I||!H){throw new Error("extend failed, please check that "+"all dependencies are included.");}var E=function(){};E.prototype=I.prototype;H.prototype=new E();H.prototype.constructor=H;H.superclass=I.prototype;if(I.prototype.constructor==Object.prototype.constructor){I.prototype.constructor=I;}if(G){for(var D in G){if(A.hasOwnProperty(G,D)){H.prototype[D]=G[D];}}A._IEEnumFix(H.prototype,G);}},augmentObject:function(H,G){if(!G||!H){throw new Error("Absorb failed, verify dependencies.");}var D=arguments,F,I,E=D[2];if(E&&E!==true){for(F=2;F<D.length;F=F+1){H[D[F]]=G[D[F]];}}else{for(I in G){if(E||!(I in H)){H[I]=G[I];}}A._IEEnumFix(H,G);}},augmentProto:function(G,F){if(!F||!G){throw new Error("Augment failed, verify dependencies.");}var D=[G.prototype,F.prototype];for(var E=2;E<arguments.length;E=E+1){D.push(arguments[E]);}A.augmentObject.apply(this,D);},dump:function(D,I){var F,H,K=[],L="{...}",E="f(){...}",J=", ",G=" => ";if(!A.isObject(D)){return D+"";}else{if(D instanceof Date||("nodeType" in D&&"tagName" in D)){return D;}else{if(A.isFunction(D)){return E;}}}I=(A.isNumber(I))?I:3;if(A.isArray(D)){K.push("[");for(F=0,H=D.length;F<H;F=F+1){if(A.isObject(D[F])){K.push((I>0)?A.dump(D[F],I-1):L);}else{K.push(D[F]);}K.push(J);}if(K.length>1){K.pop();}K.push("]");}else{K.push("{");for(F in D){if(A.hasOwnProperty(D,F)){K.push(F+G);if(A.isObject(D[F])){K.push((I>0)?A.dump(D[F],I-1):L);}else{K.push(D[F]);}K.push(J);}}if(K.length>1){K.pop();}K.push("}");}return K.join("");},substitute:function(S,E,L){var I,H,G,O,P,R,N=[],F,J="dump",M=" ",D="{",Q="}";for(;;){I=S.lastIndexOf(D);if(I<0){break;}H=S.indexOf(Q,I);if(I+1>=H){break;}F=S.substring(I+1,H);O=F;R=null;G=O.indexOf(M);if(G>-1){R=O.substring(G+1);O=O.substring(0,G);}P=E[O];if(L){P=L(O,P,R);}if(A.isObject(P)){if(A.isArray(P)){P=A.dump(P,parseInt(R,10));}else{R=R||"";var K=R.indexOf(J);if(K>-1){R=R.substring(4);}if(P.toString===Object.prototype.toString||K>-1){P=A.dump(P,parseInt(R,10));}else{P=P.toString();}}}else{if(!A.isString(P)&&!A.isNumber(P)){P="~-"+N.length+"-~";N[N.length]=F;}}S=S.substring(0,I)+P+S.substring(H+1);}for(I=N.length-1;I>=0;I=I-1){S=S.replace(new RegExp("~-"+I+"-~"),"{"+N[I]+"}","g");}return S;},trim:function(D){try{return D.replace(/^\s+|\s+$/g,"");}catch(E){return D;}},merge:function(){var G={},E=arguments;for(var F=0,D=E.length;F<D;F=F+1){A.augmentObject(G,E[F],true);}return G;},later:function(K,E,L,G,H){K=K||0;E=E||{};var F=L,J=G,I,D;if(A.isString(L)){F=E[L];}if(!F){throw new TypeError("method undefined");}if(!A.isArray(J)){J=[G];}I=function(){F.apply(E,J);};D=(H)?setInterval(I,K):setTimeout(I,K);return{interval:H,cancel:function(){if(this.interval){clearInterval(D);}else{clearTimeout(D);}}};},isValue:function(D){return(A.isObject(D)||A.isString(D)||A.isNumber(D)||A.isBoolean(D));}};A.hasOwnProperty=(Object.prototype.hasOwnProperty)?function(D,E){return D&&D.hasOwnProperty(E);}:function(D,E){return !A.isUndefined(D[E])&&D.constructor.prototype[E]!==D[E];};B.augmentObject(A,B,true);YAHOO.util.Lang=A;A.augment=A.augmentProto;YAHOO.augment=A.augmentProto;YAHOO.extend=A.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.5.2",build:"1076"});
/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.5.2
*/
YAHOO.util.CustomEvent=function(D,B,C,A){this.type=D;this.scope=B||window;this.silent=C;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(B,C,A){if(!B){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(B,C,A);}this.subscribers.push(new YAHOO.util.Subscriber(B,C,A));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true;}}return E;},fire:function(){this.lastError=null;var K=[],E=this.subscribers.length;if(!E&&this.silent){return true;}var I=[].slice.call(arguments,0),G=true,D,J=false;if(!this.silent){}var C=this.subscribers.slice(),A=YAHOO.util.Event.throwErrors;for(D=0;D<E;++D){var M=C[D];if(!M){J=true;}else{if(!this.silent){}var L=M.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var B=null;if(I.length>0){B=I[0];}try{G=M.fn.call(L,B,M.obj);}catch(F){this.lastError=F;if(A){throw F;}}}else{try{G=M.fn.call(L,this.type,I,M.obj);}catch(H){this.lastError=H;if(A){throw H;}}}if(false===G){if(!this.silent){}break;}}}return(G!==false);},unsubscribeAll:function(){for(var A=this.subscribers.length-1;A>-1;A--){this._delete(A);}this.subscribers=[];return A;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers.splice(A,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"scope: "+this.scope;}};YAHOO.util.Subscriber=function(B,C,A){this.fn=B;this.obj=YAHOO.lang.isUndefined(C)?null:C;this.override=A;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}return A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){var K=this;var L=function(){K._tryPreloadAttach();};this._interval=setInterval(L,this.POLL_INTERVAL);}},onAvailable:function(P,M,Q,O,N){var K=(YAHOO.lang.isString(P))?[P]:P;for(var L=0;L<K.length;L=L+1){F.push({id:K[L],fn:M,obj:Q,override:O,checkReady:N});}C=this.POLL_RETRYS;this.startInterval();},onContentReady:function(M,K,N,L){this.onAvailable(M,K,N,L,true);},onDOMReady:function(K,M,L){if(this.DOMReady){setTimeout(function(){var N=window;if(L){if(L===true){N=M;}else{N=L;}}K.call(N,"DOMReady",[],M);},0);}else{this.DOMReadyEvent.subscribe(K,M,L);}},addListener:function(M,K,V,Q,L){if(!V||!V.call){return false;}if(this._isValidCollection(M)){var W=true;for(var R=0,T=M.length;R<T;++R){W=this.on(M[R],K,V,Q,L)&&W;}return W;}else{if(YAHOO.lang.isString(M)){var P=this.getEl(M);if(P){M=P;}else{this.onAvailable(M,function(){YAHOO.util.Event.on(M,K,V,Q,L);});return true;}}}if(!M){return false;}if("unload"==K&&Q!==this){J[J.length]=[M,K,V,Q,L];return true;}var Y=M;if(L){if(L===true){Y=Q;}else{Y=L;}}var N=function(Z){return V.call(Y,YAHOO.util.Event.getEvent(Z,M),Q);};var X=[M,K,V,N,Y,Q,L];var S=I.length;I[S]=X;if(this.useLegacyEvent(M,K)){var O=this.getLegacyIndex(M,K);if(O==-1||M!=G[O][0]){O=G.length;B[M.id+K]=O;G[O]=[M,K,M["on"+K]];E[O]=[];M["on"+K]=function(Z){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(Z),O);};}E[O].push(X);}else{try{this._simpleAdd(M,K,N,false);}catch(U){this.lastError=U;this.removeListener(M,K,V);return false;}}return true;},fireLegacyEvent:function(O,M){var Q=true,K,S,R,T,P;S=E[M].slice();for(var L=0,N=S.length;L<N;++L){R=S[L];if(R&&R[this.WFN]){T=R[this.ADJ_SCOPE];P=R[this.WFN].call(T,O);Q=(Q&&P);}}K=G[M];if(K&&K[2]){K[2](O);}return Q;},getLegacyIndex:function(L,M){var K=this.generateId(L)+M;if(typeof B[K]=="undefined"){return -1;}else{return B[K];}},useLegacyEvent:function(L,M){if(this.webkit&&("click"==M||"dblclick"==M)){var K=parseInt(this.webkit,10);if(!isNaN(K)&&K<418){return true;}}return false;},removeListener:function(L,K,T){var O,R,V;if(typeof L=="string"){L=this.getEl(L);}else{if(this._isValidCollection(L)){var U=true;for(O=L.length-1;O>-1;O--){U=(this.removeListener(L[O],K,T)&&U);}return U;}}if(!T||!T.call){return this.purgeElement(L,false,K);}if("unload"==K){for(O=J.length-1;O>-1;O--){V=J[O];if(V&&V[0]==L&&V[1]==K&&V[2]==T){J.splice(O,1);return true;}}return false;}var P=null;var Q=arguments[3];if("undefined"===typeof Q){Q=this._getCacheIndex(L,K,T);}if(Q>=0){P=I[Q];}if(!L||!P){return false;}if(this.useLegacyEvent(L,K)){var N=this.getLegacyIndex(L,K);var M=E[N];if(M){for(O=0,R=M.length;O<R;++O){V=M[O];if(V&&V[this.EL]==L&&V[this.TYPE]==K&&V[this.FN]==T){M.splice(O,1);break;}}}}else{try{this._simpleRemove(L,K,P[this.WFN],false);}catch(S){this.lastError=S;return false;}}delete I[Q][this.WFN];delete I[Q][this.FN];I.splice(Q,1);return true;},getTarget:function(M,L){var K=M.target||M.srcElement;return this.resolveTextNode(K);},resolveTextNode:function(L){try{if(L&&3==L.nodeType){return L.parentNode;}}catch(K){}return L;},getPageX:function(L){var K=L.pageX;if(!K&&0!==K){K=L.clientX||0;if(this.isIE){K+=this._getScrollLeft();}}return K;},getPageY:function(K){var L=K.pageY;if(!L&&0!==L){L=K.clientY||0;if(this.isIE){L+=this._getScrollTop();}}return L;
},getXY:function(K){return[this.getPageX(K),this.getPageY(K)];},getRelatedTarget:function(L){var K=L.relatedTarget;if(!K){if(L.type=="mouseout"){K=L.toElement;}else{if(L.type=="mouseover"){K=L.fromElement;}}}return this.resolveTextNode(K);},getTime:function(M){if(!M.time){var L=new Date().getTime();try{M.time=L;}catch(K){this.lastError=K;return L;}}return M.time;},stopEvent:function(K){this.stopPropagation(K);this.preventDefault(K);},stopPropagation:function(K){if(K.stopPropagation){K.stopPropagation();}else{K.cancelBubble=true;}},preventDefault:function(K){if(K.preventDefault){K.preventDefault();}else{K.returnValue=false;}},getEvent:function(M,K){var L=M||window.event;if(!L){var N=this.getEvent.caller;while(N){L=N.arguments[0];if(L&&Event==L.constructor){break;}N=N.caller;}}return L;},getCharCode:function(L){var K=L.keyCode||L.charCode||0;if(YAHOO.env.ua.webkit&&(K in D)){K=D[K];}return K;},_getCacheIndex:function(O,P,N){for(var M=0,L=I.length;M<L;M=M+1){var K=I[M];if(K&&K[this.FN]==N&&K[this.EL]==O&&K[this.TYPE]==P){return M;}}return -1;},generateId:function(K){var L=K.id;if(!L){L="yuievtautoid-"+A;++A;K.id=L;}return L;},_isValidCollection:function(L){try{return(L&&typeof L!=="string"&&L.length&&!L.tagName&&!L.alert&&typeof L[0]!=="undefined");}catch(K){return false;}},elCache:{},getEl:function(K){return(typeof K==="string")?document.getElementById(K):K;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(L){if(!H){H=true;var K=YAHOO.util.Event;K._ready();K._tryPreloadAttach();}},_ready:function(L){var K=YAHOO.util.Event;if(!K.DOMReady){K.DOMReady=true;K.DOMReadyEvent.fire();K._simpleRemove(document,"DOMContentLoaded",K._ready);}},_tryPreloadAttach:function(){if(F.length===0){C=0;clearInterval(this._interval);this._interval=null;return ;}if(this.locked){return ;}if(this.isIE){if(!this.DOMReady){this.startInterval();return ;}}this.locked=true;var Q=!H;if(!Q){Q=(C>0&&F.length>0);}var P=[];var R=function(T,U){var S=T;if(U.override){if(U.override===true){S=U.obj;}else{S=U.override;}}U.fn.call(S,U.obj);};var L,K,O,N,M=[];for(L=0,K=F.length;L<K;L=L+1){O=F[L];if(O){N=this.getEl(O.id);if(N){if(O.checkReady){if(H||N.nextSibling||!Q){M.push(O);F[L]=null;}}else{R(N,O);F[L]=null;}}else{P.push(O);}}}for(L=0,K=M.length;L<K;L=L+1){O=M[L];R(this.getEl(O.id),O);}C--;if(Q){for(L=F.length-1;L>-1;L--){O=F[L];if(!O||!O.id){F.splice(L,1);}}this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;},purgeElement:function(O,P,R){var M=(YAHOO.lang.isString(O))?this.getEl(O):O;var Q=this.getListeners(M,R),N,K;if(Q){for(N=Q.length-1;N>-1;N--){var L=Q[N];this.removeListener(M,L.type,L.fn);}}if(P&&M&&M.childNodes){for(N=0,K=M.childNodes.length;N<K;++N){this.purgeElement(M.childNodes[N],P,R);}}},getListeners:function(M,K){var P=[],L;if(!K){L=[I,J];}else{if(K==="unload"){L=[J];}else{L=[I];}}var R=(YAHOO.lang.isString(M))?this.getEl(M):M;for(var O=0;O<L.length;O=O+1){var T=L[O];if(T){for(var Q=0,S=T.length;Q<S;++Q){var N=T[Q];if(N&&N[this.EL]===R&&(!K||K===N[this.TYPE])){P.push({type:N[this.TYPE],fn:N[this.FN],obj:N[this.OBJ],adjust:N[this.OVERRIDE],scope:N[this.ADJ_SCOPE],index:Q});}}}}return(P.length)?P:null;},_unload:function(Q){var K=YAHOO.util.Event,N,M,L,P,O,R=J.slice();for(N=0,P=J.length;N<P;++N){L=R[N];if(L){var S=window;if(L[K.ADJ_SCOPE]){if(L[K.ADJ_SCOPE]===true){S=L[K.UNLOAD_OBJ];}else{S=L[K.ADJ_SCOPE];}}L[K.FN].call(S,K.getEvent(Q,L[K.EL]),L[K.UNLOAD_OBJ]);R[N]=null;L=null;S=null;}}J=null;if(I){for(M=I.length-1;M>-1;M--){L=I[M];if(L){K.removeListener(L[K.EL],L[K.TYPE],L[K.FN],M);}}L=null;}G=null;K._simpleRemove(window,"unload",K._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var K=document.documentElement,L=document.body;if(K&&(K.scrollTop||K.scrollLeft)){return[K.scrollTop,K.scrollLeft];}else{if(L){return[L.scrollTop,L.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(M,N,L,K){M.addEventListener(N,L,(K));};}else{if(window.attachEvent){return function(M,N,L,K){M.attachEvent("on"+N,L);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(M,N,L,K){M.removeEventListener(N,L,(K));};}else{if(window.detachEvent){return function(L,M,K){L.detachEvent("on"+M,K);};}else{return function(){};}}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;
/* DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller */
if(EU.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var n=document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll("left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null;}catch(ex){}},EU.POLL_INTERVAL);}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU._dri=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready);}}EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,override:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;
if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].override);}}}return I[G];},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null;}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F]);}return G.fire.apply(G,B);},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true;}}return false;}};YAHOO.util.KeyListener=function(A,F,B,C){if(!A){}else{if(!F){}else{if(!B){}}}if(!C){C=YAHOO.util.KeyListener.KEYDOWN;}var D=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof A=="string"){A=document.getElementById(A);}if(typeof B=="function"){D.subscribe(B);}else{D.subscribe(B.fn,B.scope,B.correctScope);}function E(J,I){if(!F.shift){F.shift=false;}if(!F.alt){F.alt=false;}if(!F.ctrl){F.ctrl=false;}if(J.shiftKey==F.shift&&J.altKey==F.alt&&J.ctrlKey==F.ctrl){var G;if(F.keys instanceof Array){for(var H=0;H<F.keys.length;H++){G=F.keys[H];if(G==J.charCode){D.fire(J.charCode,J);break;}else{if(G==J.keyCode){D.fire(J.keyCode,J);break;}}}}else{G=F.keys;if(G==J.charCode){D.fire(J.charCode,J);}else{if(G==J.keyCode){D.fire(J.keyCode,J);}}}}}this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(A,C,E);this.enabledEvent.fire(F);}this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(A,C,E);this.disabledEvent.fire(F);}this.enabled=false;};this.toString=function(){return"KeyListener ["+F.keys+"] "+A.tagName+(A.id?"["+A.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.util.KeyListener.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};YAHOO.register("event",YAHOO.util.Event,{version:"2.5.2",build:"1076"});
/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.5.2
*/
(function(){var B=YAHOO.util,K,I,J={},F={},M=window.document;YAHOO.env._id_counter=YAHOO.env._id_counter||0;var C=YAHOO.env.ua.opera,L=YAHOO.env.ua.webkit,A=YAHOO.env.ua.gecko,G=YAHOO.env.ua.ie;var E={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i,OP_SCROLL:/^(?:inline|table-row)$/i};var N=function(P){if(!E.HYPHEN.test(P)){return P;}if(J[P]){return J[P];}var Q=P;while(E.HYPHEN.exec(Q)){Q=Q.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}J[P]=Q;return Q;};var O=function(Q){var P=F[Q];if(!P){P=new RegExp("(?:^|\\s+)"+Q+"(?:\\s+|$)");F[Q]=P;}return P;};if(M.defaultView&&M.defaultView.getComputedStyle){K=function(P,S){var R=null;if(S=="float"){S="cssFloat";}var Q=P.ownerDocument.defaultView.getComputedStyle(P,"");if(Q){R=Q[N(S)];}return P.style[S]||R;};}else{if(M.documentElement.currentStyle&&G){K=function(P,R){switch(N(R)){case"opacity":var T=100;try{T=P.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(S){try{T=P.filters("alpha").opacity;}catch(S){}}return T/100;case"float":R="styleFloat";default:var Q=P.currentStyle?P.currentStyle[R]:null;return(P.style[R]||Q);}};}else{K=function(P,Q){return P.style[Q];};}}if(G){I=function(P,Q,R){switch(Q){case"opacity":if(YAHOO.lang.isString(P.style.filter)){P.style.filter="alpha(opacity="+R*100+")";if(!P.currentStyle||!P.currentStyle.hasLayout){P.style.zoom=1;}}break;case"float":Q="styleFloat";default:P.style[Q]=R;}};}else{I=function(P,Q,R){if(Q=="float"){Q="cssFloat";}P.style[Q]=R;};}var D=function(P,Q){return P&&P.nodeType==1&&(!Q||Q(P));};YAHOO.util.Dom={get:function(R){if(R&&(R.nodeType||R.item)){return R;}if(YAHOO.lang.isString(R)||!R){return M.getElementById(R);}if(R.length!==undefined){var S=[];for(var Q=0,P=R.length;Q<P;++Q){S[S.length]=B.Dom.get(R[Q]);}return S;}return R;},getStyle:function(P,R){R=N(R);var Q=function(S){return K(S,R);};return B.Dom.batch(P,Q,B.Dom,true);},setStyle:function(P,R,S){R=N(R);var Q=function(T){I(T,R,S);};B.Dom.batch(P,Q,B.Dom,true);},getXY:function(P){var Q=function(R){if((R.parentNode===null||R.offsetParent===null||this.getStyle(R,"display")=="none")&&R!=R.ownerDocument.body){return false;}return H(R);};return B.Dom.batch(P,Q,B.Dom,true);},getX:function(P){var Q=function(R){return B.Dom.getXY(R)[0];};return B.Dom.batch(P,Q,B.Dom,true);},getY:function(P){var Q=function(R){return B.Dom.getXY(R)[1];};return B.Dom.batch(P,Q,B.Dom,true);},setXY:function(P,S,R){var Q=function(V){var U=this.getStyle(V,"position");if(U=="static"){this.setStyle(V,"position","relative");U="relative";}var X=this.getXY(V);if(X===false){return false;}var W=[parseInt(this.getStyle(V,"left"),10),parseInt(this.getStyle(V,"top"),10)];if(isNaN(W[0])){W[0]=(U=="relative")?0:V.offsetLeft;}if(isNaN(W[1])){W[1]=(U=="relative")?0:V.offsetTop;}if(S[0]!==null){V.style.left=S[0]-X[0]+W[0]+"px";}if(S[1]!==null){V.style.top=S[1]-X[1]+W[1]+"px";}if(!R){var T=this.getXY(V);if((S[0]!==null&&T[0]!=S[0])||(S[1]!==null&&T[1]!=S[1])){this.setXY(V,S,true);}}};B.Dom.batch(P,Q,B.Dom,true);},setX:function(Q,P){B.Dom.setXY(Q,[P,null]);},setY:function(P,Q){B.Dom.setXY(P,[null,Q]);},getRegion:function(P){var Q=function(R){if((R.parentNode===null||R.offsetParent===null||this.getStyle(R,"display")=="none")&&R!=R.ownerDocument.body){return false;}var S=B.Region.getRegion(R);return S;};return B.Dom.batch(P,Q,B.Dom,true);},getClientWidth:function(){return B.Dom.getViewportWidth();},getClientHeight:function(){return B.Dom.getViewportHeight();},getElementsByClassName:function(T,X,U,V){X=X||"*";U=(U)?B.Dom.get(U):null||M;if(!U){return[];}var Q=[],P=U.getElementsByTagName(X),W=O(T);for(var R=0,S=P.length;R<S;++R){if(W.test(P[R].className)){Q[Q.length]=P[R];if(V){V.call(P[R],P[R]);}}}return Q;},hasClass:function(R,Q){var P=O(Q);var S=function(T){return P.test(T.className);};return B.Dom.batch(R,S,B.Dom,true);},addClass:function(Q,P){var R=function(S){if(this.hasClass(S,P)){return false;}S.className=YAHOO.lang.trim([S.className,P].join(" "));return true;};return B.Dom.batch(Q,R,B.Dom,true);},removeClass:function(R,Q){var P=O(Q);var S=function(T){if(!Q||!this.hasClass(T,Q)){return false;}var U=T.className;T.className=U.replace(P," ");if(this.hasClass(T,Q)){this.removeClass(T,Q);}T.className=YAHOO.lang.trim(T.className);return true;};return B.Dom.batch(R,S,B.Dom,true);},replaceClass:function(S,Q,P){if(!P||Q===P){return false;}var R=O(Q);var T=function(U){if(!this.hasClass(U,Q)){this.addClass(U,P);return true;}U.className=U.className.replace(R," "+P+" ");if(this.hasClass(U,Q)){this.replaceClass(U,Q,P);}U.className=YAHOO.lang.trim(U.className);return true;};return B.Dom.batch(S,T,B.Dom,true);},generateId:function(P,R){R=R||"yui-gen";var Q=function(S){if(S&&S.id){return S.id;}var T=R+YAHOO.env._id_counter++;if(S){S.id=T;}return T;};return B.Dom.batch(P,Q,B.Dom,true)||Q.apply(B.Dom,arguments);},isAncestor:function(P,Q){P=B.Dom.get(P);Q=B.Dom.get(Q);if(!P||!Q){return false;}if(P.contains&&Q.nodeType&&!L){return P.contains(Q);}else{if(P.compareDocumentPosition&&Q.nodeType){return !!(P.compareDocumentPosition(Q)&16);}else{if(Q.nodeType){return !!this.getAncestorBy(Q,function(R){return R==P;});}}}return false;},inDocument:function(P){return this.isAncestor(M.documentElement,P);},getElementsBy:function(W,Q,R,T){Q=Q||"*";R=(R)?B.Dom.get(R):null||M;if(!R){return[];}var S=[],V=R.getElementsByTagName(Q);for(var U=0,P=V.length;U<P;++U){if(W(V[U])){S[S.length]=V[U];if(T){T(V[U]);}}}return S;},batch:function(T,W,V,R){T=(T&&(T.tagName||T.item))?T:B.Dom.get(T);if(!T||!W){return false;}var S=(R)?V:window;if(T.tagName||T.length===undefined){return W.call(S,T,V);}var U=[];for(var Q=0,P=T.length;Q<P;++Q){U[U.length]=W.call(S,T[Q],V);}return U;},getDocumentHeight:function(){var Q=(M.compatMode!="CSS1Compat")?M.body.scrollHeight:M.documentElement.scrollHeight;var P=Math.max(Q,B.Dom.getViewportHeight());return P;},getDocumentWidth:function(){var Q=(M.compatMode!="CSS1Compat")?M.body.scrollWidth:M.documentElement.scrollWidth;var P=Math.max(Q,B.Dom.getViewportWidth());return P;},getViewportHeight:function(){var P=self.innerHeight;
var Q=M.compatMode;if((Q||G)&&!C){P=(Q=="CSS1Compat")?M.documentElement.clientHeight:M.body.clientHeight;}return P;},getViewportWidth:function(){var P=self.innerWidth;var Q=M.compatMode;if(Q||G){P=(Q=="CSS1Compat")?M.documentElement.clientWidth:M.body.clientWidth;}return P;},getAncestorBy:function(P,Q){while(P=P.parentNode){if(D(P,Q)){return P;}}return null;},getAncestorByClassName:function(Q,P){Q=B.Dom.get(Q);if(!Q){return null;}var R=function(S){return B.Dom.hasClass(S,P);};return B.Dom.getAncestorBy(Q,R);},getAncestorByTagName:function(Q,P){Q=B.Dom.get(Q);if(!Q){return null;}var R=function(S){return S.tagName&&S.tagName.toUpperCase()==P.toUpperCase();};return B.Dom.getAncestorBy(Q,R);},getPreviousSiblingBy:function(P,Q){while(P){P=P.previousSibling;if(D(P,Q)){return P;}}return null;},getPreviousSibling:function(P){P=B.Dom.get(P);if(!P){return null;}return B.Dom.getPreviousSiblingBy(P);},getNextSiblingBy:function(P,Q){while(P){P=P.nextSibling;if(D(P,Q)){return P;}}return null;},getNextSibling:function(P){P=B.Dom.get(P);if(!P){return null;}return B.Dom.getNextSiblingBy(P);},getFirstChildBy:function(P,R){var Q=(D(P.firstChild,R))?P.firstChild:null;return Q||B.Dom.getNextSiblingBy(P.firstChild,R);},getFirstChild:function(P,Q){P=B.Dom.get(P);if(!P){return null;}return B.Dom.getFirstChildBy(P);},getLastChildBy:function(P,R){if(!P){return null;}var Q=(D(P.lastChild,R))?P.lastChild:null;return Q||B.Dom.getPreviousSiblingBy(P.lastChild,R);},getLastChild:function(P){P=B.Dom.get(P);return B.Dom.getLastChildBy(P);},getChildrenBy:function(Q,S){var R=B.Dom.getFirstChildBy(Q,S);var P=R?[R]:[];B.Dom.getNextSiblingBy(R,function(T){if(!S||S(T)){P[P.length]=T;}return false;});return P;},getChildren:function(P){P=B.Dom.get(P);if(!P){}return B.Dom.getChildrenBy(P);},getDocumentScrollLeft:function(P){P=P||M;return Math.max(P.documentElement.scrollLeft,P.body.scrollLeft);},getDocumentScrollTop:function(P){P=P||M;return Math.max(P.documentElement.scrollTop,P.body.scrollTop);},insertBefore:function(Q,P){Q=B.Dom.get(Q);P=B.Dom.get(P);if(!Q||!P||!P.parentNode){return null;}return P.parentNode.insertBefore(Q,P);},insertAfter:function(Q,P){Q=B.Dom.get(Q);P=B.Dom.get(P);if(!Q||!P||!P.parentNode){return null;}if(P.nextSibling){return P.parentNode.insertBefore(Q,P.nextSibling);}else{return P.parentNode.appendChild(Q);}},getClientRegion:function(){var R=B.Dom.getDocumentScrollTop(),Q=B.Dom.getDocumentScrollLeft(),S=B.Dom.getViewportWidth()+Q,P=B.Dom.getViewportHeight()+R;return new B.Region(R,S,P,Q);}};var H=function(){if(M.documentElement.getBoundingClientRect){return function(Q){var R=Q.getBoundingClientRect();var P=Q.ownerDocument;return[R.left+B.Dom.getDocumentScrollLeft(P),R.top+B.Dom.getDocumentScrollTop(P)];};}else{return function(R){var S=[R.offsetLeft,R.offsetTop];var Q=R.offsetParent;var P=(L&&B.Dom.getStyle(R,"position")=="absolute"&&R.offsetParent==R.ownerDocument.body);if(Q!=R){while(Q){S[0]+=Q.offsetLeft;S[1]+=Q.offsetTop;if(!P&&L&&B.Dom.getStyle(Q,"position")=="absolute"){P=true;}Q=Q.offsetParent;}}if(P){S[0]-=R.ownerDocument.body.offsetLeft;S[1]-=R.ownerDocument.body.offsetTop;}Q=R.parentNode;while(Q.tagName&&!E.ROOT_TAG.test(Q.tagName)){if(Q.scrollTop||Q.scrollLeft){if(!E.OP_SCROLL.test(B.Dom.getStyle(Q,"display"))){if(!C||B.Dom.getStyle(Q,"overflow")!=="visible"){S[0]-=Q.scrollLeft;S[1]-=Q.scrollTop;}}}Q=Q.parentNode;}return S;};}}();})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this[0]=B;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.5.2",build:"1076"});
/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.5.2
*/
YAHOO.util.Connect={_msxml_progid:["Microsoft.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:"application/x-www-form-urlencoded; charset=UTF-8",_default_form_header:"application/x-www-form-urlencoded",_use_default_xhr_header:true,_default_xhr_header:"XMLHttpRequest",_has_default_headers:true,_default_headers:{},_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,_submitElementValue:null,_hasSubmitListener:(function(){if(YAHOO.util.Event){YAHOO.util.Event.addListener(document,"click",function(B){var A=YAHOO.util.Event.getTarget(B);if(A.nodeName.toLowerCase()=="input"&&(A.type&&A.type.toLowerCase()=="submit")){YAHOO.util.Connect._submitElementValue=encodeURIComponent(A.name)+"="+encodeURIComponent(A.value);}});return true;}return false;})(),startEvent:new YAHOO.util.CustomEvent("start"),completeEvent:new YAHOO.util.CustomEvent("complete"),successEvent:new YAHOO.util.CustomEvent("success"),failureEvent:new YAHOO.util.CustomEvent("failure"),uploadEvent:new YAHOO.util.CustomEvent("upload"),abortEvent:new YAHOO.util.CustomEvent("abort"),_customEvents:{onStart:["startEvent","start"],onComplete:["completeEvent","complete"],onSuccess:["successEvent","success"],onFailure:["failureEvent","failure"],onUpload:["uploadEvent","upload"],onAbort:["abortEvent","abort"]},setProgId:function(A){this._msxml_progid.unshift(A);YAHOO.log("ActiveX Program Id  "+A+" added to _msxml_progid.","info","Connection");},setDefaultPostHeader:function(A){if(typeof A=="string"){this._default_post_header=A;YAHOO.log("Default POST header set to  "+A,"info","Connection");}else{if(typeof A=="boolean"){this._use_default_post_header=A;}}},setDefaultXhrHeader:function(A){if(typeof A=="string"){this._default_xhr_header=A;YAHOO.log("Default XHR header set to  "+A,"info","Connection");}else{this._use_default_xhr_header=A;}},setPollingInterval:function(A){if(typeof A=="number"&&isFinite(A)){this._polling_interval=A;YAHOO.log("Default polling interval set to "+A+"ms","info","Connection");}},createXhrObject:function(E){var D,A;try{A=new XMLHttpRequest();D={conn:A,tId:E};YAHOO.log("XHR object created for transaction "+E,"info","Connection");}catch(C){for(var B=0;B<this._msxml_progid.length;++B){try{A=new ActiveXObject(this._msxml_progid[B]);D={conn:A,tId:E};YAHOO.log("ActiveX XHR object created for transaction "+E,"info","Connection");break;}catch(C){}}}finally{return D;}},getConnectionObject:function(A){var C;var D=this._transaction_id;try{if(!A){C=this.createXhrObject(D);}else{C={};C.tId=D;C.isUpload=true;}if(C){this._transaction_id++;}}catch(B){}finally{return C;}},asyncRequest:function(F,C,E,A){var D=(this._isFileUpload)?this.getConnectionObject(true):this.getConnectionObject();var B=(E&&E.argument)?E.argument:null;if(!D){YAHOO.log("Unable to create connection object.","error","Connection");return null;}else{if(E&&E.customevents){this.initCustomEvents(D,E);}if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(D,E,C,A);return D;}if(F.toUpperCase()=="GET"){if(this._sFormData.length!==0){C+=((C.indexOf("?")==-1)?"?":"&")+this._sFormData;}}else{if(F.toUpperCase()=="POST"){A=A?this._sFormData+"&"+A:this._sFormData;}}}if(F.toUpperCase()=="GET"&&(E&&E.cache===false)){C+=((C.indexOf("?")==-1)?"?":"&")+"rnd="+new Date().valueOf().toString();}D.conn.open(F,C,true);if(this._use_default_xhr_header){if(!this._default_headers["X-Requested-With"]){this.initHeader("X-Requested-With",this._default_xhr_header,true);YAHOO.log("Initialize transaction header X-Request-Header to XMLHttpRequest.","info","Connection");}}if((F.toUpperCase()=="POST"&&this._use_default_post_header)&&this._isFormSubmit===false){this.initHeader("Content-Type",this._default_post_header);YAHOO.log("Initialize header Content-Type to application/x-www-form-urlencoded; UTF-8 for POST transaction.","info","Connection");}if(this._has_default_headers||this._has_http_headers){this.setHeader(D);}this.handleReadyState(D,E);D.conn.send(A||"");YAHOO.log("Transaction "+D.tId+" sent.","info","Connection");if(this._isFormSubmit===true){this.resetFormState();}this.startEvent.fire(D,B);if(D.startEvent){D.startEvent.fire(D,B);}return D;}},initCustomEvents:function(A,C){for(var B in C.customevents){if(this._customEvents[B][0]){A[this._customEvents[B][0]]=new YAHOO.util.CustomEvent(this._customEvents[B][1],(C.scope)?C.scope:null);YAHOO.log("Transaction-specific Custom Event "+A[this._customEvents[B][1]]+" created.","info","Connection");A[this._customEvents[B][0]].subscribe(C.customevents[B]);YAHOO.log("Transaction-specific Custom Event "+A[this._customEvents[B][1]]+" subscribed.","info","Connection");}}},handleReadyState:function(C,D){var B=this;var A=(D&&D.argument)?D.argument:null;if(D&&D.timeout){this._timeOut[C.tId]=window.setTimeout(function(){B.abort(C,D,true);},D.timeout);}this._poll[C.tId]=window.setInterval(function(){if(C.conn&&C.conn.readyState===4){window.clearInterval(B._poll[C.tId]);delete B._poll[C.tId];if(D&&D.timeout){window.clearTimeout(B._timeOut[C.tId]);delete B._timeOut[C.tId];}B.completeEvent.fire(C,A);if(C.completeEvent){C.completeEvent.fire(C,A);}B.handleTransactionResponse(C,D);}},this._polling_interval);},handleTransactionResponse:function(F,G,A){var D,C;var B=(G&&G.argument)?G.argument:null;try{if(F.conn.status!==undefined&&F.conn.status!==0){D=F.conn.status;}else{D=13030;}}catch(E){D=13030;}if(D>=200&&D<300||D===1223){C=this.createResponseObject(F,B);if(G&&G.success){if(!G.scope){G.success(C);YAHOO.log("Success callback. HTTP code is "+D,"info","Connection");}else{G.success.apply(G.scope,[C]);YAHOO.log("Success callback with scope. HTTP code is "+D,"info","Connection");}}this.successEvent.fire(C);if(F.successEvent){F.successEvent.fire(C);}}else{switch(D){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:C=this.createExceptionObject(F.tId,B,(A?A:false));if(G&&G.failure){if(!G.scope){G.failure(C);
YAHOO.log("Failure callback. Exception detected. Status code is "+D,"warn","Connection");}else{G.failure.apply(G.scope,[C]);YAHOO.log("Failure callback with scope. Exception detected. Status code is "+D,"warn","Connection");}}break;default:C=this.createResponseObject(F,B);if(G&&G.failure){if(!G.scope){G.failure(C);YAHOO.log("Failure callback. HTTP status code is "+D,"warn","Connection");}else{G.failure.apply(G.scope,[C]);YAHOO.log("Failure callback with scope. HTTP status code is "+D,"warn","Connection");}}}this.failureEvent.fire(C);if(F.failureEvent){F.failureEvent.fire(C);}}this.releaseObject(F);C=null;},createResponseObject:function(A,G){var D={};var I={};try{var C=A.conn.getAllResponseHeaders();var F=C.split("\n");for(var E=0;E<F.length;E++){var B=F[E].indexOf(":");if(B!=-1){I[F[E].substring(0,B)]=F[E].substring(B+2);}}}catch(H){}D.tId=A.tId;D.status=(A.conn.status==1223)?204:A.conn.status;D.statusText=(A.conn.status==1223)?"No Content":A.conn.statusText;D.getResponseHeader=I;D.getAllResponseHeaders=C;D.responseText=A.conn.responseText;D.responseXML=A.conn.responseXML;if(G){D.argument=G;}return D;},createExceptionObject:function(H,D,A){var F=0;var G="communication failure";var C=-1;var B="transaction aborted";var E={};E.tId=H;if(A){E.status=C;E.statusText=B;}else{E.status=F;E.statusText=G;}if(D){E.argument=D;}return E;},initHeader:function(A,D,C){var B=(C)?this._default_headers:this._http_headers;B[A]=D;if(C){this._has_default_headers=true;}else{this._has_http_headers=true;}},setHeader:function(A){if(this._has_default_headers){for(var B in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,B)){A.conn.setRequestHeader(B,this._default_headers[B]);YAHOO.log("Default HTTP header "+B+" set with value of "+this._default_headers[B],"info","Connection");}}}if(this._has_http_headers){for(var B in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,B)){A.conn.setRequestHeader(B,this._http_headers[B]);YAHOO.log("HTTP header "+B+" set with value of "+this._http_headers[B],"info","Connection");}}delete this._http_headers;this._http_headers={};this._has_http_headers=false;}},resetDefaultHeaders:function(){delete this._default_headers;this._default_headers={};this._has_default_headers=false;},setForm:function(K,E,B){this.resetFormState();var J;if(typeof K=="string"){J=(document.getElementById(K)||document.forms[K]);}else{if(typeof K=="object"){J=K;}else{YAHOO.log("Unable to create form object "+K,"warn","Connection");return ;}}if(E){var F=this.createFrame((window.location.href.toLowerCase().indexOf("https")===0||B)?true:false);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=J;return ;}var A,I,G,L;var H=false;for(var D=0;D<J.elements.length;D++){A=J.elements[D];L=A.disabled;I=A.name;G=A.value;if(!L&&I){switch(A.type){case"select-one":case"select-multiple":for(var C=0;C<A.options.length;C++){if(A.options[C].selected){if(window.ActiveXObject){this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(A.options[C].attributes["value"].specified?A.options[C].value:A.options[C].text)+"&";}else{this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(A.options[C].hasAttribute("value")?A.options[C].value:A.options[C].text)+"&";}}}break;case"radio":case"checkbox":if(A.checked){this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(G)+"&";}break;case"file":case undefined:case"reset":case"button":break;case"submit":if(H===false){if(this._hasSubmitListener&&this._submitElementValue){this._sFormData+=this._submitElementValue+"&";}else{this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(G)+"&";}H=true;}break;default:this._sFormData+=encodeURIComponent(I)+"="+encodeURIComponent(G)+"&";}}}this._isFormSubmit=true;this._sFormData=this._sFormData.substr(0,this._sFormData.length-1);YAHOO.log("Form initialized for transaction. HTML form POST message is: "+this._sFormData,"info","Connection");this.initHeader("Content-Type",this._default_form_header);YAHOO.log("Initialize header Content-Type to application/x-www-form-urlencoded for setForm() transaction.","info","Connection");return this._sFormData;},resetFormState:function(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData="";},createFrame:function(A){var B="yuiIO"+this._transaction_id;var C;if(window.ActiveXObject){C=document.createElement('<iframe id="'+B+'" name="'+B+'" />');if(typeof A=="boolean"){C.src="javascript:false";}}else{C=document.createElement("iframe");C.id=B;C.name=B;}C.style.position="absolute";C.style.top="-1000px";C.style.left="-1000px";document.body.appendChild(C);YAHOO.log("File upload iframe created. Id is:"+B,"info","Connection");},appendPostData:function(A){var D=[];var B=A.split("&");for(var C=0;C<B.length;C++){var E=B[C].indexOf("=");if(E!=-1){D[C]=document.createElement("input");D[C].type="hidden";D[C].name=B[C].substring(0,E);D[C].value=B[C].substring(E+1);this._formNode.appendChild(D[C]);}}return D;},uploadFile:function(D,M,E,C){var N=this;var H="yuiIO"+D.tId;var I="multipart/form-data";var K=document.getElementById(H);var J=(M&&M.argument)?M.argument:null;var B={action:this._formNode.getAttribute("action"),method:this._formNode.getAttribute("method"),target:this._formNode.getAttribute("target")};this._formNode.setAttribute("action",E);this._formNode.setAttribute("method","POST");this._formNode.setAttribute("target",H);if(YAHOO.env.ua.ie){this._formNode.setAttribute("encoding",I);}else{this._formNode.setAttribute("enctype",I);}if(C){var L=this.appendPostData(C);}this._formNode.submit();this.startEvent.fire(D,J);if(D.startEvent){D.startEvent.fire(D,J);}if(M&&M.timeout){this._timeOut[D.tId]=window.setTimeout(function(){N.abort(D,M,true);},M.timeout);}if(L&&L.length>0){for(var G=0;G<L.length;G++){this._formNode.removeChild(L[G]);}}for(var A in B){if(YAHOO.lang.hasOwnProperty(B,A)){if(B[A]){this._formNode.setAttribute(A,B[A]);}else{this._formNode.removeAttribute(A);}}}this.resetFormState();var F=function(){if(M&&M.timeout){window.clearTimeout(N._timeOut[D.tId]);
delete N._timeOut[D.tId];}N.completeEvent.fire(D,J);if(D.completeEvent){D.completeEvent.fire(D,J);}var P={};P.tId=D.tId;P.argument=M.argument;try{P.responseText=K.contentWindow.document.body?K.contentWindow.document.body.innerHTML:K.contentWindow.document.documentElement.textContent;P.responseXML=K.contentWindow.document.XMLDocument?K.contentWindow.document.XMLDocument:K.contentWindow.document;}catch(O){}if(M&&M.upload){if(!M.scope){M.upload(P);YAHOO.log("Upload callback.","info","Connection");}else{M.upload.apply(M.scope,[P]);YAHOO.log("Upload callback with scope.","info","Connection");}}N.uploadEvent.fire(P);if(D.uploadEvent){D.uploadEvent.fire(P);}YAHOO.util.Event.removeListener(K,"load",F);setTimeout(function(){document.body.removeChild(K);N.releaseObject(D);YAHOO.log("File upload iframe destroyed. Id is:"+H,"info","Connection");},100);};YAHOO.util.Event.addListener(K,"load",F);},abort:function(E,G,A){var D;var B=(G&&G.argument)?G.argument:null;if(E&&E.conn){if(this.isCallInProgress(E)){E.conn.abort();window.clearInterval(this._poll[E.tId]);delete this._poll[E.tId];if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId];}D=true;}}else{if(E&&E.isUpload===true){var C="yuiIO"+E.tId;var F=document.getElementById(C);if(F){YAHOO.util.Event.removeListener(F,"load");document.body.removeChild(F);YAHOO.log("File upload iframe destroyed. Id is:"+C,"info","Connection");if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId];}D=true;}}else{D=false;}}if(D===true){this.abortEvent.fire(E,B);if(E.abortEvent){E.abortEvent.fire(E,B);}this.handleTransactionResponse(E,G,true);YAHOO.log("Transaction "+E.tId+" aborted.","info","Connection");}return D;},isCallInProgress:function(B){if(B&&B.conn){return B.conn.readyState!==4&&B.conn.readyState!==0;}else{if(B&&B.isUpload===true){var A="yuiIO"+B.tId;return document.getElementById(A)?true:false;}else{return false;}}},releaseObject:function(A){if(A&&A.conn){A.conn=null;YAHOO.log("Connection object for transaction "+A.tId+" destroyed.","info","Connection");A=null;}}};YAHOO.register("connection",YAHOO.util.Connect,{version:"2.5.2",build:"1076"});
/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.5.2
*/
(function(){var B=YAHOO.util;var A=function(D,C,E,F){if(!D){}this.init(D,C,E,F);};A.NAME="Anim";A.prototype={toString:function(){var C=this.getEl()||{};var D=C.id||C.tagName;return(this.constructor.NAME+": "+D);},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(C,E,D){return this.method(this.currentFrame,E,D-E,this.totalFrames);},setAttribute:function(C,E,D){if(this.patterns.noNegatives.test(C)){E=(E>0)?E:0;}B.Dom.setStyle(this.getEl(),C,E+D);},getAttribute:function(C){var E=this.getEl();var G=B.Dom.getStyle(E,C);if(G!=="auto"&&!this.patterns.offsetUnit.test(G)){return parseFloat(G);}var D=this.patterns.offsetAttribute.exec(C)||[];var H=!!(D[3]);var F=!!(D[2]);if(F||(B.Dom.getStyle(E,"position")=="absolute"&&H)){G=E["offset"+D[0].charAt(0).toUpperCase()+D[0].substr(1)];}else{G=0;}return G;},getDefaultUnit:function(C){if(this.patterns.defaultUnit.test(C)){return"px";}return"";},setRuntimeAttribute:function(D){var I;var E;var F=this.attributes;this.runtimeAttributes[D]={};var H=function(J){return(typeof J!=="undefined");};if(!H(F[D]["to"])&&!H(F[D]["by"])){return false;}I=(H(F[D]["from"]))?F[D]["from"]:this.getAttribute(D);if(H(F[D]["to"])){E=F[D]["to"];}else{if(H(F[D]["by"])){if(I.constructor==Array){E=[];for(var G=0,C=I.length;G<C;++G){E[G]=I[G]+F[D]["by"][G]*1;}}else{E=I+F[D]["by"]*1;}}}this.runtimeAttributes[D].start=I;this.runtimeAttributes[D].end=E;this.runtimeAttributes[D].unit=(H(F[D].unit))?F[D]["unit"]:this.getDefaultUnit(D);return true;},init:function(E,J,I,C){var D=false;var F=null;var H=0;E=B.Dom.get(E);this.attributes=J||{};this.duration=!YAHOO.lang.isUndefined(I)?I:1;this.method=C||B.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=B.AnimMgr.fps;this.setEl=function(M){E=B.Dom.get(M);};this.getEl=function(){return E;};this.isAnimated=function(){return D;};this.getStartTime=function(){return F;};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false;}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(B.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1;}B.AnimMgr.registerElement(this);return true;};this.stop=function(M){if(!this.isAnimated()){return false;}if(M){this.currentFrame=this.totalFrames;this._onTween.fire();}B.AnimMgr.stop(this);};var L=function(){this.onStart.fire();this.runtimeAttributes={};for(var M in this.attributes){this.setRuntimeAttribute(M);}D=true;H=0;F=new Date();};var K=function(){var O={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};O.toString=function(){return("duration: "+O.duration+", currentFrame: "+O.currentFrame);};this.onTween.fire(O);var N=this.runtimeAttributes;for(var M in N){this.setAttribute(M,this.doMethod(M,N[M].start,N[M].end),N[M].unit);}H+=1;};var G=function(){var M=(new Date()-F)/1000;var N={duration:M,frames:H,fps:H/M};N.toString=function(){return("duration: "+N.duration+", frames: "+N.frames+", fps: "+N.fps);};D=false;H=0;this.onComplete.fire(N);};this._onStart=new B.CustomEvent("_start",this,true);this.onStart=new B.CustomEvent("start",this);this.onTween=new B.CustomEvent("tween",this);this._onTween=new B.CustomEvent("_tween",this,true);this.onComplete=new B.CustomEvent("complete",this);this._onComplete=new B.CustomEvent("_complete",this,true);this._onStart.subscribe(L);this._onTween.subscribe(K);this._onComplete.subscribe(G);}};B.Anim=A;})();YAHOO.util.AnimMgr=new function(){var C=null;var B=[];var A=0;this.fps=1000;this.delay=1;this.registerElement=function(F){B[B.length]=F;A+=1;F._onStart.fire();this.start();};this.unRegister=function(G,F){F=F||E(G);if(!G.isAnimated()||F==-1){return false;}G._onComplete.fire();B.splice(F,1);A-=1;if(A<=0){this.stop();}return true;};this.start=function(){if(C===null){C=setInterval(this.run,this.delay);}};this.stop=function(H){if(!H){clearInterval(C);for(var G=0,F=B.length;G<F;++G){this.unRegister(B[0],0);}B=[];C=null;A=0;}else{this.unRegister(H);}};this.run=function(){for(var H=0,F=B.length;H<F;++H){var G=B[H];if(!G||!G.isAnimated()){continue;}if(G.currentFrame<G.totalFrames||G.totalFrames===null){G.currentFrame+=1;if(G.useSeconds){D(G);}G._onTween.fire();}else{YAHOO.util.AnimMgr.stop(G,H);}}};var E=function(H){for(var G=0,F=B.length;G<F;++G){if(B[G]==H){return G;}}return -1;};var D=function(G){var J=G.totalFrames;var I=G.currentFrame;var H=(G.currentFrame*G.duration*1000/G.totalFrames);var F=(new Date()-G.getStartTime());var K=0;if(F<G.duration*1000){K=Math.round((F/H-1)*G.currentFrame);}else{K=J-(I+1);}if(K>0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1);}G.currentFrame+=K;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B<F;++B){C[B]=[E[B][0],E[B][1]];}for(var A=1;A<F;++A){for(B=0;B<F-A;++B){C[B][0]=(1-D)*C[B][0]+D*C[parseInt(B+1,10)][0];C[B][1]=(1-D)*C[B][1]+D*C[parseInt(B+1,10)][1];}}return[C[0][0],C[0][1]];};};(function(){var A=function(F,E,G,H){A.superclass.constructor.call(this,F,E,G,H);};A.NAME="ColorAnim";var C=YAHOO.util;YAHOO.extend(A,C.Anim);var D=A.superclass;var B=A.prototype;B.patterns.color=/color$/i;B.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;B.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;B.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;B.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;B.parseColor=function(E){if(E.length==3){return E;}var F=this.patterns.hex.exec(E);if(F&&F.length==4){return[parseInt(F[1],16),parseInt(F[2],16),parseInt(F[3],16)];}F=this.patterns.rgb.exec(E);if(F&&F.length==4){return[parseInt(F[1],10),parseInt(F[2],10),parseInt(F[3],10)];}F=this.patterns.hex3.exec(E);if(F&&F.length==4){return[parseInt(F[1]+F[1],16),parseInt(F[2]+F[2],16),parseInt(F[3]+F[3],16)];}return null;};B.getAttribute=function(E){var G=this.getEl();if(this.patterns.color.test(E)){var H=YAHOO.util.Dom.getStyle(G,E);
if(this.patterns.transparent.test(H)){var F=G.parentNode;H=C.Dom.getStyle(F,E);while(F&&this.patterns.transparent.test(H)){F=F.parentNode;H=C.Dom.getStyle(F,E);if(F.tagName.toUpperCase()=="HTML"){H="#fff";}}}}else{H=D.getAttribute.call(this,E);}return H;};B.doMethod=function(F,J,G){var I;if(this.patterns.color.test(F)){I=[];for(var H=0,E=J.length;H<E;++H){I[H]=D.doMethod.call(this,F,J[H],G[H]);}I="rgb("+Math.floor(I[0])+","+Math.floor(I[1])+","+Math.floor(I[2])+")";}else{I=D.doMethod.call(this,F,J,G);}return I;};B.setRuntimeAttribute=function(F){D.setRuntimeAttribute.call(this,F);if(this.patterns.color.test(F)){var H=this.attributes;var J=this.parseColor(this.runtimeAttributes[F].start);var G=this.parseColor(this.runtimeAttributes[F].end);if(typeof H[F]["to"]==="undefined"&&typeof H[F]["by"]!=="undefined"){G=this.parseColor(H[F].by);for(var I=0,E=J.length;I<E;++I){G[I]=J[I]+G[I];}}this.runtimeAttributes[F].start=J;this.runtimeAttributes[F].end=G;}};C.ColorAnim=A;})();
/*
TERMS OF USE - EASING EQUATIONS
Open source under the BSD License.
Copyright 2001 Robert Penner All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 * Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
YAHOO.util.Easing={easeNone:function(B,A,D,C){return D*B/C+A;},easeIn:function(B,A,D,C){return D*(B/=C)*B+A;},easeOut:function(B,A,D,C){return -D*(B/=C)*(B-2)+A;},easeBoth:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B+A;}return -D/2*((--B)*(B-2)-1)+A;},easeInStrong:function(B,A,D,C){return D*(B/=C)*B*B*B+A;},easeOutStrong:function(B,A,D,C){return -D*((B=B/C-1)*B*B*B-1)+A;},easeBothStrong:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B*B*B+A;}return -D/2*((B-=2)*B*B*B-2)+A;},elasticIn:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return -(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;},elasticOut:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return B*Math.pow(2,-10*C)*Math.sin((C*F-D)*(2*Math.PI)/E)+G+A;},elasticBoth:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F/2)==2){return A+G;}if(!E){E=F*(0.3*1.5);}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}if(C<1){return -0.5*(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;}return B*Math.pow(2,-10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E)*0.5+G+A;},backIn:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*(B/=D)*B*((C+1)*B-C)+A;},backOut:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*((B=B/D-1)*B*((C+1)*B+C)+1)+A;},backBoth:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}if((B/=D/2)<1){return E/2*(B*B*(((C*=(1.525))+1)*B-C))+A;}return E/2*((B-=2)*B*(((C*=(1.525))+1)*B+C)+2)+A;},bounceIn:function(B,A,D,C){return D-YAHOO.util.Easing.bounceOut(C-B,0,D,C)+A;},bounceOut:function(B,A,D,C){if((B/=C)<(1/2.75)){return D*(7.5625*B*B)+A;}else{if(B<(2/2.75)){return D*(7.5625*(B-=(1.5/2.75))*B+0.75)+A;}else{if(B<(2.5/2.75)){return D*(7.5625*(B-=(2.25/2.75))*B+0.9375)+A;}}}return D*(7.5625*(B-=(2.625/2.75))*B+0.984375)+A;},bounceBoth:function(B,A,D,C){if(B<C/2){return YAHOO.util.Easing.bounceIn(B*2,0,D,C)*0.5+A;}return YAHOO.util.Easing.bounceOut(B*2-C,0,D,C)*0.5+D*0.5+A;}};(function(){var A=function(H,G,I,J){if(H){A.superclass.constructor.call(this,H,G,I,J);}};A.NAME="Motion";var E=YAHOO.util;YAHOO.extend(A,E.ColorAnim);var F=A.superclass;var C=A.prototype;C.patterns.points=/^points$/i;C.setAttribute=function(G,I,H){if(this.patterns.points.test(G)){H=H||"px";F.setAttribute.call(this,"left",I[0],H);F.setAttribute.call(this,"top",I[1],H);}else{F.setAttribute.call(this,G,I,H);}};C.getAttribute=function(G){if(this.patterns.points.test(G)){var H=[F.getAttribute.call(this,"left"),F.getAttribute.call(this,"top")];}else{H=F.getAttribute.call(this,G);}return H;};C.doMethod=function(G,K,H){var J=null;if(this.patterns.points.test(G)){var I=this.method(this.currentFrame,0,100,this.totalFrames)/100;J=E.Bezier.getPosition(this.runtimeAttributes[G],I);}else{J=F.doMethod.call(this,G,K,H);}return J;};C.setRuntimeAttribute=function(P){if(this.patterns.points.test(P)){var H=this.getEl();var J=this.attributes;var G;var L=J["points"]["control"]||[];var I;var M,O;if(L.length>0&&!(L[0] instanceof Array)){L=[L];}else{var K=[];for(M=0,O=L.length;M<O;++M){K[M]=L[M];}L=K;}if(E.Dom.getStyle(H,"position")=="static"){E.Dom.setStyle(H,"position","relative");}if(D(J["points"]["from"])){E.Dom.setXY(H,J["points"]["from"]);}else{E.Dom.setXY(H,E.Dom.getXY(H));}G=this.getAttribute("points");if(D(J["points"]["to"])){I=B.call(this,J["points"]["to"],G);
var N=E.Dom.getXY(this.getEl());for(M=0,O=L.length;M<O;++M){L[M]=B.call(this,L[M],G);}}else{if(D(J["points"]["by"])){I=[G[0]+J["points"]["by"][0],G[1]+J["points"]["by"][1]];for(M=0,O=L.length;M<O;++M){L[M]=[G[0]+L[M][0],G[1]+L[M][1]];}}}this.runtimeAttributes[P]=[G];if(L.length>0){this.runtimeAttributes[P]=this.runtimeAttributes[P].concat(L);}this.runtimeAttributes[P][this.runtimeAttributes[P].length]=I;}else{F.setRuntimeAttribute.call(this,P);}};var B=function(G,I){var H=E.Dom.getXY(this.getEl());G=[G[0]-H[0]+I[0],G[1]-H[1]+I[1]];return G;};var D=function(G){return(typeof G!=="undefined");};E.Motion=A;})();(function(){var D=function(F,E,G,H){if(F){D.superclass.constructor.call(this,F,E,G,H);}};D.NAME="Scroll";var B=YAHOO.util;YAHOO.extend(D,B.ColorAnim);var C=D.superclass;var A=D.prototype;A.doMethod=function(E,H,F){var G=null;if(E=="scroll"){G=[this.method(this.currentFrame,H[0],F[0]-H[0],this.totalFrames),this.method(this.currentFrame,H[1],F[1]-H[1],this.totalFrames)];}else{G=C.doMethod.call(this,E,H,F);}return G;};A.getAttribute=function(E){var G=null;var F=this.getEl();if(E=="scroll"){G=[F.scrollLeft,F.scrollTop];}else{G=C.getAttribute.call(this,E);}return G;};A.setAttribute=function(E,H,G){var F=this.getEl();if(E=="scroll"){F.scrollLeft=H[0];F.scrollTop=H[1];}else{C.setAttribute.call(this,E,H,G);}};B.Scroll=D;})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.5.2",build:"1076"});
/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.5.2
*/
if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var A=YAHOO.util.Event;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true;},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(D,C){for(var E in this.ids){for(var B in this.ids[E]){var F=this.ids[E][B];if(!this.isTypeOfDD(F)){continue;}F[D].apply(F,C);}}},_onLoad:function(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true);},_onResize:function(B){this._execOnAll("resetConstraints",[]);},lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isLocked:function(){return this.locked;},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,fromTimeout:false,regDragDrop:function(C,B){if(!this.initialized){this.init();}if(!this.ids[B]){this.ids[B]={};}this.ids[B][C.id]=C;},removeDDFromGroup:function(D,B){if(!this.ids[B]){this.ids[B]={};}var C=this.ids[B];if(C&&C[D.id]){delete C[D.id];}},_remove:function(C){for(var B in C.groups){if(B&&this.ids[B][C.id]){delete this.ids[B][C.id];}}delete this.handleIds[C.id];},regHandle:function(C,B){if(!this.handleIds[C]){this.handleIds[C]={};}this.handleIds[C][B]=B;},isDragDrop:function(B){return(this.getDDById(B))?true:false;},getRelated:function(G,C){var F=[];for(var E in G.groups){for(var D in this.ids[E]){var B=this.ids[E][D];if(!this.isTypeOfDD(B)){continue;}if(!C||B.isTarget){F[F.length]=B;}}}return F;},isLegalTarget:function(F,E){var C=this.getRelated(F,true);for(var D=0,B=C.length;D<B;++D){if(C[D].id==E.id){return true;}}return false;},isTypeOfDD:function(B){return(B&&B.__ygDragDrop);},isHandle:function(C,B){return(this.handleIds[C]&&this.handleIds[C][B]);},getDDById:function(C){for(var B in this.ids){if(this.ids[B][C]){return this.ids[B][C];}}return null;},handleMouseDown:function(D,C){this.currentTarget=YAHOO.util.Event.getTarget(D);this.dragCurrent=C;var B=C.getEl();this.startX=YAHOO.util.Event.getPageX(D);this.startY=YAHOO.util.Event.getPageY(D);this.deltaX=this.startX-B.offsetLeft;this.deltaY=this.startY-B.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var E=YAHOO.util.DDM;E.startDrag(E.startX,E.startY);E.fromTimeout=true;},this.clickTimeThresh);},startDrag:function(B,D){clearTimeout(this.clickTimeout);var C=this.dragCurrent;if(C&&C.events.b4StartDrag){C.b4StartDrag(B,D);C.fireEvent("b4StartDragEvent",{x:B,y:D});}if(C&&C.events.startDrag){C.startDrag(B,D);C.fireEvent("startDragEvent",{x:B,y:D});}this.dragThreshMet=true;},handleMouseUp:function(B){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){if(this.fromTimeout){this.fromTimeout=false;this.handleMouseMove(B);}this.fromTimeout=false;this.fireEvents(B,true);}else{}this.stopDrag(B);this.stopEvent(B);}},stopEvent:function(B){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(B);}if(this.preventDefault){YAHOO.util.Event.preventDefault(B);}},stopDrag:function(D,C){var B=this.dragCurrent;if(B&&!C){if(this.dragThreshMet){if(B.events.b4EndDrag){B.b4EndDrag(D);B.fireEvent("b4EndDragEvent",{e:D});}if(B.events.endDrag){B.endDrag(D);B.fireEvent("endDragEvent",{e:D});}}if(B.events.mouseUp){B.onMouseUp(D);B.fireEvent("mouseUpEvent",{e:D});}}this.dragCurrent=null;this.dragOvers={};},handleMouseMove:function(E){var B=this.dragCurrent;if(B){if(YAHOO.util.Event.isIE&&!E.button){this.stopEvent(E);return this.handleMouseUp(E);}else{if(E.clientX<0||E.clientY<0){}}if(!this.dragThreshMet){var D=Math.abs(this.startX-YAHOO.util.Event.getPageX(E));var C=Math.abs(this.startY-YAHOO.util.Event.getPageY(E));if(D>this.clickPixelThresh||C>this.clickPixelThresh){this.startDrag(this.startX,this.startY);}}if(this.dragThreshMet){if(B&&B.events.b4Drag){B.b4Drag(E);B.fireEvent("b4DragEvent",{e:E});}if(B&&B.events.drag){B.onDrag(E);B.fireEvent("dragEvent",{e:E});}if(B){this.fireEvents(E,false);}}this.stopEvent(E);}},fireEvents:function(U,K){var Z=this.dragCurrent;if(!Z||Z.isLocked()||Z.dragOnly){return ;}var M=YAHOO.util.Event.getPageX(U),L=YAHOO.util.Event.getPageY(U),O=new YAHOO.util.Point(M,L),J=Z.getTargetCoord(O.x,O.y),E=Z.getDragEl(),D=["out","over","drop","enter"],T=new YAHOO.util.Region(J.y,J.x+E.offsetWidth,J.y+E.offsetHeight,J.x),H=[],C={},P=[],a={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var R in this.dragOvers){var c=this.dragOvers[R];if(!this.isTypeOfDD(c)){continue;}if(!this.isOverTarget(O,c,this.mode,T)){a.outEvts.push(c);}H[R]=true;delete this.dragOvers[R];}for(var Q in Z.groups){if("string"!=typeof Q){continue;}for(R in this.ids[Q]){var F=this.ids[Q][R];if(!this.isTypeOfDD(F)){continue;}if(F.isTarget&&!F.isLocked()&&F!=Z){if(this.isOverTarget(O,F,this.mode,T)){C[Q]=true;if(K){a.dropEvts.push(F);}else{if(!H[F.id]){a.enterEvts.push(F);}else{a.overEvts.push(F);}this.dragOvers[F.id]=F;}}}}}this.interactionInfo={out:a.outEvts,enter:a.enterEvts,over:a.overEvts,drop:a.dropEvts,point:O,draggedRegion:T,sourceRegion:this.locationCache[Z.id],validDrop:K};for(var B in C){P.push(B);}if(K&&!a.dropEvts.length){this.interactionInfo.validDrop=false;if(Z.events.invalidDrop){Z.onInvalidDrop(U);Z.fireEvent("invalidDropEvent",{e:U});}}for(R=0;R<D.length;R++){var X=null;if(a[D[R]+"Evts"]){X=a[D[R]+"Evts"];}if(X&&X.length){var G=D[R].charAt(0).toUpperCase()+D[R].substr(1),W="onDrag"+G,I="b4Drag"+G,N="drag"+G+"Event",V="drag"+G;if(this.mode){if(Z.events[I]){Z[I](U,X,P);Z.fireEvent(I+"Event",{event:U,info:X,group:P});}if(Z.events[V]){Z[W](U,X,P);Z.fireEvent(N,{event:U,info:X,group:P});}}else{for(var Y=0,S=X.length;Y<S;++Y){if(Z.events[I]){Z[I](U,X[Y].id,P[0]);Z.fireEvent(I+"Event",{event:U,info:X[Y].id,group:P[0]});}if(Z.events[V]){Z[W](U,X[Y].id,P[0]);Z.fireEvent(N,{event:U,info:X[Y].id,group:P[0]});
}}}}}},getBestMatch:function(D){var F=null;var C=D.length;if(C==1){F=D[0];}else{for(var E=0;E<C;++E){var B=D[E];if(this.mode==this.INTERSECT&&B.cursorIsOver){F=B;break;}else{if(!F||!F.overlap||(B.overlap&&F.overlap.getArea()<B.overlap.getArea())){F=B;}}}}return F;},refreshCache:function(C){var E=C||this.ids;for(var B in E){if("string"!=typeof B){continue;}for(var D in this.ids[B]){var F=this.ids[B][D];if(this.isTypeOfDD(F)){var G=this.getLocation(F);if(G){this.locationCache[F.id]=G;}else{delete this.locationCache[F.id];}}}}},verifyEl:function(C){try{if(C){var B=C.offsetParent;if(B){return true;}}}catch(D){}return false;},getLocation:function(G){if(!this.isTypeOfDD(G)){return null;}var E=G.getEl(),J,D,C,L,K,M,B,I,F;try{J=YAHOO.util.Dom.getXY(E);}catch(H){}if(!J){return null;}D=J[0];C=D+E.offsetWidth;L=J[1];K=L+E.offsetHeight;M=L-G.padding[0];B=C+G.padding[1];I=K+G.padding[2];F=D-G.padding[3];return new YAHOO.util.Region(M,B,I,F);},isOverTarget:function(J,B,D,E){var F=this.locationCache[B.id];if(!F||!this.useCache){F=this.getLocation(B);this.locationCache[B.id]=F;}if(!F){return false;}B.cursorIsOver=F.contains(J);var I=this.dragCurrent;if(!I||(!D&&!I.constrainX&&!I.constrainY)){return B.cursorIsOver;}B.overlap=null;if(!E){var G=I.getTargetCoord(J.x,J.y);var C=I.getDragEl();E=new YAHOO.util.Region(G.y,G.x+C.offsetWidth,G.y+C.offsetHeight,G.x);}var H=E.intersect(F);if(H){B.overlap=H;return(D)?true:B.cursorIsOver;}else{return false;}},_onUnload:function(C,B){this.unregAll();},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null;}this._execOnAll("unreg",[]);this.ids={};},elementCache:{},getElWrapper:function(C){var B=this.elementCache[C];if(!B||!B.el){B=this.elementCache[C]=new this.ElementWrapper(YAHOO.util.Dom.get(C));}return B;},getElement:function(B){return YAHOO.util.Dom.get(B);},getCss:function(C){var B=YAHOO.util.Dom.get(C);return(B)?B.style:null;},ElementWrapper:function(B){this.el=B||null;this.id=this.el&&B.id;this.css=this.el&&B.style;},getPosX:function(B){return YAHOO.util.Dom.getX(B);},getPosY:function(B){return YAHOO.util.Dom.getY(B);},swapNode:function(D,B){if(D.swapNode){D.swapNode(B);}else{var E=B.parentNode;var C=B.nextSibling;if(C==D){E.insertBefore(D,B);}else{if(B==D.nextSibling){E.insertBefore(B,D);}else{D.parentNode.replaceChild(B,D);E.insertBefore(D,C);}}}},getScroll:function(){var D,B,E=document.documentElement,C=document.body;if(E&&(E.scrollTop||E.scrollLeft)){D=E.scrollTop;B=E.scrollLeft;}else{if(C){D=C.scrollTop;B=C.scrollLeft;}else{}}return{top:D,left:B};},getStyle:function(C,B){return YAHOO.util.Dom.getStyle(C,B);},getScrollTop:function(){return this.getScroll().top;},getScrollLeft:function(){return this.getScroll().left;},moveToEl:function(B,D){var C=YAHOO.util.Dom.getXY(D);YAHOO.util.Dom.setXY(B,C);},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight();},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth();},numericSort:function(C,B){return(C-B);},_timeoutCount:0,_addListeners:function(){var B=YAHOO.util.DDM;if(YAHOO.util.Event&&document){B._onLoad();}else{if(B._timeoutCount>2000){}else{setTimeout(B._addListeners,10);if(document&&document.body){B._timeoutCount+=1;}}}},handleWasClicked:function(B,D){if(this.isHandle(D,B.id)){return true;}else{var C=B.parentNode;while(C){if(this.isHandle(D,C.id)){return true;}else{C=C.parentNode;}}}return false;}};}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners();}(function(){var A=YAHOO.util.Event;var B=YAHOO.util.Dom;YAHOO.util.DragDrop=function(E,C,D){if(E){this.init(E,C,D);}};YAHOO.util.DragDrop.prototype={events:null,on:function(){this.subscribe.apply(this,arguments);},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isTarget:true,padding:null,dragOnly:false,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:function(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:function(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=B.get(this.id);}return this._domRef;},getDragEl:function(){return B.get(this.dragElId);},init:function(F,C,D){this.initTarget(F,C,D);A.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);for(var E in this.events){this.createEvent(E+"Event");}},initTarget:function(E,C,D){this.config=D||{};this.events={};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof E!=="string"){this._domRef=E;E=B.generateId(E);}this.id=E;this.addToGroup((C)?C:"default");this.handleElId=E;A.onAvailable(E,this.handleOnAvailable,this,true);this.setDragElId(E);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();},applyConfig:function(){this.events={mouseDown:true,b4MouseDown:true,mouseUp:true,b4StartDrag:true,startDrag:true,b4EndDrag:true,endDrag:true,drag:true,b4Drag:true,invalidDrop:true,b4DragOut:true,dragOut:true,dragEnter:true,b4DragOver:true,dragOver:true,b4DragDrop:true,dragDrop:true};if(this.config.events){for(var C in this.config.events){if(this.config.events[C]===false){this.events[C]=false;}}}this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);this.dragOnly=((this.config.dragOnly===true)?true:false);
},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable();},setPadding:function(E,C,F,D){if(!C&&0!==C){this.padding=[E,E,E,E];}else{if(!F&&0!==F){this.padding=[E,C,E,C];}else{this.padding=[E,C,F,D];}}},setInitPosition:function(F,E){var G=this.getEl();if(!this.DDM.verifyEl(G)){if(G&&G.style&&(G.style.display=="none")){}else{}return ;}var D=F||0;var C=E||0;var H=B.getXY(G);this.initPageX=H[0]-D;this.initPageY=H[1]-C;this.lastPageX=H[0];this.lastPageY=H[1];this.setStartPosition(H);},setStartPosition:function(D){var C=D||B.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=C[0];this.startPageY=C[1];},addToGroup:function(C){this.groups[C]=true;this.DDM.regDragDrop(this,C);},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C];}this.DDM.removeDDFromGroup(this,C);},setDragElId:function(C){this.dragElId=C;},setHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.handleElId=C;this.DDM.regHandle(this.id,C);},setOuterHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}A.on(C,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(C);this.hasOuterHandles=true;},unreg:function(){A.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this);},isLocked:function(){return(this.DDM.isLocked()||this.locked);},handleMouseDown:function(H,G){var D=H.which||H.button;if(this.primaryButtonOnly&&D>1){return ;}if(this.isLocked()){return ;}var C=this.b4MouseDown(H);if(this.events.b4MouseDown){C=this.fireEvent("b4MouseDownEvent",H);}var E=this.onMouseDown(H);if(this.events.mouseDown){E=this.fireEvent("mouseDownEvent",H);}if((C===false)||(E===false)){return ;}this.DDM.refreshCache(this.groups);var F=new YAHOO.util.Point(A.getPageX(H),A.getPageY(H));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(F,this)){}else{if(this.clickValidator(H)){this.setStartPosition();this.DDM.handleMouseDown(H,this);this.DDM.stopEvent(H);}else{}}},clickValidator:function(D){var C=YAHOO.util.Event.getTarget(D);return(this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.handleWasClicked(C,this.id)));},getTargetCoord:function(E,D){var C=E-this.deltaX;var F=D-this.deltaY;if(this.constrainX){if(C<this.minX){C=this.minX;}if(C>this.maxX){C=this.maxX;}}if(this.constrainY){if(F<this.minY){F=this.minY;}if(F>this.maxY){F=this.maxY;}}C=this.getTick(C,this.xTicks);F=this.getTick(F,this.yTicks);return{x:C,y:F};},addInvalidHandleType:function(C){var D=C.toUpperCase();this.invalidHandleTypes[D]=D;},addInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.invalidHandleIds[C]=C;},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C);},removeInvalidHandleType:function(C){var D=C.toUpperCase();delete this.invalidHandleTypes[D];},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}delete this.invalidHandleIds[C];},removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.length;E<C;++E){if(this.invalidHandleClasses[E]==D){delete this.invalidHandleClasses[E];}}},isValidHandleChild:function(F){var E=true;var H;try{H=F.nodeName.toUpperCase();}catch(G){H=F.nodeName;}E=E&&!this.invalidHandleTypes[H];E=E&&!this.invalidHandleIds[F.id];for(var D=0,C=this.invalidHandleClasses.length;E&&D<C;++D){E=!B.hasClass(F,this.invalidHandleClasses[D]);}return E;},setXTicks:function(F,C){this.xTicks=[];this.xTickSize=C;var E={};for(var D=this.initPageX;D>=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}this.xTicks.sort(this.DDM.numericSort);},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}this.yTicks.sort(this.DDM.numericSort);},setXConstraint:function(E,D,C){this.leftConstraint=parseInt(E,10);this.rightConstraint=parseInt(D,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(C){this.setXTicks(this.initPageX,C);}this.constrainX=true;},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks();},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0;},setYConstraint:function(C,E,D){this.topConstraint=parseInt(C,10);this.bottomConstraint=parseInt(E,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(D){this.setYTicks(this.initPageY,D);}this.constrainY=true;},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C);}else{this.setInitPosition();}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize);}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize);}},getTick:function(I,F){if(!F){return I;}else{if(F[0]>=I){return F[0];}else{for(var D=0,C=F.length;D<C;++D){var E=D+1;if(F[E]&&F[E]>=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E];}}return F[F.length-1];}}},toString:function(){return("DragDrop "+this.id);}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider);})();YAHOO.util.DD=function(C,A,B){if(C){this.init(C,A,B);}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D);},setDelta:function(B,A){this.deltaX=B;this.deltaY=A;},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B);},alignElWithMouse:function(C,G,F){var E=this.getTargetCoord(G,F);if(!this.deltaSetXY){var H=[E.x,E.y];YAHOO.util.Dom.setXY(C,H);var D=parseInt(YAHOO.util.Dom.getStyle(C,"left"),10);var B=parseInt(YAHOO.util.Dom.getStyle(C,"top"),10);this.deltaSetXY=[D-E.x,B-E.y];
}else{YAHOO.util.Dom.setStyle(C,"left",(E.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(C,"top",(E.y+this.deltaSetXY[1])+"px");}this.cachePosition(E.x,E.y);var A=this;setTimeout(function(){A.autoScroll.call(A,E.x,E.y,C.offsetHeight,C.offsetWidth);},0);},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A;}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1];}},autoScroll:function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G<C){window.scrollTo(D,N+A);}if(I<N&&N>0&&I-N<C){window.scrollTo(D,N-A);}if(M>B&&F<C){window.scrollTo(D+A,N);}if(J<D&&D>0&&J-D<C){window.scrollTo(D-A,N);}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false);},b4MouseDown:function(A){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},b4Drag:function(A){this.setDragElPos(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},toString:function(){return("DD "+this.id);}});YAHOO.util.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame();}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this,A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame();},50);return ;}var G=this.getDragEl(),E=YAHOO.util.Dom;if(!G){G=document.createElement("div");G.id=this.dragElId;var D=G.style;D.position="absolute";D.visibility="hidden";D.cursor="move";D.border="2px solid #aaa";D.zIndex=999;D.height="25px";D.width="25px";var C=document.createElement("div");E.setStyle(C,"height","100%");E.setStyle(C,"width","100%");E.setStyle(C,"background-color","#ccc");E.setStyle(C,"opacity","0");G.appendChild(C);if(YAHOO.env.ua.ie){var F=document.createElement("iframe");F.setAttribute("src","javascript:");F.setAttribute("scrolling","no");F.setAttribute("frameborder","0");G.insertBefore(F,G.firstChild);E.setStyle(F,"height","100%");E.setStyle(F,"width","100%");E.setStyle(F,"position","absolute");E.setStyle(F,"top","0");E.setStyle(F,"left","0");E.setStyle(F,"opacity","0");E.setStyle(F,"zIndex","-1");E.setStyle(F.nextSibling,"zIndex","2");}A.insertBefore(G,A.firstChild);}},initFrame:function(){this.createFrame();},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId);},showFrame:function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2));}this.setDragElPos(E,D);YAHOO.util.Dom.setStyle(A,"visibility","visible");},_resizeProxy:function(){if(this.resizeFrame){var H=YAHOO.util.Dom;var B=this.getEl();var C=this.getDragEl();var G=parseInt(H.getStyle(C,"borderTopWidth"),10);var I=parseInt(H.getStyle(C,"borderRightWidth"),10);var F=parseInt(H.getStyle(C,"borderBottomWidth"),10);var D=parseInt(H.getStyle(C,"borderLeftWidth"),10);if(isNaN(G)){G=0;}if(isNaN(I)){I=0;}if(isNaN(F)){F=0;}if(isNaN(D)){D=0;}var E=Math.max(0,B.offsetWidth-I-D);var A=Math.max(0,B.offsetHeight-G-F);H.setStyle(C,"width",E+"px");H.setStyle(C,"height",A+"px");}},b4MouseDown:function(B){this.setStartPosition();var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.autoOffset(A,C);},b4StartDrag:function(A,B){this.showFrame(A,B);},b4EndDrag:function(A){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden");},endDrag:function(D){var C=YAHOO.util.Dom;var B=this.getEl();var A=this.getDragEl();C.setStyle(A,"visibility","");C.setStyle(B,"visibility","hidden");YAHOO.util.DDM.moveToEl(B,A);C.setStyle(A,"visibility","hidden");C.setStyle(B,"visibility","");},toString:function(){return("DDProxy "+this.id);}});YAHOO.util.DDTarget=function(C,A,B){if(C){this.initTarget(C,A,B);}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id);}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.5.2",build:"1076"});
(function(){YAHOO.util.Config=function(D){if(D){this.init(D)}};var B=YAHOO.lang,C=YAHOO.util.CustomEvent,A=YAHOO.util.Config;A.CONFIG_CHANGED_EVENT="configChanged";A.BOOLEAN_TYPE="boolean";A.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(D){this.owner=D;this.configChangedEvent=this.createEvent(A.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=C.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[]},checkBoolean:function(D){return(typeof D==A.BOOLEAN_TYPE)},checkNumber:function(D){return(!isNaN(D))},fireEvent:function(D,F){var E=this.config[D];if(E&&E.event){E.event.fire(F)}},addProperty:function(E,D){E=E.toLowerCase();this.config[E]=D;D.event=this.createEvent(E,{scope:this.owner});D.event.signature=C.LIST;D.key=E;if(D.handler){D.event.subscribe(D.handler,this.owner)}this.setProperty(E,D.value,true);if(!D.suppressEvent){this.queueProperty(E,D.value)}},getConfig:function(){var D={},F,E;for(F in this.config){E=this.config[F];if(E&&E.event){D[F]=E.value}}return D},getProperty:function(D){var E=this.config[D.toLowerCase()];if(E&&E.event){return E.value}else{return undefined}},resetProperty:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event){if(this.initialConfig[D]&&!B.isUndefined(this.initialConfig[D])){this.setProperty(D,this.initialConfig[D]);return true}}else{return false}},setProperty:function(E,G,D){var F;E=E.toLowerCase();if(this.queueInProgress&&!D){this.queueProperty(E,G);return true}else{F=this.config[E];if(F&&F.event){if(F.validator&&!F.validator(G)){return false}else{F.value=G;if(!D){this.fireEvent(E,G);this.configChangedEvent.fire([E,G])}return true}}else{return false}}},queueProperty:function(S,P){S=S.toLowerCase();var R=this.config[S],K=false,J,G,H,I,O,Q,F,M,N,D,L,T,E;if(R&&R.event){if(!B.isUndefined(P)&&R.validator&&!R.validator(P)){return false}else{if(!B.isUndefined(P)){R.value=P}else{P=R.value}K=false;J=this.eventQueue.length;for(L=0;L<J;L++){G=this.eventQueue[L];if(G){H=G[0];I=G[1];if(H==S){this.eventQueue[L]=null;this.eventQueue.push([S,(!B.isUndefined(P)?P:I)]);K=true;break}}}if(!K&&!B.isUndefined(P)){this.eventQueue.push([S,P])}}if(R.supercedes){O=R.supercedes.length;for(T=0;T<O;T++){Q=R.supercedes[T];F=this.eventQueue.length;for(E=0;E<F;E++){M=this.eventQueue[E];if(M){N=M[0];D=M[1];if(N==Q.toLowerCase()){this.eventQueue.push([N,D]);this.eventQueue[E]=null;break}}}}}return true}else{return false}},refireEvent:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event&&!B.isUndefined(E.value)){if(this.queueInProgress){this.queueProperty(D)}else{this.fireEvent(D,E.value)}}},applyConfig:function(D,G){var F,E;if(G){E={};for(F in D){if(B.hasOwnProperty(D,F)){E[F.toLowerCase()]=D[F]}}this.initialConfig=E}for(F in D){if(B.hasOwnProperty(D,F)){this.queueProperty(F,D[F])}}},refresh:function(){var D;for(D in this.config){this.refireEvent(D)}},fireQueue:function(){var E,H,D,G,F;this.queueInProgress=true;for(E=0;E<this.eventQueue.length;E++){H=this.eventQueue[E];if(H){D=H[0];G=H[1];F=this.config[D];F.value=G;this.fireEvent(D,G)}}this.queueInProgress=false;this.eventQueue=[]},subscribeToConfigEvent:function(E,F,H,D){var G=this.config[E.toLowerCase()];if(G&&G.event){if(!A.alreadySubscribed(G.event,F,H)){G.event.subscribe(F,H,D)}return true}else{return false}},unsubscribeFromConfigEvent:function(D,E,G){var F=this.config[D.toLowerCase()];if(F&&F.event){return F.event.unsubscribe(E,G)}else{return false}},toString:function(){var D="Config";if(this.owner){D+=" ["+this.owner.toString()+"]"}return D},outputEventQueue:function(){var D="",G,E,F=this.eventQueue.length;for(E=0;E<F;E++){G=this.eventQueue[E];if(G){D+=G[0]+"="+G[1]+", "}}return D},destroy:function(){var E=this.config,D,F;for(D in E){if(B.hasOwnProperty(E,D)){F=E[D];F.event.unsubscribeAll();F.event=null}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null}};A.alreadySubscribed=function(E,H,I){var F=E.subscribers.length,D,G;if(F>0){G=F-1;do{D=E.subscribers[G];if(D&&D.obj==I&&D.fn==H){return true}}while(G--)}return false};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Module=function(Q,P){if(Q){this.init(Q,P)}else{}};var F=YAHOO.util.Dom,D=YAHOO.util.Config,M=YAHOO.util.Event,L=YAHOO.util.CustomEvent,G=YAHOO.widget.Module,H,O,N,E,A={BEFORE_INIT:"beforeInit",INIT:"init",APPEND:"append",BEFORE_RENDER:"beforeRender",RENDER:"render",CHANGE_HEADER:"changeHeader",CHANGE_BODY:"changeBody",CHANGE_FOOTER:"changeFooter",CHANGE_CONTENT:"changeContent",DESTORY:"destroy",BEFORE_SHOW:"beforeShow",SHOW:"show",BEFORE_HIDE:"beforeHide",HIDE:"hide"},I={VISIBLE:{key:"visible",value:true,validator:YAHOO.lang.isBoolean},EFFECT:{key:"effect",suppressEvent:true,supercedes:["visible"]},MONITOR_RESIZE:{key:"monitorresize",value:true},APPEND_TO_DOCUMENT_BODY:{key:"appendtodocumentbody",value:false}};G.IMG_ROOT=null;G.IMG_ROOT_SSL=null;G.CSS_MODULE="yui-module";G.CSS_HEADER="hd";G.CSS_BODY="bd";G.CSS_FOOTER="ft";G.RESIZE_MONITOR_SECURE_URL="javascript:false;";G.textResizeEvent=new L("textResize");function K(){if(!H){H=document.createElement("div");H.innerHTML=('<div class="'+G.CSS_HEADER+'"></div><div class="'+G.CSS_BODY+'"></div><div class="'+G.CSS_FOOTER+'"></div>');O=H.firstChild;N=O.nextSibling;E=N.nextSibling}return H}function J(){if(!O){K()}return(O.cloneNode(false))}function B(){if(!N){K()}return(N.cloneNode(false))}function C(){if(!E){K()}return(E.cloneNode(false))}G.prototype={constructor:G,element:null,header:null,body:null,footer:null,id:null,imageRoot:G.IMG_ROOT,initEvents:function(){var P=L.LIST;this.beforeInitEvent=this.createEvent(A.BEFORE_INIT);this.beforeInitEvent.signature=P;this.initEvent=this.createEvent(A.INIT);this.initEvent.signature=P;this.appendEvent=this.createEvent(A.APPEND);this.appendEvent.signature=P;this.beforeRenderEvent=this.createEvent(A.BEFORE_RENDER);this.beforeRenderEvent.signature=P;this.renderEvent=this.createEvent(A.RENDER);this.renderEvent.signature=P;this.changeHeaderEvent=this.createEvent(A.CHANGE_HEADER);this.changeHeaderEvent.signature=P;this.changeBodyEvent=this.createEvent(A.CHANGE_BODY);this.changeBodyEvent.signature=P;this.changeFooterEvent=this.createEvent(A.CHANGE_FOOTER);this.changeFooterEvent.signature=P;this.changeContentEvent=this.createEvent(A.CHANGE_CONTENT);this.changeContentEvent.signature=P;this.destroyEvent=this.createEvent(A.DESTORY);this.destroyEvent.signature=P;this.beforeShowEvent=this.createEvent(A.BEFORE_SHOW);this.beforeShowEvent.signature=P;this.showEvent=this.createEvent(A.SHOW);this.showEvent.signature=P;this.beforeHideEvent=this.createEvent(A.BEFORE_HIDE);this.beforeHideEvent.signature=P;this.hideEvent=this.createEvent(A.HIDE);this.hideEvent.signature=P},platform:function(){var P=navigator.userAgent.toLowerCase();if(P.indexOf("windows")!=-1||P.indexOf("win32")!=-1){return"windows"}else{if(P.indexOf("macintosh")!=-1){return"mac"}else{return false}}}(),browser:function(){var P=navigator.userAgent.toLowerCase();if(P.indexOf("opera")!=-1){return"opera"}else{if(P.indexOf("msie 7")!=-1){return"ie7"}else{if(P.indexOf("msie")!=-1){return"ie"}else{if(P.indexOf("safari")!=-1){return"safari"}else{if(P.indexOf("gecko")!=-1){return"gecko"}else{return false}}}}}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true}else{return false}}(),initDefaultConfig:function(){this.cfg.addProperty(I.VISIBLE.key,{handler:this.configVisible,value:I.VISIBLE.value,validator:I.VISIBLE.validator});this.cfg.addProperty(I.EFFECT.key,{suppressEvent:I.EFFECT.suppressEvent,supercedes:I.EFFECT.supercedes});this.cfg.addProperty(I.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:I.MONITOR_RESIZE.value});this.cfg.addProperty(I.APPEND_TO_DOCUMENT_BODY.key,{value:I.APPEND_TO_DOCUMENT_BODY.value})},init:function(U,T){var R,V;this.initEvents();this.beforeInitEvent.fire(G);this.cfg=new D(this);if(this.isSecure){this.imageRoot=G.IMG_ROOT_SSL}if(typeof U=="string"){R=U;U=document.getElementById(U);if(!U){U=(K()).cloneNode(false);U.id=R}}this.element=U;if(U.id){this.id=U.id}V=this.element.firstChild;if(V){var Q=false,P=false,S=false;do{if(1==V.nodeType){if(!Q&&F.hasClass(V,G.CSS_HEADER)){this.header=V;Q=true}else{if(!P&&F.hasClass(V,G.CSS_BODY)){this.body=V;P=true}else{if(!S&&F.hasClass(V,G.CSS_FOOTER)){this.footer=V;S=true}}}}}while((V=V.nextSibling))}this.initDefaultConfig();F.addClass(this.element,G.CSS_MODULE);if(T){this.cfg.applyConfig(T,true)}if(!D.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true)}this.initEvent.fire(G)},initResizeMonitor:function(){var Q=(YAHOO.env.ua.gecko&&this.platform=="windows");if(Q){var P=this;setTimeout(function(){P._initResizeMonitor()},0)}else{this._initResizeMonitor()}},_initResizeMonitor:function(){var P,R,T;function V(){G.textResizeEvent.fire()}if(!YAHOO.env.ua.opera){R=F.get("_yuiResizeMonitor");var U=this._supportsCWResize();if(!R){R=document.createElement("iframe");if(this.isSecure&&G.RESIZE_MONITOR_SECURE_URL&&YAHOO.env.ua.ie){R.src=G.RESIZE_MONITOR_SECURE_URL}if(!U){T=["<html><head><script ",'type="text/javascript">',"window.onresize=function(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();};<","/script></head>","<body></body></html>"].join("");R.src="data:text/html;charset=utf-8,"+encodeURIComponent(T)}R.id="_yuiResizeMonitor";R.style.position="absolute";R.style.visibility="hidden";var Q=document.body,S=Q.firstChild;if(S){Q.insertBefore(R,S)}else{Q.appendChild(R)}R.style.width="10em";R.style.height="10em";R.style.top=(-1*R.offsetHeight)+"px";R.style.left=(-1*R.offsetWidth)+"px";R.style.borderWidth="0";R.style.visibility="visible";if(YAHOO.env.ua.webkit){P=R.contentWindow.document;P.open();P.close()}}if(R&&R.contentWindow){G.textResizeEvent.subscribe(this.onDomResize,this,true);if(!G.textResizeInitialized){if(U){if(!M.on(R.contentWindow,"resize",V)){M.on(R,"resize",V)}}G.textResizeInitialized=true}this.resizeMonitor=R}}},_supportsCWResize:function(){var P=true;if(YAHOO.env.ua.gecko&&YAHOO.env.ua.gecko<=1.8){P=false}return P},onDomResize:function(S,R){var Q=-1*this.resizeMonitor.offsetWidth,P=-1*this.resizeMonitor.offsetHeight;this.resizeMonitor.style.top=P+"px";this.resizeMonitor.style.left=Q+"px"},setHeader:function(Q){var P=this.header||(this.header=J());if(Q.nodeName){P.innerHTML="";P.appendChild(Q)}else{P.innerHTML=Q}this.changeHeaderEvent.fire(Q);this.changeContentEvent.fire()},appendToHeader:function(Q){var P=this.header||(this.header=J());P.appendChild(Q);this.changeHeaderEvent.fire(Q);this.changeContentEvent.fire()},setBody:function(Q){var P=this.body||(this.body=B());if(Q.nodeName){P.innerHTML="";P.appendChild(Q)}else{P.innerHTML=Q}this.changeBodyEvent.fire(Q);this.changeContentEvent.fire()},appendToBody:function(Q){var P=this.body||(this.body=B());P.appendChild(Q);this.changeBodyEvent.fire(Q);this.changeContentEvent.fire()},setFooter:function(Q){var P=this.footer||(this.footer=C());if(Q.nodeName){P.innerHTML="";P.appendChild(Q)}else{P.innerHTML=Q}this.changeFooterEvent.fire(Q);this.changeContentEvent.fire()},appendToFooter:function(Q){var P=this.footer||(this.footer=C());P.appendChild(Q);this.changeFooterEvent.fire(Q);this.changeContentEvent.fire()},render:function(R,P){var S=this,T;function Q(U){if(typeof U=="string"){U=document.getElementById(U)}if(U){S._addToParent(U,S.element);S.appendEvent.fire()}}this.beforeRenderEvent.fire();if(!P){P=this.element}if(R){Q(R)}else{if(!F.inDocument(this.element)){return false}}if(this.header&&!F.inDocument(this.header)){T=P.firstChild;if(T){P.insertBefore(this.header,T)}else{P.appendChild(this.header)}}if(this.body&&!F.inDocument(this.body)){if(this.footer&&F.isAncestor(this.moduleElement,this.footer)){P.insertBefore(this.body,this.footer)}else{P.appendChild(this.body)}}if(this.footer&&!F.inDocument(this.footer)){P.appendChild(this.footer)}this.renderEvent.fire();return true},destroy:function(){var P,Q;if(this.element){M.purgeElement(this.element,true);P=this.element.parentNode}if(P){P.removeChild(this.element)}this.element=null;this.header=null;this.body=null;this.footer=null;G.textResizeEvent.unsubscribe(this.onDomResize,this);this.cfg.destroy();this.cfg=null;this.destroyEvent.fire();for(Q in this){if(Q instanceof L){Q.unsubscribeAll()}}},show:function(){this.cfg.setProperty("visible",true)},hide:function(){this.cfg.setProperty("visible",false)},configVisible:function(Q,P,R){var S=P[0];if(S){this.beforeShowEvent.fire();F.setStyle(this.element,"display","block");this.showEvent.fire()}else{this.beforeHideEvent.fire();F.setStyle(this.element,"display","none");this.hideEvent.fire()}},configMonitorResize:function(R,Q,S){var P=Q[0];if(P){this.initResizeMonitor()}else{G.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null}},_addToParent:function(P,Q){if(!this.cfg.getProperty("appendtodocumentbody")&&P===document.body&&P.firstChild){P.insertBefore(Q,P.firstChild)}else{P.appendChild(Q)}},toString:function(){return"Module "+this.id}};YAHOO.lang.augmentProto(G,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Overlay=function(L,K){YAHOO.widget.Overlay.superclass.constructor.call(this,L,K)};var F=YAHOO.lang,I=YAHOO.util.CustomEvent,E=YAHOO.widget.Module,J=YAHOO.util.Event,D=YAHOO.util.Dom,C=YAHOO.util.Config,B=YAHOO.widget.Overlay,G,A={BEFORE_MOVE:"beforeMove",MOVE:"move"},H={X:{key:"x",validator:F.isNumber,suppressEvent:true,supercedes:["iframe"]},Y:{key:"y",validator:F.isNumber,suppressEvent:true,supercedes:["iframe"]},XY:{key:"xy",suppressEvent:true,supercedes:["iframe"]},CONTEXT:{key:"context",suppressEvent:true,supercedes:["iframe"]},FIXED_CENTER:{key:"fixedcenter",value:false,validator:F.isBoolean,supercedes:["iframe","visible"]},WIDTH:{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},HEIGHT:{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},ZINDEX:{key:"zindex",value:null},CONSTRAIN_TO_VIEWPORT:{key:"constraintoviewport",value:false,validator:F.isBoolean,supercedes:["iframe","x","y","xy"]},IFRAME:{key:"iframe",value:(YAHOO.env.ua.ie==6?true:false),validator:F.isBoolean,supercedes:["zindex"]}};B.IFRAME_SRC="javascript:false;";B.IFRAME_OFFSET=3;B.VIEWPORT_OFFSET=10;B.TOP_LEFT="tl";B.TOP_RIGHT="tr";B.BOTTOM_LEFT="bl";B.BOTTOM_RIGHT="br";B.CSS_OVERLAY="yui-overlay";B.windowScrollEvent=new I("windowScroll");B.windowResizeEvent=new I("windowResize");B.windowScrollHandler=function(K){if(YAHOO.env.ua.ie){if(!window.scrollEnd){window.scrollEnd=-1}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){B.windowScrollEvent.fire()},1)}else{B.windowScrollEvent.fire()}};B.windowResizeHandler=function(K){if(YAHOO.env.ua.ie){if(!window.resizeEnd){window.resizeEnd=-1}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){B.windowResizeEvent.fire()},100)}else{B.windowResizeEvent.fire()}};B._initialized=null;if(B._initialized===null){J.on(window,"scroll",B.windowScrollHandler);J.on(window,"resize",B.windowResizeHandler);B._initialized=true}YAHOO.extend(B,E,{init:function(L,K){B.superclass.init.call(this,L);this.beforeInitEvent.fire(B);D.addClass(this.element,B.CSS_OVERLAY);if(K){this.cfg.applyConfig(K,true)}if(this.platform=="mac"&&YAHOO.env.ua.gecko){if(!C.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true)}if(!C.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true)}}this.initEvent.fire(B)},initEvents:function(){B.superclass.initEvents.call(this);var K=I.LIST;this.beforeMoveEvent=this.createEvent(A.BEFORE_MOVE);this.beforeMoveEvent.signature=K;this.moveEvent=this.createEvent(A.MOVE);this.moveEvent.signature=K},initDefaultConfig:function(){B.superclass.initDefaultConfig.call(this);this.cfg.addProperty(H.X.key,{handler:this.configX,validator:H.X.validator,suppressEvent:H.X.suppressEvent,supercedes:H.X.supercedes});this.cfg.addProperty(H.Y.key,{handler:this.configY,validator:H.Y.validator,suppressEvent:H.Y.suppressEvent,supercedes:H.Y.supercedes});this.cfg.addProperty(H.XY.key,{handler:this.configXY,suppressEvent:H.XY.suppressEvent,supercedes:H.XY.supercedes});this.cfg.addProperty(H.CONTEXT.key,{handler:this.configContext,suppressEvent:H.CONTEXT.suppressEvent,supercedes:H.CONTEXT.supercedes});this.cfg.addProperty(H.FIXED_CENTER.key,{handler:this.configFixedCenter,value:H.FIXED_CENTER.value,validator:H.FIXED_CENTER.validator,supercedes:H.FIXED_CENTER.supercedes});this.cfg.addProperty(H.WIDTH.key,{handler:this.configWidth,suppressEvent:H.WIDTH.suppressEvent,supercedes:H.WIDTH.supercedes});this.cfg.addProperty(H.HEIGHT.key,{handler:this.configHeight,suppressEvent:H.HEIGHT.suppressEvent,supercedes:H.HEIGHT.supercedes});this.cfg.addProperty(H.ZINDEX.key,{handler:this.configzIndex,value:H.ZINDEX.value});this.cfg.addProperty(H.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:H.CONSTRAIN_TO_VIEWPORT.value,validator:H.CONSTRAIN_TO_VIEWPORT.validator,supercedes:H.CONSTRAIN_TO_VIEWPORT.supercedes});this.cfg.addProperty(H.IFRAME.key,{handler:this.configIframe,value:H.IFRAME.value,validator:H.IFRAME.validator,supercedes:H.IFRAME.supercedes})},moveTo:function(K,L){this.cfg.setProperty("xy",[K,L])},hideMacGeckoScrollbars:function(){D.removeClass(this.element,"show-scrollbars");D.addClass(this.element,"hide-scrollbars")},showMacGeckoScrollbars:function(){D.removeClass(this.element,"hide-scrollbars");D.addClass(this.element,"show-scrollbars")},configVisible:function(N,K,T){var M=K[0],O=D.getStyle(this.element,"visibility"),U=this.cfg.getProperty("effect"),R=[],Q=(this.platform=="mac"&&YAHOO.env.ua.gecko),b=C.alreadySubscribed,S,L,a,Y,X,W,Z,V,P;if(O=="inherit"){a=this.element.parentNode;while(a.nodeType!=9&&a.nodeType!=11){O=D.getStyle(a,"visibility");if(O!="inherit"){break}a=a.parentNode}if(O=="inherit"){O="visible"}}if(U){if(U instanceof Array){V=U.length;for(Y=0;Y<V;Y++){S=U[Y];R[R.length]=S.effect(this,S.duration)}}else{R[R.length]=U.effect(this,U.duration)}}if(M){if(Q){this.showMacGeckoScrollbars()}if(U){if(M){if(O!="visible"||O===""){this.beforeShowEvent.fire();P=R.length;for(X=0;X<P;X++){L=R[X];if(X===0&&!b(L.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){L.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true)}L.animateIn()}}}}else{if(O!="visible"||O===""){this.beforeShowEvent.fire();D.setStyle(this.element,"visibility","visible");this.cfg.refireEvent("iframe");this.showEvent.fire()}}}else{if(Q){this.hideMacGeckoScrollbars()}if(U){if(O=="visible"){this.beforeHideEvent.fire();P=R.length;for(W=0;W<P;W++){Z=R[W];if(W===0&&!b(Z.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){Z.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true)}Z.animateOut()}}else{if(O===""){D.setStyle(this.element,"visibility","hidden")}}}else{if(O=="visible"||O===""){this.beforeHideEvent.fire();D.setStyle(this.element,"visibility","hidden");this.hideEvent.fire()}}}},doCenterOnDOMEvent:function(){if(this.cfg.getProperty("visible")){this.center()}},configFixedCenter:function(O,M,P){var Q=M[0],L=C.alreadySubscribed,N=B.windowResizeEvent,K=B.windowScrollEvent;if(Q){this.center();if(!L(this.beforeShowEvent,this.center,this)){this.beforeShowEvent.subscribe(this.center)}if(!L(N,this.doCenterOnDOMEvent,this)){N.subscribe(this.doCenterOnDOMEvent,this,true)}if(!L(K,this.doCenterOnDOMEvent,this)){K.subscribe(this.doCenterOnDOMEvent,this,true)}}else{this.beforeShowEvent.unsubscribe(this.center);N.unsubscribe(this.doCenterOnDOMEvent,this);K.unsubscribe(this.doCenterOnDOMEvent,this)}},configHeight:function(N,L,O){var K=L[0],M=this.element;D.setStyle(M,"height",K);this.cfg.refireEvent("iframe")},configWidth:function(N,K,O){var M=K[0],L=this.element;D.setStyle(L,"width",M);this.cfg.refireEvent("iframe")},configzIndex:function(M,K,N){var O=K[0],L=this.element;if(!O){O=D.getStyle(L,"zIndex");if(!O||isNaN(O)){O=0}}if(this.iframe||this.cfg.getProperty("iframe")===true){if(O<=0){O=1}}D.setStyle(L,"zIndex",O);this.cfg.setProperty("zIndex",O,true);if(this.iframe){this.stackIframe()}},configXY:function(M,L,N){var P=L[0],K=P[0],O=P[1];this.cfg.setProperty("x",K);this.cfg.setProperty("y",O);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O])},configX:function(M,L,N){var K=L[0],O=this.cfg.getProperty("y");this.cfg.setProperty("x",K,true);this.cfg.setProperty("y",O,true);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");D.setX(this.element,K,true);this.cfg.setProperty("xy",[K,O],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O])},configY:function(M,L,N){var K=this.cfg.getProperty("x"),O=L[0];this.cfg.setProperty("x",K,true);this.cfg.setProperty("y",O,true);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");D.setY(this.element,O,true);this.cfg.setProperty("xy",[K,O],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O])},showIframe:function(){var L=this.iframe,K;if(L){K=this.element.parentNode;if(K!=L.parentNode){this._addToParent(K,L)}L.style.display="block"}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none"}},syncIframe:function(){var K=this.iframe,M=this.element,O=B.IFRAME_OFFSET,L=(O*2),N;if(K){K.style.width=(M.offsetWidth+L+"px");K.style.height=(M.offsetHeight+L+"px");N=this.cfg.getProperty("xy");if(!F.isArray(N)||(isNaN(N[0])||isNaN(N[1]))){this.syncPosition();N=this.cfg.getProperty("xy")}D.setXY(K,[(N[0]-O),(N[1]-O)])}},stackIframe:function(){if(this.iframe){var K=D.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(K)&&!isNaN(K)){D.setStyle(this.iframe,"zIndex",(K-1))}}},configIframe:function(N,M,O){var K=M[0];function P(){var R=this.iframe,S=this.element,T;if(!R){if(!G){G=document.createElement("iframe");if(this.isSecure){G.src=B.IFRAME_SRC}if(YAHOO.env.ua.ie){G.style.filter="alpha(opacity=0)";G.frameBorder=0}else{G.style.opacity="0"}G.style.position="absolute";G.style.border="none";G.style.margin="0";G.style.padding="0";G.style.display="none"}R=G.cloneNode(false);T=S.parentNode;var Q=T||document.body;this._addToParent(Q,R);this.iframe=R}this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true}}function L(){P.call(this);this.beforeShowEvent.unsubscribe(L);this._iframeDeferred=false}if(K){if(this.cfg.getProperty("visible")){P.call(this)}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(L);this._iframeDeferred=true}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false}}},_primeXYFromDOM:function(){if(YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))){this.syncPosition();this.cfg.refireEvent("xy");this.beforeShowEvent.unsubscribe(this._primeXYFromDOM)}},configConstrainToViewport:function(L,K,M){var N=K[0];if(N){if(!C.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true)}if(!C.alreadySubscribed(this.beforeShowEvent,this._primeXYFromDOM)){this.beforeShowEvent.subscribe(this._primeXYFromDOM)}}else{this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this)}},configContext:function(M,L,O){var Q=L[0],N,P,K;if(Q){N=Q[0];P=Q[1];K=Q[2];if(N){if(typeof N=="string"){this.cfg.setProperty("context",[document.getElementById(N),P,K],true)}if(P&&K){this.align(P,K)}}}},align:function(L,K){var Q=this.cfg.getProperty("context"),P=this,O,N,R;function M(S,T){switch(L){case B.TOP_LEFT:P.moveTo(T,S);break;case B.TOP_RIGHT:P.moveTo((T-N.offsetWidth),S);break;case B.BOTTOM_LEFT:P.moveTo(T,(S-N.offsetHeight));break;case B.BOTTOM_RIGHT:P.moveTo((T-N.offsetWidth),(S-N.offsetHeight));break}}if(Q){O=Q[0];N=this.element;P=this;if(!L){L=Q[1]}if(!K){K=Q[2]}if(N&&O){R=D.getRegion(O);switch(K){case B.TOP_LEFT:M(R.top,R.left);break;case B.TOP_RIGHT:M(R.top,R.right);break;case B.BOTTOM_LEFT:M(R.bottom,R.left);break;case B.BOTTOM_RIGHT:M(R.bottom,R.right);break}}}},enforceConstraints:function(L,K,M){var O=K[0];var N=this.getConstrainedXY(O[0],O[1]);this.cfg.setProperty("x",N[0],true);this.cfg.setProperty("y",N[1],true);this.cfg.setProperty("xy",N,true)},getConstrainedXY:function(V,T){var N=B.VIEWPORT_OFFSET,U=D.getViewportWidth(),Q=D.getViewportHeight(),M=this.element.offsetHeight,S=this.element.offsetWidth,Y=D.getDocumentScrollLeft(),W=D.getDocumentScrollTop();var P=V;var L=T;if(S+N<U){var R=Y+N;var X=Y+U-S-N;if(V<R){P=R}else{if(V>X){P=X}}}else{P=N+Y}if(M+N<Q){var O=W+N;var K=W+Q-M-N;if(T<O){L=O}else{if(T>K){L=K}}}else{L=N+W}return[P,L]},center:function(){var N=B.VIEWPORT_OFFSET,O=this.element.offsetWidth,M=this.element.offsetHeight,L=D.getViewportWidth(),P=D.getViewportHeight(),K,Q;if(O<L){K=(L/2)-(O/2)+D.getDocumentScrollLeft()}else{K=N+D.getDocumentScrollLeft()}if(M<P){Q=(P/2)-(M/2)+D.getDocumentScrollTop()}else{Q=N+D.getDocumentScrollTop()}this.cfg.setProperty("xy",[parseInt(K,10),parseInt(Q,10)]);this.cfg.refireEvent("iframe")},syncPosition:function(){var K=D.getXY(this.element);this.cfg.setProperty("x",K[0],true);this.cfg.setProperty("y",K[1],true);this.cfg.setProperty("xy",K,true)},onDomResize:function(M,L){var K=this;B.superclass.onDomResize.call(this,M,L);setTimeout(function(){K.syncPosition();K.cfg.refireEvent("iframe");K.cfg.refireEvent("context")},0)},bringToTop:function(){var O=[],N=this.element;function R(V,U){var X=D.getStyle(V,"zIndex"),W=D.getStyle(U,"zIndex"),T=(!X||isNaN(X))?0:parseInt(X,10),S=(!W||isNaN(W))?0:parseInt(W,10);if(T>S){return -1}else{if(T<S){return 1}else{return 0}}}function M(U){var S=D.hasClass(U,B.CSS_OVERLAY),T=YAHOO.widget.Panel;if(S&&!D.isAncestor(N,S)){if(T&&D.hasClass(U,T.CSS_PANEL)){O[O.length]=U.parentNode}else{O[O.length]=U}}}D.getElementsBy(M,"DIV",document.body);O.sort(R);var K=O[0],Q;if(K){Q=D.getStyle(K,"zIndex");if(!isNaN(Q)){var P=false;if(K!=N){P=true}else{if(O.length>1){var L=D.getStyle(O[1],"zIndex");if(!isNaN(L)&&(Q==L)){P=true}}}if(P){this.cfg.setProperty("zindex",(parseInt(Q,10)+2))}}}},destroy:function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe)}this.iframe=null;B.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);B.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);B.superclass.destroy.call(this)},toString:function(){return"Overlay "+this.id}})}());(function(){YAHOO.widget.OverlayManager=function(G){this.init(G)};var D=YAHOO.widget.Overlay,C=YAHOO.util.Event,E=YAHOO.util.Dom,B=YAHOO.util.Config,F=YAHOO.util.CustomEvent,A=YAHOO.widget.OverlayManager;A.CSS_FOCUSED="focused";A.prototype={constructor:A,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"})},init:function(I){this.cfg=new B(this);this.initDefaultConfig();if(I){this.cfg.applyConfig(I,true)}this.cfg.fireQueue();var H=null;this.getActive=function(){return H};this.focus=function(J){var K=this.find(J);if(K){if(H!=K){if(H){H.blur()}this.bringToTop(K);H=K;E.addClass(H.element,A.CSS_FOCUSED);K.focusEvent.fire()}}};this.remove=function(K){var M=this.find(K),J;if(M){if(H==M){H=null}var L=(M.element===null&&M.cfg===null)?true:false;if(!L){J=E.getStyle(M.element,"zIndex");M.cfg.setProperty("zIndex",-1000,true)}this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));M.hideEvent.unsubscribe(M.blur);M.destroyEvent.unsubscribe(this._onOverlayDestroy,M);if(!L){C.removeListener(M.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);M.cfg.setProperty("zIndex",J,true);M.cfg.setProperty("manager",null)}M.focusEvent.unsubscribeAll();M.blurEvent.unsubscribeAll();M.focusEvent=null;M.blurEvent=null;M.focus=null;M.blur=null}};this.blurAll=function(){var K=this.overlays.length,J;if(K>0){J=K-1;do{this.overlays[J].blur()}while(J--)}};this._onOverlayBlur=function(K,J){H=null};var G=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[]}if(G){this.register(G);this.overlays.sort(this.compareZIndexDesc)}},_onOverlayElementFocus:function(I){var G=C.getTarget(I),H=this.close;if(H&&(G==H||E.isAncestor(H,G))){this.blur()}else{this.focus()}},_onOverlayDestroy:function(H,G,I){this.remove(I)},register:function(G){var K=this,L,I,H,J;if(G instanceof D){G.cfg.addProperty("manager",{value:this});G.focusEvent=G.createEvent("focus");G.focusEvent.signature=F.LIST;G.blurEvent=G.createEvent("blur");G.blurEvent.signature=F.LIST;G.focus=function(){K.focus(this)};G.blur=function(){if(K.getActive()==this){E.removeClass(this.element,A.CSS_FOCUSED);this.blurEvent.fire()}};G.blurEvent.subscribe(K._onOverlayBlur);G.hideEvent.subscribe(G.blur);G.destroyEvent.subscribe(this._onOverlayDestroy,G,this);C.on(G.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus,null,G);L=E.getStyle(G.element,"zIndex");if(!isNaN(L)){G.cfg.setProperty("zIndex",parseInt(L,10))}else{G.cfg.setProperty("zIndex",0)}this.overlays.push(G);this.bringToTop(G);return true}else{if(G instanceof Array){I=0;J=G.length;for(H=0;H<J;H++){if(this.register(G[H])){I++}}if(I>0){return true}}else{return false}}},bringToTop:function(M){var I=this.find(M),L,G,J;if(I){J=this.overlays;J.sort(this.compareZIndexDesc);G=J[0];if(G){L=E.getStyle(G.element,"zIndex");if(!isNaN(L)){var K=false;if(G!==I){K=true}else{if(J.length>1){var H=E.getStyle(J[1].element,"zIndex");if(!isNaN(H)&&(L==H)){K=true}}}if(K){I.cfg.setProperty("zindex",(parseInt(L,10)+2))}}J.sort(this.compareZIndexDesc)}}},find:function(G){var I=this.overlays,J=I.length,H;if(J>0){H=J-1;if(G instanceof D){do{if(I[H]==G){return I[H]}}while(H--)}else{if(typeof G=="string"){do{if(I[H].id==G){return I[H]}}while(H--)}}return null}},compareZIndexDesc:function(J,I){var H=(J.cfg)?J.cfg.getProperty("zIndex"):null,G=(I.cfg)?I.cfg.getProperty("zIndex"):null;if(H===null&&G===null){return 0}else{if(H===null){return 1}else{if(G===null){return -1}else{if(H>G){return -1}else{if(H<G){return 1}else{return 0}}}}}},showAll:function(){var H=this.overlays,I=H.length,G;if(I>0){G=I-1;do{H[G].show()}while(G--)}},hideAll:function(){var H=this.overlays,I=H.length,G;if(I>0){G=I-1;do{H[G].hide()}while(G--)}},toString:function(){return"OverlayManager"}}}());(function(){YAHOO.widget.Tooltip=function(N,M){YAHOO.widget.Tooltip.superclass.constructor.call(this,N,M)};var E=YAHOO.lang,L=YAHOO.util.Event,K=YAHOO.util.CustomEvent,C=YAHOO.util.Dom,G=YAHOO.widget.Tooltip,F,H={PREVENT_OVERLAP:{key:"preventoverlap",value:true,validator:E.isBoolean,supercedes:["x","y","xy"]},SHOW_DELAY:{key:"showdelay",value:200,validator:E.isNumber},AUTO_DISMISS_DELAY:{key:"autodismissdelay",value:5000,validator:E.isNumber},HIDE_DELAY:{key:"hidedelay",value:250,validator:E.isNumber},TEXT:{key:"text",suppressEvent:true},CONTAINER:{key:"container"},DISABLED:{key:"disabled",value:false,suppressEvent:true}},A={CONTEXT_MOUSE_OVER:"contextMouseOver",CONTEXT_MOUSE_OUT:"contextMouseOut",CONTEXT_TRIGGER:"contextTrigger"};G.CSS_TOOLTIP="yui-tt";function I(N,M,O){var R=O[0],P=O[1],Q=this.cfg,S=Q.getProperty("width");if(S==P){Q.setProperty("width",R)}this.unsubscribe("hide",this._onHide,O)}function D(N,M){var O=document.body,S=this.cfg,R=S.getProperty("width"),P,Q;if((!R||R=="auto")&&(S.getProperty("container")!=O||S.getProperty("x")>=C.getViewportWidth()||S.getProperty("y")>=C.getViewportHeight())){Q=this.element.cloneNode(true);Q.style.visibility="hidden";Q.style.top="0px";Q.style.left="0px";O.appendChild(Q);P=(Q.offsetWidth+"px");O.removeChild(Q);Q=null;S.setProperty("width",P);S.refireEvent("xy");this.subscribe("hide",I,[(R||""),P])}}function B(N,M,O){this.render(O)}function J(){L.onDOMReady(B,this.cfg.getProperty("container"),this)}YAHOO.extend(G,YAHOO.widget.Overlay,{init:function(N,M){G.superclass.init.call(this,N);this.beforeInitEvent.fire(G);C.addClass(this.element,G.CSS_TOOLTIP);if(M){this.cfg.applyConfig(M,true)}this.cfg.queueProperty("visible",false);this.cfg.queueProperty("constraintoviewport",true);this.setBody("");this.subscribe("beforeShow",D);this.subscribe("init",J);this.subscribe("render",this.onRender);this.initEvent.fire(G)},initEvents:function(){G.superclass.initEvents.call(this);var M=K.LIST;this.contextMouseOverEvent=this.createEvent(A.CONTEXT_MOUSE_OVER);this.contextMouseOverEvent.signature=M;this.contextMouseOutEvent=this.createEvent(A.CONTEXT_MOUSE_OUT);this.contextMouseOutEvent.signature=M;this.contextTriggerEvent=this.createEvent(A.CONTEXT_TRIGGER);this.contextTriggerEvent.signature=M},initDefaultConfig:function(){G.superclass.initDefaultConfig.call(this);this.cfg.addProperty(H.PREVENT_OVERLAP.key,{value:H.PREVENT_OVERLAP.value,validator:H.PREVENT_OVERLAP.validator,supercedes:H.PREVENT_OVERLAP.supercedes});this.cfg.addProperty(H.SHOW_DELAY.key,{handler:this.configShowDelay,value:200,validator:H.SHOW_DELAY.validator});this.cfg.addProperty(H.AUTO_DISMISS_DELAY.key,{handler:this.configAutoDismissDelay,value:H.AUTO_DISMISS_DELAY.value,validator:H.AUTO_DISMISS_DELAY.validator});this.cfg.addProperty(H.HIDE_DELAY.key,{handler:this.configHideDelay,value:H.HIDE_DELAY.value,validator:H.HIDE_DELAY.validator});this.cfg.addProperty(H.TEXT.key,{handler:this.configText,suppressEvent:H.TEXT.suppressEvent});this.cfg.addProperty(H.CONTAINER.key,{handler:this.configContainer,value:document.body});this.cfg.addProperty(H.DISABLED.key,{handler:this.configContainer,value:H.DISABLED.value,supressEvent:H.DISABLED.suppressEvent})},configText:function(N,M,O){var P=M[0];if(P){this.setBody(P)}},configContainer:function(O,N,P){var M=N[0];if(typeof M=="string"){this.cfg.setProperty("container",document.getElementById(M),true)}},_removeEventListeners:function(){var P=this._context,M,O,N;if(P){M=P.length;if(M>0){N=M-1;do{O=P[N];L.removeListener(O,"mouseover",this.onContextMouseOver);L.removeListener(O,"mousemove",this.onContextMouseMove);L.removeListener(O,"mouseout",this.onContextMouseOut)}while(N--)}}},configContext:function(R,N,S){var Q=N[0],T,M,P,O;if(Q){if(!(Q instanceof Array)){if(typeof Q=="string"){this.cfg.setProperty("context",[document.getElementById(Q)],true)}else{this.cfg.setProperty("context",[Q],true)}Q=this.cfg.getProperty("context")}this._removeEventListeners();this._context=Q;T=this._context;if(T){M=T.length;if(M>0){O=M-1;do{P=T[O];L.on(P,"mouseover",this.onContextMouseOver,this);L.on(P,"mousemove",this.onContextMouseMove,this);L.on(P,"mouseout",this.onContextMouseOut,this)}while(O--)}}}},onContextMouseMove:function(N,M){M.pageX=L.getPageX(N);M.pageY=L.getPageY(N)},onContextMouseOver:function(O,N){var M=this;if(M.title){N._tempTitle=M.title;M.title=""}if(N.fireEvent("contextMouseOver",M,O)!==false&&!N.cfg.getProperty("disabled")){if(N.hideProcId){clearTimeout(N.hideProcId);N.hideProcId=null}L.on(M,"mousemove",N.onContextMouseMove,N);N.showProcId=N.doShow(O,M)}},onContextMouseOut:function(O,N){var M=this;if(N._tempTitle){M.title=N._tempTitle;N._tempTitle=null}if(N.showProcId){clearTimeout(N.showProcId);N.showProcId=null}if(N.hideProcId){clearTimeout(N.hideProcId);N.hideProcId=null}N.fireEvent("contextMouseOut",M,O);N.hideProcId=setTimeout(function(){N.hide()},N.cfg.getProperty("hidedelay"))},doShow:function(O,M){var P=25,N=this;if(YAHOO.env.ua.opera&&M.tagName&&M.tagName.toUpperCase()=="A"){P+=12}return setTimeout(function(){var Q=N.cfg.getProperty("text");if(N._tempTitle&&(Q===""||YAHOO.lang.isUndefined(Q)||YAHOO.lang.isNull(Q))){N.setBody(N._tempTitle)}else{N.cfg.refireEvent("text")}N.moveTo(N.pageX,N.pageY+P);if(N.cfg.getProperty("preventoverlap")){N.preventOverlap(N.pageX,N.pageY)}L.removeListener(M,"mousemove",N.onContextMouseMove);N.contextTriggerEvent.fire(M);N.show();N.hideProcId=N.doHide()},this.cfg.getProperty("showdelay"))},doHide:function(){var M=this;return setTimeout(function(){M.hide()},this.cfg.getProperty("autodismissdelay"))},preventOverlap:function(Q,P){var M=this.element.offsetHeight,O=new YAHOO.util.Point(Q,P),N=C.getRegion(this.element);N.top-=5;N.left-=5;N.right+=5;N.bottom+=5;if(N.contains(O)){this.cfg.setProperty("y",(P-M-5))}},onRender:function(Q,P){function R(){var U=this.element,T=this._shadow;if(T){T.style.width=(U.offsetWidth+6)+"px";T.style.height=(U.offsetHeight+1)+"px"}}function N(){C.addClass(this._shadow,"yui-tt-shadow-visible")}function M(){C.removeClass(this._shadow,"yui-tt-shadow-visible")}function S(){var V=this._shadow,U,T,X,W;if(!V){U=this.element;T=YAHOO.widget.Module;X=YAHOO.env.ua.ie;W=this;if(!F){F=document.createElement("div");F.className="yui-tt-shadow"}V=F.cloneNode(false);U.appendChild(V);this._shadow=V;N.call(this);this.subscribe("beforeShow",N);this.subscribe("beforeHide",M);if(X==6||(X==7&&document.compatMode=="BackCompat")){window.setTimeout(function(){R.call(W)},0);this.cfg.subscribeToConfigEvent("width",R);this.cfg.subscribeToConfigEvent("height",R);this.subscribe("changeContent",R);T.textResizeEvent.subscribe(R,this,true);this.subscribe("destroy",function(){T.textResizeEvent.unsubscribe(R,this)})}}}function O(){S.call(this);this.unsubscribe("beforeShow",O)}if(this.cfg.getProperty("visible")){S.call(this)}else{this.subscribe("beforeShow",O)}},destroy:function(){this._removeEventListeners();G.superclass.destroy.call(this)},toString:function(){return"Tooltip "+this.id}})}());(function(){YAHOO.widget.Panel=function(R,Q){YAHOO.widget.Panel.superclass.constructor.call(this,R,Q)};var I=YAHOO.lang,E=YAHOO.util.DD,F=YAHOO.util.Dom,P=YAHOO.util.Event,B=YAHOO.widget.Overlay,O=YAHOO.util.CustomEvent,C=YAHOO.util.Config,N=YAHOO.widget.Panel,H,L,D,A={SHOW_MASK:"showMask",HIDE_MASK:"hideMask",DRAG:"drag"},J={CLOSE:{key:"close",value:true,validator:I.isBoolean,supercedes:["visible"]},DRAGGABLE:{key:"draggable",value:(E?true:false),validator:I.isBoolean,supercedes:["visible"]},DRAG_ONLY:{key:"dragonly",value:false,validator:I.isBoolean,supercedes:["draggable"]},UNDERLAY:{key:"underlay",value:"shadow",supercedes:["visible"]},MODAL:{key:"modal",value:false,validator:I.isBoolean,supercedes:["visible","zindex"]},KEY_LISTENERS:{key:"keylisteners",suppressEvent:true,supercedes:["visible"]}};N.CSS_PANEL="yui-panel";N.CSS_PANEL_CONTAINER="yui-panel-container";N.FOCUSABLE=["a","button","select","textarea","input"];function M(R,Q){if(!this.header&&this.cfg.getProperty("draggable")){this.setHeader("&#160;")}}function K(R,Q,S){var V=S[0],T=S[1],U=this.cfg,W=U.getProperty("width");if(W==T){U.setProperty("width",V)}this.unsubscribe("hide",K,S)}function G(R,Q){var V=YAHOO.env.ua.ie,U,T,S;if(V==6||(V==7&&document.compatMode=="BackCompat")){U=this.cfg;T=U.getProperty("width");if(!T||T=="auto"){S=(this.element.offsetWidth+"px");U.setProperty("width",S);this.subscribe("hide",K,[(T||""),S])}}}YAHOO.extend(N,B,{init:function(R,Q){N.superclass.init.call(this,R);this.beforeInitEvent.fire(N);F.addClass(this.element,N.CSS_PANEL);this.buildWrapper();if(Q){this.cfg.applyConfig(Q,true)}this.subscribe("showMask",this._addFocusHandlers);this.subscribe("hideMask",this._removeFocusHandlers);this.subscribe("beforeRender",M);this.initEvent.fire(N)},_onElementFocus:function(Q){this.blur()},_addFocusHandlers:function(Y,S){var V=this,Z="focus",U="hidden";function X(a){if(a.type!==U&&!F.isAncestor(V.element,a)){P.on(a,Z,V._onElementFocus);return true}return false}var W=N.FOCUSABLE,Q=W.length,T=[];for(var R=0;R<Q;R++){T=T.concat(F.getElementsBy(X,W[R]))}this.focusableElements=T},_removeFocusHandlers:function(T,S){var V=this.focusableElements,Q=V.length,R="focus";if(V){for(var U=0;U<Q;U++){P.removeListener(V[U],R,this._onElementFocus)}}},initEvents:function(){N.superclass.initEvents.call(this);var Q=O.LIST;this.showMaskEvent=this.createEvent(A.SHOW_MASK);this.showMaskEvent.signature=Q;this.hideMaskEvent=this.createEvent(A.HIDE_MASK);this.hideMaskEvent.signature=Q;this.dragEvent=this.createEvent(A.DRAG);this.dragEvent.signature=Q},initDefaultConfig:function(){N.superclass.initDefaultConfig.call(this);this.cfg.addProperty(J.CLOSE.key,{handler:this.configClose,value:J.CLOSE.value,validator:J.CLOSE.validator,supercedes:J.CLOSE.supercedes});this.cfg.addProperty(J.DRAGGABLE.key,{handler:this.configDraggable,value:J.DRAGGABLE.value,validator:J.DRAGGABLE.validator,supercedes:J.DRAGGABLE.supercedes});this.cfg.addProperty(J.DRAG_ONLY.key,{value:J.DRAG_ONLY.value,validator:J.DRAG_ONLY.validator,supercedes:J.DRAG_ONLY.supercedes});this.cfg.addProperty(J.UNDERLAY.key,{handler:this.configUnderlay,value:J.UNDERLAY.value,supercedes:J.UNDERLAY.supercedes});this.cfg.addProperty(J.MODAL.key,{handler:this.configModal,value:J.MODAL.value,validator:J.MODAL.validator,supercedes:J.MODAL.supercedes});this.cfg.addProperty(J.KEY_LISTENERS.key,{handler:this.configKeyListeners,suppressEvent:J.KEY_LISTENERS.suppressEvent,supercedes:J.KEY_LISTENERS.supercedes})},configClose:function(S,Q,U){var V=Q[0],R=this.close;function T(X,W){W.hide()}if(V){if(!R){if(!D){D=document.createElement("span");D.innerHTML="&#160;";D.className="container-close"}R=D.cloneNode(true);this.innerElement.appendChild(R);P.on(R,"click",T,this);this.close=R}else{R.style.display="block"}}else{if(R){R.style.display="none"}}},configDraggable:function(R,Q,S){var T=Q[0];if(T){if(!E){this.cfg.setProperty("draggable",false);return }if(this.header){F.setStyle(this.header,"cursor","move");this.registerDragDrop()}this.subscribe("beforeShow",G)}else{if(this.dd){this.dd.unreg()}if(this.header){F.setStyle(this.header,"cursor","auto")}this.unsubscribe("beforeShow",G)}},configUnderlay:function(b,a,V){var Z=YAHOO.env.ua,X=(this.platform=="mac"&&Z.gecko),Y=(Z.ie==6||(Z.ie==7&&document.compatMode=="BackCompat")),c=a[0].toLowerCase(),R=this.underlay,S=this.element;function d(){var e=this.underlay;F.addClass(e,"yui-force-redraw");window.setTimeout(function(){F.removeClass(e,"yui-force-redraw")},0)}function T(){var e=false;if(!R){if(!L){L=document.createElement("div");L.className="underlay"}R=L.cloneNode(false);this.element.appendChild(R);this.underlay=R;if(Y){this.sizeUnderlay();this.cfg.subscribeToConfigEvent("width",this.sizeUnderlay);this.cfg.subscribeToConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.subscribe(this.sizeUnderlay);YAHOO.widget.Module.textResizeEvent.subscribe(this.sizeUnderlay,this,true)}if(Z.webkit&&Z.webkit<420){this.changeContentEvent.subscribe(d)}e=true}}function W(){var e=T.call(this);if(!e&&Y){this.sizeUnderlay()}this._underlayDeferred=false;this.beforeShowEvent.unsubscribe(W)}function U(){if(this._underlayDeferred){this.beforeShowEvent.unsubscribe(W);this._underlayDeferred=false}if(R){this.cfg.unsubscribeFromConfigEvent("width",this.sizeUnderlay);this.cfg.unsubscribeFromConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.sizeUnderlay);this.changeContentEvent.unsubscribe(d);YAHOO.widget.Module.textResizeEvent.unsubscribe(this.sizeUnderlay,this,true);this.element.removeChild(R);this.underlay=null}}switch(c){case"shadow":F.removeClass(S,"matte");F.addClass(S,"shadow");break;case"matte":if(!X){U.call(this)}F.removeClass(S,"shadow");F.addClass(S,"matte");break;default:if(!X){U.call(this)}F.removeClass(S,"shadow");F.removeClass(S,"matte");break}if((c=="shadow")||(X&&!R)){if(this.cfg.getProperty("visible")){var Q=T.call(this);if(!Q&&Y){this.sizeUnderlay()}}else{if(!this._underlayDeferred){this.beforeShowEvent.subscribe(W);this._underlayDeferred=true}}}},configModal:function(R,Q,T){var S=Q[0];if(S){if(!this._hasModalityEventListeners){this.subscribe("beforeShow",this.buildMask);this.subscribe("beforeShow",this.bringToTop);this.subscribe("beforeShow",this.showMask);this.subscribe("hide",this.hideMask);B.windowResizeEvent.subscribe(this.sizeMask,this,true);this._hasModalityEventListeners=true}}else{if(this._hasModalityEventListeners){if(this.cfg.getProperty("visible")){this.hideMask();this.removeMask()}this.unsubscribe("beforeShow",this.buildMask);this.unsubscribe("beforeShow",this.bringToTop);this.unsubscribe("beforeShow",this.showMask);this.unsubscribe("hide",this.hideMask);B.windowResizeEvent.unsubscribe(this.sizeMask,this);this._hasModalityEventListeners=false}}},removeMask:function(){var R=this.mask,Q;if(R){this.hideMask();Q=R.parentNode;if(Q){Q.removeChild(R)}this.mask=null}},configKeyListeners:function(T,Q,W){var S=Q[0],V,U,R;if(S){if(S instanceof Array){U=S.length;for(R=0;R<U;R++){V=S[R];if(!C.alreadySubscribed(this.showEvent,V.enable,V)){this.showEvent.subscribe(V.enable,V,true)}if(!C.alreadySubscribed(this.hideEvent,V.disable,V)){this.hideEvent.subscribe(V.disable,V,true);this.destroyEvent.subscribe(V.disable,V,true)}}}else{if(!C.alreadySubscribed(this.showEvent,S.enable,S)){this.showEvent.subscribe(S.enable,S,true)}if(!C.alreadySubscribed(this.hideEvent,S.disable,S)){this.hideEvent.subscribe(S.disable,S,true);this.destroyEvent.subscribe(S.disable,S,true)}}}},configHeight:function(T,R,U){var Q=R[0],S=this.innerElement;F.setStyle(S,"height",Q);this.cfg.refireEvent("iframe")},configWidth:function(T,Q,U){var S=Q[0],R=this.innerElement;F.setStyle(R,"width",S);this.cfg.refireEvent("iframe")},configzIndex:function(R,Q,T){N.superclass.configzIndex.call(this,R,Q,T);if(this.mask||this.cfg.getProperty("modal")===true){var S=F.getStyle(this.element,"zIndex");if(!S||isNaN(S)){S=0}if(S===0){this.cfg.setProperty("zIndex",1)}else{this.stackMask()}}},buildWrapper:function(){var S=this.element.parentNode,Q=this.element,R=document.createElement("div");R.className=N.CSS_PANEL_CONTAINER;R.id=Q.id+"_c";if(S){S.insertBefore(R,Q)}R.appendChild(Q);this.element=R;this.innerElement=Q;F.setStyle(this.innerElement,"visibility","inherit")},sizeUnderlay:function(){var R=this.underlay,Q;if(R){Q=this.element;R.style.width=Q.offsetWidth+"px";R.style.height=Q.offsetHeight+"px"}},registerDragDrop:function(){var R=this;if(this.header){if(!E){return }var Q=(this.cfg.getProperty("dragonly")===true);this.dd=new E(this.element.id,this.id,{dragOnly:Q});if(!this.header.id){this.header.id=this.id+"_h"}this.dd.startDrag=function(){var T,V,S,Y,X,W;if(YAHOO.env.ua.ie==6){F.addClass(R.element,"drag")}if(R.cfg.getProperty("constraintoviewport")){var U=B.VIEWPORT_OFFSET;T=R.element.offsetHeight;V=R.element.offsetWidth;S=F.getViewportWidth();Y=F.getViewportHeight();X=F.getDocumentScrollLeft();W=F.getDocumentScrollTop();if(T+U<Y){this.minY=W+U;this.maxY=W+Y-T-U}else{this.minY=W+U;this.maxY=W+U}if(V+U<S){this.minX=X+U;this.maxX=X+S-V-U}else{this.minX=X+U;this.maxX=X+U}this.constrainX=true;this.constrainY=true}else{this.constrainX=false;this.constrainY=false}R.dragEvent.fire("startDrag",arguments)};this.dd.onDrag=function(){R.syncPosition();R.cfg.refireEvent("iframe");if(this.platform=="mac"&&YAHOO.env.ua.gecko){this.showMacGeckoScrollbars()}R.dragEvent.fire("onDrag",arguments)};this.dd.endDrag=function(){if(YAHOO.env.ua.ie==6){F.removeClass(R.element,"drag")}R.dragEvent.fire("endDrag",arguments);R.moveEvent.fire(R.cfg.getProperty("xy"))};this.dd.setHandleElId(this.header.id);this.dd.addInvalidHandleType("INPUT");this.dd.addInvalidHandleType("SELECT");this.dd.addInvalidHandleType("TEXTAREA")}},buildMask:function(){var Q=this.mask;if(!Q){if(!H){H=document.createElement("div");H.className="mask";H.innerHTML="&#160;"}Q=H.cloneNode(true);Q.id=this.id+"_mask";document.body.insertBefore(Q,document.body.firstChild);this.mask=Q;if(YAHOO.env.ua.gecko&&this.platform=="mac"){F.addClass(this.mask,"block-scrollbars")}this.stackMask()}},hideMask:function(){if(this.cfg.getProperty("modal")&&this.mask){this.mask.style.display="none";this.hideMaskEvent.fire();F.removeClass(document.body,"masked")}},showMask:function(){if(this.cfg.getProperty("modal")&&this.mask){F.addClass(document.body,"masked");this.sizeMask();this.mask.style.display="block";this.showMaskEvent.fire()}},sizeMask:function(){if(this.mask){this.mask.style.height=F.getDocumentHeight()+"px";this.mask.style.width=F.getDocumentWidth()+"px"}},stackMask:function(){if(this.mask){var Q=F.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(Q)&&!isNaN(Q)){F.setStyle(this.mask,"zIndex",Q-1)}}},render:function(Q){return N.superclass.render.call(this,Q,this.innerElement)},destroy:function(){B.windowResizeEvent.unsubscribe(this.sizeMask,this);this.removeMask();if(this.close){P.purgeElement(this.close)}N.superclass.destroy.call(this)},toString:function(){return"Panel "+this.id}})}());(function(){YAHOO.widget.Dialog=function(L,K){YAHOO.widget.Dialog.superclass.constructor.call(this,L,K)};var J=YAHOO.util.Event,I=YAHOO.util.CustomEvent,D=YAHOO.util.Dom,B=YAHOO.util.KeyListener,H=YAHOO.util.Connect,F=YAHOO.widget.Dialog,E=YAHOO.lang,A={BEFORE_SUBMIT:"beforeSubmit",SUBMIT:"submit",MANUAL_SUBMIT:"manualSubmit",ASYNC_SUBMIT:"asyncSubmit",FORM_SUBMIT:"formSubmit",CANCEL:"cancel"},G={POST_METHOD:{key:"postmethod",value:"async"},BUTTONS:{key:"buttons",value:"none"},HIDEAFTERSUBMIT:{key:"hideaftersubmit",value:true}};F.CSS_DIALOG="yui-dialog";function C(){var N=this._aButtons,L,M,K;if(E.isArray(N)){L=N.length;if(L>0){K=L-1;do{M=N[K];if(YAHOO.widget.Button&&M instanceof YAHOO.widget.Button){M.destroy()}else{if(M.tagName.toUpperCase()=="BUTTON"){J.purgeElement(M);J.purgeElement(M,false)}}}while(K--)}}}YAHOO.extend(F,YAHOO.widget.Panel,{form:null,initDefaultConfig:function(){F.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null};this.cfg.addProperty(G.POST_METHOD.key,{handler:this.configPostMethod,value:G.POST_METHOD.value,validator:function(K){if(K!="form"&&K!="async"&&K!="none"&&K!="manual"){return false}else{return true}}});this.cfg.addProperty(G.HIDEAFTERSUBMIT.key,{value:G.HIDEAFTERSUBMIT.value});this.cfg.addProperty(G.BUTTONS.key,{handler:this.configButtons,value:G.BUTTONS.value})},initEvents:function(){F.superclass.initEvents.call(this);var K=I.LIST;this.beforeSubmitEvent=this.createEvent(A.BEFORE_SUBMIT);this.beforeSubmitEvent.signature=K;this.submitEvent=this.createEvent(A.SUBMIT);this.submitEvent.signature=K;this.manualSubmitEvent=this.createEvent(A.MANUAL_SUBMIT);this.manualSubmitEvent.signature=K;this.asyncSubmitEvent=this.createEvent(A.ASYNC_SUBMIT);this.asyncSubmitEvent.signature=K;this.formSubmitEvent=this.createEvent(A.FORM_SUBMIT);this.formSubmitEvent.signature=K;this.cancelEvent=this.createEvent(A.CANCEL);this.cancelEvent.signature=K},init:function(L,K){F.superclass.init.call(this,L);this.beforeInitEvent.fire(F);D.addClass(this.element,F.CSS_DIALOG);this.cfg.setProperty("visible",false);if(K){this.cfg.applyConfig(K,true)}this.showEvent.subscribe(this.focusFirst,this,true);this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.subscribe("changeBody",this.registerForm);this.initEvent.fire(F)},doSubmit:function(){var Q=this.form,O=false,N=false,P,K,M,L;switch(this.cfg.getProperty("postmethod")){case"async":P=Q.elements;K=P.length;if(K>0){M=K-1;do{if(P[M].type=="file"){O=true;break}}while(M--)}if(O&&YAHOO.env.ua.ie&&this.isSecure){N=true}L=(Q.getAttribute("method")||"POST").toUpperCase();H.setForm(Q,O,N);H.asyncRequest(L,Q.getAttribute("action"),this.callback);this.asyncSubmitEvent.fire();break;case"form":Q.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break}},registerForm:function(){return ;var M=this.element.getElementsByTagName("form")[0],L=this,K,N;if(this.form){if(this.form==M&&D.isAncestor(this.element,this.form)){return }else{J.purgeElement(this.form);this.form=null}}if(!M){M=document.createElement("form");M.name="frm_"+this.id;this.body.appendChild(M)}if(M){this.form=M;J.on(M,"submit",function(O){J.stopEvent(O);this.submit();this.form.blur()},this,true);this.firstFormElement=function(){var Q,P,O=M.elements.length;for(Q=0;Q<O;Q++){P=M.elements[Q];if(P.focus&&!P.disabled&&P.type!="hidden"){return P}}return null}();this.lastFormElement=function(){var Q,P,O=M.elements.length;for(Q=O-1;Q>=0;Q--){P=M.elements[Q];if(P.focus&&!P.disabled&&P.type!="hidden"){return P}}return null}();if(this.cfg.getProperty("modal")){K=this.firstFormElement||this.firstButton;if(K){this.preventBackTab=new B(K,{shift:true,keys:9},{fn:L.focusLast,scope:L,correctScope:true});this.showEvent.subscribe(this.preventBackTab.enable,this.preventBackTab,true);this.hideEvent.subscribe(this.preventBackTab.disable,this.preventBackTab,true)}N=this.lastButton||this.lastFormElement;if(N){this.preventTabOut=new B(N,{shift:false,keys:9},{fn:L.focusFirst,scope:L,correctScope:true});this.showEvent.subscribe(this.preventTabOut.enable,this.preventTabOut,true);this.hideEvent.subscribe(this.preventTabOut.disable,this.preventTabOut,true)}}}},configClose:function(M,K,N){var O=K[0];function L(Q,P){P.cancel()}if(O){if(!this.close){this.close=document.createElement("div");D.addClass(this.close,"container-close");this.close.innerHTML="&#160;";this.innerElement.appendChild(this.close);J.on(this.close,"click",L,this)}else{this.close.style.display="block"}}else{if(this.close){this.close.style.display="none"}}},configButtons:function(U,T,O){var P=YAHOO.widget.Button,W=T[0],M=this.innerElement,V,R,L,S,Q,K,N;C.call(this);this._aButtons=null;if(E.isArray(W)){Q=document.createElement("span");Q.className="button-group";S=W.length;this._aButtons=[];for(N=0;N<S;N++){V=W[N];if(P){L=new P({label:V.text,container:Q});R=L.get("element");if(V.isDefault){L.addClass("default");this.defaultHtmlButton=R}if(E.isFunction(V.handler)){L.set("onclick",{fn:V.handler,obj:this,scope:this})}else{if(E.isObject(V.handler)&&E.isFunction(V.handler.fn)){L.set("onclick",{fn:V.handler.fn,obj:((!E.isUndefined(V.handler.obj))?V.handler.obj:this),scope:(V.handler.scope||this)})}}this._aButtons[this._aButtons.length]=L}else{R=document.createElement("button");R.setAttribute("type","button");if(V.isDefault){R.className="default";this.defaultHtmlButton=R}R.innerHTML=V.text;if(E.isFunction(V.handler)){J.on(R,"click",V.handler,this,true)}else{if(E.isObject(V.handler)&&E.isFunction(V.handler.fn)){J.on(R,"click",V.handler.fn,((!E.isUndefined(V.handler.obj))?V.handler.obj:this),(V.handler.scope||this))}}Q.appendChild(R);this._aButtons[this._aButtons.length]=R}V.htmlButton=R;if(N===0){this.firstButton=R}if(N==(S-1)){this.lastButton=R}}this.setFooter(Q);K=this.footer;if(D.inDocument(this.element)&&!D.isAncestor(M,K)){M.appendChild(K)}this.buttonSpan=Q}else{Q=this.buttonSpan;K=this.footer;if(Q&&K){K.removeChild(Q);this.buttonSpan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null}}this.cfg.refireEvent("iframe");this.cfg.refireEvent("underlay")},getButtons:function(){var K=this._aButtons;if(K){return K}},focusFirst:function(N,L,P){var M=this.firstFormElement,K;if(L){K=L[1];if(K){J.stopEvent(K)}}if(M){try{M.focus()}catch(O){}}else{this.focusDefaultButton()}},focusLast:function(N,L,P){var Q=this.cfg.getProperty("buttons"),M=this.lastFormElement,K;if(L){K=L[1];if(K){J.stopEvent(K)}}if(Q&&E.isArray(Q)){this.focusLastButton()}else{if(M){try{M.focus()}catch(O){}}}},focusDefaultButton:function(){var K=this.defaultHtmlButton;if(K){try{K.focus()}catch(L){}}},blurButtons:function(){var P=this.cfg.getProperty("buttons"),M,O,L,K;if(P&&E.isArray(P)){M=P.length;if(M>0){K=(M-1);do{O=P[K];if(O){L=O.htmlButton;if(L){try{L.blur()}catch(N){}}}}while(K--)}}},focusFirstButton:function(){var N=this.cfg.getProperty("buttons"),M,K;if(N&&E.isArray(N)){M=N[0];if(M){K=M.htmlButton;if(K){try{K.focus()}catch(L){}}}}},focusLastButton:function(){var O=this.cfg.getProperty("buttons"),L,N,K;if(O&&E.isArray(O)){L=O.length;if(L>0){N=O[(L-1)];if(N){K=N.htmlButton;if(K){try{K.focus()}catch(M){}}}}}},configPostMethod:function(L,K,M){this.registerForm()},validate:function(){return true},submit:function(){if(this.validate()){this.beforeSubmitEvent.fire();this.doSubmit();this.submitEvent.fire();if(this.cfg.getProperty("hideaftersubmit")){this.hide()}return true}else{return false}},cancel:function(){this.cancelEvent.fire();this.hide()},getData:function(){var a=this.form,M,T,W,O,U,R,Q,L,X,N,Y,b,K,P,c,Z,V;function S(e){var d=e.tagName.toUpperCase();return((d=="INPUT"||d=="TEXTAREA"||d=="SELECT")&&e.name==O)}if(a){M=a.elements;T=M.length;W={};for(Z=0;Z<T;Z++){O=M[Z].name;U=D.getElementsBy(S,"*",a);R=U.length;if(R>0){if(R==1){U=U[0];Q=U.type;L=U.tagName.toUpperCase();switch(L){case"INPUT":if(Q=="checkbox"){W[O]=U.checked}else{if(Q!="radio"){W[O]=U.value}}break;case"TEXTAREA":W[O]=U.value;break;case"SELECT":X=U.options;N=X.length;Y=[];for(V=0;V<N;V++){b=X[V];if(b.selected){K=b.value;if(!K||K===""){K=b.text}Y[Y.length]=K}}W[O]=Y;break}}else{Q=U[0].type;switch(Q){case"radio":for(V=0;V<R;V++){P=U[V];if(P.checked){W[O]=P.value;break}}break;case"checkbox":Y=[];for(V=0;V<R;V++){c=U[V];if(c.checked){Y[Y.length]=c.value}}W[O]=Y;break}}}}}return W},destroy:function(){C.call(this);this._aButtons=null;var K=this.element.getElementsByTagName("form"),L;if(K.length>0){L=K[0];if(L){J.purgeElement(L);if(L.parentNode){L.parentNode.removeChild(L)}this.form=null}}F.superclass.destroy.call(this)},toString:function(){return"Dialog "+this.id}})}());(function(){YAHOO.widget.SimpleDialog=function(E,D){YAHOO.widget.SimpleDialog.superclass.constructor.call(this,E,D)};var C=YAHOO.util.Dom,B=YAHOO.widget.SimpleDialog,A={ICON:{key:"icon",value:"none",suppressEvent:true},TEXT:{key:"text",value:"",suppressEvent:true,supercedes:["icon"]}};B.ICON_BLOCK="blckicon";B.ICON_ALARM="alrticon";B.ICON_HELP="hlpicon";B.ICON_INFO="infoicon";B.ICON_WARN="warnicon";B.ICON_TIP="tipicon";B.ICON_CSS_CLASSNAME="yui-icon";B.CSS_SIMPLEDIALOG="yui-simple-dialog";YAHOO.extend(B,YAHOO.widget.Dialog,{initDefaultConfig:function(){B.superclass.initDefaultConfig.call(this);this.cfg.addProperty(A.ICON.key,{handler:this.configIcon,value:A.ICON.value,suppressEvent:A.ICON.suppressEvent});this.cfg.addProperty(A.TEXT.key,{handler:this.configText,value:A.TEXT.value,suppressEvent:A.TEXT.suppressEvent,supercedes:A.TEXT.supercedes})},init:function(E,D){B.superclass.init.call(this,E);this.beforeInitEvent.fire(B);C.addClass(this.element,B.CSS_SIMPLEDIALOG);this.cfg.queueProperty("postmethod","manual");if(D){this.cfg.applyConfig(D,true)}this.beforeRenderEvent.subscribe(function(){if(!this.body){this.setBody("")}},this,true);this.initEvent.fire(B)},registerForm:function(){B.superclass.registerForm.call(this);this.form.innerHTML+='<input type="hidden" name="'+this.id+'" value=""/>'},configIcon:function(F,E,J){var K=E[0],D=this.body,I=B.ICON_CSS_CLASSNAME,H,G;if(K&&K!="none"){H=C.getElementsByClassName(I,"*",D);if(H){G=H.parentNode;if(G){G.removeChild(H);H=null}}if(K.indexOf(".")==-1){H=document.createElement("span");H.className=(I+" "+K);H.innerHTML="&#160;"}else{H=document.createElement("img");H.src=(this.imageRoot+K);H.className=I}if(H){D.insertBefore(H,D.firstChild)}}},configText:function(E,D,F){var G=D[0];if(G){this.setBody(G);this.cfg.refireEvent("icon")}},toString:function(){return"SimpleDialog "+this.id}})}());(function(){YAHOO.widget.ContainerEffect=function(F,I,H,E,G){if(!G){G=YAHOO.util.Anim}this.overlay=F;this.attrIn=I;this.attrOut=H;this.targetElement=E||F.element;this.animClass=G};var B=YAHOO.util.Dom,D=YAHOO.util.CustomEvent,C=YAHOO.util.Easing,A=YAHOO.widget.ContainerEffect;A.FADE=function(E,G){var I={attributes:{opacity:{from:0,to:1}},duration:G,method:C.easeIn};var F={attributes:{opacity:{to:0}},duration:G,method:C.easeOut};var H=new A(E,I,F,E.element);H.handleUnderlayStart=function(){var K=this.overlay.underlay;if(K&&YAHOO.env.ua.ie){var J=(K.filters&&K.filters.length>0);if(J){B.addClass(E.element,"yui-effect-fade")}}};H.handleUnderlayComplete=function(){var J=this.overlay.underlay;if(J&&YAHOO.env.ua.ie){B.removeClass(E.element,"yui-effect-fade")}};H.handleStartAnimateIn=function(K,J,L){B.addClass(L.overlay.element,"hide-select");if(!L.overlay.underlay){L.overlay.cfg.refireEvent("underlay")}L.handleUnderlayStart();B.setStyle(L.overlay.element,"visibility","visible");B.setStyle(L.overlay.element,"opacity",0)};H.handleCompleteAnimateIn=function(K,J,L){B.removeClass(L.overlay.element,"hide-select");if(L.overlay.element.style.filter){L.overlay.element.style.filter=null}L.handleUnderlayComplete();L.overlay.cfg.refireEvent("iframe");L.animateInCompleteEvent.fire()};H.handleStartAnimateOut=function(K,J,L){B.addClass(L.overlay.element,"hide-select");L.handleUnderlayStart()};H.handleCompleteAnimateOut=function(K,J,L){B.removeClass(L.overlay.element,"hide-select");if(L.overlay.element.style.filter){L.overlay.element.style.filter=null}B.setStyle(L.overlay.element,"visibility","hidden");B.setStyle(L.overlay.element,"opacity",1);L.handleUnderlayComplete();L.overlay.cfg.refireEvent("iframe");L.animateOutCompleteEvent.fire()};H.init();return H};A.SLIDE=function(G,I){var F=G.cfg.getProperty("x")||B.getX(G.element),K=G.cfg.getProperty("y")||B.getY(G.element),J=B.getClientWidth(),H=G.element.offsetWidth,E=new A(G,{attributes:{points:{to:[F,K]}},duration:I,method:C.easeIn},{attributes:{points:{to:[(J+25),K]}},duration:I,method:C.easeOut},G.element,YAHOO.util.Motion);E.handleStartAnimateIn=function(M,L,N){N.overlay.element.style.left=((-25)-H)+"px";N.overlay.element.style.top=K+"px"};E.handleTweenAnimateIn=function(O,N,P){var Q=B.getXY(P.overlay.element),M=Q[0],L=Q[1];if(B.getStyle(P.overlay.element,"visibility")=="hidden"&&M<F){B.setStyle(P.overlay.element,"visibility","visible")}P.overlay.cfg.setProperty("xy",[M,L],true);P.overlay.cfg.refireEvent("iframe")};E.handleCompleteAnimateIn=function(M,L,N){N.overlay.cfg.setProperty("xy",[F,K],true);N.startX=F;N.startY=K;N.overlay.cfg.refireEvent("iframe");N.animateInCompleteEvent.fire()};E.handleStartAnimateOut=function(M,L,P){var N=B.getViewportWidth(),Q=B.getXY(P.overlay.element),O=Q[1];P.animOut.attributes.points.to=[(N+25),O]};E.handleTweenAnimateOut=function(N,M,O){var Q=B.getXY(O.overlay.element),L=Q[0],P=Q[1];O.overlay.cfg.setProperty("xy",[L,P],true);O.overlay.cfg.refireEvent("iframe")};E.handleCompleteAnimateOut=function(M,L,N){B.setStyle(N.overlay.element,"visibility","hidden");N.overlay.cfg.setProperty("xy",[F,K]);N.animateOutCompleteEvent.fire()};E.init();return E};A.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=D.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=D.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=D.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=D.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this)},animateIn:function(){this.beforeAnimateInEvent.fire();this.animIn.animate()},animateOut:function(){this.beforeAnimateOutEvent.fire();this.animOut.animate()},handleStartAnimateIn:function(F,E,G){},handleTweenAnimateIn:function(F,E,G){},handleCompleteAnimateIn:function(F,E,G){},handleStartAnimateOut:function(F,E,G){},handleTweenAnimateOut:function(F,E,G){},handleCompleteAnimateOut:function(F,E,G){},toString:function(){var E="ContainerEffect";if(this.overlay){E+=" ["+this.overlay.toString()+"]"}return E}};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider)})();YAHOO.register("container",YAHOO.widget.Module,{version:"2.5.2",build:"1076"});
/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.5.2
*/
(function(){YAHOO.util.Config=function(D){if(D){this.init(D);}};var B=YAHOO.lang,C=YAHOO.util.CustomEvent,A=YAHOO.util.Config;A.CONFIG_CHANGED_EVENT="configChanged";A.BOOLEAN_TYPE="boolean";A.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(D){this.owner=D;this.configChangedEvent=this.createEvent(A.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=C.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[];},checkBoolean:function(D){return(typeof D==A.BOOLEAN_TYPE);},checkNumber:function(D){return(!isNaN(D));},fireEvent:function(D,F){var E=this.config[D];if(E&&E.event){E.event.fire(F);}},addProperty:function(E,D){E=E.toLowerCase();this.config[E]=D;D.event=this.createEvent(E,{scope:this.owner});D.event.signature=C.LIST;D.key=E;if(D.handler){D.event.subscribe(D.handler,this.owner);}this.setProperty(E,D.value,true);if(!D.suppressEvent){this.queueProperty(E,D.value);}},getConfig:function(){var D={},F,E;for(F in this.config){E=this.config[F];if(E&&E.event){D[F]=E.value;}}return D;},getProperty:function(D){var E=this.config[D.toLowerCase()];if(E&&E.event){return E.value;}else{return undefined;}},resetProperty:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event){if(this.initialConfig[D]&&!B.isUndefined(this.initialConfig[D])){this.setProperty(D,this.initialConfig[D]);return true;}}else{return false;}},setProperty:function(E,G,D){var F;E=E.toLowerCase();if(this.queueInProgress&&!D){this.queueProperty(E,G);return true;}else{F=this.config[E];if(F&&F.event){if(F.validator&&!F.validator(G)){return false;}else{F.value=G;if(!D){this.fireEvent(E,G);this.configChangedEvent.fire([E,G]);}return true;}}else{return false;}}},queueProperty:function(S,P){S=S.toLowerCase();var R=this.config[S],K=false,J,G,H,I,O,Q,F,M,N,D,L,T,E;if(R&&R.event){if(!B.isUndefined(P)&&R.validator&&!R.validator(P)){return false;}else{if(!B.isUndefined(P)){R.value=P;}else{P=R.value;}K=false;J=this.eventQueue.length;for(L=0;L<J;L++){G=this.eventQueue[L];if(G){H=G[0];I=G[1];if(H==S){this.eventQueue[L]=null;this.eventQueue.push([S,(!B.isUndefined(P)?P:I)]);K=true;break;}}}if(!K&&!B.isUndefined(P)){this.eventQueue.push([S,P]);}}if(R.supercedes){O=R.supercedes.length;for(T=0;T<O;T++){Q=R.supercedes[T];F=this.eventQueue.length;for(E=0;E<F;E++){M=this.eventQueue[E];if(M){N=M[0];D=M[1];if(N==Q.toLowerCase()){this.eventQueue.push([N,D]);this.eventQueue[E]=null;break;}}}}}return true;}else{return false;}},refireEvent:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event&&!B.isUndefined(E.value)){if(this.queueInProgress){this.queueProperty(D);}else{this.fireEvent(D,E.value);}}},applyConfig:function(D,G){var F,E;if(G){E={};for(F in D){if(B.hasOwnProperty(D,F)){E[F.toLowerCase()]=D[F];}}this.initialConfig=E;}for(F in D){if(B.hasOwnProperty(D,F)){this.queueProperty(F,D[F]);}}},refresh:function(){var D;for(D in this.config){this.refireEvent(D);}},fireQueue:function(){var E,H,D,G,F;this.queueInProgress=true;for(E=0;E<this.eventQueue.length;E++){H=this.eventQueue[E];if(H){D=H[0];G=H[1];F=this.config[D];F.value=G;this.fireEvent(D,G);}}this.queueInProgress=false;this.eventQueue=[];},subscribeToConfigEvent:function(E,F,H,D){var G=this.config[E.toLowerCase()];if(G&&G.event){if(!A.alreadySubscribed(G.event,F,H)){G.event.subscribe(F,H,D);}return true;}else{return false;}},unsubscribeFromConfigEvent:function(D,E,G){var F=this.config[D.toLowerCase()];if(F&&F.event){return F.event.unsubscribe(E,G);}else{return false;}},toString:function(){var D="Config";if(this.owner){D+=" ["+this.owner.toString()+"]";}return D;},outputEventQueue:function(){var D="",G,E,F=this.eventQueue.length;for(E=0;E<F;E++){G=this.eventQueue[E];if(G){D+=G[0]+"="+G[1]+", ";}}return D;},destroy:function(){var E=this.config,D,F;for(D in E){if(B.hasOwnProperty(E,D)){F=E[D];F.event.unsubscribeAll();F.event=null;}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null;}};A.alreadySubscribed=function(E,H,I){var F=E.subscribers.length,D,G;if(F>0){G=F-1;do{D=E.subscribers[G];if(D&&D.obj==I&&D.fn==H){return true;}}while(G--);}return false;};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider);}());YAHOO.widget.DateMath={DAY:"D",WEEK:"W",YEAR:"Y",MONTH:"M",ONE_DAY_MS:1000*60*60*24,WEEK_ONE_JAN_DATE:1,add:function(A,D,C){var F=new Date(A.getTime());switch(D){case this.MONTH:var E=A.getMonth()+C;var B=0;if(E<0){while(E<0){E+=12;B-=1;}}else{if(E>11){while(E>11){E-=12;B+=1;}}}F.setMonth(E);F.setFullYear(A.getFullYear()+B);break;case this.DAY:this._addDays(F,C);break;case this.YEAR:F.setFullYear(A.getFullYear()+C);break;case this.WEEK:this._addDays(F,(C*7));break;}return F;},_addDays:function(D,C){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420){if(C<0){for(var B=-128;C<B;C-=B){D.setDate(D.getDate()+B);}}else{for(var A=96;C>A;C-=A){D.setDate(D.getDate()+A);}}}D.setDate(D.getDate()+C);},subtract:function(A,C,B){return this.add(A,C,(B*-1));},before:function(C,B){var A=B.getTime();if(C.getTime()<A){return true;}else{return false;}},after:function(C,B){var A=B.getTime();if(C.getTime()>A){return true;}else{return false;}},between:function(B,A,C){if(this.after(B,A)&&this.before(B,C)){return true;}else{return false;}},getJan1:function(A){return this.getDate(A,0,1);},getDayOffset:function(B,D){var C=this.getJan1(D);var A=Math.ceil((B.getTime()-C.getTime())/this.ONE_DAY_MS);return A;},getWeekNumber:function(E,B,H){B=B||0;H=H||this.WEEK_ONE_JAN_DATE;var I=this.clearTime(E),M,N;if(I.getDay()===B){M=I;}else{M=this.getFirstDayOfWeek(I,B);}var J=M.getFullYear(),C=M.getTime();N=new Date(M.getTime()+6*this.ONE_DAY_MS);var G;if(J!==N.getFullYear()&&N.getDate()>=H){G=1;}else{var F=this.clearTime(this.getDate(J,0,H)),A=this.getFirstDayOfWeek(F,B);var K=Math.round((I.getTime()-A.getTime())/this.ONE_DAY_MS);var L=K%7;var D=(K-L)/7;G=D+1;}return G;},getFirstDayOfWeek:function(D,A){A=A||0;var B=D.getDay(),C=(B-A+7)%7;
return this.subtract(D,this.DAY,C);},isYearOverlapWeek:function(A){var C=false;var B=this.add(A,this.DAY,6);if(B.getFullYear()!=A.getFullYear()){C=true;}return C;},isMonthOverlapWeek:function(A){var C=false;var B=this.add(A,this.DAY,6);if(B.getMonth()!=A.getMonth()){C=true;}return C;},findMonthStart:function(A){var B=this.getDate(A.getFullYear(),A.getMonth(),1);return B;},findMonthEnd:function(B){var D=this.findMonthStart(B);var C=this.add(D,this.MONTH,1);var A=this.subtract(C,this.DAY,1);return A;},clearTime:function(A){A.setHours(12,0,0,0);return A;},getDate:function(D,A,C){var B=null;if(YAHOO.lang.isUndefined(C)){C=1;}if(D>=100){B=new Date(D,A,C);}else{B=new Date();B.setFullYear(D);B.setMonth(A);B.setDate(C);B.setHours(0,0,0,0);}return B;}};YAHOO.widget.Calendar=function(C,A,B){this.init.apply(this,arguments);};YAHOO.widget.Calendar.IMG_ROOT=null;YAHOO.widget.Calendar.DATE="D";YAHOO.widget.Calendar.MONTH_DAY="MD";YAHOO.widget.Calendar.WEEKDAY="WD";YAHOO.widget.Calendar.RANGE="R";YAHOO.widget.Calendar.MONTH="M";YAHOO.widget.Calendar.DISPLAY_DAYS=42;YAHOO.widget.Calendar.STOP_RENDER="S";YAHOO.widget.Calendar.SHORT="short";YAHOO.widget.Calendar.LONG="long";YAHOO.widget.Calendar.MEDIUM="medium";YAHOO.widget.Calendar.ONE_CHAR="1char";YAHOO.widget.Calendar._DEFAULT_CONFIG={PAGEDATE:{key:"pagedate",value:null},SELECTED:{key:"selected",value:null},TITLE:{key:"title",value:""},CLOSE:{key:"close",value:false},IFRAME:{key:"iframe",value:(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6)?true:false},MINDATE:{key:"mindate",value:null},MAXDATE:{key:"maxdate",value:null},MULTI_SELECT:{key:"multi_select",value:false},START_WEEKDAY:{key:"start_weekday",value:0},SHOW_WEEKDAYS:{key:"show_weekdays",value:true},SHOW_WEEK_HEADER:{key:"show_week_header",value:false},SHOW_WEEK_FOOTER:{key:"show_week_footer",value:false},HIDE_BLANK_WEEKS:{key:"hide_blank_weeks",value:false},NAV_ARROW_LEFT:{key:"nav_arrow_left",value:null},NAV_ARROW_RIGHT:{key:"nav_arrow_right",value:null},MONTHS_SHORT:{key:"months_short",value:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},MONTHS_LONG:{key:"months_long",value:["January","February","March","April","May","June","July","August","September","October","November","December"]},WEEKDAYS_1CHAR:{key:"weekdays_1char",value:["S","M","T","W","T","F","S"]},WEEKDAYS_SHORT:{key:"weekdays_short",value:["Su","Mo","Tu","We","Th","Fr","Sa"]},WEEKDAYS_MEDIUM:{key:"weekdays_medium",value:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},WEEKDAYS_LONG:{key:"weekdays_long",value:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},LOCALE_MONTHS:{key:"locale_months",value:"long"},LOCALE_WEEKDAYS:{key:"locale_weekdays",value:"short"},DATE_DELIMITER:{key:"date_delimiter",value:","},DATE_FIELD_DELIMITER:{key:"date_field_delimiter",value:"/"},DATE_RANGE_DELIMITER:{key:"date_range_delimiter",value:"-"},MY_MONTH_POSITION:{key:"my_month_position",value:1},MY_YEAR_POSITION:{key:"my_year_position",value:2},MD_MONTH_POSITION:{key:"md_month_position",value:1},MD_DAY_POSITION:{key:"md_day_position",value:2},MDY_MONTH_POSITION:{key:"mdy_month_position",value:1},MDY_DAY_POSITION:{key:"mdy_day_position",value:2},MDY_YEAR_POSITION:{key:"mdy_year_position",value:3},MY_LABEL_MONTH_POSITION:{key:"my_label_month_position",value:1},MY_LABEL_YEAR_POSITION:{key:"my_label_year_position",value:2},MY_LABEL_MONTH_SUFFIX:{key:"my_label_month_suffix",value:" "},MY_LABEL_YEAR_SUFFIX:{key:"my_label_year_suffix",value:""},NAV:{key:"navigator",value:null}};YAHOO.widget.Calendar._EVENT_TYPES={BEFORE_SELECT:"beforeSelect",SELECT:"select",BEFORE_DESELECT:"beforeDeselect",DESELECT:"deselect",CHANGE_PAGE:"changePage",BEFORE_RENDER:"beforeRender",RENDER:"render",RESET:"reset",CLEAR:"clear",BEFORE_HIDE:"beforeHide",HIDE:"hide",BEFORE_SHOW:"beforeShow",SHOW:"show",BEFORE_HIDE_NAV:"beforeHideNav",HIDE_NAV:"hideNav",BEFORE_SHOW_NAV:"beforeShowNav",SHOW_NAV:"showNav",BEFORE_RENDER_NAV:"beforeRenderNav",RENDER_NAV:"renderNav"};YAHOO.widget.Calendar._STYLES={CSS_ROW_HEADER:"calrowhead",CSS_ROW_FOOTER:"calrowfoot",CSS_CELL:"calcell",CSS_CELL_SELECTOR:"selector",CSS_CELL_SELECTED:"selected",CSS_CELL_SELECTABLE:"selectable",CSS_CELL_RESTRICTED:"restricted",CSS_CELL_TODAY:"today",CSS_CELL_OOM:"oom",CSS_CELL_OOB:"previous",CSS_HEADER:"calheader",CSS_HEADER_TEXT:"calhead",CSS_BODY:"calbody",CSS_WEEKDAY_CELL:"calweekdaycell",CSS_WEEKDAY_ROW:"calweekdayrow",CSS_FOOTER:"calfoot",CSS_CALENDAR:"yui-calendar",CSS_SINGLE:"single",CSS_CONTAINER:"yui-calcontainer",CSS_NAV_LEFT:"calnavleft",CSS_NAV_RIGHT:"calnavright",CSS_NAV:"calnav",CSS_CLOSE:"calclose",CSS_CELL_TOP:"calcelltop",CSS_CELL_LEFT:"calcellleft",CSS_CELL_RIGHT:"calcellright",CSS_CELL_BOTTOM:"calcellbottom",CSS_CELL_HOVER:"calcellhover",CSS_CELL_HIGHLIGHT1:"highlight1",CSS_CELL_HIGHLIGHT2:"highlight2",CSS_CELL_HIGHLIGHT3:"highlight3",CSS_CELL_HIGHLIGHT4:"highlight4"};YAHOO.widget.Calendar.prototype={Config:null,parent:null,index:-1,cells:null,cellDates:null,id:null,containerId:null,oDomContainer:null,today:null,renderStack:null,_renderStack:null,oNavigator:null,_selectedDates:null,domEventMap:null,_parseArgs:function(B){var A={id:null,container:null,config:null};if(B&&B.length&&B.length>0){switch(B.length){case 1:A.id=null;A.container=B[0];A.config=null;break;case 2:if(YAHOO.lang.isObject(B[1])&&!B[1].tagName&&!(B[1] instanceof String)){A.id=null;A.container=B[0];A.config=B[1];}else{A.id=B[0];A.container=B[1];A.config=null;}break;default:A.id=B[0];A.container=B[1];A.config=B[2];break;}}else{}return A;},init:function(D,B,C){var A=this._parseArgs(arguments);D=A.id;B=A.container;C=A.config;this.oDomContainer=YAHOO.util.Dom.get(B);if(!this.oDomContainer.id){this.oDomContainer.id=YAHOO.util.Dom.generateId();}if(!D){D=this.oDomContainer.id+"_t";}this.id=D;this.containerId=this.oDomContainer.id;this.initEvents();this.today=new Date();YAHOO.widget.DateMath.clearTime(this.today);this.cfg=new YAHOO.util.Config(this);this.Options={};this.Locale={};this.initStyles();YAHOO.util.Dom.addClass(this.oDomContainer,this.Style.CSS_CONTAINER);
YAHOO.util.Dom.addClass(this.oDomContainer,this.Style.CSS_SINGLE);this.cellDates=[];this.cells=[];this.renderStack=[];this._renderStack=[];this.setupConfig();if(C){this.cfg.applyConfig(C,true);}this.cfg.fireQueue();},configIframe:function(C,B,D){var A=B[0];if(!this.parent){if(YAHOO.util.Dom.inDocument(this.oDomContainer)){if(A){var E=YAHOO.util.Dom.getStyle(this.oDomContainer,"position");if(E=="absolute"||E=="relative"){if(!YAHOO.util.Dom.inDocument(this.iframe)){this.iframe=document.createElement("iframe");this.iframe.src="javascript:false;";YAHOO.util.Dom.setStyle(this.iframe,"opacity","0");if(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6){YAHOO.util.Dom.addClass(this.iframe,"fixedsize");}this.oDomContainer.insertBefore(this.iframe,this.oDomContainer.firstChild);}}}else{if(this.iframe){if(this.iframe.parentNode){this.iframe.parentNode.removeChild(this.iframe);}this.iframe=null;}}}}},configTitle:function(B,A,C){var E=A[0];if(E){this.createTitleBar(E);}else{var D=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.CLOSE.key);if(!D){this.removeTitleBar();}else{this.createTitleBar("&#160;");}}},configClose:function(B,A,C){var E=A[0],D=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.TITLE.key);if(E){if(!D){this.createTitleBar("&#160;");}this.createCloseButton();}else{this.removeCloseButton();if(!D){this.removeTitleBar();}}},initEvents:function(){var A=YAHOO.widget.Calendar._EVENT_TYPES;this.beforeSelectEvent=new YAHOO.util.CustomEvent(A.BEFORE_SELECT);this.selectEvent=new YAHOO.util.CustomEvent(A.SELECT);this.beforeDeselectEvent=new YAHOO.util.CustomEvent(A.BEFORE_DESELECT);this.deselectEvent=new YAHOO.util.CustomEvent(A.DESELECT);this.changePageEvent=new YAHOO.util.CustomEvent(A.CHANGE_PAGE);this.beforeRenderEvent=new YAHOO.util.CustomEvent(A.BEFORE_RENDER);this.renderEvent=new YAHOO.util.CustomEvent(A.RENDER);this.resetEvent=new YAHOO.util.CustomEvent(A.RESET);this.clearEvent=new YAHOO.util.CustomEvent(A.CLEAR);this.beforeShowEvent=new YAHOO.util.CustomEvent(A.BEFORE_SHOW);this.showEvent=new YAHOO.util.CustomEvent(A.SHOW);this.beforeHideEvent=new YAHOO.util.CustomEvent(A.BEFORE_HIDE);this.hideEvent=new YAHOO.util.CustomEvent(A.HIDE);this.beforeShowNavEvent=new YAHOO.util.CustomEvent(A.BEFORE_SHOW_NAV);this.showNavEvent=new YAHOO.util.CustomEvent(A.SHOW_NAV);this.beforeHideNavEvent=new YAHOO.util.CustomEvent(A.BEFORE_HIDE_NAV);this.hideNavEvent=new YAHOO.util.CustomEvent(A.HIDE_NAV);this.beforeRenderNavEvent=new YAHOO.util.CustomEvent(A.BEFORE_RENDER_NAV);this.renderNavEvent=new YAHOO.util.CustomEvent(A.RENDER_NAV);this.beforeSelectEvent.subscribe(this.onBeforeSelect,this,true);this.selectEvent.subscribe(this.onSelect,this,true);this.beforeDeselectEvent.subscribe(this.onBeforeDeselect,this,true);this.deselectEvent.subscribe(this.onDeselect,this,true);this.changePageEvent.subscribe(this.onChangePage,this,true);this.renderEvent.subscribe(this.onRender,this,true);this.resetEvent.subscribe(this.onReset,this,true);this.clearEvent.subscribe(this.onClear,this,true);},doSelectCell:function(G,A){var L,F,I,C;var H=YAHOO.util.Event.getTarget(G);var B=H.tagName.toLowerCase();var E=false;while(B!="td"&&!YAHOO.util.Dom.hasClass(H,A.Style.CSS_CELL_SELECTABLE)){if(!E&&B=="a"&&YAHOO.util.Dom.hasClass(H,A.Style.CSS_CELL_SELECTOR)){E=true;}H=H.parentNode;B=H.tagName.toLowerCase();if(B=="html"){return ;}}if(E){YAHOO.util.Event.preventDefault(G);}L=H;if(YAHOO.util.Dom.hasClass(L,A.Style.CSS_CELL_SELECTABLE)){F=L.id.split("cell")[1];I=A.cellDates[F];C=YAHOO.widget.DateMath.getDate(I[0],I[1]-1,I[2]);var K;if(A.Options.MULTI_SELECT){K=L.getElementsByTagName("a")[0];if(K){K.blur();}var D=A.cellDates[F];var J=A._indexOfSelectedFieldArray(D);if(J>-1){A.deselectCell(F);}else{A.selectCell(F);}}else{K=L.getElementsByTagName("a")[0];if(K){K.blur();}A.selectCell(F);}}},doCellMouseOver:function(C,B){var A;if(C){A=YAHOO.util.Event.getTarget(C);}else{A=this;}while(A.tagName&&A.tagName.toLowerCase()!="td"){A=A.parentNode;if(!A.tagName||A.tagName.toLowerCase()=="html"){return ;}}if(YAHOO.util.Dom.hasClass(A,B.Style.CSS_CELL_SELECTABLE)){YAHOO.util.Dom.addClass(A,B.Style.CSS_CELL_HOVER);}},doCellMouseOut:function(C,B){var A;if(C){A=YAHOO.util.Event.getTarget(C);}else{A=this;}while(A.tagName&&A.tagName.toLowerCase()!="td"){A=A.parentNode;if(!A.tagName||A.tagName.toLowerCase()=="html"){return ;}}if(YAHOO.util.Dom.hasClass(A,B.Style.CSS_CELL_SELECTABLE)){YAHOO.util.Dom.removeClass(A,B.Style.CSS_CELL_HOVER);}},setupConfig:function(){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.cfg.addProperty(A.PAGEDATE.key,{value:new Date(),handler:this.configPageDate});this.cfg.addProperty(A.SELECTED.key,{value:[],handler:this.configSelected});this.cfg.addProperty(A.TITLE.key,{value:A.TITLE.value,handler:this.configTitle});this.cfg.addProperty(A.CLOSE.key,{value:A.CLOSE.value,handler:this.configClose});this.cfg.addProperty(A.IFRAME.key,{value:A.IFRAME.value,handler:this.configIframe,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.MINDATE.key,{value:A.MINDATE.value,handler:this.configMinDate});this.cfg.addProperty(A.MAXDATE.key,{value:A.MAXDATE.value,handler:this.configMaxDate});this.cfg.addProperty(A.MULTI_SELECT.key,{value:A.MULTI_SELECT.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.START_WEEKDAY.key,{value:A.START_WEEKDAY.value,handler:this.configOptions,validator:this.cfg.checkNumber});this.cfg.addProperty(A.SHOW_WEEKDAYS.key,{value:A.SHOW_WEEKDAYS.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.SHOW_WEEK_HEADER.key,{value:A.SHOW_WEEK_HEADER.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.SHOW_WEEK_FOOTER.key,{value:A.SHOW_WEEK_FOOTER.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.HIDE_BLANK_WEEKS.key,{value:A.HIDE_BLANK_WEEKS.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.NAV_ARROW_LEFT.key,{value:A.NAV_ARROW_LEFT.value,handler:this.configOptions});
this.cfg.addProperty(A.NAV_ARROW_RIGHT.key,{value:A.NAV_ARROW_RIGHT.value,handler:this.configOptions});this.cfg.addProperty(A.MONTHS_SHORT.key,{value:A.MONTHS_SHORT.value,handler:this.configLocale});this.cfg.addProperty(A.MONTHS_LONG.key,{value:A.MONTHS_LONG.value,handler:this.configLocale});this.cfg.addProperty(A.WEEKDAYS_1CHAR.key,{value:A.WEEKDAYS_1CHAR.value,handler:this.configLocale});this.cfg.addProperty(A.WEEKDAYS_SHORT.key,{value:A.WEEKDAYS_SHORT.value,handler:this.configLocale});this.cfg.addProperty(A.WEEKDAYS_MEDIUM.key,{value:A.WEEKDAYS_MEDIUM.value,handler:this.configLocale});this.cfg.addProperty(A.WEEKDAYS_LONG.key,{value:A.WEEKDAYS_LONG.value,handler:this.configLocale});var B=function(){this.cfg.refireEvent(A.LOCALE_MONTHS.key);this.cfg.refireEvent(A.LOCALE_WEEKDAYS.key);};this.cfg.subscribeToConfigEvent(A.START_WEEKDAY.key,B,this,true);this.cfg.subscribeToConfigEvent(A.MONTHS_SHORT.key,B,this,true);this.cfg.subscribeToConfigEvent(A.MONTHS_LONG.key,B,this,true);this.cfg.subscribeToConfigEvent(A.WEEKDAYS_1CHAR.key,B,this,true);this.cfg.subscribeToConfigEvent(A.WEEKDAYS_SHORT.key,B,this,true);this.cfg.subscribeToConfigEvent(A.WEEKDAYS_MEDIUM.key,B,this,true);this.cfg.subscribeToConfigEvent(A.WEEKDAYS_LONG.key,B,this,true);this.cfg.addProperty(A.LOCALE_MONTHS.key,{value:A.LOCALE_MONTHS.value,handler:this.configLocaleValues});this.cfg.addProperty(A.LOCALE_WEEKDAYS.key,{value:A.LOCALE_WEEKDAYS.value,handler:this.configLocaleValues});this.cfg.addProperty(A.DATE_DELIMITER.key,{value:A.DATE_DELIMITER.value,handler:this.configLocale});this.cfg.addProperty(A.DATE_FIELD_DELIMITER.key,{value:A.DATE_FIELD_DELIMITER.value,handler:this.configLocale});this.cfg.addProperty(A.DATE_RANGE_DELIMITER.key,{value:A.DATE_RANGE_DELIMITER.value,handler:this.configLocale});this.cfg.addProperty(A.MY_MONTH_POSITION.key,{value:A.MY_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_YEAR_POSITION.key,{value:A.MY_YEAR_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MD_MONTH_POSITION.key,{value:A.MD_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MD_DAY_POSITION.key,{value:A.MD_DAY_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_MONTH_POSITION.key,{value:A.MDY_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_DAY_POSITION.key,{value:A.MDY_DAY_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_YEAR_POSITION.key,{value:A.MDY_YEAR_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_MONTH_POSITION.key,{value:A.MY_LABEL_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_YEAR_POSITION.key,{value:A.MY_LABEL_YEAR_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_MONTH_SUFFIX.key,{value:A.MY_LABEL_MONTH_SUFFIX.value,handler:this.configLocale});this.cfg.addProperty(A.MY_LABEL_YEAR_SUFFIX.key,{value:A.MY_LABEL_YEAR_SUFFIX.value,handler:this.configLocale});this.cfg.addProperty(A.NAV.key,{value:A.NAV.value,handler:this.configNavigator});},configPageDate:function(B,A,C){this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key,this._parsePageDate(A[0]),true);},configMinDate:function(B,A,C){var D=A[0];if(YAHOO.lang.isString(D)){D=this._parseDate(D);this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MINDATE.key,YAHOO.widget.DateMath.getDate(D[0],(D[1]-1),D[2]));}},configMaxDate:function(B,A,C){var D=A[0];if(YAHOO.lang.isString(D)){D=this._parseDate(D);this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MAXDATE.key,YAHOO.widget.DateMath.getDate(D[0],(D[1]-1),D[2]));}},configSelected:function(C,A,E){var B=A[0];var D=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;if(B){if(YAHOO.lang.isString(B)){this.cfg.setProperty(D,this._parseDates(B),true);}}if(!this._selectedDates){this._selectedDates=this.cfg.getProperty(D);}},configOptions:function(B,A,C){this.Options[B.toUpperCase()]=A[0];},configLocale:function(C,B,D){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.Locale[C.toUpperCase()]=B[0];this.cfg.refireEvent(A.LOCALE_MONTHS.key);this.cfg.refireEvent(A.LOCALE_WEEKDAYS.key);},configLocaleValues:function(D,C,E){var B=YAHOO.widget.Calendar._DEFAULT_CONFIG;D=D.toLowerCase();var G=C[0];switch(D){case B.LOCALE_MONTHS.key:switch(G){case YAHOO.widget.Calendar.SHORT:this.Locale.LOCALE_MONTHS=this.cfg.getProperty(B.MONTHS_SHORT.key).concat();break;case YAHOO.widget.Calendar.LONG:this.Locale.LOCALE_MONTHS=this.cfg.getProperty(B.MONTHS_LONG.key).concat();break;}break;case B.LOCALE_WEEKDAYS.key:switch(G){case YAHOO.widget.Calendar.ONE_CHAR:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(B.WEEKDAYS_1CHAR.key).concat();break;case YAHOO.widget.Calendar.SHORT:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(B.WEEKDAYS_SHORT.key).concat();break;case YAHOO.widget.Calendar.MEDIUM:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(B.WEEKDAYS_MEDIUM.key).concat();break;case YAHOO.widget.Calendar.LONG:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(B.WEEKDAYS_LONG.key).concat();break;}var F=this.cfg.getProperty(B.START_WEEKDAY.key);if(F>0){for(var A=0;A<F;++A){this.Locale.LOCALE_WEEKDAYS.push(this.Locale.LOCALE_WEEKDAYS.shift());}}break;}},configNavigator:function(C,A,D){var E=A[0];if(YAHOO.widget.CalendarNavigator&&(E===true||YAHOO.lang.isObject(E))){if(!this.oNavigator){this.oNavigator=new YAHOO.widget.CalendarNavigator(this);function B(){if(!this.pages){this.oNavigator.erase();}}this.beforeRenderEvent.subscribe(B,this,true);}}else{if(this.oNavigator){this.oNavigator.destroy();this.oNavigator=null;}}},initStyles:function(){var A=YAHOO.widget.Calendar._STYLES;this.Style={CSS_ROW_HEADER:A.CSS_ROW_HEADER,CSS_ROW_FOOTER:A.CSS_ROW_FOOTER,CSS_CELL:A.CSS_CELL,CSS_CELL_SELECTOR:A.CSS_CELL_SELECTOR,CSS_CELL_SELECTED:A.CSS_CELL_SELECTED,CSS_CELL_SELECTABLE:A.CSS_CELL_SELECTABLE,CSS_CELL_RESTRICTED:A.CSS_CELL_RESTRICTED,CSS_CELL_TODAY:A.CSS_CELL_TODAY,CSS_CELL_OOM:A.CSS_CELL_OOM,CSS_CELL_OOB:A.CSS_CELL_OOB,CSS_HEADER:A.CSS_HEADER,CSS_HEADER_TEXT:A.CSS_HEADER_TEXT,CSS_BODY:A.CSS_BODY,CSS_WEEKDAY_CELL:A.CSS_WEEKDAY_CELL,CSS_WEEKDAY_ROW:A.CSS_WEEKDAY_ROW,CSS_FOOTER:A.CSS_FOOTER,CSS_CALENDAR:A.CSS_CALENDAR,CSS_SINGLE:A.CSS_SINGLE,CSS_CONTAINER:A.CSS_CONTAINER,CSS_NAV_LEFT:A.CSS_NAV_LEFT,CSS_NAV_RIGHT:A.CSS_NAV_RIGHT,CSS_NAV:A.CSS_NAV,CSS_CLOSE:A.CSS_CLOSE,CSS_CELL_TOP:A.CSS_CELL_TOP,CSS_CELL_LEFT:A.CSS_CELL_LEFT,CSS_CELL_RIGHT:A.CSS_CELL_RIGHT,CSS_CELL_BOTTOM:A.CSS_CELL_BOTTOM,CSS_CELL_HOVER:A.CSS_CELL_HOVER,CSS_CELL_HIGHLIGHT1:A.CSS_CELL_HIGHLIGHT1,CSS_CELL_HIGHLIGHT2:A.CSS_CELL_HIGHLIGHT2,CSS_CELL_HIGHLIGHT3:A.CSS_CELL_HIGHLIGHT3,CSS_CELL_HIGHLIGHT4:A.CSS_CELL_HIGHLIGHT4};
},buildMonthLabel:function(){var A=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key);var C=this.Locale.LOCALE_MONTHS[A.getMonth()]+this.Locale.MY_LABEL_MONTH_SUFFIX;var B=A.getFullYear()+this.Locale.MY_LABEL_YEAR_SUFFIX;if(this.Locale.MY_LABEL_MONTH_POSITION==2||this.Locale.MY_LABEL_YEAR_POSITION==1){return B+C;}else{return C+B;}},buildDayLabel:function(A){return A.getDate();},createTitleBar:function(A){var B=YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE,"div",this.oDomContainer)[0]||document.createElement("div");B.className=YAHOO.widget.CalendarGroup.CSS_2UPTITLE;B.innerHTML=A;this.oDomContainer.insertBefore(B,this.oDomContainer.firstChild);YAHOO.util.Dom.addClass(this.oDomContainer,"withtitle");return B;},removeTitleBar:function(){var A=YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE,"div",this.oDomContainer)[0]||null;if(A){YAHOO.util.Event.purgeElement(A);this.oDomContainer.removeChild(A);}YAHOO.util.Dom.removeClass(this.oDomContainer,"withtitle");},createCloseButton:function(){var D=YAHOO.util.Dom,A=YAHOO.util.Event,C=YAHOO.widget.CalendarGroup.CSS_2UPCLOSE,F="us/my/bn/x_d.gif";var E=D.getElementsByClassName("link-close","a",this.oDomContainer)[0];if(!E){E=document.createElement("a");A.addListener(E,"click",function(H,G){G.hide();A.preventDefault(H);},this);}E.href="#";E.className="link-close";if(YAHOO.widget.Calendar.IMG_ROOT!==null){var B=D.getElementsByClassName(C,"img",E)[0]||document.createElement("img");B.src=YAHOO.widget.Calendar.IMG_ROOT+F;B.className=C;E.appendChild(B);}else{E.innerHTML='<span class="'+C+" "+this.Style.CSS_CLOSE+'"></span>';}this.oDomContainer.appendChild(E);return E;},removeCloseButton:function(){var A=YAHOO.util.Dom.getElementsByClassName("link-close","a",this.oDomContainer)[0]||null;if(A){YAHOO.util.Event.purgeElement(A);this.oDomContainer.removeChild(A);}},renderHeader:function(E){var H=7;var F="us/tr/callt.gif";var G="us/tr/calrt.gif";var M=YAHOO.widget.Calendar._DEFAULT_CONFIG;if(this.cfg.getProperty(M.SHOW_WEEK_HEADER.key)){H+=1;}if(this.cfg.getProperty(M.SHOW_WEEK_FOOTER.key)){H+=1;}E[E.length]="<thead>";E[E.length]="<tr>";E[E.length]='<th colspan="'+H+'" class="'+this.Style.CSS_HEADER_TEXT+'">';E[E.length]='<div class="'+this.Style.CSS_HEADER+'">';var K,L=false;if(this.parent){if(this.index===0){K=true;}if(this.index==(this.parent.cfg.getProperty("pages")-1)){L=true;}}else{K=true;L=true;}if(K){var A=this.cfg.getProperty(M.NAV_ARROW_LEFT.key);if(A===null&&YAHOO.widget.Calendar.IMG_ROOT!==null){A=YAHOO.widget.Calendar.IMG_ROOT+F;}var C=(A===null)?"":' style="background-image:url('+A+')"';E[E.length]='<a class="'+this.Style.CSS_NAV_LEFT+'"'+C+" >&#160;</a>";}var J=this.buildMonthLabel();var B=this.parent||this;if(B.cfg.getProperty("navigator")){J='<a class="'+this.Style.CSS_NAV+'" href="#">'+J+"</a>";}E[E.length]=J;if(L){var D=this.cfg.getProperty(M.NAV_ARROW_RIGHT.key);if(D===null&&YAHOO.widget.Calendar.IMG_ROOT!==null){D=YAHOO.widget.Calendar.IMG_ROOT+G;}var I=(D===null)?"":' style="background-image:url('+D+')"';E[E.length]='<a class="'+this.Style.CSS_NAV_RIGHT+'"'+I+" >&#160;</a>";}E[E.length]="</div>\n</th>\n</tr>";if(this.cfg.getProperty(M.SHOW_WEEKDAYS.key)){E=this.buildWeekdays(E);}E[E.length]="</thead>";return E;},buildWeekdays:function(C){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;C[C.length]='<tr class="'+this.Style.CSS_WEEKDAY_ROW+'">';if(this.cfg.getProperty(A.SHOW_WEEK_HEADER.key)){C[C.length]="<th>&#160;</th>";}for(var B=0;B<this.Locale.LOCALE_WEEKDAYS.length;++B){C[C.length]='<th class="calweekdaycell">'+this.Locale.LOCALE_WEEKDAYS[B]+"</th>";}if(this.cfg.getProperty(A.SHOW_WEEK_FOOTER.key)){C[C.length]="<th>&#160;</th>";}C[C.length]="</tr>";return C;},renderBody:function(g,e){var AF=YAHOO.widget.DateMath,M=YAHOO.widget.Calendar,Q=YAHOO.util.Dom,q=M._DEFAULT_CONFIG;var AE=this.cfg.getProperty(q.START_WEEKDAY.key);this.preMonthDays=g.getDay();if(AE>0){this.preMonthDays-=AE;}if(this.preMonthDays<0){this.preMonthDays+=7;}this.monthDays=AF.findMonthEnd(g).getDate();this.postMonthDays=M.DISPLAY_DAYS-this.preMonthDays-this.monthDays;g=AF.subtract(g,AF.DAY,this.preMonthDays);var T,I,H="w",Z="_cell",X="wd",n="d",J,l,R=this.today.getFullYear(),m=this.today.getMonth(),E=this.today.getDate(),v=this.cfg.getProperty(q.PAGEDATE.key),C=this.cfg.getProperty(q.HIDE_BLANK_WEEKS.key),c=this.cfg.getProperty(q.SHOW_WEEK_FOOTER.key),W=this.cfg.getProperty(q.SHOW_WEEK_HEADER.key),O=this.cfg.getProperty(q.MINDATE.key),V=this.cfg.getProperty(q.MAXDATE.key);if(O){O=AF.clearTime(O);}if(V){V=AF.clearTime(V);}e[e.length]='<tbody class="m'+(v.getMonth()+1)+" "+this.Style.CSS_BODY+'">';var AC=0,K=document.createElement("div"),f=document.createElement("td");K.appendChild(f);var u=this.parent||this;for(var y=0;y<6;y++){T=AF.getWeekNumber(g,AE);I=H+T;if(y!==0&&C===true&&g.getMonth()!=v.getMonth()){break;}else{e[e.length]='<tr class="'+I+'">';if(W){e=this.renderRowHeader(T,e);}for(var AD=0;AD<7;AD++){J=[];this.clearElement(f);f.className=this.Style.CSS_CELL;f.id=this.id+Z+AC;if(g.getDate()==E&&g.getMonth()==m&&g.getFullYear()==R){J[J.length]=u.renderCellStyleToday;}var U=[g.getFullYear(),g.getMonth()+1,g.getDate()];this.cellDates[this.cellDates.length]=U;if(g.getMonth()!=v.getMonth()){J[J.length]=u.renderCellNotThisMonth;}else{Q.addClass(f,X+g.getDay());Q.addClass(f,n+g.getDate());for(var w=0;w<this.renderStack.length;++w){l=null;var o=this.renderStack[w],AG=o[0],B,Y,G;switch(AG){case M.DATE:B=o[1][1];Y=o[1][2];G=o[1][0];if(g.getMonth()+1==B&&g.getDate()==Y&&g.getFullYear()==G){l=o[2];this.renderStack.splice(w,1);}break;case M.MONTH_DAY:B=o[1][0];Y=o[1][1];if(g.getMonth()+1==B&&g.getDate()==Y){l=o[2];this.renderStack.splice(w,1);}break;case M.RANGE:var b=o[1][0],a=o[1][1],h=b[1],N=b[2],S=b[0],AB=AF.getDate(S,h-1,N),F=a[1],k=a[2],A=a[0],AA=AF.getDate(A,F-1,k);if(g.getTime()>=AB.getTime()&&g.getTime()<=AA.getTime()){l=o[2];if(g.getTime()==AA.getTime()){this.renderStack.splice(w,1);}}break;case M.WEEKDAY:var L=o[1][0];
if(g.getDay()+1==L){l=o[2];}break;case M.MONTH:B=o[1][0];if(g.getMonth()+1==B){l=o[2];}break;}if(l){J[J.length]=l;}}}if(this._indexOfSelectedFieldArray(U)>-1){J[J.length]=u.renderCellStyleSelected;}if((O&&(g.getTime()<O.getTime()))||(V&&(g.getTime()>V.getTime()))){J[J.length]=u.renderOutOfBoundsDate;}else{J[J.length]=u.styleCellDefault;J[J.length]=u.renderCellDefault;}for(var t=0;t<J.length;++t){if(J[t].call(u,g,f)==M.STOP_RENDER){break;}}g.setTime(g.getTime()+AF.ONE_DAY_MS);g=AF.clearTime(g);if(AC>=0&&AC<=6){Q.addClass(f,this.Style.CSS_CELL_TOP);}if((AC%7)===0){Q.addClass(f,this.Style.CSS_CELL_LEFT);}if(((AC+1)%7)===0){Q.addClass(f,this.Style.CSS_CELL_RIGHT);}var j=this.postMonthDays;if(C&&j>=7){var P=Math.floor(j/7);for(var z=0;z<P;++z){j-=7;}}if(AC>=((this.preMonthDays+j+this.monthDays)-7)){Q.addClass(f,this.Style.CSS_CELL_BOTTOM);}e[e.length]=K.innerHTML;AC++;}if(c){e=this.renderRowFooter(T,e);}e[e.length]="</tr>";}}e[e.length]="</tbody>";return e;},renderFooter:function(A){return A;},render:function(){this.beforeRenderEvent.fire();var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;var C=YAHOO.widget.DateMath.findMonthStart(this.cfg.getProperty(A.PAGEDATE.key));this.resetRenderers();this.cellDates.length=0;YAHOO.util.Event.purgeElement(this.oDomContainer,true);var B=[];B[B.length]='<table cellSpacing="0" class="'+this.Style.CSS_CALENDAR+" y"+C.getFullYear()+'" id="'+this.id+'">';B=this.renderHeader(B);B=this.renderBody(C,B);B=this.renderFooter(B);B[B.length]="</table>";this.oDomContainer.innerHTML=B.join("\n");this.applyListeners();this.cells=this.oDomContainer.getElementsByTagName("td");this.cfg.refireEvent(A.TITLE.key);this.cfg.refireEvent(A.CLOSE.key);this.cfg.refireEvent(A.IFRAME.key);this.renderEvent.fire();},applyListeners:function(){var K=this.oDomContainer;var B=this.parent||this;var G="a";var D="mousedown";var H=YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_LEFT,G,K);var C=YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_RIGHT,G,K);if(H&&H.length>0){this.linkLeft=H[0];YAHOO.util.Event.addListener(this.linkLeft,D,B.previousMonth,B,true);}if(C&&C.length>0){this.linkRight=C[0];YAHOO.util.Event.addListener(this.linkRight,D,B.nextMonth,B,true);}if(B.cfg.getProperty("navigator")!==null){this.applyNavListeners();}if(this.domEventMap){var E,A;for(var M in this.domEventMap){if(YAHOO.lang.hasOwnProperty(this.domEventMap,M)){var I=this.domEventMap[M];if(!(I instanceof Array)){I=[I];}for(var F=0;F<I.length;F++){var L=I[F];A=YAHOO.util.Dom.getElementsByClassName(M,L.tag,this.oDomContainer);for(var J=0;J<A.length;J++){E=A[J];YAHOO.util.Event.addListener(E,L.event,L.handler,L.scope,L.correct);}}}}}YAHOO.util.Event.addListener(this.oDomContainer,"click",this.doSelectCell,this);YAHOO.util.Event.addListener(this.oDomContainer,"mouseover",this.doCellMouseOver,this);YAHOO.util.Event.addListener(this.oDomContainer,"mouseout",this.doCellMouseOut,this);},applyNavListeners:function(){var D=YAHOO.util.Event;var C=this.parent||this;var F=this;var B=YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV,"a",this.oDomContainer);if(B.length>0){function A(J,I){var H=D.getTarget(J);if(this===H||YAHOO.util.Dom.isAncestor(this,H)){D.preventDefault(J);}var E=C.oNavigator;if(E){var G=F.cfg.getProperty("pagedate");E.setYear(G.getFullYear());E.setMonth(G.getMonth());E.show();}}D.addListener(B,"click",A);}},getDateByCellId:function(B){var A=this.getDateFieldsByCellId(B);return YAHOO.widget.DateMath.getDate(A[0],A[1]-1,A[2]);},getDateFieldsByCellId:function(A){A=A.toLowerCase().split("_cell")[1];A=parseInt(A,10);return this.cellDates[A];},getCellIndex:function(C){var B=-1;if(C){var A=C.getMonth(),H=C.getFullYear(),G=C.getDate(),E=this.cellDates;for(var D=0;D<E.length;++D){var F=E[D];if(F[0]===H&&F[1]===A+1&&F[2]===G){B=D;break;}}}return B;},renderOutOfBoundsDate:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_OOB);A.innerHTML=B.getDate();return YAHOO.widget.Calendar.STOP_RENDER;},renderRowHeader:function(B,A){A[A.length]='<th class="calrowhead">'+B+"</th>";return A;},renderRowFooter:function(B,A){A[A.length]='<th class="calrowfoot">'+B+"</th>";return A;},renderCellDefault:function(B,A){A.innerHTML='<a href="#" class="'+this.Style.CSS_CELL_SELECTOR+'">'+this.buildDayLabel(B)+"</a>";},styleCellDefault:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_SELECTABLE);},renderCellStyleHighlight1:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_HIGHLIGHT1);},renderCellStyleHighlight2:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_HIGHLIGHT2);},renderCellStyleHighlight3:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_HIGHLIGHT3);},renderCellStyleHighlight4:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_HIGHLIGHT4);},renderCellStyleToday:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_TODAY);},renderCellStyleSelected:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_SELECTED);},renderCellNotThisMonth:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_OOM);A.innerHTML=B.getDate();return YAHOO.widget.Calendar.STOP_RENDER;},renderBodyCellRestricted:function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL);YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_RESTRICTED);A.innerHTML=B.getDate();return YAHOO.widget.Calendar.STOP_RENDER;},addMonths:function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;this.cfg.setProperty(A,YAHOO.widget.DateMath.add(this.cfg.getProperty(A),YAHOO.widget.DateMath.MONTH,B));this.resetRenderers();this.changePageEvent.fire();},subtractMonths:function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;this.cfg.setProperty(A,YAHOO.widget.DateMath.subtract(this.cfg.getProperty(A),YAHOO.widget.DateMath.MONTH,B));this.resetRenderers();this.changePageEvent.fire();},addYears:function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;this.cfg.setProperty(A,YAHOO.widget.DateMath.add(this.cfg.getProperty(A),YAHOO.widget.DateMath.YEAR,B));this.resetRenderers();this.changePageEvent.fire();
},subtractYears:function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;this.cfg.setProperty(A,YAHOO.widget.DateMath.subtract(this.cfg.getProperty(A),YAHOO.widget.DateMath.YEAR,B));this.resetRenderers();this.changePageEvent.fire();},nextMonth:function(){this.addMonths(1);},previousMonth:function(){this.subtractMonths(1);},nextYear:function(){this.addYears(1);},previousYear:function(){this.subtractYears(1);},reset:function(){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.cfg.resetProperty(A.SELECTED.key);this.cfg.resetProperty(A.PAGEDATE.key);this.resetEvent.fire();},clear:function(){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.cfg.setProperty(A.SELECTED.key,[]);this.cfg.setProperty(A.PAGEDATE.key,new Date(this.today.getTime()));this.clearEvent.fire();},select:function(C){var F=this._toFieldArray(C);var B=[];var E=[];var G=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;for(var A=0;A<F.length;++A){var D=F[A];if(!this.isDateOOB(this._toDate(D))){if(B.length===0){this.beforeSelectEvent.fire();E=this.cfg.getProperty(G);}B.push(D);if(this._indexOfSelectedFieldArray(D)==-1){E[E.length]=D;}}}if(B.length>0){if(this.parent){this.parent.cfg.setProperty(G,E);}else{this.cfg.setProperty(G,E);}this.selectEvent.fire(B);}return this.getSelectedDates();},selectCell:function(D){var B=this.cells[D];var H=this.cellDates[D];var G=this._toDate(H);var C=YAHOO.util.Dom.hasClass(B,this.Style.CSS_CELL_SELECTABLE);if(C){this.beforeSelectEvent.fire();var F=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;var E=this.cfg.getProperty(F);var A=H.concat();if(this._indexOfSelectedFieldArray(A)==-1){E[E.length]=A;}if(this.parent){this.parent.cfg.setProperty(F,E);}else{this.cfg.setProperty(F,E);}this.renderCellStyleSelected(G,B);this.selectEvent.fire([A]);this.doCellMouseOut.call(B,null,this);}return this.getSelectedDates();},deselect:function(E){var A=this._toFieldArray(E);var D=[];var G=[];var H=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;for(var B=0;B<A.length;++B){var F=A[B];if(!this.isDateOOB(this._toDate(F))){if(D.length===0){this.beforeDeselectEvent.fire();G=this.cfg.getProperty(H);}D.push(F);var C=this._indexOfSelectedFieldArray(F);if(C!=-1){G.splice(C,1);}}}if(D.length>0){if(this.parent){this.parent.cfg.setProperty(H,G);}else{this.cfg.setProperty(H,G);}this.deselectEvent.fire(D);}return this.getSelectedDates();},deselectCell:function(E){var H=this.cells[E];var B=this.cellDates[E];var F=this._indexOfSelectedFieldArray(B);var G=YAHOO.util.Dom.hasClass(H,this.Style.CSS_CELL_SELECTABLE);if(G){this.beforeDeselectEvent.fire();var I=YAHOO.widget.Calendar._DEFAULT_CONFIG;var D=this.cfg.getProperty(I.SELECTED.key);var C=this._toDate(B);var A=B.concat();if(F>-1){if(this.cfg.getProperty(I.PAGEDATE.key).getMonth()==C.getMonth()&&this.cfg.getProperty(I.PAGEDATE.key).getFullYear()==C.getFullYear()){YAHOO.util.Dom.removeClass(H,this.Style.CSS_CELL_SELECTED);}D.splice(F,1);}if(this.parent){this.parent.cfg.setProperty(I.SELECTED.key,D);}else{this.cfg.setProperty(I.SELECTED.key,D);}this.deselectEvent.fire(A);}return this.getSelectedDates();},deselectAll:function(){this.beforeDeselectEvent.fire();var D=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;var A=this.cfg.getProperty(D);var B=A.length;var C=A.concat();if(this.parent){this.parent.cfg.setProperty(D,[]);}else{this.cfg.setProperty(D,[]);}if(B>0){this.deselectEvent.fire(C);}return this.getSelectedDates();},_toFieldArray:function(B){var A=[];if(B instanceof Date){A=[[B.getFullYear(),B.getMonth()+1,B.getDate()]];}else{if(YAHOO.lang.isString(B)){A=this._parseDates(B);}else{if(YAHOO.lang.isArray(B)){for(var C=0;C<B.length;++C){var D=B[C];A[A.length]=[D.getFullYear(),D.getMonth()+1,D.getDate()];}}}}return A;},toDate:function(A){return this._toDate(A);},_toDate:function(A){if(A instanceof Date){return A;}else{return YAHOO.widget.DateMath.getDate(A[0],A[1]-1,A[2]);}},_fieldArraysAreEqual:function(C,B){var A=false;if(C[0]==B[0]&&C[1]==B[1]&&C[2]==B[2]){A=true;}return A;},_indexOfSelectedFieldArray:function(E){var D=-1;var A=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key);for(var C=0;C<A.length;++C){var B=A[C];if(E[0]==B[0]&&E[1]==B[1]&&E[2]==B[2]){D=C;break;}}return D;},isDateOOM:function(A){return(A.getMonth()!=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key).getMonth());},isDateOOB:function(D){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;var E=this.cfg.getProperty(A.MINDATE.key);var F=this.cfg.getProperty(A.MAXDATE.key);var C=YAHOO.widget.DateMath;if(E){E=C.clearTime(E);}if(F){F=C.clearTime(F);}var B=new Date(D.getTime());B=C.clearTime(B);return((E&&B.getTime()<E.getTime())||(F&&B.getTime()>F.getTime()));},_parsePageDate:function(B){var E;var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;if(B){if(B instanceof Date){E=YAHOO.widget.DateMath.findMonthStart(B);}else{var F,D,C;C=B.split(this.cfg.getProperty(A.DATE_FIELD_DELIMITER.key));F=parseInt(C[this.cfg.getProperty(A.MY_MONTH_POSITION.key)-1],10)-1;D=parseInt(C[this.cfg.getProperty(A.MY_YEAR_POSITION.key)-1],10);E=YAHOO.widget.DateMath.getDate(D,F,1);}}else{E=YAHOO.widget.DateMath.getDate(this.today.getFullYear(),this.today.getMonth(),1);}return E;},onBeforeSelect:function(){if(this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MULTI_SELECT.key)===false){if(this.parent){this.parent.callChildFunction("clearAllBodyCellStyles",this.Style.CSS_CELL_SELECTED);this.parent.deselectAll();}else{this.clearAllBodyCellStyles(this.Style.CSS_CELL_SELECTED);this.deselectAll();}}},onSelect:function(A){},onBeforeDeselect:function(){},onDeselect:function(A){},onChangePage:function(){this.render();},onRender:function(){},onReset:function(){this.render();},onClear:function(){this.render();},validate:function(){return true;},_parseDate:function(C){var D=C.split(this.Locale.DATE_FIELD_DELIMITER);var A;if(D.length==2){A=[D[this.Locale.MD_MONTH_POSITION-1],D[this.Locale.MD_DAY_POSITION-1]];A.type=YAHOO.widget.Calendar.MONTH_DAY;}else{A=[D[this.Locale.MDY_YEAR_POSITION-1],D[this.Locale.MDY_MONTH_POSITION-1],D[this.Locale.MDY_DAY_POSITION-1]];
A.type=YAHOO.widget.Calendar.DATE;}for(var B=0;B<A.length;B++){A[B]=parseInt(A[B],10);}return A;},_parseDates:function(B){var I=[];var H=B.split(this.Locale.DATE_DELIMITER);for(var G=0;G<H.length;++G){var F=H[G];if(F.indexOf(this.Locale.DATE_RANGE_DELIMITER)!=-1){var A=F.split(this.Locale.DATE_RANGE_DELIMITER);var E=this._parseDate(A[0]);var J=this._parseDate(A[1]);var D=this._parseRange(E,J);I=I.concat(D);}else{var C=this._parseDate(F);I.push(C);}}return I;},_parseRange:function(A,E){var B=YAHOO.widget.DateMath.add(YAHOO.widget.DateMath.getDate(A[0],A[1]-1,A[2]),YAHOO.widget.DateMath.DAY,1);var D=YAHOO.widget.DateMath.getDate(E[0],E[1]-1,E[2]);var C=[];C.push(A);while(B.getTime()<=D.getTime()){C.push([B.getFullYear(),B.getMonth()+1,B.getDate()]);B=YAHOO.widget.DateMath.add(B,YAHOO.widget.DateMath.DAY,1);}return C;},resetRenderers:function(){this.renderStack=this._renderStack.concat();},removeRenderers:function(){this._renderStack=[];this.renderStack=[];},clearElement:function(A){A.innerHTML="&#160;";A.className="";},addRenderer:function(A,B){var D=this._parseDates(A);for(var C=0;C<D.length;++C){var E=D[C];if(E.length==2){if(E[0] instanceof Array){this._addRenderer(YAHOO.widget.Calendar.RANGE,E,B);}else{this._addRenderer(YAHOO.widget.Calendar.MONTH_DAY,E,B);}}else{if(E.length==3){this._addRenderer(YAHOO.widget.Calendar.DATE,E,B);}}}},_addRenderer:function(B,C,A){var D=[B,C,A];this.renderStack.unshift(D);this._renderStack=this.renderStack.concat();},addMonthRenderer:function(B,A){this._addRenderer(YAHOO.widget.Calendar.MONTH,[B],A);},addWeekdayRenderer:function(B,A){this._addRenderer(YAHOO.widget.Calendar.WEEKDAY,[B],A);},clearAllBodyCellStyles:function(A){for(var B=0;B<this.cells.length;++B){YAHOO.util.Dom.removeClass(this.cells[B],A);}},setMonth:function(C){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;var B=this.cfg.getProperty(A);B.setMonth(parseInt(C,10));this.cfg.setProperty(A,B);},setYear:function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;var C=this.cfg.getProperty(A);C.setFullYear(parseInt(B,10));this.cfg.setProperty(A,C);},getSelectedDates:function(){var C=[];var B=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key);for(var E=0;E<B.length;++E){var D=B[E];var A=YAHOO.widget.DateMath.getDate(D[0],D[1]-1,D[2]);C.push(A);}C.sort(function(G,F){return G-F;});return C;},hide:function(){if(this.beforeHideEvent.fire()){this.oDomContainer.style.display="none";this.hideEvent.fire();}},show:function(){if(this.beforeShowEvent.fire()){this.oDomContainer.style.display="block";this.showEvent.fire();}},browser:(function(){var A=navigator.userAgent.toLowerCase();if(A.indexOf("opera")!=-1){return"opera";}else{if(A.indexOf("msie 7")!=-1){return"ie7";}else{if(A.indexOf("msie")!=-1){return"ie";}else{if(A.indexOf("safari")!=-1){return"safari";}else{if(A.indexOf("gecko")!=-1){return"gecko";}else{return false;}}}}}})(),toString:function(){return"Calendar "+this.id;}};YAHOO.widget.Calendar_Core=YAHOO.widget.Calendar;YAHOO.widget.Cal_Core=YAHOO.widget.Calendar;YAHOO.widget.CalendarGroup=function(C,A,B){if(arguments.length>0){this.init.apply(this,arguments);}};YAHOO.widget.CalendarGroup.prototype={init:function(D,B,C){var A=this._parseArgs(arguments);D=A.id;B=A.container;C=A.config;this.oDomContainer=YAHOO.util.Dom.get(B);if(!this.oDomContainer.id){this.oDomContainer.id=YAHOO.util.Dom.generateId();}if(!D){D=this.oDomContainer.id+"_t";}this.id=D;this.containerId=this.oDomContainer.id;this.initEvents();this.initStyles();this.pages=[];YAHOO.util.Dom.addClass(this.oDomContainer,YAHOO.widget.CalendarGroup.CSS_CONTAINER);YAHOO.util.Dom.addClass(this.oDomContainer,YAHOO.widget.CalendarGroup.CSS_MULTI_UP);this.cfg=new YAHOO.util.Config(this);this.Options={};this.Locale={};this.setupConfig();if(C){this.cfg.applyConfig(C,true);}this.cfg.fireQueue();if(YAHOO.env.ua.opera){this.renderEvent.subscribe(this._fixWidth,this,true);this.showEvent.subscribe(this._fixWidth,this,true);}},setupConfig:function(){var A=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG;this.cfg.addProperty(A.PAGES.key,{value:A.PAGES.value,validator:this.cfg.checkNumber,handler:this.configPages});this.cfg.addProperty(A.PAGEDATE.key,{value:new Date(),handler:this.configPageDate});this.cfg.addProperty(A.SELECTED.key,{value:[],handler:this.configSelected});this.cfg.addProperty(A.TITLE.key,{value:A.TITLE.value,handler:this.configTitle});this.cfg.addProperty(A.CLOSE.key,{value:A.CLOSE.value,handler:this.configClose});this.cfg.addProperty(A.IFRAME.key,{value:A.IFRAME.value,handler:this.configIframe,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.MINDATE.key,{value:A.MINDATE.value,handler:this.delegateConfig});this.cfg.addProperty(A.MAXDATE.key,{value:A.MAXDATE.value,handler:this.delegateConfig});this.cfg.addProperty(A.MULTI_SELECT.key,{value:A.MULTI_SELECT.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.START_WEEKDAY.key,{value:A.START_WEEKDAY.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.SHOW_WEEKDAYS.key,{value:A.SHOW_WEEKDAYS.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.SHOW_WEEK_HEADER.key,{value:A.SHOW_WEEK_HEADER.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.SHOW_WEEK_FOOTER.key,{value:A.SHOW_WEEK_FOOTER.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.HIDE_BLANK_WEEKS.key,{value:A.HIDE_BLANK_WEEKS.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.NAV_ARROW_LEFT.key,{value:A.NAV_ARROW_LEFT.value,handler:this.delegateConfig});this.cfg.addProperty(A.NAV_ARROW_RIGHT.key,{value:A.NAV_ARROW_RIGHT.value,handler:this.delegateConfig});this.cfg.addProperty(A.MONTHS_SHORT.key,{value:A.MONTHS_SHORT.value,handler:this.delegateConfig});this.cfg.addProperty(A.MONTHS_LONG.key,{value:A.MONTHS_LONG.value,handler:this.delegateConfig});this.cfg.addProperty(A.WEEKDAYS_1CHAR.key,{value:A.WEEKDAYS_1CHAR.value,handler:this.delegateConfig});
this.cfg.addProperty(A.WEEKDAYS_SHORT.key,{value:A.WEEKDAYS_SHORT.value,handler:this.delegateConfig});this.cfg.addProperty(A.WEEKDAYS_MEDIUM.key,{value:A.WEEKDAYS_MEDIUM.value,handler:this.delegateConfig});this.cfg.addProperty(A.WEEKDAYS_LONG.key,{value:A.WEEKDAYS_LONG.value,handler:this.delegateConfig});this.cfg.addProperty(A.LOCALE_MONTHS.key,{value:A.LOCALE_MONTHS.value,handler:this.delegateConfig});this.cfg.addProperty(A.LOCALE_WEEKDAYS.key,{value:A.LOCALE_WEEKDAYS.value,handler:this.delegateConfig});this.cfg.addProperty(A.DATE_DELIMITER.key,{value:A.DATE_DELIMITER.value,handler:this.delegateConfig});this.cfg.addProperty(A.DATE_FIELD_DELIMITER.key,{value:A.DATE_FIELD_DELIMITER.value,handler:this.delegateConfig});this.cfg.addProperty(A.DATE_RANGE_DELIMITER.key,{value:A.DATE_RANGE_DELIMITER.value,handler:this.delegateConfig});this.cfg.addProperty(A.MY_MONTH_POSITION.key,{value:A.MY_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_YEAR_POSITION.key,{value:A.MY_YEAR_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MD_MONTH_POSITION.key,{value:A.MD_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MD_DAY_POSITION.key,{value:A.MD_DAY_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_MONTH_POSITION.key,{value:A.MDY_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_DAY_POSITION.key,{value:A.MDY_DAY_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_YEAR_POSITION.key,{value:A.MDY_YEAR_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_MONTH_POSITION.key,{value:A.MY_LABEL_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_YEAR_POSITION.key,{value:A.MY_LABEL_YEAR_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_MONTH_SUFFIX.key,{value:A.MY_LABEL_MONTH_SUFFIX.value,handler:this.delegateConfig});this.cfg.addProperty(A.MY_LABEL_YEAR_SUFFIX.key,{value:A.MY_LABEL_YEAR_SUFFIX.value,handler:this.delegateConfig});this.cfg.addProperty(A.NAV.key,{value:A.NAV.value,handler:this.configNavigator});},initEvents:function(){var C=this;var E="Event";var B=function(G,J,F){for(var I=0;I<C.pages.length;++I){var H=C.pages[I];H[this.type+E].subscribe(G,J,F);}};var A=function(F,I){for(var H=0;H<C.pages.length;++H){var G=C.pages[H];G[this.type+E].unsubscribe(F,I);}};var D=YAHOO.widget.Calendar._EVENT_TYPES;this.beforeSelectEvent=new YAHOO.util.CustomEvent(D.BEFORE_SELECT);this.beforeSelectEvent.subscribe=B;this.beforeSelectEvent.unsubscribe=A;this.selectEvent=new YAHOO.util.CustomEvent(D.SELECT);this.selectEvent.subscribe=B;this.selectEvent.unsubscribe=A;this.beforeDeselectEvent=new YAHOO.util.CustomEvent(D.BEFORE_DESELECT);this.beforeDeselectEvent.subscribe=B;this.beforeDeselectEvent.unsubscribe=A;this.deselectEvent=new YAHOO.util.CustomEvent(D.DESELECT);this.deselectEvent.subscribe=B;this.deselectEvent.unsubscribe=A;this.changePageEvent=new YAHOO.util.CustomEvent(D.CHANGE_PAGE);this.changePageEvent.subscribe=B;this.changePageEvent.unsubscribe=A;this.beforeRenderEvent=new YAHOO.util.CustomEvent(D.BEFORE_RENDER);this.beforeRenderEvent.subscribe=B;this.beforeRenderEvent.unsubscribe=A;this.renderEvent=new YAHOO.util.CustomEvent(D.RENDER);this.renderEvent.subscribe=B;this.renderEvent.unsubscribe=A;this.resetEvent=new YAHOO.util.CustomEvent(D.RESET);this.resetEvent.subscribe=B;this.resetEvent.unsubscribe=A;this.clearEvent=new YAHOO.util.CustomEvent(D.CLEAR);this.clearEvent.subscribe=B;this.clearEvent.unsubscribe=A;this.beforeShowEvent=new YAHOO.util.CustomEvent(D.BEFORE_SHOW);this.showEvent=new YAHOO.util.CustomEvent(D.SHOW);this.beforeHideEvent=new YAHOO.util.CustomEvent(D.BEFORE_HIDE);this.hideEvent=new YAHOO.util.CustomEvent(D.HIDE);this.beforeShowNavEvent=new YAHOO.util.CustomEvent(D.BEFORE_SHOW_NAV);this.showNavEvent=new YAHOO.util.CustomEvent(D.SHOW_NAV);this.beforeHideNavEvent=new YAHOO.util.CustomEvent(D.BEFORE_HIDE_NAV);this.hideNavEvent=new YAHOO.util.CustomEvent(D.HIDE_NAV);this.beforeRenderNavEvent=new YAHOO.util.CustomEvent(D.BEFORE_RENDER_NAV);this.renderNavEvent=new YAHOO.util.CustomEvent(D.RENDER_NAV);},configPages:function(K,J,G){var E=J[0];var C=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;var O="_";var L="groupcal";var N="first-of-type";var D="last-of-type";for(var B=0;B<E;++B){var M=this.id+O+B;var I=this.containerId+O+B;var H=this.cfg.getConfig();H.close=false;H.title=false;H.navigator=null;var A=this.constructChild(M,I,H);var F=A.cfg.getProperty(C);this._setMonthOnDate(F,F.getMonth()+B);A.cfg.setProperty(C,F);YAHOO.util.Dom.removeClass(A.oDomContainer,this.Style.CSS_SINGLE);YAHOO.util.Dom.addClass(A.oDomContainer,L);if(B===0){YAHOO.util.Dom.addClass(A.oDomContainer,N);}if(B==(E-1)){YAHOO.util.Dom.addClass(A.oDomContainer,D);}A.parent=this;A.index=B;this.pages[this.pages.length]=A;}},configPageDate:function(H,G,E){var C=G[0];var F;var D=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;for(var B=0;B<this.pages.length;++B){var A=this.pages[B];if(B===0){F=A._parsePageDate(C);A.cfg.setProperty(D,F);}else{var I=new Date(F);this._setMonthOnDate(I,I.getMonth()+B);A.cfg.setProperty(D,I);}}},configSelected:function(C,A,E){var D=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.SELECTED.key;this.delegateConfig(C,A,E);var B=(this.pages.length>0)?this.pages[0].cfg.getProperty(D):[];this.cfg.setProperty(D,B,true);},delegateConfig:function(B,A,E){var F=A[0];var D;for(var C=0;C<this.pages.length;C++){D=this.pages[C];D.cfg.setProperty(B,F);}},setChildFunction:function(D,B){var A=this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES.key);for(var C=0;C<A;++C){this.pages[C][D]=B;}},callChildFunction:function(F,B){var A=this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES.key);
for(var E=0;E<A;++E){var D=this.pages[E];if(D[F]){var C=D[F];C.call(D,B);}}},constructChild:function(D,B,C){var A=document.getElementById(B);if(!A){A=document.createElement("div");A.id=B;this.oDomContainer.appendChild(A);}return new YAHOO.widget.Calendar(D,B,C);},setMonth:function(E){E=parseInt(E,10);var F;var B=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;for(var D=0;D<this.pages.length;++D){var C=this.pages[D];var A=C.cfg.getProperty(B);if(D===0){F=A.getFullYear();}else{A.setFullYear(F);}this._setMonthOnDate(A,E+D);C.cfg.setProperty(B,A);}},setYear:function(C){var B=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;C=parseInt(C,10);for(var E=0;E<this.pages.length;++E){var D=this.pages[E];var A=D.cfg.getProperty(B);if((A.getMonth()+1)==1&&E>0){C+=1;}D.setYear(C);}},render:function(){this.renderHeader();for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.render();}this.renderFooter();},select:function(A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.select(A);}return this.getSelectedDates();},selectCell:function(A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.selectCell(A);}return this.getSelectedDates();},deselect:function(A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.deselect(A);}return this.getSelectedDates();},deselectAll:function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.deselectAll();}return this.getSelectedDates();},deselectCell:function(A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.deselectCell(A);}return this.getSelectedDates();},reset:function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.reset();}},clear:function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.clear();}},nextMonth:function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.nextMonth();}},previousMonth:function(){for(var B=this.pages.length-1;B>=0;--B){var A=this.pages[B];A.previousMonth();}},nextYear:function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.nextYear();}},previousYear:function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.previousYear();}},getSelectedDates:function(){var C=[];var B=this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.SELECTED.key);for(var E=0;E<B.length;++E){var D=B[E];var A=YAHOO.widget.DateMath.getDate(D[0],D[1]-1,D[2]);C.push(A);}C.sort(function(G,F){return G-F;});return C;},addRenderer:function(A,B){for(var D=0;D<this.pages.length;++D){var C=this.pages[D];C.addRenderer(A,B);}},addMonthRenderer:function(D,A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.addMonthRenderer(D,A);}},addWeekdayRenderer:function(B,A){for(var D=0;D<this.pages.length;++D){var C=this.pages[D];C.addWeekdayRenderer(B,A);}},removeRenderers:function(){this.callChildFunction("removeRenderers");},renderHeader:function(){},renderFooter:function(){},addMonths:function(A){this.callChildFunction("addMonths",A);},subtractMonths:function(A){this.callChildFunction("subtractMonths",A);},addYears:function(A){this.callChildFunction("addYears",A);},subtractYears:function(A){this.callChildFunction("subtractYears",A);},getCalendarPage:function(D){var F=null;if(D){var G=D.getFullYear(),C=D.getMonth();var B=this.pages;for(var E=0;E<B.length;++E){var A=B[E].cfg.getProperty("pagedate");if(A.getFullYear()===G&&A.getMonth()===C){F=B[E];break;}}}return F;},_setMonthOnDate:function(C,D){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420&&(D<0||D>11)){var B=YAHOO.widget.DateMath;var A=B.add(C,B.MONTH,D-C.getMonth());C.setTime(A.getTime());}else{C.setMonth(D);}},_fixWidth:function(){var A=0;for(var C=0;C<this.pages.length;++C){var B=this.pages[C];A+=B.oDomContainer.offsetWidth;}if(A>0){this.oDomContainer.style.width=A+"px";}},toString:function(){return"CalendarGroup "+this.id;}};YAHOO.widget.CalendarGroup.CSS_CONTAINER="yui-calcontainer";YAHOO.widget.CalendarGroup.CSS_MULTI_UP="multi";YAHOO.widget.CalendarGroup.CSS_2UPTITLE="title";YAHOO.widget.CalendarGroup.CSS_2UPCLOSE="close-icon";YAHOO.lang.augmentProto(YAHOO.widget.CalendarGroup,YAHOO.widget.Calendar,"buildDayLabel","buildMonthLabel","renderOutOfBoundsDate","renderRowHeader","renderRowFooter","renderCellDefault","styleCellDefault","renderCellStyleHighlight1","renderCellStyleHighlight2","renderCellStyleHighlight3","renderCellStyleHighlight4","renderCellStyleToday","renderCellStyleSelected","renderCellNotThisMonth","renderBodyCellRestricted","initStyles","configTitle","configClose","configIframe","configNavigator","createTitleBar","createCloseButton","removeTitleBar","removeCloseButton","hide","show","toDate","_toDate","_parseArgs","browser");YAHOO.widget.CalendarGroup._DEFAULT_CONFIG=YAHOO.widget.Calendar._DEFAULT_CONFIG;YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES={key:"pages",value:2};YAHOO.widget.CalGrp=YAHOO.widget.CalendarGroup;YAHOO.widget.Calendar2up=function(C,A,B){this.init(C,A,B);};YAHOO.extend(YAHOO.widget.Calendar2up,YAHOO.widget.CalendarGroup);YAHOO.widget.Cal2up=YAHOO.widget.Calendar2up;YAHOO.widget.CalendarNavigator=function(A){this.init(A);};(function(){var A=YAHOO.widget.CalendarNavigator;A.CLASSES={NAV:"yui-cal-nav",NAV_VISIBLE:"yui-cal-nav-visible",MASK:"yui-cal-nav-mask",YEAR:"yui-cal-nav-y",MONTH:"yui-cal-nav-m",BUTTONS:"yui-cal-nav-b",BUTTON:"yui-cal-nav-btn",ERROR:"yui-cal-nav-e",YEAR_CTRL:"yui-cal-nav-yc",MONTH_CTRL:"yui-cal-nav-mc",INVALID:"yui-invalid",DEFAULT:"yui-default"};A._DEFAULT_CFG={strings:{month:"Month",year:"Year",submit:"Okay",cancel:"Cancel",invalidYear:"Year needs to be a number"},monthFormat:YAHOO.widget.Calendar.LONG,initialFocus:"year"};A.ID_SUFFIX="_nav";A.MONTH_SUFFIX="_month";A.YEAR_SUFFIX="_year";A.ERROR_SUFFIX="_error";A.CANCEL_SUFFIX="_cancel";A.SUBMIT_SUFFIX="_submit";A.YR_MAX_DIGITS=4;A.YR_MINOR_INC=1;A.YR_MAJOR_INC=10;A.UPDATE_DELAY=50;A.YR_PATTERN=/^\d+$/;A.TRIM=/^\s*(.*?)\s*$/;})();YAHOO.widget.CalendarNavigator.prototype={id:null,cal:null,navEl:null,maskEl:null,yearEl:null,monthEl:null,errorEl:null,submitEl:null,cancelEl:null,firstCtrl:null,lastCtrl:null,_doc:null,_year:null,_month:0,__rendered:false,init:function(A){var C=A.oDomContainer;
this.cal=A;this.id=C.id+YAHOO.widget.CalendarNavigator.ID_SUFFIX;this._doc=C.ownerDocument;var B=YAHOO.env.ua.ie;this.__isIEQuirks=(B&&((B<=6)||(B===7&&this._doc.compatMode=="BackCompat")));},show:function(){var A=YAHOO.widget.CalendarNavigator.CLASSES;if(this.cal.beforeShowNavEvent.fire()){if(!this.__rendered){this.render();}this.clearErrors();this._updateMonthUI();this._updateYearUI();this._show(this.navEl,true);this.setInitialFocus();this.showMask();YAHOO.util.Dom.addClass(this.cal.oDomContainer,A.NAV_VISIBLE);this.cal.showNavEvent.fire();}},hide:function(){var A=YAHOO.widget.CalendarNavigator.CLASSES;if(this.cal.beforeHideNavEvent.fire()){this._show(this.navEl,false);this.hideMask();YAHOO.util.Dom.removeClass(this.cal.oDomContainer,A.NAV_VISIBLE);this.cal.hideNavEvent.fire();}},showMask:function(){this._show(this.maskEl,true);if(this.__isIEQuirks){this._syncMask();}},hideMask:function(){this._show(this.maskEl,false);},getMonth:function(){return this._month;},getYear:function(){return this._year;},setMonth:function(A){if(A>=0&&A<12){this._month=A;}this._updateMonthUI();},setYear:function(B){var A=YAHOO.widget.CalendarNavigator.YR_PATTERN;if(YAHOO.lang.isNumber(B)&&A.test(B+"")){this._year=B;}this._updateYearUI();},render:function(){this.cal.beforeRenderNavEvent.fire();if(!this.__rendered){this.createNav();this.createMask();this.applyListeners();this.__rendered=true;}this.cal.renderNavEvent.fire();},createNav:function(){var B=YAHOO.widget.CalendarNavigator;var C=this._doc;var D=C.createElement("div");D.className=B.CLASSES.NAV;var A=this.renderNavContents([]);D.innerHTML=A.join("");this.cal.oDomContainer.appendChild(D);this.navEl=D;this.yearEl=C.getElementById(this.id+B.YEAR_SUFFIX);this.monthEl=C.getElementById(this.id+B.MONTH_SUFFIX);this.errorEl=C.getElementById(this.id+B.ERROR_SUFFIX);this.submitEl=C.getElementById(this.id+B.SUBMIT_SUFFIX);this.cancelEl=C.getElementById(this.id+B.CANCEL_SUFFIX);if(YAHOO.env.ua.gecko&&this.yearEl&&this.yearEl.type=="text"){this.yearEl.setAttribute("autocomplete","off");}this._setFirstLastElements();},createMask:function(){var B=YAHOO.widget.CalendarNavigator.CLASSES;var A=this._doc.createElement("div");A.className=B.MASK;this.cal.oDomContainer.appendChild(A);this.maskEl=A;},_syncMask:function(){var B=this.cal.oDomContainer;if(B&&this.maskEl){var A=YAHOO.util.Dom.getRegion(B);YAHOO.util.Dom.setStyle(this.maskEl,"width",A.right-A.left+"px");YAHOO.util.Dom.setStyle(this.maskEl,"height",A.bottom-A.top+"px");}},renderNavContents:function(A){var D=YAHOO.widget.CalendarNavigator,E=D.CLASSES,B=A;B[B.length]='<div class="'+E.MONTH+'">';this.renderMonth(B);B[B.length]="</div>";B[B.length]='<div class="'+E.YEAR+'">';this.renderYear(B);B[B.length]="</div>";B[B.length]='<div class="'+E.BUTTONS+'">';this.renderButtons(B);B[B.length]="</div>";B[B.length]='<div class="'+E.ERROR+'" id="'+this.id+D.ERROR_SUFFIX+'"></div>';return B;},renderMonth:function(D){var G=YAHOO.widget.CalendarNavigator,H=G.CLASSES;var I=this.id+G.MONTH_SUFFIX,F=this.__getCfg("monthFormat"),A=this.cal.cfg.getProperty((F==YAHOO.widget.Calendar.SHORT)?"MONTHS_SHORT":"MONTHS_LONG"),E=D;if(A&&A.length>0){E[E.length]='<label for="'+I+'">';E[E.length]=this.__getCfg("month",true);E[E.length]="</label>";E[E.length]='<select name="'+I+'" id="'+I+'" class="'+H.MONTH_CTRL+'">';for(var B=0;B<A.length;B++){E[E.length]='<option value="'+B+'">';E[E.length]=A[B];E[E.length]="</option>";}E[E.length]="</select>";}return E;},renderYear:function(B){var E=YAHOO.widget.CalendarNavigator,F=E.CLASSES;var G=this.id+E.YEAR_SUFFIX,A=E.YR_MAX_DIGITS,D=B;D[D.length]='<label for="'+G+'">';D[D.length]=this.__getCfg("year",true);D[D.length]="</label>";D[D.length]='<input type="text" name="'+G+'" id="'+G+'" class="'+F.YEAR_CTRL+'" maxlength="'+A+'"/>';return D;},renderButtons:function(A){var D=YAHOO.widget.CalendarNavigator.CLASSES;var B=A;B[B.length]='<span class="'+D.BUTTON+" "+D.DEFAULT+'">';B[B.length]='<button type="button" id="'+this.id+"_submit"+'">';B[B.length]=this.__getCfg("submit",true);B[B.length]="</button>";B[B.length]="</span>";B[B.length]='<span class="'+D.BUTTON+'">';B[B.length]='<button type="button" id="'+this.id+"_cancel"+'">';B[B.length]=this.__getCfg("cancel",true);B[B.length]="</button>";B[B.length]="</span>";return B;},applyListeners:function(){var B=YAHOO.util.Event;function A(){if(this.validate()){this.setYear(this._getYearFromUI());}}function C(){this.setMonth(this._getMonthFromUI());}B.on(this.submitEl,"click",this.submit,this,true);B.on(this.cancelEl,"click",this.cancel,this,true);B.on(this.yearEl,"blur",A,this,true);B.on(this.monthEl,"change",C,this,true);if(this.__isIEQuirks){YAHOO.util.Event.on(this.cal.oDomContainer,"resize",this._syncMask,this,true);}this.applyKeyListeners();},purgeListeners:function(){var A=YAHOO.util.Event;A.removeListener(this.submitEl,"click",this.submit);A.removeListener(this.cancelEl,"click",this.cancel);A.removeListener(this.yearEl,"blur");A.removeListener(this.monthEl,"change");if(this.__isIEQuirks){A.removeListener(this.cal.oDomContainer,"resize",this._syncMask);}this.purgeKeyListeners();},applyKeyListeners:function(){var D=YAHOO.util.Event,A=YAHOO.env.ua;var C=(A.ie||A.webkit)?"keydown":"keypress";var B=(A.ie||A.opera||A.webkit)?"keydown":"keypress";D.on(this.yearEl,"keypress",this._handleEnterKey,this,true);D.on(this.yearEl,C,this._handleDirectionKeys,this,true);D.on(this.lastCtrl,B,this._handleTabKey,this,true);D.on(this.firstCtrl,B,this._handleShiftTabKey,this,true);},purgeKeyListeners:function(){var D=YAHOO.util.Event,A=YAHOO.env.ua;var C=(A.ie||A.webkit)?"keydown":"keypress";var B=(A.ie||A.opera||A.webkit)?"keydown":"keypress";D.removeListener(this.yearEl,"keypress",this._handleEnterKey);D.removeListener(this.yearEl,C,this._handleDirectionKeys);D.removeListener(this.lastCtrl,B,this._handleTabKey);D.removeListener(this.firstCtrl,B,this._handleShiftTabKey);},submit:function(){if(this.validate()){this.hide();this.setMonth(this._getMonthFromUI());this.setYear(this._getYearFromUI());
var B=this.cal;var C=this;function D(){B.setYear(C.getYear());B.setMonth(C.getMonth());B.render();}var A=YAHOO.widget.CalendarNavigator.UPDATE_DELAY;if(A>0){window.setTimeout(D,A);}else{D();}}},cancel:function(){this.hide();},validate:function(){if(this._getYearFromUI()!==null){this.clearErrors();return true;}else{this.setYearError();this.setError(this.__getCfg("invalidYear",true));return false;}},setError:function(A){if(this.errorEl){this.errorEl.innerHTML=A;this._show(this.errorEl,true);}},clearError:function(){if(this.errorEl){this.errorEl.innerHTML="";this._show(this.errorEl,false);}},setYearError:function(){YAHOO.util.Dom.addClass(this.yearEl,YAHOO.widget.CalendarNavigator.CLASSES.INVALID);},clearYearError:function(){YAHOO.util.Dom.removeClass(this.yearEl,YAHOO.widget.CalendarNavigator.CLASSES.INVALID);},clearErrors:function(){this.clearError();this.clearYearError();},setInitialFocus:function(){var A=this.submitEl,C=this.__getCfg("initialFocus");if(C&&C.toLowerCase){C=C.toLowerCase();if(C=="year"){A=this.yearEl;try{this.yearEl.select();}catch(B){}}else{if(C=="month"){A=this.monthEl;}}}if(A&&YAHOO.lang.isFunction(A.focus)){try{A.focus();}catch(B){}}},erase:function(){if(this.__rendered){this.purgeListeners();this.yearEl=null;this.monthEl=null;this.errorEl=null;this.submitEl=null;this.cancelEl=null;this.firstCtrl=null;this.lastCtrl=null;if(this.navEl){this.navEl.innerHTML="";}var B=this.navEl.parentNode;if(B){B.removeChild(this.navEl);}this.navEl=null;var A=this.maskEl.parentNode;if(A){A.removeChild(this.maskEl);}this.maskEl=null;this.__rendered=false;}},destroy:function(){this.erase();this._doc=null;this.cal=null;this.id=null;},_show:function(B,A){if(B){YAHOO.util.Dom.setStyle(B,"display",(A)?"block":"none");}},_getMonthFromUI:function(){if(this.monthEl){return this.monthEl.selectedIndex;}else{return 0;}},_getYearFromUI:function(){var B=YAHOO.widget.CalendarNavigator;var A=null;if(this.yearEl){var C=this.yearEl.value;C=C.replace(B.TRIM,"$1");if(B.YR_PATTERN.test(C)){A=parseInt(C,10);}}return A;},_updateYearUI:function(){if(this.yearEl&&this._year!==null){this.yearEl.value=this._year;}},_updateMonthUI:function(){if(this.monthEl){this.monthEl.selectedIndex=this._month;}},_setFirstLastElements:function(){this.firstCtrl=this.monthEl;this.lastCtrl=this.cancelEl;if(this.__isMac){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420){this.firstCtrl=this.monthEl;this.lastCtrl=this.yearEl;}if(YAHOO.env.ua.gecko){this.firstCtrl=this.yearEl;this.lastCtrl=this.yearEl;}}},_handleEnterKey:function(B){var A=YAHOO.util.KeyListener.KEY;if(YAHOO.util.Event.getCharCode(B)==A.ENTER){YAHOO.util.Event.preventDefault(B);this.submit();}},_handleDirectionKeys:function(H){var G=YAHOO.util.Event,A=YAHOO.util.KeyListener.KEY,D=YAHOO.widget.CalendarNavigator;var F=(this.yearEl.value)?parseInt(this.yearEl.value,10):null;if(isFinite(F)){var B=false;switch(G.getCharCode(H)){case A.UP:this.yearEl.value=F+D.YR_MINOR_INC;B=true;break;case A.DOWN:this.yearEl.value=Math.max(F-D.YR_MINOR_INC,0);B=true;break;case A.PAGE_UP:this.yearEl.value=F+D.YR_MAJOR_INC;B=true;break;case A.PAGE_DOWN:this.yearEl.value=Math.max(F-D.YR_MAJOR_INC,0);B=true;break;default:break;}if(B){G.preventDefault(H);try{this.yearEl.select();}catch(C){}}}},_handleTabKey:function(D){var C=YAHOO.util.Event,A=YAHOO.util.KeyListener.KEY;if(C.getCharCode(D)==A.TAB&&!D.shiftKey){try{C.preventDefault(D);this.firstCtrl.focus();}catch(B){}}},_handleShiftTabKey:function(D){var C=YAHOO.util.Event,A=YAHOO.util.KeyListener.KEY;if(D.shiftKey&&C.getCharCode(D)==A.TAB){try{C.preventDefault(D);this.lastCtrl.focus();}catch(B){}}},__getCfg:function(D,B){var C=YAHOO.widget.CalendarNavigator._DEFAULT_CFG;var A=this.cal.cfg.getProperty("navigator");if(B){return(A!==true&&A.strings&&A.strings[D])?A.strings[D]:C.strings[D];}else{return(A!==true&&A[D])?A[D]:C[D];}},__isMac:(navigator.userAgent.toLowerCase().indexOf("macintosh")!=-1)};YAHOO.register("calendar",YAHOO.widget.Calendar,{version:"2.5.2",build:"1076"});
function addEvent(C,B,A){if(C.attachEvent){C.attachEvent("on"+B,A)}else{if(C.addEventListener){C.addEventListener(B,A,true)}else{C["on"+B]=A}}}function removeEvent(C,B,A){if(C.detachEvent){C.detachEvent("on"+B,A)}else{if(C.removeEventListener){C.removeEventListener(B,A,true)}else{C["on"+B]=null}}}function stopEvent(A){A||window.event;if(A.stopPropagation){A.stopPropagation();A.preventDefault()}else{if(typeof A.cancelBubble!="undefined"){A.cancelBubble=true;A.returnValue=false}}return false}function getElement(A){if(window.event){return window.event.srcElement}else{return A.currentTarget}}function getTargetElement(A){if(window.event){return window.event.srcElement}else{return A.target}}function stopSelect(A){if(typeof A.onselectstart!="undefined"){addEvent(A,"selectstart",function(){return false})}}function getCaretEnd(D){if(typeof D.selectionEnd!="undefined"){return D.selectionEnd}else{if(document.selection&&document.selection.createRange){var E=document.selection.createRange();try{var A=E.duplicate();A.moveToElementText(D)}catch(C){var A=D.createTextRange()}A.setEndPoint("EndToEnd",E);var B=A.text.length;if(B>D.value.length){return -1}return B}}}function getCaretStart(D){if(typeof D.selectionStart!="undefined"){return D.selectionStart}else{if(document.selection&&document.selection.createRange){var E=document.selection.createRange();try{var A=E.duplicate();A.moveToElementText(D)}catch(C){var A=D.createTextRange()}A.setEndPoint("EndToStart",E);var B=A.text.length;if(B>D.value.length){return -1}return B}}}function setCaret(B,A){B.focus();if(B.setSelectionRange){B.setSelectionRange(A,A)}else{if(B.createTextRange){m=B.createTextRange();m.moveStart("character",A);m.collapse();m.select()}}}function setSelection(C,A,B){C.focus();if(C.setSelectionRange){C.setSelectionRange(A,B)}else{if(C.createTextRange){m=C.createTextRange();m.moveStart("character",A);m.moveEnd("character",B);m.select()}}}String.prototype.addslashes=function(){return this.replace(/(["\\\.\|\[\]\^\*\+\?\$\(\)])/g,"\\$1")};String.prototype.trim=function(){return this.replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1")};function curTop(A){toreturn=0;while(A){toreturn+=A.offsetTop;A=A.offsetParent}return toreturn}function curLeft(A){toreturn=0;while(A){toreturn+=A.offsetLeft;A=A.offsetParent}return toreturn}function isNumber(A){return typeof A=="number"&&isFinite(A)}function replaceHTML(A,B){while(el=A.childNodes[0]){A.removeChild(el)}A.appendChild(document.createTextNode(B))};
function actb(obj,ca,no_filter){var actb_self=obj;actb_self.actb_keywords=ca;actb_self.actb_no_filter=no_filter;actb_self.actb_timeOut=-1;actb_self.actb_lim=-1;actb_self.actb_firstText=true;actb_self.actb_mouse=true;actb_self.actb_delimiter=new Array();actb_self.actb_startcheck=0;actb_self.actb_bgColor="#fff";actb_self.actb_hColor="#36c";actb_self.actb_textColor="#000";actb_self.actb_hTextColor="#fff";actb_self.actb_fFamily="Arial,Helvetica,Geneva,sans-serif";actb_self.actb_fSize="9pt";actb_self.actb_hStyle="";var actb_table_id=obj.parentNode.id+"-tat_table";var actb_tr_id=obj.parentNode.id+"-tat_tr";var actb_td_id=obj.parentNode.id+"-tat_td";var actb_delimwords=new Array();var actb_cdelimword=0;var actb_delimchar=new Array();var actb_display=false;var actb_pos=0;var actb_total=0;var actb_curr=obj;var actb_rangeu=0;var actb_ranged=0;var actb_bool=new Array();var actb_pre=0;var actb_toid;var actb_tomake=false;var actb_getpre="";var actb_mouse_on_list=1;var actb_kwcount=0;var actb_caretmove=false;addEvent(actb_curr,"focus",actb_setup);function actb_setup(){addEvent(document,"keydown",actb_checkkey);addEvent(actb_curr,"blur",actb_clear);addEvent(document,"keypress",actb_keypress)}function actb_clear(evt){if(!evt){evt=event}removeEvent(document,"keydown",actb_checkkey);removeEvent(actb_curr,"blur",actb_clear);removeEvent(document,"keypress",actb_keypress);setTimeout(actb_removedisp,100)}function actb_parse(n){if(actb_self.actb_delimiter.length>0){var t=actb_delimwords[actb_cdelimword].trim().addslashes();var plen=actb_delimwords[actb_cdelimword].trim().length}else{var t=actb_curr.value.addslashes();var plen=actb_curr.value.length}var tobuild="";var i;if(actb_self.actb_no_filter){var re=new RegExp("")}else{if(actb_self.actb_firstText){var re=new RegExp("^"+t,"i")}else{var re=new RegExp(t,"i")}}var p=n.search(re);for(i=0;i<p;i++){tobuild+=n.substr(i,1)}for(i=p;i<plen+p;i++){tobuild+=n.substr(i,1)}for(i=plen+p;i<n.length;i++){tobuild+=n.substr(i,1)}return tobuild}function actb_generate(){if(document.getElementById(actb_table_id)){actb_display=false;document.body.removeChild(document.getElementById(actb_table_id))}if(actb_kwcount==0){actb_display=false;return }a=document.createElement("table");a.cellSpacing="0px";a.cellPadding="0px";a.style.position="absolute";a.style.zIndex=999;a.style.backgroundColor=actb_self.actb_bgColor;a.style.color=actb_self.actb_textColor;a.style.border="1px solid black";a.id=actb_table_id;document.body.appendChild(a);var i;var first=true;var j=1;if(actb_self.actb_mouse){a.onmouseout=actb_table_unfocus;a.onmouseover=actb_table_focus}var counter=0;for(i=0;i<actb_self.actb_keywords.length;i++){if(actb_bool[i]){counter++;r=a.insertRow(-1);if(first&&!actb_tomake){r.style.backgroundColor=actb_self.actb_hColor;r.style.color=actb_self.actb_hTextColor;first=false;actb_pos=counter}else{if(actb_pre==i){r.style.backgroundColor=actb_self.actb_hColor;r.style.color=actb_self.actb_hTextColor;first=false;actb_pos=counter}else{r.style.backgroundColor=actb_self.actb_bgColor;r.style.color=actb_self.actb_textColor}}r.id=actb_tr_id+(j);c=r.insertCell(-1);c.style.fontFamily=actb_self.actb_fFamily;c.style.fontSize=actb_self.actb_fSize;c.style.padding="2px 2px 2px 2px";c.innerHTML=actb_parse(actb_self.actb_keywords[i]);c.id=actb_td_id+(j);c.setAttribute("pos",j);if(actb_self.actb_mouse){c.style.cursor="pointer";c.onclick=actb_mouseclick;c.onmouseover=actb_table_highlight}j++}if(j-1==actb_self.actb_lim&&j<actb_total){r=a.insertRow(-1);r.style.backgroundColor=actb_self.actb_bgColor;r.style.color=actb_self.actb_textColor;c=r.insertCell(-1);c.style.fontFamily="arial narrow";c.style.fontSize=actb_self.actb_fSize;c.align="center";replaceHTML(c,"\\/");if(actb_self.actb_mouse){c.style.cursor="pointer";c.onclick=actb_mouse_down}break}}if(a.offsetWidth<actb_self.offsetWidth){a.width=actb_self.offsetWidth}var listPosition=YAHOO.util.Dom.getXY(actb_curr);listPosition[1]+=actb_curr.offsetHeight;YAHOO.util.Dom.setXY(a,listPosition);actb_rangeu=1;actb_ranged=j-1;actb_display=true;if(actb_pos<=0){actb_pos=1}}function actb_remake(){document.body.removeChild(document.getElementById(actb_table_id));a=document.createElement("table");a.cellSpacing="1px";a.cellPadding="2px";a.style.position="absolute";a.style.top=eval(curTop(actb_curr)+actb_curr.offsetHeight)+"px";a.style.left=curLeft(actb_curr)+"px";a.style.backgroundColor=actb_self.actb_bgColor;a.style.color=actb_self.actb_textColor;a.id=actb_table_id;if(actb_self.actb_mouse){a.onmouseout=actb_table_unfocus;a.onmouseover=actb_table_focus}document.body.appendChild(a);var i;var first=true;var j=1;if(actb_rangeu>1){r=a.insertRow(-1);r.style.backgroundColor=actb_self.actb_bgColor;r.style.color=actb_self.actb_textColor;c=r.insertCell(-1);c.style.fontFamily="arial narrow";c.style.fontSize=actb_self.actb_fSize;c.align="center";replaceHTML(c,"/\\");if(actb_self.actb_mouse){c.style.cursor="pointer";c.onclick=actb_mouse_up}}for(i=0;i<actb_self.actb_keywords.length;i++){if(actb_bool[i]){if(j>=actb_rangeu&&j<=actb_ranged){r=a.insertRow(-1);r.style.backgroundColor=actb_self.actb_bgColor;r.style.color=actb_self.actb_textColor;r.id=actb_tr_id+(j);c=r.insertCell(-1);c.style.fontFamily=actb_self.actb_fFamily;c.style.fontSize=actb_self.actb_fSize;c.innerHTML=actb_parse(actb_self.actb_keywords[i]);c.id=actb_td_id+(j);c.setAttribute("pos",j);if(actb_self.actb_mouse){c.style.cursor="pointer";c.onclick=actb_mouseclick;c.onmouseover=actb_table_highlight}j++}else{j++}}if(j>actb_ranged){break}}if(j-1<actb_total){r=a.insertRow(-1);r.style.backgroundColor=actb_self.actb_bgColor;r.style.color=actb_self.actb_textColor;c=r.insertCell(-1);c.style.fontFamily="arial narrow";c.style.fontSize=actb_self.actb_fSize;c.align="center";replaceHTML(c,"\\/");if(actb_self.actb_mouse){c.style.cursor="pointer";c.onclick=actb_mouse_down}}}function actb_goup(){if(!actb_display){return }if(actb_pos==1){return }document.getElementById(actb_tr_id+actb_pos).style.backgroundColor=actb_self.actb_bgColor;document.getElementById(actb_tr_id+actb_pos).style.color=actb_self.actb_textColor;actb_pos--;if(actb_pos<actb_rangeu){actb_moveup()}document.getElementById(actb_tr_id+actb_pos).style.backgroundColor=actb_self.actb_hColor;document.getElementById(actb_tr_id+actb_pos).style.color=actb_self.actb_hTextColor;if(actb_toid){clearTimeout(actb_toid)}if(actb_self.actb_timeOut>0){actb_toid=setTimeout(function(){actb_mouse_on_list=0;actb_removedisp()},actb_self.actb_timeOut)}}function actb_godown(){if(!actb_display){actb_tocomplete(40);return }if(actb_pos==actb_total){return }document.getElementById(actb_tr_id+actb_pos).style.backgroundColor=actb_self.actb_bgColor;document.getElementById(actb_tr_id+actb_pos).style.color=actb_self.actb_textColor;actb_pos++;if(actb_pos>actb_ranged){actb_movedown()}document.getElementById(actb_tr_id+actb_pos).style.backgroundColor=actb_self.actb_hColor;document.getElementById(actb_tr_id+actb_pos).style.color=actb_self.actb_hTextColor;if(actb_toid){clearTimeout(actb_toid)}if(actb_self.actb_timeOut>0){actb_toid=setTimeout(function(){actb_mouse_on_list=0;actb_removedisp()},actb_self.actb_timeOut)}}function actb_movedown(){actb_rangeu++;actb_ranged++;actb_remake()}function actb_moveup(){actb_rangeu--;actb_ranged--;actb_remake()}function actb_mouse_down(){document.getElementById(actb_tr_id+actb_pos).style.backgroundColor=actb_self.actb_bgColor;document.getElementById(actb_tr_id+actb_pos).style.color=actb_self.actb_textColor;actb_pos++;actb_movedown();document.getElementById(actb_tr_id+actb_pos).style.backgroundColor=actb_self.actb_hColor;document.getElementById(actb_tr_id+actb_pos).style.color=actb_self.actb_hTextColor;actb_curr.focus();actb_mouse_on_list=0;if(actb_toid){clearTimeout(actb_toid)}if(actb_self.actb_timeOut>0){actb_toid=setTimeout(function(){actb_mouse_on_list=0;actb_removedisp()},actb_self.actb_timeOut)}}function actb_mouse_up(evt){if(!evt){evt=event}if(evt.stopPropagation){evt.stopPropagation()}else{evt.cancelBubble=true}document.getElementById(actb_tr_id+actb_pos).style.backgroundColor=actb_self.actb_bgColor;document.getElementById(actb_tr_id+actb_pos).style.color=actb_self.actb_textColor;actb_pos--;actb_moveup();document.getElementById(actb_tr_id+actb_pos).style.backgroundColor=actb_self.actb_hColor;document.getElementById(actb_tr_id+actb_pos).style.color=actb_self.actb_hTextColor;actb_curr.focus();actb_mouse_on_list=0;if(actb_toid){clearTimeout(actb_toid)}if(actb_self.actb_timeOut>0){actb_toid=setTimeout(function(){actb_mouse_on_list=0;actb_removedisp()},actb_self.actb_timeOut)}}function actb_mouseclick(evt){if(!evt){evt=event}if(!actb_display){return }actb_mouse_on_list=0;actb_pos=this.getAttribute("pos");actb_penter();xformsHandleAutoCompleteMouseChange(actb_self)}function actb_table_focus(){actb_mouse_on_list=1}function actb_table_unfocus(){actb_mouse_on_list=0;if(actb_toid){clearTimeout(actb_toid)}if(actb_self.actb_timeOut>0){actb_toid=setTimeout(function(){actb_mouse_on_list=0;actb_removedisp()},actb_self.actb_timeOut)}}function actb_table_highlight(){actb_mouse_on_list=1;document.getElementById(actb_tr_id+actb_pos).style.backgroundColor=actb_self.actb_bgColor;document.getElementById(actb_tr_id+actb_pos).style.color=actb_self.actb_textColor;actb_pos=this.getAttribute("pos");while(actb_pos<actb_rangeu){actb_moveup()}while(actb_pos>actb_ranged){actb_movedown()}document.getElementById(actb_tr_id+actb_pos).style.backgroundColor=actb_self.actb_hColor;document.getElementById(actb_tr_id+actb_pos).style.color=actb_self.actb_hTextColor;if(actb_toid){clearTimeout(actb_toid)}if(actb_self.actb_timeOut>0){actb_toid=setTimeout(function(){actb_mouse_on_list=0;actb_removedisp()},actb_self.actb_timeOut)}}function actb_insertword(a){if(actb_self.actb_delimiter.length>0){str="";l=0;for(i=0;i<actb_delimwords.length;i++){if(actb_cdelimword==i){prespace=postspace="";gotbreak=false;for(j=0;j<actb_delimwords[i].length;++j){if(actb_delimwords[i].charAt(j)!=" "){gotbreak=true;break}prespace+=" "}for(j=actb_delimwords[i].length-1;j>=0;--j){if(actb_delimwords[i].charAt(j)!=" "){break}postspace+=" "}str+=prespace;str+=a;l=str.length;if(gotbreak){str+=postspace}}else{str+=actb_delimwords[i]}if(i!=actb_delimwords.length-1){str+=actb_delimchar[i]}}actb_curr.value=str;setCaret(actb_curr,l)}else{actb_curr.value=a}actb_mouse_on_list=0;actb_removedisp()}function actb_penter(){if(!actb_display){return }actb_display=false;var word="";var c=0;for(var i=0;i<=actb_self.actb_keywords.length;i++){if(actb_bool[i]){c++}if(c==actb_pos){word=actb_self.actb_keywords[i];break}}actb_insertword(word);l=getCaretStart(actb_curr)}function actb_removedisp(){if(true||actb_mouse_on_list==0){actb_display=0;if(document.getElementById(actb_table_id)){document.body.removeChild(document.getElementById(actb_table_id))}if(actb_toid){clearTimeout(actb_toid)}}}function actb_keypress(e){if(actb_caretmove){stopEvent(e)}return !actb_caretmove}function actb_checkkey(evt){if(!evt){evt=event}a=evt.keyCode;caret_pos_start=getCaretStart(actb_curr);actb_caretmove=0;switch(a){case 38:actb_goup();actb_caretmove=1;return false;break;case 40:actb_godown();actb_caretmove=1;return false;break;case 13:case 9:if(actb_display){actb_caretmove=1;actb_penter();return false}else{return true}break;default:setTimeout(function(){actb_tocomplete(a)},50);break}}function actb_tocomplete(kc){if(kc==27||kc==37||kc==39||kc==9){actb_removedisp();return }if(kc==38||kc==13||kc==18||kc==16||kc==17||kc==20){return }var i;if(actb_display){var word=0;var c=0;for(var i=0;i<=actb_self.actb_keywords.length;i++){if(actb_bool[i]){c++}if(c==actb_pos){word=i;break}}actb_pre=word}else{actb_pre=-1}if(actb_curr.value==""&&kc!=40){actb_mouse_on_list=0;actb_removedisp();return }if(actb_self.actb_delimiter.length>0){caret_pos_start=getCaretStart(actb_curr);caret_pos_end=getCaretEnd(actb_curr);delim_split="";for(i=0;i<actb_self.actb_delimiter.length;i++){delim_split+=actb_self.actb_delimiter[i]}delim_split=delim_split.addslashes();delim_split_rx=new RegExp("(["+delim_split+"])");c=0;actb_delimwords=new Array();actb_delimwords[0]="";for(i=0,j=actb_curr.value.length;i<actb_curr.value.length;i++,j--){if(actb_curr.value.substr(i,j).search(delim_split_rx)==0){ma=actb_curr.value.substr(i,j).match(delim_split_rx);actb_delimchar[c]=ma[1];c++;actb_delimwords[c]=""}else{actb_delimwords[c]+=actb_curr.value.charAt(i)}}var l=0;actb_cdelimword=-1;for(i=0;i<actb_delimwords.length;i++){if(caret_pos_end>=l&&caret_pos_end<=l+actb_delimwords[i].length){actb_cdelimword=i}l+=actb_delimwords[i].length+1}var ot=actb_delimwords[actb_cdelimword].trim();var t=actb_delimwords[actb_cdelimword].addslashes().trim()}else{var ot=actb_curr.value;var t=actb_curr.value.addslashes()}if(ot.length==0&&kc!=40){actb_mouse_on_list=0;actb_removedisp()}if(ot.length<actb_self.actb_startcheck){return this}if(actb_self.actb_no_filter){var re=new RegExp("")}else{if(actb_self.actb_firstText){var re=new RegExp("^"+t,"i")}else{var re=new RegExp(t,"i")}}actb_total=0;actb_tomake=false;actb_kwcount=0;for(i=0;i<actb_self.actb_keywords.length;i++){actb_bool[i]=false;if(re.test(actb_self.actb_keywords[i])){actb_total++;actb_bool[i]=true;actb_kwcount++;if(actb_pre==i){actb_tomake=true}}}if(actb_toid){clearTimeout(actb_toid)}if(actb_self.actb_timeOut>0){actb_toid=setTimeout(function(){actb_mouse_on_list=0;actb_removedisp()},actb_self.actb_timeOut)}actb_generate()}return actb_tocomplete};
var SESSION_HEARTBEAT_PROPERTY="session-heartbeat";var SESSION_HEARTBEAT_DELAY_PROPERTY="session-heartbeat-delay";var FCK_EDITOR_BASE_PATH_PROPERTY="fck-editor-base-path";var DELAY_BEFORE_INCREMENTAL_REQUEST_PROPERTY="delay-before-incremental-request";var DELAY_BEFORE_FORCE_INCREMENTAL_REQUEST_PROPERTY="delay-before-force-incremental-request";var DELAY_BEFORE_GECKO_COMMUNICATION_ERROR_PROPERTY="delay-before-gecko-communication-error";var DELAY_BEFORE_CLOSE_MINIMAL_DIALOG_PROPERTY="delay-before-close-minimal-dialog";var DELAY_BEFORE_AJAX_TIMEOUT_PROPERTY="delay-before-ajax-timeout";var INTERNAL_SHORT_DELAY_PROPERTY="internal-short-delay";var DELAY_BEFORE_DISPLAY_LOADING_PROPERTY="delay-before-display-loading";var REQUEST_RETRIES_PROPERTY="request-retries";var DEBUG_WINDOW_HEIGHT_PROPERTY="debug-window-height";var DEBUG_WINDOW_WIDTH_PROPERTY="debug-window-width";var LOADING_MIN_TOP_PADDING_PROPERTY="loading-min-top-padding";var REVISIT_HANDLING_PROPERTY="revisit-handling";var HELP_HANDLER_PROPERTY="help-handler";var HELP_TOOLTIP_PROPERTY="help-tooltip";var OFFLINE_SUPPORT_PROPERTY="offline";var FORMAT_INPUT_TIME_PROPERTY="format.input.time";var FORMAT_INPUT_DATE_PROPERTY="format.input.date";var DATE_PICKER_PROPERTY="datepicker";var APPLICATION_RESOURCES_VERSION_PROPERTY="oxf.resources.version-number";var XFORMS_SESSION_HEARTBEAT=true;var XFORMS_SESSION_HEARTBEAT_DELAY=12*60*60*800;var FCK_EDITOR_BASE_PATH="/ops/fckeditor/";var XFORMS_DELAY_BEFORE_INCREMENTAL_REQUEST_IN_MS=500;var XFORMS_DELAY_BEFORE_FORCE_INCREMENTAL_REQUEST_IN_MS=2000;var XFORMS_DELAY_BEFORE_GECKO_COMMUNICATION_ERROR_IN_MS=5000;var XFORMS_DELAY_BEFORE_CLOSE_MINIMAL_DIALOG_IN_MS=5000;var XFORMS_DELAY_BEFORE_AJAX_TIMEOUT_IN_MS=-1;var XFORMS_INTERNAL_SHORT_DELAY_IN_MS=10;var XFORMS_DELAY_BEFORE_DISPLAY_LOADING_IN_MS=500;var XFORMS_REQUEST_RETRIES=1;var XFORMS_DEBUG_WINDOW_HEIGHT=600;var XFORMS_DEBUG_WINDOW_WIDTH=300;var XFORMS_LOADING_MIN_TOP_PADDING=10;var XFORMS_REVISIT_HANDLING="restore";var XFORMS_HELP_HANDLER=false;var XFORMS_HELP_TOOLTIP=false;var XFORMS_OFFLINE_SUPPORT=false;var XFORMS_FORMAT_INPUT_TIME="[h]:[m]:[s] [P]";var XFORMS_FORMAT_INPUT_DATE="[M]/[D]/[Y]";var XFORMS_DATEPICKER="yui";var APPLICATION_RESOURCES_VERSION="1.0";var XFORMS_SEPARATOR_1="\xB7";var XFORMS_SEPARATOR_2="-";var XXFORMS_NAMESPACE_URI="http://orbeon.org/oxf/xml/xforms";var BASE_URL=null;var XFORMS_SERVER_URL=null;var PATH_TO_JAVASCRIPT_1="/ops/javascript/xforms";var PATH_TO_JAVASCRIPT_2="/xforms-server/";var ELEMENT_TYPE=document.createElement("dummy").nodeType;var ATTRIBUTE_TYPE=document.createAttribute("dummy").nodeType;var TEXT_TYPE=document.createTextNode("").nodeType;var XFORMS_REGEXP_CR=new RegExp("\\r","g");var XFORMS_REGEXP_SINGLE_QUOTE=new RegExp("'","g");var XFORMS_REGEXP_OPEN_ANGLE=new RegExp("<","g");var XFORMS_REGEXP_AMPERSAND=new RegExp("&","g");var XFORMS_WIDE_TEXTAREA_MIN_ROWS=5;var ORBEON=ORBEON||{};ORBEON.util=ORBEON.util||{};ORBEON.xforms=ORBEON.xforms||{};ORBEON.widgets=ORBEON.widgets||{};ORBEON.xforms.Globals=ORBEON.xforms.Globals||{isMac:navigator.userAgent.toLowerCase().indexOf("macintosh")!=-1,isRenderingEngineGecko:navigator.userAgent.toLowerCase().indexOf("gecko")!=-1,isFF3:navigator.userAgent.toLowerCase().indexOf("firefox/3")!=-1,isRenderingEnginePresto:navigator.userAgent.toLowerCase().indexOf("opera")!=-1,isRenderingEngineWebCore:navigator.userAgent.toLowerCase().indexOf("safari")!=-1,isRenderingEngineWebCore13:navigator.userAgent.indexOf("AppleWebKit/312")!=-1,isRenderingEngineTrident:navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1,eventQueue:[],eventsFirstEventTime:0,requestForm:null,requestIgnoreErrors:false,requestInProgress:false,requestDocument:"",requestRetries:3,executeEventFunctionQueued:0,maskFocusEvents:false,currentFocusControlId:null,htmlAreaNames:[],repeatTreeChildToParent:{},repeatIndexes:{},repeatTreeParentToAllChildren:{},inputCalendarCommitedValue:{},yuiCalendar:null,tooltipLibraryInitialized:false,changedIdsRequest:{},serverValue:{},autoCompleteLastKeyCode:{},autoCompleteOpen:{},loadingOtherPage:false,activeControl:null,autosizeTextareas:[],fckEditorLoading:false,fckEditorsToLoad:[],dialogs:{},dialogMinimalVisible:{},dialogMinimalLastMouseOut:{},hintTooltipForControl:{},alertTooltipForControl:{},helpTooltipForControl:{},debugDiv:null,debugLastTime:new Date().getTime(),lastEventSentTime:new Date().getTime(),pageLoadedRegistered:false,menuItemsets:{},menuYui:{},treeYui:{},idToElement:{},isReloading:false,lastDialogZIndex:5,formLoadingLoadingOverlay:{},formLoadingLoadingInitialRightTop:{},formErrorPanel:{},formHelpPanel:{},formHelpPanelMessageDiv:{},formHelpPanelCloseButton:{},formLoadingNone:{},formStaticState:{},formDynamicState:{},formServerEvents:{},formClientState:{},modalProgressPanel:null};ORBEON.util.IEDom={hasClass:function(B,C){if(B.className==C){return true}else{var A=B.className+XFORMS_SEPARATOR_1;if(A.indexOf(C+" ")==0){return true}if(A.indexOf(" "+C+" ")!=-1){return true}if(A.indexOf(" "+C+XFORMS_SEPARATOR_1)!=-1){return true}return false}},addClass:function(A,B){if(!this.hasClass(A,B)){A.className=A.className.length==0?B:(A.className+" "+B)}},removeClass:function(D,E){if(this.hasClass(D,E)){var C=D.className.split(" ");var A="";for(var B=0;B<C.length;B++){if(C[B]!=E){if(A.length>0){A+=" "}A+=C[B]}}D.className=A}},getElementsByName:function(B,A,C){return B.getElementsByTagName(C==null?A:C+":"+A)}};ORBEON.util.MozDom={_regenerateClassName:function(C){var A="";for(var B in C.orbeonClasses){if(C.orbeonClasses[B]){if(A.length>0){A+=" "}A+=B}}C.className=A},hasClass:function(C,D){if(!C.orbeonClasses){C.orbeonClasses={};var B=C.className.split(" ");for(var A=0;A<B.length;A++){C.orbeonClasses[B[A]]=true}}return C.orbeonClasses[D]==true},addClass:function(A,B){if(!this.hasClass(A,B)){A.orbeonClasses[B]=true;this._regenerateClassName(A)}},removeClass:function(A,B){if(this.hasClass(A,B)){A.orbeonClasses[B]=false;this._regenerateClassName(A)}},getElementsByName:function(B,A,C){return B.getElementsByTagName((ORBEON.xforms.Globals.isFF3&&C!=null?C+":":"")+A)}};ORBEON.util.Dom={ELEMENT_TYPE:1,isElement:function(A){return A.nodeType==this.ELEMENT_TYPE},getElementById:function(B){var A=ORBEON.xforms.Globals.idToElement[B];if(A==null||A.id!=B){A=ORBEON.util.Dom.getElementByIdNoCache(B);if(A!=null){ORBEON.xforms.Globals.idToElement[B]=A}}return A},getElementByIdNoCache:function(C){var A=document.getElementById(C);if(A&&(A.id!=C)&&document.all){A=null;documentAll=document.all[C];if(documentAll){if(documentAll.length){for(var B=0;B<documentAll.length;B++){if(documentAll[B].id==C){A=documentAll[B];break}}}else{A=documentAll}}}return A},getAttribute:function(B,A){if(ORBEON.xforms.Globals.isRenderingEngineTrident){return B.getAttribute(A)}else{if(B.hasAttribute(A)){if(ORBEON.xforms.Globals.isRenderingEngineWebCore){return ORBEON.util.String.replace(B.getAttribute(A),"&#38;","&")}else{return B.getAttribute(A)}}else{return null}}},getChildElementByIndex:function(C,A){for(var B=0;B<C.childNodes.length;B++){var D=C.childNodes[B];if(ORBEON.util.Dom.isElement(D)){if(A==0){return D}A--}}return null},getChildElementByClass:function(C,A){for(var B=0;B<C.childNodes.length;B++){var D=C.childNodes[B];if(ORBEON.util.Dom.isElement(D)&&ORBEON.util.Dom.hasClass(D,A)){return D}}return null},getChildElementsByClass:function(D,B){var A=[];for(var C=0;C<D.childNodes.length;C++){var E=D.childNodes[C];if(ORBEON.util.Dom.isElement(E)&&ORBEON.util.Dom.hasClass(E,B)){A[A.length]=E}}return A.length==0?null:A},nextSiblingElement:function(A){while(true){var B=A.nextSibling;if(B==null){return null}if(ORBEON.util.Dom.isElement(B)){return B}}},stringToDom:function(A){if(document.implementation.createDocument){return(new DOMParser()).parseFromString(A,"application/xml")}else{if(window.ActiveXObject){var B=new ActiveXObject("Microsoft.XMLDOM");B.async="false";B.loadXML(A);return B}}return null},clearUploadControl:function(A){var D=ORBEON.util.Dom.getChildElementByClass(A,"xforms-upload-select");var B=D.parentNode;var C=document.createElement("input");ORBEON.util.Dom.addClass(C,D.className);C.setAttribute("type",D.type);C.setAttribute("name",D.name);C.setAttribute("size",D.size);B.replaceChild(C,D);if(ORBEON.xforms.Globals.isRenderingEngineTrident){ORBEON.xforms.Init.registerListenersOnFormElement(C)}return null},getStringValue:function(C){if(C.innerText==null){var A="";for(var B=0;B<C.childNodes.length;B++){var D=C.childNodes[B];if(D.nodeType==TEXT_TYPE){A+=D.nodeValue}}return A}else{return C.innerText}},setStringValue:function(A,C){if(A.innerText==null){while(A.childNodes.length>0){A.removeChild(A.firstChild)}var B=A.ownerDocument.createTextNode(C);A.appendChild(B)}else{A.innerText=C}}};(function(){var A=ORBEON.xforms.Globals.isRenderingEngineTrident?ORBEON.util.IEDom:ORBEON.util.MozDom;for(var B in A){ORBEON.util.Dom[B]=A[B]}}());ORBEON.util.String={replace:function(C,B,A){return C.indexOf(B)==-1?C:C.replace(new RegExp(B,"g"),A)},eval:function(javascriptString){javascriptString=ORBEON.util.String.replace(javascriptString,"\n"," ");javascriptString=ORBEON.util.String.replace(javascriptString,"\r"," ");return eval(javascriptString)},escapeAttribute:function(A){return ORBEON.util.String.replace(A,'"',"&quot;")},escapeHTMLMinimal:function(A){A=ORBEON.util.String.replace(A,"&","&amp;");return ORBEON.util.String.replace(A,"<","&lt;")}};ORBEON.util.DateTime={magicTimeToJSDate:function(A){return ORBEON.util.DateTime._magicToJSDate(A,ORBEON.util.DateTime._timeParsePatterns)},magicDateToJSDate:function(A){return ORBEON.util.DateTime._magicToJSDate(A,ORBEON.util.DateTime._dateParsePatterns)},_magicToJSDate:function(B,A){for(var C=0;C<A.length;C++){var E=A[C].re;var D=A[C].handler;var F=E.exec(B);if(F){return D(F)}}return null},jsDateToISOTime:function(A){return ORBEON.util.DateTime._padAZero(A.getHours())+":"+ORBEON.util.DateTime._padAZero(A.getMinutes())+":"+ORBEON.util.DateTime._padAZero(A.getSeconds())},jsDateToISODate:function(A){return A.getFullYear()+"-"+ORBEON.util.DateTime._padAZero(A.getMonth()+1)+"-"+ORBEON.util.DateTime._padAZero(A.getDate())},jsDateToISODateTime:function(A,B){return ORBEON.util.DateTime.jsDateToISODate(A)+"T"+ORBEON.util.DateTime.jsDateToISOTime(B)},jsDateToformatDisplayTime:function(A){if(ORBEON.util.Utils.getProperty(FORMAT_INPUT_TIME_PROPERTY)=="[h]:[m]:[s] [P]"){return A.getHours()%12+":"+ORBEON.util.DateTime._padAZero(A.getMinutes())+":"+ORBEON.util.DateTime._padAZero(A.getSeconds())+(A.getHours()<12?" a.m.":" p.m.")}else{return A.getHours()+":"+ORBEON.util.DateTime._padAZero(A.getMinutes())+":"+ORBEON.util.DateTime._padAZero(A.getSeconds())}},jsDateToformatDisplayDate:function(A){return(A.getMonth()+1)+"/"+A.getDate()+"/"+A.getFullYear()},_timeParsePatterns:[{re:/^now/i,handler:function(){return new Date()}},{re:/(\d{1,2}):(\d{1,2}):(\d{1,2})(?:p| p)/,handler:function(B){var C=new Date();var A=parseInt(B[1],10);if(A<12){A+=12}C.setHours(A);C.setMinutes(parseInt(B[2],10));C.setSeconds(parseInt(B[3],10));return C}},{re:/(\d{1,2}):(\d{1,2})(?:p| p)/,handler:function(B){var C=new Date();var A=parseInt(B[1],10);if(A<12){A+=12}C.setHours(A);C.setMinutes(parseInt(B[2],10));C.setSeconds(0);return C}},{re:/(\d{1,2})(?:p| p)/,handler:function(B){var C=new Date();var A=parseInt(B[1],10);if(A<12){A+=12}C.setHours(A);C.setMinutes(0);C.setSeconds(0);return C}},{re:/(\d{1,2}):(\d{1,2}):(\d{1,2})/,handler:function(A){var B=new Date();B.setHours(parseInt(A[1],10));B.setMinutes(parseInt(A[2],10));B.setSeconds(parseInt(A[3],10));return B}},{re:/(\d{1,2}):(\d{1,2})/,handler:function(A){var B=new Date();B.setHours(parseInt(A[1],10));B.setMinutes(parseInt(A[2],10));B.setSeconds(0);return B}},{re:/(\d{1,6})/,handler:function(D){var E=new Date();var C=D[1].substring(0,2);var A=parseInt(D[1].substring(2,4),10);var B=parseInt(D[1].substring(4,6),10);if(isNaN(A)){A=0}if(isNaN(B)){B=0}E.setHours(parseInt(C,10));E.setMinutes(parseInt(A,10));E.setSeconds(parseInt(B,10));return E}}],_dateParsePatterns:[{re:/^tod/i,handler:function(){return new Date()}},{re:/^tom/i,handler:function(){var A=new Date();A.setDate(A.getDate()+1);return A}},{re:/^yes/i,handler:function(){var A=new Date();A.setDate(A.getDate()-1);return A}},{re:/^(\d{1,2})(st|nd|rd|th)?$/i,handler:function(A){var B=new Date();B.setDate(parseInt(A[1],10));return B}},{re:/^(\d{1,2})(?:st|nd|rd|th)? (\w+)$/i,handler:function(A){var B=new Date();B.setDate(parseInt(A[1],10));B.setMonth(ORBEON.util.DateTime._parseMonth(A[2]));return B}},{re:/^(\d{1,2})(?:st|nd|rd|th)? (\w+),? (\d{2,4})$/i,handler:function(A){var B=new Date();B.setDate(parseInt(A[1],10));B.setMonth(ORBEON.util.DateTime._parseMonth(A[2]));B.setYear(A[3]);return B}},{re:/^(\w+) (\d{1,2})(?:st|nd|rd|th)?$/i,handler:function(A){var B=new Date();B.setDate(parseInt(A[2],10));B.setMonth(ORBEON.util.DateTime._parseMonth(A[1]));return B}},{re:/^(\w+) (\d{1,2})(?:st|nd|rd|th)?,? (\d{2,4})$/i,handler:function(A){var B=new Date();B.setDate(parseInt(A[2],10));B.setMonth(ORBEON.util.DateTime._parseMonth(A[1]));B.setYear(A[3]);return B}},{re:/^next (\w+)$/i,handler:function(D){var E=new Date();var B=E.getDay();var C=ORBEON.util.DateTime._parseWeekday(D[1]);var A=C-B;if(C<=B){A+=7}E.setDate(E.getDate()+A);return E}},{re:/^last (\w+)$/i,handler:function(A){throw new Error("Not yet implemented")}},{re:/^(\d{1,2})\/(\d{1,2})\/(\d{2,4})$/,handler:function(A){var B=new Date();B.setYear(A[3]);B.setDate(parseInt(A[2],10));B.setMonth(parseInt(A[1],10)-1);return B}},{re:/^(\d{1,2})\/(\d{1,2})$/,handler:function(A){var B=new Date();B.setDate(parseInt(A[2],10));B.setMonth(parseInt(A[1],10)-1);return B}},{re:/(\d{2,4})-(\d{1,2})-(\d{1,2})/,handler:function(A){var B=new Date();B.setYear(parseInt(A[1]));B.setDate(parseInt(A[3],10));B.setMonth(parseInt(A[2],10)-1);return B}}],_padAZero:function(A){A=A.toString();if(A.length==1){return"0"+A}else{return A}},_monthNames:"January February March April May June July August September October November December".split(" "),_weekdayNames:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),_parseMonth:function(B){var A=ORBEON.util.DateTime._monthNames.filter(function(C){return new RegExp("^"+B,"i").test(C)});if(A.length==0){throw new Error("Invalid month string")}if(A.length>1){throw new Error("Ambiguous month")}return ORBEON.util.DateTime._monthNames.indexOf(A[0])},_parseWeekday:function(B){var A=ORBEON.util.DateTime._weekdayNames.filter(function(C){return new RegExp("^"+B,"i").test(C)});if(A.length==0){throw new Error("Invalid day string")}if(A.length>1){throw new Error("Ambiguous weekday")}return ORBEON.util.DateTime._weekdayNames.indexOf(A[0])}};ORBEON.util.Utils={logMessage:function(A){if(typeof console!="undefined"){console.log(A)}},getProperty:function(A){if(typeof opsXFormsProperties!="undefined"&&typeof opsXFormsProperties[A]!="undefined"){return opsXFormsProperties[A]}switch(A){case SESSION_HEARTBEAT_PROPERTY:return XFORMS_SESSION_HEARTBEAT;case SESSION_HEARTBEAT_DELAY_PROPERTY:return XFORMS_SESSION_HEARTBEAT_DELAY;case REVISIT_HANDLING_PROPERTY:return XFORMS_REVISIT_HANDLING;case FCK_EDITOR_BASE_PATH_PROPERTY:return FCK_EDITOR_BASE_PATH;case DELAY_BEFORE_INCREMENTAL_REQUEST_PROPERTY:return XFORMS_DELAY_BEFORE_INCREMENTAL_REQUEST_IN_MS;case DELAY_BEFORE_FORCE_INCREMENTAL_REQUEST_PROPERTY:return XFORMS_DELAY_BEFORE_FORCE_INCREMENTAL_REQUEST_IN_MS;case DELAY_BEFORE_GECKO_COMMUNICATION_ERROR_PROPERTY:return XFORMS_DELAY_BEFORE_GECKO_COMMUNICATION_ERROR_IN_MS;case DELAY_BEFORE_CLOSE_MINIMAL_DIALOG_PROPERTY:return XFORMS_DELAY_BEFORE_CLOSE_MINIMAL_DIALOG_IN_MS;case DELAY_BEFORE_AJAX_TIMEOUT_PROPERTY:return XFORMS_DELAY_BEFORE_AJAX_TIMEOUT_IN_MS;case INTERNAL_SHORT_DELAY_PROPERTY:return XFORMS_INTERNAL_SHORT_DELAY_IN_MS;case DELAY_BEFORE_DISPLAY_LOADING_PROPERTY:return XFORMS_DELAY_BEFORE_DISPLAY_LOADING_IN_MS;case REQUEST_RETRIES_PROPERTY:return XFORMS_REQUEST_RETRIES;case DEBUG_WINDOW_HEIGHT_PROPERTY:return XFORMS_DEBUG_WINDOW_HEIGHT;case DEBUG_WINDOW_WIDTH_PROPERTY:return XFORMS_DEBUG_WINDOW_WIDTH;case LOADING_MIN_TOP_PADDING_PROPERTY:return XFORMS_LOADING_MIN_TOP_PADDING;case HELP_HANDLER_PROPERTY:return XFORMS_HELP_HANDLER;case HELP_TOOLTIP_PROPERTY:return XFORMS_HELP_TOOLTIP;case OFFLINE_SUPPORT_PROPERTY:return XFORMS_OFFLINE_SUPPORT;case FORMAT_INPUT_TIME_PROPERTY:return XFORMS_FORMAT_INPUT_TIME;case FORMAT_INPUT_DATE_PROPERTY:return XFORMS_FORMAT_INPUT_DATE;case DATE_PICKER_PROPERTY:return XFORMS_DATEPICKER}return null},hideModalProgressPanel:function(){if(ORBEON.xforms.Globals.modalProgressPanel){ORBEON.xforms.Globals.modalProgressPanel.hide()}},displayModalProgressPanel:function(){if(!ORBEON.xforms.Globals.modalProgressPanel){ORBEON.xforms.Globals.modalProgressPanel=new YAHOO.widget.Panel("wait",{width:"50px",fixedcenter:true,close:false,draggable:false,zindex:4,modal:true,visible:true});ORBEON.xforms.Globals.modalProgressPanel.setBody('<img src="'+BASE_URL+'/ops/images/xforms/processing.gif"/>');ORBEON.xforms.Globals.modalProgressPanel.render(document.body)}ORBEON.xforms.Globals.modalProgressPanel.show()},countOccurences:function(C,B){var A=0;var D=C.indexOf(B);while(D!=-1){A++;D=C.indexOf(B,D+1)}return A}};ORBEON.xforms.Document={dispatchEvent:function(J,G,B,F,C,H,E){if(B==null){for(var I=0;I<document.forms.length;I++){var D=document.forms[I];if(ORBEON.util.Dom.hasClass(D,"xforms-form")){B=D;break}}}var A=new ORBEON.xforms.Server.Event(B,J,null,null,G,F,C,E);ORBEON.xforms.Server.fireEvents([A],H==undefined?false:H)},getValue:function(A){var B=ORBEON.util.Dom.getElementById(A);return ORBEON.xforms.Controls.getCurrentValue(B)},setValue:function(A,C){var B=ORBEON.util.Dom.getElementById(A);if(B==null){throw"ORBEON.xforms.Document.setValue: can't find control id '"+A+"'"}if(!ORBEON.xforms.Offline.isOnline){ORBEON.xforms.Controls.setCurrentValue(B,C)}xformsFireEvents(new Array(xformsCreateEventArray(B,"xxforms-value-change-with-focus-change",String(C),null)),false)},isReloading:function(){return ORBEON.xforms.Globals.isReloading},getRepeatIndex:function(A){return ORBEON.xforms.Globals.repeatIndexes[A]},setOfflineEncryptionPassword:function(A){ORBEON.xforms.Offline.init();A=encode_utf8(A);if(A.length==1){A+=A}md5_init();for(var B=0;A<A.length;B+=2){md5_update(A.charCodeAt(B))}md5_finish();var D=byteArrayToHex(digestBits);md5_init();for(B=1;B<A.length;B+=2){md5_update(A.charCodeAt(B))}md5_finish();var E=byteArrayToHex(digestBits);A=D+E;A=A.substring(32);var C=ORBEON.xforms.Offline.gearsDatabase.execute("select * from Current_Password");if(C.isValidRow()){var F=C.fieldByName("encrypted_password");if(F!=A){throw"Invalid password"}}else{ORBEON.xforms.Offline.gearsDatabase.execute("insert into Current_Password (encrypted_password) values (?)",[A])}document.cookie="orbeon.forms.encryption.password="+A+"; path=/; secure";ORBEON.xforms.Offline.encryptionKey=null},changeOfflineEncryptionPassword:function(H,G){ORBEON.xforms.Offline.init();ORBEON.xforms.Document.setOfflineEncryptionPassword(H);var D=ORBEON.xforms.Offline.getEncryptionKey();ORBEON.xforms.Offline.gearsDatabase.execute("delete from Current_Password");ORBEON.xforms.Document.setOfflineEncryptionPassword(G);var F=ORBEON.xforms.Offline.getEncryptionKey();var B=ORBEON.xforms.Offline.gearsDatabase.execute("select url, event_response, offline_events from Offline_Forms");while(B.isValidRow()){var A=B.fieldByName("url");var C=B.fieldByName("event_response");var E=B.fieldByName("offline_events");C=ORBEON.xforms.Offline._decrypt(C,D);C=ORBEON.xforms.Offline._encrypt(C,F);E=ORBEON.xforms.Offline._decrypt(E,D);E=ORBEON.xforms.Offline._encrypt(E,F);ORBEON.xforms.Offline.gearsDatabase.execute("update Offline_Forms set event_response = ?, offline_events = ? where url= ?",[C,E,A]).close();B.next()}B.close()},isOfflineAvailable:function(){ORBEON.xforms.Offline.init();return ORBEON.xforms.Offline.hasGears},isFormOffline:function(B){ORBEON.xforms.Offline.init();var C=ORBEON.xforms.Offline.gearsDatabase.execute("select * from Offline_Forms where url = ?",[B]);var A=C.isValidRow();C.close();return A},getOfflineControlValues:function(A){var B=ORBEON.xforms.Offline.gearsDatabase.execute("select control_values from Offline_Forms where url = ?",[A]);if(!B.isValidRow()){return null}var C=B.fieldByName("control_values");C=ORBEON.xforms.Offline._deserializerControlValues(C);return C},takeOfflineFromSummary:function(D,C){ORBEON.xforms.Offline.init();var B=false;var A=window.setInterval(function(){if(B){window.clearInterval(A);ORBEON.xforms.Offline.loadFormInIframe(D,function(F){var E=window.setInterval(function(){if(!F.contentWindow.ORBEON.xforms.Offline.isOnline){window.clearInterval(E);if(C){C(F.contentWindow)}}},100);F.contentWindow.ORBEON.xforms.Document.dispatchEvent("$containing-document$","xxforms-offline")})}},100);ORBEON.xforms.Offline.formStore.capture(D,function(F,G,E){B=true})},takeOnlineFromSummary:function(B,A){ORBEON.xforms.Offline.init();ORBEON.xforms.Offline.loadFormInIframe(B,function(D){if(A){var C=window.setInterval(function(){if(!ORBEON.xforms.Document.isFormOffline(B)){window.clearInterval(C);A(D.contentWindow)}},100)}D.contentWindow.ORBEON.xforms.Offline.takeOnline()})}};ORBEON.xforms.Controls={isRelevant:function(A){return !ORBEON.util.Dom.hasClass(A,"xforms-disabled")},isReadonly:function(A){return ORBEON.util.Dom.hasClass(A,"xforms-readonly")},isRequired:function(A){return ORBEON.util.Dom.hasClass(A,"xforms-required")},isValid:function(A){return !ORBEON.util.Dom.hasClass(A,"xforms-invalid")},getForm:function(B){if(typeof B.form=="undefined"){var A=B;while(A.tagName.toLowerCase()!="form"){A=A.parentNode}return A}else{return B.form}},getCurrentValue:function(I){if(ORBEON.util.Dom.hasClass(I,"xforms-type-time")){var G=ORBEON.util.Dom.getChildElementByIndex(I,0).value;var B=ORBEON.util.DateTime.magicTimeToJSDate(G);return B==null?G:ORBEON.util.DateTime.jsDateToISOTime(B)}else{if(ORBEON.util.Dom.hasClass(I,"xforms-type-date")){var G=ORBEON.util.Dom.getChildElementByIndex(I,0).value;var B=ORBEON.util.DateTime.magicDateToJSDate(G);return B==null?G:ORBEON.util.DateTime.jsDateToISODate(B)}else{if(ORBEON.util.Dom.hasClass(I,"xforms-type-dateTime")){var F=ORBEON.util.Dom.getChildElementByIndex(I,0).value;var E=ORBEON.util.DateTime.magicDateToJSDate(F);var D=ORBEON.util.Dom.getChildElementByIndex(I,1).value;var C=ORBEON.util.DateTime.magicTimeToJSDate(D);if(E==null||C==null){return F==""&&D==""?"":F+"T"+D}else{return ORBEON.util.DateTime.jsDateToISODateTime(E,C)}}else{if(ORBEON.util.Dom.hasClass(I,"xforms-input")&&!ORBEON.util.Dom.hasClass(I,"xforms-type-boolean")&&!ORBEON.util.Dom.hasClass(I,"xforms-static")){return ORBEON.util.Dom.getChildElementByIndex(I,0).value}else{if(ORBEON.util.Dom.hasClass(I,"xforms-select1-open")){return ORBEON.util.Dom.getChildElementByIndex(I,0).value}else{if(ORBEON.util.Dom.hasClass(I,"xforms-select-appearance-full")||ORBEON.util.Dom.hasClass(I,"xforms-select1-appearance-full")||ORBEON.util.Dom.hasClass(I,"xforms-input-appearance-full")){var L=I.getElementsByTagName("input");var M="";for(var Q=0;Q<L.length;Q++){var N=L[Q];if(N.checked){if(M!=""){M+=" "}M+=N.value}}return M}else{if(ORBEON.util.Dom.hasClass(I,"xforms-select-appearance-compact")||ORBEON.util.Dom.hasClass(I,"xforms-select1-appearance-minimal")||ORBEON.util.Dom.hasClass(I,"xforms-select1-appearance-compact")||ORBEON.util.Dom.hasClass(I,"xforms-input-appearance-minimal")||ORBEON.util.Dom.hasClass(I,"xforms-input-appearance-compact")){var P=I.options;var O="";for(var K=0;K<P.length;K++){var J=P[K];if(J.selected){if(O!=""){O+=" "}O+=J.value}}return O}else{if(ORBEON.util.Dom.hasClass(I,"xforms-textarea")&&ORBEON.util.Dom.hasClass(I,"xforms-mediatype-text-html")){var A=FCKeditorAPI.GetInstance(I.name);return A.GetXHTML()}else{if(ORBEON.util.Dom.hasClass(I,"xforms-output")||(ORBEON.util.Dom.hasClass(I,"xforms-input")&&ORBEON.util.Dom.hasClass(I,"xforms-static"))){if(ORBEON.util.Dom.hasClass(I,"xforms-mediatype-image")){var H=ORBEON.util.Dom.getChildElementByIndex(I,0);return H.src}else{if(ORBEON.util.Dom.hasClass(I,"xforms-mediatype-text-html")){return I.innerHTML}else{return ORBEON.util.Dom.getStringValue(I)}}}else{return I.value}}}}}}}}}},setCurrentValue:function(R,d,p,I,b,K,S,O){var a=ORBEON.util.Dom.hasClass(R,"xforms-static");if(ORBEON.util.Dom.hasClass(R,"xforms-output")||a){var g=p!=null?p:d;if(ORBEON.util.Dom.hasClass(R,"xforms-mediatype-image")){var A=ORBEON.util.Dom.getChildElementByIndex(R,0);A.src=g}else{if(ORBEON.util.Dom.hasClass(R,"xforms-mediatype-text-html")){R.innerHTML=g}else{ORBEON.util.Dom.setStringValue(R,g)}}ORBEON.util.Dom.addClass(R,"xforms-visited");if(ORBEON.util.Dom.hasClass(R,"xforms-invalid")){ORBEON.util.Dom.addClass(R,"xforms-invalid-visited")}}else{if(ORBEON.xforms.Globals.changedIdsRequest[R.id]!=null){}else{if(ORBEON.util.Dom.hasClass(R,"xforms-trigger")||ORBEON.util.Dom.hasClass(R,"xforms-submit")){}else{if(ORBEON.util.Dom.hasClass(R,"xforms-select1-open")){if(R.value!=d){R.value=d;ORBEON.util.Dom.getChildElementByIndex(R,0).value=d;R.previousValue=d}}else{if(ORBEON.util.Dom.hasClass(R,"xforms-select-appearance-full")||ORBEON.util.Dom.hasClass(R,"xforms-select1-appearance-full")||ORBEON.util.Dom.hasClass(R,"xforms-input-appearance-full")){var V=ORBEON.util.Dom.hasClass(R,"xforms-select-appearance-full")?d.split(" "):new Array(d);var c=R.getElementsByTagName("input");for(var E=0;E<c.length;E++){var J=c[E];J.checked=xformsArrayContains(V,J.value)}}else{if(ORBEON.util.Dom.hasClass(R,"xforms-select-appearance-compact")||ORBEON.util.Dom.hasClass(R,"xforms-select1-appearance-compact")||ORBEON.util.Dom.hasClass(R,"xforms-select1-appearance-minimal")||ORBEON.util.Dom.hasClass(R,"xforms-input-appearance-compact")||ORBEON.util.Dom.hasClass(R,"xforms-input-appearance-minimal")){var V=ORBEON.util.Dom.hasClass(R,"xforms-select-appearance-compact")?d.split(" "):new Array(d);var Q=R.options;for(var h=0;h<Q.length;h++){var f=Q[h];try{f.selected=xformsArrayContains(V,f.value)}catch(k){}}}else{if(ORBEON.util.Dom.hasClass(R,"xforms-type-time")){var W=ORBEON.util.Dom.getChildElementByIndex(R,0);var q=ORBEON.util.DateTime.magicTimeToJSDate(d);W.value=q==null?d:ORBEON.util.DateTime.jsDateToformatDisplayTime(q)}else{if(ORBEON.util.Dom.hasClass(R,"xforms-type-date")){var W=ORBEON.util.Dom.getChildElementByIndex(R,0);var q=ORBEON.util.DateTime.magicDateToJSDate(d);W.value=q==null?d:ORBEON.util.DateTime.jsDateToformatDisplayDate(q)}else{if(ORBEON.util.Dom.hasClass(R,"xforms-type-dateTime")){if(ORBEON.xforms.Controls.getCurrentValue(R)!=d){var n=d.indexOf("T");var N=d.substring(0,n);var l=ORBEON.util.DateTime.magicDateToJSDate(N);var Z=ORBEON.util.Dom.getChildElementByIndex(R,0);Z.value=l==null?N:ORBEON.util.DateTime.jsDateToformatDisplayDate(l);var m=d.substring(n+1);var L=ORBEON.util.DateTime.magicTimeToJSDate(m);var X=ORBEON.util.Dom.getChildElementByIndex(R,1);X.value=L==null?m:ORBEON.util.DateTime.jsDateToformatDisplayTime(L)}}else{if(ORBEON.util.Dom.hasClass(R,"xforms-input")&&!ORBEON.util.Dom.hasClass(R,"xforms-type-boolean")){var W=ORBEON.util.Dom.getChildElementByIndex(R,0);if(R.value!=d){R.previousValue=d;R.valueSetByXForms++;R.value=d}if(W.value!=d){W.value=d}}else{if(ORBEON.util.Dom.hasClass(R,"xforms-textarea")&&ORBEON.util.Dom.hasClass(R,"xforms-mediatype-text-html")){var G=FCKeditorAPI.GetInstance(R.name);var D=xformsNormalizeEndlines(G.GetXHTML())!=xformsNormalizeEndlines(d)&&(I==null||G.GetXHTML()==I);if(D){G.EditorDocument.body.innerHTML=d;ORBEON.xforms.Globals.serverValue[R.id]=G.GetXHTML();R.value=d;R.previousValue=d}}else{if(ORBEON.util.Dom.hasClass(R,"xforms-select-appearance-xxforms-tree")){var o=d.split(" ");var C=ORBEON.xforms.Globals.treeYui[R.id];for(var H in C._nodes){var Y=C._nodes[H];if(Y.children.length==0){var U=xformsArrayContains(o,Y.data.value);if(U){Y.check()}else{Y.uncheck()}}}R.value=d;R.previousValue=d}else{if(ORBEON.util.Dom.hasClass(R,"xforms-select1-appearance-xxforms-tree")){var C=ORBEON.xforms.Globals.treeYui[R.id];ORBEON.xforms.Controls.treeOpenSelectedVisible(C,[d]);var B=C.getNodeByProperty("value",R.value);var F=C.getNodeByProperty("value",d);if(B!=null){YAHOO.util.Dom.removeClass(B.getLabelEl(),"xforms-tree-label-selected")}if(F!=null){YAHOO.util.Dom.addClass(F.getLabelEl(),"xforms-tree-label-selected")}R.value=d;R.previousValue=d}else{if(ORBEON.util.Dom.hasClass(R,"xforms-upload")){var i=ORBEON.util.Dom.getChildElementByClass(R,"xforms-upload-info");var T=ORBEON.util.Dom.getChildElementByClass(i,"xforms-upload-filename");var M=ORBEON.util.Dom.getChildElementByClass(i,"xforms-upload-mediatype");var j=ORBEON.util.Dom.getChildElementByClass(i,"xforms-upload-size");if(b=="empty"){ORBEON.util.Dom.removeClass(R,"xforms-upload-state-file");ORBEON.util.Dom.addClass(R,"xforms-upload-state-empty")}if(b=="file"){ORBEON.util.Dom.removeClass(R,"xforms-upload-state-empty");ORBEON.util.Dom.addClass(R,"xforms-upload-state-file");ORBEON.util.Dom.clearUploadControl(R)}if(K!=null){ORBEON.util.Dom.setStringValue(T,K)}if(S!=null){ORBEON.util.Dom.setStringValue(M,S)}if(O!=null){var P=O>1024*1024?Math.round(O/(1024*1024)*10)/10+" MB":O>1024?Math.round(O/1024*10)/10+" KB":O+" B";ORBEON.util.Dom.setStringValue(j,P)}}else{if(typeof (R.value)=="string"){if(xformsNormalizeEndlines(R.value)!=xformsNormalizeEndlines(d)){R.value=d;R.previousValue=d;if(ORBEON.util.Dom.hasClass(R,"xforms-textarea-appearance-xxforms-autosize")){ORBEON.xforms.Controls.autosizeTextarea(R)}}}}}}}}}}}}}}}}}},_getControlLabel:function(D,C){function E(F){return ORBEON.util.Dom.isElement(F)&&ORBEON.util.Dom.hasClass(F,C)&&(F.htmlFor==null||F.htmlFor==D.id)&&(C!="xforms-help-image"||ORBEON.util.Dom.nextSiblingElement(F).htmlFor==D.id)}var B=D.nextSibling;for(var A=0;A<10;A++){if(B==null){break}if(E(B)){return B}B=B.nextSibling}var B=D.previousSibling;for(var A=0;A<10;A++){if(B==null){break}if(E(B)){return B}B=B.previousSibling}return null},_setMessage:function(E,C,D){var B=ORBEON.xforms.Controls._getControlLabel(E,C);if(B!=null){B.innerHTML=D;var A=ORBEON.xforms.Controls._getControlLabel(E,"xforms-help-image");if(D==""){ORBEON.util.Dom.addClass(B,"xforms-disabled");if(C=="xforms-help"){ORBEON.util.Dom.addClass(A,"xforms-disabled")}}else{if(ORBEON.xforms.Controls.isRelevant(E)){ORBEON.util.Dom.removeClass(B,"xforms-disabled");if(C=="xforms-help"){ORBEON.util.Dom.removeClass(A,"xforms-disabled")}}}}},setLabelMessage:function(D,B){if(ORBEON.util.Dom.hasClass(D,"xforms-trigger")||ORBEON.util.Dom.hasClass(D,"xforms-submit")){if(D.tagName.toLowerCase()=="input"){D.alt=B}else{D.innerHTML=B}}else{if(ORBEON.util.Dom.hasClass(D,"xforms-dialog")){var C=ORBEON.util.Dom.getChildElementByIndex(D,0);C.innerHTML=B}else{if(ORBEON.util.Dom.hasClass(D,"xforms-group-appearance-xxforms-fieldset")){var A=ORBEON.util.Dom.getChildElementByIndex(D,0);if(A!=null){A.innerHTML=B}}else{ORBEON.xforms.Controls._setMessage(D,"xforms-label",B)}}}},getHelpMessage:function(B){var A=ORBEON.xforms.Controls._getControlLabel(B,"xforms-help");return A==null?"":ORBEON.util.Dom.getStringValue(A)},setHelpMessage:function(B,A){A=ORBEON.util.String.escapeHTMLMinimal(A);ORBEON.xforms.Controls._setMessage(B,"xforms-help",A);ORBEON.xforms.Controls._setTooltipMessage(B,A,ORBEON.xforms.Globals.helpTooltipForControl)},setValid:function(F,D,B){var E;var A=ORBEON.util.Dom.hasClass(F,"xforms-visited");if(D!=null){E=D!="false";if(E){ORBEON.util.Dom.removeClass(F,"xforms-invalid");if(A){ORBEON.util.Dom.removeClass(F,"xforms-invalid-visited")}}else{ORBEON.util.Dom.addClass(F,"xforms-invalid");if(A){ORBEON.util.Dom.addClass(F,"xforms-invalid-visited")}}}else{E=ORBEON.xforms.Controls.isValid(F)}var C=ORBEON.xforms.Controls._getControlLabel(F,"xforms-alert");if(C!=null){if(E&&!B){ORBEON.util.Dom.removeClass(C,"xforms-alert-active");if(A){ORBEON.util.Dom.removeClass(C,"xforms-alert-active-visited")}ORBEON.util.Dom.addClass(C,"xforms-alert-inactive")}else{ORBEON.util.Dom.removeClass(C,"xforms-alert-inactive");ORBEON.util.Dom.addClass(C,"xforms-alert-active");if(A){ORBEON.util.Dom.addClass(C,"xforms-alert-active-visited")}}}},setRelevant:function(G,E){if(ORBEON.util.Dom.hasClass(G,"xforms-group-begin-end")){var D="group-begin-";var A=G.id.substring(D.length);var I="group-end-"+A;var H=G.nextSibling;while(true){if(ORBEON.util.Dom.isElement(H)){if(H.id==I){break}if(E){ORBEON.util.Dom.removeClass(H,"xforms-disabled")}else{ORBEON.util.Dom.addClass(H,"xforms-disabled")}}H=H.nextSibling}}else{var B=[G,ORBEON.xforms.Controls._getControlLabel(G,"xforms-label"),ORBEON.xforms.Controls._getControlLabel(G,"xforms-alert")];if(!E||(E&&ORBEON.xforms.Controls.getHelpMessage(G)!="")){B.push(ORBEON.xforms.Controls._getControlLabel(G,"xforms-help"));B.push(ORBEON.xforms.Controls._getControlLabel(G,"xforms-help-image"))}if(!E||(E&&ORBEON.xforms.Controls.getHintMessage(G)!="")){B.push(ORBEON.xforms.Controls._getControlLabel(G,"xforms-hint"))}for(var C=0;C<B.length;C++){var F=B[C];if(F!=null){if(E){ORBEON.util.Dom.removeClass(F,"xforms-disabled")}else{ORBEON.util.Dom.addClass(F,"xforms-disabled")}}}}},setRepeatIterationRelevance:function(B,C,A){var D=xformsFindRepeatDelimiter(B,C).nextSibling;while(!(D.nodeType==ELEMENT_TYPE&&(ORBEON.util.Dom.hasClass(D,"xforms-repeat-delimiter")||ORBEON.util.Dom.hasClass(D,"xforms-repeat-begin-end")))){if(D.nodeType==ELEMENT_TYPE){if(A){ORBEON.util.Dom.removeClass(D,"xforms-disabled")}else{ORBEON.util.Dom.addClass(D,"xforms-disabled")}}D=D.nextSibling}},setReadonly:function(E,A){function G(K,J){if(J){K.setAttribute("disabled","disabled");ORBEON.util.Dom.addClass(K,"xforms-readonly")}else{K.removeAttribute("disabled");ORBEON.util.Dom.removeClass(K,"xforms-readonly")}}if(ORBEON.util.Dom.hasClass(E,"xforms-input")&&!ORBEON.util.Dom.hasClass(E,"xforms-type-boolean")){if(A){ORBEON.util.Dom.addClass(E,"xforms-readonly")}else{ORBEON.util.Dom.removeClass(E,"xforms-readonly")}var D=ORBEON.util.Dom.getChildElementByIndex(E,0);if(A){D.setAttribute("disabled","disabled")}else{D.removeAttribute("disabled")}if(ORBEON.util.Dom.hasClass(E,"xforms-type-dateTime")){var C=ORBEON.util.Dom.getChildElementByIndex(E,1);if(A){C.setAttribute("disabled","disabled")}else{C.removeAttribute("disabled")}}}else{if(ORBEON.util.Dom.hasClass(E,"xforms-output")||ORBEON.util.Dom.hasClass(E,"xforms-group")){if(A){ORBEON.util.Dom.addClass(E,"xforms-readonly")}else{ORBEON.util.Dom.removeClass(E,"xforms-readonly")}}else{if(ORBEON.util.Dom.hasClass(E,"xforms-select1-appearance-full")||ORBEON.util.Dom.hasClass(E,"xforms-select-appearance-full")||ORBEON.util.Dom.hasClass(E,"xforms-input-appearance-full")){for(var B=0;B<E.childNodes.length;B++){var I=E.childNodes[B];var H=I.firstChild;G(H,A)}}else{if(ORBEON.util.Dom.hasClass(E,"xforms-select1-appearance-xxforms-autocomplete")){var H=ORBEON.util.Dom.getChildElementByIndex(E,0);G(H,A)}else{if(ORBEON.util.Dom.hasClass(E,"xforms-textarea")&&ORBEON.util.Dom.hasClass(E,"xforms-mediatype-text-html")){var F=FCKeditorAPI.GetInstance(E.name);if(A){F.ToolbarSet.Collapse()}else{F.ToolbarSet.Expand()}}else{if(ORBEON.util.Dom.hasClass(E,"xforms-upload")){G(ORBEON.util.Dom.getChildElementByClass(E,"xforms-upload-select"),A)}else{G(E,A)}}}}}}},getAlertMessage:function(B){var A=ORBEON.xforms.Controls._getControlLabel(B,"xforms-alert");return A.innerHTML},setAlertMessage:function(B,A){ORBEON.xforms.Controls._setMessage(B,"xforms-alert",A);ORBEON.xforms.Controls._setTooltipMessage(B,A,ORBEON.xforms.Globals.alertTooltipForControl)},getHintMessage:function(B){if(ORBEON.util.Dom.hasClass(B,"xforms-trigger")){return B.title}else{var A=ORBEON.xforms.Controls._getControlLabel(B,"xforms-hint");return A==null?"":A.innerHTML}},setHintMessage:function(B,A){if(ORBEON.util.Dom.hasClass(B,"xforms-trigger")){B.title=A}else{ORBEON.xforms.Controls._setMessage(B,"xforms-hint",A);ORBEON.xforms.Controls._setTooltipMessage(B,A,ORBEON.xforms.Globals.hintTooltipForControl)}},_setTooltipMessage:function(C,B,D){var A=D[C.id];if(A){if(A==true){if(B!=""){D[C.id]=null}}else{if(B==""){A.destroy();D[C.id]=true}else{A.cfg.setProperty("text",B)}}}},setFocus:function(E){var F=ORBEON.util.Dom.getElementById(E);ORBEON.xforms.Globals.maskFocusEvents=true;if(ORBEON.util.Dom.hasClass(F,"xforms-input")&&!ORBEON.util.Dom.hasClass(F,"xforms-type-boolean")){ORBEON.util.Dom.getChildElementByIndex(F,0).focus()}else{if(ORBEON.util.Dom.hasClass(F,"xforms-select-appearance-full")||ORBEON.util.Dom.hasClass(F,"xforms-select1-appearance-full")){var C=0;var G=false;while(true){var D=ORBEON.util.Dom.getChildElementByIndex(F,C);if(D==null){break}var A=ORBEON.util.Dom.getChildElementByIndex(D,0);if(A.checked){G=true;break}C++}ORBEON.util.Dom.getChildElementByIndex(ORBEON.util.Dom.getChildElementByIndex(F,G?C:0),0).focus()}else{if(ORBEON.util.Dom.hasClass(F,"xforms-select1-appearance-xxforms-autocomplete")){ORBEON.util.Dom.getChildElementByIndex(F,0).focus()}else{if(typeof F.focus!="undefined"){F.focus()}}}}if(typeof ORBEON.xforms.Globals.serverValue[E]=="undefined"){var B=ORBEON.xforms.Controls.getCurrentValue(F);ORBEON.xforms.Globals.serverValue[E]=B}},updateRequiredEmpty:function(B,A){if(ORBEON.util.Dom.hasClass(B,"xforms-required")){if(A==""){ORBEON.util.Dom.addClass(B,"xforms-required-empty");ORBEON.util.Dom.removeClass(B,"xforms-required-filled");return true}else{ORBEON.util.Dom.addClass(B,"xforms-required-filled");ORBEON.util.Dom.removeClass(B,"xforms-required-empty");return false}}else{ORBEON.util.Dom.removeClass(B,"xforms-required-filled");ORBEON.util.Dom.removeClass(B,"xforms-required-empty");return false}},autosizeTextarea:function(A){var D=A.scrollHeight;var B=A.clientHeight;var E=B/A.rows;var C=0;if(D>B){while(D>B){A.rows=A.rows+1;B=A.clientHeight;C++}}else{if(D<B){while(A.rows>XFORMS_WIDE_TEXTAREA_MIN_ROWS&&D<B-E){A.rows=A.rows-1;B=A.clientHeight;C--}}}},updateHTMLAreaClasses:function(A){var B=A.previousSibling;while(B.nodeType!=ORBEON.util.Dom.ELEMENT_TYPE){B=A.previousSibling}B.className=A.className},updateLoadingPosition:function(F){var A;var E=ORBEON.xforms.Globals.formLoadingLoadingInitialRightTop[F][0];var G=document.documentElement.scrollLeft||document.body.scrollLeft;A=G+YAHOO.util.Dom.getViewportWidth()-E;var H;var D=document.documentElement.scrollTop||document.body.scrollTop;var C=ORBEON.xforms.Globals.formLoadingLoadingInitialRightTop[F][1];H=D+ORBEON.util.Utils.getProperty(LOADING_MIN_TOP_PADDING_PROPERTY)>C?D+ORBEON.util.Utils.getProperty(LOADING_MIN_TOP_PADDING_PROPERTY):C;var B=ORBEON.xforms.Globals.formLoadingLoadingOverlay[F];B.cfg.setProperty("x",A);B.cfg.setProperty("y",H)},treeOpenSelectedVisible:function(D,B){for(var E in D._nodes){var C=D._nodes[E];if(xformsArrayContains(B,C.data.value)){var A=C.parent;while(A!=null){A.expand();A=A.parent}}}},showHelp:function(J){var C=ORBEON.xforms.Controls.getForm(J);if(ORBEON.xforms.Globals.formHelpPanel[C.id]==null){for(var P=0;P<C.childNodes.length;P++){var A=C.childNodes[P];if(ORBEON.util.Dom.isElement(A)&&ORBEON.util.Dom.hasClass(A,"xforms-help-panel")){YAHOO.util.Dom.generateId(A);ORBEON.util.Dom.removeClass(A,"xforms-initially-hidden");var S=new YAHOO.widget.Panel(A.id,{modal:false,fixedcenter:false,underlay:"shadow",visible:false,constraintoviewport:true,draggable:true,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.3}});S.render();S.element.style.display="none";ORBEON.xforms.Globals.formHelpPanel[C.id]=S;var H=ORBEON.util.Dom.getChildElementByClass(A,"bd");var K=YAHOO.util.Dom.getElementsByClassName("xforms-help-panel-message",null,H)[0];ORBEON.xforms.Globals.formHelpPanelMessageDiv[C.id]=K;var R=YAHOO.util.Dom.getElementsByClassName("xforms-help-panel-close",null,H)[0];var D=ORBEON.util.Dom.getChildElementByIndex(R,0);ORBEON.xforms.Globals.formHelpPanelCloseButton[C.id]=D;YAHOO.util.Event.addListener(D,"click",ORBEON.xforms.Events.helpDialogButtonClose,C.id);S.beforeHideEvent.subscribe(ORBEON.xforms.Events.helpDialogXClose,C.id);break}}}ORBEON.xforms.Globals.formHelpPanelMessageDiv[C.id].innerHTML=ORBEON.xforms.Controls.getHelpMessage(J);var E=YAHOO.util.Dom.getRegion(ORBEON.xforms.Globals.formHelpPanel[C.id].element);var F;if(E.top==null){F=true}else{var Q=YAHOO.util.Dom.getViewportWidth();var L=YAHOO.util.Dom.getViewportHeight();var O=document.body.scrollLeft;var N=document.body.scrollTop;var M=E.top>=N&&E.bottom<=N+L;var I=E.left>=O&&E.right<=O+Q;F=!M||!I}if(F){var B=ORBEON.util.Dom.getChildElementByClass(J.parentNode,"xforms-help-image");ORBEON.xforms.Globals.formHelpPanel[C.id].element.style.display="block";ORBEON.xforms.Globals.formHelpPanel[C.id].cfg.setProperty("context",[B,"bl","tl"]);ORBEON.xforms.Globals.formHelpPanel[C.id].show()}var G=ORBEON.xforms.Globals.formHelpPanelMessageDiv[C.id].parentNode;if(G.scrollHeight<=G.clientHeight){ORBEON.xforms.Globals.formHelpPanelCloseButton[C.id].focus()}},showDialog:function(C,D){var A=ORBEON.util.Dom.getElementById(C);var B=ORBEON.xforms.Globals.dialogs[C];B.element.style.display="block";B.show();var F=ORBEON.util.Dom.getAttribute(A,"constrain")=="false"?false:true;B.cfg.setProperty("constraintoviewport",F);B.cfg.setProperty("zIndex",ORBEON.xforms.Globals.lastDialogZIndex++);if(D==null){B.center()}else{B.cfg.setProperty("context",[D,"tl","bl"]);B.align();ORBEON.xforms.Globals.dialogMinimalVisible[C]=true}if(ORBEON.xforms.Globals.currentFocusControlId!=null){var E=ORBEON.util.Dom.getElementById(ORBEON.xforms.Globals.currentFocusControlId);if(E!=null){E.blur()}}}};ORBEON.xforms.Events={_findParentXFormsControl:function(C){while(true){if(!C){return null}if(C.xformsElement){return C.xformsElement}else{if(C.ownerDocument&&C.ownerDocument.xformsElement){return C.ownerDocument.xformsElement}else{if(C.tagName!=null&&C.tagName.toLowerCase()=="iframe"){for(var A in ORBEON.xforms.Globals.dialogs){var B=ORBEON.xforms.Globals.dialogs[A];if(B.iframe==C){return B.element}}}else{if(C.className!=null){if(ORBEON.util.Dom.hasClass(C,"xforms-control")||ORBEON.util.Dom.hasClass(C,"xforms-dialog")||ORBEON.util.Dom.hasClass(C,"xforms-help-image")||ORBEON.util.Dom.hasClass(C,"xforms-alert")){return C}}}}}C=C.parentNode}},_keyCodeModifiesField:function(A){return A!=9&&A!=13&&A!=16&&A!=17&&A!=18},focus:function(F){if(!ORBEON.xforms.Globals.maskFocusEvents){var A=ORBEON.xforms.Events._findParentXFormsControl(YAHOO.util.Event.getTarget(F));var D=ORBEON.xforms.Globals.currentFocusControlId!=null?ORBEON.util.Dom.getElementById(ORBEON.xforms.Globals.currentFocusControlId):null;if(A!=null){if(typeof ORBEON.xforms.Globals.serverValue[A.id]=="undefined"&&!ORBEON.util.Dom.hasClass(A,"xforms-select-appearance-compact")){ORBEON.xforms.Globals.serverValue[A.id]=A.value}}var C=new Array();if(A!=null&&D!=A&&!ORBEON.util.Dom.hasClass(A,"xforms-dialog")){var E=false;if(D!=null){if(ORBEON.util.Dom.hasClass(D,"xforms-textarea")&&ORBEON.util.Dom.hasClass(D,"xforms-mediatype-text-html")){var B=FCKeditorAPI.GetInstance(D.name);D.value=B.GetXHTML();E=true}else{if(ORBEON.util.Dom.hasClass(D,"xforms-select1-appearance-xxforms-tree")||ORBEON.util.Dom.hasClass(D,"xforms-select-appearance-xxforms-tree")){E=true}else{if(ORBEON.xforms.Globals.isMac&&ORBEON.xforms.Globals.isRenderingEngineGecko&&ORBEON.util.Dom.hasClass(D,"xforms-control")&&!ORBEON.util.Dom.hasClass(D,"xforms-output")&&!ORBEON.util.Dom.hasClass(D,"xforms-trigger")){E=true}}}if(E){xformsValueChanged(D,null)}C.push(xformsCreateEventArray(D,"DOMFocusOut",null))}C.push(xformsCreateEventArray(A,"DOMFocusIn",null));ORBEON.xforms.Globals.currentFocusControlId=A.id;xformsFireEvents(C,true)}}else{ORBEON.xforms.Globals.maskFocusEvents=false}},blur:function(B){if(!ORBEON.xforms.Globals.maskFocusEvents){var A=ORBEON.xforms.Events._findParentXFormsControl(YAHOO.util.Event.getTarget(B));if(A!=null){if(!ORBEON.util.Dom.hasClass(A,"xforms-visited")){ORBEON.util.Dom.addClass(A,"xforms-visited");ORBEON.xforms.Events.ajaxResponseProcessedEvent.subscribe(ORBEON.xforms.Events._blurSetInvalidVisited,A,true)}if(!ORBEON.util.Dom.hasClass(A,"xforms-dialog")){ORBEON.xforms.Globals.currentFocusControlId=A.id}if(ORBEON.widgets.YUICalendar.appliesToControl(A)){ORBEON.widgets.YUICalendar.blur(B,A)}}}},_blurSetInvalidVisited:function(){var B=this;if(ORBEON.util.Dom.hasClass(B,"xforms-invalid")){ORBEON.util.Dom.addClass(B,"xforms-invalid-visited")}var A=ORBEON.xforms.Controls._getControlLabel(B,"xforms-alert");if(A!=null&&ORBEON.util.Dom.hasClass(A,"xforms-alert-active")){ORBEON.util.Dom.addClass(A,"xforms-alert-active-visited")}ORBEON.xforms.Events.ajaxResponseProcessedEvent.unsubscribe(ORBEON.xforms.Events._blurSetInvalidVisited)},change:function(D){var E=ORBEON.xforms.Events._findParentXFormsControl(YAHOO.util.Event.getTarget(D));if(E!=null){if(ORBEON.util.Dom.hasClass(E,"xforms-upload")){xformsFireEvents(new Array(xformsCreateEventArray(E,"xforms-select","")),false)}else{if(ORBEON.xforms.Globals.changedIdsRequest[E.id]!=null){ORBEON.xforms.Globals.changedIdsRequest[E.id]=0}if(ORBEON.util.Dom.hasClass(E,"xforms-select1-appearance-compact")){if(E.value==""){E.options[0].selected=true}else{var F=false;for(var C=0;C<E.options.length;C++){var B=E.options[C];if(B.selected){if(F){B.selected=false}else{F=true}}}}}else{if(ORBEON.util.Dom.hasClass(E,"xforms-type-time")||ORBEON.util.Dom.hasClass(E,"xforms-type-date")||ORBEON.util.Dom.hasClass(E,"xforms-type-dateTime")){function A(H,G,J){var I=G(H.value);if(I!=null){H.value=J(I)}}A(ORBEON.util.Dom.getChildElementByIndex(E,0),ORBEON.util.Dom.hasClass(E,"xforms-type-time")?ORBEON.util.DateTime.magicTimeToJSDate:ORBEON.util.DateTime.magicDateToJSDate,ORBEON.util.Dom.hasClass(E,"xforms-type-time")?ORBEON.util.DateTime.jsDateToformatDisplayTime:ORBEON.util.DateTime.jsDateToformatDisplayDate);if(ORBEON.util.Dom.hasClass(E,"xforms-type-dateTime")){A(ORBEON.util.Dom.getChildElementByIndex(E,1),ORBEON.util.DateTime.magicTimeToJSDate,ORBEON.util.DateTime.jsDateToformatDisplayTime)}}}xformsFireEvents([xformsCreateEventArray(E,"xxforms-value-change-with-focus-change",ORBEON.xforms.Controls.getCurrentValue(E))],false)}}},keydown:function(A){var B=ORBEON.xforms.Events._findParentXFormsControl(YAHOO.util.Event.getTarget(A));if(B!=null){if(ORBEON.xforms.Events._keyCodeModifiesField(A.keyCode)){ORBEON.xforms.Globals.changedIdsRequest[B.id]=ORBEON.xforms.Globals.changedIdsRequest[B.id]==null?1:ORBEON.xforms.Globals.changedIdsRequest[B.id]+1}if(ORBEON.widgets.JSCalendar.appliesToControl(B)){ORBEON.widgets.JSCalendar.keydown(A,B)}else{if(ORBEON.widgets.YUICalendar.appliesToControl(B)){ORBEON.widgets.YUICalendar.keydown(A,B)}}}},keypress:function(B){var C=ORBEON.xforms.Events._findParentXFormsControl(YAHOO.util.Event.getTarget(B));if(C!=null){if(ORBEON.util.Dom.hasClass(C,"xforms-select1-open")||(ORBEON.util.Dom.hasClass(C,"xforms-input")&&!ORBEON.util.Dom.hasClass(C,"xforms-type-boolean"))||ORBEON.util.Dom.hasClass(C,"xforms-secret")){if(B.keyCode==10||B.keyCode==13){YAHOO.util.Event.preventDefault(B);var A=[xformsCreateEventArray(C,"xxforms-value-change-with-focus-change",ORBEON.xforms.Controls.getCurrentValue(C)),xformsCreateEventArray(C,"DOMActivate",null)];xformsFireEvents(A,false)}}}},keyup:function(A){var B=ORBEON.xforms.Events._findParentXFormsControl(YAHOO.util.Event.getTarget(A));if(B!=null){if(ORBEON.util.Dom.hasClass(B,"xforms-select1-open")){ORBEON.xforms.Globals.autoCompleteLastKeyCode[B.id]=A.keyCode}if(ORBEON.xforms.Events._keyCodeModifiesField(A.keyCode)){ORBEON.xforms.Globals.changedIdsRequest[B.id]--}if(ORBEON.util.Dom.hasClass(B,"xforms-incremental")){xformsFireEvents([xformsCreateEventArray(B,"xxforms-value-change-with-focus-change",ORBEON.xforms.Controls.getCurrentValue(B))],true)}if(ORBEON.util.Dom.hasClass(B,"xforms-textarea-appearance-xxforms-autosize")){ORBEON.xforms.Controls.autosizeTextarea(B)}}},resize:function(C){for(var B=0;B<ORBEON.xforms.Globals.autosizeTextareas.length;B++){var A=ORBEON.xforms.Globals.autosizeTextareas[B];ORBEON.xforms.Controls.autosizeTextarea(A)}},_showToolTip:function(C,G,F,D,H,E,A){if(H!=""){var I=new YAHOO.widget.Tooltip(G+D,{context:F,text:H,showDelay:E,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.2},zIndex:1000});var B=ORBEON.util.Dom.getElementById(F);I.onContextMouseMove.call(B,A,I);I.onContextMouseOver.call(B,A,I);C[G]=I}else{C[G]=true}},mouseover:function(B){var F=ORBEON.xforms.Events._findParentXFormsControl(YAHOO.util.Event.getTarget(B));if(F!=null){if(ORBEON.xforms.Globals.hintTooltipForControl[F.id]==null&&!ORBEON.util.Dom.hasClass(document.body,"xforms-disable-hint-as-tooltip")){var A=ORBEON.xforms.Controls.getHintMessage(F);ORBEON.xforms.Events._showToolTip(ORBEON.xforms.Globals.hintTooltipForControl,F.id,F.id,"-orbeon-hint-tooltip",A,200,B)}if(ORBEON.util.Dom.hasClass(F,"xforms-alert-active")&&!ORBEON.util.Dom.hasClass(document.body,"xforms-disable-alert-as-tooltip")){var E=ORBEON.util.Dom.getElementById(F.htmlFor);if(ORBEON.xforms.Globals.alertTooltipForControl[E.id]==null){var A=ORBEON.xforms.Controls.getAlertMessage(E);YAHOO.util.Dom.generateId(F);ORBEON.xforms.Events._showToolTip(ORBEON.xforms.Globals.alertTooltipForControl,E.id,F.id,"-orbeon-alert-tooltip",A,10,B)}}else{if(ORBEON.util.Dom.hasClass(F,"xforms-dialog-appearance-minimal")){ORBEON.xforms.Globals.dialogMinimalLastMouseOut[F.id]=-1}}if(ORBEON.util.Utils.getProperty(HELP_TOOLTIP_PROPERTY)&&ORBEON.util.Dom.hasClass(F,"xforms-help-image")){var C=F.nextSibling;if(!ORBEON.util.Dom.isElement(C)){C=C.nextSibling}var E=ORBEON.util.Dom.getElementById(C.htmlFor);if(ORBEON.xforms.Globals.helpTooltipForControl[E.id]==null){var A=ORBEON.xforms.Controls.getHelpMessage(E);YAHOO.util.Dom.generateId(F);ORBEON.xforms.Events._showToolTip(ORBEON.xforms.Globals.helpTooltipForControl,E.id,F.id,"-orbeon-help-tooltip",A,0,B)}}var D=F;while(D!=null&&D!=document){if(ORBEON.util.Dom.hasClass(D,"xforms-dialog-appearance-minimal")){ORBEON.xforms.Globals.dialogMinimalLastMouseOut[D.id]=-1;break}D=D.parentNode}}},mouseout:function(A){var B=ORBEON.xforms.Events._findParentXFormsControl(YAHOO.util.Event.getTarget(A));if(B!=null){if(ORBEON.util.Dom.hasClass(B,"xforms-dialog-appearance-minimal")){ORBEON.xforms.Globals.dialogMinimalLastMouseOut[yuiDialog.element.id]=new Date().getTime();window.setTimeout(function(){ORBEON.xforms.Events.dialogMinimalCheckMouseIn(yuiDialog)},XFORMS_DELAY_BEFORE_CLOSE_MINIMAL_DIALOG_IN_MS)}}},click:function(M){var B=YAHOO.util.Event.getTarget(M);var R=ORBEON.xforms.Events._findParentXFormsControl(B);if(R!=null){if(ORBEON.util.Dom.hasClass(R,"xforms-output")){ORBEON.xforms.Events.focus(M)}else{if((ORBEON.util.Dom.hasClass(R,"xforms-trigger")||ORBEON.util.Dom.hasClass(R,"xforms-submit"))){YAHOO.util.Event.preventDefault(M);if(ORBEON.util.Dom.hasClass(R,"xxforms-offline-save")){ORBEON.xforms.Offline.storeEvents(ORBEON.xforms.Offline.memoryOfflineEvents);ORBEON.xforms.Offline.memoryOfflineEvents=[]}if(ORBEON.util.Dom.hasClass(R,"xxforms-online")){ORBEON.xforms.Offline.takeOnline()}if(!ORBEON.util.Dom.hasClass(R,"xforms-readonly")){ORBEON.xforms.Events.focus(M);xformsFireEvents([xformsCreateEventArray(R,"DOMActivate",null)],false)}}else{if(ORBEON.util.Dom.hasClass(R,"xforms-select1-appearance-full")||ORBEON.util.Dom.hasClass(R,"xforms-select-appearance-full")||ORBEON.util.Dom.hasClass(R,"xforms-input-appearance-full")){xformsFireEvents(new Array(xformsCreateEventArray(R,"xxforms-value-change-with-focus-change",ORBEON.xforms.Controls.getCurrentValue(R),null)),false)}else{if(ORBEON.util.Dom.hasClass(B,"xforms-type-date")){if(ORBEON.util.Utils.getProperty(DATE_PICKER_PROPERTY)=="jscalendar"){ORBEON.widgets.JSCalendar.click(M,R)}else{ORBEON.widgets.YUICalendar.click(M,R)}}else{if(ORBEON.util.Dom.hasClass(R,"xforms-upload")&&ORBEON.util.Dom.hasClass(B,"xforms-upload-remove")){xformsFireEvents(new Array(xformsCreateEventArray(R,"xxforms-value-change-with-focus-change","")),false)}else{if(ORBEON.util.Dom.hasClass(R,"xforms-select1-appearance-xxforms-menu")){var H=[];var T=B;while(true){if(T.tagName.toLowerCase()=="li"){var E=0;while(true){var K=T.previousSibling;if(K==null){break}T=K;if(T.nodeType==ELEMENT_TYPE&&T.tagName.toLowerCase()=="li"){E++}}H.push(E)}else{if(T.tagName.toLowerCase()=="div"&&ORBEON.util.Dom.hasClass(T,"yuimenubar")){break}}T=T.parentNode}H=H.reverse();var N=ORBEON.xforms.Globals.menuItemsets[R.id];var Q=0;for(var A=0;A<H.length;A++){var S=H[A];N=N[S+Q];Q=3}var F=N[1];xformsFireEvents(new Array(xformsCreateEventArray(R,"xxforms-value-change-with-focus-change",F)),false);ORBEON.xforms.Globals.menuYui[R.id].clearActiveItem()}else{if(ORBEON.util.Dom.hasClass(R,"xforms-help-image")){var I=R.nextSibling;while(!ORBEON.util.Dom.isElement(I)){I=R.nextSibling}var J=ORBEON.util.Dom.getElementById(I.htmlFor);var C=ORBEON.xforms.Controls.getForm(J);if(ORBEON.util.Utils.getProperty(HELP_HANDLER_PROPERTY)){xformsFireEvents(new Array(xformsCreateEventArray(J,"xforms-help")),false)}else{ORBEON.xforms.Controls.showHelp(J)}}}}}}}}}else{var L=B;while(L!=null&&!(ORBEON.util.Dom.isElement(L)&&L.tagName.toLowerCase()=="form")){var P=0;var G=false;var O=L;while(O!=null){if(ORBEON.util.Dom.isElement(O)){if(O.id.indexOf("repeat-begin-")==0){var C=ORBEON.xforms.Controls.getForm(O);var D=O.id.substring("repeat-begin-".length);D+=D.indexOf(XFORMS_SEPARATOR_1)==-1?XFORMS_SEPARATOR_1:XFORMS_SEPARATOR_2;D+=P;var M=new ORBEON.xforms.Server.Event(C,D,null,null,"DOMFocusIn");ORBEON.xforms.Server.fireEvents([M]);G=true;break}else{if(ORBEON.util.Dom.hasClass(O,"xforms-repeat-delimiter")){P++}}}O=O.previousSibling}if(G){break}L=L.parentNode}}},scrollOrResize:function(){for(var D in ORBEON.xforms.Globals.formLoadingLoadingOverlay){var B=ORBEON.xforms.Globals.formLoadingLoadingOverlay[D];if(B&&B.cfg.getProperty("visible")){ORBEON.xforms.Controls.updateLoadingPosition(D)}}for(var A in ORBEON.xforms.Globals.dialogs){var C=ORBEON.xforms.Globals.dialogs[A];if(C.cfg.getProperty("visible")&&C.cfg.getProperty("constraintoviewport")){C.cfg.setProperty("xy",C.cfg.getProperty("xy"))}}},sliderValueChange:function(A){var B=ORBEON.util.Dom.getElementById(this.id);B.value=A/200;xformsValueChanged(B,null)},menuClick:function(A,D,B){var E=B.menu;var C=B.value;xformsFireEvents([xformsCreateEventArray(E,"xxforms-value-change-with-focus-change",C)],false)},dialogClose:function(D,B,E){var A=E;var C=ORBEON.util.Dom.getElementById(A);xformsFireEvents([xformsCreateEventArray(C,"xxforms-dialog-close")],false)},helpDialogButtonClose:function(A,B){var C=ORBEON.xforms.Globals.formHelpPanel[B];C.hide()},helpDialogXClose:function(B,A,C){var D=ORBEON.xforms.Globals.formHelpPanel[C];D.element.style.display="none"},treeClickFocus:function(C){var B=ORBEON.util.Dom.hasClass(C,"xforms-incremental");if(ORBEON.xforms.Globals.currentFocusControlId!=C.id){var A={target:C};ORBEON.xforms.Events.focus(A)}ORBEON.xforms.Globals.currentFocusControlId=C.id},treeClickValueUpdated:function(A){if(ORBEON.util.Dom.hasClass(A,"xforms-incremental")){xformsValueChanged(A)}},treeCheckClick:function(){var A=this.tree;var C=ORBEON.util.Dom.getElementById(A.id);ORBEON.xforms.Events.treeClickFocus(C);C.value="";for(var D in A._nodes){var B=A._nodes[D];if(B.checkState==2){if(C.value!=""){C.value+=" "}C.value+=B.data.value}}ORBEON.xforms.Events.treeClickValueUpdated(C)},treeLabelClick:function(B){var C=this;var E=document.getElementById(C.id);var A=ORBEON.util.Dom.hasClass(E,"xforms-select");if(A){if(B.checked){B.uncheck()}else{B.check()}B.onCheckClick()}else{var D=C.getNodeByProperty("value",E.value);if(D!=null){YAHOO.util.Dom.removeClass(D.getLabelEl(),"xforms-tree-label-selected")}if(B!=null){YAHOO.util.Dom.addClass(B.getLabelEl(),"xforms-tree-label-selected")}ORBEON.xforms.Events.treeClickFocus(E);E.value=B.data.value;ORBEON.xforms.Events.treeClickValueUpdated(E)}},errorShowHideDetails:function(){var B=this.parentNode.parentNode.parentNode;var A=ORBEON.util.Dom.getChildElementByClass(B,"xforms-error-panel-details-hidden");var C=ORBEON.util.Dom.getChildElementByClass(B,"xforms-error-panel-details-shown");if(this.className=="xforms-error-panel-show-details"){ORBEON.util.Dom.addClass(A,"xforms-disabled");ORBEON.util.Dom.removeClass(C,"xforms-disabled")}else{ORBEON.util.Dom.removeClass(A,"xforms-disabled");ORBEON.util.Dom.addClass(C,"xforms-disabled")}},errorPanelClosed:function(E,C,G){var D=ORBEON.xforms.Globals.formErrorPanel[G];var B=D.errorDetailsDiv.parentNode.parentNode;var A=ORBEON.util.Dom.getChildElementByClass(B,"xforms-error-panel-details-hidden");var F=ORBEON.util.Dom.getChildElementByClass(B,"xforms-error-panel-details-shown");ORBEON.util.Dom.removeClass(A,"xforms-disabled");ORBEON.util.Dom.addClass(F,"xforms-disabled")},errorCloseClicked:function(B,A){A.hide()},errorReloadClicked:function(B,A){ORBEON.xforms.Globals.isReloading=true;window.location.reload(true)},dialogMinimalBodyClick:function(A,B){if(ORBEON.xforms.Globals.dialogMinimalVisible[B.element.id]){var C=YAHOO.util.Event.getTarget(A);var D=false;while(C!=null&&C!=document){if(ORBEON.util.Dom.hasClass(C,"xforms-dialog-appearance-minimal")){D=true;break}C=C.parentNode}if(!D){xformsFireEvents([xformsCreateEventArray(B.element,"xxforms-dialog-close")],false)}}},dialogMinimalCheckMouseIn:function(A){var B=new Date().getTime();if(ORBEON.xforms.Globals.dialogMinimalVisible[A.element.id]&&ORBEON.xforms.Globals.dialogMinimalLastMouseOut[A.element.id]!=-1&&B-ORBEON.xforms.Globals.dialogMinimalLastMouseOut[A.element.id]>=ORBEON.util.Utils.getProperty(DELAY_BEFORE_CLOSE_MINIMAL_DIALOG_PROPERTY)){xformsFireEvents([xformsCreateEventArray(A.element,"xxforms-dialog-close")],false)}},sendHeartBeatIfNeeded:function(F){var E=new Date().getTime();if((E-ORBEON.xforms.Globals.lastEventSentTime)>=F){var B=ORBEON.util.Dom.getElementById("xforms-heartbeat");if(B==null){var D;for(var A=0;A<document.forms.length;A++){var C=document.forms[A];if(ORBEON.util.Dom.hasClass(C,"xforms-form")){D=C;break}}var B=document.createElement("div");B.className="xforms-heartbeat";B.id="xforms-heartbeat";D.appendChild(B)}xformsFireEvents([xformsCreateEventArray(B,"xxforms-session-heartbeat")],false)}},orbeonLoadedEvent:new YAHOO.util.CustomEvent("orbeonLoaded"),ajaxResponseProcessedEvent:new YAHOO.util.CustomEvent("ajaxResponseProcessed")};ORBEON.widgets.Base=function(){return{extending:null,appliesToControl:function(A){},click:function(A,B){},blur:function(A,B){},keydown:function(A,B){}}}();ORBEON.widgets.JSCalendar=function(){function B(F){if(ORBEON.util.Dom.hasClass(F.activeDiv,"day")){var C=F.params.inputField;var D=ORBEON.util.DateTime.magicDateToJSDate(C.value);C.value=ORBEON.util.DateTime.jsDateToformatDisplayDate(D);var E=C.parentNode;xformsFireEvents([xformsCreateEventArray(E,"xxforms-value-change-with-focus-change",ORBEON.xforms.Controls.getCurrentValue(E))],false)}}function A(E){var C=E.params.inputField;var D=C.parentNode;E.hide()}return{extending:ORBEON.widgets.Base,appliesToControl:function(C){return(ORBEON.util.Dom.hasClass(C,"xforms-type-date")||ORBEON.util.Dom.hasClass(C,"xforms-type-dateTime"))&&ORBEON.util.Utils.getProperty(DATE_PICKER_PROPERTY)=="jscalendar"},click:function(E,F){var C=ORBEON.util.Dom.getChildElementByIndex(F,0);Calendar.setup({inputField:C.id,ifFormat:"%m/%d/%Y",showsTime:false,button:F.id,singleClick:true,step:1,onUpdate:B,onClose:A,electric:false});var D=F.onclick;F.onclick=null;D()},blur:function(C,D){},keydown:function(C,D){calendar.hide()}}}();ORBEON.widgets.YUICalendar=function(){var A=null;var K=null;var D=null;var B=null;var C=false;function I(){if(!over_cal){YAHOO.util.Dom.setStyle("cal1Container","display","none")}}function J(){C=true}function E(){C=false}function H(){YAHOO.util.Event.addListener(K,"mouseover",J);YAHOO.util.Event.addListener(K,"mouseout",E)}function F(){var L=A.getSelectedDates()[0];B.value=ORBEON.util.DateTime.jsDateToformatDisplayDate(L);xformsFireEvents([xformsCreateEventArray(D,"xxforms-value-change-with-focus-change",ORBEON.xforms.Controls.getCurrentValue(D))],false);G()}function G(){D=null;B=null;C=false;YAHOO.util.Dom.setStyle(K,"display","none")}return{extending:ORBEON.widgets.Base,appliesToControl:function(L){return(ORBEON.util.Dom.hasClass(L,"xforms-type-date")||ORBEON.util.Dom.hasClass(L,"xforms-type-dateTime"))&&ORBEON.util.Utils.getProperty(DATE_PICKER_PROPERTY)=="yui"},click:function(N,P){if(K==null){K=document.createElement("div");K.id="orbeon-calendar-div";document.body.appendChild(K);A=new YAHOO.widget.Calendar(K.id);A.renderEvent.subscribe(H,A,true);A.selectEvent.subscribe(F,A,true)}D=P;var M=ORBEON.util.DateTime.magicDateToJSDate(ORBEON.xforms.Controls.getCurrentValue(D));if(M==null){A.cfg.setProperty("selected","",false);A.cfg.setProperty("pagedate",new Date(),false)}else{var L=(M.getMonth()+1)+"/"+M.getDate()+"/"+M.getFullYear();A.cfg.setProperty("selected",L,false);A.cfg.setProperty("pagedate",M,false)}A.cfg.applyConfig();A.render();YAHOO.util.Dom.setStyle(K,"display","block");B=ORBEON.util.Dom.getChildElementByIndex(D,0);var O=YAHOO.util.Dom.getXY(B);O[1]=O[1]+20;YAHOO.util.Dom.setXY(K,O)},blur:function(L,M){if(C){window.setTimeout(function(){B.focus()},XFORMS_INTERNAL_SHORT_DELAY_IN_MS)}else{G()}},keydown:function(L,M){G()}}}();ORBEON.xforms.Init={_specialControlsInitFunctions:null,_getSpecialControlsInitFunctions:function(){ORBEON.xforms.Init._specialControlsInitFunctions=ORBEON.xforms.Init._specialControlsInitFunctions||{select1:{compact:ORBEON.xforms.Init._list,"{http://orbeon.org/oxf/xml/xforms}autocomplete":ORBEON.xforms.Init._autoComplete,"{http://orbeon.org/oxf/xml/xforms}menu":ORBEON.xforms.Init._menu,"{http://orbeon.org/oxf/xml/xforms}tree":ORBEON.xforms.Init._tree},select:{compact:ORBEON.xforms.Init._list,"{http://orbeon.org/oxf/xml/xforms}tree":ORBEON.xforms.Init._tree},range:{"":ORBEON.xforms.Init._range},textarea:{"{http://orbeon.org/oxf/xml/xforms}autosize":ORBEON.xforms.Init._widetextArea,"text/html":ORBEON.xforms.Init._htmlArea},dialog:{"":ORBEON.xforms.Init._dialog,full:ORBEON.xforms.Init._dialog,minimal:ORBEON.xforms.Init._dialog}};return ORBEON.xforms.Init._specialControlsInitFunctions},registerListenersOnFormElements:function(){for(var C=0;C<document.forms.length;C++){var D=document.forms[C];if(ORBEON.util.Dom.hasClass(D,"xforms-form")){var E=D.elements.length;for(var A=0;A<E;A++){var B=D.elements[A];ORBEON.xforms.Init.registerListenersOnFormElement((B))}}}},registerListenersOnFormElement:function(A){YAHOO.util.Event.addListener(A,"change",ORBEON.xforms.Events.change)},registerDraggableListenersOnRepeatElements:function(){var A=YAHOO.util.Dom.getElementsByClassName("xforms-repeat-delimiter");for(var D=0;D<A.length;D++){var C=YAHOO.util.Dom.getPreviousSibling(A[D]).id;var B=YAHOO.util.Dom.getNextSibling(A[D]);if(ORBEON.util.Dom.hasClass(B,"xforms-dnd")){if(B.tagName.toLowerCase()=="div"||B.tagName.toLowerCase()=="tr"||B.tagName.toLowerCase()=="td"){ORBEON.xforms.Init.registerDraggableListenersOnRepeatElement(B,C)}}}},registerDraggableListenersOnRepeatElement:function(B,C){var A=new ORBEON.xforms.DnD.DraggableItem(B);if(C.indexOf(XFORMS_SEPARATOR_1)==-1){B.position=XFORMS_SEPARATOR_1+"1"}else{B.position=XFORMS_SEPARATOR_1+C.substring(C.indexOf(XFORMS_SEPARATOR_1)+1)+XFORMS_SEPARATOR_2+"1"}if(ORBEON.util.Dom.hasClass(B,"xforms-dnd-vertical")){A.setXConstraint(0,0)}else{if(ORBEON.util.Dom.hasClass(B,"xforms-dnd-horizontal")){A.setYConstraint(0,0)}}},document:function(){if(ORBEON.util.Utils.getProperty(OFFLINE_SUPPORT_PROPERTY)){ORBEON.xforms.Offline.pageLoad()}if(ORBEON.xforms.Globals.isRenderingEngineTrident){ORBEON.xforms.Init.registerListenersOnFormElements();YAHOO.util.Event.addListener(document,"focusin",ORBEON.xforms.Events.focus);YAHOO.util.Event.addListener(document,"focusout",ORBEON.xforms.Events.blur);YAHOO.util.Event.addListener(document,"change",ORBEON.xforms.Events.change)}else{document.addEventListener("focus",ORBEON.xforms.Events.focus,true);document.addEventListener("blur",ORBEON.xforms.Events.blur,true);document.addEventListener("change",ORBEON.xforms.Events.change,true)}ORBEON.xforms.Init.registerDraggableListenersOnRepeatElements();YAHOO.util.Event.addListener(document,"keypress",ORBEON.xforms.Events.keypress);YAHOO.util.Event.addListener(document,"keydown",ORBEON.xforms.Events.keydown);YAHOO.util.Event.addListener(document,"keyup",ORBEON.xforms.Events.keyup);YAHOO.util.Event.addListener(document,"mouseover",ORBEON.xforms.Events.mouseover);YAHOO.util.Event.addListener(document,"mouseout",ORBEON.xforms.Events.mouseout);YAHOO.util.Event.addListener(document,"click",ORBEON.xforms.Events.click);YAHOO.util.Event.addListener(window,"resize",ORBEON.xforms.Events.resize);YAHOO.widget.Overlay.windowScrollEvent.subscribe(ORBEON.xforms.Events.scrollOrResize);YAHOO.widget.Overlay.windowResizeEvent.subscribe(ORBEON.xforms.Events.scrollOrResize);var J=document.getElementsByTagName("script");for(var B=0;B<J.length;B++){var E=J[B];var P=ORBEON.util.Dom.getAttribute(E,"src");if(P!=null){var p=P.indexOf(PATH_TO_JAVASCRIPT_1);if(p==-1){p=P.indexOf(PATH_TO_JAVASCRIPT_2)}if(p!=-1){BASE_URL=P.substr(0,p);break}}}XFORMS_SERVER_URL=BASE_URL+"/xforms-server";if(ORBEON.util.Utils.getProperty(SESSION_HEARTBEAT_PROPERTY)){var O=ORBEON.util.Utils.getProperty(SESSION_HEARTBEAT_DELAY_PROPERTY);if(O>0){window.setInterval(function(){ORBEON.xforms.Events.sendHeartBeatIfNeeded(O)},O/10)}}if(!(window.opsXFormsControls===undefined)){var X=ORBEON.xforms.Init._getSpecialControlsInitFunctions();for(var D in window.opsXFormsControls.controls){if(X[D]){var q=window.opsXFormsControls.controls[D];for(var L in q){var Q=X[D][L];if(Q){var K=q[L];for(var R=0;R<K.length;R++){var W=ORBEON.util.Dom.getElementById(K[R]);Q(W)}}}}}}for(var A=0;A<document.forms.length;A++){var d=document.forms[A];if(ORBEON.util.Dom.hasClass(d,"xforms-form")){var l=document.forms[A].id;ORBEON.xforms.Globals.formErrorPanel[l]=null;ORBEON.xforms.Globals.formLoadingNone[l]=null;var i=0;for(var n=0;n<d.childNodes.length;n++){if(i==3){break}var Y=d.childNodes[n];if(Y.className=="xforms-loading-loading"){Y.style.display="block";ORBEON.xforms.Globals.formLoadingLoadingOverlay[l]=new YAHOO.widget.Overlay(Y);ORBEON.xforms.Globals.formLoadingLoadingInitialRightTop[l]=[YAHOO.util.Dom.getViewportWidth()-YAHOO.util.Dom.getX(Y),YAHOO.util.Dom.getY(Y)];Y.style.right="auto";ORBEON.xforms.Globals.formLoadingLoadingOverlay[l].cfg.setProperty("visible",false);i++}else{if(ORBEON.util.Dom.isElement(Y)&&ORBEON.util.Dom.hasClass(Y,"xforms-error-panel")){YAHOO.util.Dom.generateId(Y);ORBEON.util.Dom.removeClass(Y,"xforms-initially-hidden");var c=new YAHOO.widget.Panel(Y.id,{width:"700px",modal:true,fixedcenter:false,underlay:"shadow",visible:false,constraintoviewport:true,draggable:true});c.render();c.element.style.display="none";c.beforeHideEvent.subscribe(ORBEON.xforms.Events.errorPanelClosed,l);ORBEON.xforms.Globals.formErrorPanel[l]=c;var f=ORBEON.util.Dom.getChildElementByClass(Y,"hd");var V=ORBEON.util.Dom.getChildElementByClass(Y,"bd");var r=ORBEON.util.Dom.getChildElementByClass(V,"xforms-error-panel-details-hidden");var T=ORBEON.util.Dom.getChildElementByIndex(ORBEON.util.Dom.getChildElementByIndex(r,0),0);YAHOO.util.Dom.generateId(T);var m=ORBEON.util.Dom.getChildElementByClass(V,"xforms-error-panel-details-shown");var o=ORBEON.util.Dom.getChildElementByIndex(ORBEON.util.Dom.getChildElementByIndex(m,0),0);YAHOO.util.Dom.generateId(o);c.errorTitleDiv=f;c.errorDetailsDiv=ORBEON.util.Dom.getChildElementByClass(m,"xforms-error-panel-details");YAHOO.util.Event.addListener(T.id,"click",ORBEON.xforms.Events.errorShowHideDetails);YAHOO.util.Event.addListener(o.id,"click",ORBEON.xforms.Events.errorShowHideDetails);var G=YAHOO.util.Dom.getElementsByClassName("xforms-error-panel-close",null,Y);if(G.length!=0){YAHOO.util.Dom.generateId(G[0]);YAHOO.util.Event.addListener(G[0].id,"click",ORBEON.xforms.Events.errorCloseClicked,c)}var k=YAHOO.util.Dom.getElementsByClassName("xforms-error-panel-reload",null,Y);if(k.length!=0){YAHOO.util.Dom.generateId(k[0]);YAHOO.util.Event.addListener(k[0].id,"click",ORBEON.xforms.Events.errorReloadClicked,c)}i++}else{if(Y.className=="xforms-loading-none"){ORBEON.xforms.Globals.formLoadingNone[l]=Y;i++}}}}var C=d.elements;var H;var g;for(var S=0;S<C.length;S++){var N=C[S];if(N.name.indexOf("$static-state")!=-1){ORBEON.xforms.Globals.formStaticState[l]=N}else{if(N.name.indexOf("$dynamic-state")!=-1){ORBEON.xforms.Globals.formDynamicState[l]=N}else{if(N.name.indexOf("$server-events")!=-1){ORBEON.xforms.Globals.formServerEvents[l]=N}else{if(N.name.indexOf("$client-state")!=-1){ORBEON.xforms.Globals.formClientState[l]=N;if(N.value==""){xformsStoreInClientState(l,"initial-dynamic-state",ORBEON.xforms.Globals.formDynamicState[l].value)}}else{if(N.name.indexOf("$repeat-tree")!=-1){H=N}else{if(N.name.indexOf("$repeat-indexes")!=-1){g=N;break}}}}}}}var b=H.value;var M=b.split(",");for(var j=0;j<M.length;j++){var h=M[j].split(" ");var e=h[0];if(h.length>1){var I=h[h.length-1];ORBEON.xforms.Globals.repeatTreeChildToParent[e]=I}}for(var F in ORBEON.xforms.Globals.repeatTreeChildToParent){var I=ORBEON.xforms.Globals.repeatTreeChildToParent[F];while(I!=null){if(!ORBEON.xforms.Globals.repeatTreeParentToAllChildren[I]){ORBEON.xforms.Globals.repeatTreeParentToAllChildren[I]=new Array()}ORBEON.xforms.Globals.repeatTreeParentToAllChildren[I].push(F);I=ORBEON.xforms.Globals.repeatTreeChildToParent[I]}}var U=g.value;var Z=U.split(",");for(var j=0;j<Z.length;j++){var h=Z[j].split(" ");var e=h[0];var a=h[h.length-1];ORBEON.xforms.Globals.repeatIndexes[e]=a}if(xformsGetFromClientState(l,"load-did-run")==null){xformsStoreInClientState(l,"load-did-run","true")}else{if(ORBEON.util.Utils.getProperty(REVISIT_HANDLING_PROPERTY)=="reload"){ORBEON.xforms.Globals.isReloading=true;window.location.reload(true)}else{xformsFireEvents(new Array(xformsCreateEventArray(d,"xxforms-all-events-required",null,null)),false)}}}}if(typeof xformsPageLoadedServer!="undefined"&&!ORBEON.xforms.Globals.fckEditorLoading){xformsPageLoadedServer()}if(window.parent.childWindowOrbeonReady){window.parent.childWindowOrbeonReady();window.parent.childWindowOrbeonReady=null}ORBEON.xforms.Events.orbeonLoadedEvent.fire()},insertedElement:function(A){if(A.nodeType==ORBEON.util.Dom.ELEMENT_TYPE){if(ORBEON.util.Dom.hasClass(A,"xforms-select1-appearance-xxforms-autocomplete")){ORBEON.xforms.Init._autoComplete(A)}for(var C=0;C<A.childNodes.length;C++){var B=A.childNodes[C];if(B.nodeType==ORBEON.util.Dom.ELEMENT_TYPE){ORBEON.xforms.Init.insertedElement(B)}}}},_autoComplete:function(F){var E=ORBEON.util.Dom.getChildElementByIndex(F,0);var A=ORBEON.util.Dom.getChildElementByIndex(F,1);var C=new Array();for(var D=1;D<A.options.length;D++){C.push(A.options[D].value)}var B=ORBEON.util.Dom.hasClass(F,"xforms-select1-open-autocomplete-nofilter");ORBEON.xforms.Globals.autoCompleteOpen[F.id]=actb(E,C,B)},_widetextArea:function(A){ORBEON.xforms.Globals.autosizeTextareas.push(A);ORBEON.xforms.Controls.autosizeTextarea(A)},_range:function(A){A.tabIndex=0;A.previousValue=0;var C=A.firstChild;if(C.nodeType!=ELEMENT_TYPE){C=C.nextSibling}C.id=A.id+XFORMS_SEPARATOR_1+"thumb";var B=YAHOO.widget.Slider.getHorizSlider(A.id,C.id,0,200);B.subscribe("change",ORBEON.xforms.Events.sliderValueChange)},_addToTree:function(J,L,G,K){for(var I=K;I<L.length;I++){var F=L[I];var B=F[0];var H=F[1];var D=F[2];var E=typeof D=="boolean";var C={label:B,value:H};var A;if(J.xformsAllowMultipleSelection){A=new YAHOO.widget.TaskNode(C,G,false);A.onCheckClick=ORBEON.xforms.Events.treeCheckClick}else{A=new YAHOO.widget.TextNode(C,G,false)}ORBEON.xforms.Init._addToTree(J,F,A,E?3:2);if(E&&D){if(J.value!=""){J.value+=" "}J.value+=H}}},_initTreeDivFromArray:function(I,F,J){var C=F.getRoot();ORBEON.xforms.Init._addToTree(I,J,C,0);if(I.xformsAllowMultipleSelection){var H=I.value.split(" ");var A=F.getNodesByProperty();if(A!=null){for(var D=0;D<A.length;D++){var B=A[D];var G=B.data.value;for(var E=0;E<H.length;E++){if(G==H[E]){B.check();break}}}}}var H=I.xformsAllowMultipleSelection?I.value.split(" "):[I.value];ORBEON.xforms.Controls.treeOpenSelectedVisible(F,H);F.draw()},_tree:function(treeDiv){treeDiv.xformsAllowMultipleSelection=ORBEON.util.Dom.hasClass(treeDiv,"xforms-select");var treeString=ORBEON.util.Dom.getStringValue(treeDiv);var treeArray=ORBEON.util.String.eval(treeString);ORBEON.util.Dom.setStringValue(treeDiv,"");treeDiv.value="";var yuiTree=new YAHOO.widget.TreeView(treeDiv.id);ORBEON.xforms.Globals.treeYui[treeDiv.id]=yuiTree;ORBEON.xforms.Init._initTreeDivFromArray(treeDiv,yuiTree,treeArray);treeDiv.previousValue=treeDiv.value;if(!treeDiv.xformsAllowMultipleSelection){var selectedNode=yuiTree.getNodeByProperty("value",treeDiv.value);if(selectedNode!=null){YAHOO.util.Dom.addClass(selectedNode.getLabelEl(),"xforms-tree-label-selected")}}yuiTree.subscribe("labelClick",ORBEON.xforms.Events.treeLabelClick);ORBEON.util.Dom.removeClass(treeDiv,"xforms-initially-hidden")},_addToMenuItem:function(C,J,A){if(A.element.id==""){YAHOO.util.Dom.generateId(A.element)}A.clickEvent.subscribe(ORBEON.xforms.Events.menuClick,{menu:C,value:J[1]});if(J.length>3){var F=new YAHOO.widget.Menu(A.element.id+"menu");for(var I=3;I<J.length;I++){var G=J[I];var B=G[0];var H=G[1];var E=G[2];var D=new YAHOO.widget.MenuItem(B);F.addItem(D);ORBEON.xforms.Init._addToMenuItem(C,G,D)}A.cfg.setProperty("submenu",F)}},_menu:function(menu){var yuiMenuDiv;var valuesDiv;for(var j=0;j<menu.childNodes.length;j++){var childNode=menu.childNodes[j];if(childNode.nodeType==ELEMENT_TYPE){if(ORBEON.util.Dom.hasClass(childNode,"yuimenubar")){yuiMenuDiv=childNode}else{if(ORBEON.util.Dom.hasClass(childNode,"xforms-initially-hidden")){valuesDiv=childNode}}}}var menuString=ORBEON.util.Dom.getStringValue(valuesDiv);ORBEON.xforms.Globals.menuItemsets[menu.id]=ORBEON.util.String.eval(menuString);YAHOO.util.Dom.generateId(yuiMenuDiv);var yuiMenu=new YAHOO.widget.MenuBar(yuiMenuDiv.id,{autosubmenudisplay:true,hidedelay:750,lazyload:true});yuiMenu.render();ORBEON.xforms.Globals.menuYui[menu.id]=yuiMenu},_htmlArea:function(B){var A=new FCKeditor(B.name);if(!xformsArrayContains(ORBEON.xforms.Globals.htmlAreaNames,B.name)){ORBEON.xforms.Globals.htmlAreaNames.push(B.name)}A.BasePath=BASE_URL+ORBEON.util.Utils.getProperty(FCK_EDITOR_BASE_PATH_PROPERTY);A.ToolbarSet="OPS";var C=typeof USER_LANGUAGE;if(C!="undefined"){A.Config.AutoDetectLanguage=false;A.Config.DefaultLanguage=(USER_LANGUAGE!="")?USER_LANGUAGE:"en"}C=typeof FCK_CUSTOM_CONFIG;if(C!="undefined"){A.Config.CustomConfigurationsPath=A.BasePath+FCK_CUSTOM_CONFIG}if(ORBEON.xforms.Globals.fckEditorLoading){ORBEON.xforms.Globals.fckEditorsToLoad.push(A)}else{ORBEON.xforms.Globals.fckEditorLoading=true;A.ReplaceTextarea();ORBEON.xforms.Controls.updateHTMLAreaClasses(ORBEON.util.Dom.getElementById(A.InstanceName))}},_list:function(D){var C="";for(var A=0;A<D.options.length;A++){var B=D.options[A];if(B.selected){if(C!=""){C+=" "}C+=B.value}}ORBEON.xforms.Globals.serverValue[D.id]=C},_dialog:function(C){var F=ORBEON.util.Dom.hasClass(C,"xforms-dialog-modal");var E=ORBEON.util.Dom.hasClass(C,"xforms-dialog-close-true");var B=ORBEON.util.Dom.hasClass(C,"xforms-dialog-draggable-true");var A=ORBEON.util.Dom.hasClass(C,"xforms-dialog-visible-true");var D=ORBEON.util.Dom.hasClass(C,"xforms-dialog-appearance-minimal");ORBEON.util.Dom.removeClass(C,"xforms-initially-hidden");if(D){yuiDialog=new YAHOO.widget.Overlay(C.id,{visible:false,constraintoviewport:true,iframe:true});YAHOO.util.Event.addListener(document.body,"click",ORBEON.xforms.Events.dialogMinimalBodyClick,yuiDialog)}else{yuiDialog=new YAHOO.widget.Dialog(C.id,{modal:F,close:E,visible:false,draggable:B,fixedcenter:false,constraintoviewport:true,underlay:"shadow"});yuiDialog.beforeHideEvent.subscribe(ORBEON.xforms.Events.dialogClose,C.id)}yuiDialog.render();yuiDialog.element.style.display="none";ORBEON.xforms.Globals.dialogs[C.id]=yuiDialog;if(A){ORBEON.xforms.Controls.showDialog(C.id,null)}}};ORBEON.xforms.Server={Event:function(A,I,E,H,F,D,B,C,G){this.form=A;this.targetId=I;this.otherId=E;this.value=H;this.eventName=F;this.bubbles=D;this.cancelable=B;this.ignoreErrors=C;this.additionalAttribs=G},exceptionWhenTalkingToServer:function(C,B){ORBEON.util.Utils.logMessage("JavaScript error");ORBEON.util.Utils.logMessage(C);var A="Exception in client-side code.";A+="<ul>";if(C.message!=null){A+="<li>Message: "+C.message+"</li>"}if(C.fileName!=null){A+="<li>File: "+C.fileName+"</li>"}if(C.lineNumber!=null){A+="<li>Line number: "+C.lineNumber+"</li>"}A+="</ul>";ORBEON.xforms.Server.showError("Exception in client-side code",A,B)},showError:function(C,A,B){if(!ORBEON.xforms.Globals.requestIgnoreErrors){if(ORBEON.xforms.Globals.formErrorPanel[B]){ORBEON.xforms.Globals.formErrorPanel[B].element.style.display="block";ORBEON.xforms.Globals.formErrorPanel[B].errorTitleDiv.innerHTML=C;ORBEON.xforms.Globals.formErrorPanel[B].errorDetailsDiv.innerHTML=A;ORBEON.xforms.Globals.formErrorPanel[B].show();ORBEON.xforms.Globals.formErrorPanel[B].center()}}},fireEvents:function(B,F){if(!ORBEON.xforms.Offline.isOnline){ORBEON.xforms.Offline.memoryOfflineEvents=ORBEON.xforms.Offline.memoryOfflineEvents.concat(B);var A=false;for(var C=0;C<B.length;C++){var E=B[C];if(E.eventName=="xxforms-value-change-with-focus-change"){A=true;ORBEON.xforms.Offline.controlValues[E.targetId]=E.value}}if(A){ORBEON.xforms.Globals.executeEventFunctionQueued++;window.setTimeout(function(){ORBEON.xforms.Globals.executeEventFunctionQueued--;if(ORBEON.xforms.Globals.executeEventFunctionQueued==0){ORBEON.xforms.Offline.evaluateMIPs()}},ORBEON.util.Utils.getProperty(INTERNAL_SHORT_DELAY_PROPERTY))}}else{var D=new Date().getTime();if(ORBEON.xforms.Globals.eventQueue.length==0){ORBEON.xforms.Globals.eventsFirstEventTime=D}for(var C=0;C<B.length;C++){ORBEON.xforms.Globals.eventQueue.push(B[C])}ORBEON.xforms.Globals.executeEventFunctionQueued++;if(F&&!(D-ORBEON.xforms.Globals.eventsFirstEventTime>ORBEON.util.Utils.getProperty(DELAY_BEFORE_FORCE_INCREMENTAL_REQUEST_PROPERTY))){window.setTimeout(function(){ORBEON.xforms.Server.executeNextRequest(false)},ORBEON.util.Utils.getProperty(DELAY_BEFORE_INCREMENTAL_REQUEST_PROPERTY))}else{window.setTimeout(function(){ORBEON.xforms.Server.executeNextRequest(true)},ORBEON.util.Utils.getProperty(INTERNAL_SHORT_DELAY_PROPERTY))}ORBEON.xforms.Globals.lastEventSentTime=new Date().getTime()}},executeNextRequest:function(M){M=typeof (M)=="boolean"&&M==true;ORBEON.xforms.Globals.executeEventFunctionQueued--;var O=false;if(!ORBEON.xforms.Globals.requestInProgress&&ORBEON.xforms.Globals.eventQueue.length>0&&(M||ORBEON.xforms.Globals.executeEventFunctionQueued==0)){var N={};var D=[];for(var B=ORBEON.xforms.Globals.eventQueue.length-1;B>=0;B--){var C=ORBEON.xforms.Globals.eventQueue[B];if(C.eventName=="xxforms-value-change-with-focus-change"){if(N[C.targetId]==null){N[C.targetId]=true;if(ORBEON.util.Dom.hasClass(ORBEON.util.Dom.getElementById(C.targetId),"xforms-upload")||(ORBEON.xforms.Globals.serverValue[C.targetId]!="undefined"&&ORBEON.xforms.Globals.serverValue[C.targetId]!=C.value)){ORBEON.xforms.Globals.serverValue[C.targetId]=C.value;D.unshift(C)}}}else{D.unshift(C)}}ORBEON.xforms.Globals.eventQueue=D;if(ORBEON.xforms.Globals.eventQueue.length>0){ORBEON.xforms.Globals.requestForm=ORBEON.xforms.Globals.eventQueue[0].form;var J=ORBEON.xforms.Globals.requestForm.id;ORBEON.xforms.Globals.requestInProgress=true;var E=ORBEON.util.Utils.getProperty(DELAY_BEFORE_DISPLAY_LOADING_PROPERTY);if(E==0){xformsDisplayLoading()}else{window.setTimeout(xformsDisplayLoading,E)}for(var F in ORBEON.xforms.Globals.changedIdsRequest){if(ORBEON.xforms.Globals.changedIdsRequest[F]==0){ORBEON.xforms.Globals.changedIdsRequest[F]=null}}ORBEON.xforms.Globals.requestIgnoreErrors=true;var L=false;for(var B=0;B<ORBEON.xforms.Globals.eventQueue.length;B++){var C=ORBEON.xforms.Globals.eventQueue[B];if(!C.ignoreErrors){ORBEON.xforms.Globals.requestIgnoreErrors=false}if(C.eventName=="xxforms-all-events-required"||C.eventName=="xxforms-offline"){L=true}var P=ORBEON.util.Dom.getElementById(C.targetId);if(C.eventName=="DOMActivate"){if(ORBEON.util.Dom.hasClass(P,"xforms-trigger-appearance-modal")){ORBEON.util.Utils.displayModalProgressPanel()}else{if(ORBEON.util.Dom.hasClass(P,"xxforms-offline")){L=true}}}}var I="";I+='<!DOCTYPE xxforms:event-request [<!ENTITY nbsp "&#160;">]>\n';var G="    ";I+='<xxforms:event-request xmlns:xxforms="http://orbeon.org/oxf/xml/xforms">\n';I+=G;I+="<xxforms:static-state>";I+=ORBEON.xforms.Globals.formStaticState[J].value;I+="</xxforms:static-state>\n";I+=G;I+="<xxforms:dynamic-state>";I+=ORBEON.xforms.Globals.formDynamicState[J].value;I+="</xxforms:dynamic-state>\n";if(L){I+=G;I+="<xxforms:initial-dynamic-state>";I+=xformsGetFromClientState(J,"initial-dynamic-state");I+="</xxforms:initial-dynamic-state>\n"}I+=G;I+="<xxforms:action>\n";var A=[];for(var K=0;K<ORBEON.xforms.Globals.eventQueue.length;K++){var C=ORBEON.xforms.Globals.eventQueue[K];if(ORBEON.xforms.Controls.getForm(C.form)==ORBEON.xforms.Globals.requestForm){I+=G+G;I+="<xxforms:event";I+=' name="'+C.eventName+'"';if(C.targetId!=null){I+=' source-control-id="'+C.targetId+'"'}if(C.otherId!=null){I+=' other-control-id="'+C.otherId+'"'}if(C.additionalAttribs!=null){for(var H=0;H<C.additionalAttribs.length-1;H+=2){I+=" "+C.additionalAttribs[H]+'="'+C.additionalAttribs[H+1]+'"'}}I+=">";if(C.value!=null){if(typeof C.value=="string"){C.value=C.value.replace(XFORMS_REGEXP_AMPERSAND,"&amp;");C.value=C.value.replace(XFORMS_REGEXP_OPEN_ANGLE,"&lt;")}I+=C.value}I+="</xxforms:event>\n";A.unshift(K)}}I+=G;I+="</xxforms:action>\n";I+="</xxforms:event-request>";for(var K=0;K<A.length;K++){ORBEON.xforms.Globals.eventQueue.splice(A[K],1)}O=true;ORBEON.xforms.Globals.requestRetries=ORBEON.util.Utils.getProperty(REQUEST_RETRIES_PROPERTY);ORBEON.xforms.Globals.requestDocument=I;ORBEON.xforms.Server.asyncRequest()}}if(!O&&ORBEON.xforms.Globals.eventQueue.length==0){xformsDisplayIndicator("none")}},asyncRequest:function(){try{ORBEON.xforms.Globals.requestRetries--;YAHOO.util.Connect.setDefaultPostHeader(false);YAHOO.util.Connect.initHeader("Content-Type","application/xml");var C={success:ORBEON.xforms.Server.handleResponseAjax,failure:ORBEON.xforms.Server.handleFailure};var A=ORBEON.util.Utils.getProperty(DELAY_BEFORE_AJAX_TIMEOUT_PROPERTY);if(A!=-1){C.timeout=A}YAHOO.util.Connect.asyncRequest("POST",XFORMS_SERVER_URL,C,ORBEON.xforms.Globals.requestDocument)}catch(B){ORBEON.xforms.Globals.requestInProgress=false;ORBEON.xforms.Server.exceptionWhenTalkingToServer(B,formID)}},handleFailure:function(C){if(ORBEON.xforms.Globals.requestRetries>0){ORBEON.xforms.Globals.requestRetries--;ORBEON.xforms.Server.asyncRequest()}else{ORBEON.xforms.Globals.requestInProgress=false;ORBEON.xforms.Globals.requestDocument="";var B=ORBEON.xforms.Globals.requestForm.id;var A="Error while processing response: "+(C.responseText!==undefined?C.responseText:C.statusText);if(ORBEON.xforms.Globals.isRenderingEngineGecko&&C.statusText=="communication failure"){window.setTimeout(function(){ORBEON.xforms.Server.showError("Error while processing response",A,B)},ORBEON.util.Utils.getProperty(DELAY_BEFORE_GECKO_COMMUNICATION_ERROR_PROPERTY))}else{ORBEON.xforms.Server.showError("Error while processing response",A,B)}}},handleUploadResponse:function(D){var C=YAHOO.util.Dom.getElementsByClassName("xforms-upload","span");for(var B=0;B<C.length;B++){var A=C[B];if(ORBEON.util.Dom.hasClass(A,"xforms-upload-state-empty")){ORBEON.util.Dom.clearUploadControl(A)}}ORBEON.xforms.Server.handleResponseAjax(D)},handleResponseAjax:function(D){var C=D.responseXML;if(!C||(C&&C.documentElement&&C.documentElement.tagName.toLowerCase()=="html")){var B=D.responseText.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&");C=ORBEON.util.Dom.stringToDom(B)}var A=ORBEON.xforms.Globals.requestForm.id;ORBEON.xforms.Server.handleResponseDom(C,A);ORBEON.xforms.Events.ajaxResponseProcessedEvent.fire()},handleResponseDom:function(responseXML,formID){try{if(responseXML&&responseXML.documentElement&&responseXML.documentElement.tagName.indexOf("event-response")!=-1){var responseRoot=responseXML.documentElement;var newDynamicStateTriggersReplace=false;var xmlNamespace=null;for(var j=0;j<responseRoot.attributes.length;j++){if(responseRoot.attributes[j].nodeValue==XXFORMS_NAMESPACE_URI){var attrName=responseRoot.attributes[j].name;xmlNamespace=attrName.substr(attrName.indexOf(":")+1);break}}for(var i=0;i<responseRoot.childNodes.length;i++){if(xformsGetLocalName(responseRoot.childNodes[i])=="dynamic-state"){var newDynamicState=ORBEON.util.Dom.getStringValue(responseRoot.childNodes[i]);ORBEON.xforms.Globals.formDynamicState[formID].value=newDynamicState}else{if(xformsGetLocalName(responseRoot.childNodes[i])=="static-state"){var newStaticState=ORBEON.util.Dom.getStringValue(responseRoot.childNodes[i]);ORBEON.xforms.Globals.formStaticState[formID].value=newStaticState}else{if(xformsGetLocalName(responseRoot.childNodes[i])=="action"){var actionElement=responseRoot.childNodes[i];for(var actionIndex=0;actionIndex<actionElement.childNodes.length;actionIndex++){var actionName=xformsGetLocalName(actionElement.childNodes[actionIndex]);switch(actionName){case"control-values":var controlValuesElement=actionElement.childNodes[actionIndex];var copyRepeatTemplateElements=ORBEON.util.Dom.getElementsByName(controlValuesElement,"copy-repeat-template",xmlNamespace);var copyRepeatTemplateElementsLength=copyRepeatTemplateElements.length;for(var j=0;j<copyRepeatTemplateElementsLength;j++){var copyRepeatTemplateElement=copyRepeatTemplateElements[j];var repeatId=ORBEON.util.Dom.getAttribute(copyRepeatTemplateElement,"id");var parentIndexes=ORBEON.util.Dom.getAttribute(copyRepeatTemplateElement,"parent-indexes");var startSuffix=Number(ORBEON.util.Dom.getAttribute(copyRepeatTemplateElement,"start-suffix"));var endSuffix=Number(ORBEON.util.Dom.getAttribute(copyRepeatTemplateElement,"end-suffix"));var templateNodes=new Array();var delimiterTagName=null;var templateRepeatEnd=ORBEON.util.Dom.getElementById("repeat-end-"+repeatId);var templateNode=templateRepeatEnd.previousSibling;var nestedRepeatLevel=0;while(!(nestedRepeatLevel==0&&templateNode.nodeType==ELEMENT_TYPE&&ORBEON.util.Dom.hasClass(templateNode,"xforms-repeat-delimiter"))){var nodeCopy=templateNode.cloneNode(true);if(templateNode.nodeType==ELEMENT_TYPE){delimiterTagName=templateNode.tagName;if(ORBEON.util.Dom.hasClass(templateNode,"xforms-repeat-begin-end")&&templateNode.id.indexOf("repeat-begin-")==0){nestedRepeatLevel--}if(ORBEON.util.Dom.hasClass(templateNode,"xforms-repeat-begin-end")&&templateNode.id.indexOf("repeat-end-")==0){nestedRepeatLevel++}var nodeCopyClasses=nodeCopy.className.split(" ");var nodeCopyNewClasses=new Array();for(var nodeCopyClassIndex=0;nodeCopyClassIndex<nodeCopyClasses.length;nodeCopyClassIndex++){var currentClass=nodeCopyClasses[nodeCopyClassIndex];if(currentClass!="xforms-repeat-template"){nodeCopyNewClasses.push(currentClass)}}nodeCopy.className=nodeCopyNewClasses.join(" ")}templateNodes.push(nodeCopy);templateNode=templateNode.previousSibling}var newDelimiter=document.createElement(delimiterTagName);newDelimiter.className="xforms-repeat-delimiter";templateNodes.push(newDelimiter);templateNodes=templateNodes.reverse();var afterInsertionPoint;if(parentIndexes==""){var repeatEnd=ORBEON.util.Dom.getElementById("repeat-end-"+repeatId);var cursor=repeatEnd.previousSibling;while(!(cursor.nodeType==ELEMENT_TYPE&&ORBEON.util.Dom.hasClass(cursor,"xforms-repeat-delimiter")&&!ORBEON.util.Dom.hasClass(cursor,"xforms-repeat-template"))){cursor=cursor.previousSibling}afterInsertionPoint=cursor}else{var repeatEnd=ORBEON.util.Dom.getElementById("repeat-end-"+xformsAppendRepeatSuffix(repeatId,parentIndexes));afterInsertionPoint=repeatEnd}for(var suffix=startSuffix;suffix<=endSuffix;suffix++){for(var templateNodeIndex=0;templateNodeIndex<templateNodes.length;templateNodeIndex++){var templateNode=templateNodes[templateNodeIndex];var newTemplateNode;if(startSuffix==endSuffix||suffix==endSuffix){newTemplateNode=templateNodes[templateNodeIndex]}else{newTemplateNode=templateNodes[templateNodeIndex].cloneNode(true)}xformsAddSuffixToIds(newTemplateNode,parentIndexes==""?String(suffix):parentIndexes+XFORMS_SEPARATOR_2+suffix,nestedRepeatLevel);afterInsertionPoint.parentNode.insertBefore(newTemplateNode,afterInsertionPoint);ORBEON.xforms.Init.insertedElement(newTemplateNode)}}if(ORBEON.xforms.Globals.isRenderingEngineWebCore13){ORBEON.xforms.Init.registerListenersOnFormElements();ORBEON.xforms.Init.registerDraggableListenersOnRepeatElements()}}var deleteRepeatTemplateElements=ORBEON.util.Dom.getElementsByName(controlValuesElement,"delete-repeat-elements",xmlNamespace);var deleteRepeatTemplateElementsLength=deleteRepeatTemplateElements.length;for(var j=0;j<deleteRepeatTemplateElementsLength;j++){var deleteElementElement=deleteRepeatTemplateElements[j];var deleteId=ORBEON.util.Dom.getAttribute(deleteElementElement,"id");var parentIndexes=ORBEON.util.Dom.getAttribute(deleteElementElement,"parent-indexes");var count=ORBEON.util.Dom.getAttribute(deleteElementElement,"count");var repeatEnd=ORBEON.util.Dom.getElementById("repeat-end-"+xformsAppendRepeatSuffix(deleteId,parentIndexes));var lastElementToDelete;lastElementToDelete=repeatEnd.previousSibling;if(parentIndexes==""){while(true){if(lastElementToDelete.nodeType==ELEMENT_TYPE&&ORBEON.util.Dom.hasClass(lastElementToDelete,"xforms-repeat-delimiter")&&!ORBEON.util.Dom.hasClass(lastElementToDelete,"xforms-repeat-template")){break}lastElementToDelete=lastElementToDelete.previousSibling}lastElementToDelete=lastElementToDelete.previousSibling}for(var countIndex=0;countIndex<count;countIndex++){var nestedRepeatLevel=0;while(true){var wasDelimiter=false;if(lastElementToDelete.nodeType==ELEMENT_TYPE){if(ORBEON.util.Dom.hasClass(lastElementToDelete,"xforms-repeat-begin-end")&&lastElementToDelete.id.indexOf("repeat-end-")==0){nestedRepeatLevel++}else{if(ORBEON.util.Dom.hasClass(lastElementToDelete,"xforms-repeat-begin-end")&&lastElementToDelete.id.indexOf("repeat-begin-")==0){nestedRepeatLevel--}else{wasDelimiter=nestedRepeatLevel==0&&ORBEON.util.Dom.hasClass(lastElementToDelete,"xforms-repeat-delimiter")}}}var previous=lastElementToDelete.previousSibling;lastElementToDelete.parentNode.removeChild(lastElementToDelete);lastElementToDelete=previous;if(wasDelimiter){break}}}}}}for(var actionIndex=0;actionIndex<actionElement.childNodes.length;actionIndex++){if(xformsGetLocalName(actionElement.childNodes[actionIndex])=="itemsets"){var itemsetsElement=actionElement.childNodes[actionIndex];for(var j=0;j<itemsetsElement.childNodes.length;j++){if(xformsGetLocalName(itemsetsElement.childNodes[j])=="itemset"){var itemsetElement=itemsetsElement.childNodes[j];var itemsetTree=ORBEON.util.String.eval(ORBEON.util.Dom.getStringValue(itemsetElement));var controlId=ORBEON.util.Dom.getAttribute(itemsetElement,"id");var documentElement=ORBEON.util.Dom.getElementById(controlId);var documentElementClasses=documentElement.className.split(" ");if(ORBEON.util.Dom.hasClass(documentElement,"xforms-select1-open")){var newValues=new Array();for(var topIndex=0;topIndex<itemsetTree.length;topIndex++){newValues.push(itemsetTree[topIndex][1])}var textfield=ORBEON.util.Dom.getChildElementByIndex(documentElement,0);textfield.actb_keywords=newValues;var lastKeyCode=ORBEON.xforms.Globals.autoCompleteLastKeyCode[documentElement.id];if(lastKeyCode!=null){ORBEON.xforms.Globals.autoCompleteOpen[documentElement.id](lastKeyCode)}}else{if(ORBEON.util.Dom.hasClass(documentElement,"xforms-select-appearance-xxforms-tree")||ORBEON.util.Dom.hasClass(documentElement,"xforms-select1-appearance-xxforms-tree")){var yuiTree=ORBEON.xforms.Globals.treeYui[documentElement.id];var yuiRoot=yuiTree.getRoot();yuiTree.removeChildren(yuiRoot);yuiRoot.expand();ORBEON.xforms.Init._initTreeDivFromArray(documentElement,yuiTree,itemsetTree)}else{if(documentElement.tagName=="SELECT"){var options=documentElement.options;var selectedValueCount=0;var selectedValues=new Array();for(var k=0;k<options.length;k++){if(options[k].selected){selectedValues[selectedValueCount]=options[k].value;selectedValueCount++}}function generateOption(label,value,selectedValues){var selected=xformsArrayContains(selectedValues,value);return'<option value="'+ORBEON.util.String.escapeAttribute(value)+'"'+(selected?' selected="selected"':"")+">"+label+"</option>"}var sb=new Array();for(var topIndex=0;topIndex<itemsetTree.length;topIndex++){var itemElement=itemsetTree[topIndex];var label=itemElement[0];var value=itemElement[1];if(itemElement.length>2){sb[sb.length]='<optgroup label="'+ORBEON.util.String.escapeAttribute(label)+'">';for(var innerIndex=2;innerIndex<itemElement.length;innerIndex++){var itemElementOption=itemElement[innerIndex];sb[sb.length]=generateOption(itemElementOption[0],itemElementOption[1],selectedValues)}sb[sb.length]="</optgroup>"}else{sb[sb.length]=generateOption(label,value,selectedValues)}}if(ORBEON.xforms.Globals.isRenderingEngineTrident){documentElement.innerHTML="";documentElement.outerHTML=documentElement.outerHTML.substring(0,documentElement.outerHTML.indexOf("</SELECT>"))+sb.join("")+"</select>";documentElement=ORBEON.util.Dom.getElementByIdNoCache(controlId);ORBEON.xforms.Globals.idToElement[controlId]=documentElement;ORBEON.xforms.Init.registerListenersOnFormElement(documentElement)}else{documentElement.innerHTML=sb.join("")}}else{var template=documentElement.nextSibling;while(template.nodeType!=ELEMENT_TYPE){template=template.nextSibling}template=template.firstChild;while(template.nodeType!=ELEMENT_TYPE){template=template.nextSibling}var valueToChecked=new Array();while(documentElement.childNodes.length>0){var input=xformsGetInputUnderNode(documentElement.firstChild);valueToChecked[input.value]=input.checked;documentElement.removeChild(documentElement.firstChild)}var itemIndex=0;for(var k=0;k<itemsetTree.length;k++){var itemElement=itemsetTree[k];var templateClone=template.cloneNode(true);xformsStringReplace(templateClone,"$xforms-template-label$",itemElement[0]);xformsStringReplace(templateClone,"$xforms-template-value$",itemElement[1]);xformsStringReplace(templateClone,"$xforms-item-index$",itemIndex);documentElement.appendChild(templateClone);if(valueToChecked[itemElement[1]]==true){xformsGetInputUnderNode(templateClone).checked=true}itemIndex++}}}}}}}}var serverEventsIndex=-1;for(var actionIndex=0;actionIndex<actionElement.childNodes.length;actionIndex++){var actionName=xformsGetLocalName(actionElement.childNodes[actionIndex]);switch(actionName){case"control-values":var controlValuesElement=actionElement.childNodes[actionIndex];var controlElements=ORBEON.util.Dom.getElementsByName(controlValuesElement,"control",xmlNamespace);var controlElementslength=controlElements.length;for(var j=0;j<controlElementslength;j++){var controlElement=controlElements[j];var newControlValue=ORBEON.util.Dom.getStringValue(controlElement);var controlId=ORBEON.util.Dom.getAttribute(controlElement,"id");var staticReadonly=ORBEON.util.Dom.getAttribute(controlElement,"static");var relevant=ORBEON.util.Dom.getAttribute(controlElement,"relevant");var readonly=ORBEON.util.Dom.getAttribute(controlElement,"readonly");var required=ORBEON.util.Dom.getAttribute(controlElement,"required");var displayValue=ORBEON.util.Dom.getAttribute(controlElement,"display-value");var type=ORBEON.util.Dom.getAttribute(controlElement,"type");var documentElement=ORBEON.util.Dom.getElementById(controlId);if(documentElement==null){documentElement=ORBEON.util.Dom.getElementById("group-begin-"+controlId);if(documentElement==null){ORBEON.util.Utils.logMessage("Can't find element or iteration with ID '"+controlId+"'")}}var documentElementClasses=documentElement.className.split(" ");var isControl=ORBEON.util.Dom.hasClass(documentElement,"xforms-control");var previousServerValue=ORBEON.xforms.Globals.serverValue[controlId];if(!ORBEON.util.Dom.hasClass(documentElement,"xforms-upload")){ORBEON.xforms.Globals.serverValue[controlId]=newControlValue}var isStaticReadonly=ORBEON.util.Dom.hasClass(documentElement,"xforms-static");if(!isStaticReadonly&&staticReadonly=="true"){if(isControl){var parentElement=documentElement.parentNode;var newDocumentElement=document.createElement("span");newDocumentElement.setAttribute("id",controlId);newDocumentElement.classname=documentElementClasses.join(" ")+" xforms-static";parentElement.replaceChild(newDocumentElement,documentElement);var alertElement=ORBEON.xforms.Controls._getControlLabel(newDocumentElement,"xforms-alert");if(alertElement!=null){parentElement.removeChild(alertElement)}var hintLabel=ORBEON.xforms.Controls._getControlLabel(newDocumentElement,"xforms-hint");if(hintLabel!=null){parentElement.removeChild(hintLabel)}documentElement=newDocumentElement}else{ORBEON.util.Dom.addClass(documentElement,"xforms-static")}isStaticReadonly=true;documentElementClasses=documentElement.className.split(" ")}if(relevant!=null){var isRelevant=relevant=="true";ORBEON.xforms.Controls.setRelevant(documentElement,isRelevant);if(ORBEON.util.Dom.hasClass(documentElement,"xforms-textarea-appearance-xxforms-autosize")){ORBEON.xforms.Controls.autosizeTextarea(documentElement)}}if(required!=null){var isRequired=required=="true";if(isRequired){ORBEON.util.Dom.addClass(documentElement,"xforms-required")}else{ORBEON.util.Dom.removeClass(documentElement,"xforms-required")}}if(type!=null&&ORBEON.util.Dom.hasClass(documentElement,"xforms-input")){var isDateType=type=="{http://www.w3.org/2001/XMLSchema}date"||type=="{http://www.w3.org/2002/xforms}date";var isTimeType=type=="{http://www.w3.org/2001/XMLSchema}time"||type=="{http://www.w3.org/2002/xforms}time";var isDateTimeType=type=="{http://www.w3.org/2001/XMLSchema}dateTime"||type=="{http://www.w3.org/2002/xforms}dateTime";function removeAllTypeCSS(element){ORBEON.util.Dom.removeClass(element,"xforms-type-date");ORBEON.util.Dom.removeClass(element,"xforms-type-time");ORBEON.util.Dom.removeClass(element,"xforms-type-dateTime")}removeAllTypeCSS(documentElement);var firstInput=ORBEON.util.Dom.getChildElementByIndex(documentElement,0);removeAllTypeCSS(firstInput);var secondInput=ORBEON.util.Dom.getChildElementByIndex(documentElement,1);if(secondInput!=null){documentElement.removeChild(secondInput)}if(isDateType){ORBEON.util.Dom.addClass(documentElement,"xforms-type-date");ORBEON.util.Dom.addClass(firstInput,"xforms-type-date")}else{if(isTimeType){ORBEON.util.Dom.addClass(documentElement,"xforms-type-time");ORBEON.util.Dom.addClass(firstInput,"xforms-type-time")}else{if(isDateTimeType){ORBEON.util.Dom.addClass(documentElement,"xforms-type-dateTime");ORBEON.util.Dom.addClass(firstInput,"xforms-type-date");secondInput=document.createElement("input");secondInput.setAttribute("type","text");secondInput.className="xforms-input-input xforms-type-time";documentElement.appendChild(secondInput)}}}}if(readonly!=null&&!isStaticReadonly){ORBEON.xforms.Controls.setReadonly(documentElement,readonly=="true")}if(isControl){if(ORBEON.util.Dom.hasClass(documentElement,"xforms-upload")){var state=ORBEON.util.Dom.getAttribute(controlElement,"state");var filename=ORBEON.util.Dom.getAttribute(controlElement,"filename");var mediatype=ORBEON.util.Dom.getAttribute(controlElement,"mediatype");var size=ORBEON.util.Dom.getAttribute(controlElement,"size");ORBEON.xforms.Controls.setCurrentValue(documentElement,newControlValue,displayValue,previousServerValue,state,filename,mediatype,size)}else{ORBEON.xforms.Controls.setCurrentValue(documentElement,newControlValue,displayValue,previousServerValue)}}var isRequiredEmpty;if(!isStaticReadonly){isRequiredEmpty=ORBEON.xforms.Controls.updateRequiredEmpty(documentElement,newControlValue)}else{isRequiredEmpty=false}var newLabel=ORBEON.util.Dom.getAttribute(controlElement,"label");if(newLabel!=null){ORBEON.xforms.Controls.setLabelMessage(documentElement,newLabel)}var newHint=ORBEON.util.Dom.getAttribute(controlElement,"hint");if(newHint!=null){ORBEON.xforms.Controls.setHintMessage(documentElement,newHint)}var newHelp=ORBEON.util.Dom.getAttribute(controlElement,"help");if(newHelp!=null){ORBEON.xforms.Controls.setHelpMessage(documentElement,newHelp)}var newAlert=ORBEON.util.Dom.getAttribute(controlElement,"alert");if(newAlert!=null){ORBEON.xforms.Controls.setAlertMessage(documentElement,newAlert)}var newValid=ORBEON.util.Dom.getAttribute(controlElement,"valid");ORBEON.xforms.Controls.setValid(documentElement,newValid,isRequiredEmpty);if(ORBEON.util.Dom.hasClass(documentElement,"xforms-textarea")&&ORBEON.util.Dom.hasClass(documentElement,"xforms-mediatype-text-html")){ORBEON.xforms.Controls.updateHTMLAreaClasses(documentElement)}}var attributeElements=ORBEON.util.Dom.getElementsByName(controlValuesElement,"attribute",xmlNamespace);var attributeElementslength=attributeElements.length;for(var j=0;j<attributeElementslength;j++){var attributeElement=attributeElements[j];var newAttributeValue=ORBEON.util.Dom.getStringValue(attributeElement);var forAttribute=ORBEON.util.Dom.getAttribute(attributeElement,"for");var nameAttribute=ORBEON.util.Dom.getAttribute(attributeElement,"name");var htmlElement=ORBEON.util.Dom.getElementById(forAttribute);if(htmlElement!=null){if(ORBEON.xforms.Globals.isRenderingEngineTrident){if(nameAttribute=="class"){htmlElement.className=newAttributeValue}else{if(nameAttribute=="colspan"){htmlElement.colSpan=newAttributeValue}else{if(nameAttribute=="rowspan"){htmlElement.rowSpan=newAttributeValue}else{if(nameAttribute=="accesskey"){htmlElement.accessKey=newAttributeValue}else{if(nameAttribute=="tabindex"){htmlElement.tabIndex=newAttributeValue}else{htmlElement.setAttribute(nameAttribute,newAttributeValue)}}}}}}else{htmlElement.setAttribute(nameAttribute,newAttributeValue)}}}var textElements=ORBEON.util.Dom.getElementsByName(controlValuesElement,"text",xmlNamespace);var textElementslength=textElements.length;for(var j=0;j<textElementslength;j++){var textElement=textElements[j];var newTextValue=ORBEON.util.Dom.getStringValue(textElement);var forAttribute=ORBEON.util.Dom.getAttribute(textElement,"for");var htmlElement=ORBEON.util.Dom.getElementById(forAttribute);if(htmlElement!=null&&htmlElement.tagName.toLowerCase()=="title"){document.title=newTextValue}}var repeatIterationElements=ORBEON.util.Dom.getElementsByName(controlValuesElement,"repeat-iteration",xmlNamespace);var repeatIterationElementslength=repeatIterationElements.length;for(var j=0;j<repeatIterationElementslength;j++){var repeatIterationElement=repeatIterationElements[j];var repeatId=ORBEON.util.Dom.getAttribute(repeatIterationElement,"id");var iteration=ORBEON.util.Dom.getAttribute(repeatIterationElement,"iteration");var relevant=ORBEON.util.Dom.getAttribute(repeatIterationElement,"relevant");if(relevant!=null){ORBEON.xforms.Controls.setRepeatIterationRelevance(repeatId,iteration,relevant=="true"?true:false)}}break;case"divs":var divsElement=actionElement.childNodes[actionIndex];for(var j=0;j<divsElement.childNodes.length;j++){if(xformsGetLocalName(divsElement.childNodes[j])=="div"){var divElement=divsElement.childNodes[j];var controlId=ORBEON.util.Dom.getAttribute(divElement,"id");var visible=ORBEON.util.Dom.getAttribute(divElement,"visibility")=="visible";var neighbor=ORBEON.util.Dom.getAttribute(divElement,"neighbor");var yuiDialog=ORBEON.xforms.Globals.dialogs[controlId];var children=new Array();if(yuiDialog==null){var caseBeginId="xforms-case-begin-"+controlId;var caseBegin=ORBEON.util.Dom.getElementById(caseBeginId);var caseBeginParent=caseBegin.parentNode;var foundCaseBegin=false;for(var childId=0;caseBeginParent.childNodes.length;childId++){var cursor=caseBeginParent.childNodes[childId];if(!foundCaseBegin){if(cursor.id==caseBegin.id){foundCaseBegin=true}else{continue}}if(cursor.nodeType==ELEMENT_TYPE){if(cursor.id=="xforms-case-end-"+controlId){break}ORBEON.util.Dom.addClass(cursor,visible?"xforms-case-selected":"xforms-case-deselected");ORBEON.util.Dom.removeClass(cursor,visible?"xforms-case-deselected":"xforms-case-selected");children[children.length]=cursor}}}else{if(visible){ORBEON.xforms.Controls.showDialog(controlId,neighbor);children[0]=ORBEON.util.Dom.getElementById(controlId)}else{yuiDialog.hide();yuiDialog.element.style.display="none";if(ORBEON.xforms.Globals.dialogMinimalVisible[yuiDialog.element.id]){ORBEON.xforms.Globals.dialogMinimalVisible[yuiDialog.element.id]=false}}}if(children.length>0&&ORBEON.xforms.Globals.isRenderingEngineGecko&&!ORBEON.xforms.Globals.isFF3&&ORBEON.xforms.Globals.htmlAreaNames.length>0){for(var childIndex=0;childIndex<children.length;childIndex++){var child=children[childIndex];var textHTMLElements=YAHOO.util.Dom.getElementsByClassName("xforms-mediatype-text-html",null,child);if(textHTMLElements!=null&&textHTMLElements.length>0){for(var htmlElementIndex=0;htmlElementIndex<textHTMLElements.length;htmlElementIndex++){var htmlElement=textHTMLElements[htmlElementIndex];if(htmlElement.name!=null&&htmlElement.name!=""&&ORBEON.util.Dom.hasClass(htmlElement,"xforms-textarea")){var editor=FCKeditorAPI.GetInstance(htmlElement.name);if(editor!=null){try{editor.EditorDocument.designMode="on"}catch(e){}}}}}}}}}break;case"repeat-indexes":var repeatIndexesElement=actionElement.childNodes[actionIndex];var newRepeatIndexes=new Array();for(var j=0;j<repeatIndexesElement.childNodes.length;j++){if(xformsGetLocalName(repeatIndexesElement.childNodes[j])=="repeat-index"){var repeatIndexElement=repeatIndexesElement.childNodes[j];var repeatId=ORBEON.util.Dom.getAttribute(repeatIndexElement,"id");var newIndex=ORBEON.util.Dom.getAttribute(repeatIndexElement,"new-index");newRepeatIndexes[repeatId]=newIndex}}for(var repeatId in newRepeatIndexes){if(typeof repeatId=="string"){var children=ORBEON.xforms.Globals.repeatTreeParentToAllChildren[repeatId];if(children!=null){for(var childIndex in children){var child=children[childIndex];if(!newRepeatIndexes[child]){newRepeatIndexes[child]=ORBEON.xforms.Globals.repeatIndexes[child]}}}}}for(var repeatId in newRepeatIndexes){if(typeof repeatId=="string"){var oldIndex=ORBEON.xforms.Globals.repeatIndexes[repeatId];if(typeof oldIndex=="string"&&oldIndex!=0){var oldItemDelimiter=xformsFindRepeatDelimiter(repeatId,oldIndex);if(oldItemDelimiter!=null){var cursor=oldItemDelimiter.nextSibling;while(cursor.nodeType!=ELEMENT_TYPE||(!ORBEON.util.Dom.hasClass(cursor,"xforms-repeat-delimiter")&&!ORBEON.util.Dom.hasClass(cursor,"xforms-repeat-begin-end"))){if(cursor.nodeType==ELEMENT_TYPE){ORBEON.util.Dom.removeClass(cursor,xformsGetClassForRepeatId(repeatId))}cursor=cursor.nextSibling}}}}}for(var repeatId in newRepeatIndexes){var newIndex=newRepeatIndexes[repeatId];ORBEON.xforms.Globals.repeatIndexes[repeatId]=newIndex}for(var repeatId in newRepeatIndexes){if(typeof repeatId=="string"){var newIndex=newRepeatIndexes[repeatId];if(typeof newIndex=="string"&&newIndex!=0){var newItemDelimiter=xformsFindRepeatDelimiter(repeatId,newIndex);var cursor=newItemDelimiter.nextSibling;while(cursor.nodeType!=ELEMENT_TYPE||(!ORBEON.util.Dom.hasClass(cursor,"xforms-repeat-delimiter")&&!ORBEON.util.Dom.hasClass(cursor,"xforms-repeat-begin-end"))){if(cursor.nodeType==ELEMENT_TYPE){ORBEON.util.Dom.addClass(cursor,xformsGetClassForRepeatId(repeatId))}cursor=cursor.nextSibling}}}}break;case"server-events":serverEventsIndex=actionIndex;break;case"submission":var submissionElement=actionElement.childNodes[actionIndex];var showProcess=ORBEON.util.Dom.getAttribute(submissionElement,"show-progress");var replace=ORBEON.util.Dom.getAttribute(submissionElement,"replace");var target=ORBEON.util.Dom.getAttribute(submissionElement,"target");if(replace==null){replace="all"}if(serverEventsIndex!=-1){ORBEON.xforms.Globals.formServerEvents[formID].value=ORBEON.util.Dom.getStringValue(actionElement.childNodes[serverEventsIndex])}else{ORBEON.xforms.Globals.formServerEvents[formID].value=""}var requestForm=ORBEON.util.Dom.getElementById(formID);if(replace=="all"){if(showProcess!="false"){newDynamicStateTriggersReplace=true}if(target==null){requestForm.removeAttribute("target")}else{requestForm.target=target}requestForm.submit()}else{YAHOO.util.Connect.setForm(requestForm,true,true);var callback={upload:ORBEON.xforms.Server.handleUploadResponse,failure:ORBEON.xforms.Server.handleFailure};YAHOO.util.Connect.asyncRequest("POST",XFORMS_SERVER_URL,callback)}ORBEON.xforms.Globals.formServerEvents[formID].value="";break;case"message":var messageElement=actionElement.childNodes[actionIndex];var message=ORBEON.util.Dom.getStringValue(messageElement);if(ORBEON.util.Dom.getAttribute(messageElement,"level")=="modal"){alert(message)}break;case"load":var loadElement=actionElement.childNodes[actionIndex];var resource=ORBEON.util.Dom.getAttribute(loadElement,"resource");var show=ORBEON.util.Dom.getAttribute(loadElement,"show");var target=ORBEON.util.Dom.getAttribute(loadElement,"target");var showProcess=ORBEON.util.Dom.getAttribute(loadElement,"show-progress");if(show=="replace"){if(target==null){if(resource.charAt(0)!="#"&&showProcess!="false"){newDynamicStateTriggersReplace=true}try{window.location.href=resource}catch(e){}}else{window.open(resource,target)}}else{window.open(resource,"_blank")}break;case"setfocus":var setfocusElement=actionElement.childNodes[actionIndex];var controlId=ORBEON.util.Dom.getAttribute(setfocusElement,"control-id");ORBEON.xforms.Controls.setFocus(controlId);break;case"script":var scriptElement=actionElement.childNodes[actionIndex];var functionName=ORBEON.util.Dom.getAttribute(scriptElement,"name");var targetId=ORBEON.util.Dom.getAttribute(scriptElement,"target-id");var observerId=ORBEON.util.Dom.getAttribute(scriptElement,"observer-id");ORBEON.xforms.Server.callUserScript(functionName,targetId,observerId);break;case"help":var helpElement=actionElement.childNodes[actionIndex];var controlId=ORBEON.util.Dom.getAttribute(helpElement,"control-id");var control=ORBEON.util.Dom.getElementById(controlId);ORBEON.xforms.Controls.showHelp(control);break;case"offline":var offlineElement=actionElement.childNodes[actionIndex];var eventsElement=ORBEON.util.Dom.getElementsByName(offlineElement,"events",xmlNamespace)[0];var mappingsElement=ORBEON.util.Dom.getElementsByName(offlineElement,"mappings",xmlNamespace)[0];var replayResponse=ORBEON.util.Dom.getStringValue(eventsElement);var mappings=ORBEON.util.Dom.getStringValue(mappingsElement);ORBEON.xforms.Offline.takeOffline(replayResponse,formID,mappings)}}}}}}if(newDynamicStateTriggersReplace){xformsDisplayIndicator("loading");ORBEON.xforms.Globals.loadingOtherPage=true}}else{if(responseXML&&responseXML.documentElement&&responseXML.documentElement.tagName.indexOf("error")!=-1){var title=ORBEON.util.Dom.getStringValue(ORBEON.util.Dom.getElementsByName(responseXML.documentElement,"title",null)[0]);var details=ORBEON.util.Dom.getStringValue(ORBEON.util.Dom.getElementsByName(responseXML.documentElement,"body",null)[0]);ORBEON.xforms.Server.showError(title,details,formID)}else{ORBEON.xforms.Globals.lastRequestIsError=true;ORBEON.xforms.Server.showError("Server didn't respond with valid XML","Server didn't respond with valid XML",formID)}}}catch(e){ORBEON.xforms.Server.exceptionWhenTalkingToServer(e,formID)}ORBEON.xforms.Globals.changedIdsRequest={};ORBEON.xforms.Globals.requestInProgress=false;ORBEON.xforms.Globals.requestDocument="";ORBEON.xforms.Globals.executeEventFunctionQueued++;ORBEON.util.Utils.hideModalProgressPanel();ORBEON.xforms.Server.executeNextRequest(false)},callUserScript:function(functionName,targetId,observerId){var targetElement=ORBEON.util.Dom.getElementById(targetId);var observer=ORBEON.util.Dom.getElementById(observerId);var event={target:targetElement};var theFunction=eval(functionName);theFunction.call(observer,event)}};YAHOO.util.DDM.mode=YAHOO.util.DDM.INTERSECT;YAHOO.util.DragDropMgr.preventDefault=false;ORBEON.xforms.DnD={DraggableItem:function(C,A,B){ORBEON.xforms.DnD.DraggableItem.superclass.constructor.call(this,C,C.tagName,B);YAHOO.util.Dom.setStyle(C,"cursor","move")},getClosestMatch:function(E){var D=YAHOO.util.DDM.getBestMatch(E);var C=ORBEON.util.Utils.countOccurences(D.id.substring(D.id.indexOf(XFORMS_SEPARATOR_1)+1),XFORMS_SEPARATOR_2);for(var A=0;A<E.length;A++){var B=ORBEON.util.Utils.countOccurences(E[A].id.substring(E[A].id.indexOf(XFORMS_SEPARATOR_1)+1),XFORMS_SEPARATOR_2);if(B>C){D=E[A];C=B}else{if(B==C){if(D.getEl().overlap&&(D.getEl().overlap.getArea()<E[A].overlap.getArea())){D=E[A];C=B}}}}return D.getEl()}};YAHOO.extend(ORBEON.xforms.DnD.DraggableItem,YAHOO.util.DDProxy,{startDrag:function(A,F){var C=this.getDragEl();var B=this.getEl();var E=ORBEON.util.Dom.getChildElementByClass(B.parentNode,"xforms-repeat-begin-end");this.sourceControlID=E.id.substr(13);var D=B.id.indexOf(XFORMS_SEPARATOR_1);this.startPosition=(D!=-1)?B.id.substr(D+1):B.position.substr(B.position.indexOf(XFORMS_SEPARATOR_1)+1);YAHOO.util.Dom.setStyle(C,"opacity",0.67);C.innerHTML=B.innerHTML;C.className=B.className;YAHOO.util.Dom.setStyle(B,"visibility","hidden")},onDragDrop:function(D,E){var B;if("string"==typeof E){B=YAHOO.util.DDM.getElement(E)}else{B=ORBEON.xforms.DnD.getClosestMatch(E)}var A=this.getEl();var C=B.id.indexOf(XFORMS_SEPARATOR_1);this.endPosition=(C!=-1)?B.id.substr(C+1):B.position.substr(B.position.indexOf(XFORMS_SEPARATOR_1)+1)},endDrag:function(E){var G=this.getEl();var F=this.getDragEl();YAHOO.util.Dom.setStyle(F,"visibility","");var J=new YAHOO.util.Motion(F,{points:{to:YAHOO.util.Dom.getXY(G)}},0.2,YAHOO.util.Easing.easeOut);var B=F.id;var C=this.id;J.onComplete.subscribe(function(){YAHOO.util.Dom.setStyle(B,"visibility","hidden");YAHOO.util.Dom.setStyle(C,"visibility","")});J.animate();if(this.startPosition==null||this.endPosition==null){return }var I=YAHOO.util.Dom.getElementsByClassName("xforms-draggableRepeat")[0];if(I==null){var A;for(var H=0;H<document.forms.length;H++){var D=document.forms[H];if(ORBEON.util.Dom.hasClass(D,"xforms-form")){A=D;break}}var I=document.createElement("div");I.className="xforms-draggableRepeat";I.id=this.sourceControlID;A.appendChild(I)}else{I.id=this.sourceControlID}xformsFireEvents([xformsCreateEventArray(I,"xxforms-dnd",null,null,new Array("dnd-start",this.startPosition,"dnd-end",this.endPosition))],false)}});ORBEON.xforms.Offline={isOnline:true,hasGears:false,gearsDatabase:null,formStore:null,memoryOfflineEvents:[],mips:{},variables:{},controlIDToVariableName:{},encryptionKey:null,controlValues:null,typeRegExps:{"{http://www.w3.org/2001/XMLSchema}decimal":new RegExp("^[+-]?[0-9]+(\\.[0-9]+)?$","g"),"{http://www.w3.org/2001/XMLSchema}integer":new RegExp("^[+-]?[0-9]+$","g")},isGearsEnabled:function(){try{var A=typeof GearsFactory!="undefined"?new GearsFactory():new ActiveXObject("Gears.Factory")}catch(B){return false}},init:function(){if(window.google&&google.gears){return }var A=null;if(typeof GearsFactory!="undefined"){A=new GearsFactory()}else{try{A=new ActiveXObject("Gears.Factory");if(A.getBuildInfo().indexOf("ie_mobile")!=-1){A.privateSetGlobalObject(this)}}catch(D){if((typeof navigator.mimeTypes!="undefined")&&navigator.mimeTypes["application/x-googlegears"]){A=document.createElement("object");A.style.display="none";A.width=0;A.height=0;A.type="application/x-googlegears";document.documentElement.appendChild(A)}}}if(!A){return }if(!window.google){google={}}if(!google.gears){google.gears={factory:A}}ORBEON.xforms.Offline.hasGears=window.google&&google.gears;if(ORBEON.xforms.Offline.hasGears){var B=google.gears.factory.create("beta.database");ORBEON.xforms.Offline.gearsDatabase=B;B.open("orbeon.xforms");B.execute("create table if not exists Offline_Forms (url text, event_response text, form_id text, static_state text, dynamic_state text, mappings text, control_values text, offline_events text)").close();B.execute("create table if not exists Current_Password (encrypted_password text)").close();var C=google.gears.factory.create("beta.localserver");ORBEON.xforms.Offline.formStore=C.createStore("orbeon.form")}FunctionCallExpr.prototype.xpathfunctions["xxforms:if"]=function(E){var F=this.args[0].evaluate(E).booleanValue();return new StringValue(this.args[F?1:2].evaluate(E).stringValue())};FunctionCallExpr.prototype.xpathfunctions.matches=function(E){var F=this.args[0].evaluate(E).stringValue();var G=this.args[1].evaluate(E).stringValue();return new BooleanValue(new RegExp(G).test(F))}},reset:function(){ORBEON.xforms.Offline.init();var A=google.gears.factory.create("beta.localserver");A.removeStore("orbeon.form");ORBEON.xforms.Offline.gearsDatabase.execute("drop table if exists Events").close();ORBEON.xforms.Offline.gearsDatabase.execute("drop table if exists Offline_Forms").close();ORBEON.xforms.Offline.gearsDatabase.execute("drop table if exists Current_Password").close();window.google=null;document.cookie="orbeon.forms.encryption.password=; path=/; secure"},pageLoad:function(){ORBEON.xforms.Offline.init();if(ORBEON.xforms.Offline.hasGears){var resultSet=ORBEON.xforms.Offline.gearsDatabase.execute("select * from Offline_Forms where url = ?",[window.location.href]);ORBEON.xforms.Offline.isOnline=!resultSet.isValidRow();if(!ORBEON.xforms.Offline.isOnline){var initialEvents=ORBEON.xforms.Offline._decrypt(resultSet.fieldByName("event_response"),ORBEON.xforms.Offline.getEncryptionKey());var controlValues=resultSet.fieldByName("control_values");var formID=resultSet.fieldByName("form_id");var mappingsString=resultSet.fieldByName("mappings");var mappings=ORBEON.util.String.eval("({"+mappingsString+"})");ORBEON.xforms.Offline.mips=mappings.mips;ORBEON.xforms.Offline._setVariables(mappings.variables);var initialEventsXML=ORBEON.util.Dom.stringToDom(initialEvents);ORBEON.xforms.Globals.requestForm=ORBEON.util.Dom.getElementById(formID);ORBEON.xforms.Server.handleResponseDom(initialEventsXML,formID);controlValues=ORBEON.xforms.Offline._deserializerControlValues(controlValues);for(var controlID in controlValues){var controlValue=controlValues[controlID];var control=ORBEON.util.Dom.getElementById(controlID);ORBEON.xforms.Controls.setCurrentValue(control,controlValue)}ORBEON.xforms.Offline.controlValues=controlValues}else{ORBEON.xforms.Offline.controlValues={}}resultSet.close()}},getEncryptionKey:function(){if(ORBEON.xforms.Offline.encryptionKey!=null){return ORBEON.xforms.Offline.encryptionKey}else{var D=null;var A=document.cookie.split(";");for(var C=0;C<A.length;C++){var B=A[C];var E="orbeon.forms.encryption.password=";while(B.charAt(0)==" "){B=B.substring(1,B.length)}if(B.indexOf(E)==0){D=B.substring(E.length,B.length);break}}if(D==null||D==""){return null}else{ORBEON.xforms.Offline.encryptionKey=hexToByteArray(D);return ORBEON.xforms.Offline.encryptionKey}}},takeOffline:function(eventResponse,formID,mappings){ORBEON.xforms.Offline.init();var controlKeepValueIDs=[];var mappingsObject=ORBEON.util.String.eval("({"+mappings+"})");ORBEON.xforms.Offline.mips=mappingsObject.mips;ORBEON.xforms.Offline._setVariables(mappingsObject.variables);for(var variableName in mappingsObject.variables){var controlID=mappingsObject.variables[variableName].value;controlKeepValueIDs.push(controlID)}var controlValues={};for(var controlIndex=0;controlIndex<controlKeepValueIDs.length;controlIndex++){var controlID=controlKeepValueIDs[controlIndex];controlValues[controlID]=ORBEON.xforms.Controls.getCurrentValue(ORBEON.util.Dom.getElementById(controlID))}var controlValuesString=ORBEON.xforms.Offline._serializeControlValues(controlValues);var resultSet=ORBEON.xforms.Offline.gearsDatabase.execute("insert into Offline_Forms (url, event_response, form_id, static_state, dynamic_state, mappings, control_values, offline_events) values (?, ?, ?, ?, ?, ?, ?, ?)",[window.location.href,ORBEON.xforms.Offline._encrypt(eventResponse,ORBEON.xforms.Offline.getEncryptionKey()),formID,ORBEON.xforms.Globals.formStaticState[formID].value,ORBEON.xforms.Globals.formDynamicState[formID].value,mappings,controlValuesString,""]);resultSet.close();var htmlElements=[].concat(YAHOO.util.Selector.query("script"),YAHOO.util.Selector.query("link"),YAHOO.util.Selector.query("img"));var urlsToCapture=[window.location.href];for(var elementIndex=0;elementIndex<htmlElements.length;elementIndex++){var element=htmlElements[elementIndex];if(YAHOO.lang.isString(element.href)&&element.href!=""){urlsToCapture.push(element.href)}if(YAHOO.lang.isString(element.src)&&element.src!=""){urlsToCapture.push(element.src)}}var removeDupplicates=[];urlsToCapture=urlsToCapture.sort();for(var urlIndex=0;urlIndex<urlsToCapture.length;urlIndex++){if(urlIndex==0||urlsToCapture[urlIndex]!=urlsToCapture[urlIndex-1]){removeDupplicates.push(urlsToCapture[urlIndex])}}urlsToCapture=removeDupplicates;var removeAlreadyCaptured=[];for(var urlIndex=0;urlIndex<urlsToCapture.length;urlIndex++){var url=urlsToCapture[urlIndex];if(!ORBEON.xforms.Offline.formStore.isCaptured(url)){removeAlreadyCaptured.push(url)}}urlsToCapture=removeAlreadyCaptured;if(urlsToCapture.length!=0){ORBEON.xforms.Offline.formStore.capture(urlsToCapture,function(url,success,captureId){if(url==urlsToCapture[urlsToCapture.length-1]){ORBEON.xforms.Offline.isOnline=false}})}else{ORBEON.xforms.Offline.isOnline=false}},takeOnline:function(){ORBEON.xforms.Offline.init();var F=ORBEON.xforms.Offline.gearsDatabase.execute("select form_id, static_state, dynamic_state, offline_events from Offline_Forms where url = ?",[window.location.href]);var D=F.fieldByName("form_id");ORBEON.xforms.Globals.formDynamicState[D].value=F.fieldByName("dynamic_state");ORBEON.xforms.Globals.formStaticState[D].value=F.fieldByName("static_state");var H=F.fieldByName("offline_events");H=ORBEON.xforms.Offline._decrypt(H,ORBEON.xforms.Offline.getEncryptionKey());ORBEON.xforms.Offline.isOnline=true;if(H!=""){var G=H.split(" ");var I=[];for(var A=0;A<G.length;A++){var E=unescape(G[A]);var B=E.split(" ");for(var C=0;C<B.length;C++){B[C]=unescape(B[C])}I.push(new ORBEON.xforms.Server.Event(ORBEON.util.Dom.getElementById(B[0]),B[1],B[2],B[3],B[4],B[5],B[6]=="1",B[7]=="1"))}ORBEON.xforms.Server.fireEvents(I,false)}ORBEON.xforms.Offline.gearsDatabase.execute("delete from Offline_Forms where url = ?",[window.location.href]).close();ORBEON.xforms.Offline.formStore.remove(window.location.href);ORBEON.xforms.Document.dispatchEvent("$containing-document$","xxforms-online")},storeEvents:function(K){function H(L){return L==null?"":L}ORBEON.xforms.Offline.init();var E="";for(var A=0;A<K.length;A++){var B=K[A];var C=[H(B.form.id),H(B.targetId),H(B.otherId),H(B.value),H(B.eventName),B.bubbles?1:0,B.cancelable?1:0,B.ignoreErrors?1:0];var I="";for(var D=0;D<C.length;D++){if(D!=0){I+=" "}I+=escape(C[D])}if(E.length>0){E+=" "}E+=escape(I)}var J=ORBEON.xforms.Offline.gearsDatabase.execute("select offline_events from Offline_Forms where url = ?",[window.location.href]);var G=J.fieldByName("offline_events");if(G!=""){G=ORBEON.xforms.Offline._decrypt(G,ORBEON.xforms.Offline.getEncryptionKey());G+=" "}G+=E;G=ORBEON.xforms.Offline._encrypt(G,ORBEON.xforms.Offline.getEncryptionKey());var F=ORBEON.xforms.Offline._serializeControlValues(ORBEON.xforms.Offline.controlValues);ORBEON.xforms.Offline.gearsDatabase.execute("update Offline_Forms set control_values = ?, offline_events = ? where url = ?",[F,G,window.location.href]).close()},loadFormInIframe:function(A,B){var D="orbeon-offline-iframe";var C=ORBEON.util.Dom.getElementByIdNoCache(D);if(C!=null){C.parentNode.removeChild(C)}C=document.createElement("iframe");C.id=D;C.name=D;C.style.display="none";document.body.appendChild(C);window.childWindowOrbeonReady=function(){B(C)};C.src=A},evaluateMIPs:function(){function A(I,H,K,F,J,M,C){if(K(I)!=M){F(I,M);if(J){for(var N=0;N<H.relevant.inherited.length;N++){var E=J[N];var O=ORBEON.util.Dom.getElementById(E);if(O==null){O=ORBEON.util.Dom.getElementById("group-begin-"+E)}if(C&&O==null){var L=Math.max(E.lastIndexOf(XFORMS_SEPARATOR_1),E.lastIndexOf(XFORMS_SEPARATOR_2));var G=E.substring(0,L);var D=E.substring(L+1);ORBEON.xforms.Controls.setRepeatIterationRelevance(G,D,M)}else{F(O,M)}}}}}function B(C,D){try{return xpathParse(C).evaluate(D).value}catch(E){ORBEON.util.Utils.logMessage("Error evaluating XPath expression "+C);return null}}xformsDisplayIndicator("loading");window.setTimeout(function(){var K=document.createElement("dummy");var R=new ExprContext(K);for(var O in ORBEON.xforms.Offline.variables){var G=ORBEON.xforms.Offline.variables[O].value;var P=ORBEON.xforms.Controls.getCurrentValue(ORBEON.util.Dom.getElementById(G));R.setVariable(O,P)}for(var G in ORBEON.xforms.Offline.mips){var H=ORBEON.xforms.Offline.mips[G];var I=ORBEON.util.Dom.getElementById(G);var J=ORBEON.xforms.Controls.getCurrentValue(I);ORBEON.util.Dom.setStringValue(K,J);if(H.calculate){var D=B(H.calculate.value,R);if(D!=null){ORBEON.xforms.Controls.setCurrentValue(I,D);var O=ORBEON.xforms.Offline.controlIDToVariableName[G];if(O!=null){R.setVariable(O,D)}}}var Q=true;if(H.constraint){var C=B("boolean("+H.constraint.value+")",R);if(C!=null){Q=Q&&C}}var L;if(H.required){var M=B(H.required.value,R);if(M!=null){L=J==""&&M}}if(H.relevant){var F=B("boolean("+H.relevant.value+")",R);if(F!=null){A(I,H,ORBEON.xforms.Controls.isRelevant,ORBEON.xforms.Controls.setRelevant,H.relevant.inherited,F,true)}}if(H.readonly){var E=B("boolean("+H.readonly.value+")",R);if(E!=null){A(I,H,ORBEON.xforms.Controls.isReadonly,ORBEON.xforms.Controls.setReadonly,H.readonly.inherited,E,false)}}if(H.type){var N=ORBEON.xforms.Offline.typeRegExps[H.type.value];if(N!=null){if(!J.match(N)){Q=false}}}ORBEON.xforms.Controls.setValid(I,Q?"true":"false",L)}xformsDisplayIndicator("none")},ORBEON.util.Utils.getProperty(INTERNAL_SHORT_DELAY_PROPERTY))},_serializeControlValues:function(B){var A="";for(controlID in B){if(A!=""){A+=" "}A+=escape(controlID)+" "+escape(B[controlID])}A=ORBEON.xforms.Offline._encrypt(A,ORBEON.xforms.Offline.getEncryptionKey());return A},_deserializerControlValues:function(A){A=ORBEON.xforms.Offline._decrypt(A,ORBEON.xforms.Offline.getEncryptionKey());var D=A.split(" ");var F={};for(var B=0;B<D.length/2;B++){var C=unescape(D[B*2]);var E=unescape(D[B*2+1]);F[C]=E}return F},_setVariables:function(D){ORBEON.xforms.Offline.variables=D;var B={};for(var A in D){var C=D[A].value;B[C]=A}ORBEON.xforms.Offline.controlIDToVariableName=B},_encrypt:function(B,A){return A==null?B:B==""?B:byteArrayToHex(rijndaelEncrypt(B,A,"ECB"))},_decrypt:function(B,A){return A==null?B:B==""?B:byteArrayToString(rijndaelDecrypt(hexToByteArray(B),A,"ECB"))}};function xformsIsDefined(A){return typeof A!="undefined"}function xformsDispatchEvent(C,A){if(C.dispatchEvent){var B=document.createEvent("HTMLEvents");B.initEvent(A.toLowerCase(),true,true);C.dispatchEvent(B)}else{C.fireEvent("on"+A)}}function xformsPreventDefault(A){if(A.preventDefault){A.preventDefault()}else{return false}}function xformsArrayContains(C,B){for(var A=0;A<C.length;A++){if(C[A]==B){return true}}return false}function xformsStringReplaceWorker(C,E,B){switch(C.nodeType){case ELEMENT_TYPE:for(var A=0;A<C.attributes.length;A++){var D=new String(C.attributes[A].value).replace(E,B);if(D!=C.attributes[A].value){C.setAttribute(C.attributes[A].name,D)}}for(var A=0;A<C.childNodes.length;A++){xformsStringReplaceWorker(C.childNodes[A],E,B)}break;case TEXT_TYPE:var D=new String(C.nodeValue).replace(E,B);if(D!=C.nodeValue){C.nodeValue=D}break}}function xformsStringReplace(B,C,A){var D=new RegExp(C.replace(new RegExp("\\$","g"),"\\$"),"g");xformsStringReplaceWorker(B,D,A)}function xformsNormalizeEndlines(A){return A.replace(XFORMS_REGEXP_CR,"")}function xformsAppendRepeatSuffix(B,A){if(A==""){return B}if(A.charAt(0)==XFORMS_SEPARATOR_2){A=A.substring(1)}if(B.indexOf(XFORMS_SEPARATOR_1)==-1){return B+XFORMS_SEPARATOR_1+A}else{return B+XFORMS_SEPARATOR_2+A}}function xformsFindRepeatDelimiter(J,F){var A="";var G=J;while(true){var H=ORBEON.xforms.Globals.repeatTreeChildToParent[G];if(H==null){break}var E=ORBEON.xforms.Globals.repeatTreeChildToParent[H];A=(E==null?XFORMS_SEPARATOR_1:XFORMS_SEPARATOR_2)+ORBEON.xforms.Globals.repeatIndexes[H]+A;G=H}var B="repeat-begin-"+J+A;var D=ORBEON.util.Dom.getElementById(B);if(!D){return null}var I=D;var C=0;while(true){while(I.nodeType!=ELEMENT_TYPE||!ORBEON.util.Dom.hasClass(I,"xforms-repeat-delimiter")){I=I.nextSibling;if(!I){return null}}C++;if(C==F){break}I=I.nextSibling}return I}function xformsLog(E){var C=ORBEON.util.Dom.getElementById("xforms-debug");if(C==null){var D;var B;if(navigator.appName.indexOf("Microsoft")!=-1){D=document.body.offsetWidth;B=document.body.offsetHeight}else{D=window.innerWidth;B=window.innerHeight}C=document.createElement("div");C.className="xforms-debug";C.id="xforms-debug";C.style.width=ORBEON.util.Utils.getProperty(DEBUG_WINDOW_WIDTH_PROPERTY)+"px";C.style.left=D-(ORBEON.util.Utils.getProperty(DEBUG_WINDOW_WIDTH_PROPERTY)+50)+"px";C.style.height=ORBEON.util.Utils.getProperty(DEBUG_WINDOW_HEIGHT_PROPERTY)+"px";C.style.top=B-(ORBEON.util.Utils.getProperty(DEBUG_WINDOW_HEIGHT_PROPERTY)+20)+"px";var A=document.createElement("BUTTON");A.appendChild(document.createTextNode("Clear"));C.appendChild(A);document.body.insertBefore(C,document.body.firstChild);YAHOO.util.Event.addListener(A,"click",function(F){var G=getEventTarget(F);while(G.nextSibling){G.parentNode.removeChild(G.nextSibling)}return false});YAHOO.util.Event.addListener(C,"mousedown",function(F){ORBEON.xforms.Globals.debugDiv=getEventTarget(F);return false});YAHOO.util.Event.addListener(document,"mouseup",function(F){ORBEON.xforms.Globals.debugDiv=null;return false});YAHOO.util.Event.addListener(document,"mousemove",function(F){if(ORBEON.xforms.Globals.debugDiv){ORBEON.xforms.Globals.debugDiv.style.left=F.clientX;ORBEON.xforms.Globals.debugDiv.style.top=F.clientY}return false})}text=E===undefined?"undefined":E===null?"null":typeof E=="string"&&E==""?"empty string":E.nodeType&&E.nodeType==ORBEON.util.Dom.ELEMENT_TYPE?"Element "+E.tagName:E.nodeType&&E.nodeType==ORBEON.util.Dom.TEXT_TYPE?"Text: "+ORBEON.util.Dom.getStringValue(E):E;C.innerHTML+=text+" | "}function xformsLogTime(B){var C=ORBEON.xforms.Globals.debugLastTime;var A=new Date().getTime();ORBEON.xforms.Globals.debugLastTime=A;xformsLog((A-C)+": "+B)}function xformsLogProperties(A){var B="[";var D=true;for(var C in A){if(D){D=false}else{B+=", "}B+=C+": "+A[C]}B+="]";xformsLog(B)}function xformsDisplayIndicator(B){var A=ORBEON.xforms.Globals.requestForm;var C=A.id;switch(B){case"loading":if(ORBEON.xforms.Globals.formLoadingLoadingOverlay[C]!=null){ORBEON.xforms.Globals.formLoadingLoadingOverlay[C].cfg.setProperty("visible",true);ORBEON.xforms.Controls.updateLoadingPosition(C)}if(ORBEON.xforms.Globals.formLoadingNone[C]!=null){ORBEON.xforms.Globals.formLoadingNone[C].style.display="block"}break;case"none":if(!ORBEON.xforms.Globals.loadingOtherPage){if(ORBEON.xforms.Globals.formLoadingLoadingOverlay[C]!=null){ORBEON.xforms.Globals.formLoadingLoadingOverlay[C].cfg.setProperty("visible",false)}if(ORBEON.xforms.Globals.formLoadingNone[C]!=null){ORBEON.xforms.Globals.formLoadingNone[C].style.display="block"}}break}}function xformsGetFromClientState(E,D){var A=ORBEON.xforms.Globals.formClientState[E];var B=A.value.split("&");for(var C=0;C<B.length;C=C+2){if(B[C]==D){return unescape(B[C+1])}}return null}function xformsStoreInClientState(G,D,F){var A=ORBEON.xforms.Globals.formClientState[G];var B=A.value==""?new Array():A.value.split("&");var E=false;for(var C=0;C<B.length;C=C+2){if(B[C]==D){B[C+1]=escape(F);E=true;break}}if(!E){B.push(D);B.push(escape(F))}A.value=B.join("&")}function xformsValueChanged(G,A){var F=ORBEON.xforms.Controls.getCurrentValue(G);var C=F!=G.previousValue;var D=ORBEON.util.Dom.hasClass(G,"xforms-upload");if(C&&!D){G.previousValue=F;var B=new Array(xformsCreateEventArray(G,"xxforms-value-change-with-focus-change",F,A));var E=A==null&&ORBEON.util.Dom.hasClass(G,"xforms-incremental");xformsFireEvents(B,E)}return C}function xformsHandleClick(A){var B=getEventTarget(A);if((ORBEON.util.Dom.hasClass(B,"xforms-trigger")||ORBEON.util.Dom.hasClass(B,"xforms-trigger"))&&!ORBEON.util.Dom.hasClass(B,"xforms-readonly")){xformsFireEvents(new Array(xformsCreateEventArray(B,"DOMActivate",null)),false)}return false}function xformsHandleAutoCompleteMouseChange(A){A.parentNode.lastKeyCode=-1;A.parentNode.value=A.value;xformsValueChanged(A.parentNode,null)}function xformsFireEvents(K,G){var C=[];for(var A=0;A<K.length;A++){var B=K[A];var H=B[0];var E=B[1];var J=B[2];var F=B[3];var I=B[4];var D=H==undefined?null:ORBEON.xforms.Controls.getForm(H);if(H==undefined||D!=null){C.push(new ORBEON.xforms.Server.Event(H==undefined?null:ORBEON.xforms.Controls.getForm(H),H==undefined?null:H.id,F==undefined?null:F.id,J,E,null,null,I==undefined?null:I))}}ORBEON.xforms.Server.fireEvents(C,G)}function xformsCreateEventArray(D,B,C,A,E){return new Array(D,B,C,A,E)}function getEventTarget(A){if(A&&A.LinkedField){return A.LinkedField}else{A=A?A:window.event;var B=A.srcElement?A.srcElement:A.target;if(B.xformsElement){return B.xformsElement}else{if(B.ownerDocument.xformsElement){return B.ownerDocument.xformsElement}else{return B}}}}function xformsHtmlEditorChange(A){A.LinkedField.value=A.GetXHTML();if(ORBEON.util.Dom.hasClass(A.LinkedField,"xforms-incremental")){xformsValueChanged(A.LinkedField,null)}}function FCKeditor_OnComplete(B){B.EditorDocument.xformsElement=B.LinkedField;if(ORBEON.util.Dom.hasClass(B.LinkedField,"xforms-incremental")){B.Events.AttachEvent("OnSelectionChange",xformsHtmlEditorChange)}YAHOO.util.Event.addListener(B.EditorDocument,"focus",ORBEON.xforms.Events.focus);YAHOO.util.Event.addListener(B.EditorDocument,"blur",ORBEON.xforms.Events.blur);YAHOO.util.Event.addListener(B.EditorDocument,"focusin",ORBEON.xforms.Events.focus);YAHOO.util.Event.addListener(B.EditorDocument,"focusout",ORBEON.xforms.Events.blur);if(ORBEON.xforms.Globals.fckEditorsToLoad.length>0){var A=ORBEON.xforms.Globals.fckEditorsToLoad.shift();A.ReplaceTextarea();ORBEON.xforms.Controls.updateHTMLAreaClasses(ORBEON.util.Dom.getElementById(A.InstanceName))}else{ORBEON.xforms.Globals.fckEditorLoading=false;if(typeof xformsPageLoadedServer!="undefined"){xformsPageLoadedServer()}}}function xformsGetLocalName(A){if(A.nodeType==1){return A.tagName.indexOf(":")==-1?A.tagName:A.tagName.substr(A.tagName.indexOf(":")+1)}else{return null}}function xformsAddSuffixToIds(G,F,D){var H=F;for(var I=0;I<D;I++){H+=XFORMS_SEPARATOR_2+"1"}if(G.id){G.id=xformsAppendRepeatSuffix(G.id,H);ORBEON.xforms.Globals.idToElement[G.id]=G}if(G.htmlFor){G.htmlFor=xformsAppendRepeatSuffix(G.htmlFor,H)}if(G.name){var J=xformsAppendRepeatSuffix(G.name,H);if(G.tagName.toLowerCase()=="input"&&G.type.toLowerCase()=="radio"&&ORBEON.xforms.Globals.isRenderingEngineTrident){var K=document.createElement("<"+G.tagName+" name='"+J+"'>");for(var B=0;B<G.attributes.length;B++){var C=G.attributes[B];if(C.nodeName.toLowerCase()!="name"&&C.nodeName.toLowerCase()!="height"&&C.nodeValue){K.setAttribute(C.nodeName,C.nodeValue)}}YAHOO.util.Event.addListener(K,"focus",ORBEON.xforms.Events.focus);YAHOO.util.Event.addListener(K,"blur",ORBEON.xforms.Events.blur);YAHOO.util.Event.addListener(K,"change",ORBEON.xforms.Events.change);G.replaceNode(K)}else{G.name=J}}for(var E=0;E<G.childNodes.length;E++){var A=G.childNodes[E];if(A.nodeType==ELEMENT_TYPE){if(A.id&&A.id.indexOf("repeat-end-")==0){D--}xformsAddSuffixToIds(A,F,D);if(A.id&&A.id.indexOf("repeat-begin-")==0){D++}}}}function xformsGetInputUnderNode(B){if(B.nodeType==ELEMENT_TYPE){if(B.tagName.toLowerCase()=="input"){return B}else{for(var C=0;C<B.childNodes.length;C++){var A=xformsGetInputUnderNode(B.childNodes[C]);if(A!=null){return A}}}}else{return null}}function xformsGetClassForRepeatId(B){var C=1;var A=B;while(true){A=ORBEON.xforms.Globals.repeatTreeChildToParent[A];if(A==null){break}C=(C==4)?1:C+1}return"xforms-repeat-selected-item-"+C}function xformsDisplayLoading(){if(ORBEON.xforms.Globals.requestInProgress==true){xformsDisplayIndicator("loading")}}if(!ORBEON.xforms.Globals.pageLoadedRegistered){ORBEON.xforms.Globals.pageLoadedRegistered=true;YAHOO.util.Event.onDOMReady(ORBEON.xforms.Init.document);ORBEON.xforms.Globals.debugLastTime=new Date().getTime();ORBEON.xforms.Globals.lastEventSentTime=new Date().getTime()};
