// This file was produced by Orbeon Forms dev-post-3.7.1.200909111000
/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.6.0
*/
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.6.0",build:"1321"});
/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.6.0
*/
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};var K=YAHOO.env.ua.ie?"focusin":"focus";var L=YAHOO.env.ua.ie?"focusout":"blur";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,CAPTURE:7,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 M=this;var N=function(){M._tryPreloadAttach();};this._interval=setInterval(N,this.POLL_INTERVAL);}},onAvailable:function(R,O,S,Q,P){var M=(YAHOO.lang.isString(R))?[R]:R;for(var N=0;N<M.length;N=N+1){F.push({id:M[N],fn:O,obj:S,override:Q,checkReady:P});}C=this.POLL_RETRYS;this.startInterval();},onContentReady:function(O,M,P,N){this.onAvailable(O,M,P,N,true);},onDOMReady:function(M,O,N){if(this.DOMReady){setTimeout(function(){var P=window;if(N){if(N===true){P=O;}else{P=N;}}M.call(P,"DOMReady",[],O);},0);}else{this.DOMReadyEvent.subscribe(M,O,N);}},_addListener:function(O,M,X,S,N,a){if(!X||!X.call){return false;}if(this._isValidCollection(O)){var Y=true;for(var T=0,V=O.length;T<V;++T){Y=this._addListener(O[T],M,X,S,N,a)&&Y;}return Y;}else{if(YAHOO.lang.isString(O)){var R=this.getEl(O);if(R){O=R;}else{this.onAvailable(O,function(){YAHOO.util.Event._addListener(O,M,X,S,N,a);});return true;}}}if(!O){return false;}if("unload"==M&&S!==this){J[J.length]=[O,M,X,S,N,a];return true;}var b=O;if(N){if(N===true){b=S;}else{b=N;}}var P=function(c){return X.call(b,YAHOO.util.Event.getEvent(c,O),S);};var Z=[O,M,X,P,b,S,N,a];var U=I.length;I[U]=Z;if(this.useLegacyEvent(O,M)){var Q=this.getLegacyIndex(O,M);if(Q==-1||O!=G[Q][0]){Q=G.length;B[O.id+M]=Q;G[Q]=[O,M,O["on"+M]];E[Q]=[];O["on"+M]=function(c){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(c),Q);};}E[Q].push(Z);}else{try{this._simpleAdd(O,M,P,a);}catch(W){this.lastError=W;this._removeListener(O,M,X,a);return false;}}return true;},addListener:function(O,Q,N,P,M){return this._addListener(O,Q,N,P,M,false);},addFocusListener:function(O,N,P,M){return this._addListener(O,K,N,P,M,true);},removeFocusListener:function(N,M){return this._removeListener(N,K,M,true);},addBlurListener:function(O,N,P,M){return this._addListener(O,L,N,P,M,true);},removeBlurListener:function(N,M){return this._removeListener(N,L,M,true);},fireLegacyEvent:function(Q,O){var S=true,M,U,T,V,R;U=E[O].slice();for(var N=0,P=U.length;N<P;++N){T=U[N];if(T&&T[this.WFN]){V=T[this.ADJ_SCOPE];R=T[this.WFN].call(V,Q);S=(S&&R);}}M=G[O];if(M&&M[2]){M[2](Q);}return S;},getLegacyIndex:function(N,O){var M=this.generateId(N)+O;if(typeof B[M]=="undefined"){return -1;}else{return B[M];}},useLegacyEvent:function(M,N){return(this.webkit&&this.webkit<419&&("click"==N||"dblclick"==N));},_removeListener:function(N,M,V,Y){var Q,T,X;if(typeof N=="string"){N=this.getEl(N);}else{if(this._isValidCollection(N)){var W=true;for(Q=N.length-1;Q>-1;Q--){W=(this._removeListener(N[Q],M,V,Y)&&W);}return W;}}if(!V||!V.call){return this.purgeElement(N,false,M);}if("unload"==M){for(Q=J.length-1;Q>-1;Q--){X=J[Q];if(X&&X[0]==N&&X[1]==M&&X[2]==V){J.splice(Q,1);return true;}}return false;}var R=null;var S=arguments[4];if("undefined"===typeof S){S=this._getCacheIndex(N,M,V);}if(S>=0){R=I[S];}if(!N||!R){return false;}if(this.useLegacyEvent(N,M)){var P=this.getLegacyIndex(N,M);var O=E[P];if(O){for(Q=0,T=O.length;Q<T;++Q){X=O[Q];if(X&&X[this.EL]==N&&X[this.TYPE]==M&&X[this.FN]==V){O.splice(Q,1);break;}}}}else{try{this._simpleRemove(N,M,R[this.WFN],Y);}catch(U){this.lastError=U;return false;}}delete I[S][this.WFN];delete I[S][this.FN];
I.splice(S,1);return true;},removeListener:function(N,O,M){return this._removeListener(N,O,M,false);},getTarget:function(O,N){var M=O.target||O.srcElement;return this.resolveTextNode(M);},resolveTextNode:function(N){try{if(N&&3==N.nodeType){return N.parentNode;}}catch(M){}return N;},getPageX:function(N){var M=N.pageX;if(!M&&0!==M){M=N.clientX||0;if(this.isIE){M+=this._getScrollLeft();}}return M;},getPageY:function(M){var N=M.pageY;if(!N&&0!==N){N=M.clientY||0;if(this.isIE){N+=this._getScrollTop();}}return N;},getXY:function(M){return[this.getPageX(M),this.getPageY(M)];},getRelatedTarget:function(N){var M=N.relatedTarget;if(!M){if(N.type=="mouseout"){M=N.toElement;}else{if(N.type=="mouseover"){M=N.fromElement;}}}return this.resolveTextNode(M);},getTime:function(O){if(!O.time){var N=new Date().getTime();try{O.time=N;}catch(M){this.lastError=M;return N;}}return O.time;},stopEvent:function(M){this.stopPropagation(M);this.preventDefault(M);},stopPropagation:function(M){if(M.stopPropagation){M.stopPropagation();}else{M.cancelBubble=true;}},preventDefault:function(M){if(M.preventDefault){M.preventDefault();}else{M.returnValue=false;}},getEvent:function(O,M){var N=O||window.event;if(!N){var P=this.getEvent.caller;while(P){N=P.arguments[0];if(N&&Event==N.constructor){break;}P=P.caller;}}return N;},getCharCode:function(N){var M=N.keyCode||N.charCode||0;if(YAHOO.env.ua.webkit&&(M in D)){M=D[M];}return M;},_getCacheIndex:function(Q,R,P){for(var O=0,N=I.length;O<N;O=O+1){var M=I[O];if(M&&M[this.FN]==P&&M[this.EL]==Q&&M[this.TYPE]==R){return O;}}return -1;},generateId:function(M){var N=M.id;if(!N){N="yuievtautoid-"+A;++A;M.id=N;}return N;},_isValidCollection:function(N){try{return(N&&typeof N!=="string"&&N.length&&!N.tagName&&!N.alert&&typeof N[0]!=="undefined");}catch(M){return false;}},elCache:{},getEl:function(M){return(typeof M==="string")?document.getElementById(M):M;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(N){if(!H){H=true;var M=YAHOO.util.Event;M._ready();M._tryPreloadAttach();}},_ready:function(N){var M=YAHOO.util.Event;if(!M.DOMReady){M.DOMReady=true;M.DOMReadyEvent.fire();M._simpleRemove(document,"DOMContentLoaded",M._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 S=!H;if(!S){S=(C>0&&F.length>0);}var R=[];var T=function(V,W){var U=V;if(W.override){if(W.override===true){U=W.obj;}else{U=W.override;}}W.fn.call(U,W.obj);};var N,M,Q,P,O=[];for(N=0,M=F.length;N<M;N=N+1){Q=F[N];if(Q){P=this.getEl(Q.id);if(P){if(Q.checkReady){if(H||P.nextSibling||!S){O.push(Q);F[N]=null;}}else{T(P,Q);F[N]=null;}}else{R.push(Q);}}}for(N=0,M=O.length;N<M;N=N+1){Q=O[N];T(this.getEl(Q.id),Q);}C--;if(S){for(N=F.length-1;N>-1;N--){Q=F[N];if(!Q||!Q.id){F.splice(N,1);}}this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;},purgeElement:function(Q,R,T){var O=(YAHOO.lang.isString(Q))?this.getEl(Q):Q;var S=this.getListeners(O,T),P,M;if(S){for(P=S.length-1;P>-1;P--){var N=S[P];this._removeListener(O,N.type,N.fn,N.capture);}}if(R&&O&&O.childNodes){for(P=0,M=O.childNodes.length;P<M;++P){this.purgeElement(O.childNodes[P],R,T);}}},getListeners:function(O,M){var R=[],N;if(!M){N=[I,J];}else{if(M==="unload"){N=[J];}else{N=[I];}}var T=(YAHOO.lang.isString(O))?this.getEl(O):O;for(var Q=0;Q<N.length;Q=Q+1){var V=N[Q];if(V){for(var S=0,U=V.length;S<U;++S){var P=V[S];if(P&&P[this.EL]===T&&(!M||M===P[this.TYPE])){R.push({type:P[this.TYPE],fn:P[this.FN],obj:P[this.OBJ],adjust:P[this.OVERRIDE],scope:P[this.ADJ_SCOPE],capture:P[this.CAPTURE],index:S});}}}}return(R.length)?R:null;},_unload:function(S){var M=YAHOO.util.Event,P,O,N,R,Q,T=J.slice();for(P=0,R=J.length;P<R;++P){N=T[P];if(N){var U=window;if(N[M.ADJ_SCOPE]){if(N[M.ADJ_SCOPE]===true){U=N[M.UNLOAD_OBJ];}else{U=N[M.ADJ_SCOPE];}}N[M.FN].call(U,M.getEvent(S,N[M.EL]),N[M.UNLOAD_OBJ]);T[P]=null;N=null;U=null;}}J=null;if(I){for(O=I.length-1;O>-1;O--){N=I[O];if(N){M._removeListener(N[M.EL],N[M.TYPE],N[M.FN],N[M.CAPTURE],O);}}N=null;}G=null;M._simpleRemove(window,"unload",M._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var M=document.documentElement,N=document.body;if(M&&(M.scrollTop||M.scrollLeft)){return[M.scrollTop,M.scrollLeft];}else{if(N){return[N.scrollTop,N.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(O,P,N,M){O.addEventListener(P,N,(M));};}else{if(window.attachEvent){return function(O,P,N,M){O.attachEvent("on"+P,N);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(O,P,N,M){O.removeEventListener(P,N,(M));};}else{if(window.detachEvent){return function(N,O,M){N.detachEvent("on"+O,M);};}else{return function(){};}}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;EU.onFocus=EU.addFocusListener;EU.onBlur=EU.addBlurListener;
/* 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.6.0",build:"1321"});
/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.6.0
*/
(function(){var B=YAHOO.util,F=YAHOO.lang,L,J,K={},G={},N=window.document;YAHOO.env._id_counter=YAHOO.env._id_counter||0;var C=YAHOO.env.ua.opera,M=YAHOO.env.ua.webkit,A=YAHOO.env.ua.gecko,H=YAHOO.env.ua.ie;var E={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i,OP_SCROLL:/^(?:inline|table-row)$/i};var O=function(Q){if(!E.HYPHEN.test(Q)){return Q;}if(K[Q]){return K[Q];}var R=Q;while(E.HYPHEN.exec(R)){R=R.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}K[Q]=R;return R;};var P=function(R){var Q=G[R];if(!Q){Q=new RegExp("(?:^|\\s+)"+R+"(?:\\s+|$)");G[R]=Q;}return Q;};if(N.defaultView&&N.defaultView.getComputedStyle){L=function(Q,T){var S=null;if(T=="float"){T="cssFloat";}var R=Q.ownerDocument.defaultView.getComputedStyle(Q,"");if(R){S=R[O(T)];}return Q.style[T]||S;};}else{if(N.documentElement.currentStyle&&H){L=function(Q,S){switch(O(S)){case"opacity":var U=100;try{U=Q.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(T){try{U=Q.filters("alpha").opacity;}catch(T){}}return U/100;case"float":S="styleFloat";default:var R=Q.currentStyle?Q.currentStyle[S]:null;return(Q.style[S]||R);}};}else{L=function(Q,R){return Q.style[R];};}}if(H){J=function(Q,R,S){switch(R){case"opacity":if(F.isString(Q.style.filter)){Q.style.filter="alpha(opacity="+S*100+")";if(!Q.currentStyle||!Q.currentStyle.hasLayout){Q.style.zoom=1;}}break;case"float":R="styleFloat";default:Q.style[R]=S;}};}else{J=function(Q,R,S){if(R=="float"){R="cssFloat";}Q.style[R]=S;};}var D=function(Q,R){return Q&&Q.nodeType==1&&(!R||R(Q));};YAHOO.util.Dom={get:function(S){if(S){if(S.nodeType||S.item){return S;}if(typeof S==="string"){return N.getElementById(S);}if("length" in S){var T=[];for(var R=0,Q=S.length;R<Q;++R){T[T.length]=B.Dom.get(S[R]);}return T;}return S;}return null;},getStyle:function(Q,S){S=O(S);var R=function(T){return L(T,S);};return B.Dom.batch(Q,R,B.Dom,true);},setStyle:function(Q,S,T){S=O(S);var R=function(U){J(U,S,T);};B.Dom.batch(Q,R,B.Dom,true);},getXY:function(Q){var R=function(S){if((S.parentNode===null||S.offsetParent===null||this.getStyle(S,"display")=="none")&&S!=S.ownerDocument.body){return false;}return I(S);};return B.Dom.batch(Q,R,B.Dom,true);},getX:function(Q){var R=function(S){return B.Dom.getXY(S)[0];};return B.Dom.batch(Q,R,B.Dom,true);},getY:function(Q){var R=function(S){return B.Dom.getXY(S)[1];};return B.Dom.batch(Q,R,B.Dom,true);},setXY:function(Q,T,S){var R=function(W){var V=this.getStyle(W,"position");if(V=="static"){this.setStyle(W,"position","relative");V="relative";}var Y=this.getXY(W);if(Y===false){return false;}var X=[parseInt(this.getStyle(W,"left"),10),parseInt(this.getStyle(W,"top"),10)];if(isNaN(X[0])){X[0]=(V=="relative")?0:W.offsetLeft;}if(isNaN(X[1])){X[1]=(V=="relative")?0:W.offsetTop;}if(T[0]!==null){W.style.left=T[0]-Y[0]+X[0]+"px";}if(T[1]!==null){W.style.top=T[1]-Y[1]+X[1]+"px";}if(!S){var U=this.getXY(W);if((T[0]!==null&&U[0]!=T[0])||(T[1]!==null&&U[1]!=T[1])){this.setXY(W,T,true);}}};B.Dom.batch(Q,R,B.Dom,true);},setX:function(R,Q){B.Dom.setXY(R,[Q,null]);},setY:function(Q,R){B.Dom.setXY(Q,[null,R]);},getRegion:function(Q){var R=function(S){if((S.parentNode===null||S.offsetParent===null||this.getStyle(S,"display")=="none")&&S!=S.ownerDocument.body){return false;}var T=B.Region.getRegion(S);return T;};return B.Dom.batch(Q,R,B.Dom,true);},getClientWidth:function(){return B.Dom.getViewportWidth();},getClientHeight:function(){return B.Dom.getViewportHeight();},getElementsByClassName:function(U,Y,V,W){U=F.trim(U);Y=Y||"*";V=(V)?B.Dom.get(V):null||N;if(!V){return[];}var R=[],Q=V.getElementsByTagName(Y),X=P(U);for(var S=0,T=Q.length;S<T;++S){if(X.test(Q[S].className)){R[R.length]=Q[S];if(W){W.call(Q[S],Q[S]);}}}return R;},hasClass:function(S,R){var Q=P(R);var T=function(U){return Q.test(U.className);};return B.Dom.batch(S,T,B.Dom,true);},addClass:function(R,Q){var S=function(T){if(this.hasClass(T,Q)){return false;}T.className=F.trim([T.className,Q].join(" "));return true;};return B.Dom.batch(R,S,B.Dom,true);},removeClass:function(S,R){var Q=P(R);var T=function(W){var V=false,X=W.className;if(R&&X&&this.hasClass(W,R)){W.className=X.replace(Q," ");if(this.hasClass(W,R)){this.removeClass(W,R);}W.className=F.trim(W.className);if(W.className===""){var U=(W.hasAttribute)?"class":"className";W.removeAttribute(U);}V=true;}return V;};return B.Dom.batch(S,T,B.Dom,true);},replaceClass:function(T,R,Q){if(!Q||R===Q){return false;}var S=P(R);var U=function(V){if(!this.hasClass(V,R)){this.addClass(V,Q);return true;}V.className=V.className.replace(S," "+Q+" ");if(this.hasClass(V,R)){this.removeClass(V,R);}V.className=F.trim(V.className);return true;};return B.Dom.batch(T,U,B.Dom,true);},generateId:function(Q,S){S=S||"yui-gen";var R=function(T){if(T&&T.id){return T.id;}var U=S+YAHOO.env._id_counter++;if(T){T.id=U;}return U;};return B.Dom.batch(Q,R,B.Dom,true)||R.apply(B.Dom,arguments);},isAncestor:function(R,S){R=B.Dom.get(R);S=B.Dom.get(S);var Q=false;if((R&&S)&&(R.nodeType&&S.nodeType)){if(R.contains&&R!==S){Q=R.contains(S);}else{if(R.compareDocumentPosition){Q=!!(R.compareDocumentPosition(S)&16);}}}else{}return Q;},inDocument:function(Q){return this.isAncestor(N.documentElement,Q);},getElementsBy:function(X,R,S,U){R=R||"*";S=(S)?B.Dom.get(S):null||N;if(!S){return[];}var T=[],W=S.getElementsByTagName(R);for(var V=0,Q=W.length;V<Q;++V){if(X(W[V])){T[T.length]=W[V];if(U){U(W[V]);}}}return T;},batch:function(U,X,W,S){U=(U&&(U.tagName||U.item))?U:B.Dom.get(U);if(!U||!X){return false;}var T=(S)?W:window;if(U.tagName||U.length===undefined){return X.call(T,U,W);}var V=[];for(var R=0,Q=U.length;R<Q;++R){V[V.length]=X.call(T,U[R],W);}return V;},getDocumentHeight:function(){var R=(N.compatMode!="CSS1Compat")?N.body.scrollHeight:N.documentElement.scrollHeight;var Q=Math.max(R,B.Dom.getViewportHeight());return Q;},getDocumentWidth:function(){var R=(N.compatMode!="CSS1Compat")?N.body.scrollWidth:N.documentElement.scrollWidth;var Q=Math.max(R,B.Dom.getViewportWidth());return Q;},getViewportHeight:function(){var Q=self.innerHeight;
var R=N.compatMode;if((R||H)&&!C){Q=(R=="CSS1Compat")?N.documentElement.clientHeight:N.body.clientHeight;}return Q;},getViewportWidth:function(){var Q=self.innerWidth;var R=N.compatMode;if(R||H){Q=(R=="CSS1Compat")?N.documentElement.clientWidth:N.body.clientWidth;}return Q;},getAncestorBy:function(Q,R){while((Q=Q.parentNode)){if(D(Q,R)){return Q;}}return null;},getAncestorByClassName:function(R,Q){R=B.Dom.get(R);if(!R){return null;}var S=function(T){return B.Dom.hasClass(T,Q);};return B.Dom.getAncestorBy(R,S);},getAncestorByTagName:function(R,Q){R=B.Dom.get(R);if(!R){return null;}var S=function(T){return T.tagName&&T.tagName.toUpperCase()==Q.toUpperCase();};return B.Dom.getAncestorBy(R,S);},getPreviousSiblingBy:function(Q,R){while(Q){Q=Q.previousSibling;if(D(Q,R)){return Q;}}return null;},getPreviousSibling:function(Q){Q=B.Dom.get(Q);if(!Q){return null;}return B.Dom.getPreviousSiblingBy(Q);},getNextSiblingBy:function(Q,R){while(Q){Q=Q.nextSibling;if(D(Q,R)){return Q;}}return null;},getNextSibling:function(Q){Q=B.Dom.get(Q);if(!Q){return null;}return B.Dom.getNextSiblingBy(Q);},getFirstChildBy:function(Q,S){var R=(D(Q.firstChild,S))?Q.firstChild:null;return R||B.Dom.getNextSiblingBy(Q.firstChild,S);},getFirstChild:function(Q,R){Q=B.Dom.get(Q);if(!Q){return null;}return B.Dom.getFirstChildBy(Q);},getLastChildBy:function(Q,S){if(!Q){return null;}var R=(D(Q.lastChild,S))?Q.lastChild:null;return R||B.Dom.getPreviousSiblingBy(Q.lastChild,S);},getLastChild:function(Q){Q=B.Dom.get(Q);return B.Dom.getLastChildBy(Q);},getChildrenBy:function(R,T){var S=B.Dom.getFirstChildBy(R,T);var Q=S?[S]:[];B.Dom.getNextSiblingBy(S,function(U){if(!T||T(U)){Q[Q.length]=U;}return false;});return Q;},getChildren:function(Q){Q=B.Dom.get(Q);if(!Q){}return B.Dom.getChildrenBy(Q);},getDocumentScrollLeft:function(Q){Q=Q||N;return Math.max(Q.documentElement.scrollLeft,Q.body.scrollLeft);},getDocumentScrollTop:function(Q){Q=Q||N;return Math.max(Q.documentElement.scrollTop,Q.body.scrollTop);},insertBefore:function(R,Q){R=B.Dom.get(R);Q=B.Dom.get(Q);if(!R||!Q||!Q.parentNode){return null;}return Q.parentNode.insertBefore(R,Q);},insertAfter:function(R,Q){R=B.Dom.get(R);Q=B.Dom.get(Q);if(!R||!Q||!Q.parentNode){return null;}if(Q.nextSibling){return Q.parentNode.insertBefore(R,Q.nextSibling);}else{return Q.parentNode.appendChild(R);}},getClientRegion:function(){var S=B.Dom.getDocumentScrollTop(),R=B.Dom.getDocumentScrollLeft(),T=B.Dom.getViewportWidth()+R,Q=B.Dom.getViewportHeight()+S;return new B.Region(S,T,Q,R);}};var I=function(){if(N.documentElement.getBoundingClientRect){return function(S){var T=S.getBoundingClientRect(),R=Math.round;var Q=S.ownerDocument;return[R(T.left+B.Dom.getDocumentScrollLeft(Q)),R(T.top+B.Dom.getDocumentScrollTop(Q))];};}else{return function(S){var T=[S.offsetLeft,S.offsetTop];var R=S.offsetParent;var Q=(M&&B.Dom.getStyle(S,"position")=="absolute"&&S.offsetParent==S.ownerDocument.body);if(R!=S){while(R){T[0]+=R.offsetLeft;T[1]+=R.offsetTop;if(!Q&&M&&B.Dom.getStyle(R,"position")=="absolute"){Q=true;}R=R.offsetParent;}}if(Q){T[0]-=S.ownerDocument.body.offsetLeft;T[1]-=S.ownerDocument.body.offsetTop;}R=S.parentNode;while(R.tagName&&!E.ROOT_TAG.test(R.tagName)){if(R.scrollTop||R.scrollLeft){T[0]-=R.scrollLeft;T[1]-=R.scrollTop;}R=R.parentNode;}return T;};}}();})();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.6.0",build:"1321"});
/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.6.0
*/
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);},setDefaultPostHeader:function(A){if(typeof A=="string"){this._default_post_header=A;}else{if(typeof A=="boolean"){this._use_default_post_header=A;}}},setDefaultXhrHeader:function(A){if(typeof A=="string"){this._default_xhr_header=A;}else{this._use_default_xhr_header=A;}},setPollingInterval:function(A){if(typeof A=="number"&&isFinite(A)){this._polling_interval=A;}},createXhrObject:function(F){var E,A;try{A=new XMLHttpRequest();E={conn:A,tId:F};}catch(D){for(var B=0;B<this._msxml_progid.length;++B){try{A=new ActiveXObject(this._msxml_progid[B]);E={conn:A,tId:F};break;}catch(C){}}}finally{return E;}},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){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);}}if((F.toUpperCase()==="POST"&&this._use_default_post_header)&&this._isFormSubmit===false){this.initHeader("Content-Type",this._default_post_header);}if(this._has_default_headers||this._has_http_headers){this.setHeader(D);}this.handleReadyState(D,E);D.conn.send(A||"");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){var B;for(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);A[this._customEvents[B][0]].subscribe(C.customevents[B]);}}},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);}else{G.success.apply(G.scope,[C]);}}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);}else{G.failure.apply(G.scope,[C]);}}break;default:C=this.createResponseObject(F,B);if(G&&G.failure){if(!G.scope){G.failure(C);}else{G.failure.apply(G.scope,[C]);}}}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){var B;if(this._has_default_headers){for(B in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,B)){A.conn.setRequestHeader(B,this._default_headers[B]);}}}if(this._has_http_headers){for(B in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,B)){A.conn.setRequestHeader(B,this._http_headers[B]);}}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(M,H,C){var L,B,K,I,P,J=false,F=[],O=0,E,G,D,N,A;this.resetFormState();if(typeof M=="string"){L=(document.getElementById(M)||document.forms[M]);}else{if(typeof M=="object"){L=M;}else{return ;}}if(H){this.createFrame(C?C:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=L;return ;}for(E=0,G=L.elements.length;E<G;++E){B=L.elements[E];P=B.disabled;K=B.name;if(!P&&K){K=encodeURIComponent(K)+"=";I=encodeURIComponent(B.value);switch(B.type){case"select-one":if(B.selectedIndex>-1){A=B.options[B.selectedIndex];F[O++]=K+encodeURIComponent((A.attributes.value&&A.attributes.value.specified)?A.value:A.text);}break;case"select-multiple":if(B.selectedIndex>-1){for(D=B.selectedIndex,N=B.options.length;D<N;++D){A=B.options[D];if(A.selected){F[O++]=K+encodeURIComponent((A.attributes.value&&A.attributes.value.specified)?A.value:A.text);}}}break;case"radio":case"checkbox":if(B.checked){F[O++]=K+I;}break;case"file":case undefined:case"reset":case"button":break;case"submit":if(J===false){if(this._hasSubmitListener&&this._submitElementValue){F[O++]=this._submitElementValue;}else{F[O++]=K+I;}J=true;}break;default:F[O++]=K+I;}}}this._isFormSubmit=true;this._sFormData=F.join("&");this.initHeader("Content-Type",this._default_form_header);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(YAHOO.env.ua.ie){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);},appendPostData:function(A){var D=[],B=A.split("&"),C,E;for(C=0;C<B.length;C++){E=B[C].indexOf("=");if(E!=-1){D[C]=document.createElement("input");D[C].type="hidden";D[C].name=decodeURIComponent(B[C].substring(0,E));D[C].value=decodeURIComponent(B[C].substring(E+1));this._formNode.appendChild(D[C]);}}return D;},uploadFile:function(D,N,E,C){var I="yuiIO"+D.tId,J="multipart/form-data",L=document.getElementById(I),O=this,K=(N&&N.argument)?N.argument:null,M,H,B,G;var A={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",I);if(YAHOO.env.ua.ie){this._formNode.setAttribute("encoding",J);}else{this._formNode.setAttribute("enctype",J);}if(C){M=this.appendPostData(C);}this._formNode.submit();this.startEvent.fire(D,K);if(D.startEvent){D.startEvent.fire(D,K);}if(N&&N.timeout){this._timeOut[D.tId]=window.setTimeout(function(){O.abort(D,N,true);},N.timeout);}if(M&&M.length>0){for(H=0;H<M.length;H++){this._formNode.removeChild(M[H]);}}for(B in A){if(YAHOO.lang.hasOwnProperty(A,B)){if(A[B]){this._formNode.setAttribute(B,A[B]);}else{this._formNode.removeAttribute(B);}}}this.resetFormState();var F=function(){if(N&&N.timeout){window.clearTimeout(O._timeOut[D.tId]);delete O._timeOut[D.tId];}O.completeEvent.fire(D,K);if(D.completeEvent){D.completeEvent.fire(D,K);}G={tId:D.tId,argument:N.argument};try{G.responseText=L.contentWindow.document.body?L.contentWindow.document.body.innerHTML:L.contentWindow.document.documentElement.textContent;G.responseXML=L.contentWindow.document.XMLDocument?L.contentWindow.document.XMLDocument:L.contentWindow.document;}catch(P){}if(N&&N.upload){if(!N.scope){N.upload(G);}else{N.upload.apply(N.scope,[G]);}}O.uploadEvent.fire(G);if(D.uploadEvent){D.uploadEvent.fire(G);}YAHOO.util.Event.removeListener(L,"load",F);setTimeout(function(){document.body.removeChild(L);O.releaseObject(D);},100);};YAHOO.util.Event.addListener(L,"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);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);}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;A=null;}}};YAHOO.register("connection",YAHOO.util.Connect,{version:"2.6.0",build:"1321"});
/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.6.0
*/
(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";A.DEFAULT_BGCOLOR="#fff";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 I=YAHOO.util.Dom.getStyle(G,E);var H=this;if(this.patterns.transparent.test(I)){var F=YAHOO.util.Dom.getAncestorBy(G,function(J){return !H.patterns.transparent.test(I);});if(F){I=C.Dom.getStyle(F,E);}else{I=A.DEFAULT_BGCOLOR;}}}else{I=D.getAttribute.call(this,E);}return I;};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.6.0",build:"1321"});
/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.6.0
*/
if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var A=YAHOO.util.Event,B=YAHOO.util.Dom;return{useShim:false,_shimActive:false,_shimState:false,_debugShim:false,_createShim:function(){var C=document.createElement("div");C.id="yui-ddm-shim";if(document.body.firstChild){document.body.insertBefore(C,document.body.firstChild);}else{document.body.appendChild(C);}C.style.display="none";C.style.backgroundColor="red";C.style.position="absolute";C.style.zIndex="99999";B.setStyle(C,"opacity","0");this._shim=C;A.on(C,"mouseup",this.handleMouseUp,this,true);A.on(C,"mousemove",this.handleMouseMove,this,true);A.on(window,"scroll",this._sizeShim,this,true);},_sizeShim:function(){if(this._shimActive){var C=this._shim;C.style.height=B.getDocumentHeight()+"px";C.style.width=B.getDocumentWidth()+"px";C.style.top="0";C.style.left="0";}},_activateShim:function(){if(this.useShim){if(!this._shim){this._createShim();}this._shimActive=true;var C=this._shim,D="0";if(this._debugShim){D=".5";}B.setStyle(C,"opacity",D);this._sizeShim();C.style.display="block";}},_deactivateShim:function(){this._shim.style.display="none";this._shimActive=false;},_shim:null,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(E,D){for(var F in this.ids){for(var C in this.ids[F]){var G=this.ids[F][C];if(!this.isTypeOfDD(G)){continue;}G[E].apply(G,D);}}},_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(C){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(D,C){if(!this.initialized){this.init();}if(!this.ids[C]){this.ids[C]={};}this.ids[C][D.id]=D;},removeDDFromGroup:function(E,C){if(!this.ids[C]){this.ids[C]={};}var D=this.ids[C];if(D&&D[E.id]){delete D[E.id];}},_remove:function(E){for(var D in E.groups){if(D){var C=this.ids[D];if(C&&C[E.id]){delete C[E.id];}}}delete this.handleIds[E.id];},regHandle:function(D,C){if(!this.handleIds[D]){this.handleIds[D]={};}this.handleIds[D][C]=C;},isDragDrop:function(C){return(this.getDDById(C))?true:false;},getRelated:function(H,D){var G=[];for(var F in H.groups){for(var E in this.ids[F]){var C=this.ids[F][E];if(!this.isTypeOfDD(C)){continue;}if(!D||C.isTarget){G[G.length]=C;}}}return G;},isLegalTarget:function(G,F){var D=this.getRelated(G,true);for(var E=0,C=D.length;E<C;++E){if(D[E].id==F.id){return true;}}return false;},isTypeOfDD:function(C){return(C&&C.__ygDragDrop);},isHandle:function(D,C){return(this.handleIds[D]&&this.handleIds[D][C]);},getDDById:function(D){for(var C in this.ids){if(this.ids[C][D]){return this.ids[C][D];}}return null;},handleMouseDown:function(E,D){this.currentTarget=YAHOO.util.Event.getTarget(E);this.dragCurrent=D;var C=D.getEl();this.startX=YAHOO.util.Event.getPageX(E);this.startY=YAHOO.util.Event.getPageY(E);this.deltaX=this.startX-C.offsetLeft;this.deltaY=this.startY-C.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var F=YAHOO.util.DDM;F.startDrag(F.startX,F.startY);F.fromTimeout=true;},this.clickTimeThresh);},startDrag:function(C,E){if(this.dragCurrent&&this.dragCurrent.useShim){this._shimState=this.useShim;this.useShim=true;}this._activateShim();clearTimeout(this.clickTimeout);var D=this.dragCurrent;if(D&&D.events.b4StartDrag){D.b4StartDrag(C,E);D.fireEvent("b4StartDragEvent",{x:C,y:E});}if(D&&D.events.startDrag){D.startDrag(C,E);D.fireEvent("startDragEvent",{x:C,y:E});}this.dragThreshMet=true;},handleMouseUp:function(C){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){if(this.fromTimeout){this.fromTimeout=false;this.handleMouseMove(C);}this.fromTimeout=false;this.fireEvents(C,true);}else{}this.stopDrag(C);this.stopEvent(C);}},stopEvent:function(C){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(C);}if(this.preventDefault){YAHOO.util.Event.preventDefault(C);}},stopDrag:function(E,D){var C=this.dragCurrent;if(C&&!D){if(this.dragThreshMet){if(C.events.b4EndDrag){C.b4EndDrag(E);C.fireEvent("b4EndDragEvent",{e:E});}if(C.events.endDrag){C.endDrag(E);C.fireEvent("endDragEvent",{e:E});}}if(C.events.mouseUp){C.onMouseUp(E);C.fireEvent("mouseUpEvent",{e:E});}}if(this._shimActive){this._deactivateShim();if(this.dragCurrent&&this.dragCurrent.useShim){this.useShim=this._shimState;this._shimState=false;}}this.dragCurrent=null;this.dragOvers={};},handleMouseMove:function(F){var C=this.dragCurrent;if(C){if(YAHOO.util.Event.isIE&&!F.button){this.stopEvent(F);return this.handleMouseUp(F);}else{if(F.clientX<0||F.clientY<0){}}if(!this.dragThreshMet){var E=Math.abs(this.startX-YAHOO.util.Event.getPageX(F));var D=Math.abs(this.startY-YAHOO.util.Event.getPageY(F));if(E>this.clickPixelThresh||D>this.clickPixelThresh){this.startDrag(this.startX,this.startY);}}if(this.dragThreshMet){if(C&&C.events.b4Drag){C.b4Drag(F);C.fireEvent("b4DragEvent",{e:F});}if(C&&C.events.drag){C.onDrag(F);C.fireEvent("dragEvent",{e:F});}if(C){this.fireEvents(F,false);}}this.stopEvent(F);}},fireEvents:function(V,L){var a=this.dragCurrent;if(!a||a.isLocked()||a.dragOnly){return ;}var N=YAHOO.util.Event.getPageX(V),M=YAHOO.util.Event.getPageY(V),P=new YAHOO.util.Point(N,M),K=a.getTargetCoord(P.x,P.y),F=a.getDragEl(),E=["out","over","drop","enter"],U=new YAHOO.util.Region(K.y,K.x+F.offsetWidth,K.y+F.offsetHeight,K.x),I=[],D={},Q=[],c={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var S in this.dragOvers){var d=this.dragOvers[S];if(!this.isTypeOfDD(d)){continue;
}if(!this.isOverTarget(P,d,this.mode,U)){c.outEvts.push(d);}I[S]=true;delete this.dragOvers[S];}for(var R in a.groups){if("string"!=typeof R){continue;}for(S in this.ids[R]){var G=this.ids[R][S];if(!this.isTypeOfDD(G)){continue;}if(G.isTarget&&!G.isLocked()&&G!=a){if(this.isOverTarget(P,G,this.mode,U)){D[R]=true;if(L){c.dropEvts.push(G);}else{if(!I[G.id]){c.enterEvts.push(G);}else{c.overEvts.push(G);}this.dragOvers[G.id]=G;}}}}}this.interactionInfo={out:c.outEvts,enter:c.enterEvts,over:c.overEvts,drop:c.dropEvts,point:P,draggedRegion:U,sourceRegion:this.locationCache[a.id],validDrop:L};for(var C in D){Q.push(C);}if(L&&!c.dropEvts.length){this.interactionInfo.validDrop=false;if(a.events.invalidDrop){a.onInvalidDrop(V);a.fireEvent("invalidDropEvent",{e:V});}}for(S=0;S<E.length;S++){var Y=null;if(c[E[S]+"Evts"]){Y=c[E[S]+"Evts"];}if(Y&&Y.length){var H=E[S].charAt(0).toUpperCase()+E[S].substr(1),X="onDrag"+H,J="b4Drag"+H,O="drag"+H+"Event",W="drag"+H;if(this.mode){if(a.events[J]){a[J](V,Y,Q);a.fireEvent(J+"Event",{event:V,info:Y,group:Q});}if(a.events[W]){a[X](V,Y,Q);a.fireEvent(O,{event:V,info:Y,group:Q});}}else{for(var Z=0,T=Y.length;Z<T;++Z){if(a.events[J]){a[J](V,Y[Z].id,Q[0]);a.fireEvent(J+"Event",{event:V,info:Y[Z].id,group:Q[0]});}if(a.events[W]){a[X](V,Y[Z].id,Q[0]);a.fireEvent(O,{event:V,info:Y[Z].id,group:Q[0]});}}}}}},getBestMatch:function(E){var G=null;var D=E.length;if(D==1){G=E[0];}else{for(var F=0;F<D;++F){var C=E[F];if(this.mode==this.INTERSECT&&C.cursorIsOver){G=C;break;}else{if(!G||!G.overlap||(C.overlap&&G.overlap.getArea()<C.overlap.getArea())){G=C;}}}}return G;},refreshCache:function(D){var F=D||this.ids;for(var C in F){if("string"!=typeof C){continue;}for(var E in this.ids[C]){var G=this.ids[C][E];if(this.isTypeOfDD(G)){var H=this.getLocation(G);if(H){this.locationCache[G.id]=H;}else{delete this.locationCache[G.id];}}}}},verifyEl:function(D){try{if(D){var C=D.offsetParent;if(C){return true;}}}catch(E){}return false;},getLocation:function(H){if(!this.isTypeOfDD(H)){return null;}var F=H.getEl(),K,E,D,M,L,N,C,J,G;try{K=YAHOO.util.Dom.getXY(F);}catch(I){}if(!K){return null;}E=K[0];D=E+F.offsetWidth;M=K[1];L=M+F.offsetHeight;N=M-H.padding[0];C=D+H.padding[1];J=L+H.padding[2];G=E-H.padding[3];return new YAHOO.util.Region(N,C,J,G);},isOverTarget:function(K,C,E,F){var G=this.locationCache[C.id];if(!G||!this.useCache){G=this.getLocation(C);this.locationCache[C.id]=G;}if(!G){return false;}C.cursorIsOver=G.contains(K);var J=this.dragCurrent;if(!J||(!E&&!J.constrainX&&!J.constrainY)){return C.cursorIsOver;}C.overlap=null;if(!F){var H=J.getTargetCoord(K.x,K.y);var D=J.getDragEl();F=new YAHOO.util.Region(H.y,H.x+D.offsetWidth,H.y+D.offsetHeight,H.x);}var I=F.intersect(G);if(I){C.overlap=I;return(E)?true:C.cursorIsOver;}else{return false;}},_onUnload:function(D,C){this.unregAll();},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null;}this._execOnAll("unreg",[]);this.ids={};},elementCache:{},getElWrapper:function(D){var C=this.elementCache[D];if(!C||!C.el){C=this.elementCache[D]=new this.ElementWrapper(YAHOO.util.Dom.get(D));}return C;},getElement:function(C){return YAHOO.util.Dom.get(C);},getCss:function(D){var C=YAHOO.util.Dom.get(D);return(C)?C.style:null;},ElementWrapper:function(C){this.el=C||null;this.id=this.el&&C.id;this.css=this.el&&C.style;},getPosX:function(C){return YAHOO.util.Dom.getX(C);},getPosY:function(C){return YAHOO.util.Dom.getY(C);},swapNode:function(E,C){if(E.swapNode){E.swapNode(C);}else{var F=C.parentNode;var D=C.nextSibling;if(D==E){F.insertBefore(E,C);}else{if(C==E.nextSibling){F.insertBefore(C,E);}else{E.parentNode.replaceChild(C,E);F.insertBefore(E,D);}}}},getScroll:function(){var E,C,F=document.documentElement,D=document.body;if(F&&(F.scrollTop||F.scrollLeft)){E=F.scrollTop;C=F.scrollLeft;}else{if(D){E=D.scrollTop;C=D.scrollLeft;}else{}}return{top:E,left:C};},getStyle:function(D,C){return YAHOO.util.Dom.getStyle(D,C);},getScrollTop:function(){return this.getScroll().top;},getScrollLeft:function(){return this.getScroll().left;},moveToEl:function(C,E){var D=YAHOO.util.Dom.getXY(E);YAHOO.util.Dom.setXY(C,D);},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight();},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth();},numericSort:function(D,C){return(D-C);},_timeoutCount:0,_addListeners:function(){var C=YAHOO.util.DDM;if(YAHOO.util.Event&&document){C._onLoad();}else{if(C._timeoutCount>2000){}else{setTimeout(C._addListeners,10);if(document&&document.body){C._timeoutCount+=1;}}}},handleWasClicked:function(C,E){if(this.isHandle(E,C.id)){return true;}else{var D=C.parentNode;while(D){if(this.isHandle(E,D.id)){return true;}else{D=D.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,useShim: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);this.useShim=((this.config.useShim===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(J,I){var D=J.which||J.button;if(this.primaryButtonOnly&&D>1){return ;}if(this.isLocked()){return ;}var C=this.b4MouseDown(J),F=true;if(this.events.b4MouseDown){F=this.fireEvent("b4MouseDownEvent",J);}var E=this.onMouseDown(J),H=true;if(this.events.mouseDown){H=this.fireEvent("mouseDownEvent",J);}if((C===false)||(E===false)||(F===false)||(H===false)){return ;}this.DDM.refreshCache(this.groups);var G=new YAHOO.util.Point(A.getPageX(J),A.getPageY(J));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(G,this)){}else{if(this.clickValidator(J)){this.setStartPosition();this.DDM.handleMouseDown(J,this);this.DDM.stopEvent(J);}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: false;");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.6.0",build:"1321"});
(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=this.config,g,e;for(g in f){if(b.hasOwnProperty(f,g)){e=f[g];if(e&&e.event){d[g]=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(v,r){v=v.toLowerCase();var u=this.config[v],l=false,k,g,h,j,p,t,f,n,o,d,m,w,e;if(u&&u.event){if(!b.isUndefined(r)&&u.validator&&!u.validator(r)){return false}else{if(!b.isUndefined(r)){u.value=r}else{r=u.value}l=false;k=this.eventQueue.length;for(m=0;m<k;m++){g=this.eventQueue[m];if(g){h=g[0];j=g[1];if(h==v){this.eventQueue[m]=null;this.eventQueue.push([v,(!b.isUndefined(r)?r:j)]);l=true;break}}}if(!l&&!b.isUndefined(r)){this.eventQueue.push([v,r])}}if(u.supercedes){p=u.supercedes.length;for(w=0;w<p;w++){t=u.supercedes[w];f=this.eventQueue.length;for(e=0;e<f;e++){n=this.eventQueue[e];if(n){o=n[0];d=n[1];if(o==t.toLowerCase()){this.eventQueue.push([o,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){if(b.hasOwnProperty(this.config,d)){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.eventQueue[e]=null;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,j){var f=e.subscribers.length,d,g;if(f>0){g=f-1;do{d=e.subscribers[g];if(d&&d.obj==j&&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.title="Text Resize Monitor";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()},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(o,n){YAHOO.widget.Overlay.superclass.constructor.call(this,o,n)};var h=YAHOO.lang,l=YAHOO.util.CustomEvent,f=YAHOO.widget.Module,m=YAHOO.util.Event,e=YAHOO.util.Dom,c=YAHOO.util.Config,j=YAHOO.env.ua,b=YAHOO.widget.Overlay,g="subscribe",d="unsubscribe",i,a={BEFORE_MOVE:"beforeMove",MOVE:"move"},k={X:{key:"x",validator:h.isNumber,suppressEvent:true,supercedes:["iframe"]},Y:{key:"y",validator:h.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:h.isBoolean,supercedes:["iframe","visible"]},WIDTH:{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},HEIGHT:{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},AUTO_FILL_HEIGHT:{key:"autofillheight",supressEvent:true,supercedes:["height"],value:"body"},ZINDEX:{key:"zindex",value:null},CONSTRAIN_TO_VIEWPORT:{key:"constraintoviewport",value:false,validator:h.isBoolean,supercedes:["iframe","x","y","xy"]},IFRAME:{key:"iframe",value:(j.ie==6?true:false),validator:h.isBoolean,supercedes:["zindex"]},PREVENT_CONTEXT_OVERLAP:{key:"preventcontextoverlap",value:false,validator:h.isBoolean,supercedes:["constraintoviewport"]}};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.STD_MOD_RE=/^\s*?(body|footer|header)\s*?$/i;b.windowScrollEvent=new l("windowScroll");b.windowResizeEvent=new l("windowResize");b.windowScrollHandler=function(o){var n=m.getTarget(o);if(!n||n===window||n===window.document){if(j.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(n){if(j.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){m.on(window,"scroll",b.windowScrollHandler);m.on(window,"resize",b.windowResizeHandler);b._initialized=true}b._TRIGGER_MAP={windowScroll:b.windowScrollEvent,windowResize:b.windowResizeEvent,textResize:f.textResizeEvent};YAHOO.extend(b,f,{CONTEXT_TRIGGERS:[],init:function(o,n){b.superclass.init.call(this,o);this.beforeInitEvent.fire(b);e.addClass(this.element,b.CSS_OVERLAY);if(n){this.cfg.applyConfig(n,true)}if(this.platform=="mac"&&j.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 n=l.LIST;this.beforeMoveEvent=this.createEvent(a.BEFORE_MOVE);this.beforeMoveEvent.signature=n;this.moveEvent=this.createEvent(a.MOVE);this.moveEvent.signature=n},initDefaultConfig:function(){b.superclass.initDefaultConfig.call(this);var n=this.cfg;n.addProperty(k.X.key,{handler:this.configX,validator:k.X.validator,suppressEvent:k.X.suppressEvent,supercedes:k.X.supercedes});n.addProperty(k.Y.key,{handler:this.configY,validator:k.Y.validator,suppressEvent:k.Y.suppressEvent,supercedes:k.Y.supercedes});n.addProperty(k.XY.key,{handler:this.configXY,suppressEvent:k.XY.suppressEvent,supercedes:k.XY.supercedes});n.addProperty(k.CONTEXT.key,{handler:this.configContext,suppressEvent:k.CONTEXT.suppressEvent,supercedes:k.CONTEXT.supercedes});n.addProperty(k.FIXED_CENTER.key,{handler:this.configFixedCenter,value:k.FIXED_CENTER.value,validator:k.FIXED_CENTER.validator,supercedes:k.FIXED_CENTER.supercedes});n.addProperty(k.WIDTH.key,{handler:this.configWidth,suppressEvent:k.WIDTH.suppressEvent,supercedes:k.WIDTH.supercedes});n.addProperty(k.HEIGHT.key,{handler:this.configHeight,suppressEvent:k.HEIGHT.suppressEvent,supercedes:k.HEIGHT.supercedes});n.addProperty(k.AUTO_FILL_HEIGHT.key,{handler:this.configAutoFillHeight,value:k.AUTO_FILL_HEIGHT.value,validator:this._validateAutoFill,suppressEvent:k.AUTO_FILL_HEIGHT.suppressEvent,supercedes:k.AUTO_FILL_HEIGHT.supercedes});n.addProperty(k.ZINDEX.key,{handler:this.configzIndex,value:k.ZINDEX.value});n.addProperty(k.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:k.CONSTRAIN_TO_VIEWPORT.value,validator:k.CONSTRAIN_TO_VIEWPORT.validator,supercedes:k.CONSTRAIN_TO_VIEWPORT.supercedes});n.addProperty(k.IFRAME.key,{handler:this.configIframe,value:k.IFRAME.value,validator:k.IFRAME.validator,supercedes:k.IFRAME.supercedes});n.addProperty(k.PREVENT_CONTEXT_OVERLAP.key,{value:k.PREVENT_CONTEXT_OVERLAP.value,validator:k.PREVENT_CONTEXT_OVERLAP.validator,supercedes:k.PREVENT_CONTEXT_OVERLAP.supercedes})},moveTo:function(n,o){this.cfg.setProperty("xy",[n,o])},hideMacGeckoScrollbars:function(){e.replaceClass(this.element,"show-scrollbars","hide-scrollbars")},showMacGeckoScrollbars:function(){e.replaceClass(this.element,"hide-scrollbars","show-scrollbars")},configVisible:function(q,n,w){var p=n[0],r=e.getStyle(this.element,"visibility"),x=this.cfg.getProperty("effect"),u=[],t=(this.platform=="mac"&&j.gecko),E=c.alreadySubscribed,v,o,D,B,A,z,C,y,s;if(r=="inherit"){D=this.element.parentNode;while(D.nodeType!=9&&D.nodeType!=11){r=e.getStyle(D,"visibility");if(r!="inherit"){break}D=D.parentNode}if(r=="inherit"){r="visible"}}if(x){if(x instanceof Array){y=x.length;for(B=0;B<y;B++){v=x[B];u[u.length]=v.effect(this,v.duration)}}else{u[u.length]=x.effect(this,x.duration)}}if(p){if(t){this.showMacGeckoScrollbars()}if(x){if(p){if(r!="visible"||r===""){this.beforeShowEvent.fire();s=u.length;for(A=0;A<s;A++){o=u[A];if(A===0&&!E(o.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){o.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true)}o.animateIn()}}}}else{if(r!="visible"||r===""){this.beforeShowEvent.fire();e.setStyle(this.element,"visibility","visible");this.cfg.refireEvent("iframe");this.showEvent.fire()}}}else{if(t){this.hideMacGeckoScrollbars()}if(x){if(r=="visible"){this.beforeHideEvent.fire();s=u.length;for(z=0;z<s;z++){C=u[z];if(z===0&&!E(C.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){C.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true)}C.animateOut()}}else{if(r===""){e.setStyle(this.element,"visibility","hidden")}}}else{if(r=="visible"||r===""){this.beforeHideEvent.fire();e.setStyle(this.element,"visibility","hidden");this.hideEvent.fire()}}}},doCenterOnDOMEvent:function(){if(this.cfg.getProperty("visible")){this.center()}},configFixedCenter:function(r,p,s){var t=p[0],o=c.alreadySubscribed,q=b.windowResizeEvent,n=b.windowScrollEvent;if(t){this.center();if(!o(this.beforeShowEvent,this.center,this)){this.beforeShowEvent.subscribe(this.center)}if(!o(q,this.doCenterOnDOMEvent,this)){q.subscribe(this.doCenterOnDOMEvent,this,true)}if(!o(n,this.doCenterOnDOMEvent,this)){n.subscribe(this.doCenterOnDOMEvent,this,true)}}else{this.beforeShowEvent.unsubscribe(this.center);q.unsubscribe(this.doCenterOnDOMEvent,this);n.unsubscribe(this.doCenterOnDOMEvent,this)}},configHeight:function(q,o,r){var n=o[0],p=this.element;e.setStyle(p,"height",n);this.cfg.refireEvent("iframe")},configAutoFillHeight:function(q,p,r){var o=p[0],n=this.cfg.getProperty("autofillheight");this.cfg.unsubscribeFromConfigEvent("height",this._autoFillOnHeightChange);f.textResizeEvent.unsubscribe("height",this._autoFillOnHeightChange);if(n&&o!==n&&this[n]){e.setStyle(this[n],"height","")}if(o){o=h.trim(o.toLowerCase());this.cfg.subscribeToConfigEvent("height",this._autoFillOnHeightChange,this[o],this);f.textResizeEvent.subscribe(this._autoFillOnHeightChange,this[o],this);this.cfg.setProperty("autofillheight",o,true)}},configWidth:function(q,n,r){var p=n[0],o=this.element;e.setStyle(o,"width",p);this.cfg.refireEvent("iframe")},configzIndex:function(p,n,q){var r=n[0],o=this.element;if(!r){r=e.getStyle(o,"zIndex");if(!r||isNaN(r)){r=0}}if(this.iframe||this.cfg.getProperty("iframe")===true){if(r<=0){r=1}}e.setStyle(o,"zIndex",r);this.cfg.setProperty("zIndex",r,true);if(this.iframe){this.stackIframe()}},configXY:function(p,o,q){var s=o[0],n=s[0],r=s[1];this.cfg.setProperty("x",n);this.cfg.setProperty("y",r);this.beforeMoveEvent.fire([n,r]);n=this.cfg.getProperty("x");r=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([n,r])},configX:function(p,o,q){var n=o[0],r=this.cfg.getProperty("y");this.cfg.setProperty("x",n,true);this.cfg.setProperty("y",r,true);this.beforeMoveEvent.fire([n,r]);n=this.cfg.getProperty("x");r=this.cfg.getProperty("y");e.setX(this.element,n,true);this.cfg.setProperty("xy",[n,r],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([n,r])},configY:function(p,o,q){var n=this.cfg.getProperty("x"),r=o[0];this.cfg.setProperty("x",n,true);this.cfg.setProperty("y",r,true);this.beforeMoveEvent.fire([n,r]);n=this.cfg.getProperty("x");r=this.cfg.getProperty("y");e.setY(this.element,r,true);this.cfg.setProperty("xy",[n,r],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([n,r])},showIframe:function(){var o=this.iframe,n;if(o){n=this.element.parentNode;if(n!=o.parentNode){this._addToParent(n,o)}o.style.display="block"}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none"}},syncIframe:function(){var n=this.iframe,p=this.element,r=b.IFRAME_OFFSET,o=(r*2),q;if(n){n.style.width=(p.offsetWidth+o+"px");n.style.height=(p.offsetHeight+o+"px");q=this.cfg.getProperty("xy");if(!h.isArray(q)||(isNaN(q[0])||isNaN(q[1]))){this.syncPosition();q=this.cfg.getProperty("xy")}e.setXY(n,[(q[0]-r),(q[1]-r)])}},stackIframe:function(){if(this.iframe){var n=e.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(n)&&!isNaN(n)){e.setStyle(this.iframe,"zIndex",(n-1))}}},configIframe:function(q,p,r){var n=p[0];function s(){var u=this.iframe,v=this.element,w;if(!u){if(!i){i=document.createElement("iframe");if(this.isSecure){i.src=b.IFRAME_SRC}if(j.ie){i.style.filter="alpha(opacity=0)";i.frameBorder=0}else{i.style.opacity="0"}i.style.position="absolute";i.style.border="none";i.style.margin="0";i.style.padding="0";i.style.display="none"}u=i.cloneNode(false);w=v.parentNode;var t=w||document.body;this._addToParent(t,u);this.iframe=u}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 o(){s.call(this);this.beforeShowEvent.unsubscribe(o);this._iframeDeferred=false}if(n){if(this.cfg.getProperty("visible")){s.call(this)}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(o);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(o,n,p){var q=n[0];if(q){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(s,r,o){var v=r[0],p,n,t,q,u=this.CONTEXT_TRIGGERS;if(v){p=v[0];n=v[1];t=v[2];q=v[3];if(u&&u.length>0){q=(q||[]).concat(u)}if(p){if(typeof p=="string"){this.cfg.setProperty("context",[document.getElementById(p),n,t,q],true)}if(n&&t){this.align(n,t)}if(this._contextTriggers){this._processTriggers(this._contextTriggers,d,this._alignOnTrigger)}if(q){this._processTriggers(q,g,this._alignOnTrigger);this._contextTriggers=q}}}},_alignOnTrigger:function(o,n){this.align()},_findTriggerCE:function(n){var o=null;if(n instanceof l){o=n}else{if(b._TRIGGER_MAP[n]){o=b._TRIGGER_MAP[n]}}return o},_processTriggers:function(r,u,q){var p,s;for(var o=0,n=r.length;o<n;++o){p=r[o];s=this._findTriggerCE(p);if(s){s[u](q,this,true)}else{this[u](p,q)}}},align:function(o,n){var t=this.cfg.getProperty("context"),s=this,r,q,u;function p(w,x){switch(o){case b.TOP_LEFT:s.moveTo(x,w);break;case b.TOP_RIGHT:s.moveTo((x-q.offsetWidth),w);break;case b.BOTTOM_LEFT:s.moveTo(x,(w-q.offsetHeight));break;case b.BOTTOM_RIGHT:s.moveTo((x-q.offsetWidth),(w-q.offsetHeight));break}}if(t){r=t[0];q=this.element;s=this;if(!o){o=t[1]}if(!n){n=t[2]}if(q&&r){u=e.getRegion(r);switch(n){case b.TOP_LEFT:p(u.top,u.left);break;case b.TOP_RIGHT:p(u.top,u.right);break;case b.BOTTOM_LEFT:p(u.bottom,u.left);break;case b.BOTTOM_RIGHT:p(u.bottom,u.right);break}}}},enforceConstraints:function(o,n,p){var r=n[0];var q=this.getConstrainedXY(r[0],r[1]);this.cfg.setProperty("x",q[0],true);this.cfg.setProperty("y",q[1],true);this.cfg.setProperty("xy",q,true)},getConstrainedX:function(u){var r=this,n=r.element,E=n.offsetWidth,C=b.VIEWPORT_OFFSET,H=e.getViewportWidth(),D=e.getDocumentScrollLeft(),y=(E+C<H),B=this.cfg.getProperty("context"),p,w,J,s=false,F,v,G,o,I=u,t={tltr:true,blbr:true,brbl:true,trtl:true};var z=function(){var x;if((r.cfg.getProperty("x")-D)>w){x=(w-E)}else{x=(w+J)}r.cfg.setProperty("x",(x+D),true);return x};var q=function(){if((r.cfg.getProperty("x")-D)>w){return(v-C)}else{return(F-C)}};var A=function(){var x=q(),K;if(E>x){if(s){z()}else{z();s=true;K=A()}}return K};if(this.cfg.getProperty("preventcontextoverlap")&&B&&t[(B[1]+B[2])]){if(y){p=B[0];w=e.getX(p)-D;J=p.offsetWidth;F=w;v=(H-(w+J));A()}I=this.cfg.getProperty("x")}else{if(y){G=D+C;o=D+H-E-C;if(u<G){I=G}else{if(u>o){I=o}}}else{I=C+D}}return I},getConstrainedY:function(z){var v=this,o=v.element,I=o.offsetHeight,H=b.VIEWPORT_OFFSET,D=e.getViewportHeight(),G=e.getDocumentScrollTop(),E=(I+H<D),F=this.cfg.getProperty("context"),t,A,B,w=false,u,p,C,r,n=z,x={trbr:true,tlbl:true,bltl:true,brtr:true};var s=function(){var y;if((v.cfg.getProperty("y")-G)>A){y=(A-I)}else{y=(A+B)}v.cfg.setProperty("y",(y+G),true);return y};var q=function(){if((v.cfg.getProperty("y")-G)>A){return(p-H)}else{return(u-H)}};var J=function(){var K=q(),y;if(I>K){if(w){s()}else{s();w=true;y=J()}}return y};if(this.cfg.getProperty("preventcontextoverlap")&&F&&x[(F[1]+F[2])]){if(E){t=F[0];B=t.offsetHeight;A=(e.getY(t)-G);u=A;p=(D-(A+B));J()}n=v.cfg.getProperty("y")}else{if(E){C=G+H;r=G+D-I-H;if(z<C){n=C}else{if(z>r){n=r}}}else{n=H+G}}return n},getConstrainedXY:function(n,o){return[this.getConstrainedX(n),this.getConstrainedY(o)]},center:function(){var q=b.VIEWPORT_OFFSET,r=this.element.offsetWidth,p=this.element.offsetHeight,o=e.getViewportWidth(),s=e.getViewportHeight(),n,t;if(r<o){n=(o/2)-(r/2)+e.getDocumentScrollLeft()}else{n=q+e.getDocumentScrollLeft()}if(p<s){t=(s/2)-(p/2)+e.getDocumentScrollTop()}else{t=q+e.getDocumentScrollTop()}this.cfg.setProperty("xy",[parseInt(n,10),parseInt(t,10)]);this.cfg.refireEvent("iframe")},syncPosition:function(){var n=e.getXY(this.element);this.cfg.setProperty("x",n[0],true);this.cfg.setProperty("y",n[1],true);this.cfg.setProperty("xy",n,true)},onDomResize:function(p,o){var n=this;b.superclass.onDomResize.call(this,p,o);setTimeout(function(){n.syncPosition();n.cfg.refireEvent("iframe");n.cfg.refireEvent("context")},0)},_getComputedHeight:(function(){if(document.defaultView&&document.defaultView.getComputedStyle){return function(o){var n=null;if(o.ownerDocument&&o.ownerDocument.defaultView){var p=o.ownerDocument.defaultView.getComputedStyle(o,"");if(p){n=parseInt(p.height,10)}}return(h.isNumber(n))?n:null}}else{return function(o){var n=null;if(o.style.pixelHeight){n=o.style.pixelHeight}return(h.isNumber(n))?n:null}}})(),_validateAutoFillHeight:function(n){return(!n)||(h.isString(n)&&b.STD_MOD_RE.test(n))},_autoFillOnHeightChange:function(p,n,o){this.fillHeight(o)},_getPreciseHeight:function(o){var n=o.offsetHeight;if(o.getBoundingClientRect){var p=o.getBoundingClientRect();n=p.bottom-p.top}return n},fillHeight:function(q){if(q){var o=this.innerElement||this.element,n=[this.header,this.body,this.footer],u,v=0,w=0,s=0,p=false;for(var t=0,r=n.length;t<r;t++){u=n[t];if(u){if(q!==u){w+=this._getPreciseHeight(u)}else{p=true}}}if(p){if(j.ie||j.opera){e.setStyle(q,"height",0+"px")}v=this._getComputedHeight(o);if(v===null){e.addClass(o,"yui-override-padding");v=o.clientHeight;e.removeClass(o,"yui-override-padding")}s=v-w;e.setStyle(q,"height",s+"px");if(q.offsetHeight!=s){s=s-(q.offsetHeight-s)}e.setStyle(q,"height",s+"px")}}},bringToTop:function(){var r=[],q=this.element;function u(y,x){var A=e.getStyle(y,"zIndex"),z=e.getStyle(x,"zIndex"),w=(!A||isNaN(A))?0:parseInt(A,10),v=(!z||isNaN(z))?0:parseInt(z,10);if(w>v){return -1}else{if(w<v){return 1}else{return 0}}}function p(x){var w=e.hasClass(x,b.CSS_OVERLAY),v=YAHOO.widget.Panel;if(w&&!e.isAncestor(q,x)){if(v&&e.hasClass(x,v.CSS_PANEL)){r[r.length]=x.parentNode}else{r[r.length]=x}}}e.getElementsBy(p,"DIV",document.body);r.sort(u);var n=r[0],t;if(n){t=e.getStyle(n,"zIndex");if(!isNaN(t)){var s=false;if(n!=q){s=true}else{if(r.length>1){var o=e.getStyle(r[1],"zIndex");if(!isNaN(o)&&(t==o)){s=true}}}if(s){this.cfg.setProperty("zindex",(parseInt(t,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);f.textResizeEvent.unsubscribe(this._autoFillOnHeightChange);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){k.focus()}};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);m.focusEvent.unsubscribe(this._onOverlayFocusHandler,m);m.blurEvent.unsubscribe(this._onOverlayBlurHandler,m);if(!l){c.removeListener(m.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);m.cfg.setProperty("zIndex",j,true);m.cfg.setProperty("manager",null)}if(m.focusEvent._managed){m.focusEvent=null}if(m.blurEvent._managed){m.blurEvent=null}if(m.focus._managed){m.focus=null}if(m.blur._managed){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._manageBlur=function(j){var k=false;if(h==j){e.removeClass(h.element,a.CSS_FOCUSED);h=null;k=true}return k};this._manageFocus=function(j){var k=false;if(h!=j){if(h){h.blur()}h=j;this.bringToTop(h);e.addClass(h.element,a.CSS_FOCUSED);k=true}return k};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)},_onOverlayFocusHandler:function(h,g,i){this._manageFocus(i)},_onOverlayBlurHandler:function(h,g,i){this._manageBlur(i)},_bindFocus:function(g){var h=this;if(!g.focusEvent){g.focusEvent=g.createEvent("focus");g.focusEvent.signature=f.LIST;g.focusEvent._managed=true}else{g.focusEvent.subscribe(h._onOverlayFocusHandler,g,h)}if(!g.focus){c.on(g.element,h.cfg.getProperty("focusevent"),h._onOverlayElementFocus,null,g);g.focus=function(){if(h._manageFocus(this)){if(this.cfg.getProperty("visible")&&this.focusFirst){this.focusFirst()}this.focusEvent.fire()}};g.focus._managed=true}},_bindBlur:function(g){var h=this;if(!g.blurEvent){g.blurEvent=g.createEvent("blur");g.blurEvent.signature=f.LIST;g.focusEvent._managed=true}else{g.blurEvent.subscribe(h._onOverlayBlurHandler,g,h)}if(!g.blur){g.blur=function(){if(h._manageBlur(this)){this.blurEvent.fire()}};g.blur._managed=true}g.hideEvent.subscribe(g.blur)},_bindDestroy:function(g){var h=this;g.destroyEvent.subscribe(h._onOverlayDestroy,g,h)},_syncZIndex:function(g){var h=e.getStyle(g.element,"zIndex");if(!isNaN(h)){g.cfg.setProperty("zIndex",parseInt(h,10))}else{g.cfg.setProperty("zIndex",0)}},register:function(g){var l,k=false,h,j;if(g instanceof d){g.cfg.addProperty("manager",{value:this});this._bindFocus(g);this._bindBlur(g);this._bindDestroy(g);this._syncZIndex(g);this.overlays.push(g);this.bringToTop(g);k=true}else{if(g instanceof Array){for(h=0,j=g.length;h<j;h++){k=this.register(g[h])||k}}}return k},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 l=g instanceof d,j=this.overlays,p=j.length,k=null,m,h;if(l||typeof g=="string"){for(h=p-1;h>=0;h--){m=j[h];if((l&&(m===g))||(m.id==g)){k=m;break}}}return k},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,j=h.length,g;for(g=j-1;g>=0;g--){h[g].show()}},hideAll:function(){var h=this.overlays,j=h.length,g;for(g=j-1;g>=0;g--){h[g].hide()}},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)}}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(v,u){YAHOO.widget.Panel.superclass.constructor.call(this,v,u)};var s=null;var e=YAHOO.lang,f=YAHOO.util,a=f.Dom,t=f.Event,m=f.CustomEvent,k=YAHOO.util.KeyListener,i=f.Config,h=YAHOO.widget.Overlay,o=YAHOO.widget.Panel,l=YAHOO.env.ua,p=(l.ie==6||(l.ie==7&&document.compatMode=="BackCompat")),g,q,c,d={SHOW_MASK:"showMask",HIDE_MASK:"hideMask",DRAG:"drag"},n={CLOSE:{key:"close",value:true,validator:e.isBoolean,supercedes:["visible"]},DRAGGABLE:{key:"draggable",value:(f.DD?true:false),validator:e.isBoolean,supercedes:["visible"]},DRAG_ONLY:{key:"dragonly",value:false,validator:e.isBoolean,supercedes:["draggable"]},UNDERLAY:{key:"underlay",value:"shadow",supercedes:["visible"]},MODAL:{key:"modal",value:false,validator:e.isBoolean,supercedes:["visible","zindex"]},KEY_LISTENERS:{key:"keylisteners",suppressEvent:true,supercedes:["visible"]},STRINGS:{key:"strings",supercedes:["close"],validator:e.isObject,value:{close:"Close"}}};o.CSS_PANEL="yui-panel";o.CSS_PANEL_CONTAINER="yui-panel-container";o.FOCUSABLE=["a","button","select","textarea","input","iframe"];function j(v,u){if(!this.header&&this.cfg.getProperty("draggable")){this.setHeader("&#160;")}}function r(v,u,w){var z=w[0],x=w[1],y=this.cfg,A=y.getProperty("width");if(A==x){y.setProperty("width",z)}this.unsubscribe("hide",r,w)}function b(v,u){var z=YAHOO.env.ua.ie,y,x,w;if(z==6||(z==7&&document.compatMode=="BackCompat")){y=this.cfg;x=y.getProperty("width");if(!x||x=="auto"){w=(this.element.offsetWidth+"px");y.setProperty("width",w);this.subscribe("hide",r,[(x||""),w])}}}YAHOO.extend(o,h,{init:function(v,u){o.superclass.init.call(this,v);this.beforeInitEvent.fire(o);a.addClass(this.element,o.CSS_PANEL);this.buildWrapper();if(u){this.cfg.applyConfig(u,true)}this.subscribe("showMask",this._addFocusHandlers);this.subscribe("hideMask",this._removeFocusHandlers);this.subscribe("beforeRender",j);this.subscribe("render",function(){this.setFirstLastFocusable();this.subscribe("changeContent",this.setFirstLastFocusable)});this.subscribe("show",this.focusFirst);this.initEvent.fire(o)},_onElementFocus:function(x){var w=t.getTarget(x);if(w!==this.element&&!a.isAncestor(this.element,w)&&s==this){try{if(this.firstElement){this.firstElement.focus()}else{if(this._modalFocus){this._modalFocus.focus()}else{this.innerElement.focus()}}}catch(v){try{if(w!==document&&w!==document.body&&w!==window){w.blur()}}catch(u){}}}},_addFocusHandlers:function(v,u){if(!this.firstElement){if(l.webkit||l.opera){if(!this._modalFocus){this._createHiddenFocusElement()}}else{this.innerElement.tabIndex=0}}this.setTabLoop(this.firstElement,this.lastElement);t.onFocus(document.documentElement,this._onElementFocus,this,true);s=this},_createHiddenFocusElement:function(){var u=document.createElement("button");u.style.height="1px";u.style.width="1px";u.style.position="absolute";u.style.left="-10000em";u.style.opacity=0;u.tabIndex="-1";this.innerElement.appendChild(u);this._modalFocus=u},_removeFocusHandlers:function(v,u){t.removeFocusListener(document.documentElement,this._onElementFocus,this);if(s==this){s=null}},focusFirst:function(w,u,y){var v=this.firstElement;if(u&&u[1]){t.stopEvent(u[1])}if(v){try{v.focus()}catch(x){}}},focusLast:function(w,u,y){var v=this.lastElement;if(u&&u[1]){t.stopEvent(u[1])}if(v){try{v.focus()}catch(x){}}},setTabLoop:function(x,z){var v=this.preventBackTab,w=this.preventTabOut,u=this.showEvent,y=this.hideEvent;if(v){v.disable();u.unsubscribe(v.enable,v);y.unsubscribe(v.disable,v);v=this.preventBackTab=null}if(w){w.disable();u.unsubscribe(w.enable,w);y.unsubscribe(w.disable,w);w=this.preventTabOut=null}if(x){this.preventBackTab=new k(x,{shift:true,keys:9},{fn:this.focusLast,scope:this,correctScope:true});v=this.preventBackTab;u.subscribe(v.enable,v,true);y.subscribe(v.disable,v,true)}if(z){this.preventTabOut=new k(z,{shift:false,keys:9},{fn:this.focusFirst,scope:this,correctScope:true});w=this.preventTabOut;u.subscribe(w.enable,w,true);y.subscribe(w.disable,w,true)}},getFocusableElements:function(u){u=u||this.innerElement;var x={};for(var w=0;w<o.FOCUSABLE.length;w++){x[o.FOCUSABLE[w]]=true}function v(y){if(y.focus&&y.type!=="hidden"&&!y.disabled&&x[y.tagName.toLowerCase()]){return true}return false}return a.getElementsBy(v,null,u)},setFirstLastFocusable:function(){this.firstElement=null;this.lastElement=null;var u=this.getFocusableElements();this.focusableElements=u;if(u.length>0){this.firstElement=u[0];this.lastElement=u[u.length-1]}if(this.cfg.getProperty("modal")){this.setTabLoop(this.firstElement,this.lastElement)}},initEvents:function(){o.superclass.initEvents.call(this);var u=m.LIST;this.showMaskEvent=this.createEvent(d.SHOW_MASK);this.showMaskEvent.signature=u;this.hideMaskEvent=this.createEvent(d.HIDE_MASK);this.hideMaskEvent.signature=u;this.dragEvent=this.createEvent(d.DRAG);this.dragEvent.signature=u},initDefaultConfig:function(){o.superclass.initDefaultConfig.call(this);this.cfg.addProperty(n.CLOSE.key,{handler:this.configClose,value:n.CLOSE.value,validator:n.CLOSE.validator,supercedes:n.CLOSE.supercedes});this.cfg.addProperty(n.DRAGGABLE.key,{handler:this.configDraggable,value:(f.DD)?true:false,validator:n.DRAGGABLE.validator,supercedes:n.DRAGGABLE.supercedes});this.cfg.addProperty(n.DRAG_ONLY.key,{value:n.DRAG_ONLY.value,validator:n.DRAG_ONLY.validator,supercedes:n.DRAG_ONLY.supercedes});this.cfg.addProperty(n.UNDERLAY.key,{handler:this.configUnderlay,value:n.UNDERLAY.value,supercedes:n.UNDERLAY.supercedes});this.cfg.addProperty(n.MODAL.key,{handler:this.configModal,value:n.MODAL.value,validator:n.MODAL.validator,supercedes:n.MODAL.supercedes});this.cfg.addProperty(n.KEY_LISTENERS.key,{handler:this.configKeyListeners,suppressEvent:n.KEY_LISTENERS.suppressEvent,supercedes:n.KEY_LISTENERS.supercedes});this.cfg.addProperty(n.STRINGS.key,{value:n.STRINGS.value,handler:this.configStrings,validator:n.STRINGS.validator,supercedes:n.STRINGS.supercedes})},configClose:function(x,v,y){var z=v[0],w=this.close,u=this.cfg.getProperty("strings");if(z){if(!w){if(!c){c=document.createElement("a");c.className="container-close";c.href="#"}w=c.cloneNode(true);this.innerElement.appendChild(w);w.innerHTML=(u&&u.close)?u.close:"&#160;";t.on(w,"click",this._doClose,this,true);this.close=w}else{w.style.display="block"}}else{if(w){w.style.display="none"}}},_doClose:function(u){t.preventDefault(u);this.hide()},configDraggable:function(v,u,w){var x=u[0];if(x){if(!f.DD){this.cfg.setProperty("draggable",false);return}if(this.header){a.setStyle(this.header,"cursor","move");this.registerDragDrop()}this.subscribe("beforeShow",b)}else{if(this.dd){this.dd.unreg()}if(this.header){a.setStyle(this.header,"cursor","auto")}this.unsubscribe("beforeShow",b)}},configUnderlay:function(D,C,z){var B=(this.platform=="mac"&&l.gecko),E=C[0].toLowerCase(),v=this.underlay,w=this.element;function F(){var G=this.underlay;a.addClass(G,"yui-force-redraw");window.setTimeout(function(){a.removeClass(G,"yui-force-redraw")},0)}function x(){var G=false;if(!v){if(!q){q=document.createElement("div");q.className="underlay"}v=q.cloneNode(false);this.element.appendChild(v);this.underlay=v;if(p){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(l.webkit&&l.webkit<420){this.changeContentEvent.subscribe(F)}G=true}}function A(){var G=x.call(this);if(!G&&p){this.sizeUnderlay()}this._underlayDeferred=false;this.beforeShowEvent.unsubscribe(A)}function y(){if(this._underlayDeferred){this.beforeShowEvent.unsubscribe(A);this._underlayDeferred=false}if(v){this.cfg.unsubscribeFromConfigEvent("width",this.sizeUnderlay);this.cfg.unsubscribeFromConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.sizeUnderlay);this.changeContentEvent.unsubscribe(F);YAHOO.widget.Module.textResizeEvent.unsubscribe(this.sizeUnderlay,this,true);this.element.removeChild(v);this.underlay=null}}switch(E){case"shadow":a.removeClass(w,"matte");a.addClass(w,"shadow");break;case"matte":if(!B){y.call(this)}a.removeClass(w,"shadow");a.addClass(w,"matte");break;default:if(!B){y.call(this)}a.removeClass(w,"shadow");a.removeClass(w,"matte");break}if((E=="shadow")||(B&&!v)){if(this.cfg.getProperty("visible")){var u=x.call(this);if(!u&&p){this.sizeUnderlay()}}else{if(!this._underlayDeferred){this.beforeShowEvent.subscribe(A);this._underlayDeferred=true}}}},configModal:function(v,u,x){var w=u[0];if(w){if(!this._hasModalityEventListeners){this.subscribe("beforeShow",this.buildMask);this.subscribe("beforeShow",this.bringToTop);this.subscribe("beforeShow",this.showMask);this.subscribe("hide",this.hideMask);h.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);h.windowResizeEvent.unsubscribe(this.sizeMask,this);this._hasModalityEventListeners=false}}},removeMask:function(){var v=this.mask,u;if(v){this.hideMask();u=v.parentNode;if(u){u.removeChild(v)}this.mask=null}},configKeyListeners:function(x,u,A){var w=u[0],z,y,v;if(w){if(w instanceof Array){y=w.length;for(v=0;v<y;v++){z=w[v];if(!i.alreadySubscribed(this.showEvent,z.enable,z)){this.showEvent.subscribe(z.enable,z,true)}if(!i.alreadySubscribed(this.hideEvent,z.disable,z)){this.hideEvent.subscribe(z.disable,z,true);this.destroyEvent.subscribe(z.disable,z,true)}}}else{if(!i.alreadySubscribed(this.showEvent,w.enable,w)){this.showEvent.subscribe(w.enable,w,true)}if(!i.alreadySubscribed(this.hideEvent,w.disable,w)){this.hideEvent.subscribe(w.disable,w,true);this.destroyEvent.subscribe(w.disable,w,true)}}}},configStrings:function(v,u,w){var x=e.merge(n.STRINGS.value,u[0]);this.cfg.setProperty(n.STRINGS.key,x,true)},configHeight:function(x,v,y){var u=v[0],w=this.innerElement;a.setStyle(w,"height",u);this.cfg.refireEvent("iframe")},_autoFillOnHeightChange:function(w,u,v){o.superclass._autoFillOnHeightChange.apply(this,arguments);if(p){this.sizeUnderlay()}},configWidth:function(x,u,y){var w=u[0],v=this.innerElement;a.setStyle(v,"width",w);this.cfg.refireEvent("iframe")},configzIndex:function(v,u,x){o.superclass.configzIndex.call(this,v,u,x);if(this.mask||this.cfg.getProperty("modal")===true){var w=a.getStyle(this.element,"zIndex");if(!w||isNaN(w)){w=0}if(w===0){this.cfg.setProperty("zIndex",1)}else{this.stackMask()}}},buildWrapper:function(){var w=this.element.parentNode,u=this.element,v=document.createElement("div");v.className=o.CSS_PANEL_CONTAINER;v.id=u.id+"_c";if(w){w.insertBefore(v,u)}v.appendChild(u);this.element=v;this.innerElement=u;a.setStyle(this.innerElement,"visibility","inherit")},sizeUnderlay:function(){var v=this.underlay,u;if(v){u=this.element;v.style.width=u.offsetWidth+"px";v.style.height=u.offsetHeight+"px"}},registerDragDrop:function(){var v=this;if(this.header){if(!f.DD){return}var u=(this.cfg.getProperty("dragonly")===true);this.dd=new f.DD(this.element.id,this.id,{dragOnly:u});if(!this.header.id){this.header.id=this.id+"_h"}this.dd.startDrag=function(){var x,z,w,C,B,A;if(YAHOO.env.ua.ie==6){a.addClass(v.element,"drag")}if(v.cfg.getProperty("constraintoviewport")){var y=h.VIEWPORT_OFFSET;x=v.element.offsetHeight;z=v.element.offsetWidth;w=a.getViewportWidth();C=a.getViewportHeight();B=a.getDocumentScrollLeft();A=a.getDocumentScrollTop();if(x+y<C){this.minY=A+y;this.maxY=A+C-x-y}else{this.minY=A+y;this.maxY=A+y}if(z+y<w){this.minX=B+y;this.maxX=B+w-z-y}else{this.minX=B+y;this.maxX=B+y}this.constrainX=true;this.constrainY=true}else{this.constrainX=false;this.constrainY=false}v.dragEvent.fire("startDrag",arguments)};this.dd.onDrag=function(){v.syncPosition();v.cfg.refireEvent("iframe");if(this.platform=="mac"&&YAHOO.env.ua.gecko){this.showMacGeckoScrollbars()}v.dragEvent.fire("onDrag",arguments)};this.dd.endDrag=function(){if(YAHOO.env.ua.ie==6){a.removeClass(v.element,"drag")}v.dragEvent.fire("endDrag",arguments);v.moveEvent.fire(v.cfg.getProperty("xy"))};this.dd.setHandleElId(this.header.id);this.dd.addInvalidHandleType("INPUT");this.dd.addInvalidHandleType("SELECT");this.dd.addInvalidHandleType("TEXTAREA")}},buildMask:function(){var u=this.mask;if(!u){if(!g){g=document.createElement("div");g.className="mask";g.innerHTML="&#160;"}u=g.cloneNode(true);u.id=this.id+"_mask";document.body.insertBefore(u,document.body.firstChild);this.mask=u;if(YAHOO.env.ua.gecko&&this.platform=="mac"){a.addClass(this.mask,"block-scrollbars")}this.stackMask()}},hideMask:function(){if(this.cfg.getProperty("modal")&&this.mask){this.mask.style.display="none";a.removeClass(document.body,"masked");this.hideMaskEvent.fire()}},showMask:function(){if(this.cfg.getProperty("modal")&&this.mask){a.addClass(document.body,"masked");this.sizeMask();this.mask.style.display="block";this.showMaskEvent.fire()}},sizeMask:function(){if(this.mask){var v=this.mask,w=a.getViewportWidth(),u=a.getViewportHeight();if(this.mask.offsetHeight>u){this.mask.style.height=u+"px"}if(this.mask.offsetWidth>w){this.mask.style.width=w+"px"}this.mask.style.height=a.getDocumentHeight()+"px";this.mask.style.width=a.getDocumentWidth()+"px"}},stackMask:function(){if(this.mask){var u=a.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(u)&&!isNaN(u)){a.setStyle(this.mask,"zIndex",u-1)}}},render:function(u){return o.superclass.render.call(this,u,this.innerElement)},destroy:function(){h.windowResizeEvent.unsubscribe(this.sizeMask,this);this.removeMask();if(this.close){t.purgeElement(this.close)}o.superclass.destroy.call(this)},toString:function(){return"Panel "+this.id}})}());(function(){YAHOO.widget.Dialog=function(j,i){YAHOO.widget.Dialog.superclass.constructor.call(this,j,i)};var b=YAHOO.util.Event,g=YAHOO.util.CustomEvent,e=YAHOO.util.Dom,a=YAHOO.widget.Dialog,f=YAHOO.lang,h={BEFORE_SUBMIT:"beforeSubmit",SUBMIT:"submit",MANUAL_SUBMIT:"manualSubmit",ASYNC_SUBMIT:"asyncSubmit",FORM_SUBMIT:"formSubmit",CANCEL:"cancel"},c={POST_METHOD:{key:"postmethod",value:"async"},BUTTONS:{key:"buttons",value:"none",supercedes:["visible"]},HIDEAFTERSUBMIT:{key:"hideaftersubmit",value:true}};a.CSS_DIALOG="yui-dialog";function d(){var m=this._aButtons,k,l,j;if(f.isArray(m)){k=m.length;if(k>0){j=k-1;do{l=m[j];if(YAHOO.widget.Button&&l instanceof YAHOO.widget.Button){l.destroy()}else{if(l.tagName.toUpperCase()=="BUTTON"){b.purgeElement(l);b.purgeElement(l,false)}}}while(j--)}}}YAHOO.extend(a,YAHOO.widget.Panel,{form:null,initDefaultConfig:function(){a.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null};this.cfg.addProperty(c.POST_METHOD.key,{handler:this.configPostMethod,value:c.POST_METHOD.value,validator:function(i){if(i!="form"&&i!="async"&&i!="none"&&i!="manual"){return false}else{return true}}});this.cfg.addProperty(c.HIDEAFTERSUBMIT.key,{value:c.HIDEAFTERSUBMIT.value});this.cfg.addProperty(c.BUTTONS.key,{handler:this.configButtons,value:c.BUTTONS.value,supercedes:c.BUTTONS.supercedes})},initEvents:function(){a.superclass.initEvents.call(this);var i=g.LIST;this.beforeSubmitEvent=this.createEvent(h.BEFORE_SUBMIT);this.beforeSubmitEvent.signature=i;this.submitEvent=this.createEvent(h.SUBMIT);this.submitEvent.signature=i;this.manualSubmitEvent=this.createEvent(h.MANUAL_SUBMIT);this.manualSubmitEvent.signature=i;this.asyncSubmitEvent=this.createEvent(h.ASYNC_SUBMIT);this.asyncSubmitEvent.signature=i;this.formSubmitEvent=this.createEvent(h.FORM_SUBMIT);this.formSubmitEvent.signature=i;this.cancelEvent=this.createEvent(h.CANCEL);this.cancelEvent.signature=i},init:function(j,i){a.superclass.init.call(this,j);this.beforeInitEvent.fire(a);e.addClass(this.element,a.CSS_DIALOG);this.cfg.setProperty("visible",false);if(i){this.cfg.applyConfig(i,true)}this.showEvent.subscribe(this.focusFirst,this,true);this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.subscribe("changeBody",this.registerForm);this.initEvent.fire(a)},doSubmit:function(){var k=YAHOO.util.Connect,q=this.form,o=false,n=false,p,j,m,l;switch(this.cfg.getProperty("postmethod")){case"async":p=q.elements;j=p.length;if(j>0){m=j-1;do{if(p[m].type=="file"){o=true;break}}while(m--)}if(o&&YAHOO.env.ua.ie&&this.isSecure){n=true}l=this._getFormAttributes(q);k.setForm(q,o,n);k.asyncRequest(l.method,l.action,this.callback);this.asyncSubmitEvent.fire();break;case"form":q.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break}},_getFormAttributes:function(k){var i={method:null,action:null};if(k){if(k.getAttributeNode){var j=k.getAttributeNode("action");var l=k.getAttributeNode("method");if(j){i.action=j.value}if(l){i.method=l.value}}else{i.action=k.getAttribute("action");i.method=k.getAttribute("method")}}i.method=(f.isString(i.method)?i.method:"POST").toUpperCase();i.action=f.isString(i.action)?i.action:"";return i},registerForm:function(){return;var i=this.element.getElementsByTagName("form")[0];if(this.form){if(this.form==i&&e.isAncestor(this.element,this.form)){return}else{b.purgeElement(this.form);this.form=null}}if(!i){i=document.createElement("form");i.name="frm_"+this.id;this.body.appendChild(i)}if(i){this.form=i;b.on(i,"submit",this._submitHandler,this,true)}},_submitHandler:function(i){b.stopEvent(i);this.submit();this.form.blur()},setTabLoop:function(i,j){i=i||this.firstButton;j=this.lastButton||j;a.superclass.setTabLoop.call(this,i,j)},setFirstLastFocusable:function(){a.superclass.setFirstLastFocusable.call(this);var k,j,m,n=this.focusableElements;this.firstFormElement=null;this.lastFormElement=null;if(this.form&&n&&n.length>0){j=n.length;for(k=0;k<j;++k){m=n[k];if(this.form===m.form){this.firstFormElement=m;break}}for(k=j-1;k>=0;--k){m=n[k];if(this.form===m.form){this.lastFormElement=m;break}}}},configClose:function(j,i,k){a.superclass.configClose.apply(this,arguments)},_doClose:function(i){b.preventDefault(i);this.cancel()},configButtons:function(t,s,n){var o=YAHOO.widget.Button,v=s[0],l=this.innerElement,u,q,k,r,p,j,m;d.call(this);this._aButtons=null;if(f.isArray(v)){p=document.createElement("span");p.className="button-group";r=v.length;this._aButtons=[];this.defaultHtmlButton=null;for(m=0;m<r;m++){u=v[m];if(o){k=new o({label:u.text});k.appendTo(p);q=k.get("element");if(u.isDefault){k.addClass("default");this.defaultHtmlButton=q}if(f.isFunction(u.handler)){k.set("onclick",{fn:u.handler,obj:this,scope:this})}else{if(f.isObject(u.handler)&&f.isFunction(u.handler.fn)){k.set("onclick",{fn:u.handler.fn,obj:((!f.isUndefined(u.handler.obj))?u.handler.obj:this),scope:(u.handler.scope||this)})}}this._aButtons[this._aButtons.length]=k}else{q=document.createElement("button");q.setAttribute("type","button");if(u.isDefault){q.className="default";this.defaultHtmlButton=q}q.innerHTML=u.text;if(f.isFunction(u.handler)){b.on(q,"click",u.handler,this,true)}else{if(f.isObject(u.handler)&&f.isFunction(u.handler.fn)){b.on(q,"click",u.handler.fn,((!f.isUndefined(u.handler.obj))?u.handler.obj:this),(u.handler.scope||this))}}p.appendChild(q);this._aButtons[this._aButtons.length]=q}u.htmlButton=q;if(m===0){this.firstButton=q}if(m==(r-1)){this.lastButton=q}}this.setFooter(p);j=this.footer;if(e.inDocument(this.element)&&!e.isAncestor(l,j)){l.appendChild(j)}this.buttonSpan=p}else{p=this.buttonSpan;j=this.footer;if(p&&j){j.removeChild(p);this.buttonSpan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null}}this.setFirstLastFocusable();this.cfg.refireEvent("iframe");this.cfg.refireEvent("underlay")},getButtons:function(){return this._aButtons||null},focusFirst:function(k,i,m){var j=this.firstFormElement;if(i&&i[1]){b.stopEvent(i[1])}if(j){try{j.focus()}catch(l){}}else{this.focusFirstButton()}},focusLast:function(k,i,m){var n=this.cfg.getProperty("buttons"),j=this.lastFormElement;if(i&&i[1]){b.stopEvent(i[1])}if(n&&f.isArray(n)){this.focusLastButton()}else{if(j){try{j.focus()}catch(l){}}}},_getButton:function(j){var i=YAHOO.widget.Button;if(i&&j&&j.nodeName&&j.id){j=i.getButton(j.id)||j}return j},focusDefaultButton:function(){var i=this._getButton(this.defaultHtmlButton);if(i){try{i.focus()}catch(j){}}},blurButtons:function(){var o=this.cfg.getProperty("buttons"),l,n,k,j;if(o&&f.isArray(o)){l=o.length;if(l>0){j=(l-1);do{n=o[j];if(n){k=this._getButton(n.htmlButton);if(k){try{k.blur()}catch(m){}}}}while(j--)}}},focusFirstButton:function(){var l=this.cfg.getProperty("buttons"),k,i;if(l&&f.isArray(l)){k=l[0];if(k){i=this._getButton(k.htmlButton);if(i){try{i.focus()}catch(j){}}}}},focusLastButton:function(){var m=this.cfg.getProperty("buttons"),j,l,i;if(m&&f.isArray(m)){j=m.length;if(j>0){l=m[(j-1)];if(l){i=this._getButton(l.htmlButton);if(i){try{i.focus()}catch(k){}}}}}},configPostMethod:function(j,i,k){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,l,t,w,o,u,r,q,k,x,m,y,B,j,p,C,z,v;function s(n){var i=n.tagName.toUpperCase();return((i=="INPUT"||i=="TEXTAREA"||i=="SELECT")&&n.name==o)}if(A){l=A.elements;t=l.length;w={};for(z=0;z<t;z++){o=l[z].name;u=e.getElementsBy(s,"*",A);r=u.length;if(r>0){if(r==1){u=u[0];q=u.type;k=u.tagName.toUpperCase();switch(k){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;m=x.length;y=[];for(v=0;v<m;v++){B=x[v];if(B.selected){j=B.value;if(!j||j===""){j=B.text}y[y.length]=j}}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(){d.call(this);this._aButtons=null;var i=this.element.getElementsByTagName("form"),j;if(i.length>0){j=i[0];if(j){b.purgeElement(j);if(j.parentNode){j.parentNode.removeChild(j)}this.form=null}}a.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(e,h,g,d,f){if(!f){f=YAHOO.util.Anim}this.overlay=e;this.attrIn=h;this.attrOut=g;this.targetElement=d||e.element;this.animClass=f};var b=YAHOO.util.Dom,c=YAHOO.util.CustomEvent,a=YAHOO.widget.ContainerEffect;a.FADE=function(d,f){var g=YAHOO.util.Easing,i={attributes:{opacity:{from:0,to:1}},duration:f,method:g.easeIn},e={attributes:{opacity:{to:0}},duration:f,method:g.easeOut},h=new a(d,i,e,d.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(d.element,"yui-effect-fade")}}};h.handleUnderlayComplete=function(){var j=this.overlay.underlay;if(j&&YAHOO.env.ua.ie){b.removeClass(d.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(f,d){var i=YAHOO.util.Easing,l=f.cfg.getProperty("x")||b.getX(f.element),k=f.cfg.getProperty("y")||b.getY(f.element),m=b.getClientWidth(),h=f.element.offsetWidth,j={attributes:{points:{to:[l,k]}},duration:d,method:i.easeIn},e={attributes:{points:{to:[(m+25),k]}},duration:d,method:i.easeOut},g=new a(f,j,e,f.element,YAHOO.util.Motion);g.handleStartAnimateIn=function(o,n,p){p.overlay.element.style.left=((-25)-h)+"px";p.overlay.element.style.top=k+"px"};g.handleTweenAnimateIn=function(q,p,r){var s=b.getXY(r.overlay.element),o=s[0],n=s[1];if(b.getStyle(r.overlay.element,"visibility")=="hidden"&&o<l){b.setStyle(r.overlay.element,"visibility","visible")}r.overlay.cfg.setProperty("xy",[o,n],true);r.overlay.cfg.refireEvent("iframe")};g.handleCompleteAnimateIn=function(o,n,p){p.overlay.cfg.setProperty("xy",[l,k],true);p.startX=l;p.startY=k;p.overlay.cfg.refireEvent("iframe");p.animateInCompleteEvent.fire()};g.handleStartAnimateOut=function(o,n,r){var p=b.getViewportWidth(),s=b.getXY(r.overlay.element),q=s[1];r.animOut.attributes.points.to=[(p+25),q]};g.handleTweenAnimateOut=function(p,o,q){var s=b.getXY(q.overlay.element),n=s[0],r=s[1];q.overlay.cfg.setProperty("xy",[n,r],true);q.overlay.cfg.refireEvent("iframe")};g.handleCompleteAnimateOut=function(o,n,p){b.setStyle(p.overlay.element,"visibility","hidden");p.overlay.cfg.setProperty("xy",[l,k]);p.animateOutCompleteEvent.fire()};g.init();return g};a.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=c.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=c.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=c.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=c.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(e,d,f){},handleTweenAnimateIn:function(e,d,f){},handleCompleteAnimateIn:function(e,d,f){},handleStartAnimateOut:function(e,d,f){},handleTweenAnimateOut:function(e,d,f){},handleCompleteAnimateOut:function(e,d,f){},toString:function(){var d="ContainerEffect";if(this.overlay){d+=" ["+this.overlay.toString()+"]"}return d}};YAHOO.lang.augmentProto(a,YAHOO.util.EventProvider)})();YAHOO.register("container",YAHOO.widget.Module,{version:"2.6.0",build:"1321"});
/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.6.0
*/
(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=this.config,G,E;for(G in F){if(B.hasOwnProperty(F,G)){E=F[G];if(E&&E.event){D[G]=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){if(B.hasOwnProperty(this.config,D)){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;}};(function(){var C=YAHOO.util.Dom,A=YAHOO.util.Event,E=YAHOO.lang,D=YAHOO.widget.DateMath;function F(I,G,H){this.init.apply(this,arguments);}F.IMG_ROOT=null;F.DATE="D";F.MONTH_DAY="MD";F.WEEKDAY="WD";F.RANGE="R";F.MONTH="M";F.DISPLAY_DAYS=42;F.STOP_RENDER="S";F.SHORT="short";F.LONG="long";F.MEDIUM="medium";F.ONE_CHAR="1char";F._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},STRINGS:{key:"strings",value:{previousMonth:"Previous Month",nextMonth:"Next Month",close:"Close"},supercedes:["close","title"]}};var B=F._DEFAULT_CONFIG;F._EVENT_TYPES={BEFORE_SELECT:"beforeSelect",SELECT:"select",BEFORE_DESELECT:"beforeDeselect",DESELECT:"deselect",CHANGE_PAGE:"changePage",BEFORE_RENDER:"beforeRender",RENDER:"render",BEFORE_DESTROY:"beforeDestroy",DESTROY:"destroy",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"};F._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"};F.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(H){var G={id:null,container:null,config:null};if(H&&H.length&&H.length>0){switch(H.length){case 1:G.id=null;G.container=H[0];G.config=null;break;case 2:if(E.isObject(H[1])&&!H[1].tagName&&!(H[1] instanceof String)){G.id=null;G.container=H[0];G.config=H[1];}else{G.id=H[0];G.container=H[1];G.config=null;}break;default:G.id=H[0];G.container=H[1];G.config=H[2];break;}}else{}return G;},init:function(J,H,I){var G=this._parseArgs(arguments);J=G.id;H=G.container;I=G.config;this.oDomContainer=C.get(H);if(!this.oDomContainer.id){this.oDomContainer.id=C.generateId();}if(!J){J=this.oDomContainer.id+"_t";}this.id=J;this.containerId=this.oDomContainer.id;this.initEvents();this.today=new Date();D.clearTime(this.today);this.cfg=new YAHOO.util.Config(this);this.Options={};this.Locale={};this.initStyles();C.addClass(this.oDomContainer,this.Style.CSS_CONTAINER);
C.addClass(this.oDomContainer,this.Style.CSS_SINGLE);this.cellDates=[];this.cells=[];this.renderStack=[];this._renderStack=[];this.setupConfig();if(I){this.cfg.applyConfig(I,true);}this.cfg.fireQueue();},configIframe:function(I,H,J){var G=H[0];if(!this.parent){if(C.inDocument(this.oDomContainer)){if(G){var K=C.getStyle(this.oDomContainer,"position");if(K=="absolute"||K=="relative"){if(!C.inDocument(this.iframe)){this.iframe=document.createElement("iframe");this.iframe.src="javascript:false;";C.setStyle(this.iframe,"opacity","0");if(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6){C.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(H,G,I){var K=G[0];if(K){this.createTitleBar(K);}else{var J=this.cfg.getProperty(B.CLOSE.key);if(!J){this.removeTitleBar();}else{this.createTitleBar("&#160;");}}},configClose:function(H,G,I){var K=G[0],J=this.cfg.getProperty(B.TITLE.key);if(K){if(!J){this.createTitleBar("&#160;");}this.createCloseButton();}else{this.removeCloseButton();if(!J){this.removeTitleBar();}}},initEvents:function(){var G=F._EVENT_TYPES,I=YAHOO.util.CustomEvent,H=this;H.beforeSelectEvent=new I(G.BEFORE_SELECT);H.selectEvent=new I(G.SELECT);H.beforeDeselectEvent=new I(G.BEFORE_DESELECT);H.deselectEvent=new I(G.DESELECT);H.changePageEvent=new I(G.CHANGE_PAGE);H.beforeRenderEvent=new I(G.BEFORE_RENDER);H.renderEvent=new I(G.RENDER);H.beforeDestroyEvent=new I(G.BEFORE_DESTROY);H.destroyEvent=new I(G.DESTROY);H.resetEvent=new I(G.RESET);H.clearEvent=new I(G.CLEAR);H.beforeShowEvent=new I(G.BEFORE_SHOW);H.showEvent=new I(G.SHOW);H.beforeHideEvent=new I(G.BEFORE_HIDE);H.hideEvent=new I(G.HIDE);H.beforeShowNavEvent=new I(G.BEFORE_SHOW_NAV);H.showNavEvent=new I(G.SHOW_NAV);H.beforeHideNavEvent=new I(G.BEFORE_HIDE_NAV);H.hideNavEvent=new I(G.HIDE_NAV);H.beforeRenderNavEvent=new I(G.BEFORE_RENDER_NAV);H.renderNavEvent=new I(G.RENDER_NAV);H.beforeSelectEvent.subscribe(H.onBeforeSelect,this,true);H.selectEvent.subscribe(H.onSelect,this,true);H.beforeDeselectEvent.subscribe(H.onBeforeDeselect,this,true);H.deselectEvent.subscribe(H.onDeselect,this,true);H.changePageEvent.subscribe(H.onChangePage,this,true);H.renderEvent.subscribe(H.onRender,this,true);H.resetEvent.subscribe(H.onReset,this,true);H.clearEvent.subscribe(H.onClear,this,true);},doPreviousMonthNav:function(H,G){A.preventDefault(H);setTimeout(function(){G.previousMonth();var I=C.getElementsByClassName(G.Style.CSS_NAV_LEFT,"a",G.oDomContainer);if(I&&I[0]){try{I[0].focus();}catch(J){}}},0);},doNextMonthNav:function(H,G){A.preventDefault(H);setTimeout(function(){G.nextMonth();var I=C.getElementsByClassName(G.Style.CSS_NAV_RIGHT,"a",G.oDomContainer);if(I&&I[0]){try{I[0].focus();}catch(J){}}},0);},doSelectCell:function(M,G){var R,O,I,L;var N=A.getTarget(M),H=N.tagName.toLowerCase(),K=false;while(H!="td"&&!C.hasClass(N,G.Style.CSS_CELL_SELECTABLE)){if(!K&&H=="a"&&C.hasClass(N,G.Style.CSS_CELL_SELECTOR)){K=true;}N=N.parentNode;H=N.tagName.toLowerCase();if(N==this.oDomContainer||H=="html"){return ;}}if(K){A.preventDefault(M);}R=N;if(C.hasClass(R,G.Style.CSS_CELL_SELECTABLE)){L=G.getIndexFromId(R.id);if(L>-1){O=G.cellDates[L];if(O){I=D.getDate(O[0],O[1]-1,O[2]);var Q;if(G.Options.MULTI_SELECT){Q=R.getElementsByTagName("a")[0];if(Q){Q.blur();}var J=G.cellDates[L];var P=G._indexOfSelectedFieldArray(J);if(P>-1){G.deselectCell(L);}else{G.selectCell(L);}}else{Q=R.getElementsByTagName("a")[0];if(Q){Q.blur();}G.selectCell(L);}}}}},doCellMouseOver:function(I,H){var G;if(I){G=A.getTarget(I);}else{G=this;}while(G.tagName&&G.tagName.toLowerCase()!="td"){G=G.parentNode;if(!G.tagName||G.tagName.toLowerCase()=="html"){return ;}}if(C.hasClass(G,H.Style.CSS_CELL_SELECTABLE)){C.addClass(G,H.Style.CSS_CELL_HOVER);}},doCellMouseOut:function(I,H){var G;if(I){G=A.getTarget(I);}else{G=this;}while(G.tagName&&G.tagName.toLowerCase()!="td"){G=G.parentNode;if(!G.tagName||G.tagName.toLowerCase()=="html"){return ;}}if(C.hasClass(G,H.Style.CSS_CELL_SELECTABLE)){C.removeClass(G,H.Style.CSS_CELL_HOVER);}},setupConfig:function(){var G=this.cfg;G.addProperty(B.PAGEDATE.key,{value:new Date(),handler:this.configPageDate});G.addProperty(B.SELECTED.key,{value:[],handler:this.configSelected});G.addProperty(B.TITLE.key,{value:B.TITLE.value,handler:this.configTitle});G.addProperty(B.CLOSE.key,{value:B.CLOSE.value,handler:this.configClose});G.addProperty(B.IFRAME.key,{value:B.IFRAME.value,handler:this.configIframe,validator:G.checkBoolean});G.addProperty(B.MINDATE.key,{value:B.MINDATE.value,handler:this.configMinDate});G.addProperty(B.MAXDATE.key,{value:B.MAXDATE.value,handler:this.configMaxDate});G.addProperty(B.MULTI_SELECT.key,{value:B.MULTI_SELECT.value,handler:this.configOptions,validator:G.checkBoolean});G.addProperty(B.START_WEEKDAY.key,{value:B.START_WEEKDAY.value,handler:this.configOptions,validator:G.checkNumber});G.addProperty(B.SHOW_WEEKDAYS.key,{value:B.SHOW_WEEKDAYS.value,handler:this.configOptions,validator:G.checkBoolean});G.addProperty(B.SHOW_WEEK_HEADER.key,{value:B.SHOW_WEEK_HEADER.value,handler:this.configOptions,validator:G.checkBoolean});G.addProperty(B.SHOW_WEEK_FOOTER.key,{value:B.SHOW_WEEK_FOOTER.value,handler:this.configOptions,validator:G.checkBoolean});G.addProperty(B.HIDE_BLANK_WEEKS.key,{value:B.HIDE_BLANK_WEEKS.value,handler:this.configOptions,validator:G.checkBoolean});G.addProperty(B.NAV_ARROW_LEFT.key,{value:B.NAV_ARROW_LEFT.value,handler:this.configOptions});G.addProperty(B.NAV_ARROW_RIGHT.key,{value:B.NAV_ARROW_RIGHT.value,handler:this.configOptions});G.addProperty(B.MONTHS_SHORT.key,{value:B.MONTHS_SHORT.value,handler:this.configLocale});G.addProperty(B.MONTHS_LONG.key,{value:B.MONTHS_LONG.value,handler:this.configLocale});G.addProperty(B.WEEKDAYS_1CHAR.key,{value:B.WEEKDAYS_1CHAR.value,handler:this.configLocale});G.addProperty(B.WEEKDAYS_SHORT.key,{value:B.WEEKDAYS_SHORT.value,handler:this.configLocale});
G.addProperty(B.WEEKDAYS_MEDIUM.key,{value:B.WEEKDAYS_MEDIUM.value,handler:this.configLocale});G.addProperty(B.WEEKDAYS_LONG.key,{value:B.WEEKDAYS_LONG.value,handler:this.configLocale});var H=function(){G.refireEvent(B.LOCALE_MONTHS.key);G.refireEvent(B.LOCALE_WEEKDAYS.key);};G.subscribeToConfigEvent(B.START_WEEKDAY.key,H,this,true);G.subscribeToConfigEvent(B.MONTHS_SHORT.key,H,this,true);G.subscribeToConfigEvent(B.MONTHS_LONG.key,H,this,true);G.subscribeToConfigEvent(B.WEEKDAYS_1CHAR.key,H,this,true);G.subscribeToConfigEvent(B.WEEKDAYS_SHORT.key,H,this,true);G.subscribeToConfigEvent(B.WEEKDAYS_MEDIUM.key,H,this,true);G.subscribeToConfigEvent(B.WEEKDAYS_LONG.key,H,this,true);G.addProperty(B.LOCALE_MONTHS.key,{value:B.LOCALE_MONTHS.value,handler:this.configLocaleValues});G.addProperty(B.LOCALE_WEEKDAYS.key,{value:B.LOCALE_WEEKDAYS.value,handler:this.configLocaleValues});G.addProperty(B.DATE_DELIMITER.key,{value:B.DATE_DELIMITER.value,handler:this.configLocale});G.addProperty(B.DATE_FIELD_DELIMITER.key,{value:B.DATE_FIELD_DELIMITER.value,handler:this.configLocale});G.addProperty(B.DATE_RANGE_DELIMITER.key,{value:B.DATE_RANGE_DELIMITER.value,handler:this.configLocale});G.addProperty(B.MY_MONTH_POSITION.key,{value:B.MY_MONTH_POSITION.value,handler:this.configLocale,validator:G.checkNumber});G.addProperty(B.MY_YEAR_POSITION.key,{value:B.MY_YEAR_POSITION.value,handler:this.configLocale,validator:G.checkNumber});G.addProperty(B.MD_MONTH_POSITION.key,{value:B.MD_MONTH_POSITION.value,handler:this.configLocale,validator:G.checkNumber});G.addProperty(B.MD_DAY_POSITION.key,{value:B.MD_DAY_POSITION.value,handler:this.configLocale,validator:G.checkNumber});G.addProperty(B.MDY_MONTH_POSITION.key,{value:B.MDY_MONTH_POSITION.value,handler:this.configLocale,validator:G.checkNumber});G.addProperty(B.MDY_DAY_POSITION.key,{value:B.MDY_DAY_POSITION.value,handler:this.configLocale,validator:G.checkNumber});G.addProperty(B.MDY_YEAR_POSITION.key,{value:B.MDY_YEAR_POSITION.value,handler:this.configLocale,validator:G.checkNumber});G.addProperty(B.MY_LABEL_MONTH_POSITION.key,{value:B.MY_LABEL_MONTH_POSITION.value,handler:this.configLocale,validator:G.checkNumber});G.addProperty(B.MY_LABEL_YEAR_POSITION.key,{value:B.MY_LABEL_YEAR_POSITION.value,handler:this.configLocale,validator:G.checkNumber});G.addProperty(B.MY_LABEL_MONTH_SUFFIX.key,{value:B.MY_LABEL_MONTH_SUFFIX.value,handler:this.configLocale});G.addProperty(B.MY_LABEL_YEAR_SUFFIX.key,{value:B.MY_LABEL_YEAR_SUFFIX.value,handler:this.configLocale});G.addProperty(B.NAV.key,{value:B.NAV.value,handler:this.configNavigator});G.addProperty(B.STRINGS.key,{value:B.STRINGS.value,handler:this.configStrings,validator:function(I){return E.isObject(I);},supercedes:B.STRINGS.supercedes});},configStrings:function(H,G,I){var J=E.merge(B.STRINGS.value,G[0]);this.cfg.setProperty(B.STRINGS.key,J,true);},configPageDate:function(H,G,I){this.cfg.setProperty(B.PAGEDATE.key,this._parsePageDate(G[0]),true);},configMinDate:function(H,G,I){var J=G[0];if(E.isString(J)){J=this._parseDate(J);this.cfg.setProperty(B.MINDATE.key,D.getDate(J[0],(J[1]-1),J[2]));}},configMaxDate:function(H,G,I){var J=G[0];if(E.isString(J)){J=this._parseDate(J);this.cfg.setProperty(B.MAXDATE.key,D.getDate(J[0],(J[1]-1),J[2]));}},configSelected:function(I,G,K){var H=G[0],J=B.SELECTED.key;if(H){if(E.isString(H)){this.cfg.setProperty(J,this._parseDates(H),true);}}if(!this._selectedDates){this._selectedDates=this.cfg.getProperty(J);}},configOptions:function(H,G,I){this.Options[H.toUpperCase()]=G[0];},configLocale:function(H,G,I){this.Locale[H.toUpperCase()]=G[0];this.cfg.refireEvent(B.LOCALE_MONTHS.key);this.cfg.refireEvent(B.LOCALE_WEEKDAYS.key);},configLocaleValues:function(J,I,K){J=J.toLowerCase();var M=I[0],H=this.cfg,N=this.Locale;switch(J){case B.LOCALE_MONTHS.key:switch(M){case F.SHORT:N.LOCALE_MONTHS=H.getProperty(B.MONTHS_SHORT.key).concat();break;case F.LONG:N.LOCALE_MONTHS=H.getProperty(B.MONTHS_LONG.key).concat();break;}break;case B.LOCALE_WEEKDAYS.key:switch(M){case F.ONE_CHAR:N.LOCALE_WEEKDAYS=H.getProperty(B.WEEKDAYS_1CHAR.key).concat();break;case F.SHORT:N.LOCALE_WEEKDAYS=H.getProperty(B.WEEKDAYS_SHORT.key).concat();break;case F.MEDIUM:N.LOCALE_WEEKDAYS=H.getProperty(B.WEEKDAYS_MEDIUM.key).concat();break;case F.LONG:N.LOCALE_WEEKDAYS=H.getProperty(B.WEEKDAYS_LONG.key).concat();break;}var L=H.getProperty(B.START_WEEKDAY.key);if(L>0){for(var G=0;G<L;++G){N.LOCALE_WEEKDAYS.push(N.LOCALE_WEEKDAYS.shift());}}break;}},configNavigator:function(H,G,I){var J=G[0];if(YAHOO.widget.CalendarNavigator&&(J===true||E.isObject(J))){if(!this.oNavigator){this.oNavigator=new YAHOO.widget.CalendarNavigator(this);this.beforeRenderEvent.subscribe(function(){if(!this.pages){this.oNavigator.erase();}},this,true);}}else{if(this.oNavigator){this.oNavigator.destroy();this.oNavigator=null;}}},initStyles:function(){var G=F._STYLES;this.Style={CSS_ROW_HEADER:G.CSS_ROW_HEADER,CSS_ROW_FOOTER:G.CSS_ROW_FOOTER,CSS_CELL:G.CSS_CELL,CSS_CELL_SELECTOR:G.CSS_CELL_SELECTOR,CSS_CELL_SELECTED:G.CSS_CELL_SELECTED,CSS_CELL_SELECTABLE:G.CSS_CELL_SELECTABLE,CSS_CELL_RESTRICTED:G.CSS_CELL_RESTRICTED,CSS_CELL_TODAY:G.CSS_CELL_TODAY,CSS_CELL_OOM:G.CSS_CELL_OOM,CSS_CELL_OOB:G.CSS_CELL_OOB,CSS_HEADER:G.CSS_HEADER,CSS_HEADER_TEXT:G.CSS_HEADER_TEXT,CSS_BODY:G.CSS_BODY,CSS_WEEKDAY_CELL:G.CSS_WEEKDAY_CELL,CSS_WEEKDAY_ROW:G.CSS_WEEKDAY_ROW,CSS_FOOTER:G.CSS_FOOTER,CSS_CALENDAR:G.CSS_CALENDAR,CSS_SINGLE:G.CSS_SINGLE,CSS_CONTAINER:G.CSS_CONTAINER,CSS_NAV_LEFT:G.CSS_NAV_LEFT,CSS_NAV_RIGHT:G.CSS_NAV_RIGHT,CSS_NAV:G.CSS_NAV,CSS_CLOSE:G.CSS_CLOSE,CSS_CELL_TOP:G.CSS_CELL_TOP,CSS_CELL_LEFT:G.CSS_CELL_LEFT,CSS_CELL_RIGHT:G.CSS_CELL_RIGHT,CSS_CELL_BOTTOM:G.CSS_CELL_BOTTOM,CSS_CELL_HOVER:G.CSS_CELL_HOVER,CSS_CELL_HIGHLIGHT1:G.CSS_CELL_HIGHLIGHT1,CSS_CELL_HIGHLIGHT2:G.CSS_CELL_HIGHLIGHT2,CSS_CELL_HIGHLIGHT3:G.CSS_CELL_HIGHLIGHT3,CSS_CELL_HIGHLIGHT4:G.CSS_CELL_HIGHLIGHT4};},buildMonthLabel:function(){return this._buildMonthLabel(this.cfg.getProperty(B.PAGEDATE.key));},_buildMonthLabel:function(G){var I=this.Locale.LOCALE_MONTHS[G.getMonth()]+this.Locale.MY_LABEL_MONTH_SUFFIX,H=G.getFullYear()+this.Locale.MY_LABEL_YEAR_SUFFIX;
if(this.Locale.MY_LABEL_MONTH_POSITION==2||this.Locale.MY_LABEL_YEAR_POSITION==1){return H+I;}else{return I+H;}},buildDayLabel:function(G){return G.getDate();},createTitleBar:function(G){var H=C.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE,"div",this.oDomContainer)[0]||document.createElement("div");H.className=YAHOO.widget.CalendarGroup.CSS_2UPTITLE;H.innerHTML=G;this.oDomContainer.insertBefore(H,this.oDomContainer.firstChild);C.addClass(this.oDomContainer,"withtitle");return H;},removeTitleBar:function(){var G=C.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE,"div",this.oDomContainer)[0]||null;if(G){A.purgeElement(G);this.oDomContainer.removeChild(G);}C.removeClass(this.oDomContainer,"withtitle");},createCloseButton:function(){var J=YAHOO.widget.CalendarGroup.CSS_2UPCLOSE,L="us/my/bn/x_d.gif",K=C.getElementsByClassName("link-close","a",this.oDomContainer)[0],G=this.cfg.getProperty(B.STRINGS.key),H=(G&&G.close)?G.close:"";if(!K){K=document.createElement("a");A.addListener(K,"click",function(N,M){M.hide();A.preventDefault(N);},this);}K.href="#";K.className="link-close";if(F.IMG_ROOT!==null){var I=C.getElementsByClassName(J,"img",K)[0]||document.createElement("img");I.src=F.IMG_ROOT+L;I.className=J;K.appendChild(I);}else{K.innerHTML='<span class="'+J+" "+this.Style.CSS_CLOSE+'">'+H+"</span>";}this.oDomContainer.appendChild(K);return K;},removeCloseButton:function(){var G=C.getElementsByClassName("link-close","a",this.oDomContainer)[0]||null;if(G){A.purgeElement(G);this.oDomContainer.removeChild(G);}},renderHeader:function(Q){var P=7,O="us/tr/callt.gif",G="us/tr/calrt.gif",N=this.cfg,K=N.getProperty(B.PAGEDATE.key),L=N.getProperty(B.STRINGS.key),V=(L&&L.previousMonth)?L.previousMonth:"",H=(L&&L.nextMonth)?L.nextMonth:"",M;if(N.getProperty(B.SHOW_WEEK_HEADER.key)){P+=1;}if(N.getProperty(B.SHOW_WEEK_FOOTER.key)){P+=1;}Q[Q.length]="<thead>";Q[Q.length]="<tr>";Q[Q.length]='<th colspan="'+P+'" class="'+this.Style.CSS_HEADER_TEXT+'">';Q[Q.length]='<div class="'+this.Style.CSS_HEADER+'">';var X,U=false;if(this.parent){if(this.index===0){X=true;}if(this.index==(this.parent.cfg.getProperty("pages")-1)){U=true;}}else{X=true;U=true;}if(X){M=this._buildMonthLabel(D.subtract(K,D.MONTH,1));var R=N.getProperty(B.NAV_ARROW_LEFT.key);if(R===null&&F.IMG_ROOT!==null){R=F.IMG_ROOT+O;}var I=(R===null)?"":' style="background-image:url('+R+')"';Q[Q.length]='<a class="'+this.Style.CSS_NAV_LEFT+'"'+I+' href="#">'+V+" ("+M+")"+"</a>";}var W=this.buildMonthLabel();var S=this.parent||this;if(S.cfg.getProperty("navigator")){W='<a class="'+this.Style.CSS_NAV+'" href="#">'+W+"</a>";}Q[Q.length]=W;if(U){M=this._buildMonthLabel(D.add(K,D.MONTH,1));var T=N.getProperty(B.NAV_ARROW_RIGHT.key);if(T===null&&F.IMG_ROOT!==null){T=F.IMG_ROOT+G;}var J=(T===null)?"":' style="background-image:url('+T+')"';Q[Q.length]='<a class="'+this.Style.CSS_NAV_RIGHT+'"'+J+' href="#">'+H+" ("+M+")"+"</a>";}Q[Q.length]="</div>\n</th>\n</tr>";if(N.getProperty(B.SHOW_WEEKDAYS.key)){Q=this.buildWeekdays(Q);}Q[Q.length]="</thead>";return Q;},buildWeekdays:function(H){H[H.length]='<tr class="'+this.Style.CSS_WEEKDAY_ROW+'">';if(this.cfg.getProperty(B.SHOW_WEEK_HEADER.key)){H[H.length]="<th>&#160;</th>";}for(var G=0;G<this.Locale.LOCALE_WEEKDAYS.length;++G){H[H.length]='<th class="calweekdaycell">'+this.Locale.LOCALE_WEEKDAYS[G]+"</th>";}if(this.cfg.getProperty(B.SHOW_WEEK_FOOTER.key)){H[H.length]="<th>&#160;</th>";}H[H.length]="</tr>";return H;},renderBody:function(l,j){var AJ=this.cfg.getProperty(B.START_WEEKDAY.key);this.preMonthDays=l.getDay();if(AJ>0){this.preMonthDays-=AJ;}if(this.preMonthDays<0){this.preMonthDays+=7;}this.monthDays=D.findMonthEnd(l).getDate();this.postMonthDays=F.DISPLAY_DAYS-this.preMonthDays-this.monthDays;l=D.subtract(l,D.DAY,this.preMonthDays);var X,N,M="w",e="_cell",b="wd",v="d",P,q,AB=this.today,O=this.cfg,V=AB.getFullYear(),u=AB.getMonth(),J=AB.getDate(),AA=O.getProperty(B.PAGEDATE.key),I=O.getProperty(B.HIDE_BLANK_WEEKS.key),h=O.getProperty(B.SHOW_WEEK_FOOTER.key),a=O.getProperty(B.SHOW_WEEK_HEADER.key),T=O.getProperty(B.MINDATE.key),Z=O.getProperty(B.MAXDATE.key);if(T){T=D.clearTime(T);}if(Z){Z=D.clearTime(Z);}j[j.length]='<tbody class="m'+(AA.getMonth()+1)+" "+this.Style.CSS_BODY+'">';var AH=0,Q=document.createElement("div"),k=document.createElement("td");Q.appendChild(k);var z=this.parent||this;for(var AD=0;AD<6;AD++){X=D.getWeekNumber(l,AJ);N=M+X;if(AD!==0&&I===true&&l.getMonth()!=AA.getMonth()){break;}else{j[j.length]='<tr class="'+N+'">';if(a){j=this.renderRowHeader(X,j);}for(var AI=0;AI<7;AI++){P=[];this.clearElement(k);k.className=this.Style.CSS_CELL;k.id=this.id+e+AH;if(l.getDate()==J&&l.getMonth()==u&&l.getFullYear()==V){P[P.length]=z.renderCellStyleToday;}var Y=[l.getFullYear(),l.getMonth()+1,l.getDate()];this.cellDates[this.cellDates.length]=Y;if(l.getMonth()!=AA.getMonth()){P[P.length]=z.renderCellNotThisMonth;}else{C.addClass(k,b+l.getDay());C.addClass(k,v+l.getDate());for(var AC=0;AC<this.renderStack.length;++AC){q=null;var w=this.renderStack[AC],AK=w[0],H,c,L;switch(AK){case F.DATE:H=w[1][1];c=w[1][2];L=w[1][0];if(l.getMonth()+1==H&&l.getDate()==c&&l.getFullYear()==L){q=w[2];this.renderStack.splice(AC,1);}break;case F.MONTH_DAY:H=w[1][0];c=w[1][1];if(l.getMonth()+1==H&&l.getDate()==c){q=w[2];this.renderStack.splice(AC,1);}break;case F.RANGE:var g=w[1][0],f=w[1][1],m=g[1],S=g[2],W=g[0],AG=D.getDate(W,m-1,S),K=f[1],o=f[2],G=f[0],AF=D.getDate(G,K-1,o);if(l.getTime()>=AG.getTime()&&l.getTime()<=AF.getTime()){q=w[2];if(l.getTime()==AF.getTime()){this.renderStack.splice(AC,1);}}break;case F.WEEKDAY:var R=w[1][0];if(l.getDay()+1==R){q=w[2];}break;case F.MONTH:H=w[1][0];if(l.getMonth()+1==H){q=w[2];}break;}if(q){P[P.length]=q;}}}if(this._indexOfSelectedFieldArray(Y)>-1){P[P.length]=z.renderCellStyleSelected;}if((T&&(l.getTime()<T.getTime()))||(Z&&(l.getTime()>Z.getTime()))){P[P.length]=z.renderOutOfBoundsDate;}else{P[P.length]=z.styleCellDefault;P[P.length]=z.renderCellDefault;}for(var y=0;
y<P.length;++y){if(P[y].call(z,l,k)==F.STOP_RENDER){break;}}l.setTime(l.getTime()+D.ONE_DAY_MS);l=D.clearTime(l);if(AH>=0&&AH<=6){C.addClass(k,this.Style.CSS_CELL_TOP);}if((AH%7)===0){C.addClass(k,this.Style.CSS_CELL_LEFT);}if(((AH+1)%7)===0){C.addClass(k,this.Style.CSS_CELL_RIGHT);}var n=this.postMonthDays;if(I&&n>=7){var U=Math.floor(n/7);for(var AE=0;AE<U;++AE){n-=7;}}if(AH>=((this.preMonthDays+n+this.monthDays)-7)){C.addClass(k,this.Style.CSS_CELL_BOTTOM);}j[j.length]=Q.innerHTML;AH++;}if(h){j=this.renderRowFooter(X,j);}j[j.length]="</tr>";}}j[j.length]="</tbody>";return j;},renderFooter:function(G){return G;},render:function(){this.beforeRenderEvent.fire();var H=D.findMonthStart(this.cfg.getProperty(B.PAGEDATE.key));this.resetRenderers();this.cellDates.length=0;A.purgeElement(this.oDomContainer,true);var G=[];G[G.length]='<table cellSpacing="0" class="'+this.Style.CSS_CALENDAR+" y"+H.getFullYear()+'" id="'+this.id+'">';G=this.renderHeader(G);G=this.renderBody(H,G);G=this.renderFooter(G);G[G.length]="</table>";this.oDomContainer.innerHTML=G.join("\n");this.applyListeners();this.cells=this.oDomContainer.getElementsByTagName("td");this.cfg.refireEvent(B.TITLE.key);this.cfg.refireEvent(B.CLOSE.key);this.cfg.refireEvent(B.IFRAME.key);this.renderEvent.fire();},applyListeners:function(){var P=this.oDomContainer,H=this.parent||this,L="a",S="click";var M=C.getElementsByClassName(this.Style.CSS_NAV_LEFT,L,P),I=C.getElementsByClassName(this.Style.CSS_NAV_RIGHT,L,P);if(M&&M.length>0){this.linkLeft=M[0];A.addListener(this.linkLeft,S,this.doPreviousMonthNav,H,true);}if(I&&I.length>0){this.linkRight=I[0];A.addListener(this.linkRight,S,this.doNextMonthNav,H,true);}if(H.cfg.getProperty("navigator")!==null){this.applyNavListeners();}if(this.domEventMap){var J,G;for(var R in this.domEventMap){if(E.hasOwnProperty(this.domEventMap,R)){var N=this.domEventMap[R];if(!(N instanceof Array)){N=[N];}for(var K=0;K<N.length;K++){var Q=N[K];G=C.getElementsByClassName(R,Q.tag,this.oDomContainer);for(var O=0;O<G.length;O++){J=G[O];A.addListener(J,Q.event,Q.handler,Q.scope,Q.correct);}}}}}A.addListener(this.oDomContainer,"click",this.doSelectCell,this);A.addListener(this.oDomContainer,"mouseover",this.doCellMouseOver,this);A.addListener(this.oDomContainer,"mouseout",this.doCellMouseOut,this);},applyNavListeners:function(){var H=this.parent||this,I=this,G=C.getElementsByClassName(this.Style.CSS_NAV,"a",this.oDomContainer);if(G.length>0){A.addListener(G,"click",function(N,M){var L=A.getTarget(N);if(this===L||C.isAncestor(this,L)){A.preventDefault(N);}var J=H.oNavigator;if(J){var K=I.cfg.getProperty("pagedate");J.setYear(K.getFullYear());J.setMonth(K.getMonth());J.show();}});}},getDateByCellId:function(H){var G=this.getDateFieldsByCellId(H);return(G)?D.getDate(G[0],G[1]-1,G[2]):null;},getDateFieldsByCellId:function(G){G=this.getIndexFromId(G);return(G>-1)?this.cellDates[G]:null;},getCellIndex:function(I){var H=-1;if(I){var G=I.getMonth(),N=I.getFullYear(),M=I.getDate(),K=this.cellDates;for(var J=0;J<K.length;++J){var L=K[J];if(L[0]===N&&L[1]===G+1&&L[2]===M){H=J;break;}}}return H;},getIndexFromId:function(I){var H=-1,G=I.lastIndexOf("_cell");if(G>-1){H=parseInt(I.substring(G+5),10);}return H;},renderOutOfBoundsDate:function(H,G){C.addClass(G,this.Style.CSS_CELL_OOB);G.innerHTML=H.getDate();return F.STOP_RENDER;},renderRowHeader:function(H,G){G[G.length]='<th class="calrowhead">'+H+"</th>";return G;},renderRowFooter:function(H,G){G[G.length]='<th class="calrowfoot">'+H+"</th>";return G;},renderCellDefault:function(H,G){G.innerHTML='<a href="#" class="'+this.Style.CSS_CELL_SELECTOR+'">'+this.buildDayLabel(H)+"</a>";},styleCellDefault:function(H,G){C.addClass(G,this.Style.CSS_CELL_SELECTABLE);},renderCellStyleHighlight1:function(H,G){C.addClass(G,this.Style.CSS_CELL_HIGHLIGHT1);},renderCellStyleHighlight2:function(H,G){C.addClass(G,this.Style.CSS_CELL_HIGHLIGHT2);},renderCellStyleHighlight3:function(H,G){C.addClass(G,this.Style.CSS_CELL_HIGHLIGHT3);},renderCellStyleHighlight4:function(H,G){C.addClass(G,this.Style.CSS_CELL_HIGHLIGHT4);},renderCellStyleToday:function(H,G){C.addClass(G,this.Style.CSS_CELL_TODAY);},renderCellStyleSelected:function(H,G){C.addClass(G,this.Style.CSS_CELL_SELECTED);},renderCellNotThisMonth:function(H,G){C.addClass(G,this.Style.CSS_CELL_OOM);G.innerHTML=H.getDate();return F.STOP_RENDER;},renderBodyCellRestricted:function(H,G){C.addClass(G,this.Style.CSS_CELL);C.addClass(G,this.Style.CSS_CELL_RESTRICTED);G.innerHTML=H.getDate();return F.STOP_RENDER;},addMonths:function(H){var G=B.PAGEDATE.key;this.cfg.setProperty(G,D.add(this.cfg.getProperty(G),D.MONTH,H));this.resetRenderers();this.changePageEvent.fire();},subtractMonths:function(H){var G=B.PAGEDATE.key;this.cfg.setProperty(G,D.subtract(this.cfg.getProperty(G),D.MONTH,H));this.resetRenderers();this.changePageEvent.fire();},addYears:function(H){var G=B.PAGEDATE.key;this.cfg.setProperty(G,D.add(this.cfg.getProperty(G),D.YEAR,H));this.resetRenderers();this.changePageEvent.fire();},subtractYears:function(H){var G=B.PAGEDATE.key;this.cfg.setProperty(G,D.subtract(this.cfg.getProperty(G),D.YEAR,H));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(){this.cfg.resetProperty(B.SELECTED.key);this.cfg.resetProperty(B.PAGEDATE.key);this.resetEvent.fire();},clear:function(){this.cfg.setProperty(B.SELECTED.key,[]);this.cfg.setProperty(B.PAGEDATE.key,new Date(this.today.getTime()));this.clearEvent.fire();},select:function(I){var L=this._toFieldArray(I),H=[],K=[],M=B.SELECTED.key;for(var G=0;G<L.length;++G){var J=L[G];if(!this.isDateOOB(this._toDate(J))){if(H.length===0){this.beforeSelectEvent.fire();K=this.cfg.getProperty(M);}H.push(J);if(this._indexOfSelectedFieldArray(J)==-1){K[K.length]=J;}}}if(H.length>0){if(this.parent){this.parent.cfg.setProperty(M,K);}else{this.cfg.setProperty(M,K);
}this.selectEvent.fire(H);}return this.getSelectedDates();},selectCell:function(J){var H=this.cells[J],N=this.cellDates[J],M=this._toDate(N),I=C.hasClass(H,this.Style.CSS_CELL_SELECTABLE);if(I){this.beforeSelectEvent.fire();var L=B.SELECTED.key;var K=this.cfg.getProperty(L);var G=N.concat();if(this._indexOfSelectedFieldArray(G)==-1){K[K.length]=G;}if(this.parent){this.parent.cfg.setProperty(L,K);}else{this.cfg.setProperty(L,K);}this.renderCellStyleSelected(M,H);this.selectEvent.fire([G]);this.doCellMouseOut.call(H,null,this);}return this.getSelectedDates();},deselect:function(K){var G=this._toFieldArray(K),J=[],M=[],N=B.SELECTED.key;for(var H=0;H<G.length;++H){var L=G[H];if(!this.isDateOOB(this._toDate(L))){if(J.length===0){this.beforeDeselectEvent.fire();M=this.cfg.getProperty(N);}J.push(L);var I=this._indexOfSelectedFieldArray(L);if(I!=-1){M.splice(I,1);}}}if(J.length>0){if(this.parent){this.parent.cfg.setProperty(N,M);}else{this.cfg.setProperty(N,M);}this.deselectEvent.fire(J);}return this.getSelectedDates();},deselectCell:function(K){var H=this.cells[K],N=this.cellDates[K],I=this._indexOfSelectedFieldArray(N);var J=C.hasClass(H,this.Style.CSS_CELL_SELECTABLE);if(J){this.beforeDeselectEvent.fire();var L=this.cfg.getProperty(B.SELECTED.key),M=this._toDate(N),G=N.concat();if(I>-1){if(this.cfg.getProperty(B.PAGEDATE.key).getMonth()==M.getMonth()&&this.cfg.getProperty(B.PAGEDATE.key).getFullYear()==M.getFullYear()){C.removeClass(H,this.Style.CSS_CELL_SELECTED);}L.splice(I,1);}if(this.parent){this.parent.cfg.setProperty(B.SELECTED.key,L);}else{this.cfg.setProperty(B.SELECTED.key,L);}this.deselectEvent.fire(G);}return this.getSelectedDates();},deselectAll:function(){this.beforeDeselectEvent.fire();var J=B.SELECTED.key,G=this.cfg.getProperty(J),H=G.length,I=G.concat();if(this.parent){this.parent.cfg.setProperty(J,[]);}else{this.cfg.setProperty(J,[]);}if(H>0){this.deselectEvent.fire(I);}return this.getSelectedDates();},_toFieldArray:function(H){var G=[];if(H instanceof Date){G=[[H.getFullYear(),H.getMonth()+1,H.getDate()]];}else{if(E.isString(H)){G=this._parseDates(H);}else{if(E.isArray(H)){for(var I=0;I<H.length;++I){var J=H[I];G[G.length]=[J.getFullYear(),J.getMonth()+1,J.getDate()];}}}}return G;},toDate:function(G){return this._toDate(G);},_toDate:function(G){if(G instanceof Date){return G;}else{return D.getDate(G[0],G[1]-1,G[2]);}},_fieldArraysAreEqual:function(I,H){var G=false;if(I[0]==H[0]&&I[1]==H[1]&&I[2]==H[2]){G=true;}return G;},_indexOfSelectedFieldArray:function(K){var J=-1,G=this.cfg.getProperty(B.SELECTED.key);for(var I=0;I<G.length;++I){var H=G[I];if(K[0]==H[0]&&K[1]==H[1]&&K[2]==H[2]){J=I;break;}}return J;},isDateOOM:function(G){return(G.getMonth()!=this.cfg.getProperty(B.PAGEDATE.key).getMonth());},isDateOOB:function(I){var J=this.cfg.getProperty(B.MINDATE.key),K=this.cfg.getProperty(B.MAXDATE.key),H=D;if(J){J=H.clearTime(J);}if(K){K=H.clearTime(K);}var G=new Date(I.getTime());G=H.clearTime(G);return((J&&G.getTime()<J.getTime())||(K&&G.getTime()>K.getTime()));},_parsePageDate:function(G){var J;if(G){if(G instanceof Date){J=D.findMonthStart(G);}else{var K,I,H;H=G.split(this.cfg.getProperty(B.DATE_FIELD_DELIMITER.key));K=parseInt(H[this.cfg.getProperty(B.MY_MONTH_POSITION.key)-1],10)-1;I=parseInt(H[this.cfg.getProperty(B.MY_YEAR_POSITION.key)-1],10);J=D.getDate(I,K,1);}}else{J=D.getDate(this.today.getFullYear(),this.today.getMonth(),1);}return J;},onBeforeSelect:function(){if(this.cfg.getProperty(B.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(G){},onBeforeDeselect:function(){},onDeselect:function(G){},onChangePage:function(){this.render();},onRender:function(){},onReset:function(){this.render();},onClear:function(){this.render();},validate:function(){return true;},_parseDate:function(I){var J=I.split(this.Locale.DATE_FIELD_DELIMITER),G;if(J.length==2){G=[J[this.Locale.MD_MONTH_POSITION-1],J[this.Locale.MD_DAY_POSITION-1]];G.type=F.MONTH_DAY;}else{G=[J[this.Locale.MDY_YEAR_POSITION-1],J[this.Locale.MDY_MONTH_POSITION-1],J[this.Locale.MDY_DAY_POSITION-1]];G.type=F.DATE;}for(var H=0;H<G.length;H++){G[H]=parseInt(G[H],10);}return G;},_parseDates:function(H){var O=[],N=H.split(this.Locale.DATE_DELIMITER);for(var M=0;M<N.length;++M){var L=N[M];if(L.indexOf(this.Locale.DATE_RANGE_DELIMITER)!=-1){var G=L.split(this.Locale.DATE_RANGE_DELIMITER),K=this._parseDate(G[0]),P=this._parseDate(G[1]),J=this._parseRange(K,P);O=O.concat(J);}else{var I=this._parseDate(L);O.push(I);}}return O;},_parseRange:function(G,K){var H=D.add(D.getDate(G[0],G[1]-1,G[2]),D.DAY,1),J=D.getDate(K[0],K[1]-1,K[2]),I=[];I.push(G);while(H.getTime()<=J.getTime()){I.push([H.getFullYear(),H.getMonth()+1,H.getDate()]);H=D.add(H,D.DAY,1);}return I;},resetRenderers:function(){this.renderStack=this._renderStack.concat();},removeRenderers:function(){this._renderStack=[];this.renderStack=[];},clearElement:function(G){G.innerHTML="&#160;";G.className="";},addRenderer:function(G,H){var J=this._parseDates(G);for(var I=0;I<J.length;++I){var K=J[I];if(K.length==2){if(K[0] instanceof Array){this._addRenderer(F.RANGE,K,H);}else{this._addRenderer(F.MONTH_DAY,K,H);}}else{if(K.length==3){this._addRenderer(F.DATE,K,H);}}}},_addRenderer:function(H,I,G){var J=[H,I,G];this.renderStack.unshift(J);this._renderStack=this.renderStack.concat();},addMonthRenderer:function(H,G){this._addRenderer(F.MONTH,[H],G);},addWeekdayRenderer:function(H,G){this._addRenderer(F.WEEKDAY,[H],G);},clearAllBodyCellStyles:function(G){for(var H=0;H<this.cells.length;++H){C.removeClass(this.cells[H],G);}},setMonth:function(I){var G=B.PAGEDATE.key,H=this.cfg.getProperty(G);H.setMonth(parseInt(I,10));this.cfg.setProperty(G,H);},setYear:function(H){var G=B.PAGEDATE.key,I=this.cfg.getProperty(G);I.setFullYear(parseInt(H,10));this.cfg.setProperty(G,I);},getSelectedDates:function(){var I=[],H=this.cfg.getProperty(B.SELECTED.key);
for(var K=0;K<H.length;++K){var J=H[K];var G=D.getDate(J[0],J[1]-1,J[2]);I.push(G);}I.sort(function(M,L){return M-L;});return I;},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 G=navigator.userAgent.toLowerCase();if(G.indexOf("opera")!=-1){return"opera";}else{if(G.indexOf("msie 7")!=-1){return"ie7";}else{if(G.indexOf("msie")!=-1){return"ie";}else{if(G.indexOf("safari")!=-1){return"safari";}else{if(G.indexOf("gecko")!=-1){return"gecko";}else{return false;}}}}}})(),toString:function(){return"Calendar "+this.id;},destroy:function(){if(this.beforeDestroyEvent.fire()){var G=this;if(G.navigator){G.navigator.destroy();}if(G.cfg){G.cfg.destroy();}A.purgeElement(G.oDomContainer,true);C.removeClass(G.oDomContainer,"withtitle");C.removeClass(G.oDomContainer,G.Style.CSS_CONTAINER);C.removeClass(G.oDomContainer,G.Style.CSS_SINGLE);G.oDomContainer.innerHTML="";G.oDomContainer=null;G.cells=null;this.destroyEvent.fire();}}};YAHOO.widget.Calendar=F;YAHOO.widget.Calendar_Core=YAHOO.widget.Calendar;YAHOO.widget.Cal_Core=YAHOO.widget.Calendar;})();(function(){var D=YAHOO.util.Dom,F=YAHOO.widget.DateMath,A=YAHOO.util.Event,E=YAHOO.lang,G=YAHOO.widget.Calendar;function B(J,H,I){if(arguments.length>0){this.init.apply(this,arguments);}}B._DEFAULT_CONFIG=G._DEFAULT_CONFIG;B._DEFAULT_CONFIG.PAGES={key:"pages",value:2};var C=B._DEFAULT_CONFIG;B.prototype={init:function(K,I,J){var H=this._parseArgs(arguments);K=H.id;I=H.container;J=H.config;this.oDomContainer=D.get(I);if(!this.oDomContainer.id){this.oDomContainer.id=D.generateId();}if(!K){K=this.oDomContainer.id+"_t";}this.id=K;this.containerId=this.oDomContainer.id;this.initEvents();this.initStyles();this.pages=[];D.addClass(this.oDomContainer,B.CSS_CONTAINER);D.addClass(this.oDomContainer,B.CSS_MULTI_UP);this.cfg=new YAHOO.util.Config(this);this.Options={};this.Locale={};this.setupConfig();if(J){this.cfg.applyConfig(J,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 H=this.cfg;H.addProperty(C.PAGES.key,{value:C.PAGES.value,validator:H.checkNumber,handler:this.configPages});H.addProperty(C.PAGEDATE.key,{value:new Date(),handler:this.configPageDate});H.addProperty(C.SELECTED.key,{value:[],handler:this.configSelected});H.addProperty(C.TITLE.key,{value:C.TITLE.value,handler:this.configTitle});H.addProperty(C.CLOSE.key,{value:C.CLOSE.value,handler:this.configClose});H.addProperty(C.IFRAME.key,{value:C.IFRAME.value,handler:this.configIframe,validator:H.checkBoolean});H.addProperty(C.MINDATE.key,{value:C.MINDATE.value,handler:this.delegateConfig});H.addProperty(C.MAXDATE.key,{value:C.MAXDATE.value,handler:this.delegateConfig});H.addProperty(C.MULTI_SELECT.key,{value:C.MULTI_SELECT.value,handler:this.delegateConfig,validator:H.checkBoolean});H.addProperty(C.START_WEEKDAY.key,{value:C.START_WEEKDAY.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty(C.SHOW_WEEKDAYS.key,{value:C.SHOW_WEEKDAYS.value,handler:this.delegateConfig,validator:H.checkBoolean});H.addProperty(C.SHOW_WEEK_HEADER.key,{value:C.SHOW_WEEK_HEADER.value,handler:this.delegateConfig,validator:H.checkBoolean});H.addProperty(C.SHOW_WEEK_FOOTER.key,{value:C.SHOW_WEEK_FOOTER.value,handler:this.delegateConfig,validator:H.checkBoolean});H.addProperty(C.HIDE_BLANK_WEEKS.key,{value:C.HIDE_BLANK_WEEKS.value,handler:this.delegateConfig,validator:H.checkBoolean});H.addProperty(C.NAV_ARROW_LEFT.key,{value:C.NAV_ARROW_LEFT.value,handler:this.delegateConfig});H.addProperty(C.NAV_ARROW_RIGHT.key,{value:C.NAV_ARROW_RIGHT.value,handler:this.delegateConfig});H.addProperty(C.MONTHS_SHORT.key,{value:C.MONTHS_SHORT.value,handler:this.delegateConfig});H.addProperty(C.MONTHS_LONG.key,{value:C.MONTHS_LONG.value,handler:this.delegateConfig});H.addProperty(C.WEEKDAYS_1CHAR.key,{value:C.WEEKDAYS_1CHAR.value,handler:this.delegateConfig});H.addProperty(C.WEEKDAYS_SHORT.key,{value:C.WEEKDAYS_SHORT.value,handler:this.delegateConfig});H.addProperty(C.WEEKDAYS_MEDIUM.key,{value:C.WEEKDAYS_MEDIUM.value,handler:this.delegateConfig});H.addProperty(C.WEEKDAYS_LONG.key,{value:C.WEEKDAYS_LONG.value,handler:this.delegateConfig});H.addProperty(C.LOCALE_MONTHS.key,{value:C.LOCALE_MONTHS.value,handler:this.delegateConfig});H.addProperty(C.LOCALE_WEEKDAYS.key,{value:C.LOCALE_WEEKDAYS.value,handler:this.delegateConfig});H.addProperty(C.DATE_DELIMITER.key,{value:C.DATE_DELIMITER.value,handler:this.delegateConfig});H.addProperty(C.DATE_FIELD_DELIMITER.key,{value:C.DATE_FIELD_DELIMITER.value,handler:this.delegateConfig});H.addProperty(C.DATE_RANGE_DELIMITER.key,{value:C.DATE_RANGE_DELIMITER.value,handler:this.delegateConfig});H.addProperty(C.MY_MONTH_POSITION.key,{value:C.MY_MONTH_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty(C.MY_YEAR_POSITION.key,{value:C.MY_YEAR_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty(C.MD_MONTH_POSITION.key,{value:C.MD_MONTH_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty(C.MD_DAY_POSITION.key,{value:C.MD_DAY_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty(C.MDY_MONTH_POSITION.key,{value:C.MDY_MONTH_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty(C.MDY_DAY_POSITION.key,{value:C.MDY_DAY_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty(C.MDY_YEAR_POSITION.key,{value:C.MDY_YEAR_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty(C.MY_LABEL_MONTH_POSITION.key,{value:C.MY_LABEL_MONTH_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty(C.MY_LABEL_YEAR_POSITION.key,{value:C.MY_LABEL_YEAR_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber});
H.addProperty(C.MY_LABEL_MONTH_SUFFIX.key,{value:C.MY_LABEL_MONTH_SUFFIX.value,handler:this.delegateConfig});H.addProperty(C.MY_LABEL_YEAR_SUFFIX.key,{value:C.MY_LABEL_YEAR_SUFFIX.value,handler:this.delegateConfig});H.addProperty(C.NAV.key,{value:C.NAV.value,handler:this.configNavigator});H.addProperty(C.STRINGS.key,{value:C.STRINGS.value,handler:this.configStrings,validator:function(I){return E.isObject(I);},supercedes:C.STRINGS.supercedes});},initEvents:function(){var J=this,L="Event",M=YAHOO.util.CustomEvent;var I=function(O,R,N){for(var Q=0;Q<J.pages.length;++Q){var P=J.pages[Q];P[this.type+L].subscribe(O,R,N);}};var H=function(N,Q){for(var P=0;P<J.pages.length;++P){var O=J.pages[P];O[this.type+L].unsubscribe(N,Q);}};var K=G._EVENT_TYPES;J.beforeSelectEvent=new M(K.BEFORE_SELECT);J.beforeSelectEvent.subscribe=I;J.beforeSelectEvent.unsubscribe=H;J.selectEvent=new M(K.SELECT);J.selectEvent.subscribe=I;J.selectEvent.unsubscribe=H;J.beforeDeselectEvent=new M(K.BEFORE_DESELECT);J.beforeDeselectEvent.subscribe=I;J.beforeDeselectEvent.unsubscribe=H;J.deselectEvent=new M(K.DESELECT);J.deselectEvent.subscribe=I;J.deselectEvent.unsubscribe=H;J.changePageEvent=new M(K.CHANGE_PAGE);J.changePageEvent.subscribe=I;J.changePageEvent.unsubscribe=H;J.beforeRenderEvent=new M(K.BEFORE_RENDER);J.beforeRenderEvent.subscribe=I;J.beforeRenderEvent.unsubscribe=H;J.renderEvent=new M(K.RENDER);J.renderEvent.subscribe=I;J.renderEvent.unsubscribe=H;J.resetEvent=new M(K.RESET);J.resetEvent.subscribe=I;J.resetEvent.unsubscribe=H;J.clearEvent=new M(K.CLEAR);J.clearEvent.subscribe=I;J.clearEvent.unsubscribe=H;J.beforeShowEvent=new M(K.BEFORE_SHOW);J.showEvent=new M(K.SHOW);J.beforeHideEvent=new M(K.BEFORE_HIDE);J.hideEvent=new M(K.HIDE);J.beforeShowNavEvent=new M(K.BEFORE_SHOW_NAV);J.showNavEvent=new M(K.SHOW_NAV);J.beforeHideNavEvent=new M(K.BEFORE_HIDE_NAV);J.hideNavEvent=new M(K.HIDE_NAV);J.beforeRenderNavEvent=new M(K.BEFORE_RENDER_NAV);J.renderNavEvent=new M(K.RENDER_NAV);J.beforeDestroyEvent=new M(K.BEFORE_DESTROY);J.destroyEvent=new M(K.DESTROY);},configPages:function(R,Q,N){var L=Q[0],J=C.PAGEDATE.key,V="_",S="groupcal",U="first-of-type",K="last-of-type";for(var I=0;I<L;++I){var T=this.id+V+I,P=this.containerId+V+I,O=this.cfg.getConfig();O.close=false;O.title=false;O.navigator=null;var H=this.constructChild(T,P,O);var M=H.cfg.getProperty(J);this._setMonthOnDate(M,M.getMonth()+I);H.cfg.setProperty(J,M);D.removeClass(H.oDomContainer,this.Style.CSS_SINGLE);D.addClass(H.oDomContainer,S);if(I===0){D.addClass(H.oDomContainer,U);}if(I==(L-1)){D.addClass(H.oDomContainer,K);}H.parent=this;H.index=I;this.pages[this.pages.length]=H;}},configPageDate:function(O,N,L){var J=N[0],M;var K=C.PAGEDATE.key;for(var I=0;I<this.pages.length;++I){var H=this.pages[I];if(I===0){M=H._parsePageDate(J);H.cfg.setProperty(K,M);}else{var P=new Date(M);this._setMonthOnDate(P,P.getMonth()+I);H.cfg.setProperty(K,P);}}},configSelected:function(J,H,L){var K=C.SELECTED.key;this.delegateConfig(J,H,L);var I=(this.pages.length>0)?this.pages[0].cfg.getProperty(K):[];this.cfg.setProperty(K,I,true);},delegateConfig:function(I,H,L){var M=H[0];var K;for(var J=0;J<this.pages.length;J++){K=this.pages[J];K.cfg.setProperty(I,M);}},setChildFunction:function(K,I){var H=this.cfg.getProperty(C.PAGES.key);for(var J=0;J<H;++J){this.pages[J][K]=I;}},callChildFunction:function(M,I){var H=this.cfg.getProperty(C.PAGES.key);for(var L=0;L<H;++L){var K=this.pages[L];if(K[M]){var J=K[M];J.call(K,I);}}},constructChild:function(K,I,J){var H=document.getElementById(I);if(!H){H=document.createElement("div");H.id=I;this.oDomContainer.appendChild(H);}return new G(K,I,J);},setMonth:function(L){L=parseInt(L,10);var M;var I=C.PAGEDATE.key;for(var K=0;K<this.pages.length;++K){var J=this.pages[K];var H=J.cfg.getProperty(I);if(K===0){M=H.getFullYear();}else{H.setFullYear(M);}this._setMonthOnDate(H,L+K);J.cfg.setProperty(I,H);}},setYear:function(J){var I=C.PAGEDATE.key;J=parseInt(J,10);for(var L=0;L<this.pages.length;++L){var K=this.pages[L];var H=K.cfg.getProperty(I);if((H.getMonth()+1)==1&&L>0){J+=1;}K.setYear(J);}},render:function(){this.renderHeader();for(var I=0;I<this.pages.length;++I){var H=this.pages[I];H.render();}this.renderFooter();},select:function(H){for(var J=0;J<this.pages.length;++J){var I=this.pages[J];I.select(H);}return this.getSelectedDates();},selectCell:function(H){for(var J=0;J<this.pages.length;++J){var I=this.pages[J];I.selectCell(H);}return this.getSelectedDates();},deselect:function(H){for(var J=0;J<this.pages.length;++J){var I=this.pages[J];I.deselect(H);}return this.getSelectedDates();},deselectAll:function(){for(var I=0;I<this.pages.length;++I){var H=this.pages[I];H.deselectAll();}return this.getSelectedDates();},deselectCell:function(H){for(var J=0;J<this.pages.length;++J){var I=this.pages[J];I.deselectCell(H);}return this.getSelectedDates();},reset:function(){for(var I=0;I<this.pages.length;++I){var H=this.pages[I];H.reset();}},clear:function(){for(var I=0;I<this.pages.length;++I){var H=this.pages[I];H.clear();}this.cfg.setProperty(C.SELECTED.key,[]);this.cfg.setProperty(C.PAGEDATE.key,new Date(this.pages[0].today.getTime()));this.render();},nextMonth:function(){for(var I=0;I<this.pages.length;++I){var H=this.pages[I];H.nextMonth();}},previousMonth:function(){for(var I=this.pages.length-1;I>=0;--I){var H=this.pages[I];H.previousMonth();}},nextYear:function(){for(var I=0;I<this.pages.length;++I){var H=this.pages[I];H.nextYear();}},previousYear:function(){for(var I=0;I<this.pages.length;++I){var H=this.pages[I];H.previousYear();}},getSelectedDates:function(){var J=[];var I=this.cfg.getProperty(C.SELECTED.key);for(var L=0;L<I.length;++L){var K=I[L];var H=F.getDate(K[0],K[1]-1,K[2]);J.push(H);}J.sort(function(N,M){return N-M;});return J;},addRenderer:function(H,I){for(var K=0;K<this.pages.length;++K){var J=this.pages[K];J.addRenderer(H,I);}},addMonthRenderer:function(K,H){for(var J=0;J<this.pages.length;++J){var I=this.pages[J];I.addMonthRenderer(K,H);}},addWeekdayRenderer:function(I,H){for(var K=0;
K<this.pages.length;++K){var J=this.pages[K];J.addWeekdayRenderer(I,H);}},removeRenderers:function(){this.callChildFunction("removeRenderers");},renderHeader:function(){},renderFooter:function(){},addMonths:function(H){this.callChildFunction("addMonths",H);},subtractMonths:function(H){this.callChildFunction("subtractMonths",H);},addYears:function(H){this.callChildFunction("addYears",H);},subtractYears:function(H){this.callChildFunction("subtractYears",H);},getCalendarPage:function(K){var M=null;if(K){var N=K.getFullYear(),J=K.getMonth();var I=this.pages;for(var L=0;L<I.length;++L){var H=I[L].cfg.getProperty("pagedate");if(H.getFullYear()===N&&H.getMonth()===J){M=I[L];break;}}}return M;},_setMonthOnDate:function(I,J){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420&&(J<0||J>11)){var H=F.add(I,F.MONTH,J-I.getMonth());I.setTime(H.getTime());}else{I.setMonth(J);}},_fixWidth:function(){var H=0;for(var J=0;J<this.pages.length;++J){var I=this.pages[J];H+=I.oDomContainer.offsetWidth;}if(H>0){this.oDomContainer.style.width=H+"px";}},toString:function(){return"CalendarGroup "+this.id;},destroy:function(){if(this.beforeDestroyEvent.fire()){var J=this;if(J.navigator){J.navigator.destroy();}if(J.cfg){J.cfg.destroy();}A.purgeElement(J.oDomContainer,true);D.removeClass(J.oDomContainer,B.CSS_CONTAINER);D.removeClass(J.oDomContainer,B.CSS_MULTI_UP);for(var I=0,H=J.pages.length;I<H;I++){J.pages[I].destroy();J.pages[I]=null;}J.oDomContainer.innerHTML="";J.oDomContainer=null;this.destroyEvent.fire();}}};B.CSS_CONTAINER="yui-calcontainer";B.CSS_MULTI_UP="multi";B.CSS_2UPTITLE="title";B.CSS_2UPCLOSE="close-icon";YAHOO.lang.augmentProto(B,G,"buildDayLabel","buildMonthLabel","renderOutOfBoundsDate","renderRowHeader","renderRowFooter","renderCellDefault","styleCellDefault","renderCellStyleHighlight1","renderCellStyleHighlight2","renderCellStyleHighlight3","renderCellStyleHighlight4","renderCellStyleToday","renderCellStyleSelected","renderCellNotThisMonth","renderBodyCellRestricted","initStyles","configTitle","configClose","configIframe","configStrings","configNavigator","createTitleBar","createCloseButton","removeTitleBar","removeCloseButton","hide","show","toDate","_toDate","_parseArgs","browser");YAHOO.widget.CalGrp=B;YAHOO.widget.CalendarGroup=B;YAHOO.widget.Calendar2up=function(J,H,I){this.init(J,H,I);};YAHOO.extend(YAHOO.widget.Calendar2up,B);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 A=YAHOO.widget.CalendarNavigator.UPDATE_DELAY;if(A>0){var C=this;window.setTimeout(function(){C._update(B);},A);}else{this._update(B);}}},_update:function(A){A.setYear(this.getYear());A.setMonth(this.getMonth());A.render();},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(D){}}},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.6.0",build:"1321"});
/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.6.0
*/
(function(){var S="DIV",O="hd",K="bd",N="ft",X="LI",A="disabled",D="mouseover",F="mouseout",U="mousedown",G="mouseup",R=YAHOO.env.ua.ie?"focusin":"focus",V="click",B="keydown",M="keyup",I="keypress",L="clicktohide",T="position",P="dynamic",Y="showdelay",J="selected",E="visible",W="UL",Q="MenuManager",C=YAHOO.util.Dom,Z=YAHOO.util.Event,H=YAHOO.lang;YAHOO.widget.MenuManager=function(){var a=false,c={},r={},d={},n={"click":"clickEvent","mousedown":"mouseDownEvent","mouseup":"mouseUpEvent","mouseover":"mouseOverEvent","mouseout":"mouseOutEvent","keydown":"keyDownEvent","keyup":"keyUpEvent","keypress":"keyPressEvent","focus":"focusEvent","focusin":"focusEvent","blur":"blurEvent","focusout":"blurEvent"},m=null,k=null;function o(u){var s,t;if(u&&u.tagName){switch(u.tagName.toUpperCase()){case S:s=u.parentNode;if((C.hasClass(u,O)||C.hasClass(u,K)||C.hasClass(u,N))&&s&&s.tagName&&s.tagName.toUpperCase()==S){t=s;}else{t=u;}break;case X:t=u;break;default:s=u.parentNode;if(s){t=o(s);}break;}}return t;}function q(w){var s=Z.getTarget(w),t=o(s),y,u,v,AA,z;if(t){u=t.tagName.toUpperCase();if(u==X){v=t.id;if(v&&d[v]){AA=d[v];z=AA.parent;}}else{if(u==S){if(t.id){z=c[t.id];}}}}if(z){y=n[w.type];if(AA&&!AA.cfg.getProperty(A)){AA[y].fire(w);}z[y].fire(w,AA);}else{if(w.type==U){for(var x in r){if(H.hasOwnProperty(r,x)){z=r[x];if(z.cfg.getProperty(L)&&!(z instanceof YAHOO.widget.MenuBar)&&z.cfg.getProperty(T)==P){z.hide();}else{if(z.cfg.getProperty(Y)>0){z._cancelShowDelay();}if(z.activeItem){z.activeItem.blur();z.activeItem.cfg.setProperty(J,false);z.activeItem=null;}}}}}else{if(w.type==R){m=s;}}}}function f(t,s,u){if(c[u.id]){this.removeMenu(u);}}function j(t,s){var u=s[1];if(u){k=u;}}function i(t,s){k=null;}function b(t,s,v){if(v&&v.focus){try{v.focus();}catch(u){}}this.hideEvent.unsubscribe(b,v);}function l(t,s){if(this===this.getRoot()&&this.cfg.getProperty(T)===P){this.hideEvent.subscribe(b,m);this.focus();}}function g(u,t){var s=t[0],v=this.id;if(s){r[v]=this;}else{if(r[v]){delete r[v];}}}function h(t,s){p(this);}function p(t){var s=t.id;if(s&&d[s]){if(k==t){k=null;}delete d[s];t.destroyEvent.unsubscribe(h);}}function e(t,s){var v=s[0],u;if(v instanceof YAHOO.widget.MenuItem){u=v.id;if(!d[u]){d[u]=v;v.destroyEvent.subscribe(h);}}}return{addMenu:function(t){var s;if(t instanceof YAHOO.widget.Menu&&t.id&&!c[t.id]){c[t.id]=t;if(!a){s=document;Z.on(s,D,q,this,true);Z.on(s,F,q,this,true);Z.on(s,U,q,this,true);Z.on(s,G,q,this,true);Z.on(s,V,q,this,true);Z.on(s,B,q,this,true);Z.on(s,M,q,this,true);Z.on(s,I,q,this,true);Z.onFocus(s,q,this,true);Z.onBlur(s,q,this,true);a=true;}t.cfg.subscribeToConfigEvent(E,g);t.destroyEvent.subscribe(f,t,this);t.itemAddedEvent.subscribe(e);t.focusEvent.subscribe(j);t.blurEvent.subscribe(i);t.showEvent.subscribe(l);}},removeMenu:function(v){var t,s,u;if(v){t=v.id;if((t in c)&&(c[t]==v)){s=v.getItems();if(s&&s.length>0){u=s.length-1;do{p(s[u]);}while(u--);}delete c[t];if((t in r)&&(r[t]==v)){delete r[t];}if(v.cfg){v.cfg.unsubscribeFromConfigEvent(E,g);}v.destroyEvent.unsubscribe(f,v);v.itemAddedEvent.unsubscribe(e);v.focusEvent.unsubscribe(j);v.blurEvent.unsubscribe(i);}}},hideVisible:function(){var s;for(var t in r){if(H.hasOwnProperty(r,t)){s=r[t];if(!(s instanceof YAHOO.widget.MenuBar)&&s.cfg.getProperty(T)==P){s.hide();}}}},getVisible:function(){return r;},getMenus:function(){return c;},getMenu:function(t){var s;if(t in c){s=c[t];}return s;},getMenuItem:function(t){var s;if(t in d){s=d[t];}return s;},getMenuItemGroup:function(w){var t=C.get(w),s,y,x,u,v;if(t&&t.tagName&&t.tagName.toUpperCase()==W){y=t.firstChild;if(y){s=[];do{u=y.id;if(u){x=this.getMenuItem(u);if(x){s[s.length]=x;}}}while((y=y.nextSibling));if(s.length>0){v=s;}}}return v;},getFocusedMenuItem:function(){return k;},getFocusedMenu:function(){var s;if(k){s=k.parent.getRoot();}return s;},toString:function(){return Q;}};}();})();(function(){var AN=YAHOO.lang,Ao="Menu",H="DIV",K="div",Ak="id",AI="SELECT",f="xy",R="y",Av="UL",L="ul",AK="first-of-type",l="LI",i="OPTGROUP",Ax="OPTION",Af="disabled",AY="none",z="selected",Ar="groupindex",j="index",O="submenu",As="visible",AX="hidedelay",Ab="position",AE="dynamic",C="static",Al=AE+","+C,Y="windows",Q="url",M="#",V="target",AU="maxheight",T="topscrollbar",y="bottomscrollbar",e="_",P=T+e+Af,E=y+e+Af,c="mousemove",At="showdelay",d="submenuhidedelay",AG="iframe",x="constraintoviewport",A2="preventcontextoverlap",AP="submenualignment",a="autosubmenudisplay",AD="clicktohide",h="container",k="scrollincrement",Ah="minscrollheight",A0="classname",Ae="shadow",Ap="keepopen",Ay="hd",D="hastitle",q="context",v="",Ai="mousedown",Ac="keydown",Am="height",U="width",AR="px",Aw="effect",AF="monitorresize",AW="display",AV="block",J="visibility",AA="absolute",AT="zindex",m="yui-menu-body-scrolled",AL="&#32;",Az=" ",Ag="mouseover",G="mouseout",AS="itemAdded",o="itemRemoved",AM="hidden",t="yui-menu-shadow",AH=t+"-visible",n=t+Az+AH;YAHOO.widget.Menu=function(A4,A3){if(A3){this.parent=A3.parent;this.lazyLoad=A3.lazyLoad||A3.lazyload;this.itemData=A3.itemData||A3.itemdata;}YAHOO.widget.Menu.superclass.constructor.call(this,A4,A3);};function B(A4){var A3=false;if(AN.isString(A4)){A3=(Al.indexOf((A4.toLowerCase()))!=-1);}return A3;}var g=YAHOO.util.Dom,AB=YAHOO.util.Event,Au=YAHOO.widget.Module,AC=YAHOO.widget.Overlay,s=YAHOO.widget.Menu,A1=YAHOO.widget.MenuManager,F=YAHOO.util.CustomEvent,Aq=YAHOO.env.ua,An,Aa=[["mouseOverEvent",Ag],["mouseOutEvent",G],["mouseDownEvent",Ai],["mouseUpEvent","mouseup"],["clickEvent","click"],["keyPressEvent","keypress"],["keyDownEvent",Ac],["keyUpEvent","keyup"],["focusEvent","focus"],["blurEvent","blur"],["itemAddedEvent",AS],["itemRemovedEvent",o]],AZ={key:As,value:false,validator:AN.isBoolean},AQ={key:x,value:true,validator:AN.isBoolean,supercedes:[AG,"x",R,f]},AJ={key:A2,value:true,validator:AN.isBoolean,supercedes:[x]},S={key:Ab,value:AE,validator:B,supercedes:[As,AG]},A={key:AP,value:["tl","tr"]},u={key:a,value:true,validator:AN.isBoolean,suppressEvent:true},Z={key:At,value:250,validator:AN.isNumber,suppressEvent:true},r={key:AX,value:0,validator:AN.isNumber,suppressEvent:true},w={key:d,value:250,validator:AN.isNumber,suppressEvent:true},p={key:AD,value:true,validator:AN.isBoolean,suppressEvent:true},AO={key:h,suppressEvent:true},Ad={key:k,value:1,validator:AN.isNumber,supercedes:[AU],suppressEvent:true},N={key:Ah,value:90,validator:AN.isNumber,supercedes:[AU],suppressEvent:true},X={key:AU,value:0,validator:AN.isNumber,supercedes:[AG],suppressEvent:true},W={key:A0,value:null,validator:AN.isString,suppressEvent:true},b={key:Af,value:false,validator:AN.isBoolean,suppressEvent:true},I={key:Ae,value:true,validator:AN.isBoolean,suppressEvent:true,supercedes:[As]},Aj={key:Ap,value:false,validator:AN.isBoolean};
YAHOO.lang.extend(s,AC,{CSS_CLASS_NAME:"yuimenu",ITEM_TYPE:null,GROUP_TITLE_TAG_NAME:"h6",OFF_SCREEN_POSITION:"-999em",_bHideDelayEventHandlersAssigned:false,_bHandledMouseOverEvent:false,_bHandledMouseOutEvent:false,_aGroupTitleElements:null,_aItemGroups:null,_aListElements:null,_nCurrentMouseX:0,_bStopMouseEventHandlers:false,_sClassName:null,lazyLoad:false,itemData:null,activeItem:null,parent:null,srcElement:null,init:function(A5,A4){this._aItemGroups=[];this._aListElements=[];this._aGroupTitleElements=[];if(!this.ITEM_TYPE){this.ITEM_TYPE=YAHOO.widget.MenuItem;}var A3;if(AN.isString(A5)){A3=g.get(A5);}else{if(A5.tagName){A3=A5;}}if(A3&&A3.tagName){switch(A3.tagName.toUpperCase()){case H:this.srcElement=A3;if(!A3.id){A3.setAttribute(Ak,g.generateId());}s.superclass.init.call(this,A3);this.beforeInitEvent.fire(s);break;case AI:this.srcElement=A3;s.superclass.init.call(this,g.generateId());this.beforeInitEvent.fire(s);break;}}else{s.superclass.init.call(this,A5);this.beforeInitEvent.fire(s);}if(this.element){g.addClass(this.element,this.CSS_CLASS_NAME);this.initEvent.subscribe(this._onInit);this.beforeRenderEvent.subscribe(this._onBeforeRender);this.renderEvent.subscribe(this._onRender);this.beforeShowEvent.subscribe(this._onBeforeShow);this.hideEvent.subscribe(this._onHide);this.showEvent.subscribe(this._onShow);this.beforeHideEvent.subscribe(this._onBeforeHide);this.mouseOverEvent.subscribe(this._onMouseOver);this.mouseOutEvent.subscribe(this._onMouseOut);this.clickEvent.subscribe(this._onClick);this.keyDownEvent.subscribe(this._onKeyDown);this.keyPressEvent.subscribe(this._onKeyPress);this.blurEvent.subscribe(this._onBlur);if(Aq.gecko||Aq.webkit){this.cfg.subscribeToConfigEvent(R,this._onYChange);}if(A4){this.cfg.applyConfig(A4,true);}A1.addMenu(this);this.initEvent.fire(s);}},_initSubTree:function(){var A4=this.srcElement,A3,A6,A9,BA,A8,A7,A5;if(A4){A3=(A4.tagName&&A4.tagName.toUpperCase());if(A3==H){BA=this.body.firstChild;if(BA){A6=0;A9=this.GROUP_TITLE_TAG_NAME.toUpperCase();do{if(BA&&BA.tagName){switch(BA.tagName.toUpperCase()){case A9:this._aGroupTitleElements[A6]=BA;break;case Av:this._aListElements[A6]=BA;this._aItemGroups[A6]=[];A6++;break;}}}while((BA=BA.nextSibling));if(this._aListElements[0]){g.addClass(this._aListElements[0],AK);}}}BA=null;if(A3){switch(A3){case H:A8=this._aListElements;A7=A8.length;if(A7>0){A5=A7-1;do{BA=A8[A5].firstChild;if(BA){do{if(BA&&BA.tagName&&BA.tagName.toUpperCase()==l){this.addItem(new this.ITEM_TYPE(BA,{parent:this}),A5);}}while((BA=BA.nextSibling));}}while(A5--);}break;case AI:BA=A4.firstChild;do{if(BA&&BA.tagName){switch(BA.tagName.toUpperCase()){case i:case Ax:this.addItem(new this.ITEM_TYPE(BA,{parent:this}));break;}}}while((BA=BA.nextSibling));break;}}}},_getFirstEnabledItem:function(){var A3=this.getItems(),A7=A3.length,A6,A5;for(var A4=0;A4<A7;A4++){A6=A3[A4];if(A6&&!A6.cfg.getProperty(Af)&&A6.element.style.display!=AY){A5=A6;break;}}return A5;},_addItemToGroup:function(A8,A9,BD){var BB,BE,A6,BC,A7,A4,A5,BA;function A3(BF,BG){return(BF[BG]||A3(BF,(BG+1)));}if(A9 instanceof this.ITEM_TYPE){BB=A9;BB.parent=this;}else{if(AN.isString(A9)){BB=new this.ITEM_TYPE(A9,{parent:this});}else{if(AN.isObject(A9)){A9.parent=this;BB=new this.ITEM_TYPE(A9.text,A9);}}}if(BB){if(BB.cfg.getProperty(z)){this.activeItem=BB;}BE=AN.isNumber(A8)?A8:0;A6=this._getItemGroup(BE);if(!A6){A6=this._createItemGroup(BE);}if(AN.isNumber(BD)){A7=(BD>=A6.length);if(A6[BD]){A6.splice(BD,0,BB);}else{A6[BD]=BB;}BC=A6[BD];if(BC){if(A7&&(!BC.element.parentNode||BC.element.parentNode.nodeType==11)){this._aListElements[BE].appendChild(BC.element);}else{A4=A3(A6,(BD+1));if(A4&&(!BC.element.parentNode||BC.element.parentNode.nodeType==11)){this._aListElements[BE].insertBefore(BC.element,A4.element);}}BC.parent=this;this._subscribeToItemEvents(BC);this._configureSubmenu(BC);this._updateItemProperties(BE);this.itemAddedEvent.fire(BC);this.changeContentEvent.fire();BA=BC;}}else{A5=A6.length;A6[A5]=BB;BC=A6[A5];if(BC){if(!g.isAncestor(this._aListElements[BE],BC.element)){this._aListElements[BE].appendChild(BC.element);}BC.element.setAttribute(Ar,BE);BC.element.setAttribute(j,A5);BC.parent=this;BC.index=A5;BC.groupIndex=BE;this._subscribeToItemEvents(BC);this._configureSubmenu(BC);if(A5===0){g.addClass(BC.element,AK);}this.itemAddedEvent.fire(BC);this.changeContentEvent.fire();BA=BC;}}}return BA;},_removeItemFromGroupByIndex:function(A6,A4){var A5=AN.isNumber(A6)?A6:0,A7=this._getItemGroup(A5),A9,A8,A3;if(A7){A9=A7.splice(A4,1);A8=A9[0];if(A8){this._updateItemProperties(A5);if(A7.length===0){A3=this._aListElements[A5];if(this.body&&A3){this.body.removeChild(A3);}this._aItemGroups.splice(A5,1);this._aListElements.splice(A5,1);A3=this._aListElements[0];if(A3){g.addClass(A3,AK);}}this.itemRemovedEvent.fire(A8);this.changeContentEvent.fire();}}return A8;},_removeItemFromGroupByValue:function(A6,A3){var A8=this._getItemGroup(A6),A9,A7,A5,A4;if(A8){A9=A8.length;A7=-1;if(A9>0){A4=A9-1;do{if(A8[A4]==A3){A7=A4;break;}}while(A4--);if(A7>-1){A5=this._removeItemFromGroupByIndex(A6,A7);}}}return A5;},_updateItemProperties:function(A4){var A5=this._getItemGroup(A4),A8=A5.length,A7,A6,A3;if(A8>0){A3=A8-1;do{A7=A5[A3];if(A7){A6=A7.element;A7.index=A3;A7.groupIndex=A4;A6.setAttribute(Ar,A4);A6.setAttribute(j,A3);g.removeClass(A6,AK);}}while(A3--);if(A6){g.addClass(A6,AK);}}},_createItemGroup:function(A5){var A3,A4;if(!this._aItemGroups[A5]){this._aItemGroups[A5]=[];A3=document.createElement(L);this._aListElements[A5]=A3;A4=this._aItemGroups[A5];}return A4;},_getItemGroup:function(A5){var A3=AN.isNumber(A5)?A5:0,A6=this._aItemGroups,A4;if(A3 in A6){A4=A6[A3];}return A4;},_configureSubmenu:function(A3){var A4=A3.cfg.getProperty(O);if(A4){this.cfg.configChangedEvent.subscribe(this._onParentMenuConfigChange,A4,true);this.renderEvent.subscribe(this._onParentMenuRender,A4,true);}},_subscribeToItemEvents:function(A3){A3.destroyEvent.subscribe(this._onMenuItemDestroy,A3,this);A3.cfg.configChangedEvent.subscribe(this._onMenuItemConfigChange,A3,this);
},_onVisibleChange:function(A5,A4){var A3=A4[0];if(A3){g.addClass(this.element,As);}else{g.removeClass(this.element,As);}},_cancelHideDelay:function(){var A3=this.getRoot()._hideDelayTimer;if(A3){A3.cancel();}},_execHideDelay:function(){this._cancelHideDelay();var A3=this.getRoot();A3._hideDelayTimer=AN.later(A3.cfg.getProperty(AX),this,function(){if(A3.activeItem){if(A3.hasFocus()){A3.activeItem.focus();}A3.clearActiveItem();}if(A3==this&&!(this instanceof YAHOO.widget.MenuBar)&&this.cfg.getProperty(Ab)==AE){this.hide();}});},_cancelShowDelay:function(){var A3=this.getRoot()._showDelayTimer;if(A3){A3.cancel();}},_execSubmenuHideDelay:function(A5,A4,A3){A5._submenuHideDelayTimer=AN.later(50,this,function(){if(this._nCurrentMouseX>(A4+10)){A5._submenuHideDelayTimer=AN.later(A3,A5,function(){this.hide();});}else{A5.hide();}});},_disableScrollHeader:function(){if(!this._bHeaderDisabled){g.addClass(this.header,P);this._bHeaderDisabled=true;}},_disableScrollFooter:function(){if(!this._bFooterDisabled){g.addClass(this.footer,E);this._bFooterDisabled=true;}},_enableScrollHeader:function(){if(this._bHeaderDisabled){g.removeClass(this.header,P);this._bHeaderDisabled=false;}},_enableScrollFooter:function(){if(this._bFooterDisabled){g.removeClass(this.footer,E);this._bFooterDisabled=false;}},_onMouseOver:function(BF,A8){var BG=A8[0],BC=A8[1],A3=AB.getTarget(BG),A7=this.getRoot(),BE=this._submenuHideDelayTimer,A4,A6,BB,A5,BA,A9;var BD=function(){if(this.parent.cfg.getProperty(z)){this.show();}};if(!this._bStopMouseEventHandlers){if(!this._bHandledMouseOverEvent&&(A3==this.element||g.isAncestor(this.element,A3))){this._nCurrentMouseX=0;AB.on(this.element,c,this._onMouseMove,this,true);if(!(BC&&g.isAncestor(BC.element,AB.getRelatedTarget(BG)))){this.clearActiveItem();}if(this.parent&&BE){BE.cancel();this.parent.cfg.setProperty(z,true);A4=this.parent.parent;A4._bHandledMouseOutEvent=true;A4._bHandledMouseOverEvent=false;}this._bHandledMouseOverEvent=true;this._bHandledMouseOutEvent=false;}if(BC&&!BC.handledMouseOverEvent&&!BC.cfg.getProperty(Af)&&(A3==BC.element||g.isAncestor(BC.element,A3))){A6=this.cfg.getProperty(At);BB=(A6>0);if(BB){this._cancelShowDelay();}A5=this.activeItem;if(A5){A5.cfg.setProperty(z,false);}BA=BC.cfg;BA.setProperty(z,true);if(this.hasFocus()||A7._hasFocus){BC.focus();A7._hasFocus=false;}if(this.cfg.getProperty(a)){A9=BA.getProperty(O);if(A9){if(BB){A7._showDelayTimer=AN.later(A7.cfg.getProperty(At),A9,BD);}else{A9.show();}}}BC.handledMouseOverEvent=true;BC.handledMouseOutEvent=false;}}},_onMouseOut:function(BB,A5){var BC=A5[0],A9=A5[1],A6=AB.getRelatedTarget(BC),BA=false,A8,A7,A3,A4;if(!this._bStopMouseEventHandlers){if(A9&&!A9.cfg.getProperty(Af)){A8=A9.cfg;A7=A8.getProperty(O);if(A7&&(A6==A7.element||g.isAncestor(A7.element,A6))){BA=true;}if(!A9.handledMouseOutEvent&&((A6!=A9.element&&!g.isAncestor(A9.element,A6))||BA)){if(!BA){A9.cfg.setProperty(z,false);if(A7){A3=this.cfg.getProperty(d);A4=this.cfg.getProperty(At);if(!(this instanceof YAHOO.widget.MenuBar)&&A3>0&&A4>=A3){this._execSubmenuHideDelay(A7,AB.getPageX(BC),A3);}else{A7.hide();}}}A9.handledMouseOutEvent=true;A9.handledMouseOverEvent=false;}}if(!this._bHandledMouseOutEvent&&((A6!=this.element&&!g.isAncestor(this.element,A6))||BA)){AB.removeListener(this.element,c,this._onMouseMove);this._nCurrentMouseX=AB.getPageX(BC);this._bHandledMouseOutEvent=true;this._bHandledMouseOverEvent=false;}}},_onMouseMove:function(A4,A3){if(!this._bStopMouseEventHandlers){this._nCurrentMouseX=AB.getPageX(A4);}},_onClick:function(BD,A5){var BE=A5[0],A9=A5[1],BB=false,A7,A4,A3,A8,BA,BC;var A6=function(){if(!((Aq.gecko&&this.platform==Y)&&BE.button>0)){A4=this.getRoot();if(A4 instanceof YAHOO.widget.MenuBar||A4.cfg.getProperty(Ab)==C){A4.clearActiveItem();}else{A4.hide();}}};if(A9){if(A9.cfg.getProperty(Af)){AB.preventDefault(BE);A6.call(this);}else{A7=A9.cfg.getProperty(O);A8=A9.cfg.getProperty(Q);if(A8){BA=A8.indexOf(M);BC=A8.length;if(BA!=-1){A8=A8.substr(BA,BC);BC=A8.length;if(BC>1){A3=A8.substr(1,BC);BB=g.isAncestor(this.element,A3);}else{if(BC===1){BB=true;}}}}if(BB&&!A9.cfg.getProperty(V)){AB.preventDefault(BE);if(Aq.webkit){A9.focus();}else{A9.focusEvent.fire();}}if(!A7&&!this.cfg.getProperty(Ap)){A6.call(this);}}}},_onKeyDown:function(BH,BB){var BE=BB[0],BD=BB[1],BA,BF,A4,A8,BI,A3,BK,A7,BG,A6,BC,BJ,A9;function A5(){this._bStopMouseEventHandlers=true;AN.later(10,this,function(){this._bStopMouseEventHandlers=false;});}if(BD&&!BD.cfg.getProperty(Af)){BF=BD.cfg;A4=this.parent;switch(BE.keyCode){case 38:case 40:BI=(BE.keyCode==38)?BD.getPreviousEnabledSibling():BD.getNextEnabledSibling();if(BI){this.clearActiveItem();BI.cfg.setProperty(z,true);BI.focus();if(this.cfg.getProperty(AU)>0){A3=this.body;BK=A3.scrollTop;A7=A3.offsetHeight;BG=this.getItems();A6=BG.length-1;BC=BI.element.offsetTop;if(BE.keyCode==40){if(BC>=(A7+BK)){A3.scrollTop=BC-A7;}else{if(BC<=BK){A3.scrollTop=0;}}if(BI==BG[A6]){A3.scrollTop=BI.element.offsetTop;}}else{if(BC<=BK){A3.scrollTop=BC-BI.element.offsetHeight;}else{if(BC>=(BK+A7)){A3.scrollTop=BC;}}if(BI==BG[0]){A3.scrollTop=0;}}BK=A3.scrollTop;BJ=A3.scrollHeight-A3.offsetHeight;if(BK===0){this._disableScrollHeader();this._enableScrollFooter();}else{if(BK==BJ){this._enableScrollHeader();this._disableScrollFooter();}else{this._enableScrollHeader();this._enableScrollFooter();}}}}AB.preventDefault(BE);A5();break;case 39:BA=BF.getProperty(O);if(BA){if(!BF.getProperty(z)){BF.setProperty(z,true);}BA.show();BA.setInitialFocus();BA.setInitialSelection();}else{A8=this.getRoot();if(A8 instanceof YAHOO.widget.MenuBar){BI=A8.activeItem.getNextEnabledSibling();if(BI){A8.clearActiveItem();BI.cfg.setProperty(z,true);BA=BI.cfg.getProperty(O);if(BA){BA.show();BA.setInitialFocus();}else{BI.focus();}}}}AB.preventDefault(BE);A5();break;case 37:if(A4){A9=A4.parent;if(A9 instanceof YAHOO.widget.MenuBar){BI=A9.activeItem.getPreviousEnabledSibling();if(BI){A9.clearActiveItem();BI.cfg.setProperty(z,true);BA=BI.cfg.getProperty(O);if(BA){BA.show();
BA.setInitialFocus();}else{BI.focus();}}}else{this.hide();A4.focus();}}AB.preventDefault(BE);A5();break;}}if(BE.keyCode==27){if(this.cfg.getProperty(Ab)==AE){this.hide();if(this.parent){this.parent.focus();}}else{if(this.activeItem){BA=this.activeItem.cfg.getProperty(O);if(BA&&BA.cfg.getProperty(As)){BA.hide();this.activeItem.focus();}else{this.activeItem.blur();this.activeItem.cfg.setProperty(z,false);}}}AB.preventDefault(BE);}},_onKeyPress:function(A5,A4){var A3=A4[0];if(A3.keyCode==40||A3.keyCode==38){AB.preventDefault(A3);}},_onBlur:function(A4,A3){if(this._hasFocus){this._hasFocus=false;}},_onYChange:function(A4,A3){var A6=this.parent,A8,A5,A7;if(A6){A8=A6.parent.body.scrollTop;if(A8>0){A7=(this.cfg.getProperty(R)-A8);g.setY(this.element,A7);A5=this.iframe;if(A5){g.setY(A5,A7);}this.cfg.setProperty(R,A7,true);}}},_onScrollTargetMouseOver:function(A9,BC){var BB=this._bodyScrollTimer;if(BB){BB.cancel();}this._cancelHideDelay();var A5=AB.getTarget(A9),A7=this.body,A6=this.cfg.getProperty(k),A3,A4;function BA(){var BD=A7.scrollTop;if(BD<A3){A7.scrollTop=(BD+A6);this._enableScrollHeader();}else{A7.scrollTop=A3;this._bodyScrollTimer.cancel();this._disableScrollFooter();}}function A8(){var BD=A7.scrollTop;if(BD>0){A7.scrollTop=(BD-A6);this._enableScrollFooter();}else{A7.scrollTop=0;this._bodyScrollTimer.cancel();this._disableScrollHeader();}}if(g.hasClass(A5,Ay)){A4=A8;}else{A3=A7.scrollHeight-A7.offsetHeight;A4=BA;}this._bodyScrollTimer=AN.later(10,this,A4,null,true);},_onScrollTargetMouseOut:function(A5,A3){var A4=this._bodyScrollTimer;if(A4){A4.cancel();}this._cancelHideDelay();},_onInit:function(A4,A3){this.cfg.subscribeToConfigEvent(As,this._onVisibleChange);var A5=!this.parent,A6=this.lazyLoad;if(((A5&&!A6)||(A5&&(this.cfg.getProperty(As)||this.cfg.getProperty(Ab)==C))||(!A5&&!A6))&&this.getItemGroups().length===0){if(this.srcElement){this._initSubTree();}if(this.itemData){this.addItems(this.itemData);}}else{if(A6){this.cfg.fireQueue();}}},_onBeforeRender:function(A6,A5){var A7=this.element,BA=this._aListElements.length,A4=true,A9=0,A3,A8;if(BA>0){do{A3=this._aListElements[A9];if(A3){if(A4){g.addClass(A3,AK);A4=false;}if(!g.isAncestor(A7,A3)){this.appendToBody(A3);}A8=this._aGroupTitleElements[A9];if(A8){if(!g.isAncestor(A7,A8)){A3.parentNode.insertBefore(A8,A3);}g.addClass(A3,D);}}A9++;}while(A9<BA);}},_onRender:function(A4,A3){if(this.cfg.getProperty(Ab)==AE){if(!this.cfg.getProperty(As)){this.positionOffScreen();}}},_onBeforeShow:function(A5,A4){var A7,BA,A6,A8=this.cfg.getProperty(h);if(this.lazyLoad&&this.getItemGroups().length===0){if(this.srcElement){this._initSubTree();}if(this.itemData){if(this.parent&&this.parent.parent&&this.parent.parent.srcElement&&this.parent.parent.srcElement.tagName.toUpperCase()==AI){A7=this.itemData.length;for(BA=0;BA<A7;BA++){if(this.itemData[BA].tagName){this.addItem((new this.ITEM_TYPE(this.itemData[BA])));}}}else{this.addItems(this.itemData);}}A6=this.srcElement;if(A6){if(A6.tagName.toUpperCase()==AI){if(g.inDocument(A6)){this.render(A6.parentNode);}else{this.render(A8);}}else{this.render();}}else{if(this.parent){this.render(this.parent.element);}else{this.render(A8);}}}var A9=this.parent,A3;if(!A9&&this.cfg.getProperty(Ab)==AE){this.cfg.refireEvent(f);}if(A9){A3=A9.parent.cfg.getProperty(AP);this.cfg.setProperty(q,[A9.element,A3[0],A3[1]]);this.align();}},getConstrainedY:function(BF){var BQ=this,BM=BQ.cfg.getProperty(q),BT=BQ.cfg.getProperty(AU),BP,BE={"trbr":true,"tlbl":true,"bltl":true,"brtr":true},A8=(BM&&BE[BM[1]+BM[2]]),BA=BQ.element,BU=BA.offsetHeight,BO=AC.VIEWPORT_OFFSET,BJ=g.getViewportHeight(),BN=g.getDocumentScrollTop(),BK=(BQ.cfg.getProperty(Ah)+BO<BJ),BS,BB,BH,BI,BD=false,BC,A5,BG,A7,A3=BF;var A9=function(){var BV;if((BQ.cfg.getProperty(R)-BN)>BH){BV=(BH-BU);}else{BV=(BH+BI);}BQ.cfg.setProperty(R,(BV+BN),true);return BV;};var A6=function(){if((BQ.cfg.getProperty(R)-BN)>BH){return(A5-BO);}else{return(BC-BO);}};var BL=function(){var BV;if((BQ.cfg.getProperty(R)-BN)>BH){BV=(BH+BI);}else{BV=(BH-BA.offsetHeight);}BQ.cfg.setProperty(R,(BV+BN),true);};var A4=function(){BQ._setScrollHeight(this.cfg.getProperty(AU));BQ.hideEvent.unsubscribe(A4);};var BR=function(){var BZ=A6(),BV=(BQ.getItems().length>0),BY,BX,BW;if(BU>BZ){BY=BV?BQ.cfg.getProperty(Ah):BU;if((BZ>BY)&&BV){BP=BZ;}else{BP=BT;}BQ._setScrollHeight(BP);BQ.hideEvent.subscribe(A4);BL();if(BZ<BY){if(BD){A9();}else{A9();BD=true;BX=BR();}}}else{if(BP&&(BP!=BT)){BQ._setScrollHeight(BT);BQ.hideEvent.subscribe(A4);BL();}}return BX;};if(BQ.cfg.getProperty(A2)&&A8){if(BK){BB=BM[0];BI=BB.offsetHeight;BH=(g.getY(BB)-BN);BC=BH;A5=(BJ-(BH+BI));BR();}A3=BQ.cfg.getProperty(R);}else{if(!(BQ instanceof YAHOO.widget.MenuBar)&&BU>=BJ){BS=(BJ-(BO*2));if(BS>BQ.cfg.getProperty(Ah)){BQ._setScrollHeight(BS);BQ.hideEvent.subscribe(A4);BL();A3=BQ.cfg.getProperty(R);}}else{if(BK){BG=BN+BO;A7=BN+BJ-BU-BO;if(BF<BG){A3=BG;}else{if(BF>A7){A3=A7;}}}else{A3=BO+BN;}}}return A3;},_onHide:function(A4,A3){if(this.cfg.getProperty(Ab)===AE){this.positionOffScreen();}},_onShow:function(BB,A9){var A3=this.parent,A5,A6,A8,A4;function A7(BD){var BC;if(BD.type==Ai||(BD.type==Ac&&BD.keyCode==27)){BC=AB.getTarget(BD);if(BC!=A5.element||!g.isAncestor(A5.element,BC)){A5.cfg.setProperty(a,false);AB.removeListener(document,Ai,A7);AB.removeListener(document,Ac,A7);}}}function BA(BD,BC,BE){this.cfg.setProperty(U,v);this.hideEvent.unsubscribe(BA,BE);}if(A3){A5=A3.parent;if(!A5.cfg.getProperty(a)&&(A5 instanceof YAHOO.widget.MenuBar||A5.cfg.getProperty(Ab)==C)){A5.cfg.setProperty(a,true);AB.on(document,Ai,A7);AB.on(document,Ac,A7);}if((this.cfg.getProperty("x")<A5.cfg.getProperty("x"))&&(Aq.gecko<1.9)&&!this.cfg.getProperty(U)){A6=this.element;A8=A6.offsetWidth;A6.style.width=A8+AR;A4=(A8-(A6.offsetWidth-A8))+AR;this.cfg.setProperty(U,A4);this.hideEvent.subscribe(BA,A4);}}},_onBeforeHide:function(A5,A4){var A3=this.activeItem,A7=this.getRoot(),A8,A6;if(A3){A8=A3.cfg;A8.setProperty(z,false);A6=A8.getProperty(O);if(A6){A6.hide();}}if(Aq.ie&&this.cfg.getProperty(Ab)===AE&&this.parent){A7._hasFocus=this.hasFocus();
}if(A7==this){A7.blur();}},_onParentMenuConfigChange:function(A4,A3,A7){var A5=A3[0][0],A6=A3[0][1];switch(A5){case AG:case x:case AX:case At:case d:case AD:case Aw:case A0:case k:case Ah:case AF:case Ae:case A2:A7.cfg.setProperty(A5,A6);break;case AP:if(!(this.parent.parent instanceof YAHOO.widget.MenuBar)){A7.cfg.setProperty(A5,A6);}break;}},_onParentMenuRender:function(A4,A3,A9){var A6=A9.parent.parent,A5=A6.cfg,A7={constraintoviewport:A5.getProperty(x),xy:[0,0],clicktohide:A5.getProperty(AD),effect:A5.getProperty(Aw),showdelay:A5.getProperty(At),hidedelay:A5.getProperty(AX),submenuhidedelay:A5.getProperty(d),classname:A5.getProperty(A0),scrollincrement:A5.getProperty(k),minscrollheight:A5.getProperty(Ah),iframe:A5.getProperty(AG),shadow:A5.getProperty(Ae),preventcontextoverlap:A5.getProperty(A2),monitorresize:A5.getProperty(AF)},A8;if(!(A6 instanceof YAHOO.widget.MenuBar)){A7[AP]=A5.getProperty(AP);}A9.cfg.applyConfig(A7);if(!this.lazyLoad){A8=this.parent.element;if(this.element.parentNode==A8){this.render();}else{this.render(A8);}}},_onMenuItemDestroy:function(A5,A4,A3){this._removeItemFromGroupByValue(A3.groupIndex,A3);},_onMenuItemConfigChange:function(A5,A4,A3){var A7=A4[0][0],A8=A4[0][1],A6;switch(A7){case z:if(A8===true){this.activeItem=A3;}break;case O:A6=A4[0][1];if(A6){this._configureSubmenu(A3);}break;}},configVisible:function(A5,A4,A6){var A3,A7;if(this.cfg.getProperty(Ab)==AE){s.superclass.configVisible.call(this,A5,A4,A6);}else{A3=A4[0];A7=g.getStyle(this.element,AW);g.setStyle(this.element,J,As);if(A3){if(A7!=AV){this.beforeShowEvent.fire();g.setStyle(this.element,AW,AV);this.showEvent.fire();}}else{if(A7==AV){this.beforeHideEvent.fire();g.setStyle(this.element,AW,AY);this.hideEvent.fire();}}}},configPosition:function(A5,A4,A8){var A7=this.element,A6=A4[0]==C?C:AA,A9=this.cfg,A3;g.setStyle(A7,Ab,A6);if(A6==C){g.setStyle(A7,AW,AV);A9.setProperty(As,true);}else{g.setStyle(A7,J,AM);}if(A6==AA){A3=A9.getProperty(AT);if(!A3||A3===0){A9.setProperty(AT,1);}}},configIframe:function(A4,A3,A5){if(this.cfg.getProperty(Ab)==AE){s.superclass.configIframe.call(this,A4,A3,A5);}},configHideDelay:function(A4,A3,A7){var A9=A3[0],A8=this.mouseOutEvent,A5=this.mouseOverEvent,A6=this.keyDownEvent;if(A9>0){if(!this._bHideDelayEventHandlersAssigned){A8.subscribe(this._execHideDelay);A5.subscribe(this._cancelHideDelay);A6.subscribe(this._cancelHideDelay);this._bHideDelayEventHandlersAssigned=true;}}else{A8.unsubscribe(this._execHideDelay);A5.unsubscribe(this._cancelHideDelay);A6.unsubscribe(this._cancelHideDelay);this._bHideDelayEventHandlersAssigned=false;}},configContainer:function(A4,A3,A6){var A5=A3[0];if(AN.isString(A5)){this.cfg.setProperty(h,g.get(A5),true);}},_clearSetWidthFlag:function(){this._widthSetForScroll=false;this.cfg.unsubscribeFromConfigEvent(U,this._clearSetWidthFlag);},_setScrollHeight:function(BF){var BB=BF,BA=false,BG=false,A7,A8,BE,A5,A4,BD,BH,A3,BC,A9,A6;if(this.getItems().length>0){A7=this.element;A8=this.body;BE=this.header;A5=this.footer;BD=this._onScrollTargetMouseOver;BH=this._onScrollTargetMouseOut;A3=this.cfg.getProperty(Ah);A4=this.parent;if(BB>0&&BB<A3){BB=A3;}g.setStyle(A8,Am,v);g.removeClass(A8,m);A8.scrollTop=0;BG=((Aq.gecko&&A4&&A4.parent&&A4.parent.cfg.getProperty(Ab)==AE)||Aq.ie);if(BB>0&&BG&&!this.cfg.getProperty(U)){A9=A7.offsetWidth;A7.style.width=A9+AR;A6=(A9-(A7.offsetWidth-A9))+AR;this.cfg.unsubscribeFromConfigEvent(U,this._clearSetWidthFlag);this.cfg.setProperty(U,A6);this._widthSetForScroll=true;this.cfg.subscribeToConfigEvent(U,this._clearSetWidthFlag);}if(BB>0&&(!BE&&!A5)){this.setHeader(AL);this.setFooter(AL);BE=this.header;A5=this.footer;g.addClass(BE,T);g.addClass(A5,y);A7.insertBefore(BE,A8);A7.appendChild(A5);}BC=BB;if(BE&&A5){BC=(BC-(BE.offsetHeight+A5.offsetHeight));}if((BC>0)&&(A8.offsetHeight>BB)){g.addClass(A8,m);g.setStyle(A8,Am,(BC+AR));if(!this._hasScrollEventHandlers){AB.on(BE,Ag,BD,this,true);AB.on(BE,G,BH,this,true);AB.on(A5,Ag,BD,this,true);AB.on(A5,G,BH,this,true);this._hasScrollEventHandlers=true;}this._disableScrollHeader();this._enableScrollFooter();BA=true;}else{if(BE&&A5){if(this._widthSetForScroll){this._widthSetForScroll=false;this.cfg.unsubscribeFromConfigEvent(U,this._clearSetWidthFlag);this.cfg.setProperty(U,v);}this._enableScrollHeader();this._enableScrollFooter();if(this._hasScrollEventHandlers){AB.removeListener(BE,Ag,BD);AB.removeListener(BE,G,BH);AB.removeListener(A5,Ag,BD);AB.removeListener(A5,G,BH);this._hasScrollEventHandlers=false;}A7.removeChild(BE);A7.removeChild(A5);this.header=null;this.footer=null;BA=true;}}if(BA){this.cfg.refireEvent(AG);this.cfg.refireEvent(Ae);}}},_setMaxHeight:function(A4,A3,A5){this._setScrollHeight(A5);this.renderEvent.unsubscribe(this._setMaxHeight);},configMaxHeight:function(A4,A3,A5){var A6=A3[0];if(this.lazyLoad&&!this.body&&A6>0){this.renderEvent.subscribe(this._setMaxHeight,A6,this);}else{this._setScrollHeight(A6);}},configClassName:function(A5,A4,A6){var A3=A4[0];if(this._sClassName){g.removeClass(this.element,this._sClassName);}g.addClass(this.element,A3);this._sClassName=A3;},_onItemAdded:function(A4,A3){var A5=A3[0];if(A5){A5.cfg.setProperty(Af,true);}},configDisabled:function(A5,A4,A8){var A7=A4[0],A3=this.getItems(),A9,A6;if(AN.isArray(A3)){A9=A3.length;if(A9>0){A6=A9-1;do{A3[A6].cfg.setProperty(Af,A7);}while(A6--);}if(A7){this.clearActiveItem(true);g.addClass(this.element,Af);this.itemAddedEvent.subscribe(this._onItemAdded);}else{g.removeClass(this.element,Af);this.itemAddedEvent.unsubscribe(this._onItemAdded);}}},configShadow:function(BB,A5,BA){var A9=function(){var BE=this.element,BD=this._shadow;if(BD&&BE){if(BD.style.width&&BD.style.height){BD.style.width=v;BD.style.height=v;}BD.style.width=(BE.offsetWidth+6)+AR;BD.style.height=(BE.offsetHeight+1)+AR;}};var BC=function(){this.element.appendChild(this._shadow);};var A7=function(){g.addClass(this._shadow,AH);};var A8=function(){g.removeClass(this._shadow,AH);};var A4=function(){var BE=this._shadow,BD;if(!BE){BD=this.element;
if(!An){An=document.createElement(K);An.className=n;}BE=An.cloneNode(false);BD.appendChild(BE);this._shadow=BE;this.beforeShowEvent.subscribe(A7);this.beforeHideEvent.subscribe(A8);if(Aq.ie){AN.later(0,this,function(){A9.call(this);this.syncIframe();});this.cfg.subscribeToConfigEvent(U,A9);this.cfg.subscribeToConfigEvent(Am,A9);this.cfg.subscribeToConfigEvent(AU,A9);this.changeContentEvent.subscribe(A9);Au.textResizeEvent.subscribe(A9,this,true);this.destroyEvent.subscribe(function(){Au.textResizeEvent.unsubscribe(A9,this);});}this.cfg.subscribeToConfigEvent(AU,BC);}};var A6=function(){if(this._shadow){BC.call(this);if(Aq.ie){A9.call(this);}}else{A4.call(this);}this.beforeShowEvent.unsubscribe(A6);};var A3=A5[0];if(A3&&this.cfg.getProperty(Ab)==AE){if(this.cfg.getProperty(As)){if(this._shadow){BC.call(this);if(Aq.ie){A9.call(this);}}else{A4.call(this);}}else{this.beforeShowEvent.subscribe(A6);}}},initEvents:function(){s.superclass.initEvents.call(this);var A4=Aa.length-1,A5,A3;do{A5=Aa[A4];A3=this.createEvent(A5[1]);A3.signature=F.LIST;this[A5[0]]=A3;}while(A4--);},positionOffScreen:function(){var A4=this.iframe,A5=this.element,A3=this.OFF_SCREEN_POSITION;A5.style.top=v;A5.style.left=v;if(A4){A4.style.top=A3;A4.style.left=A3;}},getRoot:function(){var A5=this.parent,A4,A3;if(A5){A4=A5.parent;A3=A4?A4.getRoot():this;}else{A3=this;}return A3;},toString:function(){var A4=Ao,A3=this.id;if(A3){A4+=(Az+A3);}return A4;},setItemGroupTitle:function(A8,A7){var A6,A5,A4,A3;if(AN.isString(A8)&&A8.length>0){A6=AN.isNumber(A7)?A7:0;A5=this._aGroupTitleElements[A6];if(A5){A5.innerHTML=A8;}else{A5=document.createElement(this.GROUP_TITLE_TAG_NAME);A5.innerHTML=A8;this._aGroupTitleElements[A6]=A5;}A4=this._aGroupTitleElements.length-1;do{if(this._aGroupTitleElements[A4]){g.removeClass(this._aGroupTitleElements[A4],AK);A3=A4;}}while(A4--);if(A3!==null){g.addClass(this._aGroupTitleElements[A3],AK);}this.changeContentEvent.fire();}},addItem:function(A3,A4){return this._addItemToGroup(A4,A3);},addItems:function(A7,A6){var A9,A3,A8,A4,A5;if(AN.isArray(A7)){A9=A7.length;A3=[];for(A4=0;A4<A9;A4++){A8=A7[A4];if(A8){if(AN.isArray(A8)){A3[A3.length]=this.addItems(A8,A4);}else{A3[A3.length]=this._addItemToGroup(A6,A8);}}}if(A3.length){A5=A3;}}return A5;},insertItem:function(A3,A4,A5){return this._addItemToGroup(A5,A3,A4);},removeItem:function(A3,A5){var A6,A4;if(!AN.isUndefined(A3)){if(A3 instanceof YAHOO.widget.MenuItem){A6=this._removeItemFromGroupByValue(A5,A3);}else{if(AN.isNumber(A3)){A6=this._removeItemFromGroupByIndex(A5,A3);}}if(A6){A6.destroy();A4=A6;}}return A4;},getItems:function(){var A6=this._aItemGroups,A4,A5,A3=[];if(AN.isArray(A6)){A4=A6.length;A5=((A4==1)?A6[0]:(Array.prototype.concat.apply(A3,A6)));}return A5;},getItemGroups:function(){return this._aItemGroups;},getItem:function(A4,A5){var A6,A3;if(AN.isNumber(A4)){A6=this._getItemGroup(A5);if(A6){A3=A6[A4];}}return A3;},getSubmenus:function(){var A4=this.getItems(),A8=A4.length,A3,A5,A7,A6;if(A8>0){A3=[];for(A6=0;A6<A8;A6++){A7=A4[A6];if(A7){A5=A7.cfg.getProperty(O);if(A5){A3[A3.length]=A5;}}}}return A3;},clearContent:function(){var A7=this.getItems(),A4=A7.length,A5=this.element,A6=this.body,BB=this.header,A3=this.footer,BA,A9,A8;if(A4>0){A8=A4-1;do{BA=A7[A8];if(BA){A9=BA.cfg.getProperty(O);if(A9){this.cfg.configChangedEvent.unsubscribe(this._onParentMenuConfigChange,A9);this.renderEvent.unsubscribe(this._onParentMenuRender,A9);}this.removeItem(BA,BA.groupIndex);}}while(A8--);}if(BB){AB.purgeElement(BB);A5.removeChild(BB);}if(A3){AB.purgeElement(A3);A5.removeChild(A3);}if(A6){AB.purgeElement(A6);A6.innerHTML=v;}this.activeItem=null;this._aItemGroups=[];this._aListElements=[];this._aGroupTitleElements=[];this.cfg.setProperty(U,null);},destroy:function(){this.clearContent();this._aItemGroups=null;this._aListElements=null;this._aGroupTitleElements=null;s.superclass.destroy.call(this);},setInitialFocus:function(){var A3=this._getFirstEnabledItem();if(A3){A3.focus();}},setInitialSelection:function(){var A3=this._getFirstEnabledItem();if(A3){A3.cfg.setProperty(z,true);}},clearActiveItem:function(A5){if(this.cfg.getProperty(At)>0){this._cancelShowDelay();}var A3=this.activeItem,A6,A4;if(A3){A6=A3.cfg;if(A5){A3.blur();this.getRoot()._hasFocus=true;}A6.setProperty(z,false);A4=A6.getProperty(O);if(A4){A4.hide();}this.activeItem=null;}},focus:function(){if(!this.hasFocus()){this.setInitialFocus();}},blur:function(){var A3;if(this.hasFocus()){A3=A1.getFocusedMenuItem();if(A3){A3.blur();}}},hasFocus:function(){return(A1.getFocusedMenu()==this.getRoot());},subscribe:function(){function A6(BB,BA,BD){var BE=BA[0],BC=BE.cfg.getProperty(O);if(BC){BC.subscribe.apply(BC,BD);}}function A9(BB,BA,BD){var BC=this.cfg.getProperty(O);if(BC){BC.subscribe.apply(BC,BD);}}s.superclass.subscribe.apply(this,arguments);s.superclass.subscribe.call(this,AS,A6,arguments);var A3=this.getItems(),A8,A7,A4,A5;if(A3){A8=A3.length;if(A8>0){A5=A8-1;do{A7=A3[A5];A4=A7.cfg.getProperty(O);if(A4){A4.subscribe.apply(A4,arguments);}else{A7.cfg.subscribeToConfigEvent(O,A9,arguments);}}while(A5--);}}},initDefaultConfig:function(){s.superclass.initDefaultConfig.call(this);var A3=this.cfg;A3.addProperty(AZ.key,{handler:this.configVisible,value:AZ.value,validator:AZ.validator});A3.addProperty(AQ.key,{handler:this.configConstrainToViewport,value:AQ.value,validator:AQ.validator,supercedes:AQ.supercedes});A3.addProperty(AJ.key,{value:AJ.value,validator:AJ.validator,supercedes:AJ.supercedes});A3.addProperty(S.key,{handler:this.configPosition,value:S.value,validator:S.validator,supercedes:S.supercedes});A3.addProperty(A.key,{value:A.value,suppressEvent:A.suppressEvent});A3.addProperty(u.key,{value:u.value,validator:u.validator,suppressEvent:u.suppressEvent});A3.addProperty(Z.key,{value:Z.value,validator:Z.validator,suppressEvent:Z.suppressEvent});A3.addProperty(r.key,{handler:this.configHideDelay,value:r.value,validator:r.validator,suppressEvent:r.suppressEvent});A3.addProperty(w.key,{value:w.value,validator:w.validator,suppressEvent:w.suppressEvent});
A3.addProperty(p.key,{value:p.value,validator:p.validator,suppressEvent:p.suppressEvent});A3.addProperty(AO.key,{handler:this.configContainer,value:document.body,suppressEvent:AO.suppressEvent});A3.addProperty(Ad.key,{value:Ad.value,validator:Ad.validator,supercedes:Ad.supercedes,suppressEvent:Ad.suppressEvent});A3.addProperty(N.key,{value:N.value,validator:N.validator,supercedes:N.supercedes,suppressEvent:N.suppressEvent});A3.addProperty(X.key,{handler:this.configMaxHeight,value:X.value,validator:X.validator,suppressEvent:X.suppressEvent,supercedes:X.supercedes});A3.addProperty(W.key,{handler:this.configClassName,value:W.value,validator:W.validator,supercedes:W.supercedes});A3.addProperty(b.key,{handler:this.configDisabled,value:b.value,validator:b.validator,suppressEvent:b.suppressEvent});A3.addProperty(I.key,{handler:this.configShadow,value:I.value,validator:I.validator});A3.addProperty(Aj.key,{value:Aj.value,validator:Aj.validator});}});})();(function(){YAHOO.widget.MenuItem=function(AO,AN){if(AO){if(AN){this.parent=AN.parent;this.value=AN.value;this.id=AN.id;}this.init(AO,AN);}};var v=YAHOO.util.Dom,h=YAHOO.widget.Module,x=YAHOO.widget.Menu,a=YAHOO.widget.MenuItem,AG=YAHOO.util.CustomEvent,i=YAHOO.env.ua,AM=YAHOO.lang,AH="text",M="#",O="-",K="helptext",l="url",AD="target",A="emphasis",L="strongemphasis",Z="checked",u="submenu",G="disabled",B="selected",N="hassubmenu",S="checked-disabled",AE="hassubmenu-disabled",z="hassubmenu-selected",R="checked-selected",o="onclick",I="classname",AF="",g="OPTION",t="OPTGROUP",J="LI",Q="li",AA="href",AB='<a href="#"></a>',p="SELECT",V="DIV",AJ='<em class="helptext">',Y="<em>",H="</em>",U="<strong>",w="</strong>",W="preventcontextoverlap",f="obj",AC="scope",r="none",T="visible",D=" ",k="MenuItem",n=[["mouseOverEvent","mouseover"],["mouseOutEvent","mouseout"],["mouseDownEvent","mousedown"],["mouseUpEvent","mouseup"],["clickEvent","click"],["keyPressEvent","keypress"],["keyDownEvent","keydown"],["keyUpEvent","keyup"],["focusEvent","focus"],["blurEvent","blur"],["destroyEvent","destroy"]],m={key:AH,value:AF,validator:AM.isString,suppressEvent:true},q={key:K,supercedes:[AH],suppressEvent:true},F={key:l,value:M,suppressEvent:true},AK={key:AD,suppressEvent:true},AL={key:A,value:false,validator:AM.isBoolean,suppressEvent:true,supercedes:[AH]},b={key:L,value:false,validator:AM.isBoolean,suppressEvent:true,supercedes:[AH]},j={key:Z,value:false,validator:AM.isBoolean,suppressEvent:true,supercedes:[G,B]},E={key:u,suppressEvent:true,supercedes:[G,B]},AI={key:G,value:false,validator:AM.isBoolean,suppressEvent:true,supercedes:[AH,B]},d={key:B,value:false,validator:AM.isBoolean,suppressEvent:true},s={key:o,suppressEvent:true},y={key:I,value:null,validator:AM.isString,suppressEvent:true},c={},C;var X=function(AQ,AP){var AN=c[AQ];if(!AN){c[AQ]={};AN=c[AQ];}var AO=AN[AP];if(!AO){AO=AQ+O+AP;AN[AP]=AO;}return AO;};var e=function(AN){v.addClass(this.element,X(this.CSS_CLASS_NAME,AN));v.addClass(this._oAnchor,X(this.CSS_LABEL_CLASS_NAME,AN));};var P=function(AN){v.removeClass(this.element,X(this.CSS_CLASS_NAME,AN));v.removeClass(this._oAnchor,X(this.CSS_LABEL_CLASS_NAME,AN));};a.prototype={CSS_CLASS_NAME:"yuimenuitem",CSS_LABEL_CLASS_NAME:"yuimenuitemlabel",SUBMENU_TYPE:null,_oAnchor:null,_oHelpTextEM:null,_oSubmenu:null,_oOnclickAttributeValue:null,_sClassName:null,constructor:a,index:null,groupIndex:null,parent:null,element:null,srcElement:null,value:null,browser:h.prototype.browser,id:null,init:function(AN,AX){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=x;}this.cfg=new YAHOO.util.Config(this);this.initDefaultConfig();var AT=this.cfg,AU=M,AP,AW,AV,AO,AR,AQ,AS;if(AM.isString(AN)){this._createRootNodeStructure();AT.queueProperty(AH,AN);}else{if(AN&&AN.tagName){switch(AN.tagName.toUpperCase()){case g:this._createRootNodeStructure();AT.queueProperty(AH,AN.text);AT.queueProperty(G,AN.disabled);this.value=AN.value;this.srcElement=AN;break;case t:this._createRootNodeStructure();AT.queueProperty(AH,AN.label);AT.queueProperty(G,AN.disabled);this.srcElement=AN;this._initSubTree();break;case J:AV=v.getFirstChild(AN);if(AV){AU=AV.getAttribute(AA,2);AO=AV.getAttribute(AD);AR=AV.innerHTML;}this.srcElement=AN;this.element=AN;this._oAnchor=AV;AT.setProperty(AH,AR,true);AT.setProperty(l,AU,true);AT.setProperty(AD,AO,true);this._initSubTree();break;}}}if(this.element){AQ=(this.srcElement||this.element).id;if(!AQ){AQ=this.id||v.generateId();this.element.id=AQ;}this.id=AQ;v.addClass(this.element,this.CSS_CLASS_NAME);v.addClass(this._oAnchor,this.CSS_LABEL_CLASS_NAME);AS=n.length-1;do{AW=n[AS];AP=this.createEvent(AW[1]);AP.signature=AG.LIST;this[AW[0]]=AP;}while(AS--);if(AX){AT.applyConfig(AX);}AT.fireQueue();}},_createRootNodeStructure:function(){var AN,AO;if(!C){C=document.createElement(Q);C.innerHTML=AB;}AN=C.cloneNode(true);AN.className=this.CSS_CLASS_NAME;AO=AN.firstChild;AO.className=this.CSS_LABEL_CLASS_NAME;this.element=AN;this._oAnchor=AO;},_initSubTree:function(){var AT=this.srcElement,AP=this.cfg,AR,AQ,AO,AN,AS;if(AT.childNodes.length>0){if(this.parent.lazyLoad&&this.parent.srcElement&&this.parent.srcElement.tagName.toUpperCase()==p){AP.setProperty(u,{id:v.generateId(),itemdata:AT.childNodes});}else{AR=AT.firstChild;AQ=[];do{if(AR&&AR.tagName){switch(AR.tagName.toUpperCase()){case V:AP.setProperty(u,AR);break;case g:AQ[AQ.length]=AR;break;}}}while((AR=AR.nextSibling));AO=AQ.length;if(AO>0){AN=new this.SUBMENU_TYPE(v.generateId());AP.setProperty(u,AN);for(AS=0;AS<AO;AS++){AN.addItem((new AN.ITEM_TYPE(AQ[AS])));}}}}},configText:function(AW,AP,AR){var AO=AP[0],AQ=this.cfg,AU=this._oAnchor,AN=AQ.getProperty(K),AV=AF,AS=AF,AT=AF;if(AO){if(AN){AV=AJ+AN+H;}if(AQ.getProperty(A)){AS=Y;AT=H;}if(AQ.getProperty(L)){AS=U;AT=w;}AU.innerHTML=(AS+AO+AT+AV);}},configHelpText:function(AP,AO,AN){this.cfg.refireEvent(AH);},configURL:function(AP,AO,AN){var AR=AO[0];if(!AR){AR=M;}var AQ=this._oAnchor;if(i.opera){AQ.removeAttribute(AA);}AQ.setAttribute(AA,AR);},configTarget:function(AQ,AP,AO){var AN=AP[0],AR=this._oAnchor;
if(AN&&AN.length>0){AR.setAttribute(AD,AN);}else{AR.removeAttribute(AD);}},configEmphasis:function(AP,AO,AN){var AR=AO[0],AQ=this.cfg;if(AR&&AQ.getProperty(L)){AQ.setProperty(L,false);}AQ.refireEvent(AH);},configStrongEmphasis:function(AQ,AP,AO){var AN=AP[0],AR=this.cfg;if(AN&&AR.getProperty(A)){AR.setProperty(A,false);}AR.refireEvent(AH);},configChecked:function(AP,AO,AN){var AR=AO[0],AQ=this.cfg;if(AR){e.call(this,Z);}else{P.call(this,Z);}AQ.refireEvent(AH);if(AQ.getProperty(G)){AQ.refireEvent(G);}if(AQ.getProperty(B)){AQ.refireEvent(B);}},configDisabled:function(AP,AO,AN){var AR=AO[0],AS=this.cfg,AQ=AS.getProperty(u),AT=AS.getProperty(Z);if(AR){if(AS.getProperty(B)){AS.setProperty(B,false);}e.call(this,G);if(AQ){e.call(this,AE);}if(AT){e.call(this,S);}}else{P.call(this,G);if(AQ){P.call(this,AE);}if(AT){P.call(this,S);}}},configSelected:function(AP,AO,AN){var AT=this.cfg,AS=this._oAnchor,AR=AO[0],AU=AT.getProperty(Z),AQ=AT.getProperty(u);if(i.opera){AS.blur();}if(AR&&!AT.getProperty(G)){e.call(this,B);if(AQ){e.call(this,z);}if(AU){e.call(this,R);}}else{P.call(this,B);if(AQ){P.call(this,z);}if(AU){P.call(this,R);}}if(this.hasFocus()&&i.opera){AS.focus();}},_onSubmenuBeforeHide:function(AQ,AP){var AR=this.parent,AN;function AO(){AR._oAnchor.blur();AN.beforeHideEvent.unsubscribe(AO);}if(AR.hasFocus()){AN=AR.parent;AN.beforeHideEvent.subscribe(AO);}},configSubmenu:function(AU,AP,AS){var AR=AP[0],AQ=this.cfg,AO=this.parent&&this.parent.lazyLoad,AT,AV,AN;if(AR){if(AR instanceof x){AT=AR;AT.parent=this;AT.lazyLoad=AO;}else{if(AM.isObject(AR)&&AR.id&&!AR.nodeType){AV=AR.id;AN=AR;AN.lazyload=AO;AN.parent=this;AT=new this.SUBMENU_TYPE(AV,AN);AQ.setProperty(u,AT,true);}else{AT=new this.SUBMENU_TYPE(AR,{lazyload:AO,parent:this});AQ.setProperty(u,AT,true);}}if(AT){AT.cfg.setProperty(W,true);e.call(this,N);if(AQ.getProperty(l)===M){AQ.setProperty(l,(M+AT.id));}this._oSubmenu=AT;if(i.opera){AT.beforeHideEvent.subscribe(this._onSubmenuBeforeHide);}}}else{P.call(this,N);if(this._oSubmenu){this._oSubmenu.destroy();}}if(AQ.getProperty(G)){AQ.refireEvent(G);}if(AQ.getProperty(B)){AQ.refireEvent(B);}},configOnClick:function(AP,AO,AN){var AQ=AO[0];if(this._oOnclickAttributeValue&&(this._oOnclickAttributeValue!=AQ)){this.clickEvent.unsubscribe(this._oOnclickAttributeValue.fn,this._oOnclickAttributeValue.obj);this._oOnclickAttributeValue=null;}if(!this._oOnclickAttributeValue&&AM.isObject(AQ)&&AM.isFunction(AQ.fn)){this.clickEvent.subscribe(AQ.fn,((f in AQ)?AQ.obj:this),((AC in AQ)?AQ.scope:null));this._oOnclickAttributeValue=AQ;}},configClassName:function(AQ,AP,AO){var AN=AP[0];if(this._sClassName){v.removeClass(this.element,this._sClassName);}v.addClass(this.element,AN);this._sClassName=AN;},initDefaultConfig:function(){var AN=this.cfg;AN.addProperty(m.key,{handler:this.configText,value:m.value,validator:m.validator,suppressEvent:m.suppressEvent});AN.addProperty(q.key,{handler:this.configHelpText,supercedes:q.supercedes,suppressEvent:q.suppressEvent});AN.addProperty(F.key,{handler:this.configURL,value:F.value,suppressEvent:F.suppressEvent});AN.addProperty(AK.key,{handler:this.configTarget,suppressEvent:AK.suppressEvent});AN.addProperty(AL.key,{handler:this.configEmphasis,value:AL.value,validator:AL.validator,suppressEvent:AL.suppressEvent,supercedes:AL.supercedes});AN.addProperty(b.key,{handler:this.configStrongEmphasis,value:b.value,validator:b.validator,suppressEvent:b.suppressEvent,supercedes:b.supercedes});AN.addProperty(j.key,{handler:this.configChecked,value:j.value,validator:j.validator,suppressEvent:j.suppressEvent,supercedes:j.supercedes});AN.addProperty(AI.key,{handler:this.configDisabled,value:AI.value,validator:AI.validator,suppressEvent:AI.suppressEvent});AN.addProperty(d.key,{handler:this.configSelected,value:d.value,validator:d.validator,suppressEvent:d.suppressEvent});AN.addProperty(E.key,{handler:this.configSubmenu,supercedes:E.supercedes,suppressEvent:E.suppressEvent});AN.addProperty(s.key,{handler:this.configOnClick,suppressEvent:s.suppressEvent});AN.addProperty(y.key,{handler:this.configClassName,value:y.value,validator:y.validator,suppressEvent:y.suppressEvent});},getNextEnabledSibling:function(){var AQ,AT,AN,AS,AR,AO;function AP(AU,AV){return AU[AV]||AP(AU,(AV+1));}if(this.parent instanceof x){AQ=this.groupIndex;AT=this.parent.getItemGroups();if(this.index<(AT[AQ].length-1)){AN=AP(AT[AQ],(this.index+1));}else{if(AQ<(AT.length-1)){AS=AQ+1;}else{AS=0;}AR=AP(AT,AS);AN=AP(AR,0);}AO=(AN.cfg.getProperty(G)||AN.element.style.display==r)?AN.getNextEnabledSibling():AN;}return AO;},getPreviousEnabledSibling:function(){var AS,AU,AO,AN,AR,AQ;function AT(AV,AW){return AV[AW]||AT(AV,(AW-1));}function AP(AV,AW){return AV[AW]?AW:AP(AV,(AW+1));}if(this.parent instanceof x){AS=this.groupIndex;AU=this.parent.getItemGroups();if(this.index>AP(AU[AS],0)){AO=AT(AU[AS],(this.index-1));}else{if(AS>AP(AU,0)){AN=AS-1;}else{AN=AU.length-1;}AR=AT(AU,AN);AO=AT(AR,(AR.length-1));}AQ=(AO.cfg.getProperty(G)||AO.element.style.display==r)?AO.getPreviousEnabledSibling():AO;}return AQ;},focus:function(){var AQ=this.parent,AP=this._oAnchor,AN=AQ.activeItem;function AO(){try{if(!(i.ie&&!document.hasFocus())){if(AN){AN.blurEvent.fire();}AP.focus();this.focusEvent.fire();}}catch(AR){}}if(!this.cfg.getProperty(G)&&AQ&&AQ.cfg.getProperty(T)&&this.element.style.display!=r){AM.later(0,this,AO);}},blur:function(){var AN=this.parent;if(!this.cfg.getProperty(G)&&AN&&AN.cfg.getProperty(T)){AM.later(0,this,function(){try{this._oAnchor.blur();this.blurEvent.fire();}catch(AO){}},0);}},hasFocus:function(){return(YAHOO.widget.MenuManager.getFocusedMenuItem()==this);},destroy:function(){var AP=this.element,AO,AN,AR,AQ;if(AP){AO=this.cfg.getProperty(u);if(AO){AO.destroy();}AN=AP.parentNode;if(AN){AN.removeChild(AP);this.destroyEvent.fire();}AQ=n.length-1;do{AR=n[AQ];this[AR[0]].unsubscribeAll();}while(AQ--);this.cfg.configChangedEvent.unsubscribeAll();}},toString:function(){var AO=k,AN=this.id;if(AN){AO+=(D+AN);}return AO;}};AM.augmentProto(a,YAHOO.util.EventProvider);
})();(function(){var B="xy",C="mousedown",F="ContextMenu",J=" ";YAHOO.widget.ContextMenu=function(L,K){YAHOO.widget.ContextMenu.superclass.constructor.call(this,L,K);};var I=YAHOO.util.Event,E=YAHOO.env.ua,G=YAHOO.widget.ContextMenu,A={"TRIGGER_CONTEXT_MENU":"triggerContextMenu","CONTEXT_MENU":(E.opera?C:"contextmenu"),"CLICK":"click"},H={key:"trigger",suppressEvent:true};function D(L,K,M){this.cfg.setProperty(B,M);this.beforeShowEvent.unsubscribe(D,M);}YAHOO.lang.extend(G,YAHOO.widget.Menu,{_oTrigger:null,_bCancelled:false,contextEventTarget:null,triggerContextMenuEvent:null,init:function(L,K){G.superclass.init.call(this,L);this.beforeInitEvent.fire(G);if(K){this.cfg.applyConfig(K,true);}this.initEvent.fire(G);},initEvents:function(){G.superclass.initEvents.call(this);this.triggerContextMenuEvent=this.createEvent(A.TRIGGER_CONTEXT_MENU);this.triggerContextMenuEvent.signature=YAHOO.util.CustomEvent.LIST;},cancel:function(){this._bCancelled=true;},_removeEventHandlers:function(){var K=this._oTrigger;if(K){I.removeListener(K,A.CONTEXT_MENU,this._onTriggerContextMenu);if(E.opera){I.removeListener(K,A.CLICK,this._onTriggerClick);}}},_onTriggerClick:function(L,K){if(L.ctrlKey){I.stopEvent(L);}},_onTriggerContextMenu:function(M,K){var L;if(!(M.type==C&&!M.ctrlKey)){I.stopEvent(M);this.contextEventTarget=I.getTarget(M);this.triggerContextMenuEvent.fire(M);YAHOO.widget.MenuManager.hideVisible();if(!this._bCancelled){L=I.getXY(M);if(!YAHOO.util.Dom.inDocument(this.element)){this.beforeShowEvent.subscribe(D,L);}else{this.cfg.setProperty(B,L);}this.show();}this._bCancelled=false;}},toString:function(){var L=F,K=this.id;if(K){L+=(J+K);}return L;},initDefaultConfig:function(){G.superclass.initDefaultConfig.call(this);this.cfg.addProperty(H.key,{handler:this.configTrigger,suppressEvent:H.suppressEvent});},destroy:function(){this._removeEventHandlers();G.superclass.destroy.call(this);},configTrigger:function(L,K,N){var M=K[0];if(M){if(this._oTrigger){this._removeEventHandlers();}this._oTrigger=M;I.on(M,A.CONTEXT_MENU,this._onTriggerContextMenu,this,true);if(E.opera){I.on(M,A.CLICK,this._onTriggerClick,this,true);}}else{this._removeEventHandlers();}}});}());YAHOO.widget.ContextMenuItem=YAHOO.widget.MenuItem;(function(){var D=YAHOO.lang,N="static",M="dynamic,"+N,A="disabled",F="selected",B="autosubmenudisplay",G="submenu",C="visible",Q=" ",H="submenutoggleregion",P="MenuBar";YAHOO.widget.MenuBar=function(T,S){YAHOO.widget.MenuBar.superclass.constructor.call(this,T,S);};function O(T){var S=false;if(D.isString(T)){S=(M.indexOf((T.toLowerCase()))!=-1);}return S;}var R=YAHOO.util.Event,L=YAHOO.widget.MenuBar,K={key:"position",value:N,validator:O,supercedes:[C]},E={key:"submenualignment",value:["tl","bl"]},J={key:B,value:false,validator:D.isBoolean,suppressEvent:true},I={key:H,value:false,validator:D.isBoolean};D.extend(L,YAHOO.widget.Menu,{init:function(T,S){if(!this.ITEM_TYPE){this.ITEM_TYPE=YAHOO.widget.MenuBarItem;}L.superclass.init.call(this,T);this.beforeInitEvent.fire(L);if(S){this.cfg.applyConfig(S,true);}this.initEvent.fire(L);},CSS_CLASS_NAME:"yuimenubar",SUBMENU_TOGGLE_REGION_WIDTH:20,_onKeyDown:function(U,T,Y){var S=T[0],Z=T[1],W,X,V;if(Z&&!Z.cfg.getProperty(A)){X=Z.cfg;switch(S.keyCode){case 37:case 39:if(Z==this.activeItem&&!X.getProperty(F)){X.setProperty(F,true);}else{V=(S.keyCode==37)?Z.getPreviousEnabledSibling():Z.getNextEnabledSibling();if(V){this.clearActiveItem();V.cfg.setProperty(F,true);W=V.cfg.getProperty(G);if(W){W.show();W.setInitialFocus();}else{V.focus();}}}R.preventDefault(S);break;case 40:if(this.activeItem!=Z){this.clearActiveItem();X.setProperty(F,true);Z.focus();}W=X.getProperty(G);if(W){if(W.cfg.getProperty(C)){W.setInitialSelection();W.setInitialFocus();}else{W.show();W.setInitialFocus();}}R.preventDefault(S);break;}}if(S.keyCode==27&&this.activeItem){W=this.activeItem.cfg.getProperty(G);if(W&&W.cfg.getProperty(C)){W.hide();this.activeItem.focus();}else{this.activeItem.cfg.setProperty(F,false);this.activeItem.blur();}R.preventDefault(S);}},_onClick:function(e,Y,b){L.superclass._onClick.call(this,e,Y,b);var d=Y[1],T=true,S,f,U,W,Z,a,c,V;var X=function(){if(a.cfg.getProperty(C)){a.hide();}else{a.show();}};if(d&&!d.cfg.getProperty(A)){f=Y[0];U=R.getTarget(f);W=this.activeItem;Z=this.cfg;if(W&&W!=d){this.clearActiveItem();}d.cfg.setProperty(F,true);a=d.cfg.getProperty(G);if(a){S=d.element;c=YAHOO.util.Dom.getX(S);V=c+(S.offsetWidth-this.SUBMENU_TOGGLE_REGION_WIDTH);if(Z.getProperty(H)){if(R.getPageX(f)>V){X();R.preventDefault(f);T=false;}}else{X();}}}return T;},configSubmenuToggle:function(U,T){var S=T[0];if(S){this.cfg.setProperty(B,false);}},toString:function(){var T=P,S=this.id;if(S){T+=(Q+S);}return T;},initDefaultConfig:function(){L.superclass.initDefaultConfig.call(this);var S=this.cfg;S.addProperty(K.key,{handler:this.configPosition,value:K.value,validator:K.validator,supercedes:K.supercedes});S.addProperty(E.key,{value:E.value,suppressEvent:E.suppressEvent});S.addProperty(J.key,{value:J.value,validator:J.validator,suppressEvent:J.suppressEvent});S.addProperty(I.key,{value:I.value,validator:I.validator,handler:this.configSubmenuToggle});}});}());YAHOO.widget.MenuBarItem=function(B,A){YAHOO.widget.MenuBarItem.superclass.constructor.call(this,B,A);};YAHOO.lang.extend(YAHOO.widget.MenuBarItem,YAHOO.widget.MenuItem,{init:function(B,A){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=YAHOO.widget.Menu;}YAHOO.widget.MenuBarItem.superclass.init.call(this,B);var C=this.cfg;if(A){C.applyConfig(A,true);}C.fireQueue();},CSS_CLASS_NAME:"yuimenubaritem",CSS_LABEL_CLASS_NAME:"yuimenubaritemlabel",toString:function(){var A="MenuBarItem";if(this.cfg&&this.cfg.getProperty("text")){A+=(": "+this.cfg.getProperty("text"));}return A;}});YAHOO.register("menu",YAHOO.widget.Menu,{version:"2.6.0",build:"1321"});
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 DATE_PICKER_NAVIGATOR_PROPERTY="datepicker.navigator";var DATE_PICKER_TWO_MONTHS_PROPERTY="datepicker.two-months";var HTML_EDITOR_PROPERTY="htmleditor";var SHOW_ERROR_DIALOG_PROPERTY="show-error-dialog";var CLIENT_EVENTS_MODE_PROPERTY="client.events.mode";var CLIENT_EVENTS_FILTER_PROPERTY="client.events.filter";var RESOURCES_VERSIONED="oxf.resources.versioned";var APPLICATION_RESOURCES_VERSION_PROPERTY="oxf.resources.version-number";var NEW_XHTML_LAYOUT_PROPERTY="new-xhtml-layout";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=100;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 XFORMS_DATEPICKER_NAVIGATOR=true;var XFORMS_DATEPICKER_TWO_MONTHS=false;var XFORMS_HTMLEDITOR="yui";var XFORMS_CLIENT_EVENTS_MODE="default";var XFORMS_CLIENT_EVENTS_FILTER="";var XFORMS_SEPARATOR_1="\xB7";var XFORMS_SEPARATOR_2="-";var XFORMS_SERVER_PATH="/xforms-server";var XXFORMS_NAMESPACE_URI="http://orbeon.org/oxf/xml/xforms";var PATH_TO_JAVASCRIPT_1="/ops/javascript/xforms";var PATH_TO_JAVASCRIPT_2=XFORMS_SERVER_PATH+"/";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 DEFAULT_LOADING_TEXT="Loading...";var ORBEON=ORBEON||{};ORBEON.util=ORBEON.util||{};ORBEON.xforms=ORBEON.xforms||{};ORBEON.widgets=ORBEON.widgets||{};ORBEON.widget=ORBEON.widget||{};ORBEON.xforms.Globals=ORBEON.xforms.Globals||{};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)}},setClasses:function(a,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},_regenerateOrbeonClasses:function(c){c.orbeonClasses={};var b=c.className.split(" ");for(var a=0;a<b.length;a++){c.orbeonClasses[b[a]]=true}},hasClass:function(a,b){if(!a.orbeonClasses){this._regenerateOrbeonClasses(a)}return a.orbeonClasses[b]==true},addClass:function(a,b){if(!this.hasClass(a,b)){a.orbeonClasses[b]=true;this._regenerateClassName(a)}},setClasses:function(a,b){a.className=b;this._regenerateOrbeonClasses(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;var d=document.all[c];if(d){if(d.length){for(var b=0;b<d.length;b++){if(d[b].id==c){a=d[b];break}}}else{a=d}}}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}}},setAttribute:function(d,c,g){if(c=="class"){ORBEON.util.Dom.setClasses(d,g)}else{if(c=="colspan"){d.colSpan=g}else{if(c=="rowspan"){d.rowSpan=g}else{if(c=="accesskey"){d.accessKey=g}else{if(c=="tabindex"){d.tabIndex=g}else{if(c=="type"){d.type=g}else{if(c=="name"&&d.tagName.toLowerCase()=="input"){d.setAttribute(c,g);if(YAHOO.lang.isObject(d.form)){var b=d.form[g];var f=false;if(b&&YAHOO.lang.isNumber(b.length)){for(var e=0;e<b.length;e++){if(b[e]==d){f=true}}}else{if(YAHOO.lang.isObject(b)){if(b==d){f=true}}}if(!f){var a=d.outerHTML;a=a.replace(new RegExp(" name=.*( |>)","g"),"$1");a=a.replace(new RegExp(">"),' name="'+g+'">');var h=document.createElement(a);d.parentNode.insertBefore(h,d);d.parentNode.removeChild(d)}}}else{d.setAttribute(c,g)}}}}}}}},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=YAHOO.util.Dom.getElementsByClassName("xforms-upload-select",null,a)[0];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);c.setAttribute("unselectable","on");b.replaceChild(c,d);if(ORBEON.xforms.Globals.isRenderingEngineTrident){ORBEON.xforms.Init.registerChangeListenerOnFormElement(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}},nudgeAferDelay:function(b){if(YAHOO.env.ua.ie!=0&&YAHOO.env.ua.ie<=7){var a=b.getElementsByTagName("table");window.setTimeout(function(){b.className=b.className;for(var d=0;d<a.length;d++){var c=a[d];c.className=c.className}},ORBEON.util.Utils.getProperty(INTERNAL_SHORT_DELAY_PROPERTY))}}};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;")},endsWith:function(c,b){var a=c.lastIndexOf(b);return a!=-1&&a+b.length==c.length},normalizeSerializedHTML:function(a){if(typeof a=="string"){return a.replace(XFORMS_REGEXP_CR,"")}else{return a}}};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]"){return a.getHours()+":"+ORBEON.util.DateTime._padAZero(a.getMinutes())+":"+ORBEON.util.DateTime._padAZero(a.getSeconds())}else{return(a.getHours()==12?12:a.getHours()%12)+":"+ORBEON.util.DateTime._padAZero(a.getMinutes())+":"+ORBEON.util.DateTime._padAZero(a.getSeconds())+(a.getHours()<12?" a.m.":" p.m.")}},jsDateToformatDisplayDate:function(a){if(ORBEON.util.Utils.getProperty(FORMAT_INPUT_DATE_PROPERTY)=="[D].[M].[Y]"){return a.getDate()+"."+(a.getMonth()+1)+"."+a.getFullYear()}else{if(ORBEON.util.Utils.getProperty(FORMAT_INPUT_DATE_PROPERTY)=="[D]/[M]/[Y]"){return a.getDate()+"/"+(a.getMonth()+1)+"/"+a.getFullYear()}else{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|pm|p\.m\.)$/,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|pm|p\.m\.)$/,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|pm|p\.m\.)$/,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}) ?(a|am|a\.m\.)?$/,handler:function(b){var c=new Date();var a=parseInt(b[1],10);if(!YAHOO.lang.isUndefined(b[4])&&b[4]!=""){a=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}) ?(a|am|a\.m\.)?$/,handler:function(b){var c=new Date();var a=parseInt(b[1],10);if(!YAHOO.lang.isUndefined(b[3])&&b[3]!=""){a=a%12}c.setHours(a);c.setMinutes(parseInt(b[2],10));c.setSeconds(0);return c}},{re:/^(\d{1,2}) ?(a|am|a\.m\.)?$/,handler:function(b){var c=new Date();var a=parseInt(b[1],10);if(!YAHOO.lang.isUndefined(b[2])&&b[2]!=""){a=a%12}c.setHours(a);c.setMinutes(0);c.setSeconds(0);return c}},{re:/^(\d{1,6})$/,handler:function(e){var f=new Date();var c=e[1].substring(0,2);var a=parseInt(e[1].substring(2,4),10);var b=parseInt(e[1].substring(4,6),10);if(isNaN(a)){a=0}if(isNaN(b)){b=0}f.setHours(parseInt(c,10));f.setMinutes(parseInt(a,10));f.setSeconds(parseInt(b,10));return f}}],_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){return new Date(ORBEON.util.DateTime._currentYear,ORBEON.util.DateTime._parseMonth(a[2]),parseInt(a[1],10))}},{re:/^(\d{1,2})(?:st|nd|rd|th)? (\w+),? (\d{2,4})$/i,handler:function(a){return new Date(ORBEON.util.DateTime._parseYear(a[3]),ORBEON.util.DateTime._parseMonth(a[2]),parseInt(a[1],10))}},{re:/^(\w+) (\d{1,2})(?:st|nd|rd|th)?$/i,handler:function(a){return new Date(ORBEON.util.DateTime._currentYear,ORBEON.util.DateTime._parseMonth(a[1]),parseInt(a[2],10))}},{re:/^(\w+) (\d{1,2})(?:st|nd|rd|th)?,? (\d{2,4})$/i,handler:function(a){return new Date(ORBEON.util.DateTime._parseYear(a[3]),ORBEON.util.DateTime._parseMonth(a[1]),parseInt(a[2],10))}},{re:/^next (\w+)$/i,handler:function(e){var f=new Date();var b=f.getDay();var c=ORBEON.util.DateTime._parseWeekday(e[1]);var a=c-b;if(c<=b){a+=7}f.setDate(f.getDate()+a);return f}},{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;if(ORBEON.util.Utils.getProperty(FORMAT_INPUT_DATE_PROPERTY)=="[D]/[M]/[Y]"){b=new Date(ORBEON.util.DateTime._parseYear(a[3]),parseInt(a[2],10)-1,parseInt(a[1],10))}else{b=new Date(ORBEON.util.DateTime._parseYear(a[3]),parseInt(a[1],10)-1,parseInt(a[2],10))}return b}},{re:/^(\d{1,2})\/(\d{1,2})$/,handler:function(a){var b;if(ORBEON.util.Utils.getProperty(FORMAT_INPUT_DATE_PROPERTY)=="[D]/[M]/[Y]"){b=new Date(ORBEON.util.DateTime._currentYear,parseInt(a[1],10)-1,parseInt(a[2],10))}else{b=new Date(ORBEON.util.DateTime._currentYear,parseInt(a[2],10)-1,parseInt(a[1],10))}return b}},{re:/^(\d{1,2})\.(\d{1,2})\.(\d{2,4})$/,handler:function(a){return new Date(ORBEON.util.DateTime._parseYear(a[3]),parseInt(a[2],10)-1,parseInt(a[1],10))}},{re:/(^\d{2,4})-(\d{1,2})-(\d{1,2})$/,handler:function(a){return new Date(ORBEON.util.DateTime._parseYear(a[1]),parseInt(a[2],10)-1,parseInt(a[3],10))}}],_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])},_currentYear:new Date().getFullYear(),_parseYear:function(b){b=parseInt(b,10);if(b<100){var a=1900+b;var c=2000+b;b=Math.abs(a-ORBEON.util.DateTime._currentYear)<Math.abs(c-ORBEON.util.DateTime._currentYear)?a:c}return b}};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;case DATE_PICKER_NAVIGATOR_PROPERTY:return XFORMS_DATEPICKER_NAVIGATOR;case DATE_PICKER_TWO_MONTHS_PROPERTY:return XFORMS_DATEPICKER_TWO_MONTHS;case HTML_EDITOR_PROPERTY:return XFORMS_HTMLEDITOR;case SHOW_ERROR_DIALOG_PROPERTY:return"true";case CLIENT_EVENTS_MODE_PROPERTY:return XFORMS_CLIENT_EVENTS_MODE;case CLIENT_EVENTS_FILTER_PROPERTY:return XFORMS_CLIENT_EVENTS_FILTER;case RESOURCES_VERSIONED:return"false";case NEW_XHTML_LAYOUT_PROPERTY:return false}return null},hideModalProgressPanel:function(){if(ORBEON.xforms.Globals.modalProgressPanel){ORBEON.xforms.Globals.modalProgressPanel.hide();ORBEON.xforms.Globals.modalProgressPanel=null}},displayModalProgressPanel:function(){if(!ORBEON.xforms.Globals.modalProgressPanel){ORBEON.xforms.Globals.modalProgressPanel=new YAHOO.widget.Panel("wait",{width:"60px",fixedcenter:true,close:false,draggable:false,zindex:4,modal:true,visible:true});ORBEON.xforms.Globals.modalProgressPanel.setBody('<img src="'+ORBEON.xforms.Globals.resourcesBaseURL+'/ops/images/xforms/processing.gif"/>');ORBEON.xforms.Globals.modalProgressPanel.render(document.body)}ORBEON.xforms.Globals.modalProgressPanel.show()},countOccurrences:function(c,b){var a=0;var d=c.indexOf(b);while(d!=-1){a++;d=c.indexOf(b,d+1)}return a},appendToEffectiveId:function(c,a){var b=ORBEON.util.Utils.getEffectiveIdNoSuffix(c);return b+a+ORBEON.util.Utils.getEffectiveIdSuffixWithSeparator(c)},getEffectiveIdNoSuffix:function(b){if(b==null){return null}var a=b.indexOf(XFORMS_SEPARATOR_1);if(a!=-1){return b.substring(0,a)}else{return b}},getEffectiveIdSuffixWithSeparator:function(b){if(b==null){return null}var a=b.indexOf(XFORMS_SEPARATOR_1);if(a!=-1){return b.substring(a)}else{return""}},getLocalName:function(a){if(a.nodeType==1){return a.tagName.indexOf(":")==-1?a.tagName:a.tagName.substr(a.tagName.indexOf(":")+1)}else{return null}},addSuffixToIds:function(g,f,d){var h=f;for(var j=0;j<d;j++){h+=XFORMS_SEPARATOR_2+"1"}if(g.id){g.id=ORBEON.util.Utils.appendRepeatSuffix(g.id,h);ORBEON.xforms.Globals.idToElement[g.id]=g}if(g.htmlFor){g.htmlFor=ORBEON.util.Utils.appendRepeatSuffix(g.htmlFor,h)}if(g.name){var k=ORBEON.util.Utils.appendRepeatSuffix(g.name,h);if(g.tagName.toLowerCase()=="input"&&g.type.toLowerCase()=="radio"&&ORBEON.xforms.Globals.isRenderingEngineTrident){var l=document.createElement("<"+g.tagName+" name='"+k+"'>");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){l.setAttribute(c.nodeName,c.nodeValue)}}YAHOO.util.Event.addListener(l,"focus",ORBEON.xforms.Events.focus);YAHOO.util.Event.addListener(l,"blur",ORBEON.xforms.Events.blur);YAHOO.util.Event.addListener(l,"change",ORBEON.xforms.Events.change);g.replaceNode(l)}else{g.name=k}}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--}ORBEON.util.Utils.addSuffixToIds(a,f,d);if(a.id&&a.id.indexOf("repeat-begin-")==0){d++}}}},getClassForRepeatId:function(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},stringReplace:function(c,d,b){function a(h,k,g){switch(h.nodeType){case ELEMENT_TYPE:for(var f=0;f<h.attributes.length;f++){var j=new String(h.attributes[f].value).replace(k,g);if(j!=h.attributes[f].value){ORBEON.util.Dom.setAttribute(h,h.attributes[f].name,j)}}for(var f=0;f<h.childNodes.length;f++){a(h.childNodes[f],k,g)}break;case TEXT_TYPE:var j=new String(h.nodeValue).replace(k,g);if(j!=h.nodeValue){h.nodeValue=j}break}}d=d.replace(new RegExp("\\$","g"),"\\$");b=b.replace(new RegExp("\\$","g"),"$$$$");var e=new RegExp(d,"g");a(c,e,b)},appendRepeatSuffix:function(b,a){if(a==""){return b}if(a.charAt(0)==XFORMS_SEPARATOR_2){a=a.substring(1)}b+=b.indexOf(XFORMS_SEPARATOR_1)==-1?XFORMS_SEPARATOR_1:XFORMS_SEPARATOR_2;b+=a;return b},findRepeatDelimiter:function(k,f){var a="";var g=k;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-"+k+a;var d=ORBEON.util.Dom.getElementById(b);if(!d){return null}var j=d;var c=0;while(true){while(j.nodeType!=ELEMENT_TYPE||!ORBEON.util.Dom.hasClass(j,"xforms-repeat-delimiter")){j=j.nextSibling;if(!j){return null}}c++;if(c==f){break}j=j.nextSibling}return j}};ORBEON.util.Test={executeWithInitialInstance:function(a,b){ORBEON.testing.executeCausingAjaxRequest(a,function(){ORBEON.xforms.Document.dispatchEvent("main-model","restore-instance")},function(){b.call(a)})},executeCausingAjaxRequest:function(b,c,d){function a(){b.resume(function(){ORBEON.xforms.Events.ajaxResponseProcessedEvent.unsubscribe(a);d.call(b)})}ORBEON.xforms.Events.ajaxResponseProcessedEvent.subscribe(a,b,true);c.call(b);b.wait(20000)},startFirebugLite:function(){if(!window.firebug){var a=document.createElement("script");a.setAttribute("src","http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js");document.body.appendChild(a);(function(){if(window.firebug){firebug.init()}else{setTimeout(arguments.callee)}})()}}};ORBEON.xforms.Document={dispatchEvent:function(k,g,b,f,c,h,e){if(b==null){for(var j=0;j<document.forms.length;j++){var d=document.forms[j];if(ORBEON.util.Dom.hasClass(d,"xforms-form")){b=d;break}}}var a=new ORBEON.xforms.Server.Event(b,k,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(c,e){var a=""+e;var d=ORBEON.util.Dom.getElementById(c);if(d==null){throw"ORBEON.xforms.Document.setValue: can't find control id '"+c+"'"}ORBEON.xforms.Controls.setCurrentValue(d,a);var b=new ORBEON.xforms.Server.Event(null,d.id,null,a,"xxforms-value-change-with-focus-change");ORBEON.xforms.Server.fireEvents([b],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,c,a){ORBEON.xforms.Offline.init();ORBEON.xforms.Offline.loadFormInIframe(b,function(d){if(a){d.contentWindow.ORBEON.xforms.Events.ajaxResponseProcessedEvent.subscribe(function(){a(d.contentWindow)})}d.contentWindow.ORBEON.xforms.Offline.takeOnline(c)})}};ORBEON.xforms.Controls={isRelevant:function(a){return !ORBEON.util.Dom.hasClass(a,"xforms-disabled")&&!ORBEON.util.Dom.hasClass(a,"xforms-disabled-subsequent")},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(h){if(ORBEON.util.Dom.hasClass(h,"xforms-type-time")){var g=YAHOO.util.Dom.getElementsByClassName("xforms-input-input",null,h)[0].value;var r=ORBEON.util.DateTime.magicTimeToJSDate(g);return r==null?g:ORBEON.util.DateTime.jsDateToISOTime(r)}else{if(ORBEON.util.Dom.hasClass(h,"xforms-type-date")){var a;if(ORBEON.util.Dom.hasClass(h,"xforms-input-appearance-minimal")){var k=YAHOO.util.Dom.getElementsByClassName("xforms-input-appearance-minimal","img",h)[0];a=ORBEON.util.Dom.getAttribute(k,"alt")}else{a=YAHOO.util.Dom.getElementsByClassName("xforms-input-input",null,h)[0].value}var e=ORBEON.util.DateTime.magicDateToJSDate(a);return e==null?a:ORBEON.util.DateTime.jsDateToISODate(e)}else{if(ORBEON.util.Dom.hasClass(h,"xforms-type-dateTime")){var u=YAHOO.util.Dom.getElementsByClassName("xforms-type-date",null,h)[0].value;var b=ORBEON.util.DateTime.magicDateToJSDate(u);var j=YAHOO.util.Dom.getElementsByClassName("xforms-type-time",null,h)[0].value;var m=ORBEON.util.DateTime.magicTimeToJSDate(j);if(b==null||m==null){return u==""&&j==""?"":u+"T"+j}else{return ORBEON.util.DateTime.jsDateToISODateTime(b,m)}}else{if((ORBEON.util.Dom.hasClass(h,"xforms-input")&&!ORBEON.util.Dom.hasClass(h,"xforms-type-boolean")&&!ORBEON.util.Dom.hasClass(h,"xforms-static"))||ORBEON.util.Dom.hasClass(h,"xforms-secret")){var l=h.tagName.toLowerCase()=="input"?h:h.getElementsByTagName("input")[0];return l.value}else{if(ORBEON.util.Dom.hasClass(h,"xforms-select1-open")){return YAHOO.util.Dom.getElementsByClassName("xforms-select1-open-input",null,h)[0].value}else{if(ORBEON.util.Dom.hasClass(h,"xforms-select-appearance-full")||ORBEON.util.Dom.hasClass(h,"xforms-select1-appearance-full")||(ORBEON.util.Dom.hasClass(h,"xforms-input")&&ORBEON.util.Dom.hasClass(h,"xforms-type-boolean"))){var c=h.getElementsByTagName("input");var v="";for(var p=0;p<c.length;p++){var l=c[p];if(l.checked){if(v!=""){v+=" "}v+=l.value}}if(v==""&&ORBEON.util.Dom.hasClass(h,"xforms-type-boolean")){v="false"}return v}else{if(ORBEON.util.Dom.hasClass(h,"xforms-select-appearance-compact")||ORBEON.util.Dom.hasClass(h,"xforms-select1-appearance-minimal")||ORBEON.util.Dom.hasClass(h,"xforms-select1-appearance-compact")||ORBEON.util.Dom.hasClass(h,"xforms-input-appearance-minimal")||ORBEON.util.Dom.hasClass(h,"xforms-input-appearance-compact")){var d=ORBEON.util.Utils.getProperty(NEW_XHTML_LAYOUT_PROPERTY)?YAHOO.util.Dom.getElementsByClassName("","select",h)[0].options:h.options;var w="";for(var f=0;f<d.length;f++){var n=d[f];if(n.selected){if(w!=""){w+=" "}w+=n.value}}return w}else{if(ORBEON.util.Dom.hasClass(h,"xforms-textarea")&&!ORBEON.util.Dom.hasClass(h,"xforms-mediatype-text-html")){var o=h.tagName.toLowerCase()=="textarea"?h:h.getElementsByTagName("textarea")[0];return o.value}else{if(ORBEON.util.Dom.hasClass(h,"xforms-textarea")&&ORBEON.util.Dom.hasClass(h,"xforms-mediatype-text-html")){if(ORBEON.util.Utils.getProperty(HTML_EDITOR_PROPERTY)=="yui"){return ORBEON.widgets.RTE.getValue(h)}else{var t=FCKeditorAPI.GetInstance(h.name);return t.GetXHTML()}}else{if(ORBEON.util.Dom.hasClass(h,"xforms-output")||(ORBEON.util.Dom.hasClass(h,"xforms-input")&&ORBEON.util.Dom.hasClass(h,"xforms-static"))){if(ORBEON.util.Dom.hasClass(h,"xforms-mediatype-image")){var q=ORBEON.util.Dom.getChildElementByIndex(h,0);return q.src}else{if(ORBEON.util.Dom.hasClass(h,"xforms-mediatype-text-html")){return h.innerHTML}else{var s=ORBEON.util.Utils.getProperty(NEW_XHTML_LAYOUT_PROPERTY)?h.getElementsByTagName("span")[0]:h;return ORBEON.util.Dom.getStringValue(s)}}}}}}}}}}}}},setCurrentValue:function(x,J,s,q,p,o){var H=ORBEON.util.Dom.hasClass(x,"xforms-static");if(ORBEON.util.Dom.hasClass(x,"xforms-output-appearance-xxforms-download")){var d=ORBEON.util.Dom.getElementsByName(x,"a")[0];if(J==""){d.setAttribute("href","#");YAHOO.util.Dom.addClass(d,"xforms-readonly")}else{d.setAttribute("href",J);YAHOO.util.Dom.removeClass(d,"xforms-readonly")}}else{if(ORBEON.util.Dom.hasClass(x,"xforms-output")||H){if(ORBEON.util.Dom.hasClass(x,"xforms-mediatype-image")){var b=ORBEON.util.Dom.getChildElementByIndex(x,0);b.src=J}else{if(ORBEON.util.Dom.hasClass(x,"xforms-mediatype-text-html")){x.innerHTML=J}else{var z=ORBEON.util.Utils.getProperty(NEW_XHTML_LAYOUT_PROPERTY)?YAHOO.util.Dom.getElementsByClassName("xforms-output-output",null,x)[0]:x;ORBEON.util.Dom.setStringValue(z,J)}}}else{if(ORBEON.xforms.Globals.changedIdsRequest[x.id]!=null){}else{if(ORBEON.util.Dom.hasClass(x,"xforms-trigger")||ORBEON.util.Dom.hasClass(x,"xforms-submit")){}else{if(ORBEON.util.Dom.hasClass(x,"xforms-select1-open")){if(x.value!=J){x.value=J;x.getElementsByTagName("input")[0].value=J;x.previousValue=J}}else{if(ORBEON.util.Dom.hasClass(x,"xforms-type-time")){var D=x.getElementsByTagName("input")[0];var U=ORBEON.util.DateTime.magicTimeToJSDate(J);D.value=U==null?J:ORBEON.util.DateTime.jsDateToformatDisplayTime(U)}else{if(ORBEON.util.Dom.hasClass(x,"xforms-type-date")){var U=ORBEON.util.DateTime.magicDateToJSDate(J);var h=U==null?J:ORBEON.util.DateTime.jsDateToformatDisplayDate(U);if(ORBEON.util.Dom.hasClass(x,"xforms-input-appearance-minimal")){var y=x.getElementsByTagName("img")[0];ORBEON.util.Dom.setAttribute(y,"alt",h)}else{var D=x.getElementsByTagName("input")[0];D.value=h}}else{if(ORBEON.util.Dom.hasClass(x,"xforms-select-appearance-full")||ORBEON.util.Dom.hasClass(x,"xforms-select1-appearance-full")||(ORBEON.util.Dom.hasClass(x,"xforms-input")&&ORBEON.util.Dom.hasClass(x,"xforms-type-boolean"))){var C=ORBEON.util.Dom.hasClass(x,"xforms-select-appearance-full")?J.split(" "):new Array(J);var I=x.getElementsByTagName("input");for(var j=0;j<I.length;j++){var n=I[j];n.checked=xformsArrayContains(C,n.value)}ORBEON.xforms.Controls._setRadioCheckboxClasses(x)}else{if(ORBEON.util.Dom.hasClass(x,"xforms-select-appearance-compact")||ORBEON.util.Dom.hasClass(x,"xforms-select1-appearance-compact")||ORBEON.util.Dom.hasClass(x,"xforms-select1-appearance-minimal")||ORBEON.util.Dom.hasClass(x,"xforms-input-appearance-compact")||ORBEON.util.Dom.hasClass(x,"xforms-input-appearance-minimal")){var C=ORBEON.util.Dom.hasClass(x,"xforms-select-appearance-compact")?J.split(" "):new Array(J);var N=ORBEON.util.Utils.getProperty(NEW_XHTML_LAYOUT_PROPERTY)?x.getElementsByTagName("select")[0]:x;var w=N.options;if(w!=null){for(var L=0;L<w.length;L++){var K=w[L];try{K.selected=xformsArrayContains(C,K.value)}catch(P){}}}}else{if(ORBEON.util.Dom.hasClass(x,"xforms-type-dateTime")){if(ORBEON.xforms.Controls.getCurrentValue(x)!=J){var S=J.indexOf("T");var u=J.substring(0,S);var Q=ORBEON.util.DateTime.magicDateToJSDate(u);var G=x.getElementsByTagName("input")[0];G.value=Q==null?u:ORBEON.util.DateTime.jsDateToformatDisplayDate(Q);var R=J.substring(S+1);var r=ORBEON.util.DateTime.magicTimeToJSDate(R);var E=x.getElementsByTagName("input")[1];E.value=r==null?R:ORBEON.util.DateTime.jsDateToformatDisplayTime(r)}}else{if((ORBEON.util.Dom.hasClass(x,"xforms-input")&&!ORBEON.util.Dom.hasClass(x,"xforms-type-boolean"))||ORBEON.util.Dom.hasClass(x,"xforms-secret")){var a=x.tagName.toLowerCase()=="input"?x:x.getElementsByTagName("input")[0];if(x.value!=J){x.previousValue=J;x.valueSetByXForms++;x.value=J}if(a.value!=J){a.value=J}if(s!=null){if(s==""){a.removeAttribute("size")}else{a.size=s}}if(q!=null){if(q==""){a.removeAttribute("maxlength")}else{a.maxLength=q}}if(p!=null){if(q==""){a.removeAttribute("autocomplete")}else{a.autocomplete=p}}}else{if(ORBEON.util.Dom.hasClass(x,"xforms-textarea")&&!ORBEON.util.Dom.hasClass(x,"xforms-mediatype-text-html")){var f=x.tagName.toLowerCase()=="textarea"?x:x.getElementsByTagName("textarea")[0];f.value=J;if(ORBEON.util.Dom.hasClass(x,"xforms-textarea-appearance-xxforms-autosize")){ORBEON.xforms.Controls.autosizeTextarea(x)}}else{if(ORBEON.util.Dom.hasClass(x,"xforms-textarea")&&ORBEON.util.Dom.hasClass(x,"xforms-mediatype-text-html")){if(ORBEON.util.Utils.getProperty(HTML_EDITOR_PROPERTY)=="yui"){ORBEON.widgets.RTE.setValue(x,J)}else{var l=FCKeditorAPI.GetInstance(x.name);l.EditorDocument.body.innerHTML=J;x.value=J;x.previousValue=J}}else{if(ORBEON.util.Dom.hasClass(x,"xforms-select-appearance-xxforms-tree")){var T=J.split(" ");var g=ORBEON.xforms.Globals.treeYui[x.id];for(var m in g._nodes){var F=g._nodes[m];if(F.children.length==0){var B=xformsArrayContains(T,F.data.value);if(B){F.check()}else{F.uncheck()}}}x.value=J;x.previousValue=J}else{if(ORBEON.util.Dom.hasClass(x,"xforms-select1-appearance-xxforms-tree")){var g=ORBEON.xforms.Globals.treeYui[x.id];ORBEON.xforms.Controls.treeOpenSelectedVisible(g,[J]);var c=g.getNodeByProperty("value",x.value);var k=g.getNodeByProperty("value",J);if(c!=null){YAHOO.util.Dom.removeClass(c.getLabelEl(),"xforms-tree-label-selected")}if(k!=null){YAHOO.util.Dom.addClass(k.getLabelEl(),"xforms-tree-label-selected")}x.value=J;x.previousValue=J}else{if(ORBEON.util.Dom.hasClass(x,"xforms-upload")){var M=YAHOO.util.Dom.getElementsByClassName("xforms-upload-info",null,x)[0];var A=YAHOO.util.Dom.getElementsByClassName("xforms-upload-filename",null,x)[0];var t=YAHOO.util.Dom.getElementsByClassName("xforms-upload-mediatype",null,x)[0];var O=YAHOO.util.Dom.getElementsByClassName("xforms-upload-size",null,x)[0];if(s=="empty"){ORBEON.util.Dom.removeClass(x,"xforms-upload-state-file");ORBEON.util.Dom.addClass(x,"xforms-upload-state-empty")}if(s=="file"){ORBEON.util.Dom.removeClass(x,"xforms-upload-state-empty");ORBEON.util.Dom.addClass(x,"xforms-upload-state-file");ORBEON.util.Dom.clearUploadControl(x)}if(q!=null){ORBEON.util.Dom.setStringValue(A,q)}if(p!=null){ORBEON.util.Dom.setStringValue(t,p)}if(o!=null){var v=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(O,v)}}else{if(typeof(x.value)=="string"){x.value=J;x.previousValue=J}}}}}}}}}}}}}}}}}},_setRadioCheckboxClasses:function(c){var b=c.getElementsByTagName("input");for(var d=0;d<b.length;d++){var a=b[d];var e=a.parentNode.parentNode;if(a.checked){ORBEON.util.Dom.addClass(e,"xforms-selected");ORBEON.util.Dom.removeClass(e,"xforms-deselected")}else{ORBEON.util.Dom.addClass(e,"xforms-deselected");ORBEON.util.Dom.removeClass(e,"xforms-selected")}}},_getControlLabel:function(d,b){var a={label:"$$l",hint:"$$t",help:"$$p","help-image":"$$i",alert:"$$a"};if(ORBEON.util.Utils.getProperty(NEW_XHTML_LAYOUT_PROPERTY)){var e=YAHOO.util.Dom.getElementsByClassName("xforms-"+b,null,d);if(e.length>0){return e[0]}}var c=ORBEON.util.Utils.appendToEffectiveId(d.id,a[b]);return YAHOO.util.Dom.get(c)},_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,"help-image");if(d==""){ORBEON.util.Dom.addClass(b,"xforms-disabled-subsequent");if(c=="xforms-help"){ORBEON.util.Dom.addClass(a,"xforms-disabled-subsequent")}}else{if(ORBEON.xforms.Controls.isRelevant(e)){ORBEON.util.Dom.removeClass(b,"xforms-disabled");ORBEON.util.Dom.removeClass(b,"xforms-disabled-subsequent");if(c=="xforms-help"){ORBEON.util.Dom.removeClass(a,"xforms-disabled");ORBEON.util.Dom.removeClass(a,"xforms-disabled-subsequent")}}}}},getLabelMessage:function(d){if(ORBEON.util.Dom.hasClass(d,"xforms-trigger")||ORBEON.util.Dom.hasClass(d,"xforms-submit")){if(d.tagName.toLowerCase()=="input"){return d.alt}else{return d.innerHTML}}else{if(ORBEON.util.Dom.hasClass(d,"xforms-dialog")){var c=ORBEON.util.Dom.getChildElementByIndex(d,0);return c.innerHTML}else{if(ORBEON.util.Dom.hasClass(d,"xforms-group-appearance-xxforms-fieldset")){var b=ORBEON.util.Dom.getChildElementByIndex(d,0);if(b!=null){return b.innerHTML}}else{var a=ORBEON.xforms.Controls._getControlLabel(d,"label");return a.innerHTML}}}},setLabelMessage:function(f,c){if(ORBEON.util.Dom.hasClass(f,"xforms-trigger")||ORBEON.util.Dom.hasClass(f,"xforms-submit")){var d=ORBEON.util.Utils.getProperty(NEW_XHTML_LAYOUT_PROPERTY)?YAHOO.util.Dom.getFirstChild(f):f;if(d.tagName.toLowerCase()=="input"){d.alt=c}else{d.innerHTML=c}}else{if(ORBEON.util.Dom.hasClass(f,"xforms-dialog")){var e=ORBEON.util.Dom.getChildElementByIndex(f,0);e.innerHTML=c}else{if(ORBEON.util.Dom.hasClass(f,"xforms-group-appearance-xxforms-fieldset")){var b=ORBEON.util.Dom.getChildElementByIndex(f,0);if(b!=null){b.innerHTML=c}}else{if(ORBEON.util.Dom.hasClass(f,"xforms-output-appearance-xxforms-download")){var a=YAHOO.util.Dom.getChildren(f)[0];a.innerHTML=c}else{ORBEON.xforms.Controls._setMessage(f,"label",c)}}}}},getHelpMessage:function(b){var a=ORBEON.xforms.Controls._getControlLabel(b,"help");return a==null?"":ORBEON.util.Dom.getStringValue(a)},setHelpMessage:function(c,b){b=ORBEON.util.String.escapeHTMLMinimal(b);ORBEON.xforms.Controls._setMessage(c,"help",b);ORBEON.xforms.Controls._setTooltipMessage(c,b,ORBEON.xforms.Globals.helpTooltipForControl);var a=ORBEON.xforms.Controls._getControlLabel(c,"help-image");ORBEON.util.Dom.removeClass(a,"xforms-disabled")},setValid:function(e,c){var d;var a=ORBEON.util.Dom.hasClass(e,"xforms-visited");if(c!=null){d=c!="false";if(d){ORBEON.util.Dom.removeClass(e,"xforms-invalid");ORBEON.util.Dom.removeClass(e,"xforms-invalid-visited")}else{ORBEON.util.Dom.addClass(e,"xforms-invalid");if(a){ORBEON.util.Dom.addClass(e,"xforms-invalid-visited")}}}else{d=ORBEON.xforms.Controls.isValid(e)}var b=ORBEON.xforms.Controls._getControlLabel(e,"alert");if(b!=null){if(d){ORBEON.util.Dom.removeClass(b,"xforms-alert-active");ORBEON.util.Dom.removeClass(b,"xforms-alert-active-visited");ORBEON.util.Dom.addClass(b,"xforms-alert-inactive")}else{ORBEON.util.Dom.removeClass(b,"xforms-alert-inactive");ORBEON.util.Dom.addClass(b,"xforms-alert-active");if(a){ORBEON.util.Dom.addClass(b,"xforms-alert-active-visited")}}}},setRelevant:function(f,c){if(ORBEON.util.Dom.hasClass(f,"xforms-group-begin-end")){var j=false;if(c){var e=0;var h=f;while(true){h=YAHOO.util.Dom.getPreviousSibling(h);if(h==null){break}if(YAHOO.util.Dom.hasClass(h,"xforms-group-begin-end")){if(h.id.indexOf("group-end")==0){e++}if(h.id.indexOf("group-begin")==0){e--;if(e<0&&YAHOO.util.Dom.hasClass(h,"xforms-disabled")){j=true;break}}}}}if(c){ORBEON.util.Dom.removeClass(f,"xforms-disabled")}else{ORBEON.util.Dom.addClass(f,"xforms-disabled")}if(!(c&&j)){var e=0;var g=0;var h=f;while(true){h=YAHOO.util.Dom.getNextSibling(h);if(h==null){break}if(YAHOO.util.Dom.hasClass(h,"xforms-group-begin-end")){if(h.id.indexOf("group-begin")==0){e++;if(YAHOO.util.Dom.hasClass(h,"xforms-disabled")||g>0){g++}}else{if(h.id.indexOf("group-end")==0){e--;if(e==0){break}if(g>0){g--}}}}else{if(c&&g==0){ORBEON.util.Dom.removeClass(h,"xforms-disabled");ORBEON.util.Dom.removeClass(h,"xforms-disabled-subsequent");ORBEON.util.Dom.nudgeAferDelay(h)}if(!c){ORBEON.util.Dom.addClass(h,"xforms-disabled-subsequent")}}}}}else{var a=[f,ORBEON.xforms.Controls._getControlLabel(f,"label"),ORBEON.xforms.Controls._getControlLabel(f,"alert")];if(!c||(c&&ORBEON.xforms.Controls.getHelpMessage(f)!="")){a.push(ORBEON.xforms.Controls._getControlLabel(f,"help"));a.push(ORBEON.xforms.Controls._getControlLabel(f,"help-image"))}if(!c||(c&&ORBEON.xforms.Controls.getHintMessage(f)!="")){a.push(ORBEON.xforms.Controls._getControlLabel(f,"hint"))}for(var b=0;b<a.length;b++){var d=a[b];if(d!=null){if(c){ORBEON.util.Dom.removeClass(d,"xforms-disabled");ORBEON.util.Dom.removeClass(d,"xforms-disabled-subsequent");ORBEON.util.Dom.nudgeAferDelay(d)}else{ORBEON.util.Dom.addClass(d,"xforms-disabled-subsequent")}}}}},setRepeatIterationRelevance:function(b,c,a){var d=ORBEON.util.Utils.findRepeatDelimiter(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");ORBEON.util.Dom.removeClass(d,"xforms-disabled-subsequent")}else{ORBEON.util.Dom.addClass(d,"xforms-disabled-subsequent")}}d=d.nextSibling}},setReadonly:function(g,a){function d(j,h){if(h){j.setAttribute("disabled","disabled");ORBEON.util.Dom.addClass(j,"xforms-readonly")}else{j.removeAttribute("disabled");ORBEON.util.Dom.removeClass(j,"xforms-readonly")}}if(ORBEON.util.Dom.hasClass(g,"xforms-group-begin-end")){if(a){ORBEON.util.Dom.addClass(g,"xforms-readonly")}else{ORBEON.util.Dom.removeClass(g,"xforms-readonly")}}else{if((ORBEON.util.Dom.hasClass(g,"xforms-input")&&!ORBEON.util.Dom.hasClass(g,"xforms-type-boolean"))||ORBEON.util.Dom.hasClass(g,"xforms-select1-appearance-full")||ORBEON.util.Dom.hasClass(g,"xforms-select-appearance-full")){if(a){ORBEON.util.Dom.addClass(g,"xforms-readonly")}else{ORBEON.util.Dom.removeClass(g,"xforms-readonly")}var b=g.getElementsByTagName("input");for(var e=0;e<b.length;e++){var c=b[e];d(c,a)}}else{if(ORBEON.util.Dom.hasClass(g,"xforms-output")||ORBEON.util.Dom.hasClass(g,"xforms-group")){if(a){ORBEON.util.Dom.addClass(g,"xforms-readonly")}else{ORBEON.util.Dom.removeClass(g,"xforms-readonly")}}else{if(ORBEON.util.Dom.hasClass(g,"xforms-select1-appearance-xxforms-autocomplete")){var c=ORBEON.util.Dom.getChildElementByIndex(g,0);d(c,a)}else{if(ORBEON.util.Dom.hasClass(g,"xforms-textarea")&&ORBEON.util.Dom.hasClass(g,"xforms-mediatype-text-html")){var f=FCKeditorAPI.GetInstance(g.name);if(a){f.ToolbarSet.Collapse()}else{f.ToolbarSet.Expand()}}else{if(ORBEON.util.Dom.hasClass(g,"xforms-upload")){d(ORBEON.util.Dom.getChildElementByClass(g,"xforms-upload-select"),a)}else{d(g,a)}}}}}}},getAlertMessage:function(b){var a=ORBEON.xforms.Controls._getControlLabel(b,"alert");return a.innerHTML},setAlertMessage:function(b,a){ORBEON.xforms.Controls._setMessage(b,"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,"hint");return a==null?"":a.innerHTML}},setHintMessage:function(b,a){if(ORBEON.util.Dom.hasClass(b,"xforms-trigger")){if(ORBEON.xforms.Globals.hintTooltipForControl[b.id]==null){b.title=a}}else{ORBEON.xforms.Controls._setMessage(b,"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(ORBEON.util.Dom.hasClass(f,"xforms-textarea")&&ORBEON.util.Dom.hasClass(f,"xforms-mediatype-text-html")){if(ORBEON.util.Utils.getProperty(HTML_EDITOR_PROPERTY)=="yui"){ORBEON.widgets.RTE.setFocus(f)}else{}}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;if(a.rows==-1){a.rows=2}if(ORBEON.xforms.Globals.isFF3){a.style.height=0;d=a.scrollHeight;a.style.height=null}var e=b/a.rows;var c=0;if(d>b){while(d>=b){a.rows=a.rows+1;if(a.clientHeight<=b){break}b=a.clientHeight;c++}}else{if(d<b){while(a.rows>XFORMS_WIDE_TEXTAREA_MIN_ROWS&&d<b-e){a.rows=a.rows-1;if(a.clientHeight>=b){break}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(k){var d=ORBEON.xforms.Controls.getForm(k);if(ORBEON.xforms.Globals.formHelpPanel[d.id]==null){for(var q=0;q<d.childNodes.length;q++){var a=d.childNodes[q];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 t=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}});t.render();t.element.style.display="none";ORBEON.xforms.Globals.formHelpPanel[d.id]=t;var j=ORBEON.util.Dom.getChildElementByClass(a,"bd");ORBEON.xforms.Globals.formHelpPanelMessageDiv[d.id]=YAHOO.util.Dom.getElementsByClassName("xforms-help-panel-message",null,j)[0];var s=YAHOO.util.Dom.getElementsByClassName("xforms-help-panel-close",null,j)[0];var c=ORBEON.util.Dom.getChildElementByIndex(s,0);ORBEON.xforms.Globals.formHelpPanelCloseButton[d.id]=c;YAHOO.util.Event.addListener(c,"click",ORBEON.xforms.Events.helpDialogButtonClose,d.id);t.beforeHideEvent.subscribe(ORBEON.xforms.Events.helpDialogXClose,d.id);break}}}ORBEON.xforms.Globals.formHelpPanelMessageDiv[d.id].innerHTML=ORBEON.xforms.Controls.getHelpMessage(k);var e=YAHOO.util.Dom.getRegion(ORBEON.xforms.Globals.formHelpPanel[d.id].element);var f;if(e.top==null){f=true}else{var r=YAHOO.util.Dom.getViewportWidth();var l=YAHOO.util.Dom.getViewportHeight();var p=document.body.scrollLeft;var o=document.body.scrollTop;var m=e.top>=o&&e.bottom<=o+l;var h=e.left>=p&&e.right<=p+r;f=!m||!h}if(f){var n=ORBEON.util.Utils.getProperty(NEW_XHTML_LAYOUT_PROPERTY)?k:k.parentNode;var b=ORBEON.util.Dom.getChildElementByClass(n,"xforms-help-image");ORBEON.xforms.Globals.formHelpPanel[d.id].element.style.display="block";ORBEON.xforms.Globals.formHelpPanel[d.id].cfg.setProperty("context",[b,"bl","tl"]);ORBEON.xforms.Globals.formHelpPanel[d.id].show();ORBEON.xforms.Globals.formHelpPanel[d.id].cfg.setProperty("zIndex",ORBEON.xforms.Globals.lastDialogZIndex++)}var g=ORBEON.xforms.Globals.formHelpPanelMessageDiv[d.id].parentNode;if(g.scrollHeight<=g.clientHeight){ORBEON.xforms.Globals.formHelpPanelCloseButton[d.id].focus()}},showDialog:function(c,d){var a=ORBEON.util.Dom.getElementById(c);var b=ORBEON.xforms.Globals.dialogs[c];if(YAHOO.util.Dom.hasClass(a,"xforms-initially-hidden")){ORBEON.util.Dom.removeClass(a,"xforms-initially-hidden");b.render()}ORBEON.util.Dom.addClass(b.innerElement,"yui-module");ORBEON.util.Dom.addClass(b.innerElement,"yui-overlay");ORBEON.util.Dom.addClass(b.innerElement,"yui-panel");b.element.style.display="block";b.show();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()}}},getWidget:function(b){for(var c in ORBEON.widgets){var a=ORBEON.widgets[c];if(a.extending!=null&&a.appliesToControl(b)){return a}}},deleteControl:function(a){ORBEON.xforms.Globals.serverValue[a.id]=null;ORBEON.xforms.Globals.hintTooltipForControl[a.id]=null;ORBEON.xforms.Globals.alertTooltipForControl[a.id]=null;ORBEON.xforms.Globals.helpTooltipForControl[a.id]=null;ORBEON.xforms.Globals.dialogs[a.id]=null;ORBEON.xforms.Globals.dialogMinimalVisible[a.id]=null;ORBEON.xforms.Globals.dialogMinimalLastMouseOut[a.id]=null}};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(c.id&&ORBEON.util.String.endsWith(c.id,"_container")&&ORBEON.util.Dom.hasClass(c,"xforms-textarea")&&ORBEON.util.Dom.hasClass(c,"xforms-mediatype-text-html")&&ORBEON.util.Utils.getProperty(HTML_EDITOR_PROPERTY)=="yui"){return ORBEON.util.Dom.getChildElementByClass(c,"xforms-textarea")}else{if(ORBEON.util.Dom.hasClass(c,"xforms-control")){return c.id==""?null:c}else{if(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}},focus:function(g){if(!ORBEON.xforms.Globals.maskFocusEvents){var a=ORBEON.xforms.Events._findParentXFormsControl(YAHOO.util.Event.getTarget(g));var e=ORBEON.xforms.Globals.currentFocusControlId!=null?ORBEON.util.Dom.getElementByIdNoCache(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")){var d=ORBEON.xforms.Controls.getCurrentValue(a);ORBEON.xforms.Globals.serverValue[a.id]=d}}var c=new Array();if(a!=null&&e!=a&&!ORBEON.util.Dom.hasClass(a,"xforms-dialog")){ORBEON.widgets.RTE.focusOnAnyFormControl(a);var f=false;if(e!=null){if(ORBEON.util.Dom.hasClass(e,"xforms-textarea")&&ORBEON.util.Dom.hasClass(e,"xforms-mediatype-text-html")&&ORBEON.util.Utils.getProperty(HTML_EDITOR_PROPERTY)=="fck"){var b=FCKeditorAPI.GetInstance(e.name);e.value=b.GetXHTML();f=true}else{if(ORBEON.util.Dom.hasClass(e,"xforms-select1-appearance-xxforms-tree")||ORBEON.util.Dom.hasClass(e,"xforms-select-appearance-xxforms-tree")){f=true}}if(f){xformsValueChanged(e,null)}c.push(new ORBEON.xforms.Server.Event(null,e.id,null,null,"DOMFocusOut"))}c.push(new ORBEON.xforms.Server.Event(null,a.id,null,null,"DOMFocusIn"));ORBEON.xforms.Globals.currentFocusControlId=a.id;ORBEON.xforms.Server.fireEvents(c,true)}}else{ORBEON.xforms.Globals.maskFocusEvents=false}},blur:function(c){if(!ORBEON.xforms.Globals.maskFocusEvents){var b=ORBEON.xforms.Events._findParentXFormsControl(YAHOO.util.Event.getTarget(c));if(b!=null){if(!ORBEON.util.Dom.hasClass(b,"xforms-visited")){ORBEON.util.Dom.addClass(b,"xforms-visited");function a(){if(ORBEON.util.Dom.hasClass(b,"xforms-invalid")){ORBEON.util.Dom.addClass(b,"xforms-invalid-visited")}var d=ORBEON.xforms.Controls._getControlLabel(b,"alert");if(d!=null&&ORBEON.util.Dom.hasClass(d,"xforms-alert-active")){ORBEON.util.Dom.addClass(d,"xforms-alert-active-visited")}ORBEON.xforms.Events.ajaxResponseProcessedEvent.unsubscribe(a)}ORBEON.xforms.Events.ajaxResponseProcessedEvent.subscribe(a)}if(!ORBEON.util.Dom.hasClass(b,"xforms-dialog")){ORBEON.xforms.Globals.currentFocusControlId=b.id}if(ORBEON.widgets.YUICalendar.appliesToControl(b)){ORBEON.widgets.YUICalendar.blur(c,b)}}}},change:function(f){var g=ORBEON.xforms.Events._findParentXFormsControl(YAHOO.util.Event.getTarget(f));if(g!=null){if(ORBEON.util.Dom.hasClass(g,"xforms-upload")){var f=new ORBEON.xforms.Server.Event(null,g.id,null,null,"xforms-select");ORBEON.xforms.Server.fireEvents([f],false)}else{if(ORBEON.xforms.Globals.changedIdsRequest[g.id]!=null){ORBEON.xforms.Globals.changedIdsRequest[g.id]=0}if(ORBEON.util.Dom.hasClass(g,"xforms-select1-appearance-compact")){var a=ORBEON.util.Utils.getProperty(NEW_XHTML_LAYOUT_PROPERTY)?YAHOO.util.Dom.getElementsByClassName("","select",g)[0]:g;if(a.value==""){a.options[0].selected=true}else{var h=false;for(var e=0;e<a.options.length;e++){var d=a.options[e];if(d.selected){if(h){d.selected=false}else{h=true}}}}}else{if(ORBEON.util.Dom.hasClass(g,"xforms-type-time")||(ORBEON.util.Dom.hasClass(g,"xforms-type-date")&&!ORBEON.util.Dom.hasClass(g,"xforms-input-appearance-minimal"))||ORBEON.util.Dom.hasClass(g,"xforms-type-dateTime")){function c(k,j,m){var l=j(k.value);if(l!=null){k.value=m(l)}}c(ORBEON.util.Dom.getChildElementByIndex(g,0),ORBEON.util.Dom.hasClass(g,"xforms-type-time")?ORBEON.util.DateTime.magicTimeToJSDate:ORBEON.util.DateTime.magicDateToJSDate,ORBEON.util.Dom.hasClass(g,"xforms-type-time")?ORBEON.util.DateTime.jsDateToformatDisplayTime:ORBEON.util.DateTime.jsDateToformatDisplayDate);if(ORBEON.util.Dom.hasClass(g,"xforms-type-dateTime")){c(ORBEON.util.Dom.getChildElementByIndex(g,1),ORBEON.util.DateTime.magicTimeToJSDate,ORBEON.util.DateTime.jsDateToformatDisplayTime)}}}var b=ORBEON.xforms.Controls.getCurrentValue(g);var f=new ORBEON.xforms.Server.Event(null,g.id,null,b,"xxforms-value-change-with-focus-change");ORBEON.xforms.Server.fireEvents([f],false)}}},_isChangingKey:function(b,a){return;!YAHOO.lang.isUndefined(a)&&a!=9&&a!=16&&a!=17&&a!=18&&(ORBEON.util.Dom.hasClass(b,"xforms-input")||ORBEON.util.Dom.hasClass(b,"xforms-secret")||ORBEON.util.Dom.hasClass(b,"xforms-textarea"))},keydown:function(a){var b=ORBEON.xforms.Events._findParentXFormsControl(YAHOO.util.Event.getTarget(a));if(b!=null){if(ORBEON.xforms.Events._isChangingKey(b,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=[new ORBEON.xforms.Server.Event(null,c.id,null,ORBEON.xforms.Controls.getCurrentValue(c),"xxforms-value-change-with-focus-change"),new ORBEON.xforms.Server.Event(null,c.id,null,null,"DOMActivate")];ORBEON.xforms.Server.fireEvents(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._isChangingKey(b,a.keyCode)){ORBEON.xforms.Globals.changedIdsRequest[b.id]--}if(ORBEON.util.Dom.hasClass(b,"xforms-incremental")){var a=new ORBEON.xforms.Server.Event(null,b.id,null,ORBEON.xforms.Controls.getCurrentValue(b),"xxforms-value-change-with-focus-change");ORBEON.xforms.Server.fireEvents([a],false)}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 j=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);j.onContextMouseMove.call(b,a,j);j.onContextMouseOver.call(b,a,j);c[g]=j}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(e){if(!YAHOO.util.Dom.hasClass(e,"xforms-control")){e=YAHOO.util.Dom.getAncestorByClassName(e,"xforms-control")}if(e&&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(e){if(YAHOO.util.Dom.hasClass(e,"xforms-input-input")){e=YAHOO.util.Dom.getAncestorByClassName(e,"xforms-control")}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")){}}},click:function(m){ORBEON.xforms.Events.clickEvent.fire(m);var b=YAHOO.util.Event.getTarget(m);if(YAHOO.lang.isObject(b)&&YAHOO.lang.isBoolean(b.disabled)&&b.disabled){return}var r=ORBEON.xforms.Events._findParentXFormsControl(b);if(r!=null&&ORBEON.util.Dom.hasClass(r,"xforms-output")){ORBEON.xforms.Events.focus(m)}else{if(r!=null&&(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);var m=new ORBEON.xforms.Server.Event(null,r.id,null,null,"DOMActivate");ORBEON.xforms.Server.fireEvents([m],false)}if(ORBEON.util.Dom.hasClass(r,"xforms-trigger-appearance-modal")){r.blur();ORBEON.util.Utils.displayModalProgressPanel()}}else{if(r!=null&&(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")&&ORBEON.util.Dom.hasClass(r,"xforms-type-boolean")))){ORBEON.xforms.Controls._setRadioCheckboxClasses(r);var m=new ORBEON.xforms.Server.Event(null,r.id,null,ORBEON.xforms.Controls.getCurrentValue(r),"xxforms-value-change-with-focus-change");ORBEON.xforms.Server.fireEvents([m],false)}else{if(r!=null&&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(r!=null&&ORBEON.util.Dom.hasClass(r,"xforms-upload")&&ORBEON.util.Dom.hasClass(b,"xforms-upload-remove")){var m=new ORBEON.xforms.Server.Event(null,r.id,null,"","xxforms-value-change-with-focus-change");ORBEON.xforms.Server.fireEvents([m],false)}else{if(r!=null&&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];var m=new ORBEON.xforms.Server.Event(null,r.id,null,f,"xxforms-value-change-with-focus-change");ORBEON.xforms.Server.fireEvents([m],false);ORBEON.xforms.Globals.menuYui[r.id].clearActiveItem()}else{if(r!=null&&ORBEON.util.Dom.hasClass(r,"xforms-help-image")){var j=r.id.indexOf("$$i")!=-1?YAHOO.util.Dom.get(r.id.substring(0,r.id.length-"$$i".length)):r.parentNode;if(ORBEON.util.Utils.getProperty(HELP_HANDLER_PROPERTY)){var m=new ORBEON.xforms.Server.Event(null,j.id,null,null,"xforms-help");ORBEON.xforms.Server.fireEvents([m],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}}}}}}}}},_resize:function(){var b=[ORBEON.xforms.Globals.hintTooltipForControl,ORBEON.xforms.Globals.helpTooltipForControl,ORBEON.xforms.Globals.alertTooltipForControl];for(var a=0;a<3;a++){var e=b[a];for(var d in e){var c=e[d];if(c&&c!=true){e[d]=null;c.destroy()}}}},scrollOrResize:function(){for(var b in ORBEON.xforms.Globals.formLoadingLoadingOverlay){var a=ORBEON.xforms.Globals.formLoadingLoadingOverlay[b];if(a){ORBEON.xforms.Controls.updateLoadingPosition(b)}}ORBEON.xforms.Events._resize()},sliderValueChange:function(c){var d=ORBEON.util.Dom.getElementById(this.id);if(ORBEON.util.Utils.getProperty(NEW_XHTML_LAYOUT_PROPERTY)){d=d.parentNode}var b=c/200;var a=new ORBEON.xforms.Server.Event(null,d.id,null,String(b),"xxforms-value-change-with-focus-change");ORBEON.xforms.Server.fireEvents([a],false)},menuClick:function(a,e,b){var f=b.menu;var d=b.value;var c=new ORBEON.xforms.Server.Event(null,f.id,null,d,"xxforms-value-change-with-focus-change");ORBEON.xforms.Server.fireEvents([c],false)},dialogClose:function(d,b,f){var a=f;var c=ORBEON.util.Dom.getElementById(a);var e=new ORBEON.xforms.Server.Event(null,c.id,null,null,"xxforms-dialog-close");ORBEON.xforms.Server.fireEvents([e],false)},dialogShow:function(d,b,e){if(ORBEON.xforms.Globals.isRenderingEngineTrident){var a=e;var c=ORBEON.util.Dom.getElementById(a);c.className=c.className}},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-subsequent");ORBEON.util.Dom.removeClass(c,"xforms-disabled");ORBEON.util.Dom.removeClass(c,"xforms-disabled-subsequent")}else{ORBEON.util.Dom.removeClass(a,"xforms-disabled");ORBEON.util.Dom.removeClass(a,"xforms-disabled-subsequent");ORBEON.util.Dom.addClass(c,"xforms-disabled-subsequent")}},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.removeClass(a,"xforms-disabled-subsequent");ORBEON.util.Dom.addClass(f,"xforms-disabled-subsequent")},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){var a=new ORBEON.xforms.Server.Event(null,b.element.id,null,null,"xxforms-dialog-close");ORBEON.xforms.Server.fireEvents([a],false)}}},dialogMinimalCheckMouseIn:function(b){var c=new Date().getTime();if(ORBEON.xforms.Globals.dialogMinimalVisible[b.element.id]&&ORBEON.xforms.Globals.dialogMinimalLastMouseOut[b.element.id]!=-1&&c-ORBEON.xforms.Globals.dialogMinimalLastMouseOut[b.element.id]>=ORBEON.util.Utils.getProperty(DELAY_BEFORE_CLOSE_MINIMAL_DIALOG_PROPERTY)){var a=new ORBEON.xforms.Server.Event(null,b.element.id,null,null,"xxforms-dialog-close");ORBEON.xforms.Server.fireEvents([a],false)}},sendHeartBeatIfNeeded:function(g){var f=new Date().getTime();if((f-ORBEON.xforms.Globals.lastEventSentTime)>=g){var b=ORBEON.util.Dom.getElementById("xforms-heartbeat");if(b==null){var e;for(var a=0;a<document.forms.length;a++){var d=document.forms[a];if(ORBEON.util.Dom.hasClass(d,"xforms-form")){e=d;break}}var b=document.createElement("div");b.className="xforms-heartbeat";b.id="xforms-heartbeat";e.appendChild(b)}var c=new ORBEON.xforms.Server.Event(null,b.id,null,null,"xxforms-session-heartbeat");ORBEON.xforms.Server.fireEvents([c],false)}},orbeonLoadedEvent:new YAHOO.util.CustomEvent("orbeonLoaded"),ajaxResponseProcessedEvent:new YAHOO.util.CustomEvent("ajaxResponseProcessed"),clickEvent:new YAHOO.util.CustomEvent("clickEvent"),errorEvent:new YAHOO.util.CustomEvent("errorEvent"),yuiCalendarCreated:new YAHOO.util.CustomEvent("yuiCalendarCreated")};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 a(g){if(ORBEON.util.Dom.hasClass(g.activeDiv,"day")){var d;if(!YAHOO.lang.isNull(g.params.inputField)){var b=g.params.inputField;var c=ORBEON.util.DateTime.magicDateToJSDate(b.value);b.value=ORBEON.util.DateTime.jsDateToformatDisplayDate(c);d=b.parentNode}else{var e=g.params.imageField;e.alt=ORBEON.util.DateTime.jsDateToformatDisplayDate(g.date);d=e.parentNode}var f=new ORBEON.xforms.Server.Event(null,d.id,null,ORBEON.xforms.Controls.getCurrentValue(d),"xxforms-value-change-with-focus-change");ORBEON.xforms.Server.fireEvents([f],false)}}return{extending:ORBEON.widgets.Base,appliesToControl:function(b){return(ORBEON.util.Dom.hasClass(b,"xforms-type-date")||ORBEON.util.Dom.hasClass(b,"xforms-type-dateTime"))&&ORBEON.util.Utils.getProperty(DATE_PICKER_PROPERTY)=="jscalendar"},click:function(d,e){var g=ORBEON.util.Dom.getChildElementByIndex(e,0);var b={imageField:g,ifFormat:"%m/%d/%Y",showsTime:false,button:e.id,singleClick:true,step:1,onUpdate:a,electric:false};if(ORBEON.util.Dom.hasClass(g,"xforms-input-appearance-minimal")){b.imageField=g;var f=ORBEON.util.Dom.getAttribute(g,"alt");b.date=f}else{b.inputField=g}Calendar.setup(b);var c=e.onclick;e.onclick=null;c()},blur:function(b,c){},keydown:function(b,c){calendar.hide()}}}();ORBEON.widgets.YUICalendar=function(){var g={en:{properties:{MONTHS_LONG:["January","February","March","April","May","June","July","August","September","October","November","December"],WEEKDAYS_SHORT:["Su","Mo","Tu","We","Th","Fr","Sa"],START_WEEKDAY:0},navigator:{month:"Month",year:"Year",submit:"OK",cancel:"Cancel",invalidYear:"Year needs to be a number"}},fr:{properties:{MONTHS_LONG:["Janvier","F\xe9vrier","Mars","Avril","Mai","Juin","Juillet","Ao\xfbt","Septembre","Octobre","Novembre","D\xe9cembre"],WEEKDAYS_SHORT:["Di","Lu","Ma","Me","Je","Ve","Sa"],START_WEEKDAY:1},navigator:{month:"Moi",year:"Ann\xe9e",submit:"OK",cancel:"Annuler",invalidYear:"L'ann\xe9e est invalide"}},es:{properties:{MONTHS_LONG:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],WEEKDAYS_SHORT:["Do","Lu","Ma","Mi","Ju","Vi","S\xe1"],START_WEEKDAY:1},navigator:{month:"Mes",year:"A\xf1o",submit:"OK",cancel:"Aancelar",invalidYear:"A\xf1o debe ser un n\xfamero"}}};var a=null;var m=null;var e=null;var b=null;var d=false;function l(){d=true}function f(){d=false}function k(){YAHOO.util.Event.addListener(m,"mouseover",l);YAHOO.util.Event.addListener(m,"mouseout",f)}function h(){var n=a.getSelectedDates()[0];b.value=ORBEON.util.DateTime.jsDateToformatDisplayDate(n);if(ORBEON.util.Dom.hasClass(e,"xforms-input-appearance-minimal")){b.alt=b.value}var o=new ORBEON.xforms.Server.Event(null,e.id,null,ORBEON.xforms.Controls.getCurrentValue(e),"xxforms-value-change-with-focus-change");ORBEON.xforms.Server.fireEvents([o],false);j()}function j(){e=null;b=null;d=false;YAHOO.util.Dom.setStyle(m,"display","none");ORBEON.xforms.Events.clickEvent.unsubscribe(c)}function c(p,r){var q=r[0];var o=YAHOO.util.Event.getTarget(q);var n=YAHOO.util.Dom.getAncestorByClassName(o,"yui-calcontainer");if(YAHOO.lang.isNull(n)){j()}}return{extending:ORBEON.widgets.Base,appliesToControl:function(n){return(ORBEON.util.Dom.hasClass(n,"xforms-type-date")||ORBEON.util.Dom.hasClass(n,"xforms-type-dateTime"))&&ORBEON.util.Utils.getProperty(DATE_PICKER_PROPERTY)=="yui"},click:function(o,w){if(m==null){m=ORBEON.util.Dom.getElementById("orbeon-calendar-div")}if(m==null){m=document.createElement("div");m.id="orbeon-calendar-div";document.body.appendChild(m)}YAHOO.util.Dom.setStyle(m,"z-index",ORBEON.xforms.Globals.lastDialogZIndex++);if(a==null){var t=ORBEON.util.Utils.getProperty(DATE_PICKER_TWO_MONTHS_PROPERTY);a=t?new YAHOO.widget.CalendarGroup(m.id):new YAHOO.widget.Calendar(m.id);a.renderEvent.subscribe(k,a,true);a.selectEvent.subscribe(h,a,true);window.yuiCalendar=a;a.renderEvent.subscribe(function(){var B=YAHOO.util.Dom.getElementsByClassName("calnavleft",null,m)[0];var D=document.createElement("a");D.innerHTML="Previous Year";D.href="#";YAHOO.util.Dom.addClass(D,"calyearleft");YAHOO.util.Dom.insertBefore(D,B);YAHOO.util.Event.addListener(D,"click",function(F){YAHOO.util.Event.preventDefault(F);setTimeout(function(){a.previousYear();var G=YAHOO.util.Dom.getElementsByClassName("calyearleft","a",m);if(G&&G[0]){G[0].focus()}},0)});var E=YAHOO.util.Dom.getElementsByClassName("calnavright",null,m)[0];var C=document.createElement("a");C.innerHTML="Next Year";C.href="#";YAHOO.util.Dom.addClass(C,"calyearright");YAHOO.util.Dom.insertBefore(C,E);YAHOO.util.Event.addListener(C,"click",function(F){YAHOO.util.Event.preventDefault(F);setTimeout(function(){a.nextYear();var G=YAHOO.util.Dom.getElementsByClassName("calyearright","a",m);if(G&&G[0]){G[0].focus()}},0)})})}var p=ORBEON.util.Dom.getAttribute(document.documentElement,"lang");if(p==null||p==""){p="en"}p=p.substring(0,2);var r=g[p];for(var z in r.properties){a.cfg.setProperty(z,r.properties[z])}var x=ORBEON.util.Utils.getProperty(DATE_PICKER_NAVIGATOR_PROPERTY);if(x){a.cfg.setProperty("navigator",{strings:r.navigator,monthFormat:YAHOO.widget.Calendar.SHORT,initialFocus:"year"})}ORBEON.xforms.Events.clickEvent.subscribe(c);e=w;var s=ORBEON.util.DateTime.magicDateToJSDate(ORBEON.xforms.Controls.getCurrentValue(e));if(s==null){a.cfg.setProperty("selected","",false);a.cfg.setProperty("pagedate",new Date(),false)}else{var n=(s.getMonth()+1)+"/"+s.getDate()+"/"+s.getFullYear();a.cfg.setProperty("selected",n,false);a.cfg.setProperty("pagedate",s,false)}var u=e.parentNode.parentNode;var y=ORBEON.util.Dom.hasClass(u,"xbl-fr-date");var q=y?YAHOO.util.Dom.getElementsByClassName("xbl-fr-date-mindate",null,u)[0]:null;a.cfg.setProperty("mindate",q==null?null:ORBEON.util.DateTime.magicDateToJSDate(ORBEON.xforms.Controls.getCurrentValue(q)));var v=y?YAHOO.util.Dom.getElementsByClassName("xbl-fr-date-maxdate",null,u)[0]:null;a.cfg.setProperty("maxdate",v==null?null:ORBEON.util.DateTime.magicDateToJSDate(ORBEON.xforms.Controls.getCurrentValue(v)));ORBEON.xforms.Events.yuiCalendarCreated.fire({yuiCalendar:a,control:e});a.cfg.applyConfig();a.render();YAHOO.util.Dom.setStyle(m,"display","block");b=YAHOO.util.Dom.getElementsByClassName("xforms-input-input",null,e)[0];var A=YAHOO.util.Dom.getXY(b);A[1]=A[1]+20;YAHOO.util.Dom.setXY(m,A)},blur:function(n,o){if(!d){j()}},keydown:function(n,o){j()}}}();ORBEON.widgets.RTE=function(){rteEditors={};isIncremental={};editorWithFocus=null;renderedCustomEvents={};function b(e){var d=new ORBEON.xforms.Server.Event(null,e,null,ORBEON.widgets.RTE.getValue(ORBEON.util.Dom.getElementById(e)),"xxforms-value-change-with-focus-change");ORBEON.xforms.Server.fireEvents([d],true)}function a(e){var d=ORBEON.xforms.Globals.currentFocusControlId;if(d!=e){if(rteEditors[d]!=null){ORBEON.xforms.Events.blur({target:ORBEON.util.Dom.getElementById(d)})}ORBEON.xforms.Events.focus({target:ORBEON.util.Dom.getElementById(e)})}ORBEON.xforms.Events.keydown({target:ORBEON.util.Dom.getElementById(d)});ORBEON.xforms.Events.keyup({target:ORBEON.util.Dom.getElementById(d)})}var c={extending:ORBEON.widgets.Base,init:function(g){var h;if(typeof YUI_RTE_CUSTOM_CONFIG!="undefined"){h=YUI_RTE_CUSTOM_CONFIG}else{h={toolbar:{collapse:true,titlebar:false,draggable:false,buttonType:"advanced",buttons:[{group:"fontstyle",label:"Font Name and Size",buttons:[{type:"select",label:"Arial",value:"fontname",disabled:true,menu:[{text:"Arial",checked:true},{text:"Arial Black"},{text:"Comic Sans MS"},{text:"Courier New"},{text:"Lucida Console"},{text:"Tahoma"},{text:"Times New Roman"},{text:"Trebuchet MS"},{text:"Verdana"}]},{type:"spin",label:"13",value:"fontsize",range:[9,75],disabled:true}]},{type:"separator"},{group:"textstyle",label:"Font Style",buttons:[{type:"push",label:"Bold CTRL + SHIFT + B",value:"bold"},{type:"push",label:"Italic CTRL + SHIFT + I",value:"italic"},{type:"push",label:"Underline CTRL + SHIFT + U",value:"underline"},{type:"separator"},{type:"push",label:"Subscript",value:"subscript",disabled:true},{type:"push",label:"Superscript",value:"superscript",disabled:true}]},{type:"separator"},{group:"textstyle2",label:"&nbsp;",buttons:[{type:"color",label:"Font Color",value:"forecolor",disabled:true},{type:"color",label:"Background Color",value:"backcolor",disabled:true},{type:"separator"},{type:"push",label:"Remove Formatting",value:"removeformat",disabled:true},{type:"push",label:"Show/Hide Hidden Elements",value:"hiddenelements"}]},{type:"separator"},{group:"undoredo",label:"Undo/Redo",buttons:[{type:"push",label:"Undo",value:"undo",disabled:true},{type:"push",label:"Redo",value:"redo",disabled:true}]},{type:"separator"},{group:"alignment",label:"Alignment",buttons:[{type:"push",label:"Align Left CTRL + SHIFT + [",value:"justifyleft"},{type:"push",label:"Align Center CTRL + SHIFT + |",value:"justifycenter"},{type:"push",label:"Align Right CTRL + SHIFT + ]",value:"justifyright"},{type:"push",label:"Justify",value:"justifyfull"}]},{type:"separator"},{group:"parastyle",label:"Paragraph Style",buttons:[{type:"select",label:"Normal",value:"heading",disabled:true,menu:[{text:"Normal",value:"none",checked:true},{text:"Header 1",value:"h1"},{text:"Header 2",value:"h2"},{text:"Header 3",value:"h3"},{text:"Header 4",value:"h4"},{text:"Header 5",value:"h5"},{text:"Header 6",value:"h6"}]}]},{type:"separator"},{group:"indentlist2",label:"Indenting and Lists",buttons:[{type:"push",label:"Indent",value:"indent",disabled:true},{type:"push",label:"Outdent",value:"outdent",disabled:true},{type:"push",label:"Create an Unordered List",value:"insertunorderedlist"},{type:"push",label:"Create an Ordered List",value:"insertorderedlist"}]},{type:"separator"},{group:"insertitem",label:"Insert Item",buttons:[{type:"push",label:"Insert Image",value:"insertimage"},{type:"push",label:"HTML Link CTRL + SHIFT + L",value:"createlink",disabled:true}]}]}}}var d=ORBEON.util.Utils.getProperty(NEW_XHTML_LAYOUT_PROPERTY)?g.getElementsByTagName("textarea")[0]:g;var f=new YAHOO.widget.Editor(d,h);var e=function(){f.on("editorKeyUp",function(){a(g.id)});f.on("afterNodeChange",function(){a(g.id)});f.removeListener("afterNodeChange",e)};f.on("afterNodeChange",e);rteEditors[g.id]=f;isIncremental[g.id]=ORBEON.util.Dom.hasClass(g,"xforms-incremental");f.on("editorContentLoaded",function(){if(!ORBEON.util.Utils.getProperty(NEW_XHTML_LAYOUT_PROPERTY)){var k=g.parentNode;k.className+=" "+g.className}var j=ORBEON.xforms.Controls.getCurrentValue(g);ORBEON.xforms.Globals.serverValue[g.id]=j;if(YAHOO.lang.isObject(renderedCustomEvents[g.id])){renderedCustomEvents[g.id].fire()}renderedCustomEvents[g.id]=true});f.render()},focusOnAnyFormControl:function(e){var d=ORBEON.xforms.Globals.currentFocusControlId;if(rteEditors[e.id]==null&&rteEditors[d]!=null){ORBEON.xforms.Events.change({target:ORBEON.util.Dom.getElementById(d)});ORBEON.xforms.Events.blur({target:ORBEON.util.Dom.getElementById(d)})}},setValue:function(f,e){if(!ORBEON.util.Dom.hasClass(f,"xforms-incremental")||ORBEON.xforms.Globals.currentFocusControlId!=f.id){var d=rteEditors[f.id];d.setEditorHTML(e)}},getValue:function(f){var d=rteEditors[f.id];var e=d.getEditorHTML();if(e=="<br>"){e=""}return e},setFocus:function(e){var d=rteEditors[e.id]},onRendered:function(d,e){if(renderedCustomEvents[d.id]===true){e()}else{if(renderedCustomEvents[d.id]===undefined){renderedCustomEvents[d.id]=new YAHOO.util.CustomEvent("rteRendered")}renderedCustomEvents[d.id].subscribe(e)}}};return c}();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},registerChangeListenerOnFormElements: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];if(b.id!=null&&b.id!=""){ORBEON.xforms.Init.registerChangeListenerOnFormElement(b)}}}}},removeChangeListenerOnFormElements: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];if(b.id!=null&&b.id!=""){ORBEON.xforms.Init.removeChangeListenerOnFormElement(b)}}}}},registerChangeListenerOnFormElement:function(a){YAHOO.util.Event.addListener(a,"change",ORBEON.xforms.Events.change)},removeChangeListenerOnFormElement:function(a){YAHOO.util.Event.removeListener(a,"change",ORBEON.xforms.Events.change)},registerDraggableListenersOnRepeatElements:function(e){var a=YAHOO.util.Dom.getElementsByClassName("xforms-dnd",null,e);for(var d=0;d<a.length;d++){var b=a[d];var c=b.tagName.toLowerCase();if(c=="div"||c=="tr"||c=="td"||c=="li"){ORBEON.xforms.Init.registerDraggableListenersOnRepeatElement(b)}}},registerDraggableListenersOnRepeatElement:function(b){var a=new ORBEON.xforms.DnD.DraggableItem(b);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(){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,resourcesBaseURL:ORBEON.xforms.Globals.resourcesBaseURL,xformsServerURL:ORBEON.xforms.Globals.xformsServerURL,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:true,menuItemsets:{},menuYui:{},treeYui:{},idToElement:{},isReloading:false,lastDialogZIndex:5,formLoadingLoadingOverlay:{},formLoadingLoadingInitialRightTop:{},formErrorPanel:{},formHelpPanel:{},formHelpPanelMessageDiv:{},formHelpPanelCloseButton:{},formLoadingNone:{},formStaticState:{},formDynamicState:{},formServerEvents:{},formClientState:{},modalProgressPanel:null,topLevelListenerRegistered:ORBEON.xforms.Globals.topLevelListenerRegistered==null?false:ORBEON.xforms.Globals.topLevelListenerRegistered};(function(){var P=ORBEON.xforms.Globals.isRenderingEngineTrident?ORBEON.util.IEDom:ORBEON.util.MozDom;for(var Q in P){ORBEON.util.Dom[Q]=P[Q]}}());ORBEON.util.Dom.addClass(document.body,"yui-skin-sam");if(ORBEON.util.Utils.getProperty(OFFLINE_SUPPORT_PROPERTY)){ORBEON.xforms.Offline.pageLoad()}if(ORBEON.xforms.Globals.isRenderingEngineTrident){ORBEON.xforms.Init.registerChangeListenerOnFormElements();if(!ORBEON.xforms.Globals.topLevelListenerRegistered){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{if(!ORBEON.xforms.Globals.topLevelListenerRegistered){document.addEventListener("focus",ORBEON.xforms.Events.focus,true);document.addEventListener("blur",ORBEON.xforms.Events.blur,true);document.addEventListener("change",ORBEON.xforms.Events.change,true)}}if(!ORBEON.xforms.Globals.topLevelListenerRegistered){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)}ORBEON.xforms.Init._setBasePaths(document.getElementsByTagName("script"),ORBEON.util.Utils.getProperty(RESOURCES_VERSIONED)=="true");if(ORBEON.util.Utils.getProperty(SESSION_HEARTBEAT_PROPERTY)){var m=ORBEON.util.Utils.getProperty(SESSION_HEARTBEAT_DELAY_PROPERTY);if(m>0){window.setInterval(function(){ORBEON.xforms.Events.sendHeartBeatIfNeeded(m)},m/10)}}for(var a=0;a<document.forms.length;a++){var A=document.forms[a];if(ORBEON.util.Dom.hasClass(A,"xforms-form")){var I=document.forms[a].id;ORBEON.util.Dom.removeClass(A,"xforms-initially-hidden");ORBEON.xforms.Init.registerDraggableListenersOnRepeatElements(A);ORBEON.xforms.Globals.formErrorPanel[I]=null;ORBEON.xforms.Globals.formLoadingNone[I]=null;var F=0;for(var K=0;K<A.childNodes.length;K++){if(F==3){break}var v=A.childNodes[K];if(v.className=="xforms-loading-loading"){v.style.display="block";ORBEON.xforms.Globals.formLoadingLoadingOverlay[I]=new YAHOO.widget.Overlay(v,{visible:false,monitorresize:true});ORBEON.xforms.Globals.formLoadingLoadingInitialRightTop[I]=[YAHOO.util.Dom.getViewportWidth()-YAHOO.util.Dom.getX(v),YAHOO.util.Dom.getY(v)];v.style.right="auto";F++}else{if(ORBEON.util.Dom.isElement(v)&&ORBEON.util.Dom.hasClass(v,"xforms-error-panel")){YAHOO.util.Dom.generateId(v);ORBEON.util.Dom.removeClass(v,"xforms-initially-hidden");var z=new YAHOO.widget.Panel(v.id,{width:"700px",modal:true,fixedcenter:false,underlay:"shadow",visible:false,constraintoviewport:true,draggable:true});z.beforeHideEvent.subscribe(ORBEON.xforms.Events.errorPanelClosed,I);ORBEON.xforms.Globals.formErrorPanel[I]=z;var C=ORBEON.util.Dom.getChildElementByClass(v,"hd");var s=ORBEON.util.Dom.getChildElementByClass(v,"bd");var N=ORBEON.util.Dom.getChildElementByClass(s,"xforms-error-panel-details-hidden");var q=ORBEON.util.Dom.getChildElementByIndex(ORBEON.util.Dom.getChildElementByIndex(N,0),0);YAHOO.util.Dom.generateId(q);var J=ORBEON.util.Dom.getChildElementByClass(s,"xforms-error-panel-details-shown");var L=ORBEON.util.Dom.getChildElementByIndex(ORBEON.util.Dom.getChildElementByIndex(J,0),0);YAHOO.util.Dom.generateId(L);z.errorTitleDiv=C;z.errorDetailsDiv=ORBEON.util.Dom.getChildElementByClass(J,"xforms-error-panel-details");YAHOO.util.Event.addListener(q.id,"click",ORBEON.xforms.Events.errorShowHideDetails);YAHOO.util.Event.addListener(L.id,"click",ORBEON.xforms.Events.errorShowHideDetails);var d=YAHOO.util.Dom.getElementsByClassName("xforms-error-panel-close",null,v);if(d.length!=0){YAHOO.util.Dom.generateId(d[0]);YAHOO.util.Event.addListener(d[0].id,"click",ORBEON.xforms.Events.errorCloseClicked,z)}var H=YAHOO.util.Dom.getElementsByClassName("xforms-error-panel-reload",null,v);if(H.length!=0){YAHOO.util.Dom.generateId(H[0]);YAHOO.util.Event.addListener(H[0].id,"click",ORBEON.xforms.Events.errorReloadClicked,z)}F++}else{if(v.className=="xforms-loading-none"){ORBEON.xforms.Globals.formLoadingNone[I]=v;F++}}}}var b=A.elements;var f;var D;for(var p=0;p<b.length;p++){var l=b[p];if(l.name.indexOf("$static-state")!=-1){ORBEON.xforms.Globals.formStaticState[I]=l}else{if(l.name.indexOf("$dynamic-state")!=-1){ORBEON.xforms.Globals.formDynamicState[I]=l}else{if(l.name.indexOf("$server-events")!=-1){ORBEON.xforms.Globals.formServerEvents[I]=l}else{if(l.name.indexOf("$client-state")!=-1){ORBEON.xforms.Globals.formClientState[I]=l;if(l.value==""){xformsStoreInClientState(I,"initial-dynamic-state",ORBEON.xforms.Globals.formDynamicState[I].value)}}else{if(l.name.indexOf("$repeat-tree")!=-1){f=l}else{if(l.name.indexOf("$repeat-indexes")!=-1){D=l;break}}}}}}}var y=f.value;var k=y.split(",");for(var G=0;G<k.length;G++){var E=k[G].split(" ");var B=E[0];if(E.length>1){var g=E[E.length-1];ORBEON.xforms.Globals.repeatTreeChildToParent[B]=g}}for(var e in ORBEON.xforms.Globals.repeatTreeChildToParent){var g=ORBEON.xforms.Globals.repeatTreeChildToParent[e];while(g!=null){if(!ORBEON.xforms.Globals.repeatTreeParentToAllChildren[g]){ORBEON.xforms.Globals.repeatTreeParentToAllChildren[g]=new Array()}ORBEON.xforms.Globals.repeatTreeParentToAllChildren[g].push(e);g=ORBEON.xforms.Globals.repeatTreeChildToParent[g]}}var r=D.value;var w=r.split(",");for(var G=0;G<w.length;G++){var E=w[G].split(" ");var B=E[0];var x=E[E.length-1];ORBEON.xforms.Globals.repeatIndexes[B]=x}if(xformsGetFromClientState(I,"load-did-run")==null){xformsStoreInClientState(I,"load-did-run","true")}else{if(ORBEON.util.Utils.getProperty(REVISIT_HANDLING_PROPERTY)=="reload"){ORBEON.xforms.Globals.isReloading=true;window.location.reload(true)}else{var O=new ORBEON.xforms.Server.Event(A,null,null,null,"xxforms-all-events-required");ORBEON.xforms.Server.fireEvents([O],false)}}}}if(!(window.opsXFormsControls===undefined)){var u=ORBEON.xforms.Init._getSpecialControlsInitFunctions();for(var c in window.opsXFormsControls.controls){if(u[c]){var M=window.opsXFormsControls.controls[c];for(var j in M){var n=u[c][j];if(n){var h=M[j];for(var o=0;o<h.length;o++){var t=ORBEON.util.Dom.getElementById(h[o]);n(t)}}}}}}if(typeof xformsPageLoadedServer!="undefined"&&!ORBEON.xforms.Globals.fckEditorLoading){xformsPageLoadedServer()}if(window.parent.childWindowOrbeonReady){window.parent.childWindowOrbeonReady();window.parent.childWindowOrbeonReady=null}ORBEON.xforms.Globals.topLevelListenerRegistered=true;window.setTimeout(function(){ORBEON.xforms.Events.orbeonLoadedEvent.fire()},ORBEON.util.Utils.getProperty(INTERNAL_SHORT_DELAY_PROPERTY))},profileDocument:function(){console.profile("XForms initialization");ORBEON.xforms.Init.document();console.profileEnd()},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)}else{if(ORBEON.util.Dom.hasClass(a,"xforms-textarea")&&ORBEON.util.Dom.hasClass(a,"xforms-mediatype-text-html")){ORBEON.xforms.Init._htmlArea(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)}}}},_setBasePaths:function(c,d){for(var g=0;g<c.length;g++){var h=c[g];var a=ORBEON.util.Dom.getAttribute(h,"src");if(a!=null){var b=a.indexOf(PATH_TO_JAVASCRIPT_1);if(b!=-1){var e=a.substr(0,b);ORBEON.xforms.Globals.resourcesBaseURL=e;if(d){ORBEON.xforms.Globals.xformsServerURL=e.substring(0,e.lastIndexOf("/"))+XFORMS_SERVER_PATH}else{ORBEON.xforms.Globals.xformsServerURL=e+XFORMS_SERVER_PATH}break}else{b=a.indexOf(PATH_TO_JAVASCRIPT_2);if(b!=-1){var e=a.substr(0,b);var j=a.substr(b);if(d){var k=/^(\/[^\/]+)(\/[^\/]+)(\/.*)$/.exec(j);var f=k[2];ORBEON.xforms.Globals.resourcesBaseURL=e+f;ORBEON.xforms.Globals.xformsServerURL=e+XFORMS_SERVER_PATH}else{ORBEON.xforms.Globals.resourcesBaseURL=e;ORBEON.xforms.Globals.xformsServerURL=e+XFORMS_SERVER_PATH}break}}}}},_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;ORBEON.xforms.Globals.serverValue[a.id]="0";var b;if(ORBEON.util.Utils.getProperty(NEW_XHTML_LAYOUT_PROPERTY)){b=YAHOO.util.Dom.getElementsByClassName("xforms-range-background","div",a)[0]}else{b=a}var d=YAHOO.util.Dom.getElementsByClassName("xforms-range-thumb","div",a)[0];d.id=ORBEON.util.Utils.appendToEffectiveId(a.id,"$$thumb");var c=YAHOO.widget.Slider.getHorizSlider(b.id,d.id,0,200);c.subscribe("change",ORBEON.xforms.Events.sliderValueChange)},_addToTree:function(k,m,g,l){for(var j=l;j<m.length;j++){var f=m[j];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(k.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(k,f,a,e?3:2);if(e&&d){if(k.value!=""){k.value+=" "}k.value+=h}}},_initTreeDivFromArray:function(j,f,k){var c=f.getRoot();ORBEON.xforms.Init._addToTree(j,k,c,0);if(j.xformsAllowMultipleSelection){var h=j.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=j.xformsAllowMultipleSelection?j.value.split(" "):[j.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,k,a){if(a.element.id==""){YAHOO.util.Dom.generateId(a.element)}a.clickEvent.subscribe(ORBEON.xforms.Events.menuClick,{menu:c,value:k[1]});if(k.length>3){var f=new YAHOO.widget.Menu(a.element.id+"menu");for(var j=3;j<k.length;j++){var g=k[j];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){if(ORBEON.util.Utils.getProperty(HTML_EDITOR_PROPERTY)=="yui"){ORBEON.widgets.RTE.init(b)}else{var a=new FCKeditor(b.name);if(!xformsArrayContains(ORBEON.xforms.Globals.htmlAreaNames,b.name)){ORBEON.xforms.Globals.htmlAreaNames.push(b.name)}a.BasePath=ORBEON.xforms.Globals.resourcesBaseURL+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="";if(ORBEON.util.Utils.getProperty(NEW_XHTML_LAYOUT_PROPERTY)){d=YAHOO.util.Dom.getElementsByClassName("","select",d)[0]}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 g=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");var f;if(d){f=new YAHOO.widget.Panel(c.id,{close:false,modal:g,visible:false,constraintoviewport:true,iframe:true,underlay:"none"});YAHOO.util.Event.addListener(document.body,"click",ORBEON.xforms.Events.dialogMinimalBodyClick,f)}else{f=new YAHOO.widget.Dialog(c.id,{modal:g,close:e,visible:false,draggable:b,fixedcenter:false,constraintoviewport:false,underlay:"none"});f.showEvent.subscribe(ORBEON.xforms.Events.dialogShow,c.id);f.beforeHideEvent.subscribe(ORBEON.xforms.Events.dialogClose,c.id)}ORBEON.xforms.Globals.dialogs[c.id]=f;if(a){ORBEON.xforms.Controls.showDialog(c.id,null)}}};ORBEON.xforms.Server={Event:function(a,l,e,k,f,d,b,c,g,j,h){this.form=YAHOO.lang.isObject(a)?a:YAHOO.lang.isString(l)?ORBEON.xforms.Controls.getForm(ORBEON.util.Dom.getElementById(l)):null;this.targetId=YAHOO.lang.isUndefined(l)?null:l;this.otherId=YAHOO.lang.isUndefined(e)?null:e;this.value=YAHOO.lang.isUndefined(k)?null:k;this.eventName=YAHOO.lang.isUndefined(f)?null:f;this.bubbles=YAHOO.lang.isUndefined(d)?null:d;this.cancelable=YAHOO.lang.isUndefined(b)?null:b;this.ignoreErrors=YAHOO.lang.isUndefined(c)?null:c;this.showProgress=YAHOO.lang.isBoolean(g)?g:true;this.progressMessage=YAHOO.lang.isUndefined(j)?null:j;this.additionalAttribs=YAHOO.lang.isUndefined(h)?null:h},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(d,b,c){ORBEON.xforms.Events.errorEvent.fire({title:d,details:b});if(!ORBEON.xforms.Globals.requestIgnoreErrors&&ORBEON.util.Utils.getProperty(SHOW_ERROR_DIALOG_PROPERTY)=="true"){var a=ORBEON.xforms.Globals.formErrorPanel[c];if(a){if(YAHOO.util.Dom.hasClass(a.element,"xforms-initially-hidden")){ORBEON.util.Dom.removeClass(a.element,"xforms-initially-hidden");a.render()}a.element.style.display="block";a.errorTitleDiv.innerHTML=d;a.errorDetailsDiv.innerHTML=b;a.show();a.center()}}},fireEvents:function(b,f){if(!ORBEON.xforms.Offline.isOnline){var a=[];for(var c=0;c<b.length;c++){var e=b[c];if(e.eventName=="xxforms-value-change-with-focus-change"){a.push(e);ORBEON.xforms.Offline.controlValues[e.targetId]=e.value}}if(a.length>0){ORBEON.xforms.Offline.memoryOfflineEvents=ORBEON.xforms.Offline.memoryOfflineEvents.concat(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{if(ORBEON.xforms.Globals.modalProgressPanel==null){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()}}},_debugEventQueue:function(){ORBEON.util.Utils.logMessage("Event queue:");for(var a=0;a<ORBEON.xforms.Globals.eventQueue.length;a++){var b=ORBEON.xforms.Globals.eventQueue[a];ORBEON.util.Utils.logMessage(" "+a+" - name: "+b.eventName+" | targetId: "+b.targetId+" | value: "+b.value)}},executeNextRequest:function(q){q=typeof(q)=="boolean"&&q==true;ORBEON.xforms.Globals.executeEventFunctionQueued--;var g=false;if(!ORBEON.xforms.Globals.requestInProgress&&ORBEON.xforms.Globals.eventQueue.length>0&&(q||ORBEON.xforms.Globals.executeEventFunctionQueued==0)){var b={};var j=ORBEON.util.Utils.getProperty(CLIENT_EVENTS_FILTER_PROPERTY).split(" ");for(var h=0;h<j.length;h++){b[j[h]]=true}var e=false;if(ORBEON.util.Utils.getProperty(CLIENT_EVENTS_MODE_PROPERTY)=="deferred"){var A=null;var u=false;eventLoop:for(var h=0;h<ORBEON.xforms.Globals.eventQueue.length;h++){var v=ORBEON.xforms.Globals.eventQueue[h];if(v.eventName=="DOMActivate"){e=true;break eventLoop}if(v.targetId!=null&&b[v.eventName]==null){var z=ORBEON.util.Dom.getElementById(v.targetId);if(z==null){e=true;break eventLoop}else{if(ORBEON.util.Dom.hasClass(z,"xxforms-events-mode-default")){e=true;break eventLoop}var k=z.parentNode;var n=false;while(k!=null){if(k.nodeType==ELEMENT_TYPE&&ORBEON.util.Dom.hasClass(k,"xxforms-events-mode-default")){n=true;if(u){e=true;break eventLoop}if(A==null){A=k}else{if(A!=k){e=true;break eventLoop}}break}k=k.parentNode}if(!n){u=true;if(A!=null){e=true;break eventLoop}}}}}}else{var e=true}if(e){var m={};var f=[];for(var h=0;h<ORBEON.xforms.Globals.eventQueue.length;h++){var v=ORBEON.xforms.Globals.eventQueue[h];if(b[v.eventName]==null){if(v.eventName=="xxforms-value-change-with-focus-change"){if(m[v.targetId]==null){if(ORBEON.util.Dom.hasClass(ORBEON.util.Dom.getElementById(v.targetId),"xforms-upload")||(ORBEON.xforms.Globals.serverValue[v.targetId]!="undefined"&&ORBEON.xforms.Globals.serverValue[v.targetId]!=v.value)){m[v.targetId]=v;ORBEON.xforms.Globals.serverValue[v.targetId]=v.value;f.push(v)}}else{m[v.targetId].value=v.value;ORBEON.xforms.Globals.serverValue[v.targetId]=v.value}}else{m={};f.push(v)}}}ORBEON.xforms.Globals.eventQueue=f;if(ORBEON.xforms.Globals.eventQueue.length>0){ORBEON.xforms.Globals.requestForm=ORBEON.xforms.Globals.eventQueue[0].form;var r=ORBEON.xforms.Globals.requestForm.id;for(var p in ORBEON.xforms.Globals.changedIdsRequest){if(ORBEON.xforms.Globals.changedIdsRequest[p]==0){ORBEON.xforms.Globals.changedIdsRequest[p]=null}}ORBEON.xforms.Globals.requestIgnoreErrors=true;var t=false;var s=false;var o;for(var h=0;h<ORBEON.xforms.Globals.eventQueue.length;h++){var v=ORBEON.xforms.Globals.eventQueue[h];if(!v.ignoreErrors){ORBEON.xforms.Globals.requestIgnoreErrors=false}if(v.eventName=="xxforms-all-events-required"||v.eventName=="xxforms-offline"){t=true}if(v.showProgress){s=true}if(YAHOO.lang.isString(v.progressMessage)){o=h==0?v.progressMessage:o==v.progressMessage?v.progressMessage:null}else{o=null}if(v.eventName=="DOMActivate"){var x=ORBEON.util.Dom.getElementById(v.targetId);if(ORBEON.util.Dom.hasClass(x,"xxforms-offline")){t=true}}}ORBEON.xforms.Globals.requestInProgress=true;if(s){var a=ORBEON.util.Utils.getProperty(DELAY_BEFORE_DISPLAY_LOADING_PROPERTY);if(a==0){xformsDisplayLoading(o)}else{window.setTimeout(function(){xformsDisplayLoading(o)},a)}}var y=[];y.push('<!DOCTYPE xxforms:event-request [<!ENTITY nbsp "&#160;">]>\n');var l="    ";y.push('<xxforms:event-request xmlns:xxforms="http://orbeon.org/oxf/xml/xforms">\n');y.push(l);y.push("<xxforms:static-state>");y.push(ORBEON.xforms.Globals.formStaticState[r].value);y.push("</xxforms:static-state>\n");y.push(l);y.push("<xxforms:dynamic-state>");y.push(ORBEON.xforms.Globals.formDynamicState[r].value);y.push("</xxforms:dynamic-state>\n");if(t){y.push(l);y.push("<xxforms:initial-dynamic-state>");y.push(xformsGetFromClientState(r,"initial-dynamic-state"));y.push("</xxforms:initial-dynamic-state>\n")}var c=[];for(var w=0;w<ORBEON.xforms.Globals.eventQueue.length;w++){var v=ORBEON.xforms.Globals.eventQueue[w];if(ORBEON.xforms.Controls.getForm(v.form)==ORBEON.xforms.Globals.requestForm){if(v.eventName=="server-events"){y.push(l);y.push("<xxforms:server-events>");y.push(v.value);y.push("</xxforms:server-events>");c.unshift(w)}}}y.push(l);y.push("<xxforms:action>\n");for(var w=0;w<ORBEON.xforms.Globals.eventQueue.length;w++){var v=ORBEON.xforms.Globals.eventQueue[w];if(ORBEON.xforms.Controls.getForm(v.form)==ORBEON.xforms.Globals.requestForm&&v.eventName!="server-events"){y.push(l+l);y.push("<xxforms:event");y.push(' name="'+v.eventName+'"');if(v.targetId!=null){y.push(' source-control-id="'+v.targetId+'"')}if(v.otherId!=null){y.push(' other-control-id="'+v.otherId+'"')}if(v.additionalAttribs!=null){for(var d=0;d<v.additionalAttribs.length-1;d+=2){y.push(" "+v.additionalAttribs[d]+'="'+v.additionalAttribs[d+1]+'"')}}y.push(">");if(v.value!=null){if(typeof v.value=="string"){v.value=v.value.replace(XFORMS_REGEXP_AMPERSAND,"&amp;");v.value=v.value.replace(XFORMS_REGEXP_OPEN_ANGLE,"&lt;")}y.push(v.value)}y.push("</xxforms:event>\n");c.unshift(w)}}y.push(l);y.push("</xxforms:action>\n");y.push("</xxforms:event-request>");for(var w=0;w<c.length;w++){ORBEON.xforms.Globals.eventQueue.splice(c[w],1)}g=true;ORBEON.xforms.Globals.requestRetries=ORBEON.util.Utils.getProperty(REQUEST_RETRIES_PROPERTY);ORBEON.xforms.Globals.requestDocument=y.join("");ORBEON.xforms.Server.asyncRequest()}}}if(!g&&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",ORBEON.xforms.Globals.xformsServerURL,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(f){var e=f.responseXML;if(!YAHOO.lang.isUndefined(f.getResponseHeader)&&YAHOO.lang.trim(f.getResponseHeader["Content-Type"])=="text/html"){if(dojox&&dojox.html&&dojox.html.set){var g=document.createElement("div");g.innerHTML=f.responseText;var b=ORBEON.util.Dom.getChildElementByIndex(g,0);var a=ORBEON.xforms.Globals.requestForm;while(a!=null&&a.className&&!ORBEON.util.Dom.hasClass(a,"orbeon-portlet-div")){a=a.parentNode}if(ORBEON.xforms.Globals.topLevelListenerRegistered){if(ORBEON.xforms.Globals.isRenderingEngineTrident){YAHOO.util.Event.removeListener(document,"focusin",ORBEON.xforms.Events.focus);YAHOO.util.Event.removeListener(document,"focusout",ORBEON.xforms.Events.blur);YAHOO.util.Event.removeListener(document,"change",ORBEON.xforms.Events.change)}else{document.removeEventListener("focus",ORBEON.xforms.Events.focus,true);document.removeEventListener("blur",ORBEON.xforms.Events.blur,true);document.removeEventListener("change",ORBEON.xforms.Events.change,true)}YAHOO.util.Event.removeListener(document,"keypress",ORBEON.xforms.Events.keypress);YAHOO.util.Event.removeListener(document,"keydown",ORBEON.xforms.Events.keydown);YAHOO.util.Event.removeListener(document,"keyup",ORBEON.xforms.Events.keyup);YAHOO.util.Event.removeListener(document,"mouseover",ORBEON.xforms.Events.mouseover);YAHOO.util.Event.removeListener(document,"mouseout",ORBEON.xforms.Events.mouseout);YAHOO.util.Event.removeListener(document,"click",ORBEON.xforms.Events.click);YAHOO.util.Event.removeListener(window,"resize",ORBEON.xforms.Events.resize);YAHOO.widget.Overlay.windowScrollEvent.unsubscribe(ORBEON.xforms.Events.scrollOrResize);YAHOO.widget.Overlay.windowResizeEvent.unsubscribe(ORBEON.xforms.Events.scrollOrResize);ORBEON.xforms.Globals.topLevelListenerRegistered=false}if(typeof xformsPageUnloadedServer!="undefined"){xformsPageUnloadedServer()}if(typeof xformsPageLoadedServer!="undefined"){xformsPageLoadedServer=undefined}while(a.childNodes.length>0){a.removeChild(a.firstChild)}dojox.html.set(a,f.responseText,{renderStyles:false,executeScripts:true,adjustPaths:true,referencePath:"/"});ORBEON.xforms.Init.document()}}else{if(!e||(e&&e.documentElement&&e.documentElement.tagName.toLowerCase()=="html")){var d=f.responseText.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&");e=ORBEON.util.Dom.stringToDom(d)}var c=ORBEON.xforms.Globals.requestForm.id;ORBEON.util.Utils.hideModalProgressPanel();ORBEON.xforms.Server.handleResponseDom(e,c);ORBEON.xforms.Globals.changedIdsRequest={};ORBEON.xforms.Globals.requestInProgress=false;ORBEON.xforms.Globals.requestDocument="";ORBEON.xforms.Globals.executeEventFunctionQueued++;ORBEON.xforms.Server.executeNextRequest(false);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}}if(ORBEON.xforms.Offline.lastRequestIsTakeOnline){ORBEON.xforms.Offline.lastRequestIsTakeOnline=false;var actionElements=ORBEON.util.Dom.getElementsByName(responseRoot,"action",xmlNamespace);var offlineElements=ORBEON.util.Dom.getElementsByName(actionElements[0],"offline",xmlNamespace);if(offlineElements.length==1){ORBEON.xforms.Offline.isOnline=false}else{ORBEON.xforms.Offline.gearsDatabase.execute("delete from Offline_Forms where url = ?",[window.location.href]).close();ORBEON.xforms.Offline.formStore.remove(window.location.href)}}for(var i=0;i<responseRoot.childNodes.length;i++){if(ORBEON.util.Utils.getLocalName(responseRoot.childNodes[i])=="dynamic-state"){var newDynamicState=ORBEON.util.Dom.getStringValue(responseRoot.childNodes[i]);ORBEON.xforms.Globals.formDynamicState[formID].value=newDynamicState}else{if(ORBEON.util.Utils.getLocalName(responseRoot.childNodes[i])=="static-state"){var newStaticState=ORBEON.util.Dom.getStringValue(responseRoot.childNodes[i]);ORBEON.xforms.Globals.formStaticState[formID].value=newStaticState}else{if(ORBEON.util.Utils.getLocalName(responseRoot.childNodes[i])=="action"){var actionElement=responseRoot.childNodes[i];for(var actionIndex=0;actionIndex<actionElement.childNodes.length;actionIndex++){var actionName=ORBEON.util.Utils.getLocalName(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-"+ORBEON.util.Utils.appendRepeatSuffix(repeatId,parentIndexes));afterInsertionPoint=repeatEnd}for(var suffix=startSuffix;suffix<=endSuffix;suffix++){var nestedRepeatLevel=0;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)}if(newTemplateNode.nodeType==ELEMENT_TYPE){if(ORBEON.util.Dom.hasClass(newTemplateNode,"xforms-repeat-begin-end")&&templateNode.id.indexOf("repeat-end-")==0){nestedRepeatLevel--}ORBEON.util.Utils.addSuffixToIds(newTemplateNode,parentIndexes==""?String(suffix):parentIndexes+XFORMS_SEPARATOR_2+suffix,nestedRepeatLevel);if(ORBEON.util.Dom.hasClass(newTemplateNode,"xforms-repeat-begin-end")&&templateNode.id.indexOf("repeat-begin-")==0){nestedRepeatLevel++}}afterInsertionPoint.parentNode.insertBefore(newTemplateNode,afterInsertionPoint);ORBEON.xforms.Init.insertedElement(newTemplateNode)}}if(ORBEON.xforms.Globals.isRenderingEngineWebCore13){ORBEON.xforms.Init.registerChangeListenerOnFormElements()}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-"+ORBEON.util.Utils.appendRepeatSuffix(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;if(lastElementToDelete.nodeType==ELEMENT_TYPE){YAHOO.util.Dom.getElementsByClassName("xforms-control",null,lastElementToDelete,function(control){ORBEON.xforms.Globals.serverValue[control.id]=null});if(YAHOO.util.Dom.hasClass(lastElementToDelete,"xforms-control")){ORBEON.xforms.Globals.serverValue[lastElementToDelete.id]=null}}lastElementToDelete.parentNode.removeChild(lastElementToDelete);lastElementToDelete=previous;if(wasDelimiter){break}}}}}}var controlsWithUpdatedItemsets={};for(var actionIndex=0;actionIndex<actionElement.childNodes.length;actionIndex++){if(ORBEON.util.Utils.getLocalName(actionElement.childNodes[actionIndex])=="itemsets"){var itemsetsElement=actionElement.childNodes[actionIndex];for(var j=0;j<itemsetsElement.childNodes.length;j++){if(ORBEON.util.Utils.getLocalName(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(" ");controlsWithUpdatedItemsets[controlId]=true;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(ORBEON.util.Dom.hasClass(documentElement,"xforms-select1-appearance-compact")||ORBEON.util.Dom.hasClass(documentElement,"xforms-select-appearance-compact")||ORBEON.util.Dom.hasClass(documentElement,"xforms-select1-appearance-minimal")){var select=ORBEON.util.Utils.getProperty(NEW_XHTML_LAYOUT_PROPERTY)?documentElement.getElementsByTagName("select")[0]:documentElement;var options=select.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){YAHOO.util.Event.removeListener(select,"change");var selectOpeningTag=select.outerHTML.substring(0,select.outerHTML.indexOf(">")+1);select.outerHTML=selectOpeningTag+sb.join("")+"</select>";select=ORBEON.util.Dom.getElementByIdNoCache(controlId);ORBEON.xforms.Globals.idToElement[controlId]=select;ORBEON.xforms.Init.registerChangeListenerOnFormElement(select)}else{select.innerHTML=sb.join("")}}else{var template=ORBEON.util.Dom.hasClass(documentElement,"xforms-select")?ORBEON.util.Dom.getElementById("xforms-select-full-template"):ORBEON.util.Dom.getElementById("xforms-select1-full-template");template=ORBEON.util.Dom.getChildElementByIndex(template,0);var spanContainer=ORBEON.util.Utils.getProperty(NEW_XHTML_LAYOUT_PROPERTY)?documentElement.getElementsByTagName("span")[0]:documentElement;var valueToChecked={};while(true){var child=YAHOO.util.Dom.getFirstChild(spanContainer);if(child==null){break}var input=child.getElementsByTagName("input")[0];valueToChecked[input.value]=input.checked;spanContainer.removeChild(child)}var itemIndex=0;for(var k=0;k<itemsetTree.length;k++){var itemElement=itemsetTree[k];var templateClone=template.cloneNode(true);spanContainer.appendChild(templateClone);ORBEON.util.Utils.stringReplace(templateClone,"$xforms-template-label$",itemElement[0]);ORBEON.util.Utils.stringReplace(templateClone,"$xforms-template-value$",itemElement[1]);var itemEffectiveId=ORBEON.util.Utils.appendToEffectiveId(controlId,"$$e"+itemIndex);ORBEON.util.Utils.stringReplace(templateClone,"$xforms-item-effective-id$",itemEffectiveId);ORBEON.util.Utils.stringReplace(templateClone,"$xforms-effective-id$",controlId);if(valueToChecked[itemElement[1]]==true){var inputToCheck=templateClone.getElementsByTagName("input")[0];inputToCheck.checked=true}itemIndex++}}}}if(typeof xformsItemsetUpdatedListener!="undefined"){xformsItemsetUpdatedListener(controlId,itemsetTree)}}}}}var serverEventsIndex=-1;for(var actionIndex=0;actionIndex<actionElement.childNodes.length;actionIndex++){var actionName=ORBEON.util.Utils.getLocalName(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 classes=ORBEON.util.Dom.getAttribute(controlElement,"class");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 isLeafControl=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(isLeafControl){var parentElement=documentElement.parentNode;var newDocumentElement=document.createElement("span");newDocumentElement.setAttribute("id",controlId);newDocumentElement.className=documentElementClasses.join(" ")+" xforms-static";parentElement.replaceChild(newDocumentElement,documentElement);var cachedElement=ORBEON.xforms.Globals.idToElement[controlId];if(cachedElement!=null){ORBEON.xforms.Globals.idToElement[controlId]=newDocumentElement}var alertElement=ORBEON.xforms.Controls._getControlLabel(newDocumentElement,"alert");if(alertElement!=null){parentElement.removeChild(alertElement)}var hintLabel=ORBEON.xforms.Controls._getControlLabel(newDocumentElement,"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")}}var recreatedInput=false;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";var isBooleanType=type=="{http://www.w3.org/2001/XMLSchema}boolean"||type=="{http://www.w3.org/2002/xforms}boolean";var isStringType=type==""||type=="{http://www.w3.org/2001/XMLSchema}string"||type=="{http://www.w3.org/2002/xforms}string";var isRecognizedType=isDateType||isTimeType||isDateTimeType||isBooleanType||isStringType;if(isRecognizedType){recreatedInput=true;ORBEON.util.Dom.removeClass(documentElement,"xforms-type-string");ORBEON.util.Dom.removeClass(documentElement,"xforms-type-date");ORBEON.util.Dom.removeClass(documentElement,"xforms-type-time");ORBEON.util.Dom.removeClass(documentElement,"xforms-type-dateTime");ORBEON.util.Dom.removeClass(documentElement,"xforms-type-boolean");ORBEON.util.Dom.removeClass(documentElement,"xforms-incremental");var isMinimal=ORBEON.util.Dom.hasClass(documentElement,"xforms-input-appearance-minimal");var lastLabelPosition=-1;var childElements=YAHOO.util.Dom.getChildren(documentElement);for(var childIndex=0;childIndex<childElements.length;childIndex++){var childElement=childElements[childIndex];var childTagName=childElement.tagName.toLowerCase();if(childTagName!="label"&&!YAHOO.util.Dom.hasClass(childElement,"xforms-help-image")){documentElement.removeChild(childElement);if(lastLabelPosition==-1){lastLabelPosition=childIndex-1}}}function insertIntoDocument(nodes){if(ORBEON.util.Utils.getProperty(NEW_XHTML_LAYOUT_PROPERTY)){if(childElements.length==0){for(var nodeIndex=0;nodeIndex<nodes.length;nodeIndex++){documentElement.appendChild(nodes[nodeIndex])}}else{if(lastLabelPosition==-1){var firstChild=YAHOO.util.Dom.getFirstChild(documentElement);for(var nodeIndex=nodes.length-1;nodeIndex>=0;nodeIndex--){YAHOO.util.Dom.insertBefore(nodes[nodeIndex],firstChild)}}else{for(var nodeIndex=0;nodeIndex<nodes.length;nodeIndex++){YAHOO.util.Dom.insertAfter(nodes[nodeIndex],childElements[lastLabelPosition])}}}}else{for(var nodeIndex=0;nodeIndex<nodes.length;nodeIndex++){documentElement.appendChild(nodes[nodeIndex])}}}function createInput(typeClassName,inputIndex){var newInputElement=document.createElement("input");newInputElement.setAttribute("type","text");newInputElement.className="xforms-input-input "+typeClassName;newInputElement.name=ORBEON.util.Utils.appendToEffectiveId(controlId,"$xforms-input-"+inputIndex);newInputElement.id=newInputElement.name;return newInputElement}function insertInputs(inputs){insertIntoDocument(inputs);if(ORBEON.xforms.Globals.isRenderingEngineTrident){for(var inputIndex=0;inputIndex<inputs.length;inputIndex++){ORBEON.xforms.Init.registerChangeListenerOnFormElement(inputs[inputIndex])}}}if(isStringType){insertInputs([createInput("xforms-type-string",1)]);ORBEON.util.Dom.addClass(documentElement,"xforms-type-string")}else{if(isDateType&&!isMinimal){insertInputs([createInput("xforms-type-date",1)]);ORBEON.util.Dom.addClass(documentElement,"xforms-type-date")}else{if(isDateType&&isMinimal){var image=document.createElement("img");image.setAttribute("src",ORBEON.xforms.Globals.resourcesBaseURL+"/ops/images/xforms/calendar.png");image.className="xforms-input-input xforms-type-date xforms-input-appearance-minimal";insertIntoDocument([image]);ORBEON.util.Dom.addClass(documentElement,"xforms-type-date")}else{if(isTimeType){insertInputs([createInput("xforms-type-time",1)]);ORBEON.util.Dom.addClass(documentElement,"xforms-type-time")}else{if(isDateTimeType){insertInputs([createInput("xforms-type-date",1),createInput("xforms-type-time",2)]);ORBEON.util.Dom.addClass(documentElement,"xforms-type-dateTime")}else{if(isBooleanType){var template=ORBEON.util.Dom.getElementById("xforms-select-full-template");template=ORBEON.util.Dom.getChildElementByIndex(template,0);var templateClone=template.cloneNode(true);var templateLabelElement=templateClone.getElementsByTagName("label")[0];templateLabelElement.parentNode.removeChild(templateLabelElement);insertIntoDocument([templateClone]);ORBEON.util.Utils.stringReplace(templateClone,"$xforms-template-value$","true");var itemEffectiveId=ORBEON.util.Utils.appendToEffectiveId(controlId,"$$e0");ORBEON.util.Utils.stringReplace(templateClone,"$xforms-item-effective-id$",itemEffectiveId);ORBEON.util.Utils.stringReplace(templateClone,"$xforms-effective-id$",controlId);ORBEON.util.Dom.addClass(documentElement,"xforms-type-boolean");ORBEON.util.Dom.addClass(documentElement,"xforms-input-appearance-minimal");ORBEON.util.Dom.addClass(documentElement,"xforms-type-boolean");ORBEON.util.Dom.addClass(documentElement,"xforms-incremental")}}}}}}}}if(readonly!=null&&!isStaticReadonly){ORBEON.xforms.Controls.setReadonly(documentElement,readonly=="true")}if(classes!=null){var classesArray=classes.split(" ");for(var classIndex=0;classIndex<classesArray.length;classIndex++){var currentClass=classesArray[classIndex];if(currentClass.charAt(0)=="-"){ORBEON.util.Dom.removeClass(documentElement,currentClass.substring(1))}else{ORBEON.util.Dom.addClass(documentElement,currentClass.charAt(0)=="+"?currentClass.substring(1):currentClass)}}}if(isLeafControl){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,state,filename,mediatype,size)}else{if(ORBEON.util.Dom.hasClass(documentElement,"xforms-output")||ORBEON.util.Dom.hasClass(documentElement,"xforms-static")){ORBEON.xforms.Controls.setCurrentValue(documentElement,newControlValue)}else{if(ORBEON.util.Dom.hasClass(documentElement,"xforms-trigger")||ORBEON.util.Dom.hasClass(documentElement,"xforms-submit")){}else{var currentValue=ORBEON.xforms.Controls.getCurrentValue(documentElement);if(currentValue!=null){previousServerValue=ORBEON.util.String.normalizeSerializedHTML(previousServerValue);currentValue=ORBEON.util.String.normalizeSerializedHTML(currentValue);newControlValue=ORBEON.util.String.normalizeSerializedHTML(newControlValue);var isInput=ORBEON.util.Dom.hasClass(documentElement,"xforms-input");var inputSize=isInput?ORBEON.util.Dom.getAttribute(controlElement,"size"):null;var inputlength=isInput?ORBEON.util.Dom.getAttribute(controlElement,"maxlength"):null;var inputAutocomplete=isInput?ORBEON.util.Dom.getAttribute(controlElement,"autocomplete"):null;var doUpdate=recreatedInput||controlsWithUpdatedItemsets[controlId]||(currentValue!=newControlValue&&(previousServerValue==null||currentValue==previousServerValue))||(isInput&&(inputSize!=null||inputlength!=null||inputAutocomplete!=null));if(doUpdate){if(isInput){ORBEON.xforms.Controls.setCurrentValue(documentElement,newControlValue,inputSize,inputlength,inputAutocomplete)}else{if(ORBEON.util.Dom.hasClass(documentElement,"xforms-textarea")&&ORBEON.util.Dom.hasClass(documentElement,"xforms-mediatype-text-html")){ORBEON.xforms.Controls.setCurrentValue(documentElement,newControlValue);ORBEON.xforms.Globals.serverValue[documentElement.id]=ORBEON.xforms.Controls.getCurrentValue(documentElement)}else{ORBEON.xforms.Controls.setCurrentValue(documentElement,newControlValue)}}}}}}}if(typeof xformsValueChangedListener!="undefined"){xformsValueChangedListener(controlId,newControlValue)}if(ORBEON.util.Dom.hasClass(documentElement,"xforms-output")&&relevant==null){ORBEON.util.Dom.addClass(documentElement,"xforms-visited");if(ORBEON.util.Dom.hasClass(documentElement,"xforms-invalid")){ORBEON.util.Dom.addClass(documentElement,"xforms-invalid-visited")}}}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);if(ORBEON.util.Dom.hasClass(documentElement,"xforms-textarea")&&ORBEON.util.Dom.hasClass(documentElement,"xforms-mediatype-text-html")&&ORBEON.util.Utils.getProperty(HTML_EDITOR_PROPERTY)=="fck"){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){ORBEON.util.Dom.setAttribute(htmlElement,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)}}var divsElements=ORBEON.util.Dom.getElementsByName(controlValuesElement,"div",xmlNamespace);var divElementslength=divsElements.length;for(var j=0;j<divElementslength;j++){var divElement=divsElements[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}if(visible){ORBEON.util.Dom.addClass(cursor,"xforms-case-selected");ORBEON.util.Dom.removeClass(cursor,"xforms-case-deselected");ORBEON.util.Dom.removeClass(cursor,"xforms-case-deselected-subsequent");ORBEON.util.Dom.nudgeAferDelay(cursor)}else{ORBEON.util.Dom.addClass(cursor,"xforms-case-deselected-subsequent");ORBEON.util.Dom.removeClass(cursor,"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(ORBEON.util.Utils.getLocalName(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=ORBEON.util.Utils.findRepeatDelimiter(repeatId,oldIndex);if(oldItemDelimiter!=null){var cursor=oldItemDelimiter.nextSibling;while(cursor.nodeType!=ELEMENT_TYPE||(!YAHOO.util.Dom.hasClass(cursor,"xforms-repeat-delimiter")&&!YAHOO.util.Dom.hasClass(cursor,"xforms-repeat-begin-end"))){if(cursor.nodeType==ELEMENT_TYPE){YAHOO.util.Dom.removeClass(cursor,ORBEON.util.Utils.getClassForRepeatId(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=ORBEON.util.Utils.findRepeatDelimiter(repeatId,newIndex);var cursor=newItemDelimiter.nextSibling;while(cursor.nodeType!=ELEMENT_TYPE||(!YAHOO.util.Dom.hasClass(cursor,"xforms-repeat-delimiter")&&!YAHOO.util.Dom.hasClass(cursor,"xforms-repeat-begin-end"))){if(cursor.nodeType==ELEMENT_TYPE){YAHOO.util.Dom.addClass(cursor,ORBEON.util.Utils.getClassForRepeatId(repeatId))}cursor=cursor.nextSibling}}}}break;case"server-events":var serverEventsElement=actionElement.childNodes[actionIndex];var delay=ORBEON.util.Dom.getAttribute(serverEventsElement,"delay");var showProgress=ORBEON.util.Dom.getAttribute(serverEventsElement,"show-progress");showProgress=YAHOO.lang.isNull(showProgress)||showProgress=="true";var progressMessage=ORBEON.util.Dom.getAttribute(serverEventsElement,"progress-message");if(delay==null){serverEventsIndex=actionIndex}else{var serverEvents=ORBEON.util.Dom.getStringValue(serverEventsElement);window.setTimeout(function(){var event=new ORBEON.xforms.Server.Event(ORBEON.util.Dom.getElementById(formID),null,null,serverEvents,"server-events",null,null,null,showProgress,progressMessage);ORBEON.xforms.Server.fireEvents([event])},delay)}break;case"submission":var submissionElement=actionElement.childNodes[actionIndex];var showProgress=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(showProgress!="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",ORBEON.xforms.Globals.xformsServerURL,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 eventsElements=ORBEON.util.Dom.getElementsByName(offlineElement,"events",xmlNamespace);var mappingsElements=ORBEON.util.Dom.getElementsByName(offlineElement,"mappings",xmlNamespace);if(eventsElements.length!=0&&mappingsElements.length!=0){var replayResponse=ORBEON.util.Dom.getStringValue(eventsElements[0]);var mappings=ORBEON.util.Dom.getStringValue(mappingsElements[0]);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);throw e}},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;ORBEON.xforms.DnD={DraggableItem:function(d,a,c){ORBEON.xforms.DnD.DraggableItem.superclass.constructor.call(this,d,d.tagName,c);YAHOO.util.Dom.setStyle(d,"cursor","move");var b=this.getDragEl();if(!YAHOO.util.Dom.hasClass(b.parentNode,"xforms-form")){var e=ORBEON.xforms.Controls.getForm(d);e.appendChild(b)}}};YAHOO.extend(ORBEON.xforms.DnD.DraggableItem,YAHOO.util.DDProxy,{_startPosition:-1,_getPosition:function(b){var c=b;var a=0;while(true){if(YAHOO.util.Dom.hasClass(c,"xforms-repeat-begin-end")){break}if(YAHOO.util.Dom.hasClass(c,"xforms-repeat-delimiter")){a++}c=YAHOO.util.Dom.getPreviousSibling(c)}return a},_renumberIDsWorker:function(e,f,d){var c=e.id.indexOf(XFORMS_SEPARATOR_1);if(c!=-1){var a=e.id.substring(c+1).split(XFORMS_SEPARATOR_2);a[f]=d;var b=e.id.substring(0,c)+XFORMS_SEPARATOR_1+a.join(XFORMS_SEPARATOR_2);e.id=b}YAHOO.util.Dom.batch(YAHOO.util.Dom.getChildren(e),function(g){this._renumberIDsWorker(g,f,d)},this,true)},_renumberIDs:function(f){var e=0;var g=f;var b=g.indexOf(XFORMS_SEPARATOR_1);if(b!=-1){g=g.substring(0,b)}while(true){var a=ORBEON.xforms.Globals.repeatTreeChildToParent[g];if(!a){break}e++;g=a}var c=YAHOO.util.Dom.get("repeat-begin-"+f);var d=0;while(true){c=YAHOO.util.Dom.getNextSibling(c);if(c==null||YAHOO.util.Dom.hasClass(c,"xforms-repeat-begin-end")){break}if(!YAHOO.util.Dom.hasClass(c,"xforms-repeat-delimiter")&&!YAHOO.util.Dom.hasClass(c,"xforms-repeat-template")){d++;this._renumberIDsWorker(c,e,d)}}},startDrag:function(a,f){var c=this.getDragEl();var b=this.getEl();this._startPosition=this._getPosition(b);var e=YAHOO.util.Dom.getElementsByClassName("xforms-repeat-begin-end",null,b.parentNode)[0].id;this.sourceControlID=e.substring(13);YAHOO.util.Dom.setStyle(c,"opacity",0.67);YAHOO.util.Dom.setStyle(c,"width",parseInt(c.style.width)+2+"px");YAHOO.util.Dom.setStyle(c,"height","auto");var d=b.tagName.toLowerCase();c.innerHTML=d=="tr"?"<table'><tr>"+b.innerHTML+"</tr></table>":b.innerHTML;c.className=b.className;YAHOO.util.Dom.setStyle(b,"visibility","hidden")},onDrag:function(a){var b=YAHOO.util.Event.getPageY(a);if(b<this.lastY){this.goingUp=true}else{if(b>this.lastY){this.goingUp=false}}this.lastY=b},onDragOver:function(g,h){var a=this.getEl();var b=YAHOO.util.Dom.getPreviousSibling(a);var f=YAHOO.util.Dom.get(h)[0];if(ORBEON.util.Dom.hasClass(a,"xforms-dnd")&&a.nodeName.toLowerCase()==f.getEl().nodeName.toLowerCase()){var c=f.getEl().parentNode;this.overElement=f.getEl();c.removeChild(b);c.removeChild(a);if(this.goingUp){var d=this.overElement;c.insertBefore(a,d);c.insertBefore(b,d)}else{var d=YAHOO.util.Dom.getNextSibling(this.overElement);c.insertBefore(b,d);c.insertBefore(a,d)}YAHOO.util.DragDropMgr.refreshCache()}},endDrag:function(h){var a=this.getEl();var c=this.getDragEl();var b=c.id;var j=this.id;YAHOO.util.Dom.setStyle(b,"visibility","hidden");YAHOO.util.Dom.setStyle(j,"visibility","");var g=this._getPosition(a);if(g!=this._startPosition){var f=ORBEON.xforms.Controls.getForm(a);var d=new ORBEON.xforms.Server.Event(f,this.sourceControlID,null,null,"xxforms-dnd",null,null,null,null,null,["dnd-start",this._startPosition,"dnd-end",g]);this._renumberIDs(this.sourceControlID);ORBEON.xforms.Server.fireEvents([d],false)}}});ORBEON.xforms.Offline={isOnline:true,lastRequestIsTakeOnline:false,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(e){ORBEON.xforms.Offline.init();var g=ORBEON.xforms.Offline.gearsDatabase.execute("select form_id, static_state, dynamic_state, offline_events from Offline_Forms where url = ?",[window.location.href]);var d=g.fieldByName("form_id");ORBEON.xforms.Globals.formDynamicState[d].value=g.fieldByName("dynamic_state");ORBEON.xforms.Globals.formStaticState[d].value=g.fieldByName("static_state");var j=g.fieldByName("offline_events");j=ORBEON.xforms.Offline._decrypt(j,ORBEON.xforms.Offline.getEncryptionKey());ORBEON.xforms.Offline.lastRequestIsTakeOnline=true;ORBEON.xforms.Offline.isOnline=true;if(j!=""){var h=j.split(" ");var k=[];for(var a=0;a<h.length;a++){var f=unescape(h[a]);var b=f.split(" ");for(var c=0;c<b.length;c++){b[c]=unescape(b[c])}k.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(k,false)}ORBEON.xforms.Document.dispatchEvent("$containing-document$","xxforms-online");if(!YAHOO.lang.isUndefined(e)){e(window)}},storeEvents:function(a){function b(c){return c==null?"":c}ORBEON.xforms.Offline._runShowingIndicator(function(){ORBEON.xforms.Offline.init();var g=[];for(var c=0;c<a.length;c++){var d=a[c];var e=[b(d.form.id),b(d.targetId),b(d.otherId),b(d.value),b(d.eventName),d.bubbles?1:0,d.cancelable?1:0,d.ignoreErrors?1:0];var k=[];for(var f=0;f<e.length;f++){if(f!=0){k.push(" ")}k.push(escape(e[f]))}if(g.length>0){g.push(" ")}g.push(escape(k.join("")))}if(g.length>0){var l=ORBEON.xforms.Offline.gearsDatabase.execute("select offline_events from Offline_Forms where url = ?",[window.location.href]);var j=l.fieldByName("offline_events");if(j!=""){j=ORBEON.xforms.Offline._decrypt(j,ORBEON.xforms.Offline.getEncryptionKey());j+=" "}j+=g.join("");j=ORBEON.xforms.Offline._encrypt(j,ORBEON.xforms.Offline.getEncryptionKey());var h=ORBEON.xforms.Offline._serializeControlValues(ORBEON.xforms.Offline.controlValues);ORBEON.xforms.Offline.gearsDatabase.execute("update Offline_Forms set control_values = ?, offline_events = ? where url = ?",[h,j,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(j,h,l,f,k,n,c){if(l(j)!=n){f(j,n);if(k){for(var o=0;o<h.relevant.inherited.length;o++){var e=k[o];var p=ORBEON.util.Dom.getElementById(e);if(p==null){p=ORBEON.util.Dom.getElementById("group-begin-"+e)}if(c&&p==null){var m=Math.max(e.lastIndexOf(XFORMS_SEPARATOR_1),e.lastIndexOf(XFORMS_SEPARATOR_2));var g=e.substring(0,m);var d=e.substring(m+1);ORBEON.xforms.Controls.setRepeatIterationRelevance(g,d,n)}else{f(p,n)}}}}}function b(c,d){try{return xpathParse(c).evaluate(d).value}catch(f){ORBEON.util.Utils.logMessage("Error evaluating XPath expression "+c);return null}}ORBEON.xforms.Offline._runShowingIndicator(function(){var l=document.createElement("dummy");var r=new ExprContext(l);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 j=ORBEON.util.Dom.getElementById(g);var k=ORBEON.xforms.Controls.getCurrentValue(j);ORBEON.util.Dom.setStringValue(l,k);if(h.calculate){var d=b(h.calculate.value,r);if(d!=null){ORBEON.xforms.Controls.setCurrentValue(j,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}}if(h.required){var m=b(h.required.value,r);if(m!=null){q&=!(k==""&&m)}}if(h.relevant){var f=b("boolean("+h.relevant.value+")",r);if(f!=null){a(j,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(j,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(!k.match(n)){q=false}}}ORBEON.xforms.Controls.setValid(j,q?"true":"false")}})},_serializeControlValues:function(b){var a=[];for(controlID in b){if(a.length>0){a.push(" ")}a.push(escape(controlID));a.push(" ");a.push(escape(b[controlID]))}a=ORBEON.xforms.Offline._encrypt(a.join(""),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"))},_runShowingIndicator:function(a){xformsDisplayIndicator("loading");window.setTimeout(function(){a();xformsDisplayIndicator("none")},ORBEON.util.Utils.getProperty(INTERNAL_SHORT_DELAY_PROPERTY))}};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 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(d,a){var c=ORBEON.xforms.Globals.requestForm;if(c!=null){var e=c.id;switch(d){case"loading":var b=ORBEON.xforms.Globals.formLoadingLoadingOverlay[e];if(b!=null){ORBEON.util.Dom.setStringValue(b.element,a==null?DEFAULT_LOADING_TEXT:a);b.show();ORBEON.xforms.Controls.updateLoadingPosition(e)}if(ORBEON.xforms.Globals.formLoadingNone[e]!=null){ORBEON.xforms.Globals.formLoadingNone[e].style.display="block"}break;case"none":if(!ORBEON.xforms.Globals.loadingOtherPage){if(ORBEON.xforms.Globals.formLoadingLoadingOverlay[e]!=null){ORBEON.xforms.Globals.formLoadingLoadingOverlay[e].render(document.body);ORBEON.xforms.Globals.formLoadingLoadingOverlay[e].cfg.setProperty("visible",false)}if(ORBEON.xforms.Globals.formLoadingNone[e]!=null){ORBEON.xforms.Globals.formLoadingNone[e].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 b=f!=g.previousValue;var d=ORBEON.util.Dom.hasClass(g,"xforms-upload");if(b&&!d){g.previousValue=f;var e=a==null&&ORBEON.util.Dom.hasClass(g,"xforms-incremental");var h=YAHOO.lang.isObject(a)?a.id:null;var c=new ORBEON.xforms.Server.Event(null,g.id,h,f,"xxforms-value-change-with-focus-change");ORBEON.xforms.Server.fireEvents([c],e)}return b}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")){var a=new ORBEON.xforms.Server.Event(null,b.id,null,null,"DOMActivate");ORBEON.xforms.Server.fireEvents([a],false)}return false}function xformsHandleAutoCompleteMouseChange(a){a.parentNode.lastKeyCode=-1;a.parentNode.value=a.value;xformsValueChanged(a.parentNode,null)}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 xformsDisplayLoading(a){if(ORBEON.xforms.Globals.requestInProgress==true){xformsDisplayIndicator("loading",a)}}if(!ORBEON.xforms.Globals.pageLoadedRegistered){var foundDojoContentPane=false;for(var i=0;i<document.forms.length;i++){var form=document.forms[i];if(form.className.indexOf("xforms-form")!=-1){var currentElement=form.parentNode;while(currentElement!=null){if(currentElement.className=="dijitContentPane"){foundDojoContentPane=true;break}currentElement=currentElement.parentNode}}}if(!foundDojoContentPane){ORBEON.xforms.Globals.pageLoadedRegistered=true;YAHOO.util.Event.throwErrors=true;YAHOO.util.Event.onDOMReady(ORBEON.xforms.Init.document);ORBEON.xforms.Globals.debugLastTime=new Date().getTime();ORBEON.xforms.Globals.lastEventSentTime=new Date().getTime()}};