// This file was produced by Orbeon Forms 3.8.0.201005142210 PE
/*
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"});
/*
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.Attribute=function(B,A){if(A){this.owner=A;this.configure(B,true);}};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,validator:null,getValue:function(){return this.value;},setValue:function(F,B){var E;var A=this.owner;var C=this.name;var D={type:C,prevValue:this.getValue(),newValue:F};if(this.readOnly||(this.writeOnce&&this._written)){return false;}if(this.validator&&!this.validator.call(A,F)){return false;}if(!B){E=A.fireBeforeChangeEvent(D);if(E===false){return false;}}if(this.method){this.method.call(A,F);}this.value=F;this._written=true;D.type=C;if(!B){this.owner.fireChangeEvent(D);}return true;},configure:function(B,C){B=B||{};this._written=false;this._initialConfig=this._initialConfig||{};for(var A in B){if(B.hasOwnProperty(A)){this[A]=B[A];if(C){this._initialConfig[A]=B[A];}}}},resetValue:function(){return this.setValue(this._initialConfig.value);},resetConfig:function(){this.configure(this._initialConfig);},refresh:function(A){this.setValue(this.value,A);}};(function(){var A=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(C){this._configs=this._configs||{};var B=this._configs[C];if(!B||!this._configs.hasOwnProperty(C)){return undefined;}return B.value;},set:function(D,E,B){this._configs=this._configs||{};var C=this._configs[D];if(!C){return false;}return C.setValue(E,B);},getAttributeKeys:function(){this._configs=this._configs;var D=[];var B;for(var C in this._configs){B=this._configs[C];if(A.hasOwnProperty(this._configs,C)&&!A.isUndefined(B)){D[D.length]=C;}}return D;},setAttributes:function(D,B){for(var C in D){if(A.hasOwnProperty(D,C)){this.set(C,D[C],B);}}},resetValue:function(C,B){this._configs=this._configs||{};if(this._configs[C]){this.set(C,this._configs[C]._initialConfig.value,B);return true;}return false;},refresh:function(E,C){this._configs=this._configs||{};var F=this._configs;E=((A.isString(E))?[E]:E)||this.getAttributeKeys();for(var D=0,B=E.length;D<B;++D){if(F.hasOwnProperty(E[D])){this._configs[E[D]].refresh(C);}}},register:function(B,C){this.setAttributeConfig(B,C);},getAttributeConfig:function(C){this._configs=this._configs||{};var B=this._configs[C]||{};var D={};for(C in B){if(A.hasOwnProperty(B,C)){D[C]=B[C];}}return D;},setAttributeConfig:function(B,C,D){this._configs=this._configs||{};C=C||{};if(!this._configs[B]){C.name=B;this._configs[B]=this.createAttribute(C);}else{this._configs[B].configure(C,D);}},configureAttribute:function(B,C,D){this.setAttributeConfig(B,C,D);},resetAttributeConfig:function(B){this._configs=this._configs||{};this._configs[B].resetConfig();},subscribe:function(B,C){this._events=this._events||{};if(!(B in this._events)){this._events[B]=this.createEvent(B);}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){this.subscribe.apply(this,arguments);},addListener:function(){this.subscribe.apply(this,arguments);},fireBeforeChangeEvent:function(C){var B="before";B+=C.type.charAt(0).toUpperCase()+C.type.substr(1)+"Change";C.type=B;return this.fireEvent(C.type,C);},fireChangeEvent:function(B){B.type+="Change";return this.fireEvent(B.type,B);},createAttribute:function(B){return new YAHOO.util.Attribute(B,this);}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider);})();(function(){var D=YAHOO.util.Dom,F=YAHOO.util.AttributeProvider;YAHOO.util.Element=function(G,H){if(arguments.length){this.init(G,H);}};YAHOO.util.Element.prototype={DOM_EVENTS:null,appendChild:function(G){G=G.get?G.get("element"):G;return this.get("element").appendChild(G);},getElementsByTagName:function(G){return this.get("element").getElementsByTagName(G);},hasChildNodes:function(){return this.get("element").hasChildNodes();},insertBefore:function(G,H){G=G.get?G.get("element"):G;H=(H&&H.get)?H.get("element"):H;return this.get("element").insertBefore(G,H);},removeChild:function(G){G=G.get?G.get("element"):G;return this.get("element").removeChild(G);},replaceChild:function(G,H){G=G.get?G.get("element"):G;H=H.get?H.get("element"):H;return this.get("element").replaceChild(G,H);},initAttributes:function(G){},addListener:function(K,J,L,I){var H=this.get("element")||this.get("id");I=I||this;var G=this;if(!this._events[K]){if(H&&this.DOM_EVENTS[K]){YAHOO.util.Event.addListener(H,K,function(M){if(M.srcElement&&!M.target){M.target=M.srcElement;}G.fireEvent(K,M);},L,I);}this.createEvent(K,this);}return YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){return this.addListener.apply(this,arguments);},subscribe:function(){return this.addListener.apply(this,arguments);},removeListener:function(H,G){return this.unsubscribe.apply(this,arguments);},addClass:function(G){D.addClass(this.get("element"),G);},getElementsByClassName:function(H,G){return D.getElementsByClassName(H,G,this.get("element"));},hasClass:function(G){return D.hasClass(this.get("element"),G);},removeClass:function(G){return D.removeClass(this.get("element"),G);},replaceClass:function(H,G){return D.replaceClass(this.get("element"),H,G);},setStyle:function(I,H){var G=this.get("element");if(!G){return this._queue[this._queue.length]=["setStyle",arguments];}return D.setStyle(G,I,H);},getStyle:function(G){return D.getStyle(this.get("element"),G);},fireQueue:function(){var H=this._queue;for(var I=0,G=H.length;I<G;++I){this[H[I][0]].apply(this,H[I][1]);}},appendTo:function(H,I){H=(H.get)?H.get("element"):D.get(H);this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:H});I=(I&&I.get)?I.get("element"):D.get(I);var G=this.get("element");if(!G){return false;}if(!H){return false;}if(G.parent!=H){if(I){H.insertBefore(G,I);}else{H.appendChild(G);}}this.fireEvent("appendTo",{type:"appendTo",target:H});return G;},get:function(G){var I=this._configs||{};var H=I.element;if(H&&!I[G]&&!YAHOO.lang.isUndefined(H.value[G])){return H.value[G];}return F.prototype.get.call(this,G);},setAttributes:function(L,H){var K=this.get("element");
for(var J in L){if(!this._configs[J]&&!YAHOO.lang.isUndefined(K[J])){this.setAttributeConfig(J);}}for(var I=0,G=this._configOrder.length;I<G;++I){if(L[this._configOrder[I]]!==undefined){this.set(this._configOrder[I],L[this._configOrder[I]],H);}}},set:function(H,J,G){var I=this.get("element");if(!I){this._queue[this._queue.length]=["set",arguments];if(this._configs[H]){this._configs[H].value=J;}return ;}if(!this._configs[H]&&!YAHOO.lang.isUndefined(I[H])){C.call(this,H);}return F.prototype.set.apply(this,arguments);},setAttributeConfig:function(G,I,J){var H=this.get("element");if(H&&!this._configs[G]&&!YAHOO.lang.isUndefined(H[G])){C.call(this,G,I);}else{F.prototype.setAttributeConfig.apply(this,arguments);}this._configOrder.push(G);},getAttributeKeys:function(){var H=this.get("element");var I=F.prototype.getAttributeKeys.call(this);for(var G in H){if(!this._configs[G]){I[G]=I[G]||H[G];}}return I;},createEvent:function(H,G){this._events[H]=true;F.prototype.createEvent.apply(this,arguments);},init:function(H,G){A.apply(this,arguments);}};var A=function(H,G){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._configOrder=[];G=G||{};G.element=G.element||H||null;this.DOM_EVENTS={"click":true,"dblclick":true,"keydown":true,"keypress":true,"keyup":true,"mousedown":true,"mousemove":true,"mouseout":true,"mouseover":true,"mouseup":true,"focus":true,"blur":true,"submit":true};var I=false;if(typeof G.element==="string"){C.call(this,"id",{value:G.element});}if(D.get(G.element)){I=true;E.call(this,G);B.call(this,G);}YAHOO.util.Event.onAvailable(G.element,function(){if(!I){E.call(this,G);}this.fireEvent("available",{type:"available",target:D.get(G.element)});},this,true);YAHOO.util.Event.onContentReady(G.element,function(){if(!I){B.call(this,G);}this.fireEvent("contentReady",{type:"contentReady",target:D.get(G.element)});},this,true);};var E=function(G){this.setAttributeConfig("element",{value:D.get(G.element),readOnly:true});};var B=function(G){this.initAttributes(G);this.setAttributes(G,true);this.fireQueue();};var C=function(G,I){var H=this.get("element");I=I||{};I.name=G;I.method=I.method||function(J){if(H){H[G]=J;}};I.value=I.value||H[G];this._configs[G]=new YAHOO.util.Attribute(I,this);};YAHOO.augment(YAHOO.util.Element,F);})();YAHOO.register("element",YAHOO.util.Element,{version:"2.6.0",build:"1321"});
(function(){var g=YAHOO.util.Dom,m=YAHOO.util.Event,i=YAHOO.lang,l=YAHOO.env.ua,b=YAHOO.widget.Overlay,j=YAHOO.widget.Menu,d={},k=null,e=null,c=null;function f(o,n,r,p){var s,q;if(i.isString(o)&&i.isString(n)){if(l.ie){q='<input type="'+o+'" name="'+n+'"';if(p){q+=" checked"}q+=">";s=document.createElement(q)}else{s=document.createElement("input");s.name=n;s.type=o;if(p){s.checked=true}}s.value=r}return s}function h(o,u){var n=o.nodeName.toUpperCase(),s=this,t,p,q;function v(w){if(!(w in u)){t=o.getAttributeNode(w);if(t&&("value" in t)){u[w]=t.value}}}function r(){v("type");if(u.type=="button"){u.type="push"}if(!("disabled" in u)){u.disabled=o.disabled}v("name");v("value");v("title")}switch(n){case"A":u.type="link";v("href");v("target");break;case"INPUT":r();if(!("checked" in u)){u.checked=o.checked}break;case"BUTTON":r();p=o.parentNode.parentNode;if(g.hasClass(p,this.CSS_CLASS_NAME+"-checked")){u.checked=true}if(g.hasClass(p,this.CSS_CLASS_NAME+"-disabled")){u.disabled=true}o.removeAttribute("value");o.setAttribute("type","button");break}o.removeAttribute("name");if(!("tabindex" in u)){u.tabindex=o.tabIndex}if(!("label" in u)){q=n=="INPUT"?o.value:o.innerHTML;if(q&&q.length>0){u.label=q}}}function a(p){var o=p.attributes,n=o.srcelement,r=n.nodeName.toUpperCase(),q=this;if(r==this.NODE_NAME){p.element=n;p.id=n.id;g.getElementsBy(function(s){switch(s.nodeName.toUpperCase()){case"BUTTON":case"A":case"INPUT":h.call(q,s,o);break}},"*",n)}else{switch(r){case"BUTTON":case"A":case"INPUT":h.call(this,n,o);break}}}YAHOO.widget.Button=function(r,o){if(!b&&YAHOO.widget.Overlay){b=YAHOO.widget.Overlay}if(!j&&YAHOO.widget.Menu){j=YAHOO.widget.Menu}var q=YAHOO.widget.Button.superclass.constructor,p,n;if(arguments.length==1&&!i.isString(r)&&!r.nodeName){if(!r.id){r.id=g.generateId()}q.call(this,(this.createButtonElement(r.type)),r)}else{p={element:null,attributes:(o||{})};if(i.isString(r)){n=g.get(r);if(n){if(!p.attributes.id){p.attributes.id=r}p.attributes.srcelement=n;a.call(this,p);if(!p.element){p.element=this.createButtonElement(p.attributes.type)}q.call(this,p.element,p.attributes)}}else{if(r.nodeName){if(!p.attributes.id){if(r.id){p.attributes.id=r.id}else{p.attributes.id=g.generateId()}}p.attributes.srcelement=r;a.call(this,p);if(!p.element){p.element=this.createButtonElement(p.attributes.type)}q.call(this,p.element,p.attributes)}}}};YAHOO.extend(YAHOO.widget.Button,YAHOO.util.Element,{_button:null,_menu:null,_hiddenFields:null,_onclickAttributeValue:null,_activationKeyPressed:false,_activationButtonPressed:false,_hasKeyEventHandlers:false,_hasMouseEventHandlers:false,_nOptionRegionX:0,NODE_NAME:"SPAN",CHECK_ACTIVATION_KEYS:[32],ACTIVATION_KEYS:[13,32],OPTION_AREA_WIDTH:20,CSS_CLASS_NAME:"yui-button",RADIO_DEFAULT_TITLE:"Unchecked.  Click to check.",RADIO_CHECKED_TITLE:"Checked.  Click another button to uncheck",CHECKBOX_DEFAULT_TITLE:"Unchecked.  Click to check.",CHECKBOX_CHECKED_TITLE:"Checked.  Click to uncheck.",MENUBUTTON_DEFAULT_TITLE:"Menu collapsed.  Click to expand.",MENUBUTTON_MENU_VISIBLE_TITLE:"Menu expanded.  Click or press Esc to collapse.",SPLITBUTTON_DEFAULT_TITLE:("Menu collapsed.  Click inside option region or press down arrow key to show the menu."),SPLITBUTTON_OPTION_VISIBLE_TITLE:"Menu expanded.  Press Esc to hide the menu.",SUBMIT_TITLE:"Click to submit form.",_setType:function(n){if(n=="split"){this.on("option",this._onOption)}},_setLabel:function(o){this._button.innerHTML=o;var p,n=l.gecko;if(n&&n<1.9&&g.inDocument(this.get("element"))){p=this.CSS_CLASS_NAME;this.removeClass(p);i.later(0,this,this.addClass,p)}},_setTabIndex:function(n){this._button.tabIndex=n},_setTitle:function(o){var n=o;if(this.get("type")!="link"){if(!n){switch(this.get("type")){case"radio":n=this.RADIO_DEFAULT_TITLE;break;case"checkbox":n=this.CHECKBOX_DEFAULT_TITLE;break;case"menu":n=this.MENUBUTTON_DEFAULT_TITLE;break;case"split":n=this.SPLITBUTTON_DEFAULT_TITLE;break;case"submit":n=this.SUBMIT_TITLE;break}}this._button.title=n}},_setDisabled:function(n){if(this.get("type")!="link"){if(n){if(this._menu){this._menu.hide()}if(this.hasFocus()){this.blur()}this._button.setAttribute("disabled","disabled");this.addStateCSSClasses("disabled");this.removeStateCSSClasses("hover");this.removeStateCSSClasses("active");this.removeStateCSSClasses("focus")}else{this._button.removeAttribute("disabled");this.removeStateCSSClasses("disabled")}}},_setHref:function(n){if(this.get("type")=="link"){this._button.href=n}},_setTarget:function(n){if(this.get("type")=="link"){this._button.setAttribute("target",n)}},_setChecked:function(o){var p=this.get("type"),n;if(p=="checkbox"||p=="radio"){if(o){this.addStateCSSClasses("checked");n=(p=="radio")?this.RADIO_CHECKED_TITLE:this.CHECKBOX_CHECKED_TITLE}else{this.removeStateCSSClasses("checked");n=(p=="radio")?this.RADIO_DEFAULT_TITLE:this.CHECKBOX_DEFAULT_TITLE}if(!this._hasDefaultTitle){this.set("title",n)}}},_setMenu:function(y){var r=this.get("lazyloadmenu"),u=this.get("element"),n,A=false,B,q,t,p,o,x,s;function z(){B.render(u.parentNode);this.removeListener("appendTo",z)}function w(){B.cfg.queueProperty("container",u.parentNode);this.removeListener("appendTo",w)}function v(){var C;if(B){g.addClass(B.element,this.get("menuclassname"));g.addClass(B.element,"yui-"+this.get("type")+"-button-menu");B.showEvent.subscribe(this._onMenuShow,null,this);B.hideEvent.subscribe(this._onMenuHide,null,this);B.renderEvent.subscribe(this._onMenuRender,null,this);if(j&&B instanceof j){if(r){C=this.get("container");if(C){B.cfg.queueProperty("container",C)}else{this.on("appendTo",w)}}B.cfg.queueProperty("clicktohide",false);B.keyDownEvent.subscribe(this._onMenuKeyDown,this,true);B.subscribe("click",this._onMenuClick,this,true);B.itemAddedEvent.subscribe(this._onMenuItemAdded,this,true);t=B.srcElement;if(t&&t.nodeName.toUpperCase()=="SELECT"){t.style.display="none";t.parentNode.removeChild(t)}}else{if(b&&B instanceof b){if(!k){k=new YAHOO.widget.OverlayManager()}k.register(B)}}this._menu=B;if(!A&&!r){if(g.inDocument(u)){B.render(u.parentNode)}else{this.on("appendTo",z)}}}}if(b){if(j){n=j.prototype.CSS_CLASS_NAME}if(y&&j&&(y instanceof j)){B=y;p=B.getItems();o=p.length;A=true;if(o>0){s=o-1;do{x=p[s];if(x){x.cfg.subscribeToConfigEvent("selected",this._onMenuItemSelected,x,this)}}while(s--)}v.call(this)}else{if(b&&y&&(y instanceof b)){B=y;A=true;B.cfg.queueProperty("visible",false);v.call(this)}else{if(j&&i.isArray(y)){B=new j(g.generateId(),{lazyload:r,itemdata:y});this._menu=B;this.on("appendTo",v)}else{if(i.isString(y)){q=g.get(y);if(q){if(j&&g.hasClass(q,n)||q.nodeName.toUpperCase()=="SELECT"){B=new j(y,{lazyload:r});v.call(this)}else{if(b){B=new b(y,{visible:false});v.call(this)}}}}else{if(y&&y.nodeName){if(j&&g.hasClass(y,n)||y.nodeName.toUpperCase()=="SELECT"){B=new j(y,{lazyload:r});v.call(this)}else{if(b){if(!y.id){g.generateId(y)}B=new b(y,{visible:false});v.call(this)}}}}}}}}},_setOnClick:function(n){if(this._onclickAttributeValue&&(this._onclickAttributeValue!=n)){this.removeListener("click",this._onclickAttributeValue.fn);this._onclickAttributeValue=null}if(!this._onclickAttributeValue&&i.isObject(n)&&i.isFunction(n.fn)){this.on("click",n.fn,n.obj,n.scope);this._onclickAttributeValue=n}},_setSelectedMenuItem:function(o){var n=this._menu,p;if(j&&n&&n instanceof j){p=n.getItem(o);if(p&&!p.cfg.getProperty("selected")){p.cfg.setProperty("selected",true)}}},_isActivationKey:function(n){var s=this.get("type"),o=(s=="checkbox"||s=="radio")?this.CHECK_ACTIVATION_KEYS:this.ACTIVATION_KEYS,q=o.length,r=false,p;if(q>0){p=q-1;do{if(n==o[p]){r=true;break}}while(p--)}return r},_isSplitButtonOptionKey:function(p){var o=(m.getCharCode(p)==40);var n=function(q){m.preventDefault(q);this.removeListener("keypress",n)};if(o){if(l.opera){this.on("keypress",n)}m.preventDefault(p)}return o},_addListenersToForm:function(){var t=this.getForm(),s=YAHOO.widget.Button.onFormKeyPress,r,n,q,p,o;if(t){m.on(t,"reset",this._onFormReset,null,this);m.on(t,"submit",this._onFormSubmit,null,this);n=this.get("srcelement");if(this.get("type")=="submit"||(n&&n.type=="submit")){q=m.getListeners(t,"keypress");r=false;if(q){p=q.length;if(p>0){o=p-1;do{if(q[o].fn==s){r=true;break}}while(o--)}}if(!r){m.on(t,"keypress",s)}}}},_showMenu:function(r){if(YAHOO.widget.MenuManager){YAHOO.widget.MenuManager.hideVisible()}if(k){k.hideAll()}var n=this._menu,q=this.get("menualignment"),p=this.get("focusmenu"),o;if(this._renderedMenu){n.cfg.setProperty("context",[this.get("element"),q[0],q[1]]);n.cfg.setProperty("preventcontextoverlap",true);n.cfg.setProperty("constraintoviewport",true)}else{n.cfg.queueProperty("context",[this.get("element"),q[0],q[1]]);n.cfg.queueProperty("preventcontextoverlap",true);n.cfg.queueProperty("constraintoviewport",true)}this.focus();if(j&&n&&(n instanceof j)){o=n.focus;n.focus=function(){};if(this._renderedMenu){n.cfg.setProperty("minscrollheight",this.get("menuminscrollheight"));n.cfg.setProperty("maxheight",this.get("menumaxheight"))}else{n.cfg.queueProperty("minscrollheight",this.get("menuminscrollheight"));n.cfg.queueProperty("maxheight",this.get("menumaxheight"))}n.show();n.focus=o;n.align();if(r.type=="mousedown"){m.stopPropagation(r)}if(p){n.focus()}}else{if(b&&n&&(n instanceof b)){if(!this._renderedMenu){n.render(this.get("element").parentNode)}n.show();n.align()}}},_hideMenu:function(){var n=this._menu;if(n){n.hide()}},_onMouseOver:function(o){var q=this.get("type"),n,p;if(q==="split"){n=this.get("element");p=(g.getX(n)+(n.offsetWidth-this.OPTION_AREA_WIDTH));this._nOptionRegionX=p}if(!this._hasMouseEventHandlers){if(q==="split"){this.on("mousemove",this._onMouseMove)}this.on("mouseout",this._onMouseOut);this._hasMouseEventHandlers=true}this.addStateCSSClasses("hover");if(q==="split"&&(m.getPageX(o)>p)){this.addStateCSSClasses("hoveroption")}if(this._activationButtonPressed){this.addStateCSSClasses("active")}if(this._bOptionPressed){this.addStateCSSClasses("activeoption")}if(this._activationButtonPressed||this._bOptionPressed){m.removeListener(document,"mouseup",this._onDocumentMouseUp)}},_onMouseMove:function(n){var o=this._nOptionRegionX;if(o){if(m.getPageX(n)>o){this.addStateCSSClasses("hoveroption")}else{this.removeStateCSSClasses("hoveroption")}}},_onMouseOut:function(n){var o=this.get("type");this.removeStateCSSClasses("hover");if(o!="menu"){this.removeStateCSSClasses("active")}if(this._activationButtonPressed||this._bOptionPressed){m.on(document,"mouseup",this._onDocumentMouseUp,null,this)}if(o==="split"&&(m.getPageX(n)>this._nOptionRegionX)){this.removeStateCSSClasses("hoveroption")}},_onDocumentMouseUp:function(p){this._activationButtonPressed=false;this._bOptionPressed=false;var q=this.get("type"),n,o;if(q=="menu"||q=="split"){n=m.getTarget(p);o=this._menu.element;if(n!=o&&!g.isAncestor(o,n)){this.removeStateCSSClasses((q=="menu"?"active":"activeoption"));this._hideMenu()}}m.removeListener(document,"mouseup",this._onDocumentMouseUp)},_onMouseDown:function(p){var q,o=true;function n(){this._hideMenu();this.removeListener("mouseup",n)}if((p.which||p.button)==1){if(!this.hasFocus()){this.focus()}q=this.get("type");if(q=="split"){if(m.getPageX(p)>this._nOptionRegionX){this.fireEvent("option",p);o=false}else{this.addStateCSSClasses("active");this._activationButtonPressed=true}}else{if(q=="menu"){if(this.isActive()){this._hideMenu();this._activationButtonPressed=false}else{this._showMenu(p);this._activationButtonPressed=true}}else{this.addStateCSSClasses("active");this._activationButtonPressed=true}}if(q=="split"||q=="menu"){this._hideMenuTimer=i.later(250,this,this.on,["mouseup",n])}}return o},_onMouseUp:function(p){var q=this.get("type"),n=this._hideMenuTimer,o=true;if(n){n.cancel()}if(q=="checkbox"||q=="radio"){this.set("checked",!(this.get("checked")))}this._activationButtonPressed=false;if(q!="menu"){this.removeStateCSSClasses("active")}if(q=="split"&&m.getPageX(p)>this._nOptionRegionX){o=false}return o},_onFocus:function(o){var n;this.addStateCSSClasses("focus");if(this._activationKeyPressed){this.addStateCSSClasses("active")}c=this;if(!this._hasKeyEventHandlers){n=this._button;m.on(n,"blur",this._onBlur,null,this);m.on(n,"keydown",this._onKeyDown,null,this);m.on(n,"keyup",this._onKeyUp,null,this);this._hasKeyEventHandlers=true}this.fireEvent("focus",o)},_onBlur:function(n){this.removeStateCSSClasses("focus");if(this.get("type")!="menu"){this.removeStateCSSClasses("active")}if(this._activationKeyPressed){m.on(document,"keyup",this._onDocumentKeyUp,null,this)}c=null;this.fireEvent("blur",n)},_onDocumentKeyUp:function(n){if(this._isActivationKey(m.getCharCode(n))){this._activationKeyPressed=false;m.removeListener(document,"keyup",this._onDocumentKeyUp)}},_onKeyDown:function(o){var n=this._menu;if(this.get("type")=="split"&&this._isSplitButtonOptionKey(o)){this.fireEvent("option",o)}else{if(this._isActivationKey(m.getCharCode(o))){if(this.get("type")=="menu"){this._showMenu(o)}else{this._activationKeyPressed=true;this.addStateCSSClasses("active")}}}if(n&&n.cfg.getProperty("visible")&&m.getCharCode(o)==27){n.hide();this.focus()}},_onKeyUp:function(n){var o;if(this._isActivationKey(m.getCharCode(n))){o=this.get("type");if(o=="checkbox"||o=="radio"){this.set("checked",!(this.get("checked")))}this._activationKeyPressed=false;if(this.get("type")!="menu"){this.removeStateCSSClasses("active")}}},_onClick:function(q){var s=this.get("type"),n,r,o,p;switch(s){case"radio":case"checkbox":if(!this._hasDefaultTitle){if(this.get("checked")){n=(s=="radio")?this.RADIO_CHECKED_TITLE:this.CHECKBOX_CHECKED_TITLE}else{n=(s=="radio")?this.RADIO_DEFAULT_TITLE:this.CHECKBOX_DEFAULT_TITLE}this.set("title",n)}break;case"submit":if(q.returnValue!==false){this.submitForm()}break;case"reset":r=this.getForm();if(r){r.reset()}break;case"menu":n=this._menu.cfg.getProperty("visible")?this.MENUBUTTON_MENU_VISIBLE_TITLE:this.MENUBUTTON_DEFAULT_TITLE;this.set("title",n);break;case"split":if(m.getPageX(q)>this._nOptionRegionX){p=false}else{this._hideMenu();o=this.get("srcelement");if(o&&o.type=="submit"){this.submitForm()}}n=this._menu.cfg.getProperty("visible")?this.SPLITBUTTON_OPTION_VISIBLE_TITLE:this.SPLITBUTTON_DEFAULT_TITLE;this.set("title",n);break}return p},_onDblClick:function(o){var n=true;if(this.get("type")=="split"&&m.getPageX(o)>this._nOptionRegionX){n=false}return n},_onAppendTo:function(n){i.later(0,this,this._addListenersToForm)},_onFormReset:function(o){var p=this.get("type"),n=this._menu;if(p=="checkbox"||p=="radio"){this.resetValue("checked")}if(j&&n&&(n instanceof j)){this.resetValue("selectedMenuItem")}},_onFormSubmit:function(n){this.createHiddenFields()},_onDocumentMouseDown:function(q){var n=m.getTarget(q),p=this.get("element"),o=this._menu.element;if(n!=p&&!g.isAncestor(p,n)&&n!=o&&!g.isAncestor(o,n)){this._hideMenu();m.removeListener(document,"mousedown",this._onDocumentMouseDown)}},_onOption:function(n){if(this.hasClass("yui-split-button-activeoption")){this._hideMenu();this._bOptionPressed=false}else{this._showMenu(n);this._bOptionPressed=true}},_onMenuShow:function(o){m.on(document,"mousedown",this._onDocumentMouseDown,null,this);var n,p;if(this.get("type")=="split"){n=this.SPLITBUTTON_OPTION_VISIBLE_TITLE;p="activeoption"}else{n=this.MENUBUTTON_MENU_VISIBLE_TITLE;p="active"}this.addStateCSSClasses(p);this.set("title",n)},_onMenuHide:function(p){var o=this._menu,n,q;if(this.get("type")=="split"){n=this.SPLITBUTTON_DEFAULT_TITLE;q="activeoption"}else{n=this.MENUBUTTON_DEFAULT_TITLE;q="active"}this.removeStateCSSClasses(q);this.set("title",n);if(this.get("type")=="split"){this._bOptionPressed=false}},_onMenuKeyDown:function(p,o){var n=o[0];if(m.getCharCode(n)==27){this.focus();if(this.get("type")=="split"){this._bOptionPressed=false}}},_onMenuRender:function(o){var q=this.get("element"),n=q.parentNode,p=this._menu.element;if(n!=p.parentNode){n.appendChild(p)}this._renderedMenu=true;this.set("selectedMenuItem",this.get("selectedMenuItem"))},_onMenuItemSelected:function(p,o,n){var q=o[0];if(q){this.set("selectedMenuItem",n)}},_onMenuItemAdded:function(p,o,n){var q=o[0];q.cfg.subscribeToConfigEvent("selected",this._onMenuItemSelected,q,this)},_onMenuClick:function(o,n){var q=n[1],p;if(q){this.set("selectedMenuItem",q);p=this.get("srcelement");if(p&&p.type=="submit"){this.submitForm()}this._hideMenu()}},createButtonElement:function(n){var p=this.NODE_NAME,o=document.createElement(p);o.innerHTML="<"+p+' class="first-child">'+(n=="link"?"<a></a>":'<button type="button"></button>')+"</"+p+">";return o},addStateCSSClasses:function(n){var o=this.get("type");if(i.isString(n)){if(n!="activeoption"&&n!="hoveroption"){this.addClass(this.CSS_CLASS_NAME+("-"+n))}this.addClass("yui-"+o+("-button-"+n))}},removeStateCSSClasses:function(n){var o=this.get("type");if(i.isString(n)){this.removeClass(this.CSS_CLASS_NAME+("-"+n));this.removeClass("yui-"+o+("-button-"+n))}},createHiddenFields:function(){this.removeHiddenFields();var v=this.getForm(),z,o,s,x,y,t,u,n,r,w,p,q=false;if(v&&!this.get("disabled")){o=this.get("type");s=(o=="checkbox"||o=="radio");if((s&&this.get("checked"))||(e==this)){z=f((s?o:"hidden"),this.get("name"),this.get("value"),this.get("checked"));if(z){if(s){z.style.display="none"}v.appendChild(z)}}x=this._menu;if(j&&x&&(x instanceof j)){y=this.get("selectedMenuItem");p=x.srcElement;q=(p&&p.nodeName.toUpperCase()=="SELECT");if(y){u=(y.value===null||y.value==="")?y.cfg.getProperty("text"):y.value;t=this.get("name");if(q){w=p.name}else{if(t){w=(t+"_options")}}if(u&&w){n=f("hidden",w,u);v.appendChild(n)}}else{if(q){v.appendChild(p)}}}if(z&&n){this._hiddenFields=[z,n]}else{if(!z&&n){this._hiddenFields=n}else{if(z&&!n){this._hiddenFields=z}}}r=this._hiddenFields}return r},removeHiddenFields:function(){var q=this._hiddenFields,o,p;function n(r){if(g.inDocument(r)){r.parentNode.removeChild(r)}}if(q){if(i.isArray(q)){o=q.length;if(o>0){p=o-1;do{n(q[p])}while(p--)}}else{n(q)}this._hiddenFields=null}},submitForm:function(){var q=this.getForm(),p=this.get("srcelement"),o=false,n;if(q){if(this.get("type")=="submit"||(p&&p.type=="submit")){e=this}if(l.ie){o=q.fireEvent("onsubmit")}else{n=document.createEvent("HTMLEvents");n.initEvent("submit",true,true);o=q.dispatchEvent(n)}if((l.ie||l.webkit)&&o){q.submit()}}return o},init:function(o,z){var q=z.type=="link"?"a":"button",v=z.srcelement,y=o.getElementsByTagName(q)[0],x;if(!y){x=o.getElementsByTagName("input")[0];if(x){y=document.createElement("button");y.setAttribute("type","button");x.parentNode.replaceChild(y,x)}}this._button=y;this._hasDefaultTitle=(z.title&&z.title.length>0);YAHOO.widget.Button.superclass.init.call(this,o,z);var t=this.get("id"),n=y.id!=null?y.id:t+"-button";y.id=n;var u,w;var C=function(D){return(D.htmlFor===t)};var s=function(){w.setAttribute((l.ie?"htmlFor":"for"),n)};if(v&&this.get("type")!="link"){u=g.getElementsBy(C,"label");if(i.isArray(u)&&u.length>0){w=u[0]}}d[t]=this;this.addClass(this.CSS_CLASS_NAME);this.addClass("yui-"+this.get("type")+"-button");m.on(this._button,"focus",this._onFocus,null,this);this.on("mouseover",this._onMouseOver);this.on("mousedown",this._onMouseDown);this.on("mouseup",this._onMouseUp);this.on("click",this._onClick);this.on("dblclick",this._onDblClick);if(w){this.on("appendTo",s)}this.on("appendTo",this._onAppendTo);var B=this.get("container"),p=this.get("element"),A=g.inDocument(p),r;if(B){if(v&&v!=p){r=v.parentNode;if(r){r.removeChild(v)}}if(i.isString(B)){m.onContentReady(B,this.appendTo,B,this)}else{this.on("init",function(){i.later(0,this,this.appendTo,B)})}}else{if(!A&&v&&v!=p){r=v.parentNode;if(r){this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:r});r.replaceChild(p,v);this.fireEvent("appendTo",{type:"appendTo",target:r})}}else{if(this.get("type")!="link"&&A&&v&&v==p){this._addListenersToForm()}}}this.fireEvent("init",{type:"init",target:this})},initAttributes:function(o){var n=o||{};YAHOO.widget.Button.superclass.initAttributes.call(this,n);this.setAttributeConfig("type",{value:(n.type||"push"),validator:i.isString,writeOnce:true,method:this._setType});this.setAttributeConfig("label",{value:n.label,validator:i.isString,method:this._setLabel});this.setAttributeConfig("value",{value:n.value});this.setAttributeConfig("name",{value:n.name,validator:i.isString});this.setAttributeConfig("tabindex",{value:n.tabindex,validator:i.isNumber,method:this._setTabIndex});this.configureAttribute("title",{value:n.title,validator:i.isString,method:this._setTitle});this.setAttributeConfig("disabled",{value:(n.disabled||false),validator:i.isBoolean,method:this._setDisabled});this.setAttributeConfig("href",{value:n.href,validator:i.isString,method:this._setHref});this.setAttributeConfig("target",{value:n.target,validator:i.isString,method:this._setTarget});this.setAttributeConfig("checked",{value:(n.checked||false),validator:i.isBoolean,method:this._setChecked});this.setAttributeConfig("container",{value:n.container,writeOnce:true});this.setAttributeConfig("srcelement",{value:n.srcelement,writeOnce:true});this.setAttributeConfig("menu",{value:null,method:this._setMenu,writeOnce:true});this.setAttributeConfig("lazyloadmenu",{value:(n.lazyloadmenu===false?false:true),validator:i.isBoolean,writeOnce:true});this.setAttributeConfig("menuclassname",{value:(n.menuclassname||"yui-button-menu"),validator:i.isString,method:this._setMenuClassName,writeOnce:true});this.setAttributeConfig("menuminscrollheight",{value:(n.menuminscrollheight||90),validator:i.isNumber});this.setAttributeConfig("menumaxheight",{value:(n.menumaxheight||0),validator:i.isNumber});this.setAttributeConfig("menualignment",{value:(n.menualignment||["tl","bl"]),validator:i.isArray});this.setAttributeConfig("selectedMenuItem",{value:null,method:this._setSelectedMenuItem});this.setAttributeConfig("onclick",{value:n.onclick,method:this._setOnClick});this.setAttributeConfig("focusmenu",{value:(n.focusmenu===false?false:true),validator:i.isBoolean})},focus:function(){if(!this.get("disabled")){this._button.focus()}},blur:function(){if(!this.get("disabled")){this._button.blur()}},hasFocus:function(){return(c==this)},isActive:function(){return this.hasClass(this.CSS_CLASS_NAME+"-active")},getMenu:function(){return this._menu},getForm:function(){var n=this._button,o;if(n){o=n.form}return o},getHiddenFields:function(){return this._hiddenFields},destroy:function(){var p=this.get("element"),o=p.parentNode,n=this._menu,r;if(n){if(k&&k.find(n)){k.remove(n)}n.destroy()}m.purgeElement(p);m.purgeElement(this._button);m.removeListener(document,"mouseup",this._onDocumentMouseUp);m.removeListener(document,"keyup",this._onDocumentKeyUp);m.removeListener(document,"mousedown",this._onDocumentMouseDown);var q=this.getForm();if(q){m.removeListener(q,"reset",this._onFormReset);m.removeListener(q,"submit",this._onFormSubmit)}this.unsubscribeAll();if(o){o.removeChild(p)}delete d[this.get("id")];r=g.getElementsByClassName(this.CSS_CLASS_NAME,this.NODE_NAME,q);if(i.isArray(r)&&r.length===0){m.removeListener(q,"keypress",YAHOO.widget.Button.onFormKeyPress)}},fireEvent:function(o,n){var p=arguments[0];if(this.DOM_EVENTS[p]&&this.get("disabled")){return false}return YAHOO.widget.Button.superclass.fireEvent.apply(this,arguments)},toString:function(){return("Button "+this.get("id"))}});YAHOO.widget.Button.onFormKeyPress=function(r){var p=m.getTarget(r),s=m.getCharCode(r),q=p.nodeName&&p.nodeName.toUpperCase(),n=p.type,t=false,v,x,o,w;function u(A){var z,y;switch(A.nodeName.toUpperCase()){case"INPUT":case"BUTTON":if(A.type=="submit"&&!A.disabled){if(!t&&!o){o=A}}break;default:z=A.id;if(z){v=d[z];if(v){t=true;if(!v.get("disabled")){y=v.get("srcelement");if(!x&&(v.get("type")=="submit"||(y&&y.type=="submit"))){x=v}}}}break}}if(s==13&&((q=="INPUT"&&(n=="text"||n=="password"||n=="checkbox"||n=="radio"||n=="file"))||q=="SELECT")){g.getElementsBy(u,"*",this);if(o){o.focus()}else{if(!o&&x){m.preventDefault(r);if(l.ie){x.get("element").fireEvent("onclick")}else{w=document.createEvent("HTMLEvents");w.initEvent("click",true,true);if(l.gecko<1.9){x.fireEvent("click",w)}else{x.get("element").dispatchEvent(w)}}}}}};YAHOO.widget.Button.addHiddenFieldsToForm=function(n){var s=g.getElementsByClassName(YAHOO.widget.Button.prototype.CSS_CLASS_NAME,"*",n),q=s.length,r,o,p;if(q>0){for(p=0;p<q;p++){o=s[p].id;if(o){r=d[o];if(r){r.createHiddenFields()}}}}};YAHOO.widget.Button.getButton=function(n){return d[n]}})();(function(){var c=YAHOO.util.Dom,b=YAHOO.util.Event,d=YAHOO.lang,a=YAHOO.widget.Button,e={};YAHOO.widget.ButtonGroup=function(j,h){var i=YAHOO.widget.ButtonGroup.superclass.constructor,k,g,f;if(arguments.length==1&&!d.isString(j)&&!j.nodeName){if(!j.id){f=c.generateId();j.id=f}i.call(this,(this._createGroupElement()),j)}else{if(d.isString(j)){g=c.get(j);if(g){if(g.nodeName.toUpperCase()==this.NODE_NAME){i.call(this,g,h)}}}else{k=j.nodeName.toUpperCase();if(k&&k==this.NODE_NAME){if(!j.id){j.id=c.generateId()}i.call(this,j,h)}}}};YAHOO.extend(YAHOO.widget.ButtonGroup,YAHOO.util.Element,{_buttons:null,NODE_NAME:"DIV",CSS_CLASS_NAME:"yui-buttongroup",_createGroupElement:function(){var f=document.createElement(this.NODE_NAME);return f},_setDisabled:function(g){var h=this.getCount(),f;if(h>0){f=h-1;do{this._buttons[f].set("disabled",g)}while(f--)}},_onKeyDown:function(k){var g=b.getTarget(k),i=b.getCharCode(k),h=g.parentNode.parentNode.id,j=e[h],f=-1;if(i==37||i==38){f=(j.index===0)?(this._buttons.length-1):(j.index-1)}else{if(i==39||i==40){f=(j.index===(this._buttons.length-1))?0:(j.index+1)}}if(f>-1){this.check(f);this.getButton(f).focus()}},_onAppendTo:function(h){var j=this._buttons,g=j.length,f;for(f=0;f<g;f++){j[f].appendTo(this.get("element"))}},_onButtonCheckedChange:function(g,f){var i=g.newValue,h=this.get("checkedButton");if(i&&h!=f){if(h){h.set("checked",false,true)}this.set("checkedButton",f);this.set("value",f.get("value"))}else{if(h&&!h.set("checked")){h.set("checked",true,true)}}},init:function(i,h){this._buttons=[];YAHOO.widget.ButtonGroup.superclass.init.call(this,i,h);this.addClass(this.CSS_CLASS_NAME);var j=this.getElementsByClassName("yui-radio-button");if(j.length>0){this.addButtons(j)}function f(k){return(k.type=="radio")}j=c.getElementsBy(f,"input",this.get("element"));if(j.length>0){this.addButtons(j)}this.on("keydown",this._onKeyDown);this.on("appendTo",this._onAppendTo);var g=this.get("container");if(g){if(d.isString(g)){b.onContentReady(g,function(){this.appendTo(g)},null,this)}else{this.appendTo(g)}}},initAttributes:function(g){var f=g||{};YAHOO.widget.ButtonGroup.superclass.initAttributes.call(this,f);this.setAttributeConfig("name",{value:f.name,validator:d.isString});this.setAttributeConfig("disabled",{value:(f.disabled||false),validator:d.isBoolean,method:this._setDisabled});this.setAttributeConfig("value",{value:f.value});this.setAttributeConfig("container",{value:f.container,writeOnce:true});this.setAttributeConfig("checkedButton",{value:null})},addButton:function(j){var l,k,g,f,h,i;if(j instanceof a&&j.get("type")=="radio"){l=j}else{if(!d.isString(j)&&!j.nodeName){j.type="radio";l=new a(j)}else{l=new a(j,{type:"radio"})}}if(l){f=this._buttons.length;h=l.get("name");i=this.get("name");l.index=f;this._buttons[f]=l;e[l.get("id")]=l;if(h!=i){l.set("name",i)}if(this.get("disabled")){l.set("disabled",true)}if(l.get("checked")){this.set("checkedButton",l)}k=l.get("element");g=this.get("element");if(k.parentNode!=g){g.appendChild(k)}l.on("checkedChange",this._onButtonCheckedChange,l,this)}return l},addButtons:function(g){var h,j,k,f;if(d.isArray(g)){h=g.length;k=[];if(h>0){for(f=0;f<h;f++){j=this.addButton(g[f]);if(j){k[k.length]=j}}}}return k},removeButton:function(h){var j=this.getButton(h),g,f;if(j){this._buttons.splice(h,1);delete e[j.get("id")];j.removeListener("checkedChange",this._onButtonCheckedChange);j.destroy();g=this._buttons.length;if(g>0){f=this._buttons.length-1;do{this._buttons[f].index=f}while(f--)}}},getButton:function(f){return this._buttons[f]},getButtons:function(){return this._buttons},getCount:function(){return this._buttons.length},focus:function(h){var j,g,f;if(d.isNumber(h)){j=this._buttons[h];if(j){j.focus()}}else{g=this.getCount();for(f=0;f<g;f++){j=this._buttons[f];if(!j.get("disabled")){j.focus();break}}}},check:function(f){var g=this.getButton(f);if(g){g.set("checked",true)}},destroy:function(){var j=this._buttons.length,h=this.get("element"),f=h.parentNode,g;if(j>0){g=this._buttons.length-1;do{this._buttons[g].destroy()}while(g--)}b.purgeElement(h);f.removeChild(h)},toString:function(){return("ButtonGroup "+this.get("id"))}})})();YAHOO.register("button",YAHOO.widget.Button,{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.Dom,A=YAHOO.util.Event,C=YAHOO.lang;if(YAHOO.widget.Button){YAHOO.widget.ToolbarButtonAdvanced=YAHOO.widget.Button;YAHOO.widget.ToolbarButtonAdvanced.prototype.buttonType="rich";YAHOO.widget.ToolbarButtonAdvanced.prototype.checkValue=function(F){var E=this.getMenu().getItems();if(E.length===0){this.getMenu()._onBeforeShow();E=this.getMenu().getItems();}for(var D=0;D<E.length;D++){E[D].cfg.setProperty("checked",false);if(E[D].value==F){E[D].cfg.setProperty("checked",true);}}};}else{YAHOO.widget.ToolbarButtonAdvanced=function(){};}YAHOO.widget.ToolbarButton=function(E,D){if(C.isObject(arguments[0])&&!B.get(E).nodeType){D=E;}var G=(D||{});var F={element:null,attributes:G};if(!F.attributes.type){F.attributes.type="push";}F.element=document.createElement("span");F.element.setAttribute("unselectable","on");F.element.className="yui-button yui-"+F.attributes.type+"-button";F.element.innerHTML='<span class="first-child"><a href="#">LABEL</a></span>';F.element.firstChild.firstChild.tabIndex="-1";F.attributes.id=B.generateId();YAHOO.widget.ToolbarButton.superclass.constructor.call(this,F.element,F.attributes);};YAHOO.extend(YAHOO.widget.ToolbarButton,YAHOO.util.Element,{buttonType:"normal",_handleMouseOver:function(){if(!this.get("disabled")){this.addClass("yui-button-hover");this.addClass("yui-"+this.get("type")+"-button-hover");}},_handleMouseOut:function(){this.removeClass("yui-button-hover");this.removeClass("yui-"+this.get("type")+"-button-hover");},checkValue:function(F){if(this.get("type")=="menu"){var E=this._button.options;for(var D=0;D<E.length;D++){if(E[D].value==F){E.selectedIndex=D;}}}},init:function(E,D){YAHOO.widget.ToolbarButton.superclass.init.call(this,E,D);this.on("mouseover",this._handleMouseOver,this,true);this.on("mouseout",this._handleMouseOut,this,true);},initAttributes:function(D){YAHOO.widget.ToolbarButton.superclass.initAttributes.call(this,D);this.setAttributeConfig("value",{value:D.value});this.setAttributeConfig("menu",{value:D.menu||false});this.setAttributeConfig("type",{value:D.type,writeOnce:true,method:function(H){var G,F;if(!this._button){this._button=this.get("element").getElementsByTagName("a")[0];}switch(H){case"select":case"menu":G=document.createElement("select");var I=this.get("menu");for(var E=0;E<I.length;E++){F=document.createElement("option");F.innerHTML=I[E].text;F.value=I[E].value;if(I[E].checked){F.selected=true;}G.appendChild(F);}this._button.parentNode.replaceChild(G,this._button);A.on(G,"change",this._handleSelect,this,true);this._button=G;break;}}});this.setAttributeConfig("disabled",{value:D.disabled||false,method:function(E){if(E){this.addClass("yui-button-disabled");this.addClass("yui-"+this.get("type")+"-button-disabled");}else{this.removeClass("yui-button-disabled");this.removeClass("yui-"+this.get("type")+"-button-disabled");}if(this.get("type")=="menu"){this._button.disabled=E;}}});this.setAttributeConfig("label",{value:D.label,method:function(E){if(!this._button){this._button=this.get("element").getElementsByTagName("a")[0];}if(this.get("type")=="push"){this._button.innerHTML=E;}}});this.setAttributeConfig("title",{value:D.title});this.setAttributeConfig("container",{value:null,writeOnce:true,method:function(E){this.appendTo(E);}});},_handleSelect:function(E){var D=A.getTarget(E);var F=D.options[D.selectedIndex].value;this.fireEvent("change",{type:"change",value:F});},getMenu:function(){return this.get("menu");},destroy:function(){A.purgeElement(this.get("element"),true);this.get("element").parentNode.removeChild(this.get("element"));for(var D in this){if(C.hasOwnProperty(this,D)){this[D]=null;}}},fireEvent:function(E,D){if(this.DOM_EVENTS[E]&&this.get("disabled")){return ;}YAHOO.widget.ToolbarButton.superclass.fireEvent.call(this,E,D);},toString:function(){return"ToolbarButton ("+this.get("id")+")";}});})();(function(){var C=YAHOO.util.Dom,A=YAHOO.util.Event,D=YAHOO.lang;var B=function(F){var E=F;if(D.isString(F)){E=this.getButtonById(F);}if(D.isNumber(F)){E=this.getButtonByIndex(F);}if((!(E instanceof YAHOO.widget.ToolbarButton))&&(!(E instanceof YAHOO.widget.ToolbarButtonAdvanced))){E=this.getButtonByValue(F);}if((E instanceof YAHOO.widget.ToolbarButton)||(E instanceof YAHOO.widget.ToolbarButtonAdvanced)){return E;}return false;};YAHOO.widget.Toolbar=function(I,H){if(D.isObject(arguments[0])&&!C.get(I).nodeType){H=I;}var K={};if(H){D.augmentObject(K,H);}var J={element:null,attributes:K};if(D.isString(I)&&C.get(I)){J.element=C.get(I);}else{if(D.isObject(I)&&C.get(I)&&C.get(I).nodeType){J.element=C.get(I);}}if(!J.element){J.element=document.createElement("DIV");J.element.id=C.generateId();if(K.container&&C.get(K.container)){C.get(K.container).appendChild(J.element);}}if(!J.element.id){J.element.id=((D.isString(I))?I:C.generateId());}var F=document.createElement("fieldset");var G=document.createElement("legend");G.innerHTML="Toolbar";F.appendChild(G);var E=document.createElement("DIV");J.attributes.cont=E;C.addClass(E,"yui-toolbar-subcont");F.appendChild(E);J.element.appendChild(F);J.element.tabIndex=-1;J.attributes.element=J.element;J.attributes.id=J.element.id;YAHOO.widget.Toolbar.superclass.constructor.call(this,J.element,J.attributes);};YAHOO.extend(YAHOO.widget.Toolbar,YAHOO.util.Element,{_addMenuClasses:function(H,E,I){C.addClass(this.element,"yui-toolbar-"+I.get("value")+"-menu");if(C.hasClass(I._button.parentNode.parentNode,"yui-toolbar-select")){C.addClass(this.element,"yui-toolbar-select-menu");}var F=this.getItems();for(var G=0;G<F.length;G++){C.addClass(F[G].element,"yui-toolbar-"+I.get("value")+"-"+((F[G].value)?F[G].value.replace(/ /g,"-").toLowerCase():F[G]._oText.nodeValue.replace(/ /g,"-").toLowerCase()));C.addClass(F[G].element,"yui-toolbar-"+I.get("value")+"-"+((F[G].value)?F[G].value.replace(/ /g,"-"):F[G]._oText.nodeValue.replace(/ /g,"-")));}},buttonType:YAHOO.widget.ToolbarButton,dd:null,_colorData:{"#111111":"Obsidian","#2D2D2D":"Dark Gray","#434343":"Shale","#5B5B5B":"Flint","#737373":"Gray","#8B8B8B":"Concrete","#A2A2A2":"Gray","#B9B9B9":"Titanium","#000000":"Black","#D0D0D0":"Light Gray","#E6E6E6":"Silver","#FFFFFF":"White","#BFBF00":"Pumpkin","#FFFF00":"Yellow","#FFFF40":"Banana","#FFFF80":"Pale Yellow","#FFFFBF":"Butter","#525330":"Raw Siena","#898A49":"Mildew","#AEA945":"Olive","#7F7F00":"Paprika","#C3BE71":"Earth","#E0DCAA":"Khaki","#FCFAE1":"Cream","#60BF00":"Cactus","#80FF00":"Chartreuse","#A0FF40":"Green","#C0FF80":"Pale Lime","#DFFFBF":"Light Mint","#3B5738":"Green","#668F5A":"Lime Gray","#7F9757":"Yellow","#407F00":"Clover","#8A9B55":"Pistachio","#B7C296":"Light Jade","#E6EBD5":"Breakwater","#00BF00":"Spring Frost","#00FF80":"Pastel Green","#40FFA0":"Light Emerald","#80FFC0":"Sea Foam","#BFFFDF":"Sea Mist","#033D21":"Dark Forrest","#438059":"Moss","#7FA37C":"Medium Green","#007F40":"Pine","#8DAE94":"Yellow Gray Green","#ACC6B5":"Aqua Lung","#DDEBE2":"Sea Vapor","#00BFBF":"Fog","#00FFFF":"Cyan","#40FFFF":"Turquoise Blue","#80FFFF":"Light Aqua","#BFFFFF":"Pale Cyan","#033D3D":"Dark Teal","#347D7E":"Gray Turquoise","#609A9F":"Green Blue","#007F7F":"Seaweed","#96BDC4":"Green Gray","#B5D1D7":"Soapstone","#E2F1F4":"Light Turquoise","#0060BF":"Summer Sky","#0080FF":"Sky Blue","#40A0FF":"Electric Blue","#80C0FF":"Light Azure","#BFDFFF":"Ice Blue","#1B2C48":"Navy","#385376":"Biscay","#57708F":"Dusty Blue","#00407F":"Sea Blue","#7792AC":"Sky Blue Gray","#A8BED1":"Morning Sky","#DEEBF6":"Vapor","#0000BF":"Deep Blue","#0000FF":"Blue","#4040FF":"Cerulean Blue","#8080FF":"Evening Blue","#BFBFFF":"Light Blue","#212143":"Deep Indigo","#373E68":"Sea Blue","#444F75":"Night Blue","#00007F":"Indigo Blue","#585E82":"Dockside","#8687A4":"Blue Gray","#D2D1E1":"Light Blue Gray","#6000BF":"Neon Violet","#8000FF":"Blue Violet","#A040FF":"Violet Purple","#C080FF":"Violet Dusk","#DFBFFF":"Pale Lavender","#302449":"Cool Shale","#54466F":"Dark Indigo","#655A7F":"Dark Violet","#40007F":"Violet","#726284":"Smoky Violet","#9E8FA9":"Slate Gray","#DCD1DF":"Violet White","#BF00BF":"Royal Violet","#FF00FF":"Fuchsia","#FF40FF":"Magenta","#FF80FF":"Orchid","#FFBFFF":"Pale Magenta","#4A234A":"Dark Purple","#794A72":"Medium Purple","#936386":"Cool Granite","#7F007F":"Purple","#9D7292":"Purple Moon","#C0A0B6":"Pale Purple","#ECDAE5":"Pink Cloud","#BF005F":"Hot Pink","#FF007F":"Deep Pink","#FF409F":"Grape","#FF80BF":"Electric Pink","#FFBFDF":"Pink","#451528":"Purple Red","#823857":"Purple Dino","#A94A76":"Purple Gray","#7F003F":"Rose","#BC6F95":"Antique Mauve","#D8A5BB":"Cool Marble","#F7DDE9":"Pink Granite","#C00000":"Apple","#FF0000":"Fire Truck","#FF4040":"Pale Red","#FF8080":"Salmon","#FFC0C0":"Warm Pink","#441415":"Sepia","#82393C":"Rust","#AA4D4E":"Brick","#800000":"Brick Red","#BC6E6E":"Mauve","#D8A3A4":"Shrimp Pink","#F8DDDD":"Shell Pink","#BF5F00":"Dark Orange","#FF7F00":"Orange","#FF9F40":"Grapefruit","#FFBF80":"Canteloupe","#FFDFBF":"Wax","#482C1B":"Dark Brick","#855A40":"Dirt","#B27C51":"Tan","#7F3F00":"Nutmeg","#C49B71":"Mustard","#E1C4A8":"Pale Tan","#FDEEE0":"Marble"},_colorPicker:null,STR_COLLAPSE:"Collapse Toolbar",STR_SPIN_LABEL:"Spin Button with value {VALUE}. Use Control Shift Up Arrow and Control Shift Down arrow keys to increase or decrease the value.",STR_SPIN_UP:"Click to increase the value of this input",STR_SPIN_DOWN:"Click to decrease the value of this input",_titlebar:null,browser:YAHOO.env.ua,_buttonList:null,_buttonGroupList:null,_sep:null,_sepCount:null,_dragHandle:null,_toolbarConfigs:{renderer:true},CLASS_CONTAINER:"yui-toolbar-container",CLASS_DRAGHANDLE:"yui-toolbar-draghandle",CLASS_SEPARATOR:"yui-toolbar-separator",CLASS_DISABLED:"yui-toolbar-disabled",CLASS_PREFIX:"yui-toolbar",init:function(F,E){YAHOO.widget.Toolbar.superclass.init.call(this,F,E);
},initAttributes:function(E){YAHOO.widget.Toolbar.superclass.initAttributes.call(this,E);this.addClass(this.CLASS_CONTAINER);this.setAttributeConfig("buttonType",{value:E.buttonType||"basic",writeOnce:true,validator:function(F){switch(F){case"advanced":case"basic":return true;}return false;},method:function(F){if(F=="advanced"){if(YAHOO.widget.Button){this.buttonType=YAHOO.widget.ToolbarButtonAdvanced;}else{this.buttonType=YAHOO.widget.ToolbarButton;}}else{this.buttonType=YAHOO.widget.ToolbarButton;}}});this.setAttributeConfig("buttons",{value:[],writeOnce:true,method:function(G){for(var F in G){if(D.hasOwnProperty(G,F)){if(G[F].type=="separator"){this.addSeparator();}else{if(G[F].group!==undefined){this.addButtonGroup(G[F]);}else{this.addButton(G[F]);}}}}}});this.setAttributeConfig("disabled",{value:false,method:function(F){if(this.get("disabled")===F){return false;}if(F){this.addClass(this.CLASS_DISABLED);this.set("draggable",false);this.disableAllButtons();}else{this.removeClass(this.CLASS_DISABLED);if(this._configs.draggable._initialConfig.value){this.set("draggable",true);}this.resetAllButtons();}}});this.setAttributeConfig("cont",{value:E.cont,readOnly:true});this.setAttributeConfig("grouplabels",{value:((E.grouplabels===false)?false:true),method:function(F){if(F){C.removeClass(this.get("cont"),(this.CLASS_PREFIX+"-nogrouplabels"));}else{C.addClass(this.get("cont"),(this.CLASS_PREFIX+"-nogrouplabels"));}}});this.setAttributeConfig("titlebar",{value:false,method:function(G){if(G){if(this._titlebar&&this._titlebar.parentNode){this._titlebar.parentNode.removeChild(this._titlebar);}this._titlebar=document.createElement("DIV");this._titlebar.tabIndex="-1";A.on(this._titlebar,"focus",function(){this._handleFocus();},this,true);C.addClass(this._titlebar,this.CLASS_PREFIX+"-titlebar");if(D.isString(G)){var F=document.createElement("h2");F.tabIndex="-1";F.innerHTML='<a href="#" tabIndex="0">'+G+"</a>";this._titlebar.appendChild(F);A.on(F.firstChild,"click",function(H){A.stopEvent(H);});A.on([F,F.firstChild],"focus",function(){this._handleFocus();},this,true);}if(this.get("firstChild")){this.insertBefore(this._titlebar,this.get("firstChild"));}else{this.appendChild(this._titlebar);}if(this.get("collapse")){this.set("collapse",true);}}else{if(this._titlebar){if(this._titlebar&&this._titlebar.parentNode){this._titlebar.parentNode.removeChild(this._titlebar);}}}}});this.setAttributeConfig("collapse",{value:false,method:function(H){if(this._titlebar){var G=null;var F=C.getElementsByClassName("collapse","span",this._titlebar);if(H){if(F.length>0){return true;}G=document.createElement("SPAN");G.innerHTML="X";G.title=this.STR_COLLAPSE;C.addClass(G,"collapse");this._titlebar.appendChild(G);A.addListener(G,"click",function(){if(C.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false);}else{this.collapse();}},this,true);}else{G=C.getElementsByClassName("collapse","span",this._titlebar);if(G[0]){if(C.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false);}G[0].parentNode.removeChild(G[0]);}}}}});this.setAttributeConfig("draggable",{value:(E.draggable||false),method:function(F){if(F&&!this.get("titlebar")){if(!this._dragHandle){this._dragHandle=document.createElement("SPAN");this._dragHandle.innerHTML="|";this._dragHandle.setAttribute("title","Click to drag the toolbar");this._dragHandle.id=this.get("id")+"_draghandle";C.addClass(this._dragHandle,this.CLASS_DRAGHANDLE);if(this.get("cont").hasChildNodes()){this.get("cont").insertBefore(this._dragHandle,this.get("cont").firstChild);}else{this.get("cont").appendChild(this._dragHandle);}this.dd=new YAHOO.util.DD(this.get("id"));this.dd.setHandleElId(this._dragHandle.id);}}else{if(this._dragHandle){this._dragHandle.parentNode.removeChild(this._dragHandle);this._dragHandle=null;this.dd=null;}}if(this._titlebar){if(F){this.dd=new YAHOO.util.DD(this.get("id"));this.dd.setHandleElId(this._titlebar);C.addClass(this._titlebar,"draggable");}else{C.removeClass(this._titlebar,"draggable");if(this.dd){this.dd.unreg();this.dd=null;}}}},validator:function(G){var F=true;if(!YAHOO.util.DD){F=false;}return F;}});},addButtonGroup:function(I){if(!this.get("element")){this._queue[this._queue.length]=["addButtonGroup",arguments];return false;}if(!this.hasClass(this.CLASS_PREFIX+"-grouped")){this.addClass(this.CLASS_PREFIX+"-grouped");}var J=document.createElement("DIV");C.addClass(J,this.CLASS_PREFIX+"-group");C.addClass(J,this.CLASS_PREFIX+"-group-"+I.group);if(I.label){var F=document.createElement("h3");F.innerHTML=I.label;J.appendChild(F);}if(!this.get("grouplabels")){C.addClass(this.get("cont"),this.CLASS_PREFIX,"-nogrouplabels");}this.get("cont").appendChild(J);var H=document.createElement("ul");J.appendChild(H);if(!this._buttonGroupList){this._buttonGroupList={};}this._buttonGroupList[I.group]=H;for(var G=0;G<I.buttons.length;G++){var E=document.createElement("li");E.className=this.CLASS_PREFIX+"-groupitem";H.appendChild(E);if((I.buttons[G].type!==undefined)&&I.buttons[G].type=="separator"){this.addSeparator(E);}else{I.buttons[G].container=E;this.addButton(I.buttons[G]);}}},addButtonToGroup:function(G,H,I){var F=this._buttonGroupList[H];var E=document.createElement("li");E.className=this.CLASS_PREFIX+"-groupitem";G.container=E;this.addButton(G,I);F.appendChild(E);},addButton:function(J,I){if(!this.get("element")){this._queue[this._queue.length]=["addButton",arguments];return false;}if(!this._buttonList){this._buttonList=[];}if(!J.container){J.container=this.get("cont");}if((J.type=="menu")||(J.type=="split")||(J.type=="select")){if(D.isArray(J.menu)){for(var P in J.menu){if(D.hasOwnProperty(J.menu,P)){var V={fn:function(Y,W,X){if(!J.menucmd){J.menucmd=J.value;}J.value=((X.value)?X.value:X._oText.nodeValue);},scope:this};J.menu[P].onclick=V;}}}}var Q={},N=false;for(var L in J){if(D.hasOwnProperty(J,L)){if(!this._toolbarConfigs[L]){Q[L]=J[L];}}}if(J.type=="select"){Q.type="menu";}if(J.type=="spin"){Q.type="push";
}if(Q.type=="color"){if(YAHOO.widget.Overlay){Q=this._makeColorButton(Q);}else{N=true;}}if(Q.menu){if((YAHOO.widget.Overlay)&&(J.menu instanceof YAHOO.widget.Overlay)){J.menu.showEvent.subscribe(function(){this._button=Q;});}else{for(var O=0;O<Q.menu.length;O++){if(!Q.menu[O].value){Q.menu[O].value=Q.menu[O].text;}}if(this.browser.webkit){Q.focusmenu=false;}}}if(N){J=false;}else{this._configs.buttons.value[this._configs.buttons.value.length]=J;var T=new this.buttonType(Q);T.get("element").tabIndex="-1";T.get("element").setAttribute("role","button");T._selected=true;if(this.get("disabled")){T.set("disabled",true);}if(!J.id){J.id=T.get("id");}if(I){var F=T.get("element");var M=null;if(I.get){M=I.get("element").nextSibling;}else{if(I.nextSibling){M=I.nextSibling;}}if(M){M.parentNode.insertBefore(F,M);}}T.addClass(this.CLASS_PREFIX+"-"+T.get("value"));var S=document.createElement("span");S.className=this.CLASS_PREFIX+"-icon";T.get("element").insertBefore(S,T.get("firstChild"));if(T._button.tagName.toLowerCase()=="button"){T.get("element").setAttribute("unselectable","on");var U=document.createElement("a");U.innerHTML=T._button.innerHTML;U.href="#";U.tabIndex="-1";A.on(U,"click",function(W){A.stopEvent(W);});T._button.parentNode.replaceChild(U,T._button);T._button=U;}if(J.type=="select"){if(T._button.tagName.toLowerCase()=="select"){S.parentNode.removeChild(S);var G=T._button;var R=T.get("element");R.parentNode.replaceChild(G,R);}else{T.addClass(this.CLASS_PREFIX+"-select");}}if(J.type=="spin"){if(!D.isArray(J.range)){J.range=[10,100];}this._makeSpinButton(T,J);}T.get("element").setAttribute("title",T.get("label"));if(J.type!="spin"){if((YAHOO.widget.Overlay)&&(Q.menu instanceof YAHOO.widget.Overlay)){var H=function(Y){var W=true;if(Y.keyCode&&(Y.keyCode==9)){W=false;}if(W){if(this._colorPicker){this._colorPicker._button=J.value;}var X=T.getMenu().element;if(C.getStyle(X,"visibility")=="hidden"){T.getMenu().show();}else{T.getMenu().hide();}}YAHOO.util.Event.stopEvent(Y);};T.on("mousedown",H,J,this);T.on("keydown",H,J,this);}else{if((J.type!="menu")&&(J.type!="select")){T.on("keypress",this._buttonClick,J,this);T.on("mousedown",function(W){YAHOO.util.Event.stopEvent(W);this._buttonClick(W,J);},J,this);T.on("click",function(W){YAHOO.util.Event.stopEvent(W);});}else{T.on("mousedown",function(W){YAHOO.util.Event.stopEvent(W);});T.on("click",function(W){YAHOO.util.Event.stopEvent(W);});T.on("change",function(W){if(!J.menucmd){J.menucmd=J.value;}J.value=W.value;this._buttonClick(W,J);},this,true);var K=this;T.on("appendTo",function(){var W=this;if(W.getMenu()&&W.getMenu().mouseDownEvent){W.getMenu().mouseDownEvent.subscribe(function(Z,Y){var X=Y[1];YAHOO.util.Event.stopEvent(Y[0]);W._onMenuClick(Y[0],W);if(!J.menucmd){J.menucmd=J.value;}J.value=((X.value)?X.value:X._oText.nodeValue);K._buttonClick.call(K,Y[1],J);W._hideMenu();return false;});W.getMenu().clickEvent.subscribe(function(Y,X){YAHOO.util.Event.stopEvent(X[0]);});W.getMenu().mouseUpEvent.subscribe(function(Y,X){YAHOO.util.Event.stopEvent(X[0]);});}});}}}else{T.on("mousedown",function(W){YAHOO.util.Event.stopEvent(W);});T.on("click",function(W){YAHOO.util.Event.stopEvent(W);});}if(this.browser.ie){}if(this.browser.webkit){T.hasFocus=function(){return true;};}this._buttonList[this._buttonList.length]=T;if((J.type=="menu")||(J.type=="split")||(J.type=="select")){if(D.isArray(J.menu)){var E=T.getMenu();if(E&&E.renderEvent){E.renderEvent.subscribe(this._addMenuClasses,T);if(J.renderer){E.renderEvent.subscribe(J.renderer,T);}}}}}return J;},addSeparator:function(E,H){if(!this.get("element")){this._queue[this._queue.length]=["addSeparator",arguments];return false;}var F=((E)?E:this.get("cont"));if(!this.get("element")){this._queue[this._queue.length]=["addSeparator",arguments];return false;}if(this._sepCount===null){this._sepCount=0;}if(!this._sep){this._sep=document.createElement("SPAN");C.addClass(this._sep,this.CLASS_SEPARATOR);this._sep.innerHTML="|";}var G=this._sep.cloneNode(true);this._sepCount++;C.addClass(G,this.CLASS_SEPARATOR+"-"+this._sepCount);if(H){var I=null;if(H.get){I=H.get("element").nextSibling;}else{if(H.nextSibling){I=H.nextSibling;}else{I=H;}}if(I){if(I==H){I.parentNode.appendChild(G);}else{I.parentNode.insertBefore(G,I);}}}else{F.appendChild(G);}return G;},_createColorPicker:function(H){if(C.get(H+"_colors")){C.get(H+"_colors").parentNode.removeChild(C.get(H+"_colors"));}var E=document.createElement("div");E.className="yui-toolbar-colors";E.id=H+"_colors";E.style.display="none";A.on(window,"load",function(){document.body.appendChild(E);},this,true);this._colorPicker=E;var G="";for(var F in this._colorData){if(D.hasOwnProperty(this._colorData,F)){G+='<a style="background-color: '+F+'" href="#">'+F.replace("#","")+"</a>";}}G+="<span><em>X</em><strong></strong></span>";window.setTimeout(function(){E.innerHTML=G;},0);A.on(E,"mouseover",function(M){var K=this._colorPicker;var L=K.getElementsByTagName("em")[0];var J=K.getElementsByTagName("strong")[0];var I=A.getTarget(M);if(I.tagName.toLowerCase()=="a"){L.style.backgroundColor=I.style.backgroundColor;J.innerHTML=this._colorData["#"+I.innerHTML]+"<br>"+I.innerHTML;}},this,true);A.on(E,"focus",function(I){A.stopEvent(I);});A.on(E,"click",function(I){A.stopEvent(I);});A.on(E,"mousedown",function(J){A.stopEvent(J);var I=A.getTarget(J);if(I.tagName.toLowerCase()=="a"){var L=this.fireEvent("colorPickerClicked",{type:"colorPickerClicked",target:this,button:this._colorPicker._button,color:I.innerHTML,colorName:this._colorData["#"+I.innerHTML]});if(L!==false){var K={color:I.innerHTML,colorName:this._colorData["#"+I.innerHTML],value:this._colorPicker._button};this.fireEvent("buttonClick",{type:"buttonClick",target:this.get("element"),button:K});}this.getButtonByValue(this._colorPicker._button).getMenu().hide();}},this,true);},_resetColorPicker:function(){var F=this._colorPicker.getElementsByTagName("em")[0];var E=this._colorPicker.getElementsByTagName("strong")[0];F.style.backgroundColor="transparent";
E.innerHTML="";},_makeColorButton:function(E){if(!this._colorPicker){this._createColorPicker(this.get("id"));}E.type="color";E.menu=new YAHOO.widget.Overlay(this.get("id")+"_"+E.value+"_menu",{visible:false,position:"absolute",iframe:true});E.menu.setBody("");E.menu.render(this.get("cont"));C.addClass(E.menu.element,"yui-button-menu");C.addClass(E.menu.element,"yui-color-button-menu");E.menu.beforeShowEvent.subscribe(function(){E.menu.cfg.setProperty("zindex",5);E.menu.cfg.setProperty("context",[this.getButtonById(E.id).get("element"),"tl","bl"]);this._resetColorPicker();var F=this._colorPicker;if(F.parentNode){F.parentNode.removeChild(F);}E.menu.setBody("");E.menu.appendToBody(F);this._colorPicker.style.display="block";},this,true);return E;},_makeSpinButton:function(R,L){R.addClass(this.CLASS_PREFIX+"-spinbutton");var S=this,N=R._button.parentNode.parentNode,I=L.range,H=document.createElement("a"),G=document.createElement("a");H.href="#";G.href="#";H.tabIndex="-1";G.tabIndex="-1";H.className="up";H.title=this.STR_SPIN_UP;H.innerHTML=this.STR_SPIN_UP;G.className="down";G.title=this.STR_SPIN_DOWN;G.innerHTML=this.STR_SPIN_DOWN;N.appendChild(H);N.appendChild(G);var M=YAHOO.lang.substitute(this.STR_SPIN_LABEL,{VALUE:R.get("label")});R.set("title",M);var Q=function(T){T=((T<I[0])?I[0]:T);T=((T>I[1])?I[1]:T);return T;};var P=this.browser;var F=false;var K=this.STR_SPIN_LABEL;if(this._titlebar&&this._titlebar.firstChild){F=this._titlebar.firstChild;}var E=function(U){YAHOO.util.Event.stopEvent(U);if(!R.get("disabled")&&(U.keyCode!=9)){var V=parseInt(R.get("label"),10);V++;V=Q(V);R.set("label",""+V);var T=YAHOO.lang.substitute(K,{VALUE:R.get("label")});R.set("title",T);if(!P.webkit&&F){}S._buttonClick(U,L);}};var O=function(U){YAHOO.util.Event.stopEvent(U);if(!R.get("disabled")&&(U.keyCode!=9)){var V=parseInt(R.get("label"),10);V--;V=Q(V);R.set("label",""+V);var T=YAHOO.lang.substitute(K,{VALUE:R.get("label")});R.set("title",T);if(!P.webkit&&F){}S._buttonClick(U,L);}};var J=function(T){if(T.keyCode==38){E(T);}else{if(T.keyCode==40){O(T);}else{if(T.keyCode==107&&T.shiftKey){E(T);}else{if(T.keyCode==109&&T.shiftKey){O(T);}}}}};R.on("keydown",J,this,true);A.on(H,"mousedown",function(T){A.stopEvent(T);},this,true);A.on(G,"mousedown",function(T){A.stopEvent(T);},this,true);A.on(H,"click",E,this,true);A.on(G,"click",O,this,true);},_buttonClick:function(L,F){var E=true;if(L&&L.type=="keypress"){if(L.keyCode==9){E=false;}else{if((L.keyCode===13)||(L.keyCode===0)||(L.keyCode===32)){}else{E=false;}}}if(E){var N=true,H=false;F.isSelected=this.isSelected(F.id);if(F.value){H=this.fireEvent(F.value+"Click",{type:F.value+"Click",target:this.get("element"),button:F});if(H===false){N=false;}}if(F.menucmd&&N){H=this.fireEvent(F.menucmd+"Click",{type:F.menucmd+"Click",target:this.get("element"),button:F});if(H===false){N=false;}}if(N){this.fireEvent("buttonClick",{type:"buttonClick",target:this.get("element"),button:F});}if(F.type=="select"){var K=this.getButtonById(F.id);if(K.buttonType=="rich"){var J=F.value;for(var I=0;I<F.menu.length;I++){if(F.menu[I].value==F.value){J=F.menu[I].text;break;}}K.set("label",'<span class="yui-toolbar-'+F.menucmd+"-"+(F.value).replace(/ /g,"-").toLowerCase()+'">'+J+"</span>");var M=K.getMenu().getItems();for(var G=0;G<M.length;G++){if(M[G].value.toLowerCase()==F.value.toLowerCase()){M[G].cfg.setProperty("checked",true);}else{M[G].cfg.setProperty("checked",false);}}}}if(L){A.stopEvent(L);}}},_keyNav:null,_navCounter:null,_navigateButtons:function(F){switch(F.keyCode){case 37:case 39:if(F.keyCode==37){this._navCounter--;}else{this._navCounter++;}if(this._navCounter>(this._buttonList.length-1)){this._navCounter=0;}if(this._navCounter<0){this._navCounter=(this._buttonList.length-1);}if(this._buttonList[this._navCounter]){var E=this._buttonList[this._navCounter].get("element");if(this.browser.ie){E=this._buttonList[this._navCounter].get("element").getElementsByTagName("a")[0];}if(this._buttonList[this._navCounter].get("disabled")){this._navigateButtons(F);}else{E.focus();}}break;}},_handleFocus:function(){if(!this._keyNav){var E="keypress";if(this.browser.ie){E="keydown";}A.on(this.get("element"),E,this._navigateButtons,this,true);this._keyNav=true;this._navCounter=-1;}},getButtonById:function(G){var E=this._buttonList.length;for(var F=0;F<E;F++){if(this._buttonList[F]&&this._buttonList[F].get("id")==G){return this._buttonList[F];}}return false;},getButtonByValue:function(K){var H=this.get("buttons");var F=H.length;for(var I=0;I<F;I++){if(H[I].group!==undefined){for(var E=0;E<H[I].buttons.length;E++){if((H[I].buttons[E].value==K)||(H[I].buttons[E].menucmd==K)){return this.getButtonById(H[I].buttons[E].id);}if(H[I].buttons[E].menu){for(var J=0;J<H[I].buttons[E].menu.length;J++){if(H[I].buttons[E].menu[J].value==K){return this.getButtonById(H[I].buttons[E].id);}}}}}else{if((H[I].value==K)||(H[I].menucmd==K)){return this.getButtonById(H[I].id);}if(H[I].menu){for(var G=0;G<H[I].menu.length;G++){if(H[I].menu[G].value==K){return this.getButtonById(H[I].id);}}}}}return false;},getButtonByIndex:function(E){if(this._buttonList[E]){return this._buttonList[E];}else{return false;}},getButtons:function(){return this._buttonList;},disableButton:function(F){var E=B.call(this,F);if(E){E.set("disabled",true);}else{return false;}},enableButton:function(F){if(this.get("disabled")){return false;}var E=B.call(this,F);if(E){if(E.get("disabled")){E.set("disabled",false);}}else{return false;}},isSelected:function(F){var E=B.call(this,F);if(E){return E._selected;}return false;},selectButton:function(I,G){var F=B.call(this,I);if(F){F.addClass("yui-button-selected");F.addClass("yui-button-"+F.get("value")+"-selected");F._selected=true;if(G){if(F.buttonType=="rich"){var H=F.getMenu().getItems();for(var E=0;E<H.length;E++){if(H[E].value==G){H[E].cfg.setProperty("checked",true);F.set("label",'<span class="yui-toolbar-'+F.get("value")+"-"+(G).replace(/ /g,"-").toLowerCase()+'">'+H[E]._oText.nodeValue+"</span>");}else{H[E].cfg.setProperty("checked",false);
}}}}}else{return false;}},deselectButton:function(F){var E=B.call(this,F);if(E){E.removeClass("yui-button-selected");E.removeClass("yui-button-"+E.get("value")+"-selected");E.removeClass("yui-button-hover");E._selected=false;}else{return false;}},deselectAllButtons:function(){var E=this._buttonList.length;for(var F=0;F<E;F++){this.deselectButton(this._buttonList[F]);}},disableAllButtons:function(){if(this.get("disabled")){return false;}var E=this._buttonList.length;for(var F=0;F<E;F++){this.disableButton(this._buttonList[F]);}},enableAllButtons:function(){if(this.get("disabled")){return false;}var E=this._buttonList.length;for(var F=0;F<E;F++){this.enableButton(this._buttonList[F]);}},resetAllButtons:function(I){if(!D.isObject(I)){I={};}if(this.get("disabled")){return false;}var E=this._buttonList.length;for(var F=0;F<E;F++){var H=this._buttonList[F];if(H){var G=H._configs.disabled._initialConfig.value;if(I[H.get("id")]){this.enableButton(H);this.selectButton(H);}else{if(G){this.disableButton(H);}else{this.enableButton(H);}this.deselectButton(H);}}}},destroyButton:function(I){var G=B.call(this,I);if(G){var H=G.get("id");G.destroy();var E=this._buttonList.length;for(var F=0;F<E;F++){if(this._buttonList[F]&&this._buttonList[F].get("id")==H){this._buttonList[F]=null;}}}else{return false;}},destroy:function(){this.get("element").innerHTML="";this.get("element").className="";for(var E in this){if(D.hasOwnProperty(this,E)){this[E]=null;}}return true;},collapse:function(F){var E=C.getElementsByClassName("collapse","span",this._titlebar);if(F===false){C.removeClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed");if(E[0]){C.removeClass(E[0],"collapsed");}this.fireEvent("toolbarExpanded",{type:"toolbarExpanded",target:this});}else{if(E[0]){C.addClass(E[0],"collapsed");}C.addClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed");this.fireEvent("toolbarCollapsed",{type:"toolbarCollapsed",target:this});}},toString:function(){return"Toolbar (#"+this.get("element").id+") with "+this._buttonList.length+" buttons.";}});})();(function(){var C=YAHOO.util.Dom,A=YAHOO.util.Event,D=YAHOO.lang,B=YAHOO.widget.Toolbar;YAHOO.widget.SimpleEditor=function(H,M){var G={};if(D.isObject(H)&&(!H.tagName)&&!M){D.augmentObject(G,H);H=document.createElement("textarea");this.DOMReady=true;if(G.container){var K=C.get(G.container);K.appendChild(H);}else{document.body.appendChild(H);}}else{if(M){D.augmentObject(G,M);}}var I={element:null,attributes:G},F=null;if(D.isString(H)){F=H;}else{if(I.attributes.id){F=I.attributes.id;}else{this.DOMReady=true;F=C.generateId(H);}}I.element=H;var J=document.createElement("DIV");I.attributes.element_cont=new YAHOO.util.Element(J,{id:F+"_container"});var E=document.createElement("div");C.addClass(E,"first-child");I.attributes.element_cont.appendChild(E);if(!I.attributes.toolbar_cont){I.attributes.toolbar_cont=document.createElement("DIV");I.attributes.toolbar_cont.id=F+"_toolbar";E.appendChild(I.attributes.toolbar_cont);}var L=document.createElement("DIV");E.appendChild(L);I.attributes.editor_wrapper=L;YAHOO.widget.SimpleEditor.superclass.constructor.call(this,I.element,I.attributes);};YAHOO.extend(YAHOO.widget.SimpleEditor,YAHOO.util.Element,{_resizeConfig:{handles:["br"],autoRatio:true,status:true,proxy:true,useShim:true,setSize:false},_setupResize:function(){if(!YAHOO.util.DD||!YAHOO.util.Resize){return false;}if(this.get("resize")){var E={};D.augmentObject(E,this._resizeConfig);this.resize=new YAHOO.util.Resize(this.get("element_cont").get("element"),E);this.resize.on("resize",function(G){var K=this.get("animate");this.set("animate",false);this.set("width",G.width+"px");var H=G.height,I=(this.toolbar.get("element").clientHeight+2),J=0;if(this.dompath){J=(this.dompath.clientHeight+1);}var F=(H-I-J);this.set("height",F+"px");this.get("element_cont").setStyle("height","");this.set("animate",K);},this,true);}},resize:null,_setupDD:function(){if(!YAHOO.util.DD){return false;}if(this.get("drag")){var F=this.get("drag"),E=YAHOO.util.DD;if(F==="proxy"){E=YAHOO.util.DDProxy;}this.dd=new E(this.get("element_cont").get("element"));this.toolbar.addClass("draggable");this.dd.setHandleElId(this.toolbar._titlebar);}},dd:null,_lastCommand:null,_undoNodeChange:function(){},_storeUndo:function(){},_checkKey:function(E,H){var F=false;if((H.keyCode===E.key)){if(E.mods&&(E.mods.length>0)){var I=0;for(var G=0;G<E.mods.length;G++){if(this.browser.mac){if(E.mods[G]=="ctrl"){E.mods[G]="meta";}}if(H[E.mods[G]+"Key"]===true){I++;}}if(I===E.mods.length){F=true;}}else{F=true;}}return F;},_keyMap:{SELECT_ALL:{key:65,mods:["ctrl"]},CLOSE_WINDOW:{key:87,mods:["shift","ctrl"]},FOCUS_TOOLBAR:{key:27,mods:["shift"]},FOCUS_AFTER:{key:27},CREATE_LINK:{key:76,mods:["shift","ctrl"]},BOLD:{key:66,mods:["shift","ctrl"]},ITALIC:{key:73,mods:["shift","ctrl"]},UNDERLINE:{key:85,mods:["shift","ctrl"]},UNDO:{key:90,mods:["ctrl"]},REDO:{key:90,mods:["shift","ctrl"]},JUSTIFY_LEFT:{key:219,mods:["shift","ctrl"]},JUSTIFY_CENTER:{key:220,mods:["shift","ctrl"]},JUSTIFY_RIGHT:{key:221,mods:["shift","ctrl"]}},_cleanClassName:function(E){return E.replace(/ /g,"-").toLowerCase();},_textarea:null,_docType:'<!DOCTYPE HTML PUBLIC "-/'+"/W3C/"+"/DTD HTML 4.01/"+'/EN" "http:/'+'/www.w3.org/TR/html4/strict.dtd">',editorDirty:null,_defaultCSS:"html { height: 95%; } body { padding: 7px; background-color: #fff; font:13px/1.22 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small; } a, a:visited, a:hover { color: blue !important; text-decoration: underline !important; cursor: text !important; } .warning-localfile { border-bottom: 1px dashed red !important; } .yui-busy { cursor: wait !important; } img.selected { border: 2px dotted #808080; } img { cursor: pointer !important; border: none; } body.ptags.webkit div { margin: 11px 0; }",_defaultToolbar:null,_lastButton:null,_baseHREF:function(){var E=document.location.href;if(E.indexOf("?")!==-1){E=E.substring(0,E.indexOf("?"));}E=E.substring(0,E.lastIndexOf("/"))+"/";return E;
}(),_lastImage:null,_blankImageLoaded:null,_fixNodesTimer:null,_nodeChangeTimer:null,_lastNodeChangeEvent:null,_lastNodeChange:0,_rendered:null,DOMReady:null,_selection:null,_mask:null,_showingHiddenElements:null,currentWindow:null,currentEvent:null,operaEvent:null,currentFont:null,currentElement:null,dompath:null,beforeElement:null,afterElement:null,invalidHTML:{form:true,input:true,button:true,select:true,link:true,html:true,body:true,iframe:true,script:true,style:true,textarea:true},toolbar:null,_contentTimer:null,_contentTimerCounter:0,_disabled:["createlink","fontname","fontsize","forecolor","backcolor"],_alwaysDisabled:{undo:true,redo:true},_alwaysEnabled:{},_semantic:{"bold":true,"italic":true,"underline":true},_tag2cmd:{"b":"bold","strong":"bold","i":"italic","em":"italic","u":"underline","sup":"superscript","sub":"subscript","img":"insertimage","a":"createlink","ul":"insertunorderedlist","ol":"insertorderedlist"},_createIframe:function(){var I=document.createElement("iframe");I.id=this.get("id")+"_editor";var G={border:"0",frameBorder:"0",marginWidth:"0",marginHeight:"0",leftMargin:"0",topMargin:"0",allowTransparency:"true",width:"100%"};if(this.get("autoHeight")){G.scrolling="no";}for(var H in G){if(D.hasOwnProperty(G,H)){I.setAttribute(H,G[H]);}}var F="javascript:;";if(this.browser.ie){F="javascript:false;";}I.setAttribute("src",F);var E=new YAHOO.util.Element(I);E.setStyle("visibility","hidden");return E;},_isElement:function(F,E){if(F&&F.tagName&&(F.tagName.toLowerCase()==E)){return true;}if(F&&F.getAttribute&&(F.getAttribute("tag")==E)){return true;}return false;},_hasParent:function(F,E){if(!F||!F.parentNode){return false;}while(F.parentNode){if(this._isElement(F,E)){return F;}if(F.parentNode){F=F.parentNode;}else{return false;}}return false;},_getDoc:function(){var E=false;if(this.get){if(this.get("iframe")){if(this.get("iframe").get){if(this.get("iframe").get("element")){try{if(this.get("iframe").get("element").contentWindow){if(this.get("iframe").get("element").contentWindow.document){E=this.get("iframe").get("element").contentWindow.document;return E;}}}catch(F){}}}}}return false;},_getWindow:function(){return this.get("iframe").get("element").contentWindow;},_focusWindow:function(E){if(this.browser.webkit){if(E){this._getSelection().setBaseAndExtent(this._getDoc().body.firstChild,0,this._getDoc().body.firstChild,1);if(this.browser.webkit3){this._getSelection().collapseToStart();}else{this._getSelection().collapse(false);}}else{this._getSelection().setBaseAndExtent(this._getDoc().body,1,this._getDoc().body,1);if(this.browser.webkit3){this._getSelection().collapseToStart();}else{this._getSelection().collapse(false);}}this._getWindow().focus();}else{this._getWindow().focus();}},_hasSelection:function(){var G=this._getSelection();var E=this._getRange();var F=false;if(!G||!E){return F;}if(this.browser.ie||this.browser.opera){if(E.text){F=true;}if(E.html){F=true;}}else{if(this.browser.webkit){if(G+""!==""){F=true;}}else{if(G&&(G.toString()!=="")&&(G!==undefined)){F=true;}}}return F;},_getSelection:function(){var E=null;if(this._getDoc()&&this._getWindow()){if(this._getDoc().selection){E=this._getDoc().selection;}else{E=this._getWindow().getSelection();}if(this.browser.webkit){if(E.baseNode){this._selection={};this._selection.baseNode=E.baseNode;this._selection.baseOffset=E.baseOffset;this._selection.extentNode=E.extentNode;this._selection.extentOffset=E.extentOffset;}else{if(this._selection!==null){E=this._getWindow().getSelection();E.setBaseAndExtent(this._selection.baseNode,this._selection.baseOffset,this._selection.extentNode,this._selection.extentOffset);this._selection=null;}}}}return E;},_selectNode:function(F,I){if(!F){return false;}var G=this._getSelection(),E=null;if(this.browser.ie){try{E=this._getDoc().body.createTextRange();E.moveToElementText(F);E.select();}catch(H){}}else{if(this.browser.webkit){if(I){G.setBaseAndExtent(F,1,F,F.innerText.length);}else{G.setBaseAndExtent(F,0,F,F.innerText.length);}}else{if(this.browser.opera){G=this._getWindow().getSelection();E=this._getDoc().createRange();E.selectNode(F);G.removeAllRanges();G.addRange(E);}else{E=this._getDoc().createRange();E.selectNodeContents(F);G.removeAllRanges();G.addRange(E);}}}this.nodeChange();},_getRange:function(){var E=this._getSelection();if(E===null){return null;}if(this.browser.webkit&&!E.getRangeAt){var H=this._getDoc().createRange();try{H.setStart(E.anchorNode,E.anchorOffset);H.setEnd(E.focusNode,E.focusOffset);}catch(G){H=this._getWindow().getSelection()+"";}return H;}if(this.browser.ie||this.browser.opera){try{return E.createRange();}catch(F){return null;}}if(E.rangeCount>0){return E.getRangeAt(0);}return null;},_setDesignMode:function(E){try{var G=true;if(this.browser.ie&&(E.toLowerCase()=="off")){G=false;}if(G){this._getDoc().designMode=E;}}catch(F){}},_toggleDesignMode:function(){var F=this._getDoc().designMode.toLowerCase(),E="on";if(F=="on"){E="off";}this._setDesignMode(E);return E;},_initEditorEvents:function(){var E=this._getDoc();A.on(E,"mouseup",this._handleMouseUp,this,true);A.on(E,"mousedown",this._handleMouseDown,this,true);A.on(E,"click",this._handleClick,this,true);A.on(E,"dblclick",this._handleDoubleClick,this,true);A.on(E,"keypress",this._handleKeyPress,this,true);A.on(E,"keyup",this._handleKeyUp,this,true);A.on(E,"keydown",this._handleKeyDown,this,true);},_removeEditorEvents:function(){var E=this._getDoc();A.removeListener(E,"mouseup",this._handleMouseUp,this,true);A.removeListener(E,"mousedown",this._handleMouseDown,this,true);A.removeListener(E,"click",this._handleClick,this,true);A.removeListener(E,"dblclick",this._handleDoubleClick,this,true);A.removeListener(E,"keypress",this._handleKeyPress,this,true);A.removeListener(E,"keyup",this._handleKeyUp,this,true);A.removeListener(E,"keydown",this._handleKeyDown,this,true);},_initEditor:function(){if(this.browser.ie){this._getDoc().body.style.margin="0";}if(!this.get("disabled")){if(this._getDoc().designMode.toLowerCase()!="on"){this._setDesignMode("on");
this._contentTimerCounter=0;}}if(!this._getDoc().body){this._contentTimerCounter=0;this._checkLoaded();return false;}this.toolbar.on("buttonClick",this._handleToolbarClick,this,true);if(!this.get("disabled")){this._initEditorEvents();this.toolbar.set("disabled",false);}this.fireEvent("editorContentLoaded",{type:"editorLoaded",target:this});if(this.get("dompath")){var E=this;setTimeout(function(){E._writeDomPath.call(E);E._setupResize.call(E);},150);}var G=[];for(var F in this.browser){if(this.browser[F]){G.push(F);}}if(this.get("ptags")){G.push("ptags");}C.addClass(this._getDoc().body,G.join(" "));this.nodeChange(true);},_checkLoaded:function(){this._contentTimerCounter++;if(this._contentTimer){clearTimeout(this._contentTimer);}if(this._contentTimerCounter>500){return false;}var G=false;try{if(this._getDoc()&&this._getDoc().body){if(this.browser.ie){if(this._getDoc().body.readyState=="complete"){G=true;}}else{if(this._getDoc().body._rteLoaded===true){G=true;}}}}catch(F){G=false;}if(G===true){this._initEditor();}else{var E=this;this._contentTimer=setTimeout(function(){E._checkLoaded.call(E);},20);}},_setInitialContent:function(){var H=((this._textarea)?this.get("element").value:this.get("element").innerHTML),J=null;var F=D.substitute(this.get("html"),{TITLE:this.STR_TITLE,CONTENT:this._cleanIncomingHTML(H),CSS:this.get("css"),HIDDEN_CSS:((this.get("hiddencss"))?this.get("hiddencss"):"/* No Hidden CSS */"),EXTRA_CSS:((this.get("extracss"))?this.get("extracss"):"/* No Extra CSS */")}),E=true;if(document.compatMode!="BackCompat"){F=this._docType+"\n"+F;}else{}if(this.browser.ie||this.browser.webkit||this.browser.opera||(navigator.userAgent.indexOf("Firefox/1.5")!=-1)){try{if(this.browser.air){J=this._getDoc().implementation.createHTMLDocument();var K=this._getDoc();K.open();K.close();J.open();J.write(F);J.close();var G=K.importNode(J.getElementsByTagName("html")[0],true);K.replaceChild(G,K.getElementsByTagName("html")[0]);K.body._rteLoaded=true;}else{J=this._getDoc();J.open();J.write(F);J.close();}}catch(I){E=false;}}else{this.get("iframe").get("element").src="data:text/html;charset=utf-8,"+encodeURIComponent(F);}this.get("iframe").setStyle("visibility","");if(E){this._checkLoaded();}},_setMarkupType:function(E){switch(this.get("markup")){case"css":this._setEditorStyle(true);break;case"default":this._setEditorStyle(false);break;case"semantic":case"xhtml":if(this._semantic[E]){this._setEditorStyle(false);}else{this._setEditorStyle(true);}break;}},_setEditorStyle:function(F){try{this._getDoc().execCommand("useCSS",false,!F);}catch(E){}},_getSelectedElement:function(){var I=this._getDoc(),F=null,G=null,J=null,E=true;if(this.browser.ie){this.currentEvent=this._getWindow().event;F=this._getRange();if(F){J=F.item?F.item(0):F.parentElement();if(this._hasSelection()){}if(J===I.body){J=null;}}if((this.currentEvent!==null)&&(this.currentEvent.keyCode===0)){J=A.getTarget(this.currentEvent);}}else{G=this._getSelection();F=this._getRange();if(!G||!F){return null;}if(!this._hasSelection()&&this.browser.webkit3){}if(this.browser.gecko){if(F.startContainer){E=false;if(F.startContainer.nodeType===3){J=F.startContainer.parentNode;}else{if(F.startContainer.nodeType===1){J=F.startContainer;}else{E=true;}}if(!E){this.currentEvent=null;}}}if(E){if(G.anchorNode&&(G.anchorNode.nodeType==3)){if(G.anchorNode.parentNode){J=G.anchorNode.parentNode;}if(G.anchorNode.nextSibling!=G.focusNode.nextSibling){J=G.anchorNode.nextSibling;}}if(this._isElement(J,"br")){J=null;}if(!J){J=F.commonAncestorContainer;if(!F.collapsed){if(F.startContainer==F.endContainer){if(F.startOffset-F.endOffset<2){if(F.startContainer.hasChildNodes()){J=F.startContainer.childNodes[F.startOffset];}}}}}}}if(this.currentEvent!==null){try{switch(this.currentEvent.type){case"click":case"mousedown":case"mouseup":if(this.browser.webkit){J=A.getTarget(this.currentEvent);}break;default:break;}}catch(H){}}else{if((this.currentElement&&this.currentElement[0])&&(!this.browser.ie)){}}if(this.browser.opera||this.browser.webkit){if(this.currentEvent&&!J){J=YAHOO.util.Event.getTarget(this.currentEvent);}}if(!J||!J.tagName){J=I.body;}if(this._isElement(J,"html")){J=I.body;}if(this._isElement(J,"body")){J=I.body;}if(J&&!J.parentNode){J=I.body;}if(J===undefined){J=null;}return J;},_getDomPath:function(E){if(!E){E=this._getSelectedElement();}var F=[];while(E!==null){if(E.ownerDocument!=this._getDoc()){E=null;break;}if(E.nodeName&&E.nodeType&&(E.nodeType==1)){F[F.length]=E;}if(this._isElement(E,"body")){break;}E=E.parentNode;}if(F.length===0){if(this._getDoc()&&this._getDoc().body){F[0]=this._getDoc().body;}}return F.reverse();},_writeDomPath:function(){var K=this._getDomPath(),I=[],G="",L="";for(var E=0;E<K.length;E++){var M=K[E].tagName.toLowerCase();if((M=="ol")&&(K[E].type)){M+=":"+K[E].type;}if(C.hasClass(K[E],"yui-tag")){M=K[E].getAttribute("tag");}if((this.get("markup")=="semantic")||(this.get("markup")=="xhtml")){switch(M){case"b":M="strong";break;case"i":M="em";break;}}if(!C.hasClass(K[E],"yui-non")){if(C.hasClass(K[E],"yui-tag")){L=M;}else{G=((K[E].className!=="")?"."+K[E].className.replace(/ /g,"."):"");if((G.indexOf("yui")!=-1)||(G.toLowerCase().indexOf("apple-style-span")!=-1)){G="";}L=M+((K[E].id)?"#"+K[E].id:"")+G;}switch(M){case"body":L="body";break;case"a":if(K[E].getAttribute("href",2)){L+=":"+K[E].getAttribute("href",2).replace("mailto:","").replace("http:/"+"/","").replace("https:/"+"/","");}break;case"img":var F=K[E].height;var J=K[E].width;if(K[E].style.height){F=parseInt(K[E].style.height,10);}if(K[E].style.width){J=parseInt(K[E].style.width,10);}L+="("+J+"x"+F+")";break;}if(L.length>10){L='<span title="'+L+'">'+L.substring(0,10)+"..."+"</span>";}else{L='<span title="'+L+'">'+L+"</span>";}I[I.length]=L;}}var H=I.join(" "+this.SEP_DOMPATH+" ");if(this.dompath.innerHTML!=H){this.dompath.innerHTML=H;}},_fixNodes:function(){var J=this._getDoc(),H=[];for(var E in this.invalidHTML){if(YAHOO.lang.hasOwnProperty(this.invalidHTML,E)){if(E.toLowerCase()!="span"){var F=J.body.getElementsByTagName(E);
if(F.length){for(var G=0;G<F.length;G++){H.push(F[G]);}}}}}for(var I=0;I<H.length;I++){if(H[I].parentNode){if(D.isObject(this.invalidHTML[H[I].tagName.toLowerCase()])&&this.invalidHTML[H[I].tagName.toLowerCase()].keepContents){this._swapEl(H[I],"span",function(L){L.className="yui-non";});}else{H[I].parentNode.removeChild(H[I]);}}}var K=this._getDoc().getElementsByTagName("img");C.addClass(K,"yui-img");},_isNonEditable:function(G){if(this.get("allowNoEdit")){var F=A.getTarget(G);if(this._isElement(F,"html")){F=null;}var J=this._getDomPath(F);for(var E=(J.length-1);E>-1;E--){if(C.hasClass(J[E],this.CLASS_NOEDIT)){try{this._getDoc().execCommand("enableObjectResizing",false,"false");}catch(I){}this.nodeChange();A.stopEvent(G);return true;}}try{this._getDoc().execCommand("enableObjectResizing",false,"true");}catch(H){}}return false;},_setCurrentEvent:function(E){this.currentEvent=E;},_handleClick:function(G){var F=this.fireEvent("beforeEditorClick",{type:"beforeEditorClick",target:this,ev:G});if(F===false){return false;}if(this._isNonEditable(G)){return false;}this._setCurrentEvent(G);if(this.currentWindow){this.closeWindow();}if(this.currentWindow){this.closeWindow();}if(this.browser.webkit){var E=A.getTarget(G);if(this._isElement(E,"a")||this._isElement(E.parentNode,"a")){A.stopEvent(G);this.nodeChange();}}else{this.nodeChange();}this.fireEvent("editorClick",{type:"editorClick",target:this,ev:G});},_handleMouseUp:function(G){var F=this.fireEvent("beforeEditorMouseUp",{type:"beforeEditorMouseUp",target:this,ev:G});if(F===false){return false;}if(this._isNonEditable(G)){return false;}var E=this;if(this.browser.opera){var H=A.getTarget(G);if(this._isElement(H,"img")){this.nodeChange();if(this.operaEvent){clearTimeout(this.operaEvent);this.operaEvent=null;this._handleDoubleClick(G);}else{this.operaEvent=window.setTimeout(function(){E.operaEvent=false;},700);}}}if(this.browser.webkit||this.browser.opera){if(this.browser.webkit){A.stopEvent(G);}}this.nodeChange();this.fireEvent("editorMouseUp",{type:"editorMouseUp",target:this,ev:G});},_handleMouseDown:function(F){var E=this.fireEvent("beforeEditorMouseDown",{type:"beforeEditorMouseDown",target:this,ev:F});if(E===false){return false;}if(this._isNonEditable(F)){return false;}this._setCurrentEvent(F);var G=A.getTarget(F);if(this.browser.webkit&&this._hasSelection()){var H=this._getSelection();if(!this.browser.webkit3){H.collapse(true);}else{H.collapseToStart();}}if(this.browser.webkit&&this._lastImage){C.removeClass(this._lastImage,"selected");this._lastImage=null;}if(this._isElement(G,"img")||this._isElement(G,"a")){if(this.browser.webkit){A.stopEvent(F);if(this._isElement(G,"img")){C.addClass(G,"selected");this._lastImage=G;}}if(this.currentWindow){this.closeWindow();}this.nodeChange();}this.fireEvent("editorMouseDown",{type:"editorMouseDown",target:this,ev:F});},_handleDoubleClick:function(F){var E=this.fireEvent("beforeEditorDoubleClick",{type:"beforeEditorDoubleClick",target:this,ev:F});if(E===false){return false;}if(this._isNonEditable(F)){return false;}this._setCurrentEvent(F);var G=A.getTarget(F);if(this._isElement(G,"img")){this.currentElement[0]=G;this.toolbar.fireEvent("insertimageClick",{type:"insertimageClick",target:this.toolbar});this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});}else{if(this._hasParent(G,"a")){this.currentElement[0]=this._hasParent(G,"a");this.toolbar.fireEvent("createlinkClick",{type:"createlinkClick",target:this.toolbar});this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});}}this.nodeChange();this.fireEvent("editorDoubleClick",{type:"editorDoubleClick",target:this,ev:F});},_handleKeyUp:function(G){var F=this.fireEvent("beforeEditorKeyUp",{type:"beforeEditorKeyUp",target:this,ev:G});if(F===false){return false;}if(this._isNonEditable(G)){return false;}this._setCurrentEvent(G);switch(G.keyCode){case this._keyMap.SELECT_ALL.key:if(this._checkKey(this._keyMap.SELECT_ALL,G)){this.nodeChange();}break;case 32:case 35:case 36:case 37:case 38:case 39:case 40:case 46:case 8:case this._keyMap.CLOSE_WINDOW.key:if((G.keyCode==this._keyMap.CLOSE_WINDOW.key)&&this.currentWindow){if(this._checkKey(this._keyMap.CLOSE_WINDOW,G)){this.closeWindow();}}else{if(!this.browser.ie){if(this._nodeChangeTimer){clearTimeout(this._nodeChangeTimer);}var E=this;this._nodeChangeTimer=setTimeout(function(){E._nodeChangeTimer=null;E.nodeChange.call(E);},100);}else{this.nodeChange();}this.editorDirty=true;}break;}this.fireEvent("editorKeyUp",{type:"editorKeyUp",target:this,ev:G});this._storeUndo();},_handleKeyPress:function(G){var F=this.fireEvent("beforeEditorKeyPress",{type:"beforeEditorKeyPress",target:this,ev:G});if(F===false){return false;}if(this.get("allowNoEdit")){if(G&&G.keyCode&&(G.keyCode==63272)){A.stopEvent(G);}}if(this._isNonEditable(G)){return false;}this._setCurrentEvent(G);if(this.browser.opera){if(G.keyCode===13){var E=this._getSelectedElement();if(!this._isElement(E,"li")){this.execCommand("inserthtml","<br>");A.stopEvent(G);}}}if(this.browser.webkit){if(!this.browser.webkit3){if(G.keyCode&&(G.keyCode==122)&&(G.metaKey)){if(this._hasParent(this._getSelectedElement(),"li")){A.stopEvent(G);}}}this._listFix(G);}this.fireEvent("editorKeyPress",{type:"editorKeyPress",target:this,ev:G});},_handleKeyDown:function(M){var J=this.fireEvent("beforeEditorKeyDown",{type:"beforeEditorKeyDown",target:this,ev:M});if(J===false){return false;}var I=null,K=null;if(this._isNonEditable(M)){return false;}this._setCurrentEvent(M);if(this.currentWindow){this.closeWindow();}if(this.currentWindow){this.closeWindow();}var L=false,G=null,F=false;switch(M.keyCode){case this._keyMap.FOCUS_TOOLBAR.key:if(this._checkKey(this._keyMap.FOCUS_TOOLBAR,M)){var H=this.toolbar.getElementsByTagName("h2")[0];if(H&&H.firstChild){H.firstChild.focus();}}else{if(this._checkKey(this._keyMap.FOCUS_AFTER,M)){this.afterElement.focus();}}A.stopEvent(M);L=false;break;case this._keyMap.CREATE_LINK.key:if(this._hasSelection()){if(this._checkKey(this._keyMap.CREATE_LINK,M)){var E=true;
if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue("createlink")){E=false;}}if(E){this.execCommand("createlink","");this.toolbar.fireEvent("createlinkClick",{type:"createlinkClick",target:this.toolbar});this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});L=false;}}}break;case this._keyMap.UNDO.key:case this._keyMap.REDO.key:if(this._checkKey(this._keyMap.REDO,M)){G="redo";L=true;}else{if(this._checkKey(this._keyMap.UNDO,M)){G="undo";L=true;}}break;case this._keyMap.BOLD.key:if(this._checkKey(this._keyMap.BOLD,M)){G="bold";L=true;}break;case this._keyMap.ITALIC.key:if(this._checkKey(this._keyMap.ITALIC,M)){G="italic";L=true;}break;case this._keyMap.UNDERLINE.key:if(this._checkKey(this._keyMap.UNDERLINE,M)){G="underline";L=true;}break;case 9:if(this.browser.ie){K=this._getRange();I=this._getSelectedElement();if(!this._isElement(I,"li")){if(K){K.pasteHTML("&nbsp;&nbsp;&nbsp;&nbsp;");K.collapse(false);K.select();}A.stopEvent(M);}}if(this.browser.gecko>1.8){I=this._getSelectedElement();if(this._isElement(I,"li")){if(M.shiftKey){this._getDoc().execCommand("outdent",null,"");}else{this._getDoc().execCommand("indent",null,"");}}else{if(!this._hasSelection()){this.execCommand("inserthtml","&nbsp;&nbsp;&nbsp;&nbsp;");}}A.stopEvent(M);}break;case 13:if(this.get("ptags")&&!M.shiftKey){if(this.browser.gecko){I=this._getSelectedElement();if(!this._isElement(I,"li")){L=true;G="insertparagraph";A.stopEvent(M);}}if(this.browser.webkit){I=this._getSelectedElement();if(!this._hasParent(I,"li")){L=true;G="insertparagraph";A.stopEvent(M);}}}else{if(this.browser.ie){K=this._getRange();I=this._getSelectedElement();if(!this._isElement(I,"li")){if(K){K.pasteHTML("<br>");K.collapse(false);K.select();}A.stopEvent(M);}}}break;}if(this.browser.ie){this._listFix(M);}if(L&&G){this.execCommand(G,null);A.stopEvent(M);this.nodeChange();}this.fireEvent("editorKeyDown",{type:"editorKeyDown",target:this,ev:M});},_listFix:function(K){var M=null,I=null,E=false,G=null;if(this.browser.webkit){if(K.keyCode&&(K.keyCode==13)){if(this._hasParent(this._getSelectedElement(),"li")){var H=this._hasParent(this._getSelectedElement(),"li");if(H.previousSibling){if(H.firstChild&&(H.firstChild.length==1)){this._selectNode(H);}}}}}if(K.keyCode&&((!this.browser.webkit3&&(K.keyCode==25))||((this.browser.webkit3||!this.browser.webkit)&&((K.keyCode==9)&&K.shiftKey)))){M=this._getSelectedElement();if(this._hasParent(M,"li")){M=this._hasParent(M,"li");if(this._hasParent(M,"ul")||this._hasParent(M,"ol")){I=this._hasParent(M,"ul");if(!I){I=this._hasParent(M,"ol");}if(this._isElement(I.previousSibling,"li")){I.removeChild(M);I.parentNode.insertBefore(M,I.nextSibling);if(this.browser.ie){G=this._getDoc().body.createTextRange();G.moveToElementText(M);G.collapse(false);G.select();}if(this.browser.webkit){this._selectNode(M.firstChild);}A.stopEvent(K);}}}}if(K.keyCode&&((K.keyCode==9)&&(!K.shiftKey))){var F=this._getSelectedElement();if(this._hasParent(F,"li")){E=this._hasParent(F,"li").innerHTML;}if(this.browser.webkit){this._getDoc().execCommand("inserttext",false,"\t");}M=this._getSelectedElement();if(this._hasParent(M,"li")){I=this._hasParent(M,"li");var J=this._getDoc().createElement(I.parentNode.tagName.toLowerCase());if(this.browser.webkit){var L=C.getElementsByClassName("Apple-tab-span","span",I);if(L[0]){I.removeChild(L[0]);I.innerHTML=D.trim(I.innerHTML);if(E){I.innerHTML='<span class="yui-non">'+E+"</span>&nbsp;";}else{I.innerHTML='<span class="yui-non">&nbsp;</span>&nbsp;';}}}else{if(E){I.innerHTML=E+"&nbsp;";}else{I.innerHTML="&nbsp;";}}I.parentNode.replaceChild(J,I);J.appendChild(I);if(this.browser.webkit){this._getSelection().setBaseAndExtent(I.firstChild,1,I.firstChild,I.firstChild.innerText.length);if(!this.browser.webkit3){I.parentNode.parentNode.style.display="list-item";setTimeout(function(){I.parentNode.parentNode.style.display="block";},1);}}else{if(this.browser.ie){G=this._getDoc().body.createTextRange();G.moveToElementText(I);G.collapse(false);G.select();}else{this._selectNode(I);}}A.stopEvent(K);}if(this.browser.webkit){A.stopEvent(K);}this.nodeChange();}},nodeChange:function(E){var F=this;this._storeUndo();if(this.get("nodeChangeDelay")){window.setTimeout(function(){F._nodeChange.apply(F,arguments);},0);}else{this._nodeChange();}},_nodeChange:function(F){var H=parseInt(this.get("nodeChangeThreshold"),10),O=Math.round(new Date().getTime()/1000),R=this;if(F===true){this._lastNodeChange=0;}if((this._lastNodeChange+H)<O){if(this._fixNodesTimer===null){this._fixNodesTimer=window.setTimeout(function(){R._fixNodes.call(R);R._fixNodesTimer=null;},0);}}this._lastNodeChange=O;if(this.currentEvent){try{this._lastNodeChangeEvent=this.currentEvent.type;}catch(a){}}var Z=this.fireEvent("beforeNodeChange",{type:"beforeNodeChange",target:this});if(Z===false){return false;}if(this.get("dompath")){window.setTimeout(function(){R._writeDomPath.call(R);},0);}if(!this.get("disabled")){if(this.STOP_NODE_CHANGE){this.STOP_NODE_CHANGE=false;return false;}else{var T=this._getSelection(),Q=this._getRange(),E=this._getSelectedElement(),M=this.toolbar.getButtonByValue("fontname"),L=this.toolbar.getButtonByValue("fontsize"),J=this.toolbar.getButtonByValue("undo"),G=this.toolbar.getButtonByValue("redo");var N={};if(this._lastButton){N[this._lastButton.id]=true;}if(!this._isElement(E,"body")){if(M){N[M.get("id")]=true;}if(L){N[L.get("id")]=true;}}if(G){delete N[G.get("id")];}this.toolbar.resetAllButtons(N);for(var b=0;b<this._disabled.length;b++){var P=this.toolbar.getButtonByValue(this._disabled[b]);if(P&&P.get){if(this._lastButton&&(P.get("id")===this._lastButton.id)){}else{if(!this._hasSelection()&&!this.get("insert")){switch(this._disabled[b]){case"fontname":case"fontsize":break;default:this.toolbar.disableButton(P);}}else{if(!this._alwaysDisabled[this._disabled[b]]){this.toolbar.enableButton(P);}}if(!this._alwaysEnabled[this._disabled[b]]){this.toolbar.deselectButton(P);}}}}var S=this._getDomPath();var c=null,W=null;for(var X=0;
X<S.length;X++){c=S[X].tagName.toLowerCase();if(S[X].getAttribute("tag")){c=S[X].getAttribute("tag").toLowerCase();}W=this._tag2cmd[c];if(W===undefined){W=[];}if(!D.isArray(W)){W=[W];}if(S[X].style.fontWeight.toLowerCase()=="bold"){W[W.length]="bold";}if(S[X].style.fontStyle.toLowerCase()=="italic"){W[W.length]="italic";}if(S[X].style.textDecoration.toLowerCase()=="underline"){W[W.length]="underline";}if(S[X].style.textDecoration.toLowerCase()=="line-through"){W[W.length]="strikethrough";}if(W.length>0){for(var V=0;V<W.length;V++){this.toolbar.selectButton(W[V]);this.toolbar.enableButton(W[V]);}}switch(S[X].style.textAlign.toLowerCase()){case"left":case"right":case"center":case"justify":var U=S[X].style.textAlign.toLowerCase();if(S[X].style.textAlign.toLowerCase()=="justify"){U="full";}this.toolbar.selectButton("justify"+U);this.toolbar.enableButton("justify"+U);break;}}if(M){var Y=M._configs.label._initialConfig.value;M.set("label",'<span class="yui-toolbar-fontname-'+this._cleanClassName(Y)+'">'+Y+"</span>");this._updateMenuChecked("fontname",Y);}if(L){L.set("label",L._configs.label._initialConfig.value);}var K=this.toolbar.getButtonByValue("heading");if(K){K.set("label",K._configs.label._initialConfig.value);this._updateMenuChecked("heading","none");}var I=this.toolbar.getButtonByValue("insertimage");if(I&&this.currentWindow&&(this.currentWindow.name=="insertimage")){this.toolbar.disableButton(I);}if(this._lastButton&&this._lastButton.isSelected){this.toolbar.deselectButton(this._lastButton.id);}this._undoNodeChange();}}this.fireEvent("afterNodeChange",{type:"afterNodeChange",target:this});},_updateMenuChecked:function(E,F,H){if(!H){H=this.toolbar;}var G=H.getButtonByValue(E);G.checkValue(F);},_handleToolbarClick:function(F){var H="";var I="";var G=F.button.value;if(F.button.menucmd){H=G;G=F.button.menucmd;}this._lastButton=F.button;if(this.STOP_EXEC_COMMAND){this.STOP_EXEC_COMMAND=false;return false;}else{this.execCommand(G,H);if(!this.browser.webkit){var E=this;setTimeout(function(){E._focusWindow.call(E);},5);}}A.stopEvent(F);},_setupAfterElement:function(){if(!this.beforeElement){this.beforeElement=document.createElement("h2");this.beforeElement.className="yui-editor-skipheader";this.beforeElement.tabIndex="-1";this.beforeElement.innerHTML=this.STR_BEFORE_EDITOR;this.get("element_cont").get("firstChild").insertBefore(this.beforeElement,this.toolbar.get("nextSibling"));}if(!this.afterElement){this.afterElement=document.createElement("h2");this.afterElement.className="yui-editor-skipheader";this.afterElement.tabIndex="-1";this.afterElement.innerHTML=this.STR_LEAVE_EDITOR;this.get("element_cont").get("firstChild").appendChild(this.afterElement);}},_disableEditor:function(F){if(F){this._removeEditorEvents();if(!this._mask){if(!!this.browser.ie){this._setDesignMode("off");}if(this.toolbar){this.toolbar.set("disabled",true);}this._mask=document.createElement("DIV");C.setStyle(this._mask,"height","100%");C.setStyle(this._mask,"width","100%");C.setStyle(this._mask,"position","absolute");C.setStyle(this._mask,"top","0");C.setStyle(this._mask,"left","0");C.setStyle(this._mask,"opacity",".5");C.addClass(this._mask,"yui-editor-masked");this.get("iframe").get("parentNode").appendChild(this._mask);}}else{this._initEditorEvents();if(this._mask){this._mask.parentNode.removeChild(this._mask);this._mask=null;if(this.toolbar){this.toolbar.set("disabled",false);}this._setDesignMode("on");this._focusWindow();var E=this;window.setTimeout(function(){E.nodeChange.call(E);},100);}}},SEP_DOMPATH:"<",STR_LEAVE_EDITOR:"You have left the Rich Text Editor.",STR_BEFORE_EDITOR:"This text field can contain stylized text and graphics. To cycle through all formatting options, use the keyboard shortcut Shift + Escape to place focus on the toolbar and navigate between options with your arrow keys. To exit this text editor use the Escape key and continue tabbing. <h4>Common formatting keyboard shortcuts:</h4><ul><li>Control Shift B sets text to bold</li> <li>Control Shift I sets text to italic</li> <li>Control Shift U underlines text</li> <li>Control Shift L adds an HTML link</li></ul>",STR_TITLE:"Rich Text Area.",STR_IMAGE_HERE:"Image URL Here",STR_LINK_URL:"Link URL",STOP_EXEC_COMMAND:false,STOP_NODE_CHANGE:false,CLASS_NOEDIT:"yui-noedit",CLASS_CONTAINER:"yui-editor-container",CLASS_EDITABLE:"yui-editor-editable",CLASS_EDITABLE_CONT:"yui-editor-editable-container",CLASS_PREFIX:"yui-editor",browser:function(){var E=YAHOO.env.ua;if(E.webkit>=420){E.webkit3=E.webkit;}else{E.webkit3=0;}E.mac=false;if(navigator.userAgent.indexOf("Macintosh")!==-1){E.mac=true;}return E;}(),init:function(F,E){if(!this._defaultToolbar){this._defaultToolbar={collapse:true,titlebar:"Text Editing Tools",draggable:false,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:"push",label:"Strike Through",value:"strikethrough"},{type:"separator"},{type:"color",label:"Font Color",value:"forecolor",disabled:true},{type:"color",label:"Background Color",value:"backcolor",disabled:true}]},{type:"separator"},{group:"indentlist",label:"Lists",buttons:[{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:"HTML Link CTRL + SHIFT + L",value:"createlink",disabled:true},{type:"push",label:"Insert Image",value:"insertimage"}]}]};
}YAHOO.widget.SimpleEditor.superclass.init.call(this,F,E);YAHOO.widget.EditorInfo._instances[this.get("id")]=this;this.currentElement=[];this.on("contentReady",function(){this.DOMReady=true;this.fireQueue();},this,true);},initAttributes:function(E){YAHOO.widget.SimpleEditor.superclass.initAttributes.call(this,E);var F=this;this.setAttributeConfig("nodeChangeDelay",{value:((E.nodeChangeDelay===false)?false:true)});this.setAttributeConfig("maxUndo",{writeOnce:true,value:E.maxUndo||30});this.setAttributeConfig("ptags",{writeOnce:true,value:E.ptags||false});this.setAttributeConfig("insert",{writeOnce:true,value:E.insert||false,method:function(K){if(K){var J={fontname:true,fontsize:true,forecolor:true,backcolor:true};var I=this._defaultToolbar.buttons;for(var H=0;H<I.length;H++){if(I[H].buttons){for(var G=0;G<I[H].buttons.length;G++){if(I[H].buttons[G].value){if(J[I[H].buttons[G].value]){delete I[H].buttons[G].disabled;}}}}}}}});this.setAttributeConfig("container",{writeOnce:true,value:E.container||false});this.setAttributeConfig("plainText",{writeOnce:true,value:E.plainText||false});this.setAttributeConfig("iframe",{value:null});this.setAttributeConfig("textarea",{value:null,writeOnce:true});this.setAttributeConfig("container",{readOnly:true,value:null});this.setAttributeConfig("nodeChangeThreshold",{value:E.nodeChangeThreshold||3,validator:YAHOO.lang.isNumber});this.setAttributeConfig("allowNoEdit",{value:E.allowNoEdit||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("limitCommands",{value:E.limitCommands||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("element_cont",{value:E.element_cont});this.setAttributeConfig("editor_wrapper",{value:E.editor_wrapper||null,writeOnce:true});this.setAttributeConfig("height",{value:E.height||C.getStyle(F.get("element"),"height"),method:function(G){if(this._rendered){if(this.get("animate")){var H=new YAHOO.util.Anim(this.get("iframe").get("parentNode"),{height:{to:parseInt(G,10)}},0.5);H.animate();}else{C.setStyle(this.get("iframe").get("parentNode"),"height",G);}}}});this.setAttributeConfig("autoHeight",{value:E.autoHeight||false,method:function(G){if(G){if(this.get("iframe")){this.get("iframe").get("element").setAttribute("scrolling","no");}this.on("afterNodeChange",this._handleAutoHeight,this,true);this.on("editorKeyDown",this._handleAutoHeight,this,true);this.on("editorKeyPress",this._handleAutoHeight,this,true);}else{if(this.get("iframe")){this.get("iframe").get("element").setAttribute("scrolling","auto");}this.unsubscribe("afterNodeChange",this._handleAutoHeight);this.unsubscribe("editorKeyDown",this._handleAutoHeight);this.unsubscribe("editorKeyPress",this._handleAutoHeight);}}});this.setAttributeConfig("width",{value:E.width||C.getStyle(this.get("element"),"width"),method:function(G){if(this._rendered){if(this.get("animate")){var H=new YAHOO.util.Anim(this.get("element_cont").get("element"),{width:{to:parseInt(G,10)}},0.5);H.animate();}else{this.get("element_cont").setStyle("width",G);}}}});this.setAttributeConfig("blankimage",{value:E.blankimage||this._getBlankImage()});this.setAttributeConfig("css",{value:E.css||this._defaultCSS,writeOnce:true});this.setAttributeConfig("html",{value:E.html||'<html><head><title>{TITLE}</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><base href="'+this._baseHREF+'"><style>{CSS}</style><style>{HIDDEN_CSS}</style><style>{EXTRA_CSS}</style></head><body onload="document.body._rteLoaded = true;">{CONTENT}</body></html>',writeOnce:true});this.setAttributeConfig("extracss",{value:E.extracss||"",writeOnce:true});this.setAttributeConfig("handleSubmit",{value:E.handleSubmit||false,method:function(G){if(this.get("element").form){if(!this._formButtons){this._formButtons=[];}if(G){A.on(this.get("element").form,"submit",this._handleFormSubmit,this,true);var H=this.get("element").form.getElementsByTagName("input");for(var J=0;J<H.length;J++){var I=H[J].getAttribute("type");if(I&&(I.toLowerCase()=="submit")){A.on(H[J],"click",this._handleFormButtonClick,this,true);this._formButtons[this._formButtons.length]=H[J];}}}else{A.removeListener(this.get("element").form,"submit",this._handleFormSubmit);if(this._formButtons){A.removeListener(this._formButtons,"click",this._handleFormButtonClick);}}}}});this.setAttributeConfig("disabled",{value:false,method:function(G){if(this._rendered){this._disableEditor(G);}}});this.setAttributeConfig("saveEl",{value:this.get("element")});this.setAttributeConfig("toolbar_cont",{value:null,writeOnce:true});this.setAttributeConfig("toolbar",{value:E.toolbar||this._defaultToolbar,writeOnce:true,method:function(G){if(!G.buttonType){G.buttonType=this._defaultToolbar.buttonType;}this._defaultToolbar=G;}});this.setAttributeConfig("animate",{value:((E.animate)?((YAHOO.util.Anim)?true:false):false),validator:function(H){var G=true;if(!YAHOO.util.Anim){G=false;}return G;}});this.setAttributeConfig("panel",{value:null,writeOnce:true,validator:function(H){var G=true;if(!YAHOO.widget.Overlay){G=false;}return G;}});this.setAttributeConfig("focusAtStart",{value:E.focusAtStart||false,writeOnce:true,method:function(G){if(G){this.on("editorContentLoaded",function(){var H=this;setTimeout(function(){H._focusWindow.call(H,true);H.editorDirty=false;},400);},this,true);}}});this.setAttributeConfig("dompath",{value:E.dompath||false,method:function(G){if(G&&!this.dompath){this.dompath=document.createElement("DIV");this.dompath.id=this.get("id")+"_dompath";C.addClass(this.dompath,"dompath");this.get("element_cont").get("firstChild").appendChild(this.dompath);if(this.get("iframe")){this._writeDomPath();}}else{if(!G&&this.dompath){this.dompath.parentNode.removeChild(this.dompath);this.dompath=null;}}}});this.setAttributeConfig("markup",{value:E.markup||"semantic",validator:function(G){switch(G.toLowerCase()){case"semantic":case"css":case"default":case"xhtml":return true;}return false;}});this.setAttributeConfig("removeLineBreaks",{value:E.removeLineBreaks||false,validator:YAHOO.lang.isBoolean});
this.setAttributeConfig("drag",{writeOnce:true,value:E.drag||false});this.setAttributeConfig("resize",{writeOnce:true,value:E.resize||false});},_getBlankImage:function(){if(!this.DOMReady){this._queue[this._queue.length]=["_getBlankImage",arguments];return"";}var E="";if(!this._blankImageLoaded){if(YAHOO.widget.EditorInfo.blankImage){this.set("blankimage",YAHOO.widget.EditorInfo.blankImage);this._blankImageLoaded=true;}else{var F=document.createElement("div");F.style.position="absolute";F.style.top="-9999px";F.style.left="-9999px";F.className=this.CLASS_PREFIX+"-blankimage";document.body.appendChild(F);E=YAHOO.util.Dom.getStyle(F,"background-image");E=E.replace("url(","").replace(")","").replace(/"/g,"");E=E.replace("app:/","");this.set("blankimage",E);this._blankImageLoaded=true;F.parentNode.removeChild(F);YAHOO.widget.EditorInfo.blankImage=E;}}else{E=this.get("blankimage");}return E;},_handleAutoHeight:function(){var I=this._getDoc(),F=I.body,J=I.documentElement;var E=parseInt(C.getStyle(this.get("editor_wrapper"),"height"),10);var G=F.scrollHeight;if(this.browser.webkit){G=J.scrollHeight;}if(G<parseInt(this.get("height"),10)){G=parseInt(this.get("height"),10);}if((E!=G)&&(G>=parseInt(this.get("height"),10))){C.setStyle(this.get("editor_wrapper"),"height",G+"px");if(this.browser.ie){this.get("iframe").setStyle("height","99%");this.get("iframe").setStyle("zoom","1");var H=this;window.setTimeout(function(){H.get("iframe").setStyle("height","100%");},1);}}},_formButtons:null,_formButtonClicked:null,_handleFormButtonClick:function(F){var E=A.getTarget(F);this._formButtonClicked=E;},_handleFormSubmit:function(H){this.saveHTML();var G=this.get("element").form,E=this._formButtonClicked||false;A.removeListener(G,"submit",this._handleFormSubmit);if(YAHOO.env.ua.ie){if(E&&!E.disabled){E.click();}}else{if(E&&!E.disabled){E.click();}var F=document.createEvent("HTMLEvents");F.initEvent("submit",true,true);G.dispatchEvent(F);if(YAHOO.env.ua.webkit){if(YAHOO.lang.isFunction(G.submit)){G.submit();}}}},_handleFontSize:function(G){var E=this.toolbar.getButtonById(G.button.id);var F=E.get("label")+"px";this.execCommand("fontsize",F);this.STOP_EXEC_COMMAND=true;},_handleColorPicker:function(G){var F=G.button;var E="#"+G.color;if((F=="forecolor")||(F=="backcolor")){this.execCommand(F,E);}},_handleAlign:function(H){var G=null;for(var E=0;E<H.button.menu.length;E++){if(H.button.menu[E].value==H.button.value){G=H.button.menu[E].value;}}var F=this._getSelection();this.execCommand(G,F);this.STOP_EXEC_COMMAND=true;},_handleAfterNodeChange:function(){var Q=this._getDomPath(),L=null,H=null,M=null,F=false,J=this.toolbar.getButtonByValue("fontname"),K=this.toolbar.getButtonByValue("fontsize"),E=this.toolbar.getButtonByValue("heading");for(var G=0;G<Q.length;G++){L=Q[G];var P=L.tagName.toLowerCase();if(L.getAttribute("tag")){P=L.getAttribute("tag");}H=L.getAttribute("face");if(C.getStyle(L,"font-family")){H=C.getStyle(L,"font-family");H=H.replace(/'/g,"");}if(P.substring(0,1)=="h"){if(E){for(var I=0;I<E._configs.menu.value.length;I++){if(E._configs.menu.value[I].value.toLowerCase()==P){E.set("label",E._configs.menu.value[I].text);}}this._updateMenuChecked("heading",P);}}}if(J){for(var O=0;O<J._configs.menu.value.length;O++){if(H&&J._configs.menu.value[O].text.toLowerCase()==H.toLowerCase()){F=true;H=J._configs.menu.value[O].text;}}if(!F){H=J._configs.label._initialConfig.value;}var N='<span class="yui-toolbar-fontname-'+this._cleanClassName(H)+'">'+H+"</span>";if(J.get("label")!=N){J.set("label",N);this._updateMenuChecked("fontname",H);}}if(K){M=parseInt(C.getStyle(L,"fontSize"),10);if((M===null)||isNaN(M)){M=K._configs.label._initialConfig.value;}K.set("label",""+M);}if(!this._isElement(L,"body")&&!this._isElement(L,"img")){this.toolbar.enableButton(J);this.toolbar.enableButton(K);this.toolbar.enableButton("forecolor");this.toolbar.enableButton("backcolor");}if(this._isElement(L,"img")){if(YAHOO.widget.Overlay){this.toolbar.enableButton("createlink");}}if(this._hasParent(L,"blockquote")){this.toolbar.selectButton("indent");this.toolbar.disableButton("indent");this.toolbar.enableButton("outdent");}if(this._hasParent(L,"ol")||this._hasParent(L,"ul")){this.toolbar.disableButton("indent");}this._lastButton=null;},_handleInsertImageClick:function(){if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue("insertimage")){return false;}}this.toolbar.set("disabled",true);this.on("afterExecCommand",function(){var E=this.currentElement[0],G="http://";if(!E){E=this._getSelectedElement();}if(E){if(E.getAttribute("src")){G=E.getAttribute("src",2);if(G.indexOf(this.get("blankimage"))!=-1){G=this.STR_IMAGE_HERE;}}}var F=prompt(this.STR_LINK_URL+": ",G);if((F!=="")&&(F!==null)){E.setAttribute("src",F);}else{if(F===null){E.parentNode.removeChild(E);this.currentElement=[];this.nodeChange();}}this.closeWindow();this.toolbar.set("disabled",false);},this,true);},_handleInsertImageWindowClose:function(){this.nodeChange();},_isLocalFile:function(E){if((E)&&(E!=="")&&((E.indexOf("file:/")!=-1)||(E.indexOf(":\\")!=-1))){return true;}return false;},_handleCreateLinkClick:function(){if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue("createlink")){return false;}}this.toolbar.set("disabled",true);this.on("afterExecCommand",function(){var G=this.currentElement[0],F="";if(G){if(G.getAttribute("href",2)!==null){F=G.getAttribute("href",2);}}var I=prompt(this.STR_LINK_URL+": ",F);if((I!=="")&&(I!==null)){var H=I;if((H.indexOf(":/"+"/")==-1)&&(H.substring(0,1)!="/")&&(H.substring(0,6).toLowerCase()!="mailto")){if((H.indexOf("@")!=-1)&&(H.substring(0,6).toLowerCase()!="mailto")){H="mailto:"+H;}else{if(H.substring(0,1)!="#"){}}}G.setAttribute("href",H);}else{if(I!==null){var E=this._getDoc().createElement("span");E.innerHTML=G.innerHTML;C.addClass(E,"yui-non");G.parentNode.replaceChild(E,G);}}this.closeWindow();this.toolbar.set("disabled",false);},this);},_handleCreateLinkWindowClose:function(){this.nodeChange();this.currentElement=[];
},render:function(){if(this._rendered){return false;}if(!this.DOMReady){this._queue[this._queue.length]=["render",arguments];return false;}if(this.get("element")){if(this.get("element").tagName){this._textarea=true;if(this.get("element").tagName.toLowerCase()!=="textarea"){this._textarea=false;}}else{return false;}}else{return false;}this._rendered=true;var E=this;window.setTimeout(function(){E._render.call(E);},4);},_render:function(){var E=this;this.set("textarea",this.get("element"));this.get("element_cont").setStyle("display","none");this.get("element_cont").addClass(this.CLASS_CONTAINER);this.set("iframe",this._createIframe());window.setTimeout(function(){E._setInitialContent.call(E);},10);this.get("editor_wrapper").appendChild(this.get("iframe").get("element"));if(this.get("disabled")){this._disableEditor(true);}var F=this.get("toolbar");if(F instanceof B){this.toolbar=F;this.toolbar.set("disabled",true);}else{F.disabled=true;this.toolbar=new B(this.get("toolbar_cont"),F);}this.fireEvent("toolbarLoaded",{type:"toolbarLoaded",target:this.toolbar});this.toolbar.on("toolbarCollapsed",function(){if(this.currentWindow){this.moveWindow();}},this,true);this.toolbar.on("toolbarExpanded",function(){if(this.currentWindow){this.moveWindow();}},this,true);this.toolbar.on("fontsizeClick",this._handleFontSize,this,true);this.toolbar.on("colorPickerClicked",function(G){this._handleColorPicker(G);return false;},this,true);this.toolbar.on("alignClick",this._handleAlign,this,true);this.on("afterNodeChange",this._handleAfterNodeChange,this,true);this.toolbar.on("insertimageClick",this._handleInsertImageClick,this,true);this.on("windowinsertimageClose",this._handleInsertImageWindowClose,this,true);this.toolbar.on("createlinkClick",this._handleCreateLinkClick,this,true);this.on("windowcreatelinkClose",this._handleCreateLinkWindowClose,this,true);this.get("parentNode").replaceChild(this.get("element_cont").get("element"),this.get("element"));this.setStyle("visibility","hidden");this.setStyle("position","absolute");this.setStyle("top","-9999px");this.setStyle("left","-9999px");this.get("element_cont").appendChild(this.get("element"));this.get("element_cont").setStyle("display","block");C.addClass(this.get("iframe").get("parentNode"),this.CLASS_EDITABLE_CONT);this.get("iframe").addClass(this.CLASS_EDITABLE);this.get("element_cont").setStyle("width",this.get("width"));C.setStyle(this.get("iframe").get("parentNode"),"height",this.get("height"));this.get("iframe").setStyle("width","100%");this.get("iframe").setStyle("height","100%");this._setupDD();window.setTimeout(function(){E._setupAfterElement.call(E);},0);this.fireEvent("afterRender",{type:"afterRender",target:this});},execCommand:function(G,F){var J=this.fireEvent("beforeExecCommand",{type:"beforeExecCommand",target:this,args:arguments});if((J===false)||(this.STOP_EXEC_COMMAND)){this.STOP_EXEC_COMMAND=false;return false;}this._lastCommand=G;this._setMarkupType(G);if(this.browser.ie){this._getWindow().focus();}var E=true;if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue(G)){E=false;}}this.editorDirty=true;if((typeof this["cmd_"+G.toLowerCase()]=="function")&&E){var I=this["cmd_"+G.toLowerCase()](F);E=I[0];if(I[1]){G=I[1];}if(I[2]){F=I[2];}}if(E){try{this._getDoc().execCommand(G,false,F);}catch(H){}}else{}this.on("afterExecCommand",function(){this.unsubscribeAll("afterExecCommand");this.nodeChange();},this,true);this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});},cmd_underline:function(F){if(!this.browser.webkit){var E=this._getSelectedElement();if(E&&this._isElement(E,"span")){if(E.style.textDecoration=="underline"){E.style.textDecoration="none";}else{E.style.textDecoration="underline";}return[false];}}return[true];},cmd_backcolor:function(H){var E=true,F=this._getSelectedElement(),G="backcolor";if(this.browser.gecko||this.browser.opera){this._setEditorStyle(true);G="hilitecolor";}if(!this._isElement(F,"body")&&!this._hasSelection()){C.setStyle(F,"background-color",H);this._selectNode(F);E=false;}else{if(!this._isElement(F,"body")&&this._hasSelection()){C.setStyle(F,"background-color",H);this._selectNode(F);E=false;}else{if(this.get("insert")){F=this._createInsertElement({backgroundColor:H});}else{this._createCurrentElement("span",{backgroundColor:H});this._selectNode(this.currentElement[0]);}E=false;}}return[E,G];},cmd_forecolor:function(G){var E=true,F=this._getSelectedElement();if(!this._isElement(F,"body")&&!this._hasSelection()){C.setStyle(F,"color",G);this._selectNode(F);E=false;}else{if(!this._isElement(F,"body")&&this._hasSelection()){C.setStyle(F,"color",G);this._selectNode(F);E=false;}else{if(this.get("insert")){F=this._createInsertElement({color:G});}else{this._createCurrentElement("span",{color:G});this._selectNode(this.currentElement[0]);}E=false;}}return[E];},cmd_unlink:function(E){this._swapEl(this.currentElement[0],"span",function(F){F.className="yui-non";});return[false];},cmd_createlink:function(G){var F=this._getSelectedElement(),E=null;if(this._hasParent(F,"a")){this.currentElement[0]=this._hasParent(F,"a");}else{if(!this._isElement(F,"a")){this._createCurrentElement("a");E=this._swapEl(this.currentElement[0],"a");this.currentElement[0]=E;}else{this.currentElement[0]=F;}}return[false];},cmd_insertimage:function(J){var E=true,F=null,I="insertimage",H=this._getSelectedElement();if(J===""){J=this.get("blankimage");}if(this._isElement(H,"img")){this.currentElement[0]=H;E=false;}else{if(this._getDoc().queryCommandEnabled(I)){this._getDoc().execCommand("insertimage",false,J);var K=this._getDoc().getElementsByTagName("img");for(var G=0;G<K.length;G++){if(!YAHOO.util.Dom.hasClass(K[G],"yui-img")){YAHOO.util.Dom.addClass(K[G],"yui-img");this.currentElement[0]=K[G];}}E=false;}else{if(H==this._getDoc().body){F=this._getDoc().createElement("img");F.setAttribute("src",J);YAHOO.util.Dom.addClass(F,"yui-img");this._getDoc().body.appendChild(F);}else{this._createCurrentElement("img");F=this._getDoc().createElement("img");
F.setAttribute("src",J);YAHOO.util.Dom.addClass(F,"yui-img");this.currentElement[0].parentNode.replaceChild(F,this.currentElement[0]);}this.currentElement[0]=F;E=false;}}return[E];},cmd_inserthtml:function(H){var E=true,G="inserthtml",F=null,I=null;if(this.browser.webkit&&!this._getDoc().queryCommandEnabled(G)){this._createCurrentElement("img");F=this._getDoc().createElement("span");F.innerHTML=H;this.currentElement[0].parentNode.replaceChild(F,this.currentElement[0]);E=false;}else{if(this.browser.ie){I=this._getRange();if(I.item){I.item(0).outerHTML=H;}else{I.pasteHTML(H);}E=false;}}return[E];},cmd_list:function(Y){var S=true,V=null,M=0,G=null,R="",W=this._getSelectedElement(),T="insertorderedlist";if(Y=="ul"){T="insertunorderedlist";}if(this.browser.webkit){if(this._isElement(W,"li")&&this._isElement(W.parentNode,Y)){G=W.parentNode;V=this._getDoc().createElement("span");YAHOO.util.Dom.addClass(V,"yui-non");R="";var F=G.getElementsByTagName("li");for(M=0;M<F.length;M++){R+="<div>"+F[M].innerHTML+"</div>";}V.innerHTML=R;this.currentElement[0]=G;this.currentElement[0].parentNode.replaceChild(V,this.currentElement[0]);}else{this._createCurrentElement(Y.toLowerCase());V=this._getDoc().createElement(Y);for(M=0;M<this.currentElement.length;M++){var J=this._getDoc().createElement("li");J.innerHTML=this.currentElement[M].innerHTML+'<span class="yui-non">&nbsp;</span>&nbsp;';V.appendChild(J);if(M>0){this.currentElement[M].parentNode.removeChild(this.currentElement[M]);}}this.currentElement[0].parentNode.replaceChild(V,this.currentElement[0]);this.currentElement[0]=V;var H=this.currentElement[0].firstChild;H=C.getElementsByClassName("yui-non","span",H)[0];this._getSelection().setBaseAndExtent(H,1,H,H.innerText.length);}S=false;}else{G=this._getSelectedElement();if(this._isElement(G,"li")&&this._isElement(G.parentNode,Y)||(this.browser.ie&&this._isElement(this._getRange().parentElement,"li"))||(this.browser.ie&&this._isElement(G,"ul"))||(this.browser.ie&&this._isElement(G,"ol"))){if(this.browser.ie){if((this.browser.ie&&this._isElement(G,"ul"))||(this.browser.ie&&this._isElement(G,"ol"))){G=G.getElementsByTagName("li")[0];}R="";var I=G.parentNode.getElementsByTagName("li");for(var U=0;U<I.length;U++){R+=I[U].innerHTML+"<br>";}var X=this._getDoc().createElement("span");X.innerHTML=R;G.parentNode.parentNode.replaceChild(X,G.parentNode);}else{this.nodeChange();this._getDoc().execCommand(T,"",G.parentNode);this.nodeChange();}S=false;}if(this.browser.opera){var Q=this;window.setTimeout(function(){var Z=Q._getDoc().getElementsByTagName("li");for(var a=0;a<Z.length;a++){if(Z[a].innerHTML.toLowerCase()=="<br>"){Z[a].parentNode.parentNode.removeChild(Z[a].parentNode);}}},30);}if(this.browser.ie&&S){var K="";if(this._getRange().html){K="<li>"+this._getRange().html+"</li>";}else{var L=this._getRange().text.split("\n");if(L.length>1){K="";for(var P=0;P<L.length;P++){K+="<li>"+L[P]+"</li>";}}else{var O=this._getRange().text;if(O===""){K='<li id="new_list_item">'+O+"</li>";}else{K="<li>"+O+"</li>";}}}this._getRange().pasteHTML("<"+Y+">"+K+"</"+Y+">");var E=this._getDoc().getElementById("new_list_item");if(E){var N=this._getDoc().body.createTextRange();N.moveToElementText(E);N.collapse(false);N.select();E.id="";}S=false;}}return S;},cmd_insertorderedlist:function(E){return[this.cmd_list("ol")];},cmd_insertunorderedlist:function(E){return[this.cmd_list("ul")];},cmd_fontname:function(H){var E=true,G=this._getSelectedElement();this.currentFont=H;if(G&&G.tagName&&!this._hasSelection()&&!this._isElement(G,"body")&&!this.get("insert")){YAHOO.util.Dom.setStyle(G,"font-family",H);E=false;}else{if(this.get("insert")&&!this._hasSelection()){var F=this._createInsertElement({fontFamily:H});E=false;}}return[E];},cmd_fontsize:function(G){var E=null;if(this.currentElement&&(this.currentElement.length>0)&&(!this._hasSelection())&&(!this.get("insert"))){YAHOO.util.Dom.setStyle(this.currentElement,"fontSize",G);}else{if(!this._isElement(this._getSelectedElement(),"body")){E=this._getSelectedElement();YAHOO.util.Dom.setStyle(E,"fontSize",G);if(this.get("insert")&&this.browser.ie){var F=this._getRange();F.collapse(false);F.select();}else{this._selectNode(E);}}else{if(this.get("insert")&&!this._hasSelection()){E=this._createInsertElement({fontSize:G});this.currentElement[0]=E;this._selectNode(this.currentElement[0]);}else{this._createCurrentElement("span",{"fontSize":G});this._selectNode(this.currentElement[0]);}}}return[false];},_swapEl:function(F,E,H){var G=this._getDoc().createElement(E);if(F){G.innerHTML=F.innerHTML;}if(typeof H=="function"){H.call(this,G);}if(F){F.parentNode.replaceChild(G,F);}return G;},_createInsertElement:function(E){this._createCurrentElement("span",E);var F=this.currentElement[0];if(this.browser.webkit){F.innerHTML='<span class="yui-non">&nbsp;</span>';F=F.firstChild;this._getSelection().setBaseAndExtent(F,1,F,F.innerText.length);}else{if(this.browser.ie||this.browser.opera){F.innerHTML="&nbsp;";}}this._focusWindow();this._selectNode(F,true);return F;},_createCurrentElement:function(G,J){G=((G)?G:"a");var R=null,F=[],H=this._getDoc();if(this.currentFont){if(!J){J={};}J.fontFamily=this.currentFont;this.currentFont=null;}this.currentElement=[];var M=function(X,Z){var Y=null;X=((X)?X:"span");X=X.toLowerCase();switch(X){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":Y=H.createElement(X);break;default:Y=H.createElement(X);if(X==="span"){YAHOO.util.Dom.addClass(Y,"yui-tag-"+X);YAHOO.util.Dom.addClass(Y,"yui-tag");Y.setAttribute("tag",X);}for(var W in Z){if(YAHOO.lang.hasOwnProperty(Z,W)){Y.style[W]=Z[W];}}break;}return Y;};if(!this._hasSelection()){if(this._getDoc().queryCommandEnabled("insertimage")){this._getDoc().execCommand("insertimage",false,"yui-tmp-img");var L=this._getDoc().getElementsByTagName("img");for(var Q=0;Q<L.length;Q++){if(L[Q].getAttribute("src",2)=="yui-tmp-img"){F=M(G,J);L[Q].parentNode.replaceChild(F,L[Q]);this.currentElement[this.currentElement.length]=F;}}}else{if(this.currentEvent){R=YAHOO.util.Event.getTarget(this.currentEvent);
}else{R=this._getDoc().body;}}if(R){F=M(G,J);if(this._isElement(R,"body")||this._isElement(R,"html")){if(this._isElement(R,"html")){R=this._getDoc().body;}R.appendChild(F);}else{if(R.nextSibling){R.parentNode.insertBefore(F,R.nextSibling);}else{R.parentNode.appendChild(F);}}this.currentElement[this.currentElement.length]=F;this.currentEvent=null;if(this.browser.webkit){this._getSelection().setBaseAndExtent(F,0,F,0);if(this.browser.webkit3){this._getSelection().collapseToStart();}else{this._getSelection().collapse(true);}}}}else{this._setEditorStyle(true);this._getDoc().execCommand("fontname",false,"yui-tmp");var E=[],P,V=["font","span","i","b","u"];if(!this._isElement(this._getSelectedElement(),"body")){V[V.length]=this._getDoc().getElementsByTagName(this._getSelectedElement().tagName);V[V.length]=this._getDoc().getElementsByTagName(this._getSelectedElement().parentNode.tagName);}for(var K=0;K<V.length;K++){var I=this._getDoc().getElementsByTagName(V[K]);for(var U=0;U<I.length;U++){E[E.length]=I[U];}}for(var S=0;S<E.length;S++){if((YAHOO.util.Dom.getStyle(E[S],"font-family")=="yui-tmp")||(E[S].face&&(E[S].face=="yui-tmp"))){F=M(G,J);F.innerHTML=E[S].innerHTML;if(this._isElement(E[S],"ol")||(this._isElement(E[S],"ul"))){var N=E[S].getElementsByTagName("li")[0];E[S].style.fontFamily="inherit";N.style.fontFamily="inherit";F.innerHTML=N.innerHTML;N.innerHTML="";N.appendChild(F);this.currentElement[this.currentElement.length]=F;}else{if(this._isElement(E[S],"li")){E[S].innerHTML="";E[S].appendChild(F);E[S].style.fontFamily="inherit";this.currentElement[this.currentElement.length]=F;}else{if(E[S].parentNode){E[S].parentNode.replaceChild(F,E[S]);this.currentElement[this.currentElement.length]=F;this.currentEvent=null;if(this.browser.webkit){this._getSelection().setBaseAndExtent(F,0,F,0);if(this.browser.webkit3){this._getSelection().collapseToStart();}else{this._getSelection().collapse(true);}}if(this.browser.ie&&J&&J.fontSize){this._getSelection().empty();}if(this.browser.gecko){this._getSelection().collapseToStart();}}}}}}var T=this.currentElement.length;for(var O=0;O<T;O++){if((O+1)!=T){if(this.currentElement[O]&&this.currentElement[O].nextSibling){if(this._isElement(this.currentElement[O],"br")){this.currentElement[this.currentElement.length]=this.currentElement[O].nextSibling;}}}}}},saveHTML:function(){var F=this.cleanHTML();if(this._textarea){this.get("element").value=F;}else{this.get("element").innerHTML=F;}if(this.get("saveEl")!==this.get("element")){var E=this.get("saveEl");if(D.isString(E)){E=C.get(E);}if(E){if(E.tagName.toLowerCase()==="textarea"){E.value=F;}else{E.innerHTML=F;}}}return F;},setEditorHTML:function(F){var E=this._cleanIncomingHTML(F);this._getDoc().body.innerHTML=E;this.nodeChange();},getEditorHTML:function(){var E=this._getDoc().body;if(E===null){return null;}return this._getDoc().body.innerHTML;},show:function(){if(this.browser.gecko){this._setDesignMode("on");this._focusWindow();}if(this.browser.webkit){var E=this;window.setTimeout(function(){E._setInitialContent.call(E);},10);}if(this.currentWindow){this.closeWindow();}this.get("iframe").setStyle("position","static");this.get("iframe").setStyle("left","");},hide:function(){if(this.currentWindow){this.closeWindow();}if(this._fixNodesTimer){clearTimeout(this._fixNodesTimer);this._fixNodesTimer=null;}if(this._nodeChangeTimer){clearTimeout(this._nodeChangeTimer);this._nodeChangeTimer=null;}this._lastNodeChange=0;this.get("iframe").setStyle("position","absolute");this.get("iframe").setStyle("left","-9999px");},_cleanIncomingHTML:function(E){E=E.replace(/<strong([^>]*)>/gi,"<b$1>");E=E.replace(/<\/strong>/gi,"</b>");E=E.replace(/<embed([^>]*)>/gi,"<YUI_EMBED$1>");E=E.replace(/<\/embed>/gi,"</YUI_EMBED>");E=E.replace(/<em([^>]*)>/gi,"<i$1>");E=E.replace(/<\/em>/gi,"</i>");E=E.replace(/<YUI_EMBED([^>]*)>/gi,"<embed$1>");E=E.replace(/<\/YUI_EMBED>/gi,"</embed>");if(this.get("plainText")){E=E.replace(/\n/g,"<br>").replace(/\r/g,"<br>");E=E.replace(/  /gi,"&nbsp;&nbsp;");E=E.replace(/\t/gi,"&nbsp;&nbsp;&nbsp;&nbsp;");}E=E.replace(/<script([^>]*)>/gi,"<bad>");E=E.replace(/<\/script([^>]*)>/gi,"</bad>");E=E.replace(/&lt;script([^>]*)&gt;/gi,"<bad>");E=E.replace(/&lt;\/script([^>]*)&gt;/gi,"</bad>");E=E.replace(/\n/g,"<YUI_LF>").replace(/\r/g,"<YUI_LF>");E=E.replace(new RegExp("<bad([^>]*)>(.*?)</bad>","gi"),"");E=E.replace(/<YUI_LF>/g,"\n");return E;},cleanHTML:function(G){if(!G){G=this.getEditorHTML();}var F=this.get("markup");G=this.pre_filter_linebreaks(G,F);G=G.replace(/<img([^>]*)\/>/gi,"<YUI_IMG$1>");G=G.replace(/<img([^>]*)>/gi,"<YUI_IMG$1>");G=G.replace(/<input([^>]*)\/>/gi,"<YUI_INPUT$1>");G=G.replace(/<input([^>]*)>/gi,"<YUI_INPUT$1>");G=G.replace(/<ul([^>]*)>/gi,"<YUI_UL$1>");G=G.replace(/<\/ul>/gi,"</YUI_UL>");G=G.replace(/<blockquote([^>]*)>/gi,"<YUI_BQ$1>");G=G.replace(/<\/blockquote>/gi,"</YUI_BQ>");G=G.replace(/<embed([^>]*)>/gi,"<YUI_EMBED$1>");G=G.replace(/<\/embed>/gi,"</YUI_EMBED>");if((F=="semantic")||(F=="xhtml")){G=G.replace(/<i(\s+[^>]*)?>/gi,"<em$1>");G=G.replace(/<\/i>/gi,"</em>");G=G.replace(/<b(\s+[^>]*)?>/gi,"<strong$1>");G=G.replace(/<\/b>/gi,"</strong>");}G=G.replace(/<font/gi,"<font");G=G.replace(/<\/font>/gi,"</font>");G=G.replace(/<span/gi,"<span");G=G.replace(/<\/span>/gi,"</span>");if((F=="semantic")||(F=="xhtml")||(F=="css")){G=G.replace(new RegExp('<font([^>]*)face="([^>]*)">(.*?)</font>',"gi"),'<span $1 style="font-family: $2;">$3</span>');G=G.replace(/<u/gi,'<span style="text-decoration: underline;"');if(this.browser.webkit){G=G.replace(new RegExp('<span class="Apple-style-span" style="font-weight: bold;">([^>]*)</span>',"gi"),"<strong>$1</strong>");G=G.replace(new RegExp('<span class="Apple-style-span" style="font-style: italic;">([^>]*)</span>',"gi"),"<em>$1</em>");}G=G.replace(/\/u>/gi,"/span>");if(F=="css"){G=G.replace(/<em([^>]*)>/gi,"<i$1>");G=G.replace(/<\/em>/gi,"</i>");G=G.replace(/<strong([^>]*)>/gi,"<b$1>");G=G.replace(/<\/strong>/gi,"</b>");G=G.replace(/<b/gi,'<span style="font-weight: bold;"');
G=G.replace(/\/b>/gi,"/span>");G=G.replace(/<i/gi,'<span style="font-style: italic;"');G=G.replace(/\/i>/gi,"/span>");}G=G.replace(/  /gi," ");}else{G=G.replace(/<u/gi,"<u");G=G.replace(/\/u>/gi,"/u>");}G=G.replace(/<ol([^>]*)>/gi,"<ol$1>");G=G.replace(/\/ol>/gi,"/ol>");G=G.replace(/<li/gi,"<li");G=G.replace(/\/li>/gi,"/li>");G=this.filter_safari(G);G=this.filter_internals(G);G=this.filter_all_rgb(G);G=this.post_filter_linebreaks(G,F);if(F=="xhtml"){G=G.replace(/<YUI_IMG([^>]*)>/g,"<img $1 />");G=G.replace(/<YUI_INPUT([^>]*)>/g,"<input $1 />");}else{G=G.replace(/<YUI_IMG([^>]*)>/g,"<img $1>");G=G.replace(/<YUI_INPUT([^>]*)>/g,"<input $1>");}G=G.replace(/<YUI_UL([^>]*)>/g,"<ul$1>");G=G.replace(/<\/YUI_UL>/g,"</ul>");G=this.filter_invalid_lists(G);G=G.replace(/<YUI_BQ([^>]*)>/g,"<blockquote$1>");G=G.replace(/<\/YUI_BQ>/g,"</blockquote>");G=G.replace(/<YUI_EMBED([^>]*)>/g,"<embed$1>");G=G.replace(/<\/YUI_EMBED>/g,"</embed>");G=G.replace(" &amp; ","YUI_AMP");G=G.replace("&amp;","&");G=G.replace("YUI_AMP","&amp;");G=YAHOO.lang.trim(G);if(this.get("removeLineBreaks")){G=G.replace(/\n/g,"").replace(/\r/g,"");G=G.replace(/  /gi," ");}if(G.substring(0,6).toLowerCase()=="<span>"){G=G.substring(6);if(G.substring(G.length-7,G.length).toLowerCase()=="</span>"){G=G.substring(0,G.length-7);}}for(var E in this.invalidHTML){if(YAHOO.lang.hasOwnProperty(this.invalidHTML,E)){if(D.isObject(E)&&E.keepContents){G=G.replace(new RegExp("<"+E+"([^>]*)>(.*?)</"+E+">","gi"),"$1");}else{G=G.replace(new RegExp("<"+E+"([^>]*)>(.*?)</"+E+">","gi"),"");}}}this.fireEvent("cleanHTML",{type:"cleanHTML",target:this,html:G});return G;},filter_invalid_lists:function(E){E=E.replace(/<\/li>\n/gi,"</li>");E=E.replace(/<\/li><ol>/gi,"</li><li><ol>");E=E.replace(/<\/ol>/gi,"</ol></li>");E=E.replace(/<\/ol><\/li>\n/gi,"</ol>\n");E=E.replace(/<\/li><ul>/gi,"</li><li><ul>");E=E.replace(/<\/ul>/gi,"</ul></li>");E=E.replace(/<\/ul><\/li>\n?/gi,"</ul>\n");E=E.replace(/<\/li>/gi,"</li>\n");E=E.replace(/<\/ol>/gi,"</ol>\n");E=E.replace(/<ol>/gi,"<ol>\n");E=E.replace(/<ul>/gi,"<ul>\n");return E;},filter_safari:function(E){if(this.browser.webkit){E=E.replace(/<span class="Apple-tab-span" style="white-space:pre">([^>])<\/span>/gi,"&nbsp;&nbsp;&nbsp;&nbsp;");E=E.replace(/Apple-style-span/gi,"");E=E.replace(/style="line-height: normal;"/gi,"");E=E.replace(/<li><\/li>/gi,"");E=E.replace(/<li> <\/li>/gi,"");E=E.replace(/<li>  <\/li>/gi,"");if(this.get("ptags")){E=E.replace(/<div([^>]*)>/g,"<p$1>");E=E.replace(/<\/div>/gi,"</p>");}else{E=E.replace(/<div>/gi,"");E=E.replace(/<\/div>/gi,"<br>");}}return E;},filter_internals:function(E){E=E.replace(/\r/g,"");E=E.replace(/<\/?(body|head|html)[^>]*>/gi,"");E=E.replace(/<YUI_BR><\/li>/gi,"</li>");E=E.replace(/yui-tag-span/gi,"");E=E.replace(/yui-tag/gi,"");E=E.replace(/yui-non/gi,"");E=E.replace(/yui-img/gi,"");E=E.replace(/ tag="span"/gi,"");E=E.replace(/ class=""/gi,"");E=E.replace(/ style=""/gi,"");E=E.replace(/ class=" "/gi,"");E=E.replace(/ class="  "/gi,"");E=E.replace(/ target=""/gi,"");E=E.replace(/ title=""/gi,"");if(this.browser.ie){E=E.replace(/ class= /gi,"");E=E.replace(/ class= >/gi,"");E=E.replace(/_height="([^>])"/gi,"");E=E.replace(/_width="([^>])"/gi,"");}return E;},filter_all_rgb:function(I){var H=new RegExp("rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)","gi");var E=I.match(H);if(D.isArray(E)){for(var G=0;G<E.length;G++){var F=this.filter_rgb(E[G]);I=I.replace(E[G].toString(),F);}}return I;},filter_rgb:function(G){if(G.toLowerCase().indexOf("rgb")!=-1){var J=new RegExp("(.*?)rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)(.*?)","gi");var F=G.replace(J,"$1,$2,$3,$4,$5").split(",");if(F.length==5){var I=parseInt(F[1],10).toString(16);var H=parseInt(F[2],10).toString(16);var E=parseInt(F[3],10).toString(16);I=I.length==1?"0"+I:I;H=H.length==1?"0"+H:H;E=E.length==1?"0"+E:E;G="#"+I+H+E;}}return G;},pre_filter_linebreaks:function(F,E){if(this.browser.webkit){F=F.replace(/<br class="khtml-block-placeholder">/gi,"<YUI_BR>");F=F.replace(/<br class="webkit-block-placeholder">/gi,"<YUI_BR>");}F=F.replace(/<br>/gi,"<YUI_BR>");F=F.replace(/<br (.*?)>/gi,"<YUI_BR>");F=F.replace(/<br\/>/gi,"<YUI_BR>");F=F.replace(/<br \/>/gi,"<YUI_BR>");F=F.replace(/<div><YUI_BR><\/div>/gi,"<YUI_BR>");F=F.replace(/<p>(&nbsp;|&#160;)<\/p>/g,"<YUI_BR>");F=F.replace(/<p><br>&nbsp;<\/p>/gi,"<YUI_BR>");F=F.replace(/<p>&nbsp;<\/p>/gi,"<YUI_BR>");F=F.replace(/<YUI_BR>$/,"");F=F.replace(/<YUI_BR><\/p>/g,"</p>");if(this.browser.ie){F=F.replace(/&nbsp;&nbsp;&nbsp;&nbsp;/g,"\t");}return F;},post_filter_linebreaks:function(F,E){if(E=="xhtml"){F=F.replace(/<YUI_BR>/g,"<br />");}else{F=F.replace(/<YUI_BR>/g,"<br>");}return F;},clearEditorDoc:function(){this._getDoc().body.innerHTML="&nbsp;";},openWindow:function(E){},moveWindow:function(){},_closeWindow:function(){},closeWindow:function(){this.toolbar.resetAllButtons();this._focusWindow();},destroy:function(){if(this.resize){this.resize.destroy();}if(this.dd){this.dd.unreg();}if(this.get("panel")){this.get("panel").destroy();}this.saveHTML();this.toolbar.destroy();this.setStyle("visibility","visible");this.setStyle("position","static");this.setStyle("top","");this.setStyle("left","");var E=this.get("element");this.get("element_cont").get("parentNode").replaceChild(E,this.get("element_cont").get("element"));this.get("element_cont").get("element").innerHTML="";this.set("handleSubmit",false);return true;},toString:function(){var E="SimpleEditor";if(this.get&&this.get("element_cont")){E="SimpleEditor (#"+this.get("element_cont").get("id")+")"+((this.get("disabled")?" Disabled":""));}return E;}});YAHOO.widget.EditorInfo={_instances:{},blankImage:"",window:{},panel:null,getEditorById:function(E){if(!YAHOO.lang.isString(E)){E=E.id;}if(this._instances[E]){return this._instances[E];}return false;},toString:function(){var E=0;for(var F in this._instances){if(D.hasOwnProperty(this._instances,F)){E++;}}return"Editor Info ("+E+" registered intance"+((E>1)?"s":"")+")";
}};})();(function(){var C=YAHOO.util.Dom,A=YAHOO.util.Event,D=YAHOO.lang,B=YAHOO.widget.Toolbar;YAHOO.widget.Editor=function(F,E){YAHOO.widget.Editor.superclass.constructor.call(this,F,E);};YAHOO.extend(YAHOO.widget.Editor,YAHOO.widget.SimpleEditor,{_undoCache:null,_undoLevel:null,_hasUndoLevel:function(){return(this._undoCache.length&&this._undoLevel);},_undoNodeChange:function(){var E=this.toolbar.getButtonByValue("undo"),F=this.toolbar.getButtonByValue("redo");if(E&&F){if(this._hasUndoLevel()){this.toolbar.enableButton(E);}if(this._undoLevel<this._undoCache.length){this.toolbar.enableButton(F);}}},_checkUndo:function(){var E=this._undoCache.length,G=[];if(E>=this.get("maxUndo")){for(var F=(E-this.get("maxUndo"));F<E;F++){G.push(this._undoCache[F]);}this._undoCache=G;}},_putUndo:function(E){this._undoCache.push(E);},_getUndo:function(E){return this._undoCache[E];},_storeUndo:function(){if(this._lastCommand==="undo"||this._lastCommand==="redo"){return false;}if(!this._undoCache){this._undoCache=[];}this._checkUndo();var F=this.getEditorHTML();var E=this._undoCache[this._undoCache.length-1];if(E){if(F!==E){this._putUndo(F);}}else{this._putUndo(F);}this._undoLevel=this._undoCache.length;this._undoNodeChange();},STR_BEFORE_EDITOR:"This text field can contain stylized text and graphics. To cycle through all formatting options, use the keyboard shortcut Control + Shift + T to place focus on the toolbar and navigate between option heading names. <h4>Common formatting keyboard shortcuts:</h4><ul><li>Control Shift B sets text to bold</li> <li>Control Shift I sets text to italic</li> <li>Control Shift U underlines text</li> <li>Control Shift [ aligns text left</li> <li>Control Shift | centers text</li> <li>Control Shift ] aligns text right</li> <li>Control Shift L adds an HTML link</li> <li>To exit this text editor use the keyboard shortcut Control + Shift + ESC.</li></ul>",STR_CLOSE_WINDOW:"Close Window",STR_CLOSE_WINDOW_NOTE:"To close this window use the Control + Shift + W key",STR_IMAGE_PROP_TITLE:"Image Options",STR_IMAGE_URL:"Image URL",STR_IMAGE_TITLE:"Description",STR_IMAGE_SIZE:"Size",STR_IMAGE_ORIG_SIZE:"Original Size",STR_IMAGE_COPY:'<span class="tip"><span class="icon icon-info"></span><strong>Note:</strong>To move this image just highlight it, cut, and paste where ever you\'d like.</span>',STR_IMAGE_PADDING:"Padding",STR_IMAGE_BORDER:"Border",STR_IMAGE_BORDER_SIZE:"Border Size",STR_IMAGE_BORDER_TYPE:"Border Type",STR_IMAGE_TEXTFLOW:"Text Flow",STR_LOCAL_FILE_WARNING:'<span class="tip"><span class="icon icon-warn"></span><strong>Note:</strong>This image/link points to a file on your computer and will not be accessible to others on the internet.</span>',STR_LINK_PROP_TITLE:"Link Options",STR_LINK_PROP_REMOVE:"Remove link from text",STR_LINK_NEW_WINDOW:"Open in a new window.",STR_LINK_TITLE:"Description",CLASS_LOCAL_FILE:"warning-localfile",CLASS_HIDDEN:"yui-hidden",init:function(F,E){this._windows={};this._defaultToolbar={collapse:true,titlebar:"Text Editing Tools",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:"HTML Link CTRL + SHIFT + L",value:"createlink",disabled:true},{type:"push",label:"Insert Image",value:"insertimage"}]}]};this._defaultImageToolbarConfig={buttonType:this._defaultToolbar.buttonType,buttons:[{group:"textflow",label:this.STR_IMAGE_TEXTFLOW+":",buttons:[{type:"push",label:"Left",value:"left"},{type:"push",label:"Inline",value:"inline"},{type:"push",label:"Block",value:"block"},{type:"push",label:"Right",value:"right"}]},{type:"separator"},{group:"padding",label:this.STR_IMAGE_PADDING+":",buttons:[{type:"spin",label:"0",value:"padding",range:[0,50]}]},{type:"separator"},{group:"border",label:this.STR_IMAGE_BORDER+":",buttons:[{type:"select",label:this.STR_IMAGE_BORDER_SIZE,value:"bordersize",menu:[{text:"none",value:"0",checked:true},{text:"1px",value:"1"},{text:"2px",value:"2"},{text:"3px",value:"3"},{text:"4px",value:"4"},{text:"5px",value:"5"}]},{type:"select",label:this.STR_IMAGE_BORDER_TYPE,value:"bordertype",disabled:true,menu:[{text:"Solid",value:"solid",checked:true},{text:"Dashed",value:"dashed"},{text:"Dotted",value:"dotted"}]},{type:"color",label:"Border Color",value:"bordercolor",disabled:true}]}]};
YAHOO.widget.Editor.superclass.init.call(this,F,E);},_render:function(){YAHOO.widget.Editor.superclass._render.apply(this,arguments);var E=this;window.setTimeout(function(){E._renderPanel.call(E);},800);},initAttributes:function(E){YAHOO.widget.Editor.superclass.initAttributes.call(this,E);this.setAttributeConfig("localFileWarning",{value:E.locaFileWarning||true});this.setAttributeConfig("hiddencss",{value:E.hiddencss||".yui-hidden font, .yui-hidden strong, .yui-hidden b, .yui-hidden em, .yui-hidden i, .yui-hidden u, .yui-hidden div,.yui-hidden p,.yui-hidden span,.yui-hidden img, .yui-hidden ul, .yui-hidden ol, .yui-hidden li, .yui-hidden table { border: 1px dotted #ccc; } .yui-hidden .yui-non { border: none; } .yui-hidden img { padding: 2px; }",writeOnce:true});},_windows:null,_defaultImageToolbar:null,_defaultImageToolbarConfig:null,_fixNodes:function(){YAHOO.widget.Editor.superclass._fixNodes.call(this);var H="";var I=this._getDoc().getElementsByTagName("img");for(var F=0;F<I.length;F++){if(I[F].getAttribute("href",2)){H=I[F].getAttribute("src",2);if(this._isLocalFile(H)){C.addClass(I[F],this.CLASS_LOCAL_FILE);}else{C.removeClass(I[F],this.CLASS_LOCAL_FILE);}}}var G=this._getDoc().body.getElementsByTagName("a");for(var E=0;E<G.length;E++){if(G[E].getAttribute("href",2)){H=G[E].getAttribute("href",2);if(this._isLocalFile(H)){C.addClass(G[E],this.CLASS_LOCAL_FILE);}else{C.removeClass(G[E],this.CLASS_LOCAL_FILE);}}}},_disabled:["createlink","forecolor","backcolor","fontname","fontsize","superscript","subscript","removeformat","heading","indent"],_alwaysDisabled:{"outdent":true},_alwaysEnabled:{hiddenelements:true},_handleKeyDown:function(G){YAHOO.widget.Editor.superclass._handleKeyDown.call(this,G);var F=false,H=null,E=false;switch(G.keyCode){case this._keyMap.JUSTIFY_LEFT.key:if(this._checkKey(this._keyMap.JUSTIFY_LEFT,G)){H="justifyleft";F=true;}break;case this._keyMap.JUSTIFY_CENTER.key:if(this._checkKey(this._keyMap.JUSTIFY_CENTER,G)){H="justifycenter";F=true;}break;case 221:case this._keyMap.JUSTIFY_RIGHT.key:if(this._checkKey(this._keyMap.JUSTIFY_RIGHT,G)){H="justifyright";F=true;}break;}if(F&&H){this.execCommand(H,null);A.stopEvent(G);this.nodeChange();}},_renderCreateLinkWindow:function(){var H='<label for="'+this.get("id")+'_createlink_url"><strong>'+this.STR_LINK_URL+':</strong> <input type="text" name="'+this.get("id")+'_createlink_url" id="'+this.get("id")+'_createlink_url" value=""></label>';H+='<label for="'+this.get("id")+'_createlink_target"><strong>&nbsp;</strong><input type="checkbox" name="'+this.get("id")+'_createlink_target" id="'+this.get("id")+'_createlink_target" value="_blank" class="createlink_target"> '+this.STR_LINK_NEW_WINDOW+"</label>";H+='<label for="'+this.get("id")+'_createlink_title"><strong>'+this.STR_LINK_TITLE+':</strong> <input type="text" name="'+this.get("id")+'_createlink_title" id="'+this.get("id")+'_createlink_title" value=""></label>';var E=document.createElement("div");E.innerHTML=H;var G=document.createElement("div");G.className="removeLink";var F=document.createElement("a");F.href="#";F.innerHTML=this.STR_LINK_PROP_REMOVE;F.title=this.STR_LINK_PROP_REMOVE;A.on(F,"click",function(I){A.stopEvent(I);this.execCommand("unlink");this.closeWindow();},this,true);G.appendChild(F);E.appendChild(G);this._windows.createlink={};this._windows.createlink.body=E;E.style.display="none";this.get("panel").editor_form.appendChild(E);this.fireEvent("windowCreateLinkRender",{type:"windowCreateLinkRender",panel:this.get("panel"),body:E});return E;},_handleCreateLinkClick:function(){var E=this._getSelectedElement();if(this._isElement(E,"img")){this.STOP_EXEC_COMMAND=true;this.currentElement[0]=E;this.toolbar.fireEvent("insertimageClick",{type:"insertimageClick",target:this.toolbar});this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});return false;}if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue("createlink")){return false;}}this.on("afterExecCommand",function(){var K=new YAHOO.widget.EditorWindow("createlink",{width:"350px"});var I=this.currentElement[0],H="",L="",J="",G=false;if(I){K.el=I;if(I.getAttribute("href",2)!==null){H=I.getAttribute("href",2);if(this._isLocalFile(H)){K.setFooter(this.STR_LOCAL_FILE_WARNING);G=true;}else{K.setFooter(" ");}}if(I.getAttribute("title")!==null){L=I.getAttribute("title");}if(I.getAttribute("target")!==null){J=I.getAttribute("target");}}var F=null;if(this._windows.createlink&&this._windows.createlink.body){F=this._windows.createlink.body;}else{F=this._renderCreateLinkWindow();}K.setHeader(this.STR_LINK_PROP_TITLE);K.setBody(F);A.purgeElement(this.get("id")+"_createlink_url");C.get(this.get("id")+"_createlink_url").value=H;C.get(this.get("id")+"_createlink_title").value=L;C.get(this.get("id")+"_createlink_target").checked=((J)?true:false);A.onAvailable(this.get("id")+"_createlink_url",function(){var M=this.get("id");window.setTimeout(function(){try{YAHOO.util.Dom.get(M+"_createlink_url").focus();}catch(N){}},50);if(this._isLocalFile(H)){C.addClass(this.get("id")+"_createlink_url","warning");this.get("panel").setFooter(this.STR_LOCAL_FILE_WARNING);}else{C.removeClass(this.get("id")+"_createlink_url","warning");this.get("panel").setFooter(" ");}A.on(this.get("id")+"_createlink_url","blur",function(){var N=C.get(this.get("id")+"_createlink_url");if(this._isLocalFile(N.value)){C.addClass(N,"warning");this.get("panel").setFooter(this.STR_LOCAL_FILE_WARNING);}else{C.removeClass(N,"warning");this.get("panel").setFooter(" ");}},this,true);},this,true);this.openWindow(K);});},_handleCreateLinkWindowClose:function(){var G=C.get(this.get("id")+"_createlink_url"),I=C.get(this.get("id")+"_createlink_target"),K=C.get(this.get("id")+"_createlink_title"),H=arguments[0].win.el,E=H;if(G&&G.value){var J=G.value;if((J.indexOf(":/"+"/")==-1)&&(J.substring(0,1)!="/")&&(J.substring(0,6).toLowerCase()!="mailto")){if((J.indexOf("@")!=-1)&&(J.substring(0,6).toLowerCase()!="mailto")){J="mailto:"+J;}else{if(J.substring(0,1)!="#"){J="http:/"+"/"+J;
}}}H.setAttribute("href",J);if(I.checked){H.setAttribute("target",I.value);}else{H.setAttribute("target","");}H.setAttribute("title",((K.value)?K.value:""));}else{var F=this._getDoc().createElement("span");F.innerHTML=H.innerHTML;C.addClass(F,"yui-non");H.parentNode.replaceChild(F,H);}C.removeClass(G,"warning");C.get(this.get("id")+"_createlink_url").value="";C.get(this.get("id")+"_createlink_title").value="";C.get(this.get("id")+"_createlink_target").checked=false;this.nodeChange();this.currentElement=[];},_renderInsertImageWindow:function(){var G=this.currentElement[0];var M='<label for="'+this.get("id")+'_insertimage_url"><strong>'+this.STR_IMAGE_URL+':</strong> <input type="text" id="'+this.get("id")+'_insertimage_url" value="" size="40"></label>';var K=document.createElement("div");K.innerHTML=M;var J=document.createElement("div");J.id=this.get("id")+"_img_toolbar";K.appendChild(J);var I='<label for="'+this.get("id")+'_insertimage_title"><strong>'+this.STR_IMAGE_TITLE+':</strong> <input type="text" id="'+this.get("id")+'_insertimage_title" value="" size="40"></label>';I+='<label for="'+this.get("id")+'_insertimage_link"><strong>'+this.STR_LINK_URL+':</strong> <input type="text" name="'+this.get("id")+'_insertimage_link" id="'+this.get("id")+'_insertimage_link" value=""></label>';I+='<label for="'+this.get("id")+'_insertimage_target"><strong>&nbsp;</strong><input type="checkbox" name="'+this.get("id")+'_insertimage_target_" id="'+this.get("id")+'_insertimage_target" value="_blank" class="insertimage_target"> '+this.STR_LINK_NEW_WINDOW+"</label>";var E=document.createElement("div");E.innerHTML=I;K.appendChild(E);var F={};D.augmentObject(F,this._defaultImageToolbarConfig);var H=new YAHOO.widget.Toolbar(J,F);H.editor_el=G;this._defaultImageToolbar=H;var N=H.get("cont");var L=document.createElement("div");L.className="yui-toolbar-group yui-toolbar-group-height-width height-width";L.innerHTML="<h3>"+this.STR_IMAGE_SIZE+":</h3>";L.innerHTML+='<span tabIndex="-1"><input type="text" size="3" value="" id="'+this.get("id")+'_insertimage_width"> x <input type="text" size="3" value="" id="'+this.get("id")+'_insertimage_height"></span>';N.insertBefore(L,N.firstChild);A.onAvailable(this.get("id")+"_insertimage_width",function(){A.on(this.get("id")+"_insertimage_width","blur",function(){var O=parseInt(C.get(this.get("id")+"_insertimage_width").value,10);if(O>5){this._defaultImageToolbar.editor_el.style.width=O+"px";}},this,true);},this,true);A.onAvailable(this.get("id")+"_insertimage_height",function(){A.on(this.get("id")+"_insertimage_height","blur",function(){var O=parseInt(C.get(this.get("id")+"_insertimage_height").value,10);if(O>5){this._defaultImageToolbar.editor_el.style.height=O+"px";}},this,true);},this,true);H.on("colorPickerClicked",function(T){var P="1",S="solid",O="black",R=this._defaultImageToolbar.editor_el;if(R.style.borderLeftWidth){P=parseInt(R.style.borderLeftWidth,10);}if(R.style.borderLeftStyle){S=R.style.borderLeftStyle;}if(R.style.borderLeftColor){O=R.style.borderLeftColor;}var Q=P+"px "+S+" #"+T.color;R.style.border=Q;},this,true);H.on("buttonClick",function(V){var T=V.button.value,S=this._defaultImageToolbar.editor_el,R="";if(V.button.menucmd){T=V.button.menucmd;}var P="1",Q="solid",O="black";if(S.style.borderLeftWidth){P=parseInt(S.style.borderLeftWidth,10);}if(S.style.borderLeftStyle){Q=S.style.borderLeftStyle;}if(S.style.borderLeftColor){O=S.style.borderLeftColor;}switch(T){case"bordersize":if(this.browser.webkit&&this._lastImage){C.removeClass(this._lastImage,"selected");this._lastImage=null;}R=parseInt(V.button.value,10)+"px "+Q+" "+O;S.style.border=R;if(parseInt(V.button.value,10)>0){H.enableButton("bordertype");H.enableButton("bordercolor");}else{H.disableButton("bordertype");H.disableButton("bordercolor");}break;case"bordertype":if(this.browser.webkit&&this._lastImage){C.removeClass(this._lastImage,"selected");this._lastImage=null;}R=P+"px "+V.button.value+" "+O;S.style.border=R;break;case"right":case"left":H.deselectAllButtons();S.style.display="";S.align=V.button.value;break;case"inline":H.deselectAllButtons();S.style.display="";S.align="";break;case"block":H.deselectAllButtons();S.style.display="block";S.align="center";break;case"padding":var U=H.getButtonById(V.button.id);S.style.margin=U.get("label")+"px";break;}H.selectButton(V.button.value);if(T!=="padding"){this.moveWindow();}},this,true);if(this.get("localFileWarning")){A.on(this.get("id")+"_insertimage_link","blur",function(){var O=C.get(this.get("id")+"_insertimage_link");if(this._isLocalFile(O.value)){C.addClass(O,"warning");this.get("panel").setFooter(this.STR_LOCAL_FILE_WARNING);}else{C.removeClass(O,"warning");this.get("panel").setFooter(" ");if((this.browser.webkit&&!this.browser.webkit3||this.browser.air)||this.browser.opera){this.get("panel").setFooter(this.STR_IMAGE_COPY);}}},this,true);}A.on(this.get("id")+"_insertimage_url","blur",function(){var Q=C.get(this.get("id")+"_insertimage_url");if(Q.value&&G){if(Q.value==G.getAttribute("src",2)){return false;}}if(this._isLocalFile(Q.value)){C.addClass(Q,"warning");this.get("panel").setFooter(this.STR_LOCAL_FILE_WARNING);}else{if(this.currentElement[0]){C.removeClass(Q,"warning");this.get("panel").setFooter(" ");if((this.browser.webkit&&!this.browser.webkit3||this.browser.air)||this.browser.opera){this.get("panel").setFooter(this.STR_IMAGE_COPY);}if(Q&&Q.value&&(Q.value!=this.STR_IMAGE_HERE)){this.currentElement[0].setAttribute("src",Q.value);var P=this,O=new Image();O.onerror=function(){Q.value=P.STR_IMAGE_HERE;O.setAttribute("src",P.get("blankimage"));P.currentElement[0].setAttribute("src",P.get("blankimage"));YAHOO.util.Dom.get(P.get("id")+"_insertimage_height").value=O.height;YAHOO.util.Dom.get(P.get("id")+"_insertimage_width").value=O.width;};var R=this.get("id");window.setTimeout(function(){YAHOO.util.Dom.get(R+"_insertimage_height").value=O.height;YAHOO.util.Dom.get(R+"_insertimage_width").value=O.width;if(P.currentElement&&P.currentElement[0]){if(!P.currentElement[0]._height){P.currentElement[0]._height=O.height;
}if(!P.currentElement[0]._width){P.currentElement[0]._width=O.width;}}},800);if(Q.value!=this.STR_IMAGE_HERE){O.src=Q.value;}}}}},this,true);this._windows.insertimage={};this._windows.insertimage.body=K;K.style.display="none";this.get("panel").editor_form.appendChild(K);this.fireEvent("windowInsertImageRender",{type:"windowInsertImageRender",panel:this.get("panel"),body:K,toolbar:H});return K;},_handleInsertImageClick:function(){if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue("insertimage")){return false;}}this.on("afterExecCommand",function(){var H=this.currentElement[0],P=null,M="",a="",G=null,b="",L="",Y="",S=75,W=75,R=0,N=0,K=0,T=false,J=new YAHOO.widget.EditorWindow("insertimage",{width:"415px"});if(!H){H=this._getSelectedElement();}if(H){J.el=H;if(H.getAttribute("src")){L=H.getAttribute("src",2);if(L.indexOf(this.get("blankimage"))!=-1){L=this.STR_IMAGE_HERE;T=true;}}if(H.getAttribute("alt",2)){b=H.getAttribute("alt",2);}if(H.getAttribute("title",2)){b=H.getAttribute("title",2);}if(H.parentNode&&this._isElement(H.parentNode,"a")){M=H.parentNode.getAttribute("href",2);if(H.parentNode.getAttribute("target")!==null){a=H.parentNode.getAttribute("target");}}S=parseInt(H.height,10);W=parseInt(H.width,10);if(H.style.height){S=parseInt(H.style.height,10);}if(H.style.width){W=parseInt(H.style.width,10);}if(H.style.margin){R=parseInt(H.style.margin,10);}if(!H._height){H._height=S;}if(!H._width){H._width=W;}N=H._height;K=H._width;}if(this._windows.insertimage&&this._windows.insertimage.body){P=this._windows.insertimage.body;this._defaultImageToolbar.resetAllButtons();}else{P=this._renderInsertImageWindow();}G=this._defaultImageToolbar;G.editor_el=H;var F="0";var V="solid";if(H.style.borderLeftWidth){F=parseInt(H.style.borderLeftWidth,10);}if(H.style.borderLeftStyle){V=H.style.borderLeftStyle;}var Z=G.getButtonByValue("bordersize");var X=((parseInt(F,10)>0)?"":"none");Z.set("label",'<span class="yui-toolbar-bordersize-'+F+'">'+X+"</span>");this._updateMenuChecked("bordersize",F,G);var O=G.getButtonByValue("bordertype");O.set("label",'<span class="yui-toolbar-bordertype-'+V+'"></span>');this._updateMenuChecked("bordertype",V,G);if(parseInt(F,10)>0){G.enableButton(O);G.enableButton(Z);G.enableButton("bordercolor");}if((H.align=="right")||(H.align=="left")){G.selectButton(H.align);}else{if(H.style.display=="block"){G.selectButton("block");}else{G.selectButton("inline");}}if(parseInt(H.style.marginLeft,10)>0){G.getButtonByValue("padding").set("label",""+parseInt(H.style.marginLeft,10));}if(H.style.borderSize){G.selectButton("bordersize");G.selectButton(parseInt(H.style.borderSize,10));}G.getButtonByValue("padding").set("label",""+R);J.setHeader(this.STR_IMAGE_PROP_TITLE);J.setBody(P);if((this.browser.webkit&&!this.browser.webkit3||this.browser.air)||this.browser.opera){J.setFooter(this.STR_IMAGE_COPY);}this.openWindow(J);C.get(this.get("id")+"_insertimage_url").value=L;C.get(this.get("id")+"_insertimage_title").value=b;C.get(this.get("id")+"_insertimage_link").value=M;C.get(this.get("id")+"_insertimage_target").checked=((a)?true:false);C.get(this.get("id")+"_insertimage_width").value=W;C.get(this.get("id")+"_insertimage_height").value=S;var I="";if((S!=N)||(W!=K)){var Q=document.createElement("span");Q.className="info";Q.innerHTML=this.STR_IMAGE_ORIG_SIZE+": ("+K+" x "+N+")";if(C.get(this.get("id")+"_insertimage_height").nextSibling){var E=C.get(this.get("id")+"_insertimage_height").nextSibling;E.parentNode.removeChild(E);}C.get(this.get("id")+"_insertimage_height").parentNode.appendChild(Q);}this.toolbar.selectButton("insertimage");var U=this.get("id");window.setTimeout(function(){try{YAHOO.util.Dom.get(U+"_insertimage_url").focus();if(T){YAHOO.util.Dom.get(U+"_insertimage_url").select();}}catch(c){}},50);});},_handleInsertImageWindowClose:function(){var E=C.get(this.get("id")+"_insertimage_url"),L=C.get(this.get("id")+"_insertimage_title"),I=C.get(this.get("id")+"_insertimage_link"),J=C.get(this.get("id")+"_insertimage_target"),H=arguments[0].win.el;if(E&&E.value&&(E.value!=this.STR_IMAGE_HERE)){H.setAttribute("src",E.value);H.setAttribute("title",L.value);H.setAttribute("alt",L.value);var G=H.parentNode;if(I.value){var K=I.value;if((K.indexOf(":/"+"/")==-1)&&(K.substring(0,1)!="/")&&(K.substring(0,6).toLowerCase()!="mailto")){if((K.indexOf("@")!=-1)&&(K.substring(0,6).toLowerCase()!="mailto")){K="mailto:"+K;}else{K="http:/"+"/"+K;}}if(G&&this._isElement(G,"a")){G.setAttribute("href",K);if(J.checked){G.setAttribute("target",J.value);}else{G.setAttribute("target","");}}else{var F=this._getDoc().createElement("a");F.setAttribute("href",K);if(J.checked){F.setAttribute("target",J.value);}else{F.setAttribute("target","");}H.parentNode.replaceChild(F,H);F.appendChild(H);}}else{if(G&&this._isElement(G,"a")){G.parentNode.replaceChild(H,G);}}}else{H.parentNode.removeChild(H);}C.get(this.get("id")+"_insertimage_url").value="";C.get(this.get("id")+"_insertimage_title").value="";C.get(this.get("id")+"_insertimage_link").value="";C.get(this.get("id")+"_insertimage_target").checked=false;C.get(this.get("id")+"_insertimage_width").value=0;C.get(this.get("id")+"_insertimage_height").value=0;this._defaultImageToolbar.resetAllButtons();this.currentElement=[];this.nodeChange();},EDITOR_PANEL_ID:"-panel",_renderPanel:function(){var E=new YAHOO.widget.Overlay(this.get("id")+this.EDITOR_PANEL_ID,{width:"300px",iframe:true,visible:false,underlay:"none",draggable:false,close:false});this.set("panel",E);this.get("panel").setBody("---");this.get("panel").setHeader(" ");this.get("panel").setFooter(" ");var J=document.createElement("div");J.className=this.CLASS_PREFIX+"-body-cont";for(var K in this.browser){if(this.browser[K]){C.addClass(J,K);break;}}C.addClass(J,((YAHOO.widget.Button&&(this._defaultToolbar.buttonType=="advanced"))?"good-button":"no-button"));var H=document.createElement("h3");H.className="yui-editor-skipheader";H.innerHTML=this.STR_CLOSE_WINDOW_NOTE;J.appendChild(H);var F=document.createElement("form");
F.setAttribute("method","GET");E.editor_form=F;A.on(F,"submit",function(N){A.stopEvent(N);},this,true);J.appendChild(F);var G=document.createElement("span");G.innerHTML="X";G.title=this.STR_CLOSE_WINDOW;G.className="close";A.on(G,"click",this.closeWindow,this,true);var L=document.createElement("span");L.innerHTML="^";L.className="knob";E.editor_knob=L;var M=document.createElement("h3");E.editor_header=M;M.innerHTML="<span></span>";E.setHeader(" ");E.appendToHeader(M);M.appendChild(G);M.appendChild(L);E.setBody(" ");E.setFooter(" ");E.appendToBody(J);A.on(E.element,"click",function(N){A.stopPropagation(N);});var I=function(){};E.showEvent.subscribe(I,this,true);E.renderEvent.subscribe(function(){this._renderInsertImageWindow();this._renderCreateLinkWindow();this.fireEvent("windowRender",{type:"windowRender",panel:E});},this,true);if(this.DOMReady){this.get("panel").render(document.body);C.addClass(this.get("panel").element,"yui-editor-panel");}else{A.onDOMReady(function(){this.get("panel").render(document.body);C.addClass(this.get("panel").element,"yui-editor-panel");},this,true);}this.get("panel").showEvent.subscribe(function(){YAHOO.util.Dom.setStyle(this.element,"display","block");});return this.get("panel");},openWindow:function(K){var P=this;window.setTimeout(function(){P.toolbar.set("disabled",true);},10);A.on(document,"keydown",this._closeWindow,this,true);if(this.currentWindow){this.closeWindow();}var Q=C.getXY(this.currentElement[0]),N=C.getXY(this.get("iframe").get("element")),E=this.get("panel"),H=[(Q[0]+N[0]-20),(Q[1]+N[1]+10)],G=(parseInt(K.attrs.width,10)/2),L="center",J=null;this.fireEvent("beforeOpenWindow",{type:"beforeOpenWindow",win:K,panel:E});var F=E.editor_form;var I=this._windows;for(var O in I){if(D.hasOwnProperty(I,O)){if(I[O]&&I[O].body){if(O==K.name){C.setStyle(I[O].body,"display","block");}else{C.setStyle(I[O].body,"display","none");}}}}if(this._windows[K.name].body){C.setStyle(this._windows[K.name].body,"display","block");F.appendChild(this._windows[K.name].body);}else{if(D.isObject(K.body)){F.appendChild(K.body);}else{var M=document.createElement("div");M.innerHTML=K.body;F.appendChild(M);}}E.editor_header.firstChild.innerHTML=K.header;if(K.footer!==null){E.setFooter(K.footer);C.addClass(E.footer,"open");}else{C.removeClass(E.footer,"open");}E.cfg.setProperty("width",K.attrs.width);this.currentWindow=K;this.moveWindow(true);E.show();this.fireEvent("afterOpenWindow",{type:"afterOpenWindow",win:K,panel:E});},moveWindow:function(F){if(!this.currentWindow){return false;}var I=this.currentWindow,J=C.getXY(this.currentElement[0]),a=C.getXY(this.get("iframe").get("element")),O=this.get("panel"),Y=[(J[0]+a[0]),(J[1]+a[1])],R=(parseInt(I.attrs.width,10)/2),U="center",Q=O.cfg.getProperty("xy")||[0,0],G=O.editor_knob,X=0,L=0,T=false;Y[0]=((Y[0]-R)+20);Y[0]=Y[0]-C.getDocumentScrollLeft(this._getDoc());Y[1]=Y[1]-C.getDocumentScrollTop(this._getDoc());if(this._isElement(this.currentElement[0],"img")){if(this.currentElement[0].src.indexOf(this.get("blankimage"))!=-1){Y[0]=(Y[0]+(75/2));Y[1]=(Y[1]+75);}else{var N=parseInt(this.currentElement[0].width,10);var W=parseInt(this.currentElement[0].height,10);Y[0]=(Y[0]+(N/2));Y[1]=(Y[1]+W);}Y[1]=Y[1]+15;}else{var K=C.getStyle(this.currentElement[0],"fontSize");if(K&&K.indexOf&&K.indexOf("px")!=-1){Y[1]=Y[1]+parseInt(C.getStyle(this.currentElement[0],"fontSize"),10)+5;}else{Y[1]=Y[1]+20;}}if(Y[0]<a[0]){Y[0]=a[0]+5;U="left";}if((Y[0]+(R*2))>(a[0]+parseInt(this.get("iframe").get("element").clientWidth,10))){Y[0]=((a[0]+parseInt(this.get("iframe").get("element").clientWidth,10))-(R*2)-5);U="right";}try{X=(Y[0]-Q[0]);L=(Y[1]-Q[1]);}catch(b){}if(this.get("autoHeight")===false){var P=a[1]+parseInt(this.get("height"),10);var H=a[0]+parseInt(this.get("width"),10);if(Y[1]>P){Y[1]=P;}if(Y[0]>H){Y[0]=(H/2);}}X=((X<0)?(X*-1):X);L=((L<0)?(L*-1):L);if(((X>10)||(L>10))||F){var S=0,V=0;if(this.currentElement[0].width){V=(parseInt(this.currentElement[0].width,10)/2);}var M=J[0]+a[0]+V;S=M-Y[0];if(S>(parseInt(I.attrs.width,10)-1)){S=((parseInt(I.attrs.width,10)-30)-1);}else{if(S<40){S=1;}}if(isNaN(S)){S=1;}if(F){if(G){G.style.left=S+"px";}O.cfg.setProperty("xy",Y);}else{if(this.get("animate")){T=new YAHOO.util.Anim(O.element,{},0.5,YAHOO.util.Easing.easeOut);T.attributes={top:{to:Y[1]},left:{to:Y[0]}};T.onComplete.subscribe(function(){O.cfg.setProperty("xy",Y);});var Z=new YAHOO.util.Anim(O.iframe,T.attributes,0.5,YAHOO.util.Easing.easeOut);var E=new YAHOO.util.Anim(G,{left:{to:S}},0.6,YAHOO.util.Easing.easeOut);T.animate();Z.animate();E.animate();}else{G.style.left=S+"px";O.cfg.setProperty("xy",Y);}}}},_closeWindow:function(E){if(this._checkKey(this._keyMap.CLOSE_WINDOW,E)){if(this.currentWindow){this.closeWindow();}}},closeWindow:function(E){this.fireEvent("window"+this.currentWindow.name+"Close",{type:"window"+this.currentWindow.name+"Close",win:this.currentWindow,el:this.currentElement[0]});this.fireEvent("closeWindow",{type:"closeWindow",win:this.currentWindow});this.currentWindow=null;this.get("panel").hide();this.get("panel").cfg.setProperty("xy",[-900,-900]);this.get("panel").syncIframe();this.unsubscribeAll("afterExecCommand");this.toolbar.set("disabled",false);this.toolbar.resetAllButtons();this._focusWindow();A.removeListener(document,"keydown",this._closeWindow);},cmd_undo:function(F){if(this._hasUndoLevel()){if(!this._undoLevel){this._undoLevel=this._undoCache.length;}this._undoLevel=(this._undoLevel-1);if(this._undoCache[this._undoLevel]){var E=this._getUndo(this._undoLevel);this.setEditorHTML(E);}else{this._undoLevel=null;this.toolbar.disableButton("undo");}}return[false];},cmd_redo:function(F){this._undoLevel=this._undoLevel+1;if(this._undoLevel>=this._undoCache.length){this._undoLevel=this._undoCache.length;}if(this._undoCache[this._undoLevel]){var E=this._getUndo(this._undoLevel);this.setEditorHTML(E);}else{this.toolbar.disableButton("redo");}return[false];},cmd_heading:function(I){var F=true,G=null,H="heading",J=this._getSelection(),E=this._getSelectedElement();
if(E){J=E;}if(this.browser.ie){H="formatblock";}if(I=="none"){if((J&&J.tagName&&(J.tagName.toLowerCase().substring(0,1)=="h"))||(J&&J.parentNode&&J.parentNode.tagName&&(J.parentNode.tagName.toLowerCase().substring(0,1)=="h"))){if(J.parentNode.tagName.toLowerCase().substring(0,1)=="h"){J=J.parentNode;}if(this._isElement(J,"html")){return[false];}G=this._swapEl(E,"span",function(K){K.className="yui-non";});this._selectNode(G);this.currentElement[0]=G;}F=false;}else{if(this._isElement(E,"h1")||this._isElement(E,"h2")||this._isElement(E,"h3")||this._isElement(E,"h4")||this._isElement(E,"h5")||this._isElement(E,"h6")){G=this._swapEl(E,I);this._selectNode(G);this.currentElement[0]=G;}else{this._createCurrentElement(I);this._selectNode(this.currentElement[0]);}F=false;}return[F,H];},cmd_hiddenelements:function(E){if(this._showingHiddenElements){this._lastButton=null;this._showingHiddenElements=false;this.toolbar.deselectButton("hiddenelements");C.removeClass(this._getDoc().body,this.CLASS_HIDDEN);}else{this._showingHiddenElements=true;C.addClass(this._getDoc().body,this.CLASS_HIDDEN);this.toolbar.selectButton("hiddenelements");}return[false];},cmd_removeformat:function(H){var F=true;if(this.browser.webkit&&!this._getDoc().queryCommandEnabled("removeformat")){var E=this._getSelection()+"";this._createCurrentElement("span");this.currentElement[0].className="yui-non";this.currentElement[0].innerHTML=E;for(var G=1;G<this.currentElement.length;G++){this.currentElement[G].parentNode.removeChild(this.currentElement[G]);}F=false;}return[F];},cmd_script:function(K,J){var G=true,E=K.toLowerCase().substring(0,3),H=null,F=this._getSelectedElement();if(this.browser.webkit){if(this._isElement(F,E)){H=this._swapEl(this.currentElement[0],"span",function(L){L.className="yui-non";});this._selectNode(H);}else{this._createCurrentElement(E);var I=this._swapEl(this.currentElement[0],E);this._selectNode(I);this.currentElement[0]=I;}G=false;}return G;},cmd_superscript:function(E){return[this.cmd_script("superscript",E)];},cmd_subscript:function(E){return[this.cmd_script("subscript",E)];},cmd_indent:function(H){var E=true,G=this._getSelectedElement(),I=null;if(this.browser.ie){if(this._isElement(G,"blockquote")){I=this._getDoc().createElement("blockquote");I.innerHTML=G.innerHTML;G.innerHTML="";G.appendChild(I);this._selectNode(I);}else{I=this._getDoc().createElement("blockquote");var F=this._getRange().htmlText;I.innerHTML=F;this._createCurrentElement("blockquote");this.currentElement[0].parentNode.replaceChild(I,this.currentElement[0]);this.currentElement[0]=I;this._selectNode(this.currentElement[0]);}E=false;}else{H="blockquote";}return[E,"formatblock",H];},cmd_outdent:function(I){var E=true,H=this._getSelectedElement(),J=null,F=null;if(this.browser.webkit||this.browser.ie){H=this._getSelectedElement();if(this._isElement(H,"blockquote")){var G=H.parentNode;if(this._isElement(H.parentNode,"blockquote")){G.innerHTML=H.innerHTML;this._selectNode(G);}else{F=this._getDoc().createElement("span");F.innerHTML=H.innerHTML;YAHOO.util.Dom.addClass(F,"yui-non");G.replaceChild(F,H);this._selectNode(F);}}else{}E=false;}else{I=false;}return[E,"outdent",I];},cmd_justify:function(E){if(this.browser.ie){if(this._hasSelection()){this._createCurrentElement("span");this._swapEl(this.currentElement[0],"div",function(F){F.style.textAlign=E;});return[false];}}return[true,"justify"+E,""];},cmd_justifycenter:function(){return[this.cmd_justify("center")];},cmd_justifyleft:function(){return[this.cmd_justify("left")];},cmd_justifyright:function(){return[this.cmd_justify("right")];},toString:function(){var E="Editor";if(this.get&&this.get("element_cont")){E="Editor (#"+this.get("element_cont").get("id")+")"+((this.get("disabled")?" Disabled":""));}return E;}});YAHOO.widget.EditorWindow=function(F,E){this.name=F.replace(" ","_");this.attrs=E;};YAHOO.widget.EditorWindow.prototype={header:null,body:null,footer:null,setHeader:function(E){this.header=E;},setBody:function(E){this.body=E;},setFooter:function(E){this.footer=E;},toString:function(){return"Editor Window ("+this.name+")";}};})();YAHOO.register("editor",YAHOO.widget.Editor,{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 XHTML_LAYOUT_PROPERTY="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 XHTML_LAYOUT_NOSPAN="nospan";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.isFF3OrNewer&&c!=null?c+":":"")+a)}};ORBEON.util.Dom={ELEMENT_TYPE:1,isElement:function(a){return a.nodeType==this.ELEMENT_TYPE},getElementById:function(a){return YAHOO.util.Dom.get(a)},getElementByIdNoCache:function(a){return YAHOO.util.Dom.get(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);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))}},getElementByTagName:function(d,e){var c=null;if(YAHOO.lang.isArray(e)){var b=e;for(var a=0;a<b.length;a++){var e=b[a];var c=ORBEON.util.Dom.getElementByTagName(d,e);if(c!=null){break}}}else{if(d.tagName.toLowerCase()==e){c=d}else{var f=d.getElementsByTagName(e);if(f.length==1){c=f[0]}}}return c},isAncestorOrSelfHidden:function(a){while(true){if(a==null){return false}if(!YAHOO.lang.isUndefined(a.style)&&YAHOO.util.Dom.getStyle(a,"display")=="none"){return true}a=a.parentNode}}};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(e){var g=ORBEON.util.Utils.getProperty(FORMAT_INPUT_DATE_PROPERTY);var b=g.split(new RegExp("[\\[\\]]"));var a=[];for(var c=0;c<b.length;c++){var f=b[c];function d(j){var h=j.apply(e).toString();if(f.indexOf("01")==1&&h.length<2){h="0"+h}a.push(h)}if(f==""){}else{if(f.indexOf("D")==0){d(e.getDate)}else{if(f.indexOf("M")==0){d(function(){return this.getMonth()+1})}else{if(f.indexOf("Y")==0){d(e.getFullYear)}else{a.push(f)}}}}}return a.join("")},_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 ORBEON.util.DateTime._newDate(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 ORBEON.util.DateTime._newDate(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 ORBEON.util.DateTime._newDate(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 ORBEON.util.DateTime._newDate(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).indexOf("[D")==0){b=ORBEON.util.DateTime._newDate(ORBEON.util.DateTime._parseYear(a[3]),parseInt(a[2],10)-1,parseInt(a[1],10))}else{b=ORBEON.util.DateTime._newDate(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).indexOf("[D")==0){b=ORBEON.util.DateTime._newDate(ORBEON.util.DateTime._currentYear,parseInt(a[1],10)-1,parseInt(a[2],10))}else{b=ORBEON.util.DateTime._newDate(ORBEON.util.DateTime._currentYear,parseInt(a[2],10)-1,parseInt(a[1],10))}return b}},{re:/(^\d{4})-(\d{1,2})-(\d{1,2})(Z|([+-]\d{2}:\d{2}))?$/,handler:function(a){return ORBEON.util.DateTime._newDate(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},_newDate:function(c,d,b){var a=new Date(c,d,b);return a.getFullYear()==c&&a.getMonth()==d&&a.getDate()==b?a:null}};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;case XHTML_LAYOUT_PROPERTY:return XHTML_LAYOUT_NOSPAN}return null},isNewXHTMLLayout:function(){return ORBEON.util.Utils.getProperty(NEW_XHTML_LAYOUT_PROPERTY)||ORBEON.util.Utils.getProperty(XHTML_LAYOUT_PROPERTY)!=XHTML_LAYOUT_NOSPAN},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(a,b,d){function c(){if(ORBEON.xforms.Globals.requestInProgress||ORBEON.xforms.Globals.eventQueue.length>0){setTimeout(c,100)}else{a.resume(function(){d.call(a)})}}b.call(a);setTimeout(c,100);a.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("#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(j){if(ORBEON.util.Dom.hasClass(j,"xforms-type-time")){var h=YAHOO.util.Dom.getElementsByClassName("xforms-input-input",null,j)[0].value;var t=ORBEON.util.DateTime.magicTimeToJSDate(h);return t==null?h:ORBEON.util.DateTime.jsDateToISOTime(t)}else{if(ORBEON.util.Dom.hasClass(j,"xforms-type-date")){var a;if(ORBEON.util.Dom.hasClass(j,"xforms-input-appearance-minimal")){var m=YAHOO.util.Dom.getElementsByClassName("xforms-input-appearance-minimal","img",j)[0];a=ORBEON.util.Dom.getAttribute(m,"alt")}else{a=YAHOO.util.Dom.getElementsByClassName("xforms-input-input",null,j)[0].value}var f=ORBEON.util.DateTime.magicDateToJSDate(a);return f==null?a:ORBEON.util.DateTime.jsDateToISODate(f)}else{if(ORBEON.util.Dom.hasClass(j,"xforms-type-dateTime")){var z=YAHOO.util.Dom.getElementsByClassName("xforms-type-date",null,j)[0].value;var b=ORBEON.util.DateTime.magicDateToJSDate(z);var k=YAHOO.util.Dom.getElementsByClassName("xforms-type-time",null,j)[0].value;var o=ORBEON.util.DateTime.magicTimeToJSDate(k);if(b==null||o==null){return z==""&&k==""?"":z+"T"+k}else{return ORBEON.util.DateTime.jsDateToISODateTime(b,o)}}else{if((ORBEON.util.Dom.hasClass(j,"xforms-input")&&!ORBEON.util.Dom.hasClass(j,"xforms-type-boolean")&&!ORBEON.util.Dom.hasClass(j,"xforms-static"))||ORBEON.util.Dom.hasClass(j,"xforms-secret")){var n=j.tagName.toLowerCase()=="input"?j:j.getElementsByTagName("input")[0];return n.value}else{if(ORBEON.util.Dom.hasClass(j,"xforms-select1-open")){return YAHOO.util.Dom.getElementsByClassName("xforms-select1-open-input",null,j)[0].value}else{if(ORBEON.util.Dom.hasClass(j,"xforms-select-appearance-full")||ORBEON.util.Dom.hasClass(j,"xforms-select1-appearance-full")||(ORBEON.util.Dom.hasClass(j,"xforms-input")&&ORBEON.util.Dom.hasClass(j,"xforms-type-boolean"))){var d=j.getElementsByTagName("input");var A="";for(var r=0;r<d.length;r++){var n=d[r];if(n.checked){if(A!=""){A+=" "}A+=n.value}}if(A==""&&ORBEON.util.Dom.hasClass(j,"xforms-type-boolean")){A="false"}return A}else{if(ORBEON.util.Dom.hasClass(j,"xforms-select-appearance-compact")||ORBEON.util.Dom.hasClass(j,"xforms-select1-appearance-minimal")||ORBEON.util.Dom.hasClass(j,"xforms-select1-appearance-compact")||ORBEON.util.Dom.hasClass(j,"xforms-input-appearance-minimal")||ORBEON.util.Dom.hasClass(j,"xforms-input-appearance-compact")){var e=ORBEON.util.Utils.isNewXHTMLLayout()?j.getElementsByTagName("select")[0].options:j.options;var B="";for(var g=0;g<e.length;g++){var p=e[g];if(p.selected){if(B!=""){B+=" "}B+=p.value}}return B}else{if(ORBEON.util.Dom.hasClass(j,"xforms-textarea")&&!ORBEON.util.Dom.hasClass(j,"xforms-mediatype-text-html")){var q=j.tagName.toLowerCase()=="textarea"?j:j.getElementsByTagName("textarea")[0];return q.value}else{if(ORBEON.util.Dom.hasClass(j,"xforms-textarea")&&ORBEON.util.Dom.hasClass(j,"xforms-mediatype-text-html")){if(ORBEON.util.Utils.getProperty(HTML_EDITOR_PROPERTY)=="yui"){return ORBEON.widgets.RTE.getValue(j)}else{var y=FCKeditorAPI.GetInstance(j.name);return y.GetXHTML()}}else{if(ORBEON.util.Dom.hasClass(j,"xforms-output")||(ORBEON.util.Dom.hasClass(j,"xforms-input")&&ORBEON.util.Dom.hasClass(j,"xforms-static"))){if(ORBEON.util.Dom.hasClass(j,"xforms-mediatype-image")){var s=ORBEON.util.Dom.getChildElementByIndex(j,0);return s.src}else{if(ORBEON.util.Dom.hasClass(j,"xforms-mediatype-text-html")){return j.innerHTML}else{var x=ORBEON.util.Utils.isNewXHTMLLayout()?j.getElementsByTagName("span")[0]:j;return ORBEON.util.Dom.getStringValue(x)}}}else{if(ORBEON.util.Dom.hasClass(j,"xforms-select-appearance-xxforms-tree")||ORBEON.util.Dom.hasClass(j,"xforms-select1-appearance-xxforms-tree")){var u=ORBEON.util.Dom.hasClass(j,"xforms-select1-appearance-xxforms-tree");var c=ORBEON.xforms.Globals.treeYui[j.id];var l="";for(var w in c._nodes){var v=c._nodes[w];if(u){if(YAHOO.util.Dom.hasClass(v.getLabelEl(),"xforms-tree-label-selected")){return v.data.value}}else{if(v.checkState==2){if(l!=""){l+=" "}l+=v.data.value}}}return l}else{if(ORBEON.util.Dom.hasClass(j,"xforms-range")){return ORBEON.xforms.Globals.sliderYui[j.id].previousVal/200}}}}}}}}}}}}},setCurrentValue:function(y,K,t,r,q,p){var I=ORBEON.util.Dom.hasClass(y,"xforms-static");if(ORBEON.util.Dom.hasClass(y,"xforms-output-appearance-xxforms-download")){var d=ORBEON.util.Dom.getElementsByName(y,"a")[0];if(K==""){d.setAttribute("href","#");YAHOO.util.Dom.addClass(d,"xforms-readonly")}else{d.setAttribute("href",K);YAHOO.util.Dom.removeClass(d,"xforms-readonly")}}else{if(ORBEON.util.Dom.hasClass(y,"xforms-output")||I){if(ORBEON.util.Dom.hasClass(y,"xforms-mediatype-image")){var b=ORBEON.util.Utils.isNewXHTMLLayout()?YAHOO.util.Dom.getElementsByClassName("xforms-output-output",null,y)[0]:ORBEON.util.Dom.getChildElementByIndex(y,0);b.src=K}else{var A=ORBEON.util.Utils.isNewXHTMLLayout()?YAHOO.util.Dom.getElementsByClassName("xforms-output-output",null,y)[0]:y;if(ORBEON.util.Dom.hasClass(y,"xforms-mediatype-text-html")){A.innerHTML=K}else{ORBEON.util.Dom.setStringValue(A,K)}}}else{if(ORBEON.xforms.Globals.changedIdsRequest[y.id]!=null){}else{if(ORBEON.util.Dom.hasClass(y,"xforms-trigger")||ORBEON.util.Dom.hasClass(y,"xforms-submit")){}else{if(ORBEON.util.Dom.hasClass(y,"xforms-select1-open")){if(y.value!=K){y.value=K;y.getElementsByTagName("input")[0].value=K;y.previousValue=K}}else{if(ORBEON.util.Dom.hasClass(y,"xforms-type-time")){var E=y.getElementsByTagName("input")[0];var V=ORBEON.util.DateTime.magicTimeToJSDate(K);E.value=V==null?K:ORBEON.util.DateTime.jsDateToformatDisplayTime(V)}else{if(ORBEON.util.Dom.hasClass(y,"xforms-type-date")){var V=ORBEON.util.DateTime.magicDateToJSDate(K);var h=V==null?K:ORBEON.util.DateTime.jsDateToformatDisplayDate(V);if(ORBEON.util.Dom.hasClass(y,"xforms-input-appearance-minimal")){var z=y.getElementsByTagName("img")[0];ORBEON.util.Dom.setAttribute(z,"alt",h)}else{var E=y.getElementsByTagName("input")[0];E.value=h}}else{if((ORBEON.util.Dom.hasClass(y,"xforms-input")&&!ORBEON.util.Dom.hasClass(y,"xforms-type-boolean"))||ORBEON.util.Dom.hasClass(y,"xforms-secret")){var a=y.tagName.toLowerCase()=="input"?y:y.getElementsByTagName("input")[0];if(y.value!=K){y.previousValue=K;y.valueSetByXForms++;y.value=K}if(a.value!=K){a.value=K}if(t!=null){if(t==""){a.removeAttribute("size")}else{a.size=t}}if(r!=null){if(r==""){a.removeAttribute("maxlength")}else{a.maxLength=r}}if(q!=null){if(r==""){a.removeAttribute("autocomplete")}else{a.autocomplete=q}}}else{if(ORBEON.util.Dom.hasClass(y,"xforms-select-appearance-full")||ORBEON.util.Dom.hasClass(y,"xforms-select1-appearance-full")||(ORBEON.util.Dom.hasClass(y,"xforms-input")&&ORBEON.util.Dom.hasClass(y,"xforms-type-boolean"))){var D=ORBEON.util.Dom.hasClass(y,"xforms-select-appearance-full")?K.split(" "):new Array(K);var J=y.getElementsByTagName("input");for(var j=0;j<J.length;j++){var o=J[j];o.checked=xformsArrayContains(D,o.value)}ORBEON.xforms.Controls._setRadioCheckboxClasses(y)}else{if(ORBEON.util.Dom.hasClass(y,"xforms-select-appearance-compact")||ORBEON.util.Dom.hasClass(y,"xforms-select1-appearance-compact")||ORBEON.util.Dom.hasClass(y,"xforms-select1-appearance-minimal")||ORBEON.util.Dom.hasClass(y,"xforms-input-appearance-compact")||ORBEON.util.Dom.hasClass(y,"xforms-input-appearance-minimal")){var D=ORBEON.util.Dom.hasClass(y,"xforms-select-appearance-compact")?K.split(" "):new Array(K);var O=ORBEON.util.Utils.isNewXHTMLLayout()?y.getElementsByTagName("select")[0]:y;var x=O.options;if(x!=null){for(var M=0;M<x.length;M++){var L=x[M];try{L.selected=xformsArrayContains(D,L.value)}catch(Q){}}}}else{if(ORBEON.util.Dom.hasClass(y,"xforms-type-dateTime")){if(ORBEON.xforms.Controls.getCurrentValue(y)!=K){var T=K.indexOf("T");var v=K.substring(0,T);var R=ORBEON.util.DateTime.magicDateToJSDate(v);var H=y.getElementsByTagName("input")[0];H.value=R==null?v:ORBEON.util.DateTime.jsDateToformatDisplayDate(R);var S=K.substring(T+1);var s=ORBEON.util.DateTime.magicTimeToJSDate(S);var F=y.getElementsByTagName("input")[1];F.value=s==null?S:ORBEON.util.DateTime.jsDateToformatDisplayTime(s)}}else{if(ORBEON.util.Dom.hasClass(y,"xforms-textarea")&&!ORBEON.util.Dom.hasClass(y,"xforms-mediatype-text-html")){var f=y.tagName.toLowerCase()=="textarea"?y:y.getElementsByTagName("textarea")[0];f.value=K;if(r!=null){if(r==""){f.removeAttribute("cols")}else{f.cols=r}}if(q!=null){if(r==""){f.removeAttribute("rows")}else{f.rows=q}}if(ORBEON.util.Dom.hasClass(y,"xforms-textarea-appearance-xxforms-autosize")){ORBEON.xforms.Controls.autosizeTextarea(y)}}else{if(ORBEON.util.Dom.hasClass(y,"xforms-textarea")&&ORBEON.util.Dom.hasClass(y,"xforms-mediatype-text-html")){if(ORBEON.util.Utils.getProperty(HTML_EDITOR_PROPERTY)=="yui"){ORBEON.widgets.RTE.setValue(y,K)}else{var m=FCKeditorAPI.GetInstance(y.name);m.EditorDocument.body.innerHTML=K;y.value=K;y.previousValue=K}}else{if(ORBEON.util.Dom.hasClass(y,"xforms-select-appearance-xxforms-tree")){var U=K.split(" ");var g=ORBEON.xforms.Globals.treeYui[y.id];for(var n in g._nodes){var G=g._nodes[n];if(G.children.length==0){var C=xformsArrayContains(U,G.data.value);if(C){G.check()}else{G.uncheck()}}}}else{if(ORBEON.util.Dom.hasClass(y,"xforms-select1-appearance-xxforms-tree")){var g=ORBEON.xforms.Globals.treeYui[y.id];ORBEON.xforms.Controls.treeOpenSelectedVisible(g,[K]);var k=ORBEON.xforms.Controls.getCurrentValue(y);var c=g.getNodeByProperty("value",k);var l=g.getNodeByProperty("value",K);if(c!=null){YAHOO.util.Dom.removeClass(c.getLabelEl(),"xforms-tree-label-selected")}if(l!=null){YAHOO.util.Dom.addClass(l.getLabelEl(),"xforms-tree-label-selected")}}else{if(ORBEON.util.Dom.hasClass(y,"xforms-upload")){var N=YAHOO.util.Dom.getElementsByClassName("xforms-upload-info",null,y)[0];var B=YAHOO.util.Dom.getElementsByClassName("xforms-upload-filename",null,y)[0];var u=YAHOO.util.Dom.getElementsByClassName("xforms-upload-mediatype",null,y)[0];var P=YAHOO.util.Dom.getElementsByClassName("xforms-upload-size",null,y)[0];if(t=="empty"){ORBEON.util.Dom.removeClass(y,"xforms-upload-state-file");ORBEON.util.Dom.addClass(y,"xforms-upload-state-empty")}if(t=="file"){ORBEON.util.Dom.removeClass(y,"xforms-upload-state-empty");ORBEON.util.Dom.addClass(y,"xforms-upload-state-file");ORBEON.util.Dom.clearUploadControl(y)}if(r!=null){ORBEON.util.Dom.setStringValue(B,r)}if(q!=null){ORBEON.util.Dom.setStringValue(u,q)}if(p!=null){var w=p>1024*1024?Math.round(p/(1024*1024)*10)/10+" MB":p>1024?Math.round(p/1024*10)/10+" KB":p+" B";ORBEON.util.Dom.setStringValue(P,w)}}else{if(typeof(y.value)=="string"){y.value=K;y.previousValue=K}}}}}}}}}}}}}}}}}},_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")}}},_classNameToId:{label:"$$l",hint:"$$t",help:"$$p","help-image":"$$i",alert:"$$a"},_classNameToRegexp:{label:"\\$\\$l",hint:"\\$\\$t",help:"\\$\\$p","help-image":"\\$\\$i",alert:"\\$\\$a"},_getControlLHHA:function(b,d){if(ORBEON.util.Utils.isNewXHTMLLayout()){var a=YAHOO.util.Dom.getElementsByClassName("xforms-"+d,null,b);if(a.length>0){return a[0]}}var c=ORBEON.util.Utils.appendToEffectiveId(b.id,ORBEON.xforms.Controls._classNameToId[d]);return YAHOO.util.Dom.get(c)},getControlForLHHA:function(a,c){var b=ORBEON.xforms.Controls._classNameToId[c];return a.id.indexOf(b)!=-1?YAHOO.util.Dom.get(a.id.replace(new RegExp(ORBEON.xforms.Controls._classNameToRegexp[c],"g"),"")):a.parentNode},_setMessage:function(e,b,c){var d=ORBEON.xforms.Controls._getControlLHHA(e,b);if(d!=null){d.innerHTML=c;var a=ORBEON.xforms.Controls._getControlLHHA(e,"help-image");if(c==""){ORBEON.util.Dom.addClass(d,"xforms-disabled-subsequent");if(b=="xforms-help"){ORBEON.util.Dom.addClass(a,"xforms-disabled-subsequent")}}else{if(ORBEON.xforms.Controls.isRelevant(e)){ORBEON.util.Dom.removeClass(d,"xforms-disabled");ORBEON.util.Dom.removeClass(d,"xforms-disabled-subsequent");if(b=="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._getControlLHHA(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.isNewXHTMLLayout()?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._getControlLHHA(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._getControlLHHA(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._getControlLHHA(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")}}}var f=ORBEON.xforms.Globals.alertTooltipForControl[e.id];if(c&&f!=null){if(f!=true){f.destroy()}ORBEON.xforms.Globals.alertTooltipForControl[e.id]=null}},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=1;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._getControlLHHA(f,"label"),ORBEON.xforms.Controls._getControlLHHA(f,"alert")];if(!c||(c&&ORBEON.xforms.Controls.getHelpMessage(f)!="")){a.push(ORBEON.xforms.Controls._getControlLHHA(f,"help"));a.push(ORBEON.xforms.Controls._getControlLHHA(f,"help-image"))}if(!c||(c&&ORBEON.xforms.Controls.getHintMessage(f)!="")){a.push(ORBEON.xforms.Controls._getControlLHHA(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(b,a){function f(m,l){if(l){m.setAttribute("disabled","disabled")}else{m.removeAttribute("disabled")}}if(a){ORBEON.util.Dom.addClass(b,"xforms-readonly")}else{ORBEON.util.Dom.removeClass(b,"xforms-readonly")}if(ORBEON.util.Dom.hasClass(b,"xforms-group-begin-end")){if(a){ORBEON.util.Dom.addClass(b,"xforms-readonly")}else{ORBEON.util.Dom.removeClass(b,"xforms-readonly")}}else{if((ORBEON.util.Dom.hasClass(b,"xforms-input"))||ORBEON.util.Dom.hasClass(b,"xforms-secret")||ORBEON.util.Dom.hasClass(b,"xforms-select1-appearance-full")||ORBEON.util.Dom.hasClass(b,"xforms-select-appearance-full")){if(a){ORBEON.util.Dom.addClass(b,"xforms-readonly")}else{ORBEON.util.Dom.removeClass(b,"xforms-readonly")}var e=b.getElementsByTagName("input");for(var k=0;k<e.length;k++){var g=e[k];f(g,a)}if(b.tagName.toLowerCase()=="input"){f(b,a)}}else{if(ORBEON.util.Dom.hasClass(b,"xforms-select-appearance-compact")||ORBEON.util.Dom.hasClass(b,"xforms-select1-appearance-minimal")||ORBEON.util.Dom.hasClass(b,"xforms-select1-appearance-compact")||ORBEON.util.Dom.hasClass(b,"xforms-input-appearance-minimal")||ORBEON.util.Dom.hasClass(b,"xforms-input-appearance-compact")){var h=ORBEON.util.Utils.isNewXHTMLLayout()?b.getElementsByTagName("select")[0]:b;f(h,a)}else{if(ORBEON.util.Dom.hasClass(b,"xforms-output")||ORBEON.util.Dom.hasClass(b,"xforms-group")){if(a){ORBEON.util.Dom.addClass(b,"xforms-readonly")}else{ORBEON.util.Dom.removeClass(b,"xforms-readonly")}}else{if(ORBEON.util.Dom.hasClass(b,"xforms-select1-appearance-xxforms-autocomplete")){var g=ORBEON.util.Dom.getChildElementByIndex(b,0);f(g,a)}else{if(ORBEON.util.Dom.hasClass(b,"xforms-textarea")&&ORBEON.util.Dom.hasClass(b,"xforms-mediatype-text-html")){var d=FCKeditorAPI.GetInstance(b.name);if(a){d.ToolbarSet.Collapse()}else{d.ToolbarSet.Expand()}}else{if(ORBEON.util.Dom.hasClass(b,"xforms-upload")){f(ORBEON.util.Dom.getChildElementByClass(b,"xforms-upload-select"),a)}else{if(ORBEON.util.Dom.hasClass(b,"xforms-textarea")){var j=ORBEON.util.Utils.isNewXHTMLLayout()?b.getElementsByTagName("textarea")[0]:b;f(j,a)}else{if((ORBEON.util.Dom.hasClass(b,"xforms-trigger")&&!ORBEON.util.Dom.hasClass(b,"xforms-trigger-appearance-minimal"))||ORBEON.util.Dom.hasClass(b,"xforms-submit")){var c=b.tagName.toLowerCase()=="button"?b:b.getElementsByTagName("button")[0];f(c,a)}else{if(ORBEON.util.Dom.hasClass(b,"xforms-trigger-appearance-minimal")){if(a){ORBEON.util.Dom.addClass(b,"xforms-trigger-readonly")}else{ORBEON.util.Dom.removeClass(b,"xforms-trigger-readonly")}}}}}}}}}}}},getAlertMessage:function(b){var a=ORBEON.xforms.Controls._getControlLHHA(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(c){if(ORBEON.util.Dom.hasClass(c,"xforms-trigger")||ORBEON.util.Dom.hasClass(c,"xforms-submit")){var b=ORBEON.util.Dom.getElementByTagName(c,["a","button"]);return b.title}else{var a=ORBEON.xforms.Controls._getControlLHHA(c,"hint");return a==null?"":a.innerHTML}},setHintMessage:function(c,b){if(ORBEON.util.Dom.hasClass(c,"xforms-trigger")||ORBEON.util.Dom.hasClass(c,"xforms-submit")){if(ORBEON.xforms.Globals.hintTooltipForControl[c.id]==null){var a=ORBEON.util.Dom.getElementByTagName(c,["a","button"]);a.title=b}}else{ORBEON.xforms.Controls._setMessage(c,"hint",b)}ORBEON.xforms.Controls._setTooltipMessage(c,b,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.cfg.setProperty("disabled",true)}else{a.cfg.setProperty("text",b);a.cfg.setProperty("disabled",false)}}}},setFocus:function(h){var d=ORBEON.util.Dom.getElementById(h);ORBEON.xforms.Globals.currentFocusControlId=h;ORBEON.xforms.Globals.currentFocusControlElement=d;ORBEON.xforms.Globals.maskFocusEvents=true;if(ORBEON.util.Dom.hasClass(d,"xforms-select-appearance-full")||ORBEON.util.Dom.hasClass(d,"xforms-select1-appearance-full")||(ORBEON.util.Dom.hasClass(d,"xforms-input")&&ORBEON.util.Dom.hasClass(d,"xforms-type-boolean"))){var b=ORBEON.util.Dom.getElementsByName(d,"input");if(b.length>0){var a=0;var e=false;for(;a<b.length;a++){var j=b[a];if(j&&j.checked){e=true;break}}b[e?a:0].focus()}}else{if(ORBEON.util.Dom.hasClass(d,"xforms-textarea")&&ORBEON.util.Dom.hasClass(d,"xforms-mediatype-text-html")){if(ORBEON.util.Utils.getProperty(HTML_EDITOR_PROPERTY)=="yui"){ORBEON.widgets.RTE.setFocus(d)}else{}}else{var g=["input","textarea","select","button","a"];var c=ORBEON.util.Dom.getElementByTagName(d,g);if(c!=null&&!ORBEON.util.Dom.isAncestorOrSelfHidden(c)){c.focus()}}}if(typeof ORBEON.xforms.Globals.serverValue[h]=="undefined"){var f=ORBEON.xforms.Controls.getCurrentValue(d);ORBEON.xforms.Globals.serverValue[h]=f}},updateInvalidVisitedOnNextAjaxResponse:function(a){if(!ORBEON.util.Dom.hasClass(a,"xforms-visited")){ORBEON.xforms.Events.runOnNext(ORBEON.xforms.Events.ajaxResponseProcessedEvent,function(){if(ORBEON.util.Dom.hasClass(a,"xforms-invalid")){ORBEON.util.Dom.addClass(a,"xforms-invalid-visited")}var b=ORBEON.xforms.Controls._getControlLHHA(a,"alert");if(b!=null&&ORBEON.util.Dom.hasClass(b,"xforms-alert-active")){ORBEON.util.Dom.addClass(b,"xforms-alert-active-visited")}})}},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){if(a.tagName.toLowerCase()!="textarea"){a=a.getElementsByTagName("textarea")[0]}var d=a.scrollHeight;var b=a.clientHeight;if(a.rows==-1){a.rows=2}if(ORBEON.xforms.Globals.isFF3OrNewer){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.isNewXHTMLLayout()?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(ORBEON.xforms.Globals.currentFocusControlId!=null){var e=ORBEON.util.Dom.getElementById(ORBEON.xforms.Globals.currentFocusControlId);if(e!=null){e.blur()}}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()}},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.dialogMinimalLastMouseOut[a.id]=null},showMessage:function(a){YAHOO.widget.SimpleDialog.prototype.registerForm=function(){};var b=new YAHOO.widget.SimpleDialog("xforms-message-dialog",{width:"30em",fixedcenter:true,modal:true,close:false,visible:false,draggable:false,buttons:[{text:"Close",handler:function(){this.hide();a.shift();if(a.length>0){ORBEON.xforms.Controls.showMessage(a)}},idDefault:true}]});b.setHeader("Message");b.setBody(a[0]);b.render(document.body);b.show(a)}};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(b){var h=YAHOO.util.Event.getTarget(b);if(YAHOO.lang.isUndefined(document.addEventListener)){YAHOO.util.Dom.generateId(h);var j=ORBEON.xforms.Globals.changeListeners[h.id];var f=YAHOO.lang.isUndefined(j)||j!=h;if(f){YAHOO.util.Event.addListener(h,"change",ORBEON.xforms.Events.change);ORBEON.xforms.Globals.changeListeners[h.id]=h}}if(!ORBEON.xforms.Globals.maskFocusEvents){var c=ORBEON.xforms.Events._findParentXFormsControl(h);var g=ORBEON.xforms.Globals.currentFocusControlId!=null?ORBEON.util.Dom.getElementByIdNoCache(ORBEON.xforms.Globals.currentFocusControlId):null;if(c!=null){if(typeof ORBEON.xforms.Globals.serverValue[c.id]=="undefined"&&!ORBEON.util.Dom.hasClass(c,"xforms-select-appearance-compact")){var d=ORBEON.xforms.Controls.getCurrentValue(c);ORBEON.xforms.Globals.serverValue[c.id]=d}}var k=new Array();if(c!=null&&g!=c&&!ORBEON.util.Dom.hasClass(c,"xforms-dialog")){ORBEON.widgets.RTE.focusOnAnyFormControl(c);var e=false;if(g!=null){if(ORBEON.util.Dom.hasClass(g,"xforms-textarea")&&ORBEON.util.Dom.hasClass(g,"xforms-mediatype-text-html")&&ORBEON.util.Utils.getProperty(HTML_EDITOR_PROPERTY)=="fck"){var a=FCKeditorAPI.GetInstance(g.name);g.value=a.GetXHTML();e=true}else{if(ORBEON.util.Dom.hasClass(g,"xforms-select1-appearance-xxforms-tree")||ORBEON.util.Dom.hasClass(g,"xforms-select-appearance-xxforms-tree")){e=true}}if(e){xformsValueChanged(g,null)}k.push(new ORBEON.xforms.Server.Event(null,g.id,null,null,"DOMFocusOut"))}k.push(new ORBEON.xforms.Server.Event(null,c.id,null,null,"DOMFocusIn"));ORBEON.xforms.Globals.currentFocusControlId=c.id;ORBEON.xforms.Globals.currentFocusControlElement=c;ORBEON.xforms.Server.fireEvents(k,true)}}else{ORBEON.xforms.Globals.maskFocusEvents=false}},blur:function(b){if(!ORBEON.xforms.Globals.maskFocusEvents){var a=ORBEON.xforms.Events._findParentXFormsControl(YAHOO.util.Event.getTarget(b));if(a!=null){ORBEON.xforms.Controls.updateInvalidVisitedOnNextAjaxResponse(a);if(!ORBEON.util.Dom.hasClass(a,"xforms-dialog")){ORBEON.xforms.Globals.currentFocusControlId=a.id;ORBEON.xforms.Globals.currentFocusControlElement=a}if(ORBEON.widgets.YUICalendar.appliesToControl(a)){ORBEON.widgets.YUICalendar.blur(b,a)}}}},change:function(f){var g=ORBEON.xforms.Events._findParentXFormsControl(YAHOO.util.Event.getTarget(f));if(g!=null){ORBEON.xforms.Controls.updateInvalidVisitedOnNextAjaxResponse(g);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.isNewXHTMLLayout()?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(YAHOO.util.Dom.getElementsByClassName("xforms-input-input",null,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(YAHOO.util.Dom.getElementsByClassName("xforms-input-input",null,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,e,g,d,h,f,a){if(YAHOO.lang.isObject(c[e.id])){if(!YAHOO.util.Dom.inDocument(c[e.id].orbeonControl,document)){c[e.id].destroy();c[e.id]=null}}if(c[e.id]==null){if(h!=""){var j=new YAHOO.widget.Tooltip(e.id+d,{context:g.id,text:h,showDelay:f,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.2},zIndex:1000});j.orbeonControl=e;var b=ORBEON.util.Dom.getElementById(g.id);j.onContextMouseMove.call(b,a,j);j.onContextMouseOver.call(b,a,j);c[e.id]=j}else{c[e.id]=true}}},mouseover:function(d){var g=ORBEON.xforms.Events._findParentXFormsControl(YAHOO.util.Event.getTarget(d));if(g!=null){if(!ORBEON.util.Dom.hasClass(document.body,"xforms-disable-hint-as-tooltip")){var c=ORBEON.xforms.Controls.getHintMessage(g);if(YAHOO.util.Dom.hasClass(g,"xforms-trigger")||ORBEON.util.Dom.hasClass(g,"xforms-submit")){var b=ORBEON.util.Dom.getElementByTagName(g,["a","button"]);b.title=""}ORBEON.xforms.Events._showToolTip(ORBEON.xforms.Globals.hintTooltipForControl,g,g,"-orbeon-hint-tooltip",c,200,d)}if(ORBEON.util.Dom.hasClass(g,"xforms-alert-active")&&!ORBEON.util.Dom.hasClass(document.body,"xforms-disable-alert-as-tooltip")){var f=ORBEON.xforms.Controls.getControlForLHHA(g,"alert");if(f){if(!(YAHOO.util.Dom.hasClass(f,"xforms-control")||YAHOO.util.Dom.hasClass(f,"xforms-group"))){f=YAHOO.util.Dom.getAncestorByClassName(f,"xforms-control")}if(f){var c=ORBEON.xforms.Controls.getAlertMessage(f);YAHOO.util.Dom.generateId(g);ORBEON.xforms.Events._showToolTip(ORBEON.xforms.Globals.alertTooltipForControl,f,g,"-orbeon-alert-tooltip",c,10,d)}}}else{if(ORBEON.util.Dom.hasClass(g,"xforms-dialog-appearance-minimal")){ORBEON.xforms.Globals.dialogMinimalLastMouseOut[g.id]=-1}}if(ORBEON.util.Utils.getProperty(HELP_TOOLTIP_PROPERTY)&&ORBEON.util.Dom.hasClass(g,"xforms-help-image")){var a=g.nextSibling;if(!ORBEON.util.Dom.isElement(a)){a=a.nextSibling}var f=ORBEON.xforms.Controls.getControlForLHHA(g,"help-image");if(f){if(YAHOO.util.Dom.hasClass(f,"xforms-input-input")){f=YAHOO.util.Dom.getAncestorByClassName(f,"xforms-control")}var c=ORBEON.xforms.Controls.getHelpMessage(f);YAHOO.util.Dom.generateId(g);ORBEON.xforms.Events._showToolTip(ORBEON.xforms.Globals.helpTooltipForControl,f,g,"-orbeon-help-tooltip",c,0,d)}}var e=g;while(e!=null&&e!=document){if(ORBEON.util.Dom.hasClass(e,"xforms-dialog-appearance-minimal")){ORBEON.xforms.Globals.dialogMinimalLastMouseOut[e.id]=-1;break}e=e.parentNode}}},mouseout:function(b){var c=ORBEON.xforms.Events._findParentXFormsControl(YAHOO.util.Event.getTarget(b));if(c!=null){var a=ORBEON.xforms.Globals.hintTooltipForControl[c.id];if(!ORBEON.util.Dom.hasClass(document.body,"xforms-disable-hint-as-tooltip")&&YAHOO.lang.isObject(a)){a.onContextMouseOut.call(c.id,b,a)}}},click:function(m){if(m.button!=0&&m.button!=1){return}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=ORBEON.xforms.Controls.getControlForLHHA(r,"help-image");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!=null&&c!=true){if(YAHOO.lang.isObject(c.element)&&c.element.style.visibility=="hidden"){c.element.style.top=0;c.element.style.left=0}}}}},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.isNewXHTMLLayout()){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){if(!ORBEON.xforms.Globals.maskDialogCloseEvents){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;ORBEON.xforms.Globals.currentFocusControlElement=c},treeClickValueUpdated:function(b){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)}},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(a){var d=!YAHOO.lang.isUndefined(a._type)&&(a._type=="TextNode"||a._type=="TaskNode")?a:a.node;var e=this;var g=document.getElementById(e.id);if(ORBEON.util.Utils.isNewXHTMLLayout()){g=g.parentNode}var b=ORBEON.util.Dom.hasClass(g,"xforms-select");if(b){if(d.checked){d.uncheck()}else{d.check()}d.onCheckClick()}else{var c=ORBEON.xforms.Controls.getCurrentValue(g);var f=e.getNodeByProperty("value",c);if(f!=null){YAHOO.util.Dom.removeClass(f.getLabelEl(),"xforms-tree-label-selected")}if(d!=null){YAHOO.util.Dom.addClass(d.getLabelEl(),"xforms-tree-label-selected")}ORBEON.xforms.Events.treeClickFocus(g);g.value=d.data.value;ORBEON.xforms.Events.treeClickValueUpdated(g)}},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(b.element.style.display=="block"){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.id,null,null,"xxforms-dialog-close");ORBEON.xforms.Server.fireEvents([a],false)}}},dialogMinimalCheckMouseIn:function(b){var c=new Date().getTime();if(b.element.style.display=="block"&&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)}},runOnNext:function(a,b,c,e){function d(){a.unsubscribe(d);if(e){b.call(c)}else{b(c)}}a.subscribe(d)},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.xforms.XBL={_BaseClass:function(){var a=function(){};a.prototype={container:null}}(),declareClass:function(b,a){var d=null;var c=false;b.instance=function(j){var h=!YAHOO.lang.isUndefined(b.prototype.init);var g=j==null||!YAHOO.util.Dom.inDocument(j,document)?null:(YAHOO.util.Dom.hasClass(j,a)?j:YAHOO.util.Dom.getAncestorByClassName(j,a));if(!c){c=true;if(h){var k=this.prototype.init;this.prototype.init=function(){if(!this.initialized){k.call(this);this.initialized=true}}}var f=this.prototype.destroy;this.prototype.destroy=function(){if(!YAHOO.lang.isUndefined(f)){f.call(this)}b._instances[this.container.id]=null}}if(g==null){if(d==null){d={};for(methodName in b.prototype){d[methodName]=function(){}}}return d}else{if(YAHOO.lang.isUndefined(this._instances)){this._instances={}}var e=this._instances[g.id];if(YAHOO.lang.isUndefined(e)||YAHOO.lang.isNull(e)||e.container!=g){e=new b(g);e.container=g;if(h){e.initialized=false;e.init()}this._instances[g.id]=e}return e}}}};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"}},nl:{properties:{MONTHS_LONG:["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"],WEEKDAYS_SHORT:["Zo","Ma","Di","Wo","Do","Vr","Za"],START_WEEKDAY:1},navigator:{month:"Maand",year:"Jaar",submit:"OK",cancel:"Annuleren",invalidYear:"Jaar dient een getal te zijn"}}};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,x){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 u=ORBEON.util.Utils.getProperty(DATE_PICKER_TWO_MONTHS_PROPERTY);a=u?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 D=YAHOO.util.Dom.getElementsByClassName("calnavleft",null,m)[0];var F=document.createElement("a");F.innerHTML="Previous Year";F.href="#";YAHOO.util.Dom.addClass(F,"calyearleft");YAHOO.util.Dom.insertBefore(F,D);YAHOO.util.Event.addListener(F,"click",function(H){YAHOO.util.Event.preventDefault(H);setTimeout(function(){a.previousYear();var I=YAHOO.util.Dom.getElementsByClassName("calyearleft","a",m);if(I&&I[0]){I[0].focus()}},0)});var G=YAHOO.util.Dom.getElementsByClassName("calnavright",null,m)[0];var E=document.createElement("a");E.innerHTML="Next Year";E.href="#";YAHOO.util.Dom.addClass(E,"calyearright");YAHOO.util.Dom.insertBefore(E,G);YAHOO.util.Event.addListener(E,"click",function(H){YAHOO.util.Event.preventDefault(H);setTimeout(function(){a.nextYear();var I=YAHOO.util.Dom.getElementsByClassName("calyearright","a",m);if(I&&I[0]){I[0].focus()}},0)})})}var p=ORBEON.util.Dom.getAttribute(document.documentElement,"lang");if(p==null||p==""){p="en"}p=p.substring(0,2);var s=g[p];for(var B in s.properties){a.cfg.setProperty(B,s.properties[B])}var z=ORBEON.util.Utils.getProperty(DATE_PICKER_NAVIGATOR_PROPERTY);if(z){a.cfg.setProperty("navigator",{strings:s.navigator,monthFormat:YAHOO.widget.Calendar.SHORT,initialFocus:"year"})}ORBEON.xforms.Events.clickEvent.subscribe(c);e=x;var t=ORBEON.util.DateTime.magicDateToJSDate(ORBEON.xforms.Controls.getCurrentValue(e));if(t==null){a.cfg.setProperty("selected","",false)}else{var n=(t.getMonth()+1)+"/"+t.getDate()+"/"+t.getFullYear();a.cfg.setProperty("selected",n,false)}var v=YAHOO.util.Dom.getAncestorByClassName(e,"xbl-fr-date");var A=v!=null;var r=A?YAHOO.util.Dom.getElementsByClassName("xbl-fr-date-mindate",null,v)[0]:null;a.cfg.setProperty("mindate",r==null?null:ORBEON.util.DateTime.magicDateToJSDate(ORBEON.xforms.Controls.getCurrentValue(r)));var w=A?YAHOO.util.Dom.getElementsByClassName("xbl-fr-date-maxdate",null,v)[0]:null;a.cfg.setProperty("maxdate",w==null?null:ORBEON.util.DateTime.magicDateToJSDate(ORBEON.xforms.Controls.getCurrentValue(w)));var y=A?YAHOO.util.Dom.getElementsByClassName("xbl-fr-date-pagedate",null,v)[0]:null;var q=y==null?null:ORBEON.util.DateTime.magicDateToJSDate(ORBEON.xforms.Controls.getCurrentValue(y));a.cfg.setProperty("pagedate",q==null?(t==null?new Date():t):q);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 C=YAHOO.util.Dom.getXY(b);C[1]=C[1]+20;YAHOO.util.Dom.setXY(m,C)},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.isNewXHTMLLayout()?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.isNewXHTMLLayout()){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},registerDraggableListenersOnRepeatElements:function(e){return;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:YAHOO.env.ua.gecko,isFF3OrNewer:YAHOO.env.ua.gecko>=1.9,isRenderingEnginePresto:YAHOO.env.ua.opera,isRenderingEngineWebCore:YAHOO.env.ua.webkit,isRenderingEngineWebCore13:YAHOO.env.ua.webkit<=312,isRenderingEngineTrident:YAHOO.env.ua.ie,resourcesBaseURL:ORBEON.xforms.Globals.resourcesBaseURL,xformsServerURL:ORBEON.xforms.Globals.xformsServerURL,eventQueue:[],eventsFirstEventTime:0,discardableTimerIds:{},requestForm:null,requestIgnoreErrors:false,requestInProgress:false,requestDocument:"",requestRetries:3,executeEventFunctionQueued:0,maskFocusEvents:false,maskDialogCloseEvents:false,currentFocusControlId:null,currentFocusControlElement:null,htmlAreaNames:[],repeatTreeChildToParent:{},repeatIndexes:{},repeatTreeParentToAllChildren:{},inputCalendarCommitedValue:{},yuiCalendar:null,tooltipLibraryInitialized:false,changedIdsRequest:{},serverValue:{},autoCompleteLastKeyCode:{},autoCompleteOpen:{},loadingOtherPage:false,activeControl:null,autosizeTextareas:[],fckEditorLoading:false,fckEditorsToLoad:[],dialogs:{},dialogMinimalLastMouseOut:{},hintTooltipForControl:{},alertTooltipForControl:{},helpTooltipForControl:{},debugDiv:null,debugLastTime:new Date().getTime(),lastEventSentTime:new Date().getTime(),pageLoadedRegistered:true,menuItemsets:{},menuYui:{},treeYui:{},sliderYui:{},idToElement:{},isReloading:false,lastDialogZIndex:5,formLoadingLoadingOverlay:{},formLoadingLoadingInitialRightTop:{},formErrorPanel:{},formHelpPanel:{},formHelpPanelMessageDiv:{},formHelpPanelCloseButton:{},formLoadingNone:{},formStaticState:{},formDynamicState:{},formServerEvents:{},formClientState:{},modalProgressPanel:null,changeListeners:{},topLevelListenerRegistered:ORBEON.xforms.Globals.topLevelListenerRegistered==null?false:ORBEON.xforms.Globals.topLevelListenerRegistered};(function(){var ag=ORBEON.xforms.Globals.isRenderingEngineTrident?ORBEON.util.IEDom:ORBEON.util.MozDom;for(var ah in ag){ORBEON.util.Dom[ah]=ag[ah]}}());ORBEON.util.Dom.addClass(document.body,"yui-skin-sam");if(ORBEON.util.Utils.getProperty(OFFLINE_SUPPORT_PROPERTY)){ORBEON.xforms.Offline.pageLoad()}ORBEON.xforms.Init._setBasePaths(document.getElementsByTagName("script"),ORBEON.util.Utils.getProperty(RESOURCES_VERSIONED)=="true");if(ORBEON.util.Utils.getProperty(SESSION_HEARTBEAT_PROPERTY)){var t=ORBEON.util.Utils.getProperty(SESSION_HEARTBEAT_DELAY_PROPERTY);if(t>0){window.setInterval(function(){ORBEON.xforms.Events.sendHeartBeatIfNeeded(t)},t/10)}}for(var b=0;b<document.forms.length;b++){var M=document.forms[b];if(ORBEON.util.Dom.hasClass(M,"xforms-form")){var Z=document.forms[b].id;ORBEON.util.Dom.removeClass(M,"xforms-initially-hidden");ORBEON.xforms.Init.registerDraggableListenersOnRepeatElements(M);ORBEON.xforms.Globals.formErrorPanel[Z]=null;ORBEON.xforms.Globals.formLoadingNone[Z]=null;var V=0;for(var ab=0;ab<M.childNodes.length;ab++){if(V==3){break}var F=M.childNodes[ab];if(F.className=="xforms-loading-loading"){F.style.display="block";ORBEON.xforms.Globals.formLoadingLoadingOverlay[Z]=new YAHOO.widget.Overlay(F,{visible:false,monitorresize:true});ORBEON.xforms.Globals.formLoadingLoadingInitialRightTop[Z]=[YAHOO.util.Dom.getViewportWidth()-YAHOO.util.Dom.getX(F),YAHOO.util.Dom.getY(F)];F.style.right="auto";V++}else{if(ORBEON.util.Dom.isElement(F)&&ORBEON.util.Dom.hasClass(F,"xforms-error-panel")){YAHOO.util.Dom.generateId(F);ORBEON.util.Dom.removeClass(F,"xforms-initially-hidden");var L=new YAHOO.widget.Panel(F.id,{width:"700px",modal:true,fixedcenter:false,underlay:"shadow",visible:false,constraintoviewport:true,draggable:true});L.render();L.beforeHideEvent.subscribe(ORBEON.xforms.Events.errorPanelClosed,Z);ORBEON.xforms.Globals.formErrorPanel[Z]=L;var O=ORBEON.util.Dom.getChildElementByClass(F,"hd");var A=ORBEON.util.Dom.getChildElementByClass(F,"bd");var ae=ORBEON.util.Dom.getChildElementByClass(A,"xforms-error-panel-details-hidden");var y=ORBEON.util.Dom.getChildElementByIndex(ORBEON.util.Dom.getChildElementByIndex(ae,0),0);YAHOO.util.Dom.generateId(y);var aa=ORBEON.util.Dom.getChildElementByClass(A,"xforms-error-panel-details-shown");var ac=ORBEON.util.Dom.getChildElementByIndex(ORBEON.util.Dom.getChildElementByIndex(aa,0),0);YAHOO.util.Dom.generateId(ac);L.errorTitleDiv=O;L.errorDetailsDiv=ORBEON.util.Dom.getChildElementByClass(aa,"xforms-error-panel-details");YAHOO.util.Event.addListener(y.id,"click",ORBEON.xforms.Events.errorShowHideDetails);YAHOO.util.Event.addListener(ac.id,"click",ORBEON.xforms.Events.errorShowHideDetails);var h=YAHOO.util.Dom.getElementsByClassName("xforms-error-panel-close",null,F);if(h.length!=0){YAHOO.util.Dom.generateId(h[0]);YAHOO.util.Event.addListener(h[0].id,"click",ORBEON.xforms.Events.errorCloseClicked,L)}var Y=YAHOO.util.Dom.getElementsByClassName("xforms-error-panel-reload",null,F);if(Y.length!=0){YAHOO.util.Dom.generateId(Y[0]);YAHOO.util.Event.addListener(Y[0].id,"click",ORBEON.xforms.Events.errorReloadClicked,L)}V++}else{if(F.className=="xforms-loading-none"){ORBEON.xforms.Globals.formLoadingNone[Z]=F;V++}}}}var f=M.elements;var l;var P;for(var x=0;x<f.length;x++){var r=f[x];if(r.name.indexOf("$static-state")!=-1){ORBEON.xforms.Globals.formStaticState[Z]=r}else{if(r.name.indexOf("$dynamic-state")!=-1){ORBEON.xforms.Globals.formDynamicState[Z]=r}else{if(r.name.indexOf("$server-events")!=-1){ORBEON.xforms.Globals.formServerEvents[Z]=r}else{if(r.name.indexOf("$client-state")!=-1){ORBEON.xforms.Globals.formClientState[Z]=r;if(r.value==""){xformsStoreInClientState(Z,"initial-dynamic-state",ORBEON.xforms.Globals.formDynamicState[Z].value)}}else{if(r.name.indexOf("$repeat-tree")!=-1){l=r}else{if(r.name.indexOf("$repeat-indexes")!=-1){P=r;break}}}}}}}var I=l.value;var q=I.split(",");for(var W=0;W<q.length;W++){var S=q[W].split(" ");var N=S[0];if(S.length>1){var n=S[S.length-1];ORBEON.xforms.Globals.repeatTreeChildToParent[N]=n}}for(var j in ORBEON.xforms.Globals.repeatTreeChildToParent){var n=ORBEON.xforms.Globals.repeatTreeChildToParent[j];while(n!=null){if(!ORBEON.xforms.Globals.repeatTreeParentToAllChildren[n]){ORBEON.xforms.Globals.repeatTreeParentToAllChildren[n]=new Array()}ORBEON.xforms.Globals.repeatTreeParentToAllChildren[n].push(j);n=ORBEON.xforms.Globals.repeatTreeChildToParent[n]}}var z=P.value;var G=z.split(",");for(var W=0;W<G.length;W++){var S=G[W].split(" ");var N=S[0];var H=S[S.length-1];ORBEON.xforms.Globals.repeatIndexes[N]=H}if(xformsGetFromClientState(Z,"load-did-run")==null){xformsStoreInClientState(Z,"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 af=new ORBEON.xforms.Server.Event(M,null,null,null,"xxforms-all-events-required");ORBEON.xforms.Server.fireEvents([af],false)}}if(!(window.orbeonInitData===undefined)){var Q=window.orbeonInitData[Z];var E=ORBEON.xforms.Init._getSpecialControlsInitFunctions();for(var g in Q.controls){if(E[g]){var ad=Q.controls[g];for(var p in ad){var u=E[g][p];if(u){var o=ad[p];for(var w=0;w<o.length;w++){var C=ORBEON.util.Dom.getElementById(o[w]);u(C)}}}}}var a=Q.keylisteners;if(YAHOO.lang.isArray(a)){for(var e=0;e<a.length;e++){var J=a[e];J.isDocumentListener=J.observer=="#document";J.isDialogListener=false;if(!J.isDocumentListener){J.observerElement=YAHOO.util.Dom.get(J.observer);J.isDialogListener=YAHOO.util.Dom.hasClass(J.observerElement,"xforms-dialog")}if(J.isDocumentListener||J.isDialogListener){J.observerElement=document}J.form=M;var d={};if(YAHOO.lang.isString(J.modifier)){var K=J.modifier.split(" ");for(var U=0;U<K.length;U++){var m=K[U];if(m.toLowerCase()=="control"){d.ctrl=true}if(m.toLowerCase()=="shift"){d.shift=true}if(m.toLowerCase()=="alt"){d.alt=true}}}d.keys=[];var D=J.text.toUpperCase();for(var X=0;X<D.length;X++){d.keys.push(D.charCodeAt(X))}var B=new YAHOO.util.KeyListener(J.observerElement,d,{scope:J,correctScope:false,fn:function(ai,ai,ag){var ah=ag.observer;var aj=["text",ag.text];if(!YAHOO.lang.isUndefined(ag.modifier)){aj.push("modifiers");aj.push(ag.modifier)}var ai=new ORBEON.xforms.Server.Event(ag.form,ah,null,null,"keypress",null,null,null,null,null,aj);ORBEON.xforms.Server.fireEvents([ai],false)}});if(J.isDialogListener){var s=ORBEON.xforms.Globals.dialogs[J.observer];var R=s.cfg.getProperty("keylisteners");if(YAHOO.lang.isUndefined(R)){R=[]}R.push(B);s.cfg.setProperty("keylisteners",R)}else{B.enable()}}}var k=Q["server-events"];if(YAHOO.lang.isArray(k)){for(var v=0;v<k.length;v++){var T=k[v];var c=!YAHOO.lang.isUndefined(T.discardable)&&T.discardable;ORBEON.xforms.Server.createDelayedServerEvent(T.event,T.delay,T["show-progress"],T["progress-message"],c,M.id)}}}}}if(!ORBEON.xforms.Globals.topLevelListenerRegistered){if(YAHOO.lang.isUndefined(document.addEventListener)){YAHOO.util.Event.addListener(document,"focusin",ORBEON.xforms.Events.focus);YAHOO.util.Event.addListener(document,"focusout",ORBEON.xforms.Events.blur)}else{document.addEventListener("focus",ORBEON.xforms.Events.focus,true);document.addEventListener("blur",ORBEON.xforms.Events.blur,true);document.addEventListener("change",ORBEON.xforms.Events.change,true)}}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)}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)}else{if(ORBEON.util.Dom.hasClass(a,"xforms-dialog")){ORBEON.xforms.Init._dialog(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.isNewXHTMLLayout()){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);ORBEON.xforms.Globals.sliderYui[a.id]=c},_addToTree:function(o,q,l,p){for(var n=p;n<q.length;n++){var f=q[n];var b=f[0];var m=f[1];var h=2;var j="ygtvlabel";var e=false;for(var c=[f[2],f[3]],g=0;g<2;g++){var k=c[g];if(!YAHOO.lang.isUndefined(k)&&!YAHOO.lang.isArray(k)){h++;if(YAHOO.lang.isBoolean(k)){e=k}else{if(!YAHOO.lang.isUndefined(k["class"])){j+=" "+k["class"]}}}else{break}}var d={label:b,value:m,labelStyle:j};var a;if(o.xformsAllowMultipleSelection){a=new YAHOO.widget.TaskNode(d,l,false);a.onCheckClick=ORBEON.xforms.Events.treeCheckClick}else{a=new YAHOO.widget.TextNode(d,l,false)}ORBEON.xforms.Init._addToTree(o,f,a,h);if(e){if(o.value!=""){o.value+=" "}o.value+=m}}},_initTreeDivFromArray:function(k,g,l){var c=g.getRoot();ORBEON.xforms.Init._addToTree(k,l,c,0);if(k.xformsAllowMultipleSelection){var j=k.value.split(" ");var a=g.getNodesByProperty();if(a!=null){for(var d=0;d<a.length;d++){var b=a[d];var h=b.data.value;for(var f=0;f<j.length;f++){if(h==j[f]){b.check();break}}}}}var j=k.xformsAllowMultipleSelection?k.value.split(" "):[k.value];ORBEON.xforms.Controls.treeOpenSelectedVisible(g,j);g.draw();if(!k.xformsAllowMultipleSelection){var e=g.getNodeByProperty("value",k.value);if(e!=null){YAHOO.util.Dom.addClass(e.getLabelEl(),"xforms-tree-label-selected")}}},_tree:function(treeDiv){var controlId=treeDiv.id;var allowMultipleSelection=ORBEON.util.Dom.hasClass(treeDiv,"xforms-select");var showToolTip=ORBEON.util.Dom.hasClass(treeDiv,"xforms-show-tooltip");if(ORBEON.util.Utils.isNewXHTMLLayout()){treeDiv=treeDiv.getElementsByTagName("div")[0]}treeDiv.xformsAllowMultipleSelection=allowMultipleSelection;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[controlId]=yuiTree;if(!YAHOO.lang.isUndefined(treeArray)){ORBEON.xforms.Init._initTreeDivFromArray(treeDiv,yuiTree,treeArray)}ORBEON.xforms.Globals.serverValue[controlId]=treeDiv.value;yuiTree.subscribe("labelClick",ORBEON.xforms.Events.treeLabelClick);yuiTree.subscribe("enterKeyPressed",ORBEON.xforms.Events.treeLabelClick);yuiTree.subscribe("clickEvent",function(object){if(object.node.expanded){return false}});if(showToolTip){function addTreeToolTip(){var nodes=yuiTree.getNodesByProperty();if(nodes!=null){for(var nodeIndex=0;nodeIndex<nodes.length;nodeIndex++){var node=nodes[nodeIndex];if(node.children.length==0){continue}var contentEl=ORBEON.util.Dom.getElementById(node.contentElId);if(contentEl==null){continue}var iconEl=contentEl.previousSibling;var orbeonToolTip=new YAHOO.widget.Tooltip(contentEl.id+"-orbeon-tree-tooltip",{context:iconEl.id,text:(node.expanded?"Collapse ":"Expand ")+node.label,showDelay:100})}}}addTreeToolTip();yuiTree.subscribe("expandComplete",function(){addTreeToolTip()});yuiTree.subscribe("collapseComplete",function(){addTreeToolTip()})}ORBEON.util.Dom.removeClass(ORBEON.util.Utils.isNewXHTMLLayout()?treeDiv.parentNode: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=YAHOO.util.Dom.getElementsByClassName("yuimenubar",null,menu)[0];var valuesDiv=YAHOO.util.Dom.getElementsByClassName("xforms-initially-hidden",null,menu)[0];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.isNewXHTMLLayout()){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 h=ORBEON.util.Dom.hasClass(c,"xforms-dialog-modal");var f=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 g;if(d){g=new YAHOO.widget.Dialog(c.id,{modal:h,close:false,visible:false,draggable:false,fixedcenter:false,constraintoviewport:true,underlay:"none"});YAHOO.util.Event.addListener(document.body,"click",ORBEON.xforms.Events.dialogMinimalBodyClick,g)}else{g=new YAHOO.widget.Dialog(c.id,{modal:h,close:f,visible:false,draggable:b,fixedcenter:false,constraintoviewport:true,underlay:"none"});g.showEvent.subscribe(ORBEON.xforms.Events.dialogShow,c.id);g.beforeHideEvent.subscribe(ORBEON.xforms.Events.dialogClose,c.id)}var e=ORBEON.xforms.Controls.getForm(g.element);if(g.element.parentNode!=e){e.appendChild(g.element)}ORBEON.xforms.Globals.dialogs[c.id]=g;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){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{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()}},createDelayedServerEvent:function(g,d,h,c,b,f){var a=window.setTimeout(function(){var j=new ORBEON.xforms.Server.Event(ORBEON.util.Dom.getElementById(f),null,null,g,"server-events",null,null,null,h,c);ORBEON.xforms.Server.fireEvents([j])},d);if(b){var e=ORBEON.xforms.Globals.discardableTimerIds;e[f]=e[f]||[];e[f].push(a)}},_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(u){u=typeof(u)=="boolean"&&u==true;ORBEON.xforms.Globals.executeEventFunctionQueued--;var h=false;if(!ORBEON.xforms.Globals.requestInProgress&&ORBEON.xforms.Globals.eventQueue.length>0&&(u||ORBEON.xforms.Globals.executeEventFunctionQueued==0)){var b={};var k=ORBEON.util.Utils.getProperty(CLIENT_EVENTS_FILTER_PROPERTY).split(" ");for(var j=0;j<k.length;j++){b[k[j]]=true}var f=false;if(ORBEON.util.Utils.getProperty(CLIENT_EVENTS_MODE_PROPERTY)=="deferred"){var E=null;var y=false;eventLoop:for(var j=0;j<ORBEON.xforms.Globals.eventQueue.length;j++){var z=ORBEON.xforms.Globals.eventQueue[j];if(z.eventName=="DOMActivate"){f=true;break eventLoop}if(z.targetId!=null&&b[z.eventName]==null){var D=ORBEON.util.Dom.getElementById(z.targetId);if(D==null){f=true;break eventLoop}else{if(ORBEON.util.Dom.hasClass(D,"xxforms-events-mode-default")){f=true;break eventLoop}var m=D.parentNode;var p=false;while(m!=null){if(m.nodeType==ELEMENT_TYPE&&ORBEON.util.Dom.hasClass(m,"xxforms-events-mode-default")){p=true;if(y){f=true;break eventLoop}if(E==null){E=m}else{if(E!=m){f=true;break eventLoop}}break}m=m.parentNode}if(!p){y=true;if(E!=null){f=true;break eventLoop}}}}}}else{var f=true}if(f){var o={};var g=[];for(var j=0;j<ORBEON.xforms.Globals.eventQueue.length;j++){var z=ORBEON.xforms.Globals.eventQueue[j];if(b[z.eventName]==null){if(z.eventName=="xxforms-value-change-with-focus-change"){if(o[z.targetId]==null){if(ORBEON.util.Dom.hasClass(ORBEON.util.Dom.getElementById(z.targetId),"xforms-upload")||(ORBEON.xforms.Globals.serverValue[z.targetId]!="undefined"&&ORBEON.xforms.Globals.serverValue[z.targetId]!=z.value)){o[z.targetId]=z;ORBEON.xforms.Globals.serverValue[z.targetId]=z.value;g.push(z)}}else{o[z.targetId].value=z.value;ORBEON.xforms.Globals.serverValue[z.targetId]=z.value}}else{o={};g.push(z)}}}ORBEON.xforms.Globals.eventQueue=g;if(ORBEON.xforms.Globals.eventQueue.length>0){ORBEON.xforms.Globals.requestForm=ORBEON.xforms.Globals.eventQueue[0].form;var v=ORBEON.xforms.Globals.requestForm.id;for(var t in ORBEON.xforms.Globals.changedIdsRequest){if(ORBEON.xforms.Globals.changedIdsRequest[t]==0){ORBEON.xforms.Globals.changedIdsRequest[t]=null}}ORBEON.xforms.Globals.requestIgnoreErrors=true;var x=false;var w=false;var s;var r=false;for(var j=0;j<ORBEON.xforms.Globals.eventQueue.length;j++){var z=ORBEON.xforms.Globals.eventQueue[j];if(!z.ignoreErrors){ORBEON.xforms.Globals.requestIgnoreErrors=false}if(z.eventName=="xxforms-all-events-required"||z.eventName=="xxforms-offline"){x=true}if(z.eventName!="xxforms-session-heartbeat"){r=true}if(z.showProgress){w=true}if(YAHOO.lang.isString(z.progressMessage)){s=j==0?z.progressMessage:s==z.progressMessage?z.progressMessage:null}else{s=null}if(z.eventName=="DOMActivate"){var B=ORBEON.util.Dom.getElementById(z.targetId);if(ORBEON.util.Dom.hasClass(B,"xxforms-offline")){x=true}}}ORBEON.xforms.Globals.requestInProgress=true;if(r){var d=ORBEON.xforms.Globals.discardableTimerIds[v]||[];for(var q=0;q<d.length;q++){var l=d[q];window.clearTimeout(l)}ORBEON.xforms.Globals.discardableTimerIds[v]=[]}if(w){var a=ORBEON.util.Utils.getProperty(DELAY_BEFORE_DISPLAY_LOADING_PROPERTY);if(a==0){xformsDisplayLoading(s)}else{window.setTimeout(function(){xformsDisplayLoading(s)},a)}}var C=[];C.push('<!DOCTYPE xxforms:event-request [<!ENTITY nbsp "&#160;">]>\n');var n="    ";C.push('<xxforms:event-request xmlns:xxforms="http://orbeon.org/oxf/xml/xforms">\n');C.push(n);C.push("<xxforms:static-state>");C.push(ORBEON.xforms.Globals.formStaticState[v].value);C.push("</xxforms:static-state>\n");C.push(n);C.push("<xxforms:dynamic-state>");C.push(ORBEON.xforms.Globals.formDynamicState[v].value);C.push("</xxforms:dynamic-state>\n");if(x){C.push(n);C.push("<xxforms:initial-dynamic-state>");C.push(xformsGetFromClientState(v,"initial-dynamic-state"));C.push("</xxforms:initial-dynamic-state>\n")}var c=[];for(var A=0;A<ORBEON.xforms.Globals.eventQueue.length;A++){var z=ORBEON.xforms.Globals.eventQueue[A];if(ORBEON.xforms.Controls.getForm(z.form)==ORBEON.xforms.Globals.requestForm){if(z.eventName=="server-events"){C.push(n);C.push("<xxforms:server-events>");C.push(z.value);C.push("</xxforms:server-events>");c.unshift(A)}}}C.push(n);C.push("<xxforms:action>\n");for(var A=0;A<ORBEON.xforms.Globals.eventQueue.length;A++){var z=ORBEON.xforms.Globals.eventQueue[A];if(ORBEON.xforms.Controls.getForm(z.form)==ORBEON.xforms.Globals.requestForm&&z.eventName!="server-events"){C.push(n+n);C.push("<xxforms:event");C.push(' name="'+z.eventName+'"');if(z.targetId!=null){C.push(' source-control-id="'+z.targetId+'"')}if(z.otherId!=null){C.push(' other-control-id="'+z.otherId+'"')}if(z.additionalAttribs!=null){for(var e=0;e<z.additionalAttribs.length-1;e+=2){C.push(" "+z.additionalAttribs[e]+'="'+z.additionalAttribs[e+1]+'"')}}C.push(">");if(z.value!=null){if(typeof z.value=="string"){z.value=z.value.replace(XFORMS_REGEXP_AMPERSAND,"&amp;");z.value=z.value.replace(XFORMS_REGEXP_OPEN_ANGLE,"&lt;")}C.push(z.value)}C.push("</xxforms:event>\n");c.unshift(A)}}C.push(n);C.push("</xxforms:action>\n");C.push("</xxforms:event-request>");for(var A=0;A<c.length;A++){ORBEON.xforms.Globals.eventQueue.splice(c[A],1)}h=true;ORBEON.xforms.Globals.requestRetries=ORBEON.util.Utils.getProperty(REQUEST_RETRIES_PROPERTY);ORBEON.xforms.Globals.requestDocument=C.join("");ORBEON.xforms.Server.asyncRequest()}}}if(!h&&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;if(!ORBEON.xforms.Server.keepModelProgressPanelDisplayed(e)){ORBEON.util.Utils.hideModalProgressPanel()}ORBEON.xforms.Server.handleResponseDom(e,c);ORBEON.xforms.Globals.changedIdsRequest={};ORBEON.xforms.Events.ajaxResponseProcessedEvent.fire();ORBEON.xforms.Globals.requestInProgress=false;ORBEON.xforms.Globals.requestDocument="";ORBEON.xforms.Globals.executeEventFunctionQueued++;ORBEON.xforms.Server.executeNextRequest(false)}},keepModelProgressPanelDisplayed:function(b){if(b&&b.documentElement&&b.documentElement.tagName.indexOf("event-response")!=-1){var a=false;YAHOO.util.Dom.getElementsBy(function(c){if(ORBEON.util.Utils.getLocalName(c)=="submission"&&ORBEON.util.Dom.getAttribute(c,"target")==null){a=true}},null,b.documentElement);return a}return false},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)}}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])=="control-values"){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));if(itemsetTree==null){itemsetTree=[]}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 expandedValues=[];var nodes=yuiTree.getNodesByProperty();if(!YAHOO.lang.isNull(nodes)){for(var nodeIndex=0;nodeIndex<nodes.length;nodeIndex++){var node=nodes[nodeIndex];if(node.expanded){expandedValues.push(node.data.value)}}}var yuiRoot=yuiTree.getRoot();yuiTree.removeChildren(yuiRoot);yuiRoot.expand();ORBEON.xforms.Init._initTreeDivFromArray(documentElement,yuiTree,itemsetTree);for(var expandedValueIndex=0;expandedValueIndex<expandedValues.length;expandedValueIndex++){var expandedValue=expandedValues[expandedValueIndex];var nodeToExpand=yuiTree.getNodeByProperty("value",expandedValue);if(nodeToExpand!=null){nodeToExpand.expand()}}}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.isNewXHTMLLayout()?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,clazz,selectedValues){var selected=xformsArrayContains(selectedValues,value);return'<option value="'+ORBEON.util.String.escapeAttribute(value)+'"'+(selected?' selected="selected"':"")+(clazz!=null?' class="'+ORBEON.util.String.escapeAttribute(clazz)+'"':"")+">"+label+"</option>"}var sb=new Array();for(var topIndex=0;topIndex<itemsetTree.length;topIndex++){var itemElement=itemsetTree[topIndex];var itemElementIndex=0;var label=itemElement[itemElementIndex++];var value=itemElement[itemElementIndex++];var clazz=null;if(!YAHOO.lang.isUndefined(itemElement[itemElementIndex])&&!YAHOO.lang.isArray(itemElement[itemElementIndex])){properties=itemElement[itemElementIndex++];if(!YAHOO.lang.isUndefined(properties["class"])){clazz=properties["class"]}}if(itemElement.length>itemElementIndex){sb[sb.length]='<optgroup label="'+ORBEON.util.String.escapeAttribute(label)+'"'+(clazz!=null?' class="'+ORBEON.util.String.escapeAttribute(clazz)+'"':"")+'">';while(itemElementIndex<itemElement.length){var itemElementOption=itemElement[itemElementIndex++];var subItemClazz=!YAHOO.lang.isUndefined(itemElementOption[2])&&!YAHOO.lang.isUndefined(itemElementOption[2]["class"])?itemElementOption[2]["class"]:null;sb[sb.length]=generateOption(itemElementOption[0],itemElementOption[1],subItemClazz,selectedValues)}sb[sb.length]="</optgroup>"}else{sb[sb.length]=generateOption(label,value,clazz,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=YAHOO.util.Dom.get(controlId);if(ORBEON.util.Utils.isNewXHTMLLayout()){select=documentElement.getElementsByTagName("select")[0]}ORBEON.xforms.Globals.idToElement[controlId]=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.isNewXHTMLLayout()?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(!YAHOO.lang.isUndefined(itemElement[2])&&!YAHOO.lang.isUndefined(itemElement[2]["class"])){templateClone.className+=" "+itemElement[2]["class"]}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._getControlLHHA(newDocumentElement,"alert");if(alertElement!=null){parentElement.removeChild(alertElement)}var hintElement=ORBEON.xforms.Controls._getControlLHHA(newDocumentElement,"hint");if(hintElement!=null){parentElement.removeChild(hintElement)}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=false,isTimeType=false,isDateTimeType=false,isBooleanType=false,isStringType=false;if(type=="{http://www.w3.org/2001/XMLSchema}date"||type=="{http://www.w3.org/2002/xforms}date"){isDateType=true}else{if(type=="{http://www.w3.org/2001/XMLSchema}time"||type=="{http://www.w3.org/2002/xforms}time"){isTimeType=true}else{if(type=="{http://www.w3.org/2001/XMLSchema}dateTime"||type=="{http://www.w3.org/2002/xforms}dateTime"){isDateTimeType=true}else{if(type=="{http://www.w3.org/2001/XMLSchema}boolean"||type=="{http://www.w3.org/2002/xforms}boolean"){isBooleanType=true}else{isStringType=true}}}}var isRecognizedType=isDateType||isTimeType||isDateTimeType||isBooleanType||isStringType;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(!YAHOO.util.Dom.hasClass(childElement,"xforms-label")&&!YAHOO.util.Dom.hasClass(childElement,"xforms-help")&&!YAHOO.util.Dom.hasClass(childElement,"xforms-hint")&&!YAHOO.util.Dom.hasClass(childElement,"xforms-alert")&&!YAHOO.util.Dom.hasClass(childElement,"xforms-help-image")){documentElement.removeChild(childElement);if(lastLabelPosition==-1){lastLabelPosition=childIndex-1}}}function insertIntoDocument(nodes){if(ORBEON.util.Utils.isNewXHTMLLayout()){if(YAHOO.util.Dom.getChildren(documentElement).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}if(isStringType){insertIntoDocument([createInput("xforms-type-string",1)]);ORBEON.util.Dom.addClass(documentElement,"xforms-type-string")}else{if(isDateType&&!isMinimal){insertIntoDocument([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){insertIntoDocument([createInput("xforms-type-time",1)]);ORBEON.util.Dom.addClass(documentElement,"xforms-type-time")}else{if(isDateTimeType){insertIntoDocument([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 isTextarea=ORBEON.util.Dom.hasClass(documentElement,"xforms-textarea");var textareaMaxlength=isTextarea?ORBEON.util.Dom.getAttribute(controlElement,"maxlength"):null;var textareaCols=isTextarea?ORBEON.util.Dom.getAttribute(controlElement,"cols"):null;var textareaRows=isTextarea?ORBEON.util.Dom.getAttribute(controlElement,"rows"):null;var doUpdate=recreatedInput||controlsWithUpdatedItemsets[controlId]||(currentValue!=newControlValue&&(previousServerValue==null||currentValue==previousServerValue))||(isInput&&(inputSize!=null||inputLength!=null||inputAutocomplete!=null))||(isTextarea&&(textareaMaxlength!=null||textareaCols!=null||textareaRows!=null));if(doUpdate){if(isInput){ORBEON.xforms.Controls.setCurrentValue(documentElement,newControlValue,inputSize,inputLength,inputAutocomplete)}else{if(isTextarea&&ORBEON.util.Dom.hasClass(documentElement,"xforms-mediatype-text-html")){ORBEON.xforms.Controls.setCurrentValue(documentElement,newControlValue)}else{if(isTextarea){ORBEON.xforms.Controls.setCurrentValue(documentElement,newControlValue,textareaMaxlength,textareaCols,textareaRows)}else{ORBEON.xforms.Controls.setCurrentValue(documentElement,newControlValue)}}}ORBEON.xforms.Globals.serverValue[documentElement.id]=ORBEON.xforms.Controls.getCurrentValue(documentElement)}}}}}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&&!YAHOO.util.Dom.hasClass(documentElement,"xforms-group")){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 innerElements=ORBEON.util.Dom.getElementsByName(controlValuesElement,"inner-html",xmlNamespace);var innerElementsLength=innerElements.length;for(var j=0;j<innerElementsLength;j++){var innerElement=innerElements[j];var innerHTML=ORBEON.util.Dom.getStringValue(innerElement);var controlId=ORBEON.util.Dom.getAttribute(innerElement,"id");var documentElement=document.getElementById(controlId);if(documentElement!=null){documentElement.innerHTML=innerHTML}else{function insertBetweenDelimiters(prefix){var SPECIAL_ELEMENTS={table:{opening:"<table>",closing:"</table>",level:1},thead:{opening:"<table><thead>",closing:"</thead></table>",level:2},tbody:{opening:"<table><tbody>",closing:"</tbody></table>",level:2},tr:{opening:"<table><tr>",closing:"</tr></table>",level:2}};var delimiterBegin=document.getElementById(prefix+"-begin-"+controlId);if(delimiterBegin!=null){while(delimiterBegin.nextSibling.nodeType!=ELEMENT_TYPE||delimiterBegin.nextSibling.id!=prefix+"-end-"+controlId){delimiterBegin.parentNode.removeChild(delimiterBegin.nextSibling)}var delimiterEnd=delimiterBegin.nextSibling;var specialElementSpec=SPECIAL_ELEMENTS[delimiterBegin.parentNode.tagName.toLowerCase()];var dummyElement=document.createElement(specialElementSpec==null?delimiterBegin.parentNode.tagName:"div");dummyElement.innerHTML=specialElementSpec==null?innerHTML:specialElementSpec.opening+innerHTML+specialElementSpec.closing;var dummyParent=specialElementSpec==null?dummyElement:specialElementSpec.level==1?YAHOO.util.Dom.getFirstChild(dummyElement):specialElementSpec.level==2?YAHOO.util.Dom.getFirstChild(YAHOO.util.Dom.getFirstChild(dummyElement)):null;while(dummyParent.firstChild!=null){YAHOO.util.Dom.insertBefore(dummyParent.firstChild,delimiterEnd)}return true}else{return false}}if(!insertBetweenDelimiters("group")){if(!insertBetweenDelimiters("repeat")){insertBetweenDelimiters("xforms-case")}}}if(!YAHOO.util.Dom.inDocument(ORBEON.xforms.Globals.currentFocusControlElement,document)){var focusControl=document.getElementById(ORBEON.xforms.Globals.currentFocusControlId);if(focusControl!=null){ORBEON.xforms.Controls.setFocus(focusControl)}}}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{ORBEON.xforms.Globals.maskDialogCloseEvents=true;yuiDialog.hide();ORBEON.xforms.Globals.maskDialogCloseEvents=false;yuiDialog.element.style.display="none"}}if(children.length>0&&ORBEON.xforms.Globals.isRenderingEngineGecko&&!ORBEON.xforms.Globals.isFF3OrNewer&&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 discardable=ORBEON.util.Dom.getAttribute(serverEventsElement,"discardable");discardable=!YAHOO.lang.isNull(discardable)&discardable=="true";var progressMessage=ORBEON.util.Dom.getAttribute(serverEventsElement,"progress-message");if(delay==null){serverEventsIndex=actionIndex}else{var serverEvents=ORBEON.util.Dom.getStringValue(serverEventsElement);ORBEON.xforms.Server.createDelayedServerEvent(serverEvents,delay,showProgress,progressMessage,discardable,formID)}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(requestForm.action.indexOf("xforms-server-submit")==-1){requestForm.action=window.location.href}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"){var messageQueue=messageQueue||[];messageQueue.push(message);if(messageQueue.length==1){ORBEON.xforms.Controls.showMessage(messageQueue)}}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){function getElement(id){var element=YAHOO.util.Dom.get(id);if(element==null){element=YAHOO.util.Dom.get("repeat-begin-"+id);if(element==null){var separatorPosition=Math.max(id.lastIndexOf(XFORMS_SEPARATOR_1),id.lastIndexOf(XFORMS_SEPARATOR_2));if(separatorPosition!=-1){var repeatID=id.substring(0,separatorPosition);var iteration=id.substring(separatorPosition+1);element=ORBEON.util.Utils.findRepeatDelimiter(repeatID,iteration);if(element==null){element=YAHOO.util.Dom.get("repeat-begin-"+id)}}}}return element}var targetElement=getElement(targetId);var observer=getElement(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("#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()}};