if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={}}YAHOO.namespace=function(){var F=arguments,G=null,I,J,H;for(I=0;I<F.length;I=I+1){H=F[I].split(".");G=YAHOO;for(J=(H[0]=="YAHOO")?1:0;J<H.length;J=J+1){G[H[J]]=G[H[J]]||{};G=G[H[J]]}}return G};YAHOO.log=function(F,E,G){var H=YAHOO.widget.Logger;if(H&&H.log){return H.log(F,E,G)}else{return false}};YAHOO.register=function(M,R,J){var N=YAHOO.env.modules;if(!N[M]){N[M]={versions:[],builds:[]}}var L=N[M],O=J.version,P=J.build,Q=YAHOO.env.listeners;L.name=M;L.version=O;L.build=P;L.versions.push(O);L.builds.push(P);L.mainClass=R;for(var K=0;K<Q.length;K=K+1){Q[K](L)}if(R){R.VERSION=O;R.BUILD=P}else{YAHOO.log("mainClass is undefined for module "+M,"warn")}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(B){return YAHOO.env.modules[B]||null};YAHOO.env.ua=function(){var E={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0};var F=navigator.userAgent,D;if((/KHTML/).test(F)){E.webkit=1}D=F.match(/AppleWebKit\/([^\s]*)/);if(D&&D[1]){E.webkit=parseFloat(D[1]);if(/ Mobile\//.test(F)){E.mobile="Apple"}else{D=F.match(/NokiaN[^\/]*/);if(D){E.mobile=D[0]}}D=F.match(/AdobeAIR\/([^\s]*)/);if(D){E.air=D[0]}}if(!E.webkit){D=F.match(/Opera[\s\/]([^\s]*)/);if(D&&D[1]){E.opera=parseFloat(D[1]);D=F.match(/Opera Mini[^;]*/);if(D){E.mobile=D[0]}}else{D=F.match(/MSIE\s([^;]*)/);if(D&&D[1]){E.ie=parseFloat(D[1])}else{D=F.match(/Gecko\/([^\s]*)/);if(D){E.gecko=1;D=F.match(/rv:([^\s\)]*)/);if(D&&D[1]){E.gecko=parseFloat(D[1])}}}}}return E}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var H=YAHOO_config.listener,E=YAHOO.env.listeners,F=true,G;if(H){for(G=0;G<E.length;G=G+1){if(E[G]==H){F=false;break}}if(F){E.push(H)}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var D=YAHOO.lang,E=["toString","valueOf"],F={isArray:function(A){if(A){return D.isNumber(A.length)&&D.isFunction(A.splice)}return false},isBoolean:function(A){return typeof A==="boolean"},isFunction:function(A){return typeof A==="function"},isNull:function(A){return A===null},isNumber:function(A){return typeof A==="number"&&isFinite(A)},isObject:function(A){return(A&&(typeof A==="object"||D.isFunction(A)))||false},isString:function(A){return typeof A==="string"},isUndefined:function(A){return typeof A==="undefined"},_IEEnumFix:(YAHOO.env.ua.ie)?function(C,I){for(var J=0;J<E.length;J=J+1){var A=E[J],B=I[A];if(D.isFunction(B)&&B!=Object.prototype[A]){C[A]=B}}}:function(){},extend:function(B,A,C){if(!A||!B){throw new Error("extend failed, please check that all dependencies are included.")}var J=function(){};J.prototype=A.prototype;B.prototype=new J();B.prototype.constructor=B;B.superclass=A.prototype;if(A.prototype.constructor==Object.prototype.constructor){A.prototype.constructor=A}if(C){for(var K in C){if(D.hasOwnProperty(C,K)){B.prototype[K]=C[K]}}D._IEEnumFix(B.prototype,C)}},augmentObject:function(B,C){if(!C||!B){throw new Error("Absorb failed, verify dependencies.")}var L=arguments,J,A,K=L[2];if(K&&K!==true){for(J=2;J<L.length;J=J+1){B[L[J]]=C[L[J]]}}else{for(A in C){if(K||!(A in B)){B[A]=C[A]}}D._IEEnumFix(B,C)}},augmentProto:function(A,B){if(!B||!A){throw new Error("Augment failed, verify dependencies.")}var H=[A.prototype,B.prototype];for(var C=2;C<arguments.length;C=C+1){H.push(arguments[C])}D.augmentObject.apply(this,H)},dump:function(A,N){var Q,O,C=[],B="{...}",R="f(){...}",M=", ",P=" => ";if(!D.isObject(A)){return A+""}else{if(A instanceof Date||("nodeType" in A&&"tagName" in A)){return A}else{if(D.isFunction(A)){return R}}}N=(D.isNumber(N))?N:3;if(D.isArray(A)){C.push("[");for(Q=0,O=A.length;Q<O;Q=Q+1){if(D.isObject(A[Q])){C.push((N>0)?D.dump(A[Q],N-1):B)}else{C.push(A[Q])}C.push(M)}if(C.length>1){C.pop()}C.push("]")}else{C.push("{");for(Q in A){if(D.hasOwnProperty(A,Q)){C.push(Q+P);if(D.isObject(A[Q])){C.push((N>0)?D.dump(A[Q],N-1):B)}else{C.push(A[Q])}C.push(M)}}if(C.length>1){C.pop()}C.push("}")}return C.join("")},substitute:function(B,f,Y){var b,c,d,V,U,C,W=[],e,a="dump",X=" ",A="{",T="}";for(;;){b=B.lastIndexOf(A);if(b<0){break}c=B.indexOf(T,b);if(b+1>=c){break}e=B.substring(b+1,c);V=e;C=null;d=V.indexOf(X);if(d>-1){C=V.substring(d+1);V=V.substring(0,d)}U=f[V];if(Y){U=Y(V,U,C)}if(D.isObject(U)){if(D.isArray(U)){U=D.dump(U,parseInt(C,10))}else{C=C||"";var Z=C.indexOf(a);if(Z>-1){C=C.substring(4)}if(U.toString===Object.prototype.toString||Z>-1){U=D.dump(U,parseInt(C,10))}else{U=U.toString()}}}else{if(!D.isString(U)&&!D.isNumber(U)){U="~-"+W.length+"-~";W[W.length]=e}}B=B.substring(0,b)+U+B.substring(c+1)}for(b=W.length-1;b>=0;b=b-1){B=B.replace(new RegExp("~-"+b+"-~"),"{"+W[b]+"}","g")}return B},trim:function(B){try{return B.replace(/^\s+|\s+$/g,"")}catch(A){return B}},merge:function(){var A={},C=arguments;for(var B=0,H=C.length;B<H;B=B+1){D.augmentObject(A,C[B],true)}return A},later:function(C,R,B,P,O){C=C||0;R=R||{};var Q=B,M=P,N,A;if(D.isString(B)){Q=R[B]}if(!Q){throw new TypeError("method undefined")}if(!D.isArray(M)){M=[P]}N=function(){Q.apply(R,M)};A=(O)?setInterval(N,C):setTimeout(N,C);return{interval:O,cancel:function(){if(this.interval){clearInterval(A)}else{clearTimeout(A)}}}},isValue:function(A){return(D.isObject(A)||D.isString(A)||D.isNumber(A)||D.isBoolean(A))}};D.hasOwnProperty=(Object.prototype.hasOwnProperty)?function(B,A){return B&&B.hasOwnProperty(A)}:function(B,A){return !D.isUndefined(B[A])&&B.constructor.prototype[A]!==B[A]};F.augmentObject(D,F,true);YAHOO.util.Lang=D;D.augment=D.augmentProto;YAHOO.augment=D.augmentProto;YAHOO.extend=D.extend})();YAHOO.register("yahoo",YAHOO,{version:"2.6.0",build:"1321"});YAHOO.util.CustomEvent=function(H,J,I,F){this.type=H;this.scope=J||window;this.silent=I;this.signature=F||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var G="_YUICEOnSubscribe";if(H!==G){this.subscribeEvent=new YAHOO.util.CustomEvent(G,this,true)}this.lastError=null};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(F,E,D){if(!F){throw new Error("Invalid callback for subscriber to '"+this.type+"'")}if(this.subscribeEvent){this.subscribeEvent.fire(F,E,D)}this.subscribers.push(new YAHOO.util.Subscriber(F,E,D))},unsubscribe:function(J,H){if(!J){return this.unsubscribeAll()}var I=false;for(var L=0,G=this.subscribers.length;L<G;++L){var K=this.subscribers[L];if(K&&K.contains(J,H)){this._delete(L);I=true}}return I},fire:function(){this.lastError=null;var T=[],Z=this.subscribers.length;if(!Z&&this.silent){return true}var V=[].slice.call(arguments,0),X=true,N,U=false;if(!this.silent){}var O=this.subscribers.slice(),Q=YAHOO.util.Event.throwErrors;for(N=0;N<Z;++N){var R=O[N];if(!R){U=true}else{if(!this.silent){}var S=R.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var P=null;if(V.length>0){P=V[0]}try{X=R.fn.call(S,P,R.obj)}catch(Y){this.lastError=Y;if(Q){throw Y}}}else{try{X=R.fn.call(S,this.type,V,R.obj)}catch(W){this.lastError=W;if(Q){throw W}}}if(false===X){if(!this.silent){}break}}}return(X!==false)},unsubscribeAll:function(){for(var B=this.subscribers.length-1;B>-1;B--){this._delete(B)}this.subscribers=[];return B},_delete:function(C){var D=this.subscribers[C];if(D){delete D.fn;delete D.obj}this.subscribers.splice(C,1)},toString:function(){return"CustomEvent: '"+this.type+"', scope: "+this.scope}};YAHOO.util.Subscriber=function(F,E,D){this.fn=F;this.obj=YAHOO.lang.isUndefined(E)?null:E;this.override=D};YAHOO.util.Subscriber.prototype.getScope=function(B){if(this.override){if(this.override===true){return this.obj}else{return this.override}}return B};YAHOO.util.Subscriber.prototype.contains=function(C,D){if(D){return(this.fn==C&&this.obj==D)}else{return(this.fn==C)}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }"};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var U=false;var T=[];var S=[];var V=[];var X=[];var N=0;var W=[];var O=[];var P=0;var M={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};var R=YAHOO.env.ua.ie?"focusin":"focus";var Q=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 B=this;var A=function(){B._tryPreloadAttach()};this._interval=setInterval(A,this.POLL_INTERVAL)}},onAvailable:function(B,E,A,C,D){var G=(YAHOO.lang.isString(B))?[B]:B;for(var F=0;F<G.length;F=F+1){W.push({id:G[F],fn:E,obj:A,override:C,checkReady:D})}N=this.POLL_RETRYS;this.startInterval()},onContentReady:function(B,D,A,C){this.onAvailable(B,D,A,C,true)},onDOMReady:function(C,A,B){if(this.DOMReady){setTimeout(function(){var D=window;if(B){if(B===true){D=A}else{D=B}}C.call(D,"DOMReady",[],A)},0)}else{this.DOMReadyEvent.subscribe(C,A,B)}},_addListener:function(L,d,C,H,c,f){if(!C||!C.call){return false}if(this._isValidCollection(L)){var B=true;for(var G=0,E=L.length;G<E;++G){B=this._addListener(L[G],d,C,H,c,f)&&B}return B}else{if(YAHOO.lang.isString(L)){var I=this.getEl(L);if(I){L=I}else{this.onAvailable(L,function(){YAHOO.util.Event._addListener(L,d,C,H,c,f)});return true}}}if(!L){return false}if("unload"==d&&H!==this){S[S.length]=[L,d,C,H,c,f];return true}var e=L;if(c){if(c===true){e=H}else{e=c}}var K=function(Y){return C.call(e,YAHOO.util.Event.getEvent(Y,L),H)};var A=[L,d,C,K,e,H,c,f];var F=T.length;T[F]=A;if(this.useLegacyEvent(L,d)){var J=this.getLegacyIndex(L,d);if(J==-1||L!=V[J][0]){J=V.length;O[L.id+d]=J;V[J]=[L,d,L["on"+d]];X[J]=[];L["on"+d]=function(Y){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(Y),J)}}X[J].push(A)}else{try{this._simpleAdd(L,d,K,f)}catch(D){this.lastError=D;this._removeListener(L,d,C,f);return false}}return true},addListener:function(C,A,D,B,E){return this._addListener(C,A,D,B,E,false)},addFocusListener:function(B,C,A,D){return this._addListener(B,R,C,A,D,true)},removeFocusListener:function(A,B){return this._removeListener(A,R,B,true)},addBlurListener:function(B,C,A,D){return this._addListener(B,Q,C,A,D,true)},removeBlurListener:function(A,B){return this._removeListener(A,Q,B,true)},fireLegacyEvent:function(F,H){var D=true,J,B,C,A,E;B=X[H].slice();for(var I=0,G=B.length;I<G;++I){C=B[I];if(C&&C[this.WFN]){A=C[this.ADJ_SCOPE];E=C[this.WFN].call(A,F);D=(D&&E)}}J=V[H];if(J&&J[2]){J[2](F)}return D},getLegacyIndex:function(B,A){var C=this.generateId(B)+A;if(typeof O[C]=="undefined"){return -1}else{return O[C]}},useLegacyEvent:function(B,A){return(this.webkit&&this.webkit<419&&("click"==A||"dblclick"==A))},_removeListener:function(L,Z,D,A){var I,F,B;if(typeof L=="string"){L=this.getEl(L)}else{if(this._isValidCollection(L)){var C=true;for(I=L.length-1;I>-1;I--){C=(this._removeListener(L[I],Z,D,A)&&C)}return C}}if(!D||!D.call){return this.purgeElement(L,false,Z)}if("unload"==Z){for(I=S.length-1;I>-1;I--){B=S[I];if(B&&B[0]==L&&B[1]==Z&&B[2]==D){S.splice(I,1);return true}}return false}var H=null;var G=arguments[4];if("undefined"===typeof G){G=this._getCacheIndex(L,Z,D)}if(G>=0){H=T[G]}if(!L||!H){return false}if(this.useLegacyEvent(L,Z)){var J=this.getLegacyIndex(L,Z);var K=X[J];if(K){for(I=0,F=K.length;I<F;++I){B=K[I];if(B&&B[this.EL]==L&&B[this.TYPE]==Z&&B[this.FN]==D){K.splice(I,1);break}}}}else{try{this._simpleRemove(L,Z,H[this.WFN],A)}catch(E){this.lastError=E;return false}}delete T[G][this.WFN];delete T[G][this.FN];T.splice(G,1);return true},removeListener:function(B,A,C){return this._removeListener(B,A,C,false)},getTarget:function(A,B){var C=A.target||A.srcElement;return this.resolveTextNode(C)},resolveTextNode:function(A){try{if(A&&3==A.nodeType){return A.parentNode}}catch(B){}return A},getPageX:function(A){var B=A.pageX;if(!B&&0!==B){B=A.clientX||0;if(this.isIE){B+=this._getScrollLeft()}}return B},getPageY:function(B){var A=B.pageY;if(!A&&0!==A){A=B.clientY||0;if(this.isIE){A+=this._getScrollTop()}}return A},getXY:function(A){return[this.getPageX(A),this.getPageY(A)]},getRelatedTarget:function(A){var B=A.relatedTarget;if(!B){if(A.type=="mouseout"){B=A.toElement}else{if(A.type=="mouseover"){B=A.fromElement}}}return this.resolveTextNode(B)},getTime:function(A){if(!A.time){var B=new Date().getTime();try{A.time=B}catch(C){this.lastError=C;return B}}return A.time},stopEvent:function(A){this.stopPropagation(A);this.preventDefault(A)},stopPropagation:function(A){if(A.stopPropagation){A.stopPropagation()}else{A.cancelBubble=true}},preventDefault:function(A){if(A.preventDefault){A.preventDefault()}else{A.returnValue=false}},getEvent:function(B,D){var C=B||window.event;if(!C){var A=this.getEvent.caller;while(A){C=A.arguments[0];if(C&&Event==C.constructor){break}A=A.caller}}return C},getCharCode:function(A){var B=A.keyCode||A.charCode||0;if(YAHOO.env.ua.webkit&&(B in M)){B=M[B]}return B},_getCacheIndex:function(B,A,C){for(var D=0,E=T.length;D<E;D=D+1){var F=T[D];if(F&&F[this.FN]==C&&F[this.EL]==B&&F[this.TYPE]==A){return D}}return -1},generateId:function(B){var A=B.id;if(!A){A="yuievtautoid-"+P;++P;B.id=A}return A},_isValidCollection:function(A){try{return(A&&typeof A!=="string"&&A.length&&!A.tagName&&!A.alert&&typeof A[0]!=="undefined")}catch(B){return false}},elCache:{},getEl:function(A){return(typeof A==="string")?document.getElementById(A):A},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(A){if(!U){U=true;var B=YAHOO.util.Event;B._ready();B._tryPreloadAttach()}},_ready:function(A){var B=YAHOO.util.Event;if(!B.DOMReady){B.DOMReady=true;B.DOMReadyEvent.fire();B._simpleRemove(document,"DOMContentLoaded",B._ready)}},_tryPreloadAttach:function(){if(W.length===0){N=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 B=!U;if(!B){B=(N>0&&W.length>0)}var C=[];var A=function(J,I){var K=J;if(I.override){if(I.override===true){K=I.obj}else{K=I.override}}I.fn.call(K,I.obj)};var G,H,D,E,F=[];for(G=0,H=W.length;G<H;G=G+1){D=W[G];if(D){E=this.getEl(D.id);if(E){if(D.checkReady){if(U||E.nextSibling||!B){F.push(D);W[G]=null}}else{A(E,D);W[G]=null}}else{C.push(D)}}}for(G=0,H=F.length;G<H;G=G+1){D=F[G];A(this.getEl(D.id),D)}N--;if(B){for(G=W.length-1;G>-1;G--){D=W[G];if(!D||!D.id){W.splice(G,1)}}this.startInterval()}else{clearInterval(this._interval);this._interval=null}this.locked=false},purgeElement:function(D,C,A){var F=(YAHOO.lang.isString(D))?this.getEl(D):D;var B=this.getListeners(F,A),E,H;if(B){for(E=B.length-1;E>-1;E--){var G=B[E];this._removeListener(F,G.type,G.fn,G.capture)}}if(C&&F&&F.childNodes){for(E=0,H=F.childNodes.length;E<H;++E){this.purgeElement(F.childNodes[E],C,A)}}},getListeners:function(H,J){var E=[],I;if(!J){I=[T,S]}else{if(J==="unload"){I=[S]}else{I=[T]}}var C=(YAHOO.lang.isString(H))?this.getEl(H):H;for(var F=0;F<I.length;F=F+1){var A=I[F];if(A){for(var D=0,B=A.length;D<B;++D){var G=A[D];if(G&&G[this.EL]===C&&(!J||J===G[this.TYPE])){E.push({type:G[this.TYPE],fn:G[this.FN],obj:G[this.OBJ],adjust:G[this.OVERRIDE],scope:G[this.ADJ_SCOPE],capture:G[this.CAPTURE],index:D})}}}}return(E.length)?E:null},_unload:function(C){var I=YAHOO.util.Event,F,G,H,D,E,B=S.slice();for(F=0,D=S.length;F<D;++F){H=B[F];if(H){var A=window;if(H[I.ADJ_SCOPE]){if(H[I.ADJ_SCOPE]===true){A=H[I.UNLOAD_OBJ]}else{A=H[I.ADJ_SCOPE]}}H[I.FN].call(A,I.getEvent(C,H[I.EL]),H[I.UNLOAD_OBJ]);B[F]=null;H=null;A=null}}S=null;if(T){for(G=T.length-1;G>-1;G--){H=T[G];if(H){I._removeListener(H[I.EL],H[I.TYPE],H[I.FN],H[I.CAPTURE],G)}}H=null}V=null;I._simpleRemove(window,"unload",I._unload)},_getScrollLeft:function(){return this._getScroll()[1]},_getScrollTop:function(){return this._getScroll()[0]},_getScroll:function(){var B=document.documentElement,A=document.body;if(B&&(B.scrollTop||B.scrollLeft)){return[B.scrollTop,B.scrollLeft]}else{if(A){return[A.scrollTop,A.scrollLeft]}else{return[0,0]}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(B,A,C,D){B.addEventListener(A,C,(D))}}else{if(window.attachEvent){return function(B,A,C,D){B.attachEvent("on"+A,C)}}else{return function(){}}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(B,A,C,D){B.removeEventListener(A,C,(D))}}else{if(window.detachEvent){return function(B,A,C){B.detachEvent("on"+A,C)}}else{return function(){}}}}()}}();(function(){var A=YAHOO.util.Event;A.on=A.addListener;A.onFocus=A.addFocusListener;A.onBlur=A.addBlurListener;if(A.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var B=document.createElement("p");A._dri=setInterval(function(){try{B.doScroll("left");clearInterval(A._dri);A._dri=null;A._ready();B=null}catch(C){}},A.POLL_INTERVAL)}else{if(A.webkit&&A.webkit<525){A._dri=setInterval(function(){var C=document.readyState;if("loaded"==C||"complete"==C){clearInterval(A._dri);A._dri=null;A._ready()}},A.POLL_INTERVAL)}else{A._simpleAdd(document,"DOMContentLoaded",A._ready)}}A._simpleAdd(window,"load",A._load);A._simpleAdd(window,"unload",A._unload);A._tryPreloadAttach()})()}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(G,K,H,I){this.__yui_events=this.__yui_events||{};var J=this.__yui_events[G];if(J){J.subscribe(K,H,I)}else{this.__yui_subscribers=this.__yui_subscribers||{};var L=this.__yui_subscribers;if(!L[G]){L[G]=[]}L[G].push({fn:K,obj:H,override:I})}},unsubscribe:function(M,K,I){this.__yui_events=this.__yui_events||{};var H=this.__yui_events;if(M){var J=H[M];if(J){return J.unsubscribe(K,I)}}else{var N=true;for(var L in H){if(YAHOO.lang.hasOwnProperty(H,L)){N=N&&H[L].unsubscribe(K,I)}}return N}return false},unsubscribeAll:function(B){return this.unsubscribe(B)},createEvent:function(P,J){this.__yui_events=this.__yui_events||{};var M=J||{};var N=this.__yui_events;if(N[P]){}else{var O=M.scope||this;var R=(M.silent);var L=new YAHOO.util.CustomEvent(P,O,R,YAHOO.util.CustomEvent.FLAT);N[P]=L;if(M.onSubscribeCallback){L.subscribeEvent.subscribe(M.onSubscribeCallback)}this.__yui_subscribers=this.__yui_subscribers||{};var Q=this.__yui_subscribers[P];if(Q){for(var K=0;K<Q.length;++K){L.subscribe(Q[K].fn,Q[K].obj,Q[K].override)}}}return N[P]},fireEvent:function(K,L,H,M){this.__yui_events=this.__yui_events||{};var I=this.__yui_events[K];if(!I){return null}var N=[];for(var J=1;J<arguments.length;++J){N.push(arguments[J])}return I.fire.apply(I,N)},hasEvent:function(B){if(this.__yui_events){if(this.__yui_events[B]){return true}}return false}};YAHOO.util.KeyListener=function(G,H,L,K){if(!G){}else{if(!H){}else{if(!L){}}}if(!K){K=YAHOO.util.KeyListener.KEYDOWN}var J=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof G=="string"){G=document.getElementById(G)}if(typeof L=="function"){J.subscribe(L)}else{J.subscribe(L.fn,L.scope,L.correctScope)}function I(A,B){if(!H.shift){H.shift=false}if(!H.alt){H.alt=false}if(!H.ctrl){H.ctrl=false}if(A.shiftKey==H.shift&&A.altKey==H.alt&&A.ctrlKey==H.ctrl){var D;if(H.keys instanceof Array){for(var C=0;C<H.keys.length;C++){D=H.keys[C];if(D==A.charCode){J.fire(A.charCode,A);break}else{if(D==A.keyCode){J.fire(A.keyCode,A);break}}}}else{D=H.keys;if(D==A.charCode){J.fire(A.charCode,A)}else{if(D==A.keyCode){J.fire(A.keyCode,A)}}}}}this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(G,K,I);this.enabledEvent.fire(H)}this.enabled=true};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(G,K,I);this.disabledEvent.fire(H)}this.enabled=false};this.toString=function(){return"KeyListener ["+H.keys+"] "+G.tagName+(G.id?"["+G.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"});(function(){var S=YAHOO.util,e=YAHOO.lang,Y,a,Z={},d={},W=window.document;YAHOO.env._id_counter=YAHOO.env._id_counter||0;var R=YAHOO.env.ua.opera,X=YAHOO.env.ua.webkit,T=YAHOO.env.ua.gecko,c=YAHOO.env.ua.ie;var f={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i,OP_SCROLL:/^(?:inline|table-row)$/i};var V=function(B){if(!f.HYPHEN.test(B)){return B}if(Z[B]){return Z[B]}var A=B;while(f.HYPHEN.exec(A)){A=A.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase())}Z[B]=A;return A};var U=function(A){var B=d[A];if(!B){B=new RegExp("(?:^|\\s+)"+A+"(?:\\s+|$)");d[A]=B}return B};if(W.defaultView&&W.defaultView.getComputedStyle){Y=function(D,A){var B=null;if(A=="float"){A="cssFloat"}var C=D.ownerDocument.defaultView.getComputedStyle(D,"");if(C){B=C[V(A)]}return D.style[A]||B}}else{if(W.documentElement.currentStyle&&c){Y=function(E,C){switch(V(C)){case"opacity":var A=100;try{A=E.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(B){try{A=E.filters("alpha").opacity}catch(B){}}return A/100;case"float":C="styleFloat";default:var D=E.currentStyle?E.currentStyle[C]:null;return(E.style[C]||D)}}}else{Y=function(B,A){return B.style[A]}}}if(c){a=function(C,B,A){switch(B){case"opacity":if(e.isString(C.style.filter)){C.style.filter="alpha(opacity="+A*100+")";if(!C.currentStyle||!C.currentStyle.hasLayout){C.style.zoom=1}}break;case"float":B="styleFloat";default:C.style[B]=A}}}else{a=function(C,B,A){if(B=="float"){B="cssFloat"}C.style[B]=A}}var Q=function(B,A){return B&&B.nodeType==1&&(!A||A(B))};YAHOO.util.Dom={get:function(B){if(B){if(B.nodeType||B.item){return B}if(typeof B==="string"){return W.getElementById(B)}if("length" in B){var A=[];for(var C=0,D=B.length;C<D;++C){A[A.length]=S.Dom.get(B[C])}return A}return B}return null},getStyle:function(C,A){A=V(A);var B=function(D){return Y(D,A)};return S.Dom.batch(C,B,S.Dom,true)},setStyle:function(D,B,A){B=V(B);var C=function(E){a(E,B,A)};S.Dom.batch(D,C,S.Dom,true)},getXY:function(B){var A=function(C){if((C.parentNode===null||C.offsetParent===null||this.getStyle(C,"display")=="none")&&C!=C.ownerDocument.body){return false}return b(C)};return S.Dom.batch(B,A,S.Dom,true)},getX:function(B){var A=function(C){return S.Dom.getXY(C)[0]};return S.Dom.batch(B,A,S.Dom,true)},getY:function(B){var A=function(C){return S.Dom.getXY(C)[1]};return S.Dom.batch(B,A,S.Dom,true)},setXY:function(D,A,B){var C=function(E){var F=this.getStyle(E,"position");if(F=="static"){this.setStyle(E,"position","relative");F="relative"}var H=this.getXY(E);if(H===false){return false}var I=[parseInt(this.getStyle(E,"left"),10),parseInt(this.getStyle(E,"top"),10)];if(isNaN(I[0])){I[0]=(F=="relative")?0:E.offsetLeft}if(isNaN(I[1])){I[1]=(F=="relative")?0:E.offsetTop}if(A[0]!==null){E.style.left=A[0]-H[0]+I[0]+"px"}if(A[1]!==null){E.style.top=A[1]-H[1]+I[1]+"px"}if(!B){var G=this.getXY(E);if((A[0]!==null&&G[0]!=A[0])||(A[1]!==null&&G[1]!=A[1])){this.setXY(E,A,true)}}};S.Dom.batch(D,C,S.Dom,true)},setX:function(A,B){S.Dom.setXY(A,[B,null])},setY:function(B,A){S.Dom.setXY(B,[null,A])},getRegion:function(B){var A=function(D){if((D.parentNode===null||D.offsetParent===null||this.getStyle(D,"display")=="none")&&D!=D.ownerDocument.body){return false}var C=S.Region.getRegion(D);return C};return S.Dom.batch(B,A,S.Dom,true)},getClientWidth:function(){return S.Dom.getViewportWidth()},getClientHeight:function(){return S.Dom.getViewportHeight()},getElementsByClassName:function(E,A,D,C){E=e.trim(E);A=A||"*";D=(D)?S.Dom.get(D):null||W;if(!D){return[]}var H=[],I=D.getElementsByTagName(A),B=U(E);for(var G=0,F=I.length;G<F;++G){if(B.test(I[G].className)){H[H.length]=I[G];if(C){C.call(I[G],I[G])}}}return H},hasClass:function(B,C){var D=U(C);var A=function(E){return D.test(E.className)};return S.Dom.batch(B,A,S.Dom,true)},addClass:function(B,C){var A=function(D){if(this.hasClass(D,C)){return false}D.className=e.trim([D.className,C].join(" "));return true};return S.Dom.batch(B,A,S.Dom,true)},removeClass:function(B,C){var D=U(C);var A=function(E){var F=false,H=E.className;if(C&&H&&this.hasClass(E,C)){E.className=H.replace(D," ");if(this.hasClass(E,C)){this.removeClass(E,C)}E.className=e.trim(E.className);if(E.className===""){var G=(E.hasAttribute)?"class":"className";E.removeAttribute(G)}F=true}return F};return S.Dom.batch(B,A,S.Dom,true)},replaceClass:function(B,D,E){if(!E||D===E){return false}var C=U(D);var A=function(F){if(!this.hasClass(F,D)){this.addClass(F,E);return true}F.className=F.className.replace(C," "+E+" ");if(this.hasClass(F,D)){this.removeClass(F,D)}F.className=e.trim(F.className);return true};return S.Dom.batch(B,A,S.Dom,true)},generateId:function(C,A){A=A||"yui-gen";var B=function(E){if(E&&E.id){return E.id}var D=A+YAHOO.env._id_counter++;if(E){E.id=D}return D};return S.Dom.batch(C,B,S.Dom,true)||B.apply(S.Dom,arguments)},isAncestor:function(B,A){B=S.Dom.get(B);A=S.Dom.get(A);var C=false;if((B&&A)&&(B.nodeType&&A.nodeType)){if(B.contains&&B!==A){C=B.contains(A)}else{if(B.compareDocumentPosition){C=!!(B.compareDocumentPosition(A)&16)}}}else{}return C},inDocument:function(A){return this.isAncestor(W.documentElement,A)},getElementsBy:function(H,F,E,C){F=F||"*";E=(E)?S.Dom.get(E):null||W;if(!E){return[]}var D=[],A=E.getElementsByTagName(F);for(var B=0,G=A.length;B<G;++B){if(H(A[B])){D[D.length]=A[B];if(C){C(A[B])}}}return D},batch:function(C,H,A,E){C=(C&&(C.tagName||C.item))?C:S.Dom.get(C);if(!C||!H){return false}var D=(E)?A:window;if(C.tagName||C.length===undefined){return H.call(D,C,A)}var B=[];for(var F=0,G=C.length;F<G;++F){B[B.length]=H.call(D,C[F],A)}return B},getDocumentHeight:function(){var A=(W.compatMode!="CSS1Compat")?W.body.scrollHeight:W.documentElement.scrollHeight;var B=Math.max(A,S.Dom.getViewportHeight());return B},getDocumentWidth:function(){var A=(W.compatMode!="CSS1Compat")?W.body.scrollWidth:W.documentElement.scrollWidth;var B=Math.max(A,S.Dom.getViewportWidth());return B},getViewportHeight:function(){var B=self.innerHeight;var A=W.compatMode;if((A||c)&&!R){B=(A=="CSS1Compat")?W.documentElement.clientHeight:W.body.clientHeight}return B},getViewportWidth:function(){var B=self.innerWidth;var A=W.compatMode;if(A||c){B=(A=="CSS1Compat")?W.documentElement.clientWidth:W.body.clientWidth}return B},getAncestorBy:function(B,A){while((B=B.parentNode)){if(Q(B,A)){return B}}return null},getAncestorByClassName:function(B,C){B=S.Dom.get(B);if(!B){return null}var A=function(D){return S.Dom.hasClass(D,C)};return S.Dom.getAncestorBy(B,A)},getAncestorByTagName:function(B,C){B=S.Dom.get(B);if(!B){return null}var A=function(D){return D.tagName&&D.tagName.toUpperCase()==C.toUpperCase()};return S.Dom.getAncestorBy(B,A)},getPreviousSiblingBy:function(B,A){while(B){B=B.previousSibling;if(Q(B,A)){return B}}return null},getPreviousSibling:function(A){A=S.Dom.get(A);if(!A){return null}return S.Dom.getPreviousSiblingBy(A)},getNextSiblingBy:function(B,A){while(B){B=B.nextSibling;if(Q(B,A)){return B}}return null},getNextSibling:function(A){A=S.Dom.get(A);if(!A){return null}return S.Dom.getNextSiblingBy(A)},getFirstChildBy:function(C,A){var B=(Q(C.firstChild,A))?C.firstChild:null;return B||S.Dom.getNextSiblingBy(C.firstChild,A)},getFirstChild:function(B,A){B=S.Dom.get(B);if(!B){return null}return S.Dom.getFirstChildBy(B)},getLastChildBy:function(C,A){if(!C){return null}var B=(Q(C.lastChild,A))?C.lastChild:null;return B||S.Dom.getPreviousSiblingBy(C.lastChild,A)},getLastChild:function(A){A=S.Dom.get(A);return S.Dom.getLastChildBy(A)},getChildrenBy:function(C,A){var B=S.Dom.getFirstChildBy(C,A);var D=B?[B]:[];S.Dom.getNextSiblingBy(B,function(E){if(!A||A(E)){D[D.length]=E}return false});return D},getChildren:function(A){A=S.Dom.get(A);if(!A){}return S.Dom.getChildrenBy(A)},getDocumentScrollLeft:function(A){A=A||W;return Math.max(A.documentElement.scrollLeft,A.body.scrollLeft)},getDocumentScrollTop:function(A){A=A||W;return Math.max(A.documentElement.scrollTop,A.body.scrollTop)},insertBefore:function(A,B){A=S.Dom.get(A);B=S.Dom.get(B);if(!A||!B||!B.parentNode){return null}return B.parentNode.insertBefore(A,B)},insertAfter:function(A,B){A=S.Dom.get(A);B=S.Dom.get(B);if(!A||!B||!B.parentNode){return null}if(B.nextSibling){return B.parentNode.insertBefore(A,B.nextSibling)}else{return B.parentNode.appendChild(A)}},getClientRegion:function(){var B=S.Dom.getDocumentScrollTop(),C=S.Dom.getDocumentScrollLeft(),A=S.Dom.getViewportWidth()+C,D=S.Dom.getViewportHeight()+B;return new S.Region(B,A,D,C)}};var b=function(){if(W.documentElement.getBoundingClientRect){return function(B){var A=B.getBoundingClientRect(),C=Math.round;var D=B.ownerDocument;return[C(A.left+S.Dom.getDocumentScrollLeft(D)),C(A.top+S.Dom.getDocumentScrollTop(D))]}}else{return function(B){var A=[B.offsetLeft,B.offsetTop];var C=B.offsetParent;var D=(X&&S.Dom.getStyle(B,"position")=="absolute"&&B.offsetParent==B.ownerDocument.body);if(C!=B){while(C){A[0]+=C.offsetLeft;A[1]+=C.offsetTop;if(!D&&X&&S.Dom.getStyle(C,"position")=="absolute"){D=true}C=C.offsetParent}}if(D){A[0]-=B.ownerDocument.body.offsetLeft;A[1]-=B.ownerDocument.body.offsetTop}C=B.parentNode;while(C.tagName&&!f.ROOT_TAG.test(C.tagName)){if(C.scrollTop||C.scrollLeft){A[0]-=C.scrollLeft;A[1]-=C.scrollTop}C=C.parentNode}return A}}}()})();YAHOO.util.Region=function(G,F,E,H){this.top=G;this[1]=G;this.right=F;this.bottom=E;this.left=H;this[0]=H};YAHOO.util.Region.prototype.contains=function(B){return(B.left>=this.left&&B.right<=this.right&&B.top>=this.top&&B.bottom<=this.bottom)};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left))};YAHOO.util.Region.prototype.intersect=function(G){var I=Math.max(this.top,G.top);var H=Math.min(this.right,G.right);var F=Math.min(this.bottom,G.bottom);var J=Math.max(this.left,G.left);if(F>=I&&H>=J){return new YAHOO.util.Region(I,H,F,J)}else{return null}};YAHOO.util.Region.prototype.union=function(G){var I=Math.min(this.top,G.top);var H=Math.max(this.right,G.right);var F=Math.max(this.bottom,G.bottom);var J=Math.min(this.left,G.left);return new YAHOO.util.Region(I,H,F,J)};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(J){var H=YAHOO.util.Dom.getXY(J);var K=H[1];var I=H[0]+J.offsetWidth;var G=H[1]+J.offsetHeight;var L=H[0];return new YAHOO.util.Region(K,I,G,L)};YAHOO.util.Point=function(C,D){if(YAHOO.lang.isArray(C)){D=C[1];C=C[0]}this.x=this.right=this.left=this[0]=C;this.y=this.top=this.bottom=this[1]=D};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.6.0",build:"1321"});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(D){var C=YAHOO.util.Event.getTarget(D);if(C.nodeName.toLowerCase()=="input"&&(C.type&&C.type.toLowerCase()=="submit")){YAHOO.util.Connect._submitElementValue=encodeURIComponent(C.name)+"="+encodeURIComponent(C.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(B){this._msxml_progid.unshift(B)},setDefaultPostHeader:function(B){if(typeof B=="string"){this._default_post_header=B}else{if(typeof B=="boolean"){this._use_default_post_header=B}}},setDefaultXhrHeader:function(B){if(typeof B=="string"){this._default_xhr_header=B}else{this._use_default_xhr_header=B}},setPollingInterval:function(B){if(typeof B=="number"&&isFinite(B)){this._polling_interval=B}},createXhrObject:function(H){var I,G;try{G=new XMLHttpRequest();I={conn:G,tId:H}}catch(J){for(var L=0;L<this._msxml_progid.length;++L){try{G=new ActiveXObject(this._msxml_progid[L]);I={conn:G,tId:H};break}catch(K){}}}finally{return I}},getConnectionObject:function(E){var G;var F=this._transaction_id;try{if(!E){G=this.createXhrObject(F)}else{G={};G.tId=F;G.isUpload=true}if(G){this._transaction_id++}}catch(H){}finally{return G}},asyncRequest:function(H,K,I,G){var J=(this._isFileUpload)?this.getConnectionObject(true):this.getConnectionObject();var L=(I&&I.argument)?I.argument:null;if(!J){return null}else{if(I&&I.customevents){this.initCustomEvents(J,I)}if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(J,I,K,G);return J}if(H.toUpperCase()=="GET"){if(this._sFormData.length!==0){K+=((K.indexOf("?")==-1)?"?":"&")+this._sFormData}}else{if(H.toUpperCase()=="POST"){G=G?this._sFormData+"&"+G:this._sFormData}}}if(H.toUpperCase()=="GET"&&(I&&I.cache===false)){K+=((K.indexOf("?")==-1)?"?":"&")+"rnd="+new Date().valueOf().toString()}J.conn.open(H,K,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((H.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(J)}this.handleReadyState(J,I);J.conn.send(G||"");if(this._isFormSubmit===true){this.resetFormState()}this.startEvent.fire(J,L);if(J.startEvent){J.startEvent.fire(J,L)}return J}},initCustomEvents:function(D,E){var F;for(F in E.customevents){if(this._customEvents[F][0]){D[this._customEvents[F][0]]=new YAHOO.util.CustomEvent(this._customEvents[F][1],(E.scope)?E.scope:null);D[this._customEvents[F][0]].subscribe(E.customevents[F])}}},handleReadyState:function(G,F){var H=this;var E=(F&&F.argument)?F.argument:null;if(F&&F.timeout){this._timeOut[G.tId]=window.setTimeout(function(){H.abort(G,F,true)},F.timeout)}this._poll[G.tId]=window.setInterval(function(){if(G.conn&&G.conn.readyState===4){window.clearInterval(H._poll[G.tId]);delete H._poll[G.tId];if(F&&F.timeout){window.clearTimeout(H._timeOut[G.tId]);delete H._timeOut[G.tId]}H.completeEvent.fire(G,E);if(G.completeEvent){G.completeEvent.fire(G,E)}H.handleTransactionResponse(G,F)}},this._polling_interval)},handleTransactionResponse:function(J,I,H){var L,M;var N=(I&&I.argument)?I.argument:null;try{if(J.conn.status!==undefined&&J.conn.status!==0){L=J.conn.status}else{L=13030}}catch(K){L=13030}if(L>=200&&L<300||L===1223){M=this.createResponseObject(J,N);if(I&&I.success){if(!I.scope){I.success(M)}else{I.success.apply(I.scope,[M])}}this.successEvent.fire(M);if(J.successEvent){J.successEvent.fire(M)}}else{switch(L){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:M=this.createExceptionObject(J.tId,N,(H?H:false));if(I&&I.failure){if(!I.scope){I.failure(M)}else{I.failure.apply(I.scope,[M])}}break;default:M=this.createResponseObject(J,N);if(I&&I.failure){if(!I.scope){I.failure(M)}else{I.failure.apply(I.scope,[M])}}}this.failureEvent.fire(M);if(J.failureEvent){J.failureEvent.fire(M)}}this.releaseObject(J);M=null},createResponseObject:function(M,P){var J={};var N={};try{var K=M.conn.getAllResponseHeaders();var Q=K.split("\n");for(var R=0;R<Q.length;R++){var L=Q[R].indexOf(":");if(L!=-1){N[Q[R].substring(0,L)]=Q[R].substring(L+2)}}}catch(O){}J.tId=M.tId;J.status=(M.conn.status==1223)?204:M.conn.status;J.statusText=(M.conn.status==1223)?"No Content":M.conn.statusText;J.getResponseHeader=N;J.getAllResponseHeaders=K;J.responseText=M.conn.responseText;J.responseXML=M.conn.responseXML;if(P){J.argument=P}return J},createExceptionObject:function(J,N,I){var L=0;var K="communication failure";var O=-1;var P="transaction aborted";var M={};M.tId=J;if(I){M.status=O;M.statusText=P}else{M.status=L;M.statusText=K}if(N){M.argument=N}return M},initHeader:function(E,F,G){var H=(G)?this._default_headers:this._http_headers;H[E]=F;if(G){this._has_default_headers=true}else{this._has_http_headers=true}},setHeader:function(C){var D;if(this._has_default_headers){for(D in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,D)){C.conn.setRequestHeader(D,this._default_headers[D])}}}if(this._has_http_headers){for(D in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,D)){C.conn.setRequestHeader(D,this._http_headers[D])}}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(X,c,R){var Y,S,Z,b,U,a=false,e=[],V=0,f,d,Q,W,T;this.resetFormState();if(typeof X=="string"){Y=(document.getElementById(X)||document.forms[X])}else{if(typeof X=="object"){Y=X}else{return }}if(c){this.createFrame(R?R:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=Y;return }for(f=0,d=Y.elements.length;f<d;++f){S=Y.elements[f];U=S.disabled;Z=S.name;if(!U&&Z){Z=encodeURIComponent(Z)+"=";b=encodeURIComponent(S.value);switch(S.type){case"select-one":if(S.selectedIndex>-1){T=S.options[S.selectedIndex];e[V++]=Z+encodeURIComponent((T.attributes.value&&T.attributes.value.specified)?T.value:T.text)}break;case"select-multiple":if(S.selectedIndex>-1){for(Q=S.selectedIndex,W=S.options.length;Q<W;++Q){T=S.options[Q];if(T.selected){e[V++]=Z+encodeURIComponent((T.attributes.value&&T.attributes.value.specified)?T.value:T.text)}}}break;case"radio":case"checkbox":if(S.checked){e[V++]=Z+b}break;case"file":case undefined:case"reset":case"button":break;case"submit":if(a===false){if(this._hasSubmitListener&&this._submitElementValue){e[V++]=this._submitElementValue}else{e[V++]=Z+b}a=true}break;default:e[V++]=Z+b}}}this._isFormSubmit=true;this._sFormData=e.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(D){var F="yuiIO"+this._transaction_id;var E;if(YAHOO.env.ua.ie){E=document.createElement('<iframe id="'+F+'" name="'+F+'" />');if(typeof D=="boolean"){E.src="javascript:false"}}else{E=document.createElement("iframe");E.id=F;E.name=F}E.style.position="absolute";E.style.top="-1000px";E.style.left="-1000px";document.body.appendChild(E)},appendPostData:function(F){var H=[],J=F.split("&"),I,G;for(I=0;I<J.length;I++){G=J[I].indexOf("=");if(G!=-1){H[I]=document.createElement("input");H[I].type="hidden";H[I].name=decodeURIComponent(J[I].substring(0,G));H[I].value=decodeURIComponent(J[I].substring(G+1));this._formNode.appendChild(H[I])}}return H},uploadFile:function(P,U,d,Q){var Z="yuiIO"+P.tId,Y="multipart/form-data",W=document.getElementById(Z),T=this,X=(U&&U.argument)?U.argument:null,V,a,R,b;var S={action:this._formNode.getAttribute("action"),method:this._formNode.getAttribute("method"),target:this._formNode.getAttribute("target")};this._formNode.setAttribute("action",d);this._formNode.setAttribute("method","POST");this._formNode.setAttribute("target",Z);if(YAHOO.env.ua.ie){this._formNode.setAttribute("encoding",Y)}else{this._formNode.setAttribute("enctype",Y)}if(Q){V=this.appendPostData(Q)}this._formNode.submit();this.startEvent.fire(P,X);if(P.startEvent){P.startEvent.fire(P,X)}if(U&&U.timeout){this._timeOut[P.tId]=window.setTimeout(function(){T.abort(P,U,true)},U.timeout)}if(V&&V.length>0){for(a=0;a<V.length;a++){this._formNode.removeChild(V[a])}}for(R in S){if(YAHOO.lang.hasOwnProperty(S,R)){if(S[R]){this._formNode.setAttribute(R,S[R])}else{this._formNode.removeAttribute(R)}}}this.resetFormState();var c=function(){if(U&&U.timeout){window.clearTimeout(T._timeOut[P.tId]);delete T._timeOut[P.tId]}T.completeEvent.fire(P,X);if(P.completeEvent){P.completeEvent.fire(P,X)}b={tId:P.tId,argument:U.argument};try{b.responseText=W.contentWindow.document.body?W.contentWindow.document.body.innerHTML:W.contentWindow.document.documentElement.textContent;b.responseXML=W.contentWindow.document.XMLDocument?W.contentWindow.document.XMLDocument:W.contentWindow.document}catch(A){}if(U&&U.upload){if(!U.scope){U.upload(b)}else{U.upload.apply(U.scope,[b])}}T.uploadEvent.fire(b);if(P.uploadEvent){P.uploadEvent.fire(b)}YAHOO.util.Event.removeListener(W,"load",c);setTimeout(function(){document.body.removeChild(W);T.releaseObject(P)},100)};YAHOO.util.Event.addListener(W,"load",c)},abort:function(K,I,H){var L;var N=(I&&I.argument)?I.argument:null;if(K&&K.conn){if(this.isCallInProgress(K)){K.conn.abort();window.clearInterval(this._poll[K.tId]);delete this._poll[K.tId];if(H){window.clearTimeout(this._timeOut[K.tId]);delete this._timeOut[K.tId]}L=true}}else{if(K&&K.isUpload===true){var M="yuiIO"+K.tId;var J=document.getElementById(M);if(J){YAHOO.util.Event.removeListener(J,"load");document.body.removeChild(J);if(H){window.clearTimeout(this._timeOut[K.tId]);delete this._timeOut[K.tId]}L=true}}else{L=false}}if(L===true){this.abortEvent.fire(K,N);if(K.abortEvent){K.abortEvent.fire(K,N)}this.handleTransactionResponse(K,I,true)}return L},isCallInProgress:function(D){if(D&&D.conn){return D.conn.readyState!==4&&D.conn.readyState!==0}else{if(D&&D.isUpload===true){var C="yuiIO"+D.tId;return document.getElementById(C)?true:false}else{return false}}},releaseObject:function(B){if(B&&B.conn){B.conn=null;B=null}}};YAHOO.register("connection",YAHOO.util.Connect,{version:"2.6.0",build:"1321"});(function(){var D=YAHOO.util;var C=function(G,H,B,A){if(!G){}this.init(G,H,B,A)};C.NAME="Anim";C.prototype={toString:function(){var B=this.getEl()||{};var A=B.id||B.tagName;return(this.constructor.NAME+": "+A)},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(F,A,B){return this.method(this.currentFrame,A,B-A,this.totalFrames)},setAttribute:function(F,A,B){if(this.patterns.noNegatives.test(F)){A=(A>0)?A:0}D.Dom.setStyle(this.getEl(),F,A+B)},getAttribute:function(L){var J=this.getEl();var B=D.Dom.getStyle(J,L);if(B!=="auto"&&!this.patterns.offsetUnit.test(B)){return parseFloat(B)}var K=this.patterns.offsetAttribute.exec(L)||[];var A=!!(K[3]);var I=!!(K[2]);if(I||(D.Dom.getStyle(J,"position")=="absolute"&&A)){B=J["offset"+K[0].charAt(0).toUpperCase()+K[0].substr(1)]}else{B=0}return B},getDefaultUnit:function(A){if(this.patterns.defaultUnit.test(A)){return"px"}return""},setRuntimeAttribute:function(M){var A;var L;var K=this.attributes;this.runtimeAttributes[M]={};var B=function(E){return(typeof E!=="undefined")};if(!B(K[M]["to"])&&!B(K[M]["by"])){return false}A=(B(K[M]["from"]))?K[M]["from"]:this.getAttribute(M);if(B(K[M]["to"])){L=K[M]["to"]}else{if(B(K[M]["by"])){if(A.constructor==Array){L=[];for(var J=0,N=A.length;J<N;++J){L[J]=A[J]+K[M]["by"][J]*1}}else{L=A+K[M]["by"]*1}}}this.runtimeAttributes[M].start=A;this.runtimeAttributes[M].end=L;this.runtimeAttributes[M].unit=(B(K[M].unit))?K[M]["unit"]:this.getDefaultUnit(M);return true},init:function(T,O,P,B){var A=false;var S=null;var Q=0;T=D.Dom.get(T);this.attributes=O||{};this.duration=!YAHOO.lang.isUndefined(P)?P:1;this.method=B||D.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=D.AnimMgr.fps;this.setEl=function(E){T=D.Dom.get(E)};this.getEl=function(){return T};this.isAnimated=function(){return A};this.getStartTime=function(){return S};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(D.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1}D.AnimMgr.registerElement(this);return true};this.stop=function(E){if(!this.isAnimated()){return false}if(E){this.currentFrame=this.totalFrames;this._onTween.fire()}D.AnimMgr.stop(this)};var M=function(){this.onStart.fire();this.runtimeAttributes={};for(var E in this.attributes){this.setRuntimeAttribute(E)}A=true;Q=0;S=new Date()};var N=function(){var E={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};E.toString=function(){return("duration: "+E.duration+", currentFrame: "+E.currentFrame)};this.onTween.fire(E);var F=this.runtimeAttributes;for(var G in F){this.setAttribute(G,this.doMethod(G,F[G].start,F[G].end),F[G].unit)}Q+=1};var R=function(){var F=(new Date()-S)/1000;var E={duration:F,frames:Q,fps:Q/F};E.toString=function(){return("duration: "+E.duration+", frames: "+E.frames+", fps: "+E.fps)};A=false;Q=0;this.onComplete.fire(E)};this._onStart=new D.CustomEvent("_start",this,true);this.onStart=new D.CustomEvent("start",this);this.onTween=new D.CustomEvent("tween",this);this._onTween=new D.CustomEvent("_tween",this,true);this.onComplete=new D.CustomEvent("complete",this);this._onComplete=new D.CustomEvent("_complete",this,true);this._onStart.subscribe(M);this._onTween.subscribe(N);this._onComplete.subscribe(R)}};D.Anim=C})();YAHOO.util.AnimMgr=new function(){var I=null;var J=[];var F=0;this.fps=1000;this.delay=1;this.registerElement=function(A){J[J.length]=A;F+=1;A._onStart.fire();this.start()};this.unRegister=function(A,B){B=B||G(A);if(!A.isAnimated()||B==-1){return false}A._onComplete.fire();J.splice(B,1);F-=1;if(F<=0){this.stop()}return true};this.start=function(){if(I===null){I=setInterval(this.run,this.delay)}};this.stop=function(A){if(!A){clearInterval(I);for(var B=0,C=J.length;B<C;++B){this.unRegister(J[0],0)}J=[];I=null;F=0}else{this.unRegister(A)}};this.run=function(){for(var A=0,C=J.length;A<C;++A){var B=J[A];if(!B||!B.isAnimated()){continue}if(B.currentFrame<B.totalFrames||B.totalFrames===null){B.currentFrame+=1;if(B.useSeconds){H(B)}B._onTween.fire()}else{YAHOO.util.AnimMgr.stop(B,A)}}};var G=function(A){for(var B=0,C=J.length;B<C;++B){if(J[B]==A){return B}}return -1};var H=function(E){var B=E.totalFrames;var C=E.currentFrame;var D=(E.currentFrame*E.duration*1000/E.totalFrames);var L=(new Date()-E.getStartTime());var A=0;if(L<E.duration*1000){A=Math.round((L/D-1)*E.currentFrame)}else{A=B-(C+1)}if(A>0&&isFinite(A)){if(E.currentFrame+A>=B){A=B-(C+1)}E.currentFrame+=A}}};YAHOO.util.Bezier=new function(){this.getPosition=function(I,J){var H=I.length;var K=[];for(var L=0;L<H;++L){K[L]=[I[L][0],I[L][1]]}for(var G=1;G<H;++G){for(L=0;L<H-G;++L){K[L][0]=(1-J)*K[L][0]+J*K[parseInt(L+1,10)][0];K[L][1]=(1-J)*K[L][1]+J*K[parseInt(L+1,10)][1]}}return[K[0][0],K[0][1]]}};(function(){var E=function(C,D,B,A){E.superclass.constructor.call(this,C,D,B,A)};E.NAME="ColorAnim";E.DEFAULT_BGCOLOR="#fff";var G=YAHOO.util;YAHOO.extend(E,G.Anim);var F=E.superclass;var H=E.prototype;H.patterns.color=/color$/i;H.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;H.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;H.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;H.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;H.parseColor=function(B){if(B.length==3){return B}var A=this.patterns.hex.exec(B);if(A&&A.length==4){return[parseInt(A[1],16),parseInt(A[2],16),parseInt(A[3],16)]}A=this.patterns.rgb.exec(B);if(A&&A.length==4){return[parseInt(A[1],10),parseInt(A[2],10),parseInt(A[3],10)]}A=this.patterns.hex3.exec(B);if(A&&A.length==4){return[parseInt(A[1]+A[1],16),parseInt(A[2]+A[2],16),parseInt(A[3]+A[3],16)]}return null};H.getAttribute=function(J){var C=this.getEl();if(this.patterns.color.test(J)){var A=YAHOO.util.Dom.getStyle(C,J);var B=this;if(this.patterns.transparent.test(A)){var D=YAHOO.util.Dom.getAncestorBy(C,function(I){return !B.patterns.transparent.test(A)});if(D){A=G.Dom.getStyle(D,J)}else{A=E.DEFAULT_BGCOLOR}}}else{A=F.getAttribute.call(this,J)}return A};H.doMethod=function(K,A,D){var B;if(this.patterns.color.test(K)){B=[];for(var C=0,L=A.length;C<L;++C){B[C]=F.doMethod.call(this,K,A[C],D[C])}B="rgb("+Math.floor(B[0])+","+Math.floor(B[1])+","+Math.floor(B[2])+")"}else{B=F.doMethod.call(this,K,A,D)}return B};H.setRuntimeAttribute=function(K){F.setRuntimeAttribute.call(this,K);if(this.patterns.color.test(K)){var C=this.attributes;var A=this.parseColor(this.runtimeAttributes[K].start);var D=this.parseColor(this.runtimeAttributes[K].end);if(typeof C[K]["to"]==="undefined"&&typeof C[K]["by"]!=="undefined"){D=this.parseColor(C[K].by);for(var B=0,L=A.length;B<L;++B){D[B]=A[B]+D[B]}}this.runtimeAttributes[K].start=A;this.runtimeAttributes[K].end=D}};G.ColorAnim=E})();YAHOO.util.Easing={easeNone:function(H,E,F,G){return F*H/G+E},easeIn:function(H,E,F,G){return F*(H/=G)*H+E},easeOut:function(H,E,F,G){return -F*(H/=G)*(H-2)+E},easeBoth:function(H,E,F,G){if((H/=G/2)<1){return F/2*H*H+E}return -F/2*((--H)*(H-2)-1)+E},easeInStrong:function(H,E,F,G){return F*(H/=G)*H*H*H+E},easeOutStrong:function(H,E,F,G){return -F*((H=H/G-1)*H*H*H-1)+E},easeBothStrong:function(H,E,F,G){if((H/=G/2)<1){return F/2*H*H*H*H+E}return -F/2*((H-=2)*H*H*H-2)+E},elasticIn:function(M,H,I,J,N,K){if(M==0){return H}if((M/=J)==1){return H+I}if(!K){K=J*0.3}if(!N||N<Math.abs(I)){N=I;var L=K/4}else{var L=K/(2*Math.PI)*Math.asin(I/N)}return -(N*Math.pow(2,10*(M-=1))*Math.sin((M*J-L)*(2*Math.PI)/K))+H},elasticOut:function(M,H,I,J,N,K){if(M==0){return H}if((M/=J)==1){return H+I}if(!K){K=J*0.3}if(!N||N<Math.abs(I)){N=I;var L=K/4}else{var L=K/(2*Math.PI)*Math.asin(I/N)}return N*Math.pow(2,-10*M)*Math.sin((M*J-L)*(2*Math.PI)/K)+I+H},elasticBoth:function(M,H,I,J,N,K){if(M==0){return H}if((M/=J/2)==2){return H+I}if(!K){K=J*(0.3*1.5)}if(!N||N<Math.abs(I)){N=I;var L=K/4}else{var L=K/(2*Math.PI)*Math.asin(I/N)}if(M<1){return -0.5*(N*Math.pow(2,10*(M-=1))*Math.sin((M*J-L)*(2*Math.PI)/K))+H}return N*Math.pow(2,-10*(M-=1))*Math.sin((M*J-L)*(2*Math.PI)/K)*0.5+I+H},backIn:function(J,F,G,H,I){if(typeof I=="undefined"){I=1.70158}return G*(J/=H)*J*((I+1)*J-I)+F},backOut:function(J,F,G,H,I){if(typeof I=="undefined"){I=1.70158}return G*((J=J/H-1)*J*((I+1)*J+I)+1)+F},backBoth:function(J,F,G,H,I){if(typeof I=="undefined"){I=1.70158}if((J/=H/2)<1){return G/2*(J*J*(((I*=(1.525))+1)*J-I))+F}return G/2*((J-=2)*J*(((I*=(1.525))+1)*J+I)+2)+F},bounceIn:function(H,E,F,G){return F-YAHOO.util.Easing.bounceOut(G-H,0,F,G)+E},bounceOut:function(H,E,F,G){if((H/=G)<(1/2.75)){return F*(7.5625*H*H)+E}else{if(H<(2/2.75)){return F*(7.5625*(H-=(1.5/2.75))*H+0.75)+E}else{if(H<(2.5/2.75)){return F*(7.5625*(H-=(2.25/2.75))*H+0.9375)+E}}}return F*(7.5625*(H-=(2.625/2.75))*H+0.984375)+E},bounceBoth:function(H,E,F,G){if(H<G/2){return YAHOO.util.Easing.bounceIn(H*2,0,F,G)*0.5+E}return YAHOO.util.Easing.bounceOut(H*2-G,0,F,G)*0.5+F*0.5+E}};(function(){var G=function(C,D,B,A){if(C){G.superclass.constructor.call(this,C,D,B,A)}};G.NAME="Motion";var I=YAHOO.util;YAHOO.extend(G,I.ColorAnim);var H=G.superclass;var K=G.prototype;K.patterns.points=/^points$/i;K.setAttribute=function(C,A,B){if(this.patterns.points.test(C)){B=B||"px";H.setAttribute.call(this,"left",A[0],B);H.setAttribute.call(this,"top",A[1],B)}else{H.setAttribute.call(this,C,A,B)}};K.getAttribute=function(B){if(this.patterns.points.test(B)){var A=[H.getAttribute.call(this,"left"),H.getAttribute.call(this,"top")]}else{A=H.getAttribute.call(this,B)}return A};K.doMethod=function(E,A,D){var B=null;if(this.patterns.points.test(E)){var C=this.method(this.currentFrame,0,100,this.totalFrames)/100;B=I.Bezier.getPosition(this.runtimeAttributes[E],C)}else{B=H.doMethod.call(this,E,A,D)}return B};K.setRuntimeAttribute=function(A){if(this.patterns.points.test(A)){var S=this.getEl();var Q=this.attributes;var T;var E=Q["points"]["control"]||[];var R;var D,B;if(E.length>0&&!(E[0] instanceof Array)){E=[E]}else{var F=[];for(D=0,B=E.length;D<B;++D){F[D]=E[D]}E=F}if(I.Dom.getStyle(S,"position")=="static"){I.Dom.setStyle(S,"position","relative")}if(J(Q["points"]["from"])){I.Dom.setXY(S,Q["points"]["from"])}else{I.Dom.setXY(S,I.Dom.getXY(S))}T=this.getAttribute("points");if(J(Q["points"]["to"])){R=L.call(this,Q["points"]["to"],T);var C=I.Dom.getXY(this.getEl());for(D=0,B=E.length;D<B;++D){E[D]=L.call(this,E[D],T)}}else{if(J(Q["points"]["by"])){R=[T[0]+Q["points"]["by"][0],T[1]+Q["points"]["by"][1]];for(D=0,B=E.length;D<B;++D){E[D]=[T[0]+E[D][0],T[1]+E[D][1]]}}}this.runtimeAttributes[A]=[T];if(E.length>0){this.runtimeAttributes[A]=this.runtimeAttributes[A].concat(E)}this.runtimeAttributes[A][this.runtimeAttributes[A].length]=R}else{H.setRuntimeAttribute.call(this,A)}};var L=function(C,A){var B=I.Dom.getXY(this.getEl());C=[C[0]-B[0]+A[0],C[1]-B[1]+A[1]];return C};var J=function(A){return(typeof A!=="undefined")};I.Motion=G})();(function(){var F=function(C,D,B,A){if(C){F.superclass.constructor.call(this,C,D,B,A)}};F.NAME="Scroll";var H=YAHOO.util;YAHOO.extend(F,H.ColorAnim);var G=F.superclass;var E=F.prototype;E.doMethod=function(D,A,C){var B=null;if(D=="scroll"){B=[this.method(this.currentFrame,A[0],C[0]-A[0],this.totalFrames),this.method(this.currentFrame,A[1],C[1]-A[1],this.totalFrames)]}else{B=G.doMethod.call(this,D,A,C)}return B};E.getAttribute=function(C){var A=null;var B=this.getEl();if(C=="scroll"){A=[B.scrollLeft,B.scrollTop]}else{A=G.getAttribute.call(this,C)}return A};E.setAttribute=function(D,A,B){var C=this.getEl();if(D=="scroll"){C.scrollLeft=A[0];C.scrollTop=A[1]}else{G.setAttribute.call(this,D,A,B)}};H.Scroll=F})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.6.0",build:"1321"});if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var C=YAHOO.util.Event,D=YAHOO.util.Dom;return{useShim:false,_shimActive:false,_shimState:false,_debugShim:false,_createShim:function(){var A=document.createElement("div");A.id="yui-ddm-shim";if(document.body.firstChild){document.body.insertBefore(A,document.body.firstChild)}else{document.body.appendChild(A)}A.style.display="none";A.style.backgroundColor="red";A.style.position="absolute";A.style.zIndex="99999";D.setStyle(A,"opacity","0");this._shim=A;C.on(A,"mouseup",this.handleMouseUp,this,true);C.on(A,"mousemove",this.handleMouseMove,this,true);C.on(window,"scroll",this._sizeShim,this,true)},_sizeShim:function(){if(this._shimActive){var A=this._shim;A.style.height=D.getDocumentHeight()+"px";A.style.width=D.getDocumentWidth()+"px";A.style.top="0";A.style.left="0"}},_activateShim:function(){if(this.useShim){if(!this._shim){this._createShim()}this._shimActive=true;var B=this._shim,A="0";if(this._debugShim){A=".5"}D.setStyle(B,"opacity",A);this._sizeShim();B.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(H,I){for(var B in this.ids){for(var J in this.ids[B]){var A=this.ids[B][J];if(!this.isTypeOfDD(A)){continue}A[H].apply(A,I)}}},_onLoad:function(){this.init();C.on(document,"mouseup",this.handleMouseUp,this,true);C.on(document,"mousemove",this.handleMouseMove,this,true);C.on(window,"unload",this._onUnload,this,true);C.on(window,"resize",this._onResize,this,true)},_onResize:function(A){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(A,B){if(!this.initialized){this.init()}if(!this.ids[B]){this.ids[B]={}}this.ids[B][A.id]=A},removeDDFromGroup:function(A,F){if(!this.ids[F]){this.ids[F]={}}var B=this.ids[F];if(B&&B[A.id]){delete B[A.id]}},_remove:function(A){for(var B in A.groups){if(B){var F=this.ids[B];if(F&&F[A.id]){delete F[A.id]}}}delete this.handleIds[A.id]},regHandle:function(A,B){if(!this.handleIds[A]){this.handleIds[A]={}}this.handleIds[A][B]=B},isDragDrop:function(A){return(this.getDDById(A))?true:false},getRelated:function(A,K){var B=[];for(var I in A.groups){for(var J in this.ids[I]){var L=this.ids[I][J];if(!this.isTypeOfDD(L)){continue}if(!K||L.isTarget){B[B.length]=L}}}return B},isLegalTarget:function(A,B){var I=this.getRelated(A,true);for(var H=0,J=I.length;H<J;++H){if(I[H].id==B.id){return true}}return false},isTypeOfDD:function(A){return(A&&A.__ygDragDrop)},isHandle:function(A,B){return(this.handleIds[A]&&this.handleIds[A][B])},getDDById:function(A){for(var B in this.ids){if(this.ids[B][A]){return this.ids[B][A]}}return null},handleMouseDown:function(A,B){this.currentTarget=YAHOO.util.Event.getTarget(A);this.dragCurrent=B;var F=B.getEl();this.startX=YAHOO.util.Event.getPageX(A);this.startY=YAHOO.util.Event.getPageY(A);this.deltaX=this.startX-F.offsetLeft;this.deltaY=this.startY-F.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var E=YAHOO.util.DDM;E.startDrag(E.startX,E.startY);E.fromTimeout=true},this.clickTimeThresh)},startDrag:function(F,A){if(this.dragCurrent&&this.dragCurrent.useShim){this._shimState=this.useShim;this.useShim=true}this._activateShim();clearTimeout(this.clickTimeout);var B=this.dragCurrent;if(B&&B.events.b4StartDrag){B.b4StartDrag(F,A);B.fireEvent("b4StartDragEvent",{x:F,y:A})}if(B&&B.events.startDrag){B.startDrag(F,A);B.fireEvent("startDragEvent",{x:F,y:A})}this.dragThreshMet=true},handleMouseUp:function(A){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){if(this.fromTimeout){this.fromTimeout=false;this.handleMouseMove(A)}this.fromTimeout=false;this.fireEvents(A,true)}else{}this.stopDrag(A);this.stopEvent(A)}},stopEvent:function(A){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(A)}if(this.preventDefault){YAHOO.util.Event.preventDefault(A)}},stopDrag:function(A,B){var F=this.dragCurrent;if(F&&!B){if(this.dragThreshMet){if(F.events.b4EndDrag){F.b4EndDrag(A);F.fireEvent("b4EndDragEvent",{e:A})}if(F.events.endDrag){F.endDrag(A);F.fireEvent("endDragEvent",{e:A})}}if(F.events.mouseUp){F.onMouseUp(A);F.fireEvent("mouseUpEvent",{e:A})}}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(A){var H=this.dragCurrent;if(H){if(YAHOO.util.Event.isIE&&!A.button){this.stopEvent(A);return this.handleMouseUp(A)}else{if(A.clientX<0||A.clientY<0){}}if(!this.dragThreshMet){var B=Math.abs(this.startX-YAHOO.util.Event.getPageX(A));var G=Math.abs(this.startY-YAHOO.util.Event.getPageY(A));if(B>this.clickPixelThresh||G>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){if(H&&H.events.b4Drag){H.b4Drag(A);H.fireEvent("b4DragEvent",{e:A})}if(H&&H.events.drag){H.onDrag(A);H.fireEvent("dragEvent",{e:A})}if(H){this.fireEvents(A,false)}}this.stopEvent(A)}},fireEvents:function(f,q){var AC=this.dragCurrent;if(!AC||AC.isLocked()||AC.dragOnly){return }var o=YAHOO.util.Event.getPageX(f),p=YAHOO.util.Event.getPageY(f),m=new YAHOO.util.Point(o,p),r=AC.getTargetCoord(m.x,m.y),w=AC.getDragEl(),x=["out","over","drop","enter"],g=new YAHOO.util.Region(r.y,r.x+w.offsetWidth,r.y+w.offsetHeight,r.x),t=[],y={},l=[],AB={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var j in this.dragOvers){var AA=this.dragOvers[j];if(!this.isTypeOfDD(AA)){continue}if(!this.isOverTarget(m,AA,this.mode,g)){AB.outEvts.push(AA)}t[j]=true;delete this.dragOvers[j]}for(var k in AC.groups){if("string"!=typeof k){continue}for(j in this.ids[k]){var v=this.ids[k][j];if(!this.isTypeOfDD(v)){continue}if(v.isTarget&&!v.isLocked()&&v!=AC){if(this.isOverTarget(m,v,this.mode,g)){y[k]=true;if(q){AB.dropEvts.push(v)}else{if(!t[v.id]){AB.enterEvts.push(v)}else{AB.overEvts.push(v)}this.dragOvers[v.id]=v}}}}}this.interactionInfo={out:AB.outEvts,enter:AB.enterEvts,over:AB.overEvts,drop:AB.dropEvts,point:m,draggedRegion:g,sourceRegion:this.locationCache[AC.id],validDrop:q};for(var z in y){l.push(z)}if(q&&!AB.dropEvts.length){this.interactionInfo.validDrop=false;if(AC.events.invalidDrop){AC.onInvalidDrop(f);AC.fireEvent("invalidDropEvent",{e:f})}}for(j=0;j<x.length;j++){var B=null;if(AB[x[j]+"Evts"]){B=AB[x[j]+"Evts"]}if(B&&B.length){var u=x[j].charAt(0).toUpperCase()+x[j].substr(1),b="onDrag"+u,s="b4Drag"+u,n="drag"+u+"Event",e="drag"+u;if(this.mode){if(AC.events[s]){AC[s](f,B,l);AC.fireEvent(s+"Event",{event:f,info:B,group:l})}if(AC.events[e]){AC[b](f,B,l);AC.fireEvent(n,{event:f,info:B,group:l})}}else{for(var A=0,h=B.length;A<h;++A){if(AC.events[s]){AC[s](f,B[A].id,l[0]);AC.fireEvent(s+"Event",{event:f,info:B[A].id,group:l[0]})}if(AC.events[e]){AC[b](f,B[A].id,l[0]);AC.fireEvent(n,{event:f,info:B[A].id,group:l[0]})}}}}}},getBestMatch:function(H){var A=null;var I=H.length;if(I==1){A=H[0]}else{for(var B=0;B<I;++B){var J=H[B];if(this.mode==this.INTERSECT&&J.cursorIsOver){A=J;break}else{if(!A||!A.overlap||(J.overlap&&A.overlap.getArea()<J.overlap.getArea())){A=J}}}}return A},refreshCache:function(K){var I=K||this.ids;for(var L in I){if("string"!=typeof L){continue}for(var J in this.ids[L]){var B=this.ids[L][J];if(this.isTypeOfDD(B)){var A=this.getLocation(B);if(A){this.locationCache[B.id]=A}else{delete this.locationCache[B.id]}}}}},verifyEl:function(B){try{if(B){var F=B.offsetParent;if(F){return true}}}catch(A){}return false},getLocation:function(U){if(!this.isTypeOfDD(U)){return null}var W=U.getEl(),R,X,A,P,Q,O,B,S,V;try{R=YAHOO.util.Dom.getXY(W)}catch(T){}if(!R){return null}X=R[0];A=X+W.offsetWidth;P=R[1];Q=P+W.offsetHeight;O=P-U.padding[0];B=A+U.padding[1];S=Q+U.padding[2];V=X-U.padding[3];return new YAHOO.util.Region(O,B,S,V)},isOverTarget:function(L,B,R,Q){var P=this.locationCache[B.id];if(!P||!this.useCache){P=this.getLocation(B);this.locationCache[B.id]=P}if(!P){return false}B.cursorIsOver=P.contains(L);var M=this.dragCurrent;if(!M||(!R&&!M.constrainX&&!M.constrainY)){return B.cursorIsOver}B.overlap=null;if(!Q){var O=M.getTargetCoord(L.x,L.y);var A=M.getDragEl();Q=new YAHOO.util.Region(O.y,O.x+A.offsetWidth,O.y+A.offsetHeight,O.x)}var N=Q.intersect(P);if(N){B.overlap=N;return(R)?true:B.cursorIsOver}else{return false}},_onUnload:function(A,B){this.unregAll()},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null}this._execOnAll("unreg",[]);this.ids={}},elementCache:{},getElWrapper:function(A){var B=this.elementCache[A];if(!B||!B.el){B=this.elementCache[A]=new this.ElementWrapper(YAHOO.util.Dom.get(A))}return B},getElement:function(A){return YAHOO.util.Dom.get(A)},getCss:function(A){var B=YAHOO.util.Dom.get(A);return(B)?B.style:null},ElementWrapper:function(A){this.el=A||null;this.id=this.el&&A.id;this.css=this.el&&A.style},getPosX:function(A){return YAHOO.util.Dom.getX(A)},getPosY:function(A){return YAHOO.util.Dom.getY(A)},swapNode:function(B,H){if(B.swapNode){B.swapNode(H)}else{var A=H.parentNode;var G=H.nextSibling;if(G==B){A.insertBefore(B,H)}else{if(H==B.nextSibling){A.insertBefore(H,B)}else{B.parentNode.replaceChild(H,B);A.insertBefore(B,G)}}}},getScroll:function(){var B,H,A=document.documentElement,G=document.body;if(A&&(A.scrollTop||A.scrollLeft)){B=A.scrollTop;H=A.scrollLeft}else{if(G){B=G.scrollTop;H=G.scrollLeft}else{}}return{top:B,left:H}},getStyle:function(A,B){return YAHOO.util.Dom.getStyle(A,B)},getScrollTop:function(){return this.getScroll().top},getScrollLeft:function(){return this.getScroll().left},moveToEl:function(F,A){var B=YAHOO.util.Dom.getXY(A);YAHOO.util.Dom.setXY(F,B)},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight()},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth()},numericSort:function(A,B){return(A-B)},_timeoutCount:0,_addListeners:function(){var A=YAHOO.util.DDM;if(YAHOO.util.Event&&document){A._onLoad()}else{if(A._timeoutCount>2000){}else{setTimeout(A._addListeners,10);if(document&&document.body){A._timeoutCount+=1}}}},handleWasClicked:function(F,A){if(this.isHandle(A,F.id)){return true}else{var B=F.parentNode;while(B){if(this.isHandle(A,B.id)){return true}else{B=B.parentNode}}}return false}}}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners()}(function(){var C=YAHOO.util.Event;var D=YAHOO.util.Dom;YAHOO.util.DragDrop=function(A,F,B){if(A){this.init(A,F,B)}};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(B,A){},startDrag:function(B,A){},b4Drag:function(A){},onDrag:function(A){},onDragEnter:function(B,A){},b4DragOver:function(A){},onDragOver:function(B,A){},b4DragOut:function(A){},onDragOut:function(B,A){},b4DragDrop:function(A){},onDragDrop:function(B,A){},onInvalidDrop:function(A){},b4EndDrag:function(A){},endDrag:function(A){},b4MouseDown:function(A){},onMouseDown:function(A){},onMouseUp:function(A){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=D.get(this.id)}return this._domRef},getDragEl:function(){return D.get(this.dragElId)},init:function(A,H,G){this.initTarget(A,H,G);C.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);for(var B in this.events){this.createEvent(B+"Event")}},initTarget:function(A,F,B){this.config=B||{};this.events={};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof A!=="string"){this._domRef=A;A=D.generateId(A)}this.id=A;this.addToGroup((F)?F:"default");this.handleElId=A;C.onAvailable(A,this.handleOnAvailable,this,true);this.setDragElId(A);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 A in this.config.events){if(this.config.events[A]===false){this.events[A]=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(B,H,A,G){if(!H&&0!==H){this.padding=[B,B,B,B]}else{if(!A&&0!==A){this.padding=[B,H,B,H]}else{this.padding=[B,H,A,G]}}},setInitPosition:function(I,J){var B=this.getEl();if(!this.DDM.verifyEl(B)){if(B&&B.style&&(B.style.display=="none")){}else{}return }var K=I||0;var L=J||0;var A=D.getXY(B);this.initPageX=A[0]-K;this.initPageY=A[1]-L;this.lastPageX=A[0];this.lastPageY=A[1];this.setStartPosition(A)},setStartPosition:function(A){var B=A||D.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=B[0];this.startPageY=B[1]},addToGroup:function(A){this.groups[A]=true;this.DDM.regDragDrop(this,A)},removeFromGroup:function(A){if(this.groups[A]){delete this.groups[A]}this.DDM.removeDDFromGroup(this,A)},setDragElId:function(A){this.dragElId=A},setHandleElId:function(A){if(typeof A!=="string"){A=D.generateId(A)}this.handleElId=A;this.DDM.regHandle(this.id,A)},setOuterHandleElId:function(A){if(typeof A!=="string"){A=D.generateId(A)}C.on(A,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(A);this.hasOuterHandles=true},unreg:function(){C.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this)},isLocked:function(){return(this.DDM.isLocked()||this.locked)},handleMouseDown:function(A,B){var O=A.which||A.button;if(this.primaryButtonOnly&&O>1){return }if(this.isLocked()){return }var P=this.b4MouseDown(A),M=true;if(this.events.b4MouseDown){M=this.fireEvent("b4MouseDownEvent",A)}var N=this.onMouseDown(A),K=true;if(this.events.mouseDown){K=this.fireEvent("mouseDownEvent",A)}if((P===false)||(N===false)||(M===false)||(K===false)){return }this.DDM.refreshCache(this.groups);var L=new YAHOO.util.Point(C.getPageX(A),C.getPageY(A));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(L,this)){}else{if(this.clickValidator(A)){this.setStartPosition();this.DDM.handleMouseDown(A,this);this.DDM.stopEvent(A)}else{}}},clickValidator:function(A){var B=YAHOO.util.Event.getTarget(A);return(this.isValidHandleChild(B)&&(this.id==this.handleElId||this.DDM.handleWasClicked(B,this.id)))},getTargetCoord:function(B,G){var H=B-this.deltaX;var A=G-this.deltaY;if(this.constrainX){if(H<this.minX){H=this.minX}if(H>this.maxX){H=this.maxX}}if(this.constrainY){if(A<this.minY){A=this.minY}if(A>this.maxY){A=this.maxY}}H=this.getTick(H,this.xTicks);A=this.getTick(A,this.yTicks);return{x:H,y:A}},addInvalidHandleType:function(B){var A=B.toUpperCase();this.invalidHandleTypes[A]=A},addInvalidHandleId:function(A){if(typeof A!=="string"){A=D.generateId(A)}this.invalidHandleIds[A]=A},addInvalidHandleClass:function(A){this.invalidHandleClasses.push(A)},removeInvalidHandleType:function(B){var A=B.toUpperCase();delete this.invalidHandleTypes[A]},removeInvalidHandleId:function(A){if(typeof A!=="string"){A=D.generateId(A)}delete this.invalidHandleIds[A]},removeInvalidHandleClass:function(B){for(var A=0,F=this.invalidHandleClasses.length;A<F;++A){if(this.invalidHandleClasses[A]==B){delete this.invalidHandleClasses[A]}}},isValidHandleChild:function(I){var J=true;var A;try{A=I.nodeName.toUpperCase()}catch(B){A=I.nodeName}J=J&&!this.invalidHandleTypes[A];J=J&&!this.invalidHandleIds[I.id];for(var K=0,L=this.invalidHandleClasses.length;J&&K<L;++K){J=!D.hasClass(I,this.invalidHandleClasses[K])}return J},setXTicks:function(A,H){this.xTicks=[];this.xTickSize=H;var B={};for(var G=this.initPageX;G>=this.minX;G=G-H){if(!B[G]){this.xTicks[this.xTicks.length]=G;B[G]=true}}for(G=this.initPageX;G<=this.maxX;G=G+H){if(!B[G]){this.xTicks[this.xTicks.length]=G;B[G]=true}}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(A,H){this.yTicks=[];this.yTickSize=H;var B={};for(var G=this.initPageY;G>=this.minY;G=G-H){if(!B[G]){this.yTicks[this.yTicks.length]=G;B[G]=true}}for(G=this.initPageY;G<=this.maxY;G=G+H){if(!B[G]){this.yTicks[this.yTicks.length]=G;B[G]=true}}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(A,B,F){this.leftConstraint=parseInt(A,10);this.rightConstraint=parseInt(B,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(F){this.setXTicks(this.initPageX,F)}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(F,A,B){this.topConstraint=parseInt(F,10);this.bottomConstraint=parseInt(A,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(B){this.setYTicks(this.initPageY,B)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var A=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var B=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(A,B)}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(A,K){if(!K){return A}else{if(K[0]>=A){return K[0]}else{for(var M=0,N=K.length;M<N;++M){var L=M+1;if(K[L]&&K[L]>=A){var B=A-K[M];var J=K[L]-A;return(J>B)?K[M]:K[L]}}return K[K.length-1]}}},toString:function(){return("DragDrop "+this.id)}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider)})();YAHOO.util.DD=function(E,D,F){if(E){this.init(E,D,F)}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(G,H){var E=G-this.startPageX;var F=H-this.startPageY;this.setDelta(E,F)},setDelta:function(D,C){this.deltaX=D;this.deltaY=C},setDragElPos:function(E,F){var D=this.getDragEl();this.alignElWithMouse(D,E,F)},alignElWithMouse:function(O,K,L){var M=this.getTargetCoord(K,L);if(!this.deltaSetXY){var J=[M.x,M.y];YAHOO.util.Dom.setXY(O,J);var N=parseInt(YAHOO.util.Dom.getStyle(O,"left"),10);var P=parseInt(YAHOO.util.Dom.getStyle(O,"top"),10);this.deltaSetXY=[N-M.x,P-M.y]}else{YAHOO.util.Dom.setStyle(O,"left",(M.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(O,"top",(M.y+this.deltaSetXY[1])+"px")}this.cachePosition(M.x,M.y);var I=this;setTimeout(function(){I.autoScroll.call(I,M.x,M.y,O.offsetHeight,O.offsetWidth)},0)},cachePosition:function(F,D){if(F){this.lastPageX=F;this.lastPageY=D}else{var E=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=E[0];this.lastPageY=E[1]}},autoScroll:function(W,X,b,V){if(this.scroll){var U=this.DDM.getClientHeight();var Q=this.DDM.getClientWidth();var S=this.DDM.getScrollTop();var O=this.DDM.getScrollLeft();var Y=b+X;var T=V+W;var Z=(U+S-X-this.deltaY);var a=(Q+O-W-this.deltaX);var P=40;var R=(document.all)?80:30;if(Y>U&&Z<P){window.scrollTo(O,S+R)}if(X<S&&S>0&&X-S<P){window.scrollTo(O,S-R)}if(T>Q&&a<P){window.scrollTo(O+R,S)}if(W<O&&O>0&&W-O<P){window.scrollTo(O-R,S)}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false)},b4MouseDown:function(B){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(B),YAHOO.util.Event.getPageY(B))},b4Drag:function(B){this.setDragElPos(YAHOO.util.Event.getPageX(B),YAHOO.util.Event.getPageY(B))},toString:function(){return("DD "+this.id)}});YAHOO.util.DDProxy=function(E,D,F){if(E){this.init(E,D,F);this.initFrame()}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var N=this,H=document.body;if(!H||!H.firstChild){setTimeout(function(){N.createFrame()},50);return }var I=this.getDragEl(),K=YAHOO.util.Dom;if(!I){I=document.createElement("div");I.id=this.dragElId;var L=I.style;L.position="absolute";L.visibility="hidden";L.cursor="move";L.border="2px solid #aaa";L.zIndex=999;L.height="25px";L.width="25px";var M=document.createElement("div");K.setStyle(M,"height","100%");K.setStyle(M,"width","100%");K.setStyle(M,"background-color","#ccc");K.setStyle(M,"opacity","0");I.appendChild(M);if(YAHOO.env.ua.ie){var J=document.createElement("iframe");J.setAttribute("src","javascript: false;");J.setAttribute("scrolling","no");J.setAttribute("frameborder","0");I.insertBefore(J,I.firstChild);K.setStyle(J,"height","100%");K.setStyle(J,"width","100%");K.setStyle(J,"position","absolute");K.setStyle(J,"top","0");K.setStyle(J,"left","0");K.setStyle(J,"opacity","0");K.setStyle(J,"zIndex","-1");K.setStyle(J.nextSibling,"zIndex","2")}H.insertBefore(I,H.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(G,H){var I=this.getEl();var F=this.getDragEl();var J=F.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(J.width,10)/2),Math.round(parseInt(J.height,10)/2))}this.setDragElPos(G,H);YAHOO.util.Dom.setStyle(F,"visibility","visible")},_resizeProxy:function(){if(this.resizeFrame){var O=YAHOO.util.Dom;var L=this.getEl();var K=this.getDragEl();var P=parseInt(O.getStyle(K,"borderTopWidth"),10);var N=parseInt(O.getStyle(K,"borderRightWidth"),10);var Q=parseInt(O.getStyle(K,"borderBottomWidth"),10);var J=parseInt(O.getStyle(K,"borderLeftWidth"),10);if(isNaN(P)){P=0}if(isNaN(N)){N=0}if(isNaN(Q)){Q=0}if(isNaN(J)){J=0}var R=Math.max(0,L.offsetWidth-N-J);var M=Math.max(0,L.offsetHeight-P-Q);O.setStyle(K,"width",R+"px");O.setStyle(K,"height",M+"px")}},b4MouseDown:function(F){this.setStartPosition();var D=YAHOO.util.Event.getPageX(F);var E=YAHOO.util.Event.getPageY(F);this.autoOffset(D,E)},b4StartDrag:function(C,D){this.showFrame(C,D)},b4EndDrag:function(B){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden")},endDrag:function(F){var G=YAHOO.util.Dom;var H=this.getEl();var E=this.getDragEl();G.setStyle(E,"visibility","");G.setStyle(H,"visibility","hidden");YAHOO.util.DDM.moveToEl(H,E);G.setStyle(E,"visibility","hidden");G.setStyle(H,"visibility","")},toString:function(){return("DDProxy "+this.id)}});YAHOO.util.DDTarget=function(E,D,F){if(E){this.initTarget(E,D,F)}};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 A=YAHOO.lang,C=YAHOO.util.CustomEvent,B=YAHOO.util.Config;B.CONFIG_CHANGED_EVENT="configChanged";B.BOOLEAN_TYPE="boolean";B.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(D){this.owner=D;this.configChangedEvent=this.createEvent(B.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=C.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[]},checkBoolean:function(D){return(typeof D==B.BOOLEAN_TYPE)},checkNumber:function(D){return(!isNaN(D))},fireEvent:function(F,D){var E=this.config[F];if(E&&E.event){E.event.fire(D)}},addProperty:function(D,E){D=D.toLowerCase();this.config[D]=E;E.event=this.createEvent(D,{scope:this.owner});E.event.signature=C.LIST;E.key=D;if(E.handler){E.event.subscribe(E.handler,this.owner)}this.setProperty(D,E.value,true);if(!E.suppressEvent){this.queueProperty(D,E.value)}},getConfig:function(){var G={},E=this.config,D,F;for(D in E){if(A.hasOwnProperty(E,D)){F=E[D];if(F&&F.event){G[D]=F.value}}}return G},getProperty:function(E){var D=this.config[E.toLowerCase()];if(D&&D.event){return D.value}else{return undefined}},resetProperty:function(E){E=E.toLowerCase();var D=this.config[E];if(D&&D.event){if(this.initialConfig[E]&&!A.isUndefined(this.initialConfig[E])){this.setProperty(E,this.initialConfig[E]);return true}}else{return false}},setProperty:function(F,D,G){var E;F=F.toLowerCase();if(this.queueInProgress&&!G){this.queueProperty(F,D);return true}else{E=this.config[F];if(E&&E.event){if(E.validator&&!E.validator(D)){return false}else{E.value=D;if(!G){this.fireEvent(F,D);this.configChangedEvent.fire([F,D])}return true}}else{return false}}},queueProperty:function(R,D){R=R.toLowerCase();var S=this.config[R],I=false,J,M,L,K,E,T,N,G,F,P,H,Q,O;if(S&&S.event){if(!A.isUndefined(D)&&S.validator&&!S.validator(D)){return false}else{if(!A.isUndefined(D)){S.value=D}else{D=S.value}I=false;J=this.eventQueue.length;for(H=0;H<J;H++){M=this.eventQueue[H];if(M){L=M[0];K=M[1];if(L==R){this.eventQueue[H]=null;this.eventQueue.push([R,(!A.isUndefined(D)?D:K)]);I=true;break}}}if(!I&&!A.isUndefined(D)){this.eventQueue.push([R,D])}}if(S.supercedes){E=S.supercedes.length;for(Q=0;Q<E;Q++){T=S.supercedes[Q];N=this.eventQueue.length;for(O=0;O<N;O++){G=this.eventQueue[O];if(G){F=G[0];P=G[1];if(F==T.toLowerCase()){this.eventQueue.push([F,P]);this.eventQueue[O]=null;break}}}}}return true}else{return false}},refireEvent:function(E){E=E.toLowerCase();var D=this.config[E];if(D&&D.event&&!A.isUndefined(D.value)){if(this.queueInProgress){this.queueProperty(E)}else{this.fireEvent(E,D.value)}}},applyConfig:function(G,D){var E,F;if(D){F={};for(E in G){if(A.hasOwnProperty(G,E)){F[E.toLowerCase()]=G[E]}}this.initialConfig=F}for(E in G){if(A.hasOwnProperty(G,E)){this.queueProperty(E,G[E])}}},refresh:function(){var D;for(D in this.config){if(A.hasOwnProperty(this.config,D)){this.refireEvent(D)}}},fireQueue:function(){var G,D,H,E,F;this.queueInProgress=true;for(G=0;G<this.eventQueue.length;G++){D=this.eventQueue[G];if(D){H=D[0];E=D[1];F=this.config[H];F.value=E;this.eventQueue[G]=null;this.fireEvent(H,E)}}this.queueInProgress=false;this.eventQueue=[]},subscribeToConfigEvent:function(G,F,D,H){var E=this.config[G.toLowerCase()];if(E&&E.event){if(!B.alreadySubscribed(E.event,F,D)){E.event.subscribe(F,D,H)}return true}else{return false}},unsubscribeFromConfigEvent:function(G,F,D){var E=this.config[G.toLowerCase()];if(E&&E.event){return E.event.unsubscribe(F,D)}else{return false}},toString:function(){var D="Config";if(this.owner){D+=" ["+this.owner.toString()+"]"}return D},outputEventQueue:function(){var G="",D,F,E=this.eventQueue.length;for(F=0;F<E;F++){D=this.eventQueue[F];if(D){G+=D[0]+"="+D[1]+", "}}return G},destroy:function(){var E=this.config,F,D;for(F in E){if(A.hasOwnProperty(E,F)){D=E[F];D.event.unsubscribeAll();D.event=null}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null}};B.alreadySubscribed=function(H,E,D){var G=H.subscribers.length,I,F;if(G>0){F=G-1;do{I=H.subscribers[F];if(I&&I.obj==D&&I.fn==E){return true}}while(F--)}return false};YAHOO.lang.augmentProto(B,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Module=function(P,Q){if(P){this.init(P,Q)}else{}};var J=YAHOO.util.Dom,L=YAHOO.util.Config,C=YAHOO.util.Event,D=YAHOO.util.CustomEvent,I=YAHOO.widget.Module,H,A,B,K,O={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"},G={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}};I.IMG_ROOT=null;I.IMG_ROOT_SSL=null;I.CSS_MODULE="yui-module";I.CSS_HEADER="hd";I.CSS_BODY="bd";I.CSS_FOOTER="ft";I.RESIZE_MONITOR_SECURE_URL="javascript:false;";I.textResizeEvent=new D("textResize");function E(){if(!H){H=document.createElement("div");H.innerHTML=('<div class="'+I.CSS_HEADER+'"></div><div class="'+I.CSS_BODY+'"></div><div class="'+I.CSS_FOOTER+'"></div>');A=H.firstChild;B=A.nextSibling;K=B.nextSibling}return H}function F(){if(!A){E()}return(A.cloneNode(false))}function N(){if(!B){E()}return(B.cloneNode(false))}function M(){if(!K){E()}return(K.cloneNode(false))}I.prototype={constructor:I,element:null,header:null,body:null,footer:null,id:null,imageRoot:I.IMG_ROOT,initEvents:function(){var P=D.LIST;this.beforeInitEvent=this.createEvent(O.BEFORE_INIT);this.beforeInitEvent.signature=P;this.initEvent=this.createEvent(O.INIT);this.initEvent.signature=P;this.appendEvent=this.createEvent(O.APPEND);this.appendEvent.signature=P;this.beforeRenderEvent=this.createEvent(O.BEFORE_RENDER);this.beforeRenderEvent.signature=P;this.renderEvent=this.createEvent(O.RENDER);this.renderEvent.signature=P;this.changeHeaderEvent=this.createEvent(O.CHANGE_HEADER);this.changeHeaderEvent.signature=P;this.changeBodyEvent=this.createEvent(O.CHANGE_BODY);this.changeBodyEvent.signature=P;this.changeFooterEvent=this.createEvent(O.CHANGE_FOOTER);this.changeFooterEvent.signature=P;this.changeContentEvent=this.createEvent(O.CHANGE_CONTENT);this.changeContentEvent.signature=P;this.destroyEvent=this.createEvent(O.DESTORY);this.destroyEvent.signature=P;this.beforeShowEvent=this.createEvent(O.BEFORE_SHOW);this.beforeShowEvent.signature=P;this.showEvent=this.createEvent(O.SHOW);this.showEvent.signature=P;this.beforeHideEvent=this.createEvent(O.BEFORE_HIDE);this.beforeHideEvent.signature=P;this.hideEvent=this.createEvent(O.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(G.VISIBLE.key,{handler:this.configVisible,value:G.VISIBLE.value,validator:G.VISIBLE.validator});this.cfg.addProperty(G.EFFECT.key,{suppressEvent:G.EFFECT.suppressEvent,supercedes:G.EFFECT.supercedes});this.cfg.addProperty(G.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:G.MONITOR_RESIZE.value});this.cfg.addProperty(G.APPEND_TO_DOCUMENT_BODY.key,{value:G.APPEND_TO_DOCUMENT_BODY.value})},init:function(Q,R){var T,P;this.initEvents();this.beforeInitEvent.fire(I);this.cfg=new L(this);if(this.isSecure){this.imageRoot=I.IMG_ROOT_SSL}if(typeof Q=="string"){T=Q;Q=document.getElementById(Q);if(!Q){Q=(E()).cloneNode(false);Q.id=T}}this.element=Q;if(Q.id){this.id=Q.id}P=this.element.firstChild;if(P){var U=false,V=false,S=false;do{if(1==P.nodeType){if(!U&&J.hasClass(P,I.CSS_HEADER)){this.header=P;U=true}else{if(!V&&J.hasClass(P,I.CSS_BODY)){this.body=P;V=true}else{if(!S&&J.hasClass(P,I.CSS_FOOTER)){this.footer=P;S=true}}}}}while((P=P.nextSibling))}this.initDefaultConfig();J.addClass(this.element,I.CSS_MODULE);if(R){this.cfg.applyConfig(R,true)}if(!L.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true)}this.initEvent.fire(I)},initResizeMonitor:function(){var P=(YAHOO.env.ua.gecko&&this.platform=="windows");if(P){var Q=this;setTimeout(function(){Q._initResizeMonitor()},0)}else{this._initResizeMonitor()}},_initResizeMonitor:function(){var V,T,R;function P(){I.textResizeEvent.fire()}if(!YAHOO.env.ua.opera){T=J.get("_yuiResizeMonitor");var Q=this._supportsCWResize();if(!T){T=document.createElement("iframe");if(this.isSecure&&I.RESIZE_MONITOR_SECURE_URL&&YAHOO.env.ua.ie){T.src=I.RESIZE_MONITOR_SECURE_URL}if(!Q){R=["<html><head><script ",'type="text/javascript">',"window.onresize=function(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();};<","/script></head>","<body></body></html>"].join("");T.src="data:text/html;charset=utf-8,"+encodeURIComponent(R)}T.id="_yuiResizeMonitor";T.title="Text Resize Monitor";T.style.position="absolute";T.style.visibility="hidden";var U=document.body,S=U.firstChild;if(S){U.insertBefore(T,S)}else{U.appendChild(T)}T.style.width="10em";T.style.height="10em";T.style.top=(-1*T.offsetHeight)+"px";T.style.left=(-1*T.offsetWidth)+"px";T.style.borderWidth="0";T.style.visibility="visible";if(YAHOO.env.ua.webkit){V=T.contentWindow.document;V.open();V.close()}}if(T&&T.contentWindow){I.textResizeEvent.subscribe(this.onDomResize,this,true);if(!I.textResizeInitialized){if(Q){if(!C.on(T.contentWindow,"resize",P)){C.on(T,"resize",P)}}I.textResizeInitialized=true}this.resizeMonitor=T}}},_supportsCWResize:function(){var P=true;if(YAHOO.env.ua.gecko&&YAHOO.env.ua.gecko<=1.8){P=false}return P},onDomResize:function(P,Q){var R=-1*this.resizeMonitor.offsetWidth,S=-1*this.resizeMonitor.offsetHeight;this.resizeMonitor.style.top=S+"px";this.resizeMonitor.style.left=R+"px"},setHeader:function(P){var Q=this.header||(this.header=F());if(P.nodeName){Q.innerHTML="";Q.appendChild(P)}else{Q.innerHTML=P}this.changeHeaderEvent.fire(P);this.changeContentEvent.fire()},appendToHeader:function(P){var Q=this.header||(this.header=F());Q.appendChild(P);this.changeHeaderEvent.fire(P);this.changeContentEvent.fire()},setBody:function(P){var Q=this.body||(this.body=N());if(P.nodeName){Q.innerHTML="";Q.appendChild(P)}else{Q.innerHTML=P}this.changeBodyEvent.fire(P);this.changeContentEvent.fire()},appendToBody:function(P){var Q=this.body||(this.body=N());Q.appendChild(P);this.changeBodyEvent.fire(P);this.changeContentEvent.fire()},setFooter:function(P){var Q=this.footer||(this.footer=M());if(P.nodeName){Q.innerHTML="";Q.appendChild(P)}else{Q.innerHTML=P}this.changeFooterEvent.fire(P);this.changeContentEvent.fire()},appendToFooter:function(P){var Q=this.footer||(this.footer=M());Q.appendChild(P);this.changeFooterEvent.fire(P);this.changeContentEvent.fire()},render:function(R,T){var Q=this,P;function S(U){if(typeof U=="string"){U=document.getElementById(U)}if(U){Q._addToParent(U,Q.element);Q.appendEvent.fire()}}this.beforeRenderEvent.fire();if(!T){T=this.element}if(R){S(R)}else{if(!J.inDocument(this.element)){return false}}if(this.header&&!J.inDocument(this.header)){P=T.firstChild;if(P){T.insertBefore(this.header,P)}else{T.appendChild(this.header)}}if(this.body&&!J.inDocument(this.body)){if(this.footer&&J.isAncestor(this.moduleElement,this.footer)){T.insertBefore(this.body,this.footer)}else{T.appendChild(this.body)}}if(this.footer&&!J.inDocument(this.footer)){T.appendChild(this.footer)}this.renderEvent.fire();return true},destroy:function(){var Q,P;if(this.element){C.purgeElement(this.element,true);Q=this.element.parentNode}if(Q){Q.removeChild(this.element)}this.element=null;this.header=null;this.body=null;this.footer=null;I.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(R,S,Q){var P=S[0];if(P){this.beforeShowEvent.fire();J.setStyle(this.element,"display","block");this.showEvent.fire()}else{this.beforeHideEvent.fire();J.setStyle(this.element,"display","none");this.hideEvent.fire()}},configMonitorResize:function(Q,R,P){var S=R[0];if(S){this.initResizeMonitor()}else{I.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null}},_addToParent:function(Q,P){if(!this.cfg.getProperty("appendtodocumentbody")&&Q===document.body&&Q.firstChild){Q.insertBefore(P,Q.firstChild)}else{Q.appendChild(P)}},toString:function(){return"Module "+this.id}};YAHOO.lang.augmentProto(I,YAHOO.util.EventProvider)}());(function(){YAHOO.widget.Overlay=function(N,O){YAHOO.widget.Overlay.superclass.constructor.call(this,N,O)};var F=YAHOO.lang,B=YAHOO.util.CustomEvent,H=YAHOO.widget.Module,A=YAHOO.util.Event,I=YAHOO.util.Dom,K=YAHOO.util.Config,D=YAHOO.env.ua,L=YAHOO.widget.Overlay,G="subscribe",J="unsubscribe",E,M={BEFORE_MOVE:"beforeMove",MOVE:"move"},C={X:{key:"x",validator:F.isNumber,suppressEvent:true,supercedes:["iframe"]},Y:{key:"y",validator:F.isNumber,suppressEvent:true,supercedes:["iframe"]},XY:{key:"xy",suppressEvent:true,supercedes:["iframe"]},CONTEXT:{key:"context",suppressEvent:true,supercedes:["iframe"]},FIXED_CENTER:{key:"fixedcenter",value:false,validator:F.isBoolean,supercedes:["iframe","visible"]},WIDTH:{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},HEIGHT:{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},AUTO_FILL_HEIGHT:{key:"autofillheight",supressEvent:true,supercedes:["height"],value:"body"},ZINDEX:{key:"zindex",value:null},CONSTRAIN_TO_VIEWPORT:{key:"constraintoviewport",value:false,validator:F.isBoolean,supercedes:["iframe","x","y","xy"]},IFRAME:{key:"iframe",value:(D.ie==6?true:false),validator:F.isBoolean,supercedes:["zindex"]},PREVENT_CONTEXT_OVERLAP:{key:"preventcontextoverlap",value:false,validator:F.isBoolean,supercedes:["constraintoviewport"]}};L.IFRAME_SRC="javascript:false;";L.IFRAME_OFFSET=3;L.VIEWPORT_OFFSET=10;L.TOP_LEFT="tl";L.TOP_RIGHT="tr";L.BOTTOM_LEFT="bl";L.BOTTOM_RIGHT="br";L.CSS_OVERLAY="yui-overlay";L.STD_MOD_RE=/^\s*?(body|footer|header)\s*?$/i;L.windowScrollEvent=new B("windowScroll");L.windowResizeEvent=new B("windowResize");L.windowScrollHandler=function(N){var O=A.getTarget(N);if(!O||O===window||O===window.document){if(D.ie){if(!window.scrollEnd){window.scrollEnd=-1}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){L.windowScrollEvent.fire()},1)}else{L.windowScrollEvent.fire()}}};L.windowResizeHandler=function(N){if(D.ie){if(!window.resizeEnd){window.resizeEnd=-1}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){L.windowResizeEvent.fire()},100)}else{L.windowResizeEvent.fire()}};L._initialized=null;if(L._initialized===null){A.on(window,"scroll",L.windowScrollHandler);A.on(window,"resize",L.windowResizeHandler);L._initialized=true}L._TRIGGER_MAP={windowScroll:L.windowScrollEvent,windowResize:L.windowResizeEvent,textResize:H.textResizeEvent};YAHOO.extend(L,H,{CONTEXT_TRIGGERS:[],init:function(N,O){L.superclass.init.call(this,N);this.beforeInitEvent.fire(L);I.addClass(this.element,L.CSS_OVERLAY);if(O){this.cfg.applyConfig(O,true)}if(this.platform=="mac"&&D.gecko){if(!K.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true)}if(!K.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true)}}this.initEvent.fire(L)},initEvents:function(){L.superclass.initEvents.call(this);var N=B.LIST;this.beforeMoveEvent=this.createEvent(M.BEFORE_MOVE);this.beforeMoveEvent.signature=N;this.moveEvent=this.createEvent(M.MOVE);this.moveEvent.signature=N},initDefaultConfig:function(){L.superclass.initDefaultConfig.call(this);var N=this.cfg;N.addProperty(C.X.key,{handler:this.configX,validator:C.X.validator,suppressEvent:C.X.suppressEvent,supercedes:C.X.supercedes});N.addProperty(C.Y.key,{handler:this.configY,validator:C.Y.validator,suppressEvent:C.Y.suppressEvent,supercedes:C.Y.supercedes});N.addProperty(C.XY.key,{handler:this.configXY,suppressEvent:C.XY.suppressEvent,supercedes:C.XY.supercedes});N.addProperty(C.CONTEXT.key,{handler:this.configContext,suppressEvent:C.CONTEXT.suppressEvent,supercedes:C.CONTEXT.supercedes});N.addProperty(C.FIXED_CENTER.key,{handler:this.configFixedCenter,value:C.FIXED_CENTER.value,validator:C.FIXED_CENTER.validator,supercedes:C.FIXED_CENTER.supercedes});N.addProperty(C.WIDTH.key,{handler:this.configWidth,suppressEvent:C.WIDTH.suppressEvent,supercedes:C.WIDTH.supercedes});N.addProperty(C.HEIGHT.key,{handler:this.configHeight,suppressEvent:C.HEIGHT.suppressEvent,supercedes:C.HEIGHT.supercedes});N.addProperty(C.AUTO_FILL_HEIGHT.key,{handler:this.configAutoFillHeight,value:C.AUTO_FILL_HEIGHT.value,validator:this._validateAutoFill,suppressEvent:C.AUTO_FILL_HEIGHT.suppressEvent,supercedes:C.AUTO_FILL_HEIGHT.supercedes});N.addProperty(C.ZINDEX.key,{handler:this.configzIndex,value:C.ZINDEX.value});N.addProperty(C.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:C.CONSTRAIN_TO_VIEWPORT.value,validator:C.CONSTRAIN_TO_VIEWPORT.validator,supercedes:C.CONSTRAIN_TO_VIEWPORT.supercedes});N.addProperty(C.IFRAME.key,{handler:this.configIframe,value:C.IFRAME.value,validator:C.IFRAME.validator,supercedes:C.IFRAME.supercedes});N.addProperty(C.PREVENT_CONTEXT_OVERLAP.key,{value:C.PREVENT_CONTEXT_OVERLAP.value,validator:C.PREVENT_CONTEXT_OVERLAP.validator,supercedes:C.PREVENT_CONTEXT_OVERLAP.supercedes})},moveTo:function(O,N){this.cfg.setProperty("xy",[O,N])},hideMacGeckoScrollbars:function(){I.replaceClass(this.element,"show-scrollbars","hide-scrollbars")},showMacGeckoScrollbars:function(){I.replaceClass(this.element,"hide-scrollbars","show-scrollbars")},configVisible:function(a,e,Q){var c=e[0],Y=I.getStyle(this.element,"visibility"),P=this.cfg.getProperty("effect"),S=[],U=(this.platform=="mac"&&D.gecko),T=K.alreadySubscribed,R,d,W,Z,b,N,X,O,V;if(Y=="inherit"){W=this.element.parentNode;while(W.nodeType!=9&&W.nodeType!=11){Y=I.getStyle(W,"visibility");if(Y!="inherit"){break}W=W.parentNode}if(Y=="inherit"){Y="visible"}}if(P){if(P instanceof Array){O=P.length;for(Z=0;Z<O;Z++){R=P[Z];S[S.length]=R.effect(this,R.duration)}}else{S[S.length]=P.effect(this,P.duration)}}if(c){if(U){this.showMacGeckoScrollbars()}if(P){if(c){if(Y!="visible"||Y===""){this.beforeShowEvent.fire();V=S.length;for(b=0;b<V;b++){d=S[b];if(b===0&&!T(d.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){d.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true)}d.animateIn()}}}}else{if(Y!="visible"||Y===""){this.beforeShowEvent.fire();I.setStyle(this.element,"visibility","visible");this.cfg.refireEvent("iframe");this.showEvent.fire()}}}else{if(U){this.hideMacGeckoScrollbars()}if(P){if(Y=="visible"){this.beforeHideEvent.fire();V=S.length;for(N=0;N<V;N++){X=S[N];if(N===0&&!T(X.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){X.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true)}X.animateOut()}}else{if(Y===""){I.setStyle(this.element,"visibility","hidden")}}}else{if(Y=="visible"||Y===""){this.beforeHideEvent.fire();I.setStyle(this.element,"visibility","hidden");this.hideEvent.fire()}}}},doCenterOnDOMEvent:function(){if(this.cfg.getProperty("visible")){this.center()}},configFixedCenter:function(P,R,O){var N=R[0],S=K.alreadySubscribed,Q=L.windowResizeEvent,T=L.windowScrollEvent;if(N){this.center();if(!S(this.beforeShowEvent,this.center,this)){this.beforeShowEvent.subscribe(this.center)}if(!S(Q,this.doCenterOnDOMEvent,this)){Q.subscribe(this.doCenterOnDOMEvent,this,true)}if(!S(T,this.doCenterOnDOMEvent,this)){T.subscribe(this.doCenterOnDOMEvent,this,true)}}else{this.beforeShowEvent.unsubscribe(this.center);Q.unsubscribe(this.doCenterOnDOMEvent,this);T.unsubscribe(this.doCenterOnDOMEvent,this)}},configHeight:function(O,Q,N){var R=Q[0],P=this.element;I.setStyle(P,"height",R);this.cfg.refireEvent("iframe")},configAutoFillHeight:function(O,P,N){var Q=P[0],R=this.cfg.getProperty("autofillheight");this.cfg.unsubscribeFromConfigEvent("height",this._autoFillOnHeightChange);H.textResizeEvent.unsubscribe("height",this._autoFillOnHeightChange);if(R&&Q!==R&&this[R]){I.setStyle(this[R],"height","")}if(Q){Q=F.trim(Q.toLowerCase());this.cfg.subscribeToConfigEvent("height",this._autoFillOnHeightChange,this[Q],this);H.textResizeEvent.subscribe(this._autoFillOnHeightChange,this[Q],this);this.cfg.setProperty("autofillheight",Q,true)}},configWidth:function(O,R,N){var P=R[0],Q=this.element;I.setStyle(Q,"width",P);this.cfg.refireEvent("iframe")},configzIndex:function(P,R,O){var N=R[0],Q=this.element;if(!N){N=I.getStyle(Q,"zIndex");if(!N||isNaN(N)){N=0}}if(this.iframe||this.cfg.getProperty("iframe")===true){if(N<=0){N=1}}I.setStyle(Q,"zIndex",N);this.cfg.setProperty("zIndex",N,true);if(this.iframe){this.stackIframe()}},configXY:function(Q,R,P){var N=R[0],S=N[0],O=N[1];this.cfg.setProperty("x",S);this.cfg.setProperty("y",O);this.beforeMoveEvent.fire([S,O]);S=this.cfg.getProperty("x");O=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([S,O])},configX:function(P,Q,O){var R=Q[0],N=this.cfg.getProperty("y");this.cfg.setProperty("x",R,true);this.cfg.setProperty("y",N,true);this.beforeMoveEvent.fire([R,N]);R=this.cfg.getProperty("x");N=this.cfg.getProperty("y");I.setX(this.element,R,true);this.cfg.setProperty("xy",[R,N],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([R,N])},configY:function(P,Q,O){var R=this.cfg.getProperty("x"),N=Q[0];this.cfg.setProperty("x",R,true);this.cfg.setProperty("y",N,true);this.beforeMoveEvent.fire([R,N]);R=this.cfg.getProperty("x");N=this.cfg.getProperty("y");I.setY(this.element,N,true);this.cfg.setProperty("xy",[R,N],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([R,N])},showIframe:function(){var N=this.iframe,O;if(N){O=this.element.parentNode;if(O!=N.parentNode){this._addToParent(O,N)}N.style.display="block"}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none"}},syncIframe:function(){var R=this.iframe,P=this.element,N=L.IFRAME_OFFSET,Q=(N*2),O;if(R){R.style.width=(P.offsetWidth+Q+"px");R.style.height=(P.offsetHeight+Q+"px");O=this.cfg.getProperty("xy");if(!F.isArray(O)||(isNaN(O[0])||isNaN(O[1]))){this.syncPosition();O=this.cfg.getProperty("xy")}I.setXY(R,[(O[0]-N),(O[1]-N)])}},stackIframe:function(){if(this.iframe){var N=I.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(N)&&!isNaN(N)){I.setStyle(this.iframe,"zIndex",(N-1))}}},configIframe:function(P,Q,O){var S=Q[0];function N(){var V=this.iframe,U=this.element,T;if(!V){if(!E){E=document.createElement("iframe");if(this.isSecure){E.src=L.IFRAME_SRC}if(D.ie){E.style.filter="alpha(opacity=0)";E.frameBorder=0}else{E.style.opacity="0"}E.style.position="absolute";E.style.border="none";E.style.margin="0";E.style.padding="0";E.style.display="none"}V=E.cloneNode(false);T=U.parentNode;var W=T||document.body;this._addToParent(W,V);this.iframe=V}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 R(){N.call(this);this.beforeShowEvent.unsubscribe(R);this._iframeDeferred=false}if(S){if(this.cfg.getProperty("visible")){N.call(this)}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(R);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(P,Q,O){var N=Q[0];if(N){if(!K.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true)}if(!K.alreadySubscribed(this.beforeShowEvent,this._primeXYFromDOM)){this.beforeShowEvent.subscribe(this._primeXYFromDOM)}}else{this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this)}},configContext:function(V,N,Q){var S=N[0],P,R,U,O,T=this.CONTEXT_TRIGGERS;if(S){P=S[0];R=S[1];U=S[2];O=S[3];if(T&&T.length>0){O=(O||[]).concat(T)}if(P){if(typeof P=="string"){this.cfg.setProperty("context",[document.getElementById(P),R,U,O],true)}if(R&&U){this.align(R,U)}if(this._contextTriggers){this._processTriggers(this._contextTriggers,J,this._alignOnTrigger)}if(O){this._processTriggers(O,G,this._alignOnTrigger);this._contextTriggers=O}}}},_alignOnTrigger:function(N,O){this.align()},_findTriggerCE:function(O){var N=null;if(O instanceof B){N=O}else{if(L._TRIGGER_MAP[O]){N=L._TRIGGER_MAP[O]}}return N},_processTriggers:function(P,N,Q){var R,O;for(var S=0,T=P.length;S<T;++S){R=P[S];O=this._findTriggerCE(R);if(O){O[N](Q,this,true)}else{this[N](R,Q)}}},align:function(T,U){var O=this.cfg.getProperty("context"),P=this,Q,R,N;function S(W,V){switch(T){case L.TOP_LEFT:P.moveTo(V,W);break;case L.TOP_RIGHT:P.moveTo((V-R.offsetWidth),W);break;case L.BOTTOM_LEFT:P.moveTo(V,(W-R.offsetHeight));break;case L.BOTTOM_RIGHT:P.moveTo((V-R.offsetWidth),(W-R.offsetHeight));break}}if(O){Q=O[0];R=this.element;P=this;if(!T){T=O[1]}if(!U){U=O[2]}if(R&&Q){N=I.getRegion(Q);switch(U){case L.TOP_LEFT:S(N.top,N.left);break;case L.TOP_RIGHT:S(N.top,N.right);break;case L.BOTTOM_LEFT:S(N.bottom,N.left);break;case L.BOTTOM_RIGHT:S(N.bottom,N.right);break}}}},enforceConstraints:function(Q,R,P){var N=R[0];var O=this.getConstrainedXY(N[0],N[1]);this.cfg.setProperty("x",O[0],true);this.cfg.setProperty("y",O[1],true);this.cfg.setProperty("xy",O,true)},getConstrainedX:function(W){var c=this,j=c.element,Y=j.offsetWidth,b=L.VIEWPORT_OFFSET,R=I.getViewportWidth(),a=I.getDocumentScrollLeft(),P=(Y+b<R),e=this.cfg.getProperty("context"),g,S,O,Z=false,V,U,T,h,Q=W,X={tltr:true,blbr:true,brbl:true,trtl:true};var N=function(){var k;if((c.cfg.getProperty("x")-a)>S){k=(S-Y)}else{k=(S+O)}c.cfg.setProperty("x",(k+a),true);return k};var d=function(){if((c.cfg.getProperty("x")-a)>S){return(U-b)}else{return(V-b)}};var f=function(){var k=d(),l;if(Y>k){if(Z){N()}else{N();Z=true;l=f()}}return l};if(this.cfg.getProperty("preventcontextoverlap")&&e&&X[(e[1]+e[2])]){if(P){g=e[0];S=I.getX(g)-a;O=g.offsetWidth;V=S;U=(R-(S+O));f()}Q=this.cfg.getProperty("x")}else{if(P){T=a+b;h=a+R-Y-b;if(W<T){Q=T}else{if(W>h){Q=h}}}else{Q=b+a}}return Q},getConstrainedY:function(N){var U=this,h=U.element,Q=h.offsetHeight,R=L.VIEWPORT_OFFSET,a=I.getViewportHeight(),T=I.getDocumentScrollTop(),X=(Q+R<a),V=this.cfg.getProperty("context"),Y,f,e,S=false,W,g,b,c,j=N,P={trbr:true,tlbl:true,bltl:true,brtr:true};var Z=function(){var k;if((U.cfg.getProperty("y")-T)>f){k=(f-Q)}else{k=(f+e)}U.cfg.setProperty("y",(k+T),true);return k};var d=function(){if((U.cfg.getProperty("y")-T)>f){return(g-R)}else{return(W-R)}};var O=function(){var k=d(),l;if(Q>k){if(S){Z()}else{Z();S=true;l=O()}}return l};if(this.cfg.getProperty("preventcontextoverlap")&&V&&P[(V[1]+V[2])]){if(X){Y=V[0];e=Y.offsetHeight;f=(I.getY(Y)-T);W=f;g=(a-(f+e));O()}j=U.cfg.getProperty("y")}else{if(X){b=T+R;c=T+a-Q-R;if(N<b){j=b}else{if(N>c){j=c}}}else{j=R+T}}return j},getConstrainedXY:function(O,N){return[this.getConstrainedX(O),this.getConstrainedY(N)]},center:function(){var Q=L.VIEWPORT_OFFSET,P=this.element.offsetWidth,R=this.element.offsetHeight,S=I.getViewportWidth(),O=I.getViewportHeight(),T,N;if(P<S){T=(S/2)-(P/2)+I.getDocumentScrollLeft()}else{T=Q+I.getDocumentScrollLeft()}if(R<O){N=(O/2)-(R/2)+I.getDocumentScrollTop()}else{N=Q+I.getDocumentScrollTop()}this.cfg.setProperty("xy",[parseInt(T,10),parseInt(N,10)]);this.cfg.refireEvent("iframe")},syncPosition:function(){var N=I.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(N,O){var P=this;L.superclass.onDomResize.call(this,N,O);setTimeout(function(){P.syncPosition();P.cfg.refireEvent("iframe");P.cfg.refireEvent("context")},0)},_getComputedHeight:(function(){if(document.defaultView&&document.defaultView.getComputedStyle){return function(O){var P=null;if(O.ownerDocument&&O.ownerDocument.defaultView){var N=O.ownerDocument.defaultView.getComputedStyle(O,"");if(N){P=parseInt(N.height,10)}}return(F.isNumber(P))?P:null}}else{return function(N){var O=null;if(N.style.pixelHeight){O=N.style.pixelHeight}return(F.isNumber(O))?O:null}}})(),_validateAutoFillHeight:function(N){return(!N)||(F.isString(N)&&L.STD_MOD_RE.test(N))},_autoFillOnHeightChange:function(N,P,O){this.fillHeight(O)},_getPreciseHeight:function(O){var P=O.offsetHeight;if(O.getBoundingClientRect){var N=O.getBoundingClientRect();P=N.bottom-N.top}return P},fillHeight:function(O){if(O){var Q=this.innerElement||this.element,R=[this.header,this.body,this.footer],U,T=0,S=0,W=0,P=false;for(var V=0,N=R.length;V<N;V++){U=R[V];if(U){if(O!==U){S+=this._getPreciseHeight(U)}else{P=true}}}if(P){if(D.ie||D.opera){I.setStyle(O,"height",0+"px")}T=this._getComputedHeight(Q);if(T===null){I.addClass(Q,"yui-override-padding");T=Q.clientHeight;I.removeClass(Q,"yui-override-padding")}W=T-S;I.setStyle(O,"height",W+"px");if(O.offsetHeight!=W){W=W-(O.offsetHeight-W)}I.setStyle(O,"height",W+"px")}}},bringToTop:function(){var Q=[],R=this.element;function N(a,W){var V=I.getStyle(a,"zIndex"),Z=I.getStyle(W,"zIndex"),X=(!V||isNaN(V))?0:parseInt(V,10),Y=(!Z||isNaN(Z))?0:parseInt(Z,10);if(X>Y){return -1}else{if(X<Y){return 1}else{return 0}}}function S(V){var W=I.hasClass(V,L.CSS_OVERLAY),X=YAHOO.widget.Panel;if(W&&!I.isAncestor(R,V)){if(X&&I.hasClass(V,X.CSS_PANEL)){Q[Q.length]=V.parentNode}else{Q[Q.length]=V}}}I.getElementsBy(S,"DIV",document.body);Q.sort(N);var U=Q[0],O;if(U){O=I.getStyle(U,"zIndex");if(!isNaN(O)){var P=false;if(U!=R){P=true}else{if(Q.length>1){var T=I.getStyle(Q[1],"zIndex");if(!isNaN(T)&&(O==T)){P=true}}}if(P){this.cfg.setProperty("zindex",(parseInt(O,10)+2))}}}},destroy:function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe)}this.iframe=null;L.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);L.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);H.textResizeEvent.unsubscribe(this._autoFillOnHeightChange);L.superclass.destroy.call(this)},toString:function(){return"Overlay "+this.id}})}());(function(){YAHOO.widget.OverlayManager=function(G){this.init(G)};var E=YAHOO.widget.Overlay,F=YAHOO.util.Event,D=YAHOO.util.Dom,A=YAHOO.util.Config,C=YAHOO.util.CustomEvent,B=YAHOO.widget.OverlayManager;B.CSS_FOCUSED="focused";B.prototype={constructor:B,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"})},init:function(G){this.cfg=new A(this);this.initDefaultConfig();if(G){this.cfg.applyConfig(G,true)}this.cfg.fireQueue();var H=null;this.getActive=function(){return H};this.focus=function(K){var J=this.find(K);if(J){J.focus()}};this.remove=function(L){var J=this.find(L),M;if(J){if(H==J){H=null}var K=(J.element===null&&J.cfg===null)?true:false;if(!K){M=D.getStyle(J.element,"zIndex");J.cfg.setProperty("zIndex",-1000,true)}this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));J.hideEvent.unsubscribe(J.blur);J.destroyEvent.unsubscribe(this._onOverlayDestroy,J);J.focusEvent.unsubscribe(this._onOverlayFocusHandler,J);J.blurEvent.unsubscribe(this._onOverlayBlurHandler,J);if(!K){F.removeListener(J.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);J.cfg.setProperty("zIndex",M,true);J.cfg.setProperty("manager",null)}if(J.focusEvent._managed){J.focusEvent=null}if(J.blurEvent._managed){J.blurEvent=null}if(J.focus._managed){J.focus=null}if(J.blur._managed){J.blur=null}}};this.blurAll=function(){var J=this.overlays.length,K;if(J>0){K=J-1;do{this.overlays[K].blur()}while(K--)}};this._manageBlur=function(K){var J=false;if(H==K){D.removeClass(H.element,B.CSS_FOCUSED);H=null;J=true}return J};this._manageFocus=function(K){var J=false;if(H!=K){if(H){H.blur()}H=K;this.bringToTop(H);D.addClass(H.element,B.CSS_FOCUSED);J=true}return J};var I=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[]}if(I){this.register(I);this.overlays.sort(this.compareZIndexDesc)}},_onOverlayElementFocus:function(G){var I=F.getTarget(G),H=this.close;if(H&&(I==H||D.isAncestor(H,I))){this.blur()}else{this.focus()}},_onOverlayDestroy:function(H,I,G){this.remove(G)},_onOverlayFocusHandler:function(H,I,G){this._manageFocus(G)},_onOverlayBlurHandler:function(H,I,G){this._manageBlur(G)},_bindFocus:function(H){var G=this;if(!H.focusEvent){H.focusEvent=H.createEvent("focus");H.focusEvent.signature=C.LIST;H.focusEvent._managed=true}else{H.focusEvent.subscribe(G._onOverlayFocusHandler,H,G)}if(!H.focus){F.on(H.element,G.cfg.getProperty("focusevent"),G._onOverlayElementFocus,null,H);H.focus=function(){if(G._manageFocus(this)){if(this.cfg.getProperty("visible")&&this.focusFirst){this.focusFirst()}this.focusEvent.fire()}};H.focus._managed=true}},_bindBlur:function(H){var G=this;if(!H.blurEvent){H.blurEvent=H.createEvent("blur");H.blurEvent.signature=C.LIST;H.focusEvent._managed=true}else{H.blurEvent.subscribe(G._onOverlayBlurHandler,H,G)}if(!H.blur){H.blur=function(){if(G._manageBlur(this)){this.blurEvent.fire()}};H.blur._managed=true}H.hideEvent.subscribe(H.blur)},_bindDestroy:function(H){var G=this;H.destroyEvent.subscribe(G._onOverlayDestroy,H,G)},_syncZIndex:function(H){var G=D.getStyle(H.element,"zIndex");if(!isNaN(G)){H.cfg.setProperty("zIndex",parseInt(G,10))}else{H.cfg.setProperty("zIndex",0)}},register:function(K){var G,H=false,J,I;if(K instanceof E){K.cfg.addProperty("manager",{value:this});this._bindFocus(K);this._bindBlur(K);this._bindDestroy(K);this._syncZIndex(K);this.overlays.push(K);this.bringToTop(K);H=true}else{if(K instanceof Array){for(J=0,I=K.length;J<I;J++){H=this.register(K[J])||H}}}return H},bringToTop:function(G){var K=this.find(G),H,M,J;if(K){J=this.overlays;J.sort(this.compareZIndexDesc);M=J[0];if(M){H=D.getStyle(M.element,"zIndex");if(!isNaN(H)){var I=false;if(M!==K){I=true}else{if(J.length>1){var L=D.getStyle(J[1].element,"zIndex");if(!isNaN(L)&&(H==L)){I=true}}}if(I){K.cfg.setProperty("zindex",(parseInt(H,10)+2))}}J.sort(this.compareZIndexDesc)}}},find:function(L){var H=L instanceof E,J=this.overlays,M=J.length,I=null,G,K;if(H||typeof L=="string"){for(K=M-1;K>=0;K--){G=J[K];if((H&&(G===L))||(G.id==L)){I=G;break}}}return I},compareZIndexDesc:function(G,H){var I=(G.cfg)?G.cfg.getProperty("zIndex"):null,J=(H.cfg)?H.cfg.getProperty("zIndex"):null;if(I===null&&J===null){return 0}else{if(I===null){return 1}else{if(J===null){return -1}else{if(I>J){return -1}else{if(I<J){return 1}else{return 0}}}}}},showAll:function(){var H=this.overlays,G=H.length,I;for(I=G-1;I>=0;I--){H[I].show()}},hideAll:function(){var H=this.overlays,G=H.length,I;for(I=G-1;I>=0;I--){H[I].hide()}},toString:function(){return"OverlayManager"}}}());(function(){YAHOO.widget.Tooltip=function(N,M){YAHOO.widget.Tooltip.superclass.constructor.call(this,N,M)};var H=YAHOO.lang,A=YAHOO.util.Event,B=YAHOO.util.CustomEvent,J=YAHOO.util.Dom,F=YAHOO.widget.Tooltip,G,E={PREVENT_OVERLAP:{key:"preventoverlap",value:true,validator:H.isBoolean,supercedes:["x","y","xy"]},SHOW_DELAY:{key:"showdelay",value:200,validator:H.isNumber},AUTO_DISMISS_DELAY:{key:"autodismissdelay",value:5000,validator:H.isNumber},HIDE_DELAY:{key:"hidedelay",value:250,validator:H.isNumber},TEXT:{key:"text",suppressEvent:true},CONTAINER:{key:"container"},DISABLED:{key:"disabled",value:false,suppressEvent:true}},L={CONTEXT_MOUSE_OVER:"contextMouseOver",CONTEXT_MOUSE_OUT:"contextMouseOut",CONTEXT_TRIGGER:"contextTrigger"};F.CSS_TOOLTIP="yui-tt";function D(S,M,R){var O=R[0],Q=R[1],P=this.cfg,N=P.getProperty("width");if(N==Q){P.setProperty("width",O)}}function I(S,M){var R=document.body,N=this.cfg,O=N.getProperty("width"),Q,P;if((!O||O=="auto")&&(N.getProperty("container")!=R||N.getProperty("x")>=J.getViewportWidth()||N.getProperty("y")>=J.getViewportHeight())){P=this.element.cloneNode(true);P.style.visibility="hidden";P.style.top="0px";P.style.left="0px";R.appendChild(P);Q=(P.offsetWidth+"px");R.removeChild(P);P=null;N.setProperty("width",Q);N.refireEvent("xy");this.subscribe("hide",D,[(O||""),Q])}}function K(O,M,N){this.render(N)}function C(){A.onDOMReady(K,this.cfg.getProperty("container"),this)}YAHOO.extend(F,YAHOO.widget.Overlay,{init:function(N,M){F.superclass.init.call(this,N);this.beforeInitEvent.fire(F);J.addClass(this.element,F.CSS_TOOLTIP);if(M){this.cfg.applyConfig(M,true)}this.cfg.queueProperty("visible",false);this.cfg.queueProperty("constraintoviewport",true);this.setBody("");this.subscribe("beforeShow",I);this.subscribe("init",C);this.subscribe("render",this.onRender);this.initEvent.fire(F)},initEvents:function(){F.superclass.initEvents.call(this);var M=B.LIST;this.contextMouseOverEvent=this.createEvent(L.CONTEXT_MOUSE_OVER);this.contextMouseOverEvent.signature=M;this.contextMouseOutEvent=this.createEvent(L.CONTEXT_MOUSE_OUT);this.contextMouseOutEvent.signature=M;this.contextTriggerEvent=this.createEvent(L.CONTEXT_TRIGGER);this.contextTriggerEvent.signature=M},initDefaultConfig:function(){F.superclass.initDefaultConfig.call(this);this.cfg.addProperty(E.PREVENT_OVERLAP.key,{value:E.PREVENT_OVERLAP.value,validator:E.PREVENT_OVERLAP.validator,supercedes:E.PREVENT_OVERLAP.supercedes});this.cfg.addProperty(E.SHOW_DELAY.key,{handler:this.configShowDelay,value:200,validator:E.SHOW_DELAY.validator});this.cfg.addProperty(E.AUTO_DISMISS_DELAY.key,{handler:this.configAutoDismissDelay,value:E.AUTO_DISMISS_DELAY.value,validator:E.AUTO_DISMISS_DELAY.validator});this.cfg.addProperty(E.HIDE_DELAY.key,{handler:this.configHideDelay,value:E.HIDE_DELAY.value,validator:E.HIDE_DELAY.validator});this.cfg.addProperty(E.TEXT.key,{handler:this.configText,suppressEvent:E.TEXT.suppressEvent});this.cfg.addProperty(E.CONTAINER.key,{handler:this.configContainer,value:document.body});this.cfg.addProperty(E.DISABLED.key,{handler:this.configContainer,value:E.DISABLED.value,supressEvent:E.DISABLED.suppressEvent})},configText:function(P,M,O){var N=M[0];if(N){this.setBody(N)}},configContainer:function(O,P,N){var M=P[0];if(typeof M=="string"){this.cfg.setProperty("container",document.getElementById(M),true)}},_removeEventListeners:function(){var N=this._context,M,O,P;if(N){M=N.length;if(M>0){P=M-1;do{O=N[P];A.removeListener(O,"mouseover",this.onContextMouseOver);A.removeListener(O,"mousemove",this.onContextMouseMove);A.removeListener(O,"mouseout",this.onContextMouseOut)}while(P--)}}},configContext:function(P,T,O){var Q=T[0],N,M,R,S;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;N=this._context;if(N){M=N.length;if(M>0){S=M-1;do{R=N[S];A.on(R,"mouseover",this.onContextMouseOver,this);A.on(R,"mousemove",this.onContextMouseMove,this);A.on(R,"mouseout",this.onContextMouseOut,this)}while(S--)}}}},onContextMouseMove:function(N,M){M.pageX=A.getPageX(N);M.pageY=A.getPageY(N)},onContextMouseOver:function(N,O){var M=this;if(M.title){O._tempTitle=M.title;M.title=""}if(O.fireEvent("contextMouseOver",M,N)!==false&&!O.cfg.getProperty("disabled")){if(O.hideProcId){clearTimeout(O.hideProcId);O.hideProcId=null}A.on(M,"mousemove",O.onContextMouseMove,O);O.showProcId=O.doShow(N,M)}},onContextMouseOut:function(N,O){var M=this;if(O._tempTitle){M.title=O._tempTitle;O._tempTitle=null}if(O.showProcId){clearTimeout(O.showProcId);O.showProcId=null}if(O.hideProcId){clearTimeout(O.hideProcId);O.hideProcId=null}O.fireEvent("contextMouseOut",M,N);O.hideProcId=setTimeout(function(){O.hide()},O.cfg.getProperty("hidedelay"))},doShow:function(O,M){var N=25,P=this;if(YAHOO.env.ua.opera&&M.tagName&&M.tagName.toUpperCase()=="A"){N+=12}return setTimeout(function(){var Q=P.cfg.getProperty("text");if(P._tempTitle&&(Q===""||YAHOO.lang.isUndefined(Q)||YAHOO.lang.isNull(Q))){P.setBody(P._tempTitle)}else{P.cfg.refireEvent("text")}P.moveTo(P.pageX,P.pageY+N);if(P.cfg.getProperty("preventoverlap")){P.preventOverlap(P.pageX,P.pageY)}A.removeListener(M,"mousemove",P.onContextMouseMove);P.contextTriggerEvent.fire(M);P.show();P.hideProcId=P.doHide()},this.cfg.getProperty("showdelay"))},doHide:function(){var M=this;return setTimeout(function(){M.hide()},this.cfg.getProperty("autodismissdelay"))},preventOverlap:function(N,O){var M=this.element.offsetHeight,P=new YAHOO.util.Point(N,O),Q=J.getRegion(this.element);Q.top-=5;Q.left-=5;Q.right+=5;Q.bottom+=5;if(Q.contains(P)){this.cfg.setProperty("y",(O-M-5))}},onRender:function(P,Q){function O(){var T=this.element,U=this._shadow;if(U){U.style.width=(T.offsetWidth+6)+"px";U.style.height=(T.offsetHeight+1)+"px"}}function S(){J.addClass(this._shadow,"yui-tt-shadow-visible")}function M(){J.removeClass(this._shadow,"yui-tt-shadow-visible")}function N(){var V=this._shadow,W,X,T,U;if(!V){W=this.element;X=YAHOO.widget.Module;T=YAHOO.env.ua.ie;U=this;if(!G){G=document.createElement("div");G.className="yui-tt-shadow"}V=G.cloneNode(false);W.appendChild(V);this._shadow=V;S.call(this);this.subscribe("beforeShow",S);this.subscribe("beforeHide",M);if(T==6||(T==7&&document.compatMode=="BackCompat")){window.setTimeout(function(){O.call(U)},0);this.cfg.subscribeToConfigEvent("width",O);this.cfg.subscribeToConfigEvent("height",O);this.subscribe("changeContent",O);X.textResizeEvent.subscribe(O,this,true);this.subscribe("destroy",function(){X.textResizeEvent.unsubscribe(O,this)})}}}function R(){N.call(this);this.unsubscribe("beforeShow",R)}if(this.cfg.getProperty("visible")){N.call(this)}else{this.subscribe("beforeShow",R)}},destroy:function(){this._removeEventListeners();F.superclass.destroy.call(this)},toString:function(){return"Tooltip "+this.id}})}());(function(){YAHOO.widget.Panel=function(U,V){YAHOO.widget.Panel.superclass.constructor.call(this,U,V)};var B=null;var P=YAHOO.lang,O=YAHOO.util,T=O.Dom,A=O.Event,H=O.CustomEvent,J=YAHOO.util.KeyListener,L=O.Config,M=YAHOO.widget.Overlay,F=YAHOO.widget.Panel,I=YAHOO.env.ua,E=(I.ie==6||(I.ie==7&&document.compatMode=="BackCompat")),N,D,R,Q={SHOW_MASK:"showMask",HIDE_MASK:"hideMask",DRAG:"drag"},G={CLOSE:{key:"close",value:true,validator:P.isBoolean,supercedes:["visible"]},DRAGGABLE:{key:"draggable",value:(O.DD?true:false),validator:P.isBoolean,supercedes:["visible"]},DRAG_ONLY:{key:"dragonly",value:false,validator:P.isBoolean,supercedes:["draggable"]},UNDERLAY:{key:"underlay",value:"shadow",supercedes:["visible"]},MODAL:{key:"modal",value:false,validator:P.isBoolean,supercedes:["visible","zindex"]},KEY_LISTENERS:{key:"keylisteners",suppressEvent:true,supercedes:["visible"]},STRINGS:{key:"strings",supercedes:["close"],validator:P.isObject,value:{close:"Close"}}};F.CSS_PANEL="yui-panel";F.CSS_PANEL_CONTAINER="yui-panel-container";F.FOCUSABLE=["a","button","select","textarea","input","iframe"];function K(U,V){if(!this.header&&this.cfg.getProperty("draggable")){this.setHeader("&#160;")}}function C(X,Y,W){var Z=W[0],V=W[1],a=this.cfg,U=a.getProperty("width");if(U==V){a.setProperty("width",Z)}this.unsubscribe("hide",C,W)}function S(W,X){var Y=YAHOO.env.ua.ie,Z,U,V;if(Y==6||(Y==7&&document.compatMode=="BackCompat")){Z=this.cfg;U=Z.getProperty("width");if(!U||U=="auto"){V=(this.element.offsetWidth+"px");Z.setProperty("width",V);this.subscribe("hide",C,[(U||""),V])}}}YAHOO.extend(F,M,{init:function(U,V){F.superclass.init.call(this,U);this.beforeInitEvent.fire(F);T.addClass(this.element,F.CSS_PANEL);this.buildWrapper();if(V){this.cfg.applyConfig(V,true)}this.subscribe("showMask",this._addFocusHandlers);this.subscribe("hideMask",this._removeFocusHandlers);this.subscribe("beforeRender",K);this.subscribe("render",function(){this.setFirstLastFocusable();this.subscribe("changeContent",this.setFirstLastFocusable)});this.subscribe("show",this.focusFirst);this.initEvent.fire(F)},_onElementFocus:function(U){var V=A.getTarget(U);if(V!==this.element&&!T.isAncestor(this.element,V)&&B==this){try{if(this.firstElement){this.firstElement.focus()}else{if(this._modalFocus){this._modalFocus.focus()}else{this.innerElement.focus()}}}catch(W){try{if(V!==document&&V!==document.body&&V!==window){V.blur()}}catch(X){}}}},_addFocusHandlers:function(U,V){if(!this.firstElement){if(I.webkit||I.opera){if(!this._modalFocus){this._createHiddenFocusElement()}}else{this.innerElement.tabIndex=0}}this.setTabLoop(this.firstElement,this.lastElement);A.onFocus(document.documentElement,this._onElementFocus,this,true);B=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(U,V){A.removeFocusListener(document.documentElement,this._onElementFocus,this);if(B==this){B=null}},focusFirst:function(V,X,Y){var W=this.firstElement;if(X&&X[1]){A.stopEvent(X[1])}if(W){try{W.focus()}catch(U){}}},focusLast:function(V,X,Y){var W=this.lastElement;if(X&&X[1]){A.stopEvent(X[1])}if(W){try{W.focus()}catch(U){}}},setTabLoop:function(U,Y){var W=this.preventBackTab,V=this.preventTabOut,X=this.showEvent,Z=this.hideEvent;if(W){W.disable();X.unsubscribe(W.enable,W);Z.unsubscribe(W.disable,W);W=this.preventBackTab=null}if(V){V.disable();X.unsubscribe(V.enable,V);Z.unsubscribe(V.disable,V);V=this.preventTabOut=null}if(U){this.preventBackTab=new J(U,{shift:true,keys:9},{fn:this.focusLast,scope:this,correctScope:true});W=this.preventBackTab;X.subscribe(W.enable,W,true);Z.subscribe(W.disable,W,true)}if(Y){this.preventTabOut=new J(Y,{shift:false,keys:9},{fn:this.focusFirst,scope:this,correctScope:true});V=this.preventTabOut;X.subscribe(V.enable,V,true);Z.subscribe(V.disable,V,true)}},getFocusableElements:function(X){X=X||this.innerElement;var U={};for(var V=0;V<F.FOCUSABLE.length;V++){U[F.FOCUSABLE[V]]=true}function W(Y){if(Y.focus&&Y.type!=="hidden"&&!Y.disabled&&U[Y.tagName.toLowerCase()]){return true}return false}return T.getElementsBy(W,null,X)},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(){F.superclass.initEvents.call(this);var U=H.LIST;this.showMaskEvent=this.createEvent(Q.SHOW_MASK);this.showMaskEvent.signature=U;this.hideMaskEvent=this.createEvent(Q.HIDE_MASK);this.hideMaskEvent.signature=U;this.dragEvent=this.createEvent(Q.DRAG);this.dragEvent.signature=U},initDefaultConfig:function(){F.superclass.initDefaultConfig.call(this);this.cfg.addProperty(G.CLOSE.key,{handler:this.configClose,value:G.CLOSE.value,validator:G.CLOSE.validator,supercedes:G.CLOSE.supercedes});this.cfg.addProperty(G.DRAGGABLE.key,{handler:this.configDraggable,value:(O.DD)?true:false,validator:G.DRAGGABLE.validator,supercedes:G.DRAGGABLE.supercedes});this.cfg.addProperty(G.DRAG_ONLY.key,{value:G.DRAG_ONLY.value,validator:G.DRAG_ONLY.validator,supercedes:G.DRAG_ONLY.supercedes});this.cfg.addProperty(G.UNDERLAY.key,{handler:this.configUnderlay,value:G.UNDERLAY.value,supercedes:G.UNDERLAY.supercedes});this.cfg.addProperty(G.MODAL.key,{handler:this.configModal,value:G.MODAL.value,validator:G.MODAL.validator,supercedes:G.MODAL.supercedes});this.cfg.addProperty(G.KEY_LISTENERS.key,{handler:this.configKeyListeners,suppressEvent:G.KEY_LISTENERS.suppressEvent,supercedes:G.KEY_LISTENERS.supercedes});this.cfg.addProperty(G.STRINGS.key,{value:G.STRINGS.value,handler:this.configStrings,validator:G.STRINGS.validator,supercedes:G.STRINGS.supercedes})},configClose:function(U,W,Z){var Y=W[0],V=this.close,X=this.cfg.getProperty("strings");if(Y){if(!V){if(!R){R=document.createElement("a");R.className="container-close";R.href="#"}V=R.cloneNode(true);this.innerElement.appendChild(V);V.innerHTML=(X&&X.close)?X.close:"&#160;";A.on(V,"click",this._doClose,this,true);this.close=V}else{V.style.display="block"}}else{if(V){V.style.display="none"}}},_doClose:function(U){A.preventDefault(U);this.hide()},configDraggable:function(W,X,V){var U=X[0];if(U){if(!O.DD){this.cfg.setProperty("draggable",false);return }if(this.header){T.setStyle(this.header,"cursor","move");this.registerDragDrop()}this.subscribe("beforeShow",S)}else{if(this.dd){this.dd.unreg()}if(this.header){T.setStyle(this.header,"cursor","auto")}this.unsubscribe("beforeShow",S)}},configUnderlay:function(U,V,Y){var W=(this.platform=="mac"&&I.gecko),f=V[0].toLowerCase(),c=this.underlay,b=this.element;function e(){var g=this.underlay;T.addClass(g,"yui-force-redraw");window.setTimeout(function(){T.removeClass(g,"yui-force-redraw")},0)}function a(){var g=false;if(!c){if(!D){D=document.createElement("div");D.className="underlay"}c=D.cloneNode(false);this.element.appendChild(c);this.underlay=c;if(E){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(I.webkit&&I.webkit<420){this.changeContentEvent.subscribe(e)}g=true}}function X(){var g=a.call(this);if(!g&&E){this.sizeUnderlay()}this._underlayDeferred=false;this.beforeShowEvent.unsubscribe(X)}function Z(){if(this._underlayDeferred){this.beforeShowEvent.unsubscribe(X);this._underlayDeferred=false}if(c){this.cfg.unsubscribeFromConfigEvent("width",this.sizeUnderlay);this.cfg.unsubscribeFromConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.sizeUnderlay);this.changeContentEvent.unsubscribe(e);YAHOO.widget.Module.textResizeEvent.unsubscribe(this.sizeUnderlay,this,true);this.element.removeChild(c);this.underlay=null}}switch(f){case"shadow":T.removeClass(b,"matte");T.addClass(b,"shadow");break;case"matte":if(!W){Z.call(this)}T.removeClass(b,"shadow");T.addClass(b,"matte");break;default:if(!W){Z.call(this)}T.removeClass(b,"shadow");T.removeClass(b,"matte");break}if((f=="shadow")||(W&&!c)){if(this.cfg.getProperty("visible")){var d=a.call(this);if(!d&&E){this.sizeUnderlay()}}else{if(!this._underlayDeferred){this.beforeShowEvent.subscribe(X);this._underlayDeferred=true}}}},configModal:function(W,X,U){var V=X[0];if(V){if(!this._hasModalityEventListeners){this.subscribe("beforeShow",this.buildMask);this.subscribe("beforeShow",this.bringToTop);this.subscribe("beforeShow",this.showMask);this.subscribe("hide",this.hideMask);M.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);M.windowResizeEvent.unsubscribe(this.sizeMask,this);this._hasModalityEventListeners=false}}},removeMask:function(){var U=this.mask,V;if(U){this.hideMask();V=U.parentNode;if(V){V.removeChild(U)}this.mask=null}},configKeyListeners:function(V,Y,U){var W=Y[0],Z,a,X;if(W){if(W instanceof Array){a=W.length;for(X=0;X<a;X++){Z=W[X];if(!L.alreadySubscribed(this.showEvent,Z.enable,Z)){this.showEvent.subscribe(Z.enable,Z,true)}if(!L.alreadySubscribed(this.hideEvent,Z.disable,Z)){this.hideEvent.subscribe(Z.disable,Z,true);this.destroyEvent.subscribe(Z.disable,Z,true)}}}else{if(!L.alreadySubscribed(this.showEvent,W.enable,W)){this.showEvent.subscribe(W.enable,W,true)}if(!L.alreadySubscribed(this.hideEvent,W.disable,W)){this.hideEvent.subscribe(W.disable,W,true);this.destroyEvent.subscribe(W.disable,W,true)}}}},configStrings:function(W,X,V){var U=P.merge(G.STRINGS.value,X[0]);this.cfg.setProperty(G.STRINGS.key,U,true)},configHeight:function(U,W,Y){var X=W[0],V=this.innerElement;T.setStyle(V,"height",X);this.cfg.refireEvent("iframe")},_autoFillOnHeightChange:function(U,W,V){F.superclass._autoFillOnHeightChange.apply(this,arguments);if(E){this.sizeUnderlay()}},configWidth:function(U,X,Y){var V=X[0],W=this.innerElement;T.setStyle(W,"width",V);this.cfg.refireEvent("iframe")},configzIndex:function(W,X,U){F.superclass.configzIndex.call(this,W,X,U);if(this.mask||this.cfg.getProperty("modal")===true){var V=T.getStyle(this.element,"zIndex");if(!V||isNaN(V)){V=0}if(V===0){this.cfg.setProperty("zIndex",1)}else{this.stackMask()}}},buildWrapper:function(){var U=this.element.parentNode,W=this.element,V=document.createElement("div");V.className=F.CSS_PANEL_CONTAINER;V.id=W.id+"_c";if(U){U.insertBefore(V,W)}V.appendChild(W);this.element=V;this.innerElement=W;T.setStyle(this.innerElement,"visibility","inherit")},sizeUnderlay:function(){var U=this.underlay,V;if(U){V=this.element;U.style.width=V.offsetWidth+"px";U.style.height=V.offsetHeight+"px"}},registerDragDrop:function(){var U=this;if(this.header){if(!O.DD){return }var V=(this.cfg.getProperty("dragonly")===true);this.dd=new O.DD(this.element.id,this.id,{dragOnly:V});if(!this.header.id){this.header.id=this.id+"_h"}this.dd.startDrag=function(){var X,a,Y,Z,c,W;if(YAHOO.env.ua.ie==6){T.addClass(U.element,"drag")}if(U.cfg.getProperty("constraintoviewport")){var b=M.VIEWPORT_OFFSET;X=U.element.offsetHeight;a=U.element.offsetWidth;Y=T.getViewportWidth();Z=T.getViewportHeight();c=T.getDocumentScrollLeft();W=T.getDocumentScrollTop();if(X+b<Z){this.minY=W+b;this.maxY=W+Z-X-b}else{this.minY=W+b;this.maxY=W+b}if(a+b<Y){this.minX=c+b;this.maxX=c+Y-a-b}else{this.minX=c+b;this.maxX=c+b}this.constrainX=true;this.constrainY=true}else{this.constrainX=false;this.constrainY=false}U.dragEvent.fire("startDrag",arguments)};this.dd.onDrag=function(){U.syncPosition();U.cfg.refireEvent("iframe");if(this.platform=="mac"&&YAHOO.env.ua.gecko){this.showMacGeckoScrollbars()}U.dragEvent.fire("onDrag",arguments)};this.dd.endDrag=function(){if(YAHOO.env.ua.ie==6){T.removeClass(U.element,"drag")}U.dragEvent.fire("endDrag",arguments);U.moveEvent.fire(U.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(!N){N=document.createElement("div");N.className="mask";N.innerHTML="&#160;"}U=N.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"){T.addClass(this.mask,"block-scrollbars")}this.stackMask()}},hideMask:function(){if(this.cfg.getProperty("modal")&&this.mask){this.mask.style.display="none";T.removeClass(document.body,"masked");this.hideMaskEvent.fire()}},showMask:function(){if(this.cfg.getProperty("modal")&&this.mask){T.addClass(document.body,"masked");this.sizeMask();this.mask.style.display="block";this.showMaskEvent.fire()}},sizeMask:function(){if(this.mask){var V=this.mask,U=T.getViewportWidth(),W=T.getViewportHeight();if(this.mask.offsetHeight>W){this.mask.style.height=W+"px"}if(this.mask.offsetWidth>U){this.mask.style.width=U+"px"}this.mask.style.height=T.getDocumentHeight()+"px";this.mask.style.width=T.getDocumentWidth()+"px"}},stackMask:function(){if(this.mask){var U=T.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(U)&&!isNaN(U)){T.setStyle(this.mask,"zIndex",U-1)}}},render:function(U){return F.superclass.render.call(this,U,this.innerElement)},destroy:function(){M.windowResizeEvent.unsubscribe(this.sizeMask,this);this.removeMask();if(this.close){A.purgeElement(this.close)}F.superclass.destroy.call(this)},toString:function(){return"Panel "+this.id}})}());(function(){YAHOO.widget.Dialog=function(I,J){YAHOO.widget.Dialog.superclass.constructor.call(this,I,J)};var A=YAHOO.util.Event,D=YAHOO.util.CustomEvent,F=YAHOO.util.Dom,B=YAHOO.widget.Dialog,E=YAHOO.lang,C={BEFORE_SUBMIT:"beforeSubmit",SUBMIT:"submit",MANUAL_SUBMIT:"manualSubmit",ASYNC_SUBMIT:"asyncSubmit",FORM_SUBMIT:"formSubmit",CANCEL:"cancel"},H={POST_METHOD:{key:"postmethod",value:"async"},BUTTONS:{key:"buttons",value:"none",supercedes:["visible"]},HIDEAFTERSUBMIT:{key:"hideaftersubmit",value:true}};B.CSS_DIALOG="yui-dialog";function G(){var I=this._aButtons,K,J,L;if(E.isArray(I)){K=I.length;if(K>0){L=K-1;do{J=I[L];if(YAHOO.widget.Button&&J instanceof YAHOO.widget.Button){J.destroy()}else{if(J.tagName.toUpperCase()=="BUTTON"){A.purgeElement(J);A.purgeElement(J,false)}}}while(L--)}}}YAHOO.extend(B,YAHOO.widget.Panel,{form:null,initDefaultConfig:function(){B.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null};this.cfg.addProperty(H.POST_METHOD.key,{handler:this.configPostMethod,value:H.POST_METHOD.value,validator:function(I){if(I!="form"&&I!="async"&&I!="none"&&I!="manual"){return false}else{return true}}});this.cfg.addProperty(H.HIDEAFTERSUBMIT.key,{value:H.HIDEAFTERSUBMIT.value});this.cfg.addProperty(H.BUTTONS.key,{handler:this.configButtons,value:H.BUTTONS.value,supercedes:H.BUTTONS.supercedes})},initEvents:function(){B.superclass.initEvents.call(this);var I=D.LIST;this.beforeSubmitEvent=this.createEvent(C.BEFORE_SUBMIT);this.beforeSubmitEvent.signature=I;this.submitEvent=this.createEvent(C.SUBMIT);this.submitEvent.signature=I;this.manualSubmitEvent=this.createEvent(C.MANUAL_SUBMIT);this.manualSubmitEvent.signature=I;this.asyncSubmitEvent=this.createEvent(C.ASYNC_SUBMIT);this.asyncSubmitEvent.signature=I;this.formSubmitEvent=this.createEvent(C.FORM_SUBMIT);this.formSubmitEvent.signature=I;this.cancelEvent=this.createEvent(C.CANCEL);this.cancelEvent.signature=I},init:function(I,J){B.superclass.init.call(this,I);this.beforeInitEvent.fire(B);F.addClass(this.element,B.CSS_DIALOG);this.cfg.setProperty("visible",false);if(J){this.cfg.applyConfig(J,true)}this.showEvent.subscribe(this.focusFirst,this,true);this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.subscribe("changeBody",this.registerForm);this.initEvent.fire(B)},doSubmit:function(){var K=YAHOO.util.Connect,M=this.form,O=false,P=false,N,L,I,J;switch(this.cfg.getProperty("postmethod")){case"async":N=M.elements;L=N.length;if(L>0){I=L-1;do{if(N[I].type=="file"){O=true;break}}while(I--)}if(O&&YAHOO.env.ua.ie&&this.isSecure){P=true}J=this._getFormAttributes(M);K.setForm(M,O,P);K.asyncRequest(J.method,J.action,this.callback);this.asyncSubmitEvent.fire();break;case"form":M.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break}},_getFormAttributes:function(J){var L={method:null,action:null};if(J){if(J.getAttributeNode){var K=J.getAttributeNode("action");var I=J.getAttributeNode("method");if(K){L.action=K.value}if(I){L.method=I.value}}else{L.action=J.getAttribute("action");L.method=J.getAttribute("method")}}L.method=(E.isString(L.method)?L.method:"POST").toUpperCase();L.action=E.isString(L.action)?L.action:"";return L},registerForm:function(){return ;var I=this.element.getElementsByTagName("form")[0];if(this.form){if(this.form==I&&F.isAncestor(this.element,this.form)){return }else{A.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;A.on(I,"submit",this._submitHandler,this,true)}},_submitHandler:function(I){A.stopEvent(I);this.submit();this.form.blur()},setTabLoop:function(J,I){J=J||this.firstButton;I=this.lastButton||I;B.superclass.setTabLoop.call(this,J,I)},setFirstLastFocusable:function(){B.superclass.setFirstLastFocusable.call(this);var J,K,I,L=this.focusableElements;this.firstFormElement=null;this.lastFormElement=null;if(this.form&&L&&L.length>0){K=L.length;for(J=0;J<K;++J){I=L[J];if(this.form===I.form){this.firstFormElement=I;break}}for(J=K-1;J>=0;--J){I=L[J];if(this.form===I.form){this.lastFormElement=I;break}}}},configClose:function(J,K,I){B.superclass.configClose.apply(this,arguments)},_doClose:function(I){A.preventDefault(I);this.cancel()},configButtons:function(T,U,M){var L=YAHOO.widget.Button,R=U[0],O=this.innerElement,S,J,P,I,K,Q,N;G.call(this);this._aButtons=null;if(E.isArray(R)){K=document.createElement("span");K.className="button-group";I=R.length;this._aButtons=[];this.defaultHtmlButton=null;for(N=0;N<I;N++){S=R[N];if(L){P=new L({label:S.text});P.appendTo(K);J=P.get("element");if(S.isDefault){P.addClass("default");this.defaultHtmlButton=J}if(E.isFunction(S.handler)){P.set("onclick",{fn:S.handler,obj:this,scope:this})}else{if(E.isObject(S.handler)&&E.isFunction(S.handler.fn)){P.set("onclick",{fn:S.handler.fn,obj:((!E.isUndefined(S.handler.obj))?S.handler.obj:this),scope:(S.handler.scope||this)})}}this._aButtons[this._aButtons.length]=P}else{J=document.createElement("button");J.setAttribute("type","button");if(S.isDefault){J.className="default";this.defaultHtmlButton=J}J.innerHTML=S.text;if(E.isFunction(S.handler)){A.on(J,"click",S.handler,this,true)}else{if(E.isObject(S.handler)&&E.isFunction(S.handler.fn)){A.on(J,"click",S.handler.fn,((!E.isUndefined(S.handler.obj))?S.handler.obj:this),(S.handler.scope||this))}}K.appendChild(J);this._aButtons[this._aButtons.length]=J}S.htmlButton=J;if(N===0){this.firstButton=J}if(N==(I-1)){this.lastButton=J}}this.setFooter(K);Q=this.footer;if(F.inDocument(this.element)&&!F.isAncestor(O,Q)){O.appendChild(Q)}this.buttonSpan=K}else{K=this.buttonSpan;Q=this.footer;if(K&&Q){Q.removeChild(K);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,M,I){var L=this.firstFormElement;if(M&&M[1]){A.stopEvent(M[1])}if(L){try{L.focus()}catch(J){}}else{this.focusFirstButton()}},focusLast:function(K,M,I){var N=this.cfg.getProperty("buttons"),L=this.lastFormElement;if(M&&M[1]){A.stopEvent(M[1])}if(N&&E.isArray(N)){this.focusLastButton()}else{if(L){try{L.focus()}catch(J){}}}},_getButton:function(I){var J=YAHOO.widget.Button;if(J&&I&&I.nodeName&&I.id){I=J.getButton(I.id)||I}return I},focusDefaultButton:function(){var J=this._getButton(this.defaultHtmlButton);if(J){try{J.focus()}catch(I){}}},blurButtons:function(){var M=this.cfg.getProperty("buttons"),J,N,K,L;if(M&&E.isArray(M)){J=M.length;if(J>0){L=(J-1);do{N=M[L];if(N){K=this._getButton(N.htmlButton);if(K){try{K.blur()}catch(I){}}}}while(L--)}}},focusFirstButton:function(){var I=this.cfg.getProperty("buttons"),J,L;if(I&&E.isArray(I)){J=I[0];if(J){L=this._getButton(J.htmlButton);if(L){try{L.focus()}catch(K){}}}}},focusLastButton:function(){var I=this.cfg.getProperty("buttons"),L,J,M;if(I&&E.isArray(I)){L=I.length;if(L>0){J=I[(L-1)];if(J){M=this._getButton(J.htmlButton);if(M){try{M.focus()}catch(K){}}}}}},configPostMethod:function(J,K,I){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 U=this.form,Y,O,L,W,N,R,T,Z,K,X,J,S,a,V,Q,I,M;function P(c){var b=c.tagName.toUpperCase();return((b=="INPUT"||b=="TEXTAREA"||b=="SELECT")&&c.name==W)}if(U){Y=U.elements;O=Y.length;L={};for(I=0;I<O;I++){W=Y[I].name;N=F.getElementsBy(P,"*",U);R=N.length;if(R>0){if(R==1){N=N[0];T=N.type;Z=N.tagName.toUpperCase();switch(Z){case"INPUT":if(T=="checkbox"){L[W]=N.checked}else{if(T!="radio"){L[W]=N.value}}break;case"TEXTAREA":L[W]=N.value;break;case"SELECT":K=N.options;X=K.length;J=[];for(M=0;M<X;M++){S=K[M];if(S.selected){a=S.value;if(!a||a===""){a=S.text}J[J.length]=a}}L[W]=J;break}}else{T=N[0].type;switch(T){case"radio":for(M=0;M<R;M++){V=N[M];if(V.checked){L[W]=V.value;break}}break;case"checkbox":J=[];for(M=0;M<R;M++){Q=N[M];if(Q.checked){J[J.length]=Q.value}}L[W]=J;break}}}}}return L},destroy:function(){G.call(this);this._aButtons=null;var J=this.element.getElementsByTagName("form"),I;if(J.length>0){I=J[0];if(I){A.purgeElement(I);if(I.parentNode){I.parentNode.removeChild(I)}this.form=null}}B.superclass.destroy.call(this)},toString:function(){return"Dialog "+this.id}})}());(function(){YAHOO.widget.SimpleDialog=function(D,E){YAHOO.widget.SimpleDialog.superclass.constructor.call(this,D,E)};var C=YAHOO.util.Dom,A=YAHOO.widget.SimpleDialog,B={ICON:{key:"icon",value:"none",suppressEvent:true},TEXT:{key:"text",value:"",suppressEvent:true,supercedes:["icon"]}};A.ICON_BLOCK="blckicon";A.ICON_ALARM="alrticon";A.ICON_HELP="hlpicon";A.ICON_INFO="infoicon";A.ICON_WARN="warnicon";A.ICON_TIP="tipicon";A.ICON_CSS_CLASSNAME="yui-icon";A.CSS_SIMPLEDIALOG="yui-simple-dialog";YAHOO.extend(A,YAHOO.widget.Dialog,{initDefaultConfig:function(){A.superclass.initDefaultConfig.call(this);this.cfg.addProperty(B.ICON.key,{handler:this.configIcon,value:B.ICON.value,suppressEvent:B.ICON.suppressEvent});this.cfg.addProperty(B.TEXT.key,{handler:this.configText,value:B.TEXT.value,suppressEvent:B.TEXT.suppressEvent,supercedes:B.TEXT.supercedes})},init:function(D,E){A.superclass.init.call(this,D);this.beforeInitEvent.fire(A);C.addClass(this.element,A.CSS_SIMPLEDIALOG);this.cfg.queueProperty("postmethod","manual");if(E){this.cfg.applyConfig(E,true)}this.beforeRenderEvent.subscribe(function(){if(!this.body){this.setBody("")}},this,true);this.initEvent.fire(A)},registerForm:function(){A.superclass.registerForm.call(this);this.form.innerHTML+='<input type="hidden" name="'+this.id+'" value=""/>'},configIcon:function(I,J,E){var D=J[0],K=this.body,F=A.ICON_CSS_CLASSNAME,G,H;if(D&&D!="none"){G=C.getElementsByClassName(F,"*",K);if(G){H=G.parentNode;if(H){H.removeChild(G);G=null}}if(D.indexOf(".")==-1){G=document.createElement("span");G.className=(F+" "+D);G.innerHTML="&#160;"}else{G=document.createElement("img");G.src=(this.imageRoot+D);G.className=F}if(G){K.insertBefore(G,K.firstChild)}}},configText:function(F,G,E){var D=G[0];if(D){this.setBody(D);this.cfg.refireEvent("icon")}},toString:function(){return"SimpleDialog "+this.id}})}());(function(){YAHOO.widget.ContainerEffect=function(G,D,E,H,F){if(!F){F=YAHOO.util.Anim}this.overlay=G;this.attrIn=D;this.attrOut=E;this.targetElement=H||G.element;this.animClass=F};var A=YAHOO.util.Dom,C=YAHOO.util.CustomEvent,B=YAHOO.widget.ContainerEffect;B.FADE=function(I,G){var F=YAHOO.util.Easing,D={attributes:{opacity:{from:0,to:1}},duration:G,method:F.easeIn},H={attributes:{opacity:{to:0}},duration:G,method:F.easeOut},E=new B(I,D,H,I.element);E.handleUnderlayStart=function(){var J=this.overlay.underlay;if(J&&YAHOO.env.ua.ie){var K=(J.filters&&J.filters.length>0);if(K){A.addClass(I.element,"yui-effect-fade")}}};E.handleUnderlayComplete=function(){var J=this.overlay.underlay;if(J&&YAHOO.env.ua.ie){A.removeClass(I.element,"yui-effect-fade")}};E.handleStartAnimateIn=function(K,L,J){A.addClass(J.overlay.element,"hide-select");if(!J.overlay.underlay){J.overlay.cfg.refireEvent("underlay")}J.handleUnderlayStart();A.setStyle(J.overlay.element,"visibility","visible");A.setStyle(J.overlay.element,"opacity",0)};E.handleCompleteAnimateIn=function(K,L,J){A.removeClass(J.overlay.element,"hide-select");if(J.overlay.element.style.filter){J.overlay.element.style.filter=null}J.handleUnderlayComplete();J.overlay.cfg.refireEvent("iframe");J.animateInCompleteEvent.fire()};E.handleStartAnimateOut=function(K,L,J){A.addClass(J.overlay.element,"hide-select");J.handleUnderlayStart()};E.handleCompleteAnimateOut=function(K,L,J){A.removeClass(J.overlay.element,"hide-select");if(J.overlay.element.style.filter){J.overlay.element.style.filter=null}A.setStyle(J.overlay.element,"visibility","hidden");A.setStyle(J.overlay.element,"opacity",1);J.handleUnderlayComplete();J.overlay.cfg.refireEvent("iframe");J.animateOutCompleteEvent.fire()};E.init();return E};B.SLIDE=function(K,M){var H=YAHOO.util.Easing,E=K.cfg.getProperty("x")||A.getX(K.element),F=K.cfg.getProperty("y")||A.getY(K.element),D=A.getClientWidth(),I=K.element.offsetWidth,G={attributes:{points:{to:[E,F]}},duration:M,method:H.easeIn},L={attributes:{points:{to:[(D+25),F]}},duration:M,method:H.easeOut},J=new B(K,G,L,K.element,YAHOO.util.Motion);J.handleStartAnimateIn=function(O,P,N){N.overlay.element.style.left=((-25)-I)+"px";N.overlay.element.style.top=F+"px"};J.handleTweenAnimateIn=function(P,Q,O){var N=A.getXY(O.overlay.element),R=N[0],S=N[1];if(A.getStyle(O.overlay.element,"visibility")=="hidden"&&R<E){A.setStyle(O.overlay.element,"visibility","visible")}O.overlay.cfg.setProperty("xy",[R,S],true);O.overlay.cfg.refireEvent("iframe")};J.handleCompleteAnimateIn=function(O,P,N){N.overlay.cfg.setProperty("xy",[E,F],true);N.startX=E;N.startY=F;N.overlay.cfg.refireEvent("iframe");N.animateInCompleteEvent.fire()};J.handleStartAnimateOut=function(R,S,O){var Q=A.getViewportWidth(),N=A.getXY(O.overlay.element),P=N[1];O.animOut.attributes.points.to=[(Q+25),P]};J.handleTweenAnimateOut=function(Q,R,P){var N=A.getXY(P.overlay.element),S=N[0],O=N[1];P.overlay.cfg.setProperty("xy",[S,O],true);P.overlay.cfg.refireEvent("iframe")};J.handleCompleteAnimateOut=function(O,P,N){A.setStyle(N.overlay.element,"visibility","hidden");N.overlay.cfg.setProperty("xy",[E,F]);N.animateOutCompleteEvent.fire()};J.init();return J};B.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,F,D){},handleTweenAnimateIn:function(E,F,D){},handleCompleteAnimateIn:function(E,F,D){},handleStartAnimateOut:function(E,F,D){},handleTweenAnimateOut:function(E,F,D){},handleCompleteAnimateOut:function(E,F,D){},toString:function(){var D="ContainerEffect";if(this.overlay){D+=" ["+this.overlay.toString()+"]"}return D}};YAHOO.lang.augmentProto(B,YAHOO.util.EventProvider)})();YAHOO.register("container",YAHOO.widget.Module,{version:"2.6.0",build:"1321"});(function(){YAHOO.util.Config=function(A){if(A){this.init(A)}};var F=YAHOO.lang,E=YAHOO.util.CustomEvent,D=YAHOO.util.Config;D.CONFIG_CHANGED_EVENT="configChanged";D.BOOLEAN_TYPE="boolean";D.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(A){this.owner=A;this.configChangedEvent=this.createEvent(D.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=E.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[]},checkBoolean:function(A){return(typeof A==D.BOOLEAN_TYPE)},checkNumber:function(A){return(!isNaN(A))},fireEvent:function(C,A){var B=this.config[C];if(B&&B.event){B.event.fire(A)}},addProperty:function(A,B){A=A.toLowerCase();this.config[A]=B;B.event=this.createEvent(A,{scope:this.owner});B.event.signature=E.LIST;B.key=A;if(B.handler){B.event.subscribe(B.handler,this.owner)}this.setProperty(A,B.value,true);if(!B.suppressEvent){this.queueProperty(A,B.value)}},getConfig:function(){var H={},B=this.config,A,C;for(A in B){if(F.hasOwnProperty(B,A)){C=B[A];if(C&&C.event){H[A]=C.value}}}return H},getProperty:function(B){var A=this.config[B.toLowerCase()];if(A&&A.event){return A.value}else{return undefined}},resetProperty:function(B){B=B.toLowerCase();var A=this.config[B];if(A&&A.event){if(this.initialConfig[B]&&!F.isUndefined(this.initialConfig[B])){this.setProperty(B,this.initialConfig[B]);return true}}else{return false}},setProperty:function(C,A,H){var B;C=C.toLowerCase();if(this.queueInProgress&&!H){this.queueProperty(C,A);return true}else{B=this.config[C];if(B&&B.event){if(B.validator&&!B.validator(A)){return false}else{B.value=A;if(!H){this.fireEvent(C,A);this.configChangedEvent.fire([C,A])}return true}}else{return false}}},queueProperty:function(C,W){C=C.toLowerCase();var U=this.config[C],b=false,c,f,e,d,X,V,g,Z,Y,A,a,B,h;if(U&&U.event){if(!F.isUndefined(W)&&U.validator&&!U.validator(W)){return false}else{if(!F.isUndefined(W)){U.value=W}else{W=U.value}b=false;c=this.eventQueue.length;for(a=0;a<c;a++){f=this.eventQueue[a];if(f){e=f[0];d=f[1];if(e==C){this.eventQueue[a]=null;this.eventQueue.push([C,(!F.isUndefined(W)?W:d)]);b=true;break}}}if(!b&&!F.isUndefined(W)){this.eventQueue.push([C,W])}}if(U.supercedes){X=U.supercedes.length;for(B=0;B<X;B++){V=U.supercedes[B];g=this.eventQueue.length;for(h=0;h<g;h++){Z=this.eventQueue[h];if(Z){Y=Z[0];A=Z[1];if(Y==V.toLowerCase()){this.eventQueue.push([Y,A]);this.eventQueue[h]=null;break}}}}}return true}else{return false}},refireEvent:function(B){B=B.toLowerCase();var A=this.config[B];if(A&&A.event&&!F.isUndefined(A.value)){if(this.queueInProgress){this.queueProperty(B)}else{this.fireEvent(B,A.value)}}},applyConfig:function(H,A){var B,C;if(A){C={};for(B in H){if(F.hasOwnProperty(H,B)){C[B.toLowerCase()]=H[B]}}this.initialConfig=C}for(B in H){if(F.hasOwnProperty(H,B)){this.queueProperty(B,H[B])}}},refresh:function(){var A;for(A in this.config){if(F.hasOwnProperty(this.config,A)){this.refireEvent(A)}}},fireQueue:function(){var I,A,J,B,C;this.queueInProgress=true;for(I=0;I<this.eventQueue.length;I++){A=this.eventQueue[I];if(A){J=A[0];B=A[1];C=this.config[J];C.value=B;this.fireEvent(J,B)}}this.queueInProgress=false;this.eventQueue=[]},subscribeToConfigEvent:function(I,C,A,J){var B=this.config[I.toLowerCase()];if(B&&B.event){if(!D.alreadySubscribed(B.event,C,A)){B.event.subscribe(C,A,J)}return true}else{return false}},unsubscribeFromConfigEvent:function(H,C,A){var B=this.config[H.toLowerCase()];if(B&&B.event){return B.event.unsubscribe(C,A)}else{return false}},toString:function(){var A="Config";if(this.owner){A+=" ["+this.owner.toString()+"]"}return A},outputEventQueue:function(){var H="",A,C,B=this.eventQueue.length;for(C=0;C<B;C++){A=this.eventQueue[C];if(A){H+=A[0]+"="+A[1]+", "}}return H},destroy:function(){var B=this.config,C,A;for(C in B){if(F.hasOwnProperty(B,C)){A=B[C];A.event.unsubscribeAll();A.event=null}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null}};D.alreadySubscribed=function(K,B,A){var J=K.subscribers.length,L,C;if(J>0){C=J-1;do{L=K.subscribers[C];if(L&&L.obj==A&&L.fn==B){return true}}while(C--)}return false};YAHOO.lang.augmentProto(D,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(G,J,K){var H=new Date(G.getTime());switch(J){case this.MONTH:var I=G.getMonth()+K;var L=0;if(I<0){while(I<0){I+=12;L-=1}}else{if(I>11){while(I>11){I-=12;L+=1}}}H.setMonth(I);H.setFullYear(G.getFullYear()+L);break;case this.DAY:this._addDays(H,K);break;case this.YEAR:H.setFullYear(G.getFullYear()+K);break;case this.WEEK:this._addDays(H,(K*7));break}return H},_addDays:function(F,G){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420){if(G<0){for(var H=-128;G<H;G-=H){F.setDate(F.getDate()+H)}}else{for(var E=96;G>E;G-=E){F.setDate(F.getDate()+E)}}}F.setDate(F.getDate()+G)},subtract:function(D,E,F){return this.add(D,E,(F*-1))},before:function(E,F){var D=F.getTime();if(E.getTime()<D){return true}else{return false}},after:function(E,F){var D=F.getTime();if(E.getTime()>D){return true}else{return false}},between:function(F,D,E){if(this.after(F,D)&&this.before(F,E)){return true}else{return false}},getJan1:function(B){return this.getDate(B,0,1)},getDayOffset:function(H,F){var G=this.getJan1(F);var E=Math.ceil((H.getTime()-G.getTime())/this.ONE_DAY_MS);return E},getWeekNumber:function(b,Q,Y){Q=Q||0;Y=Y||this.WEEK_ONE_JAN_DATE;var X=this.clearTime(b),T,S;if(X.getDay()===Q){T=X}else{T=this.getFirstDayOfWeek(X,Q)}var W=T.getFullYear(),P=T.getTime();S=new Date(T.getTime()+6*this.ONE_DAY_MS);var Z;if(W!==S.getFullYear()&&S.getDate()>=Y){Z=1}else{var a=this.clearTime(this.getDate(W,0,Y)),R=this.getFirstDayOfWeek(a,Q);var V=Math.round((X.getTime()-R.getTime())/this.ONE_DAY_MS);var U=V%7;var O=(V-U)/7;Z=O+1}return Z},getFirstDayOfWeek:function(F,E){E=E||0;var H=F.getDay(),G=(H-E+7)%7;return this.subtract(F,this.DAY,G)},isYearOverlapWeek:function(D){var E=false;var F=this.add(D,this.DAY,6);if(F.getFullYear()!=D.getFullYear()){E=true}return E},isMonthOverlapWeek:function(D){var E=false;var F=this.add(D,this.DAY,6);if(F.getMonth()!=D.getMonth()){E=true}return E},findMonthStart:function(C){var D=this.getDate(C.getFullYear(),C.getMonth(),1);return D},findMonthEnd:function(H){var F=this.findMonthStart(H);var G=this.add(F,this.MONTH,1);var E=this.subtract(G,this.DAY,1);return E},clearTime:function(B){B.setHours(12,0,0,0);return B},getDate:function(F,E,G){var H=null;if(YAHOO.lang.isUndefined(G)){G=1}if(F>=100){H=new Date(F,E,G)}else{H=new Date();H.setFullYear(F);H.setMonth(E);H.setDate(G);H.setHours(0,0,0,0)}return H}};(function(){var K=YAHOO.util.Dom,G=YAHOO.util.Event,I=YAHOO.lang,J=YAHOO.widget.DateMath;function H(A,C,B){this.init.apply(this,arguments)}H.IMG_ROOT=null;H.DATE="D";H.MONTH_DAY="MD";H.WEEKDAY="WD";H.RANGE="R";H.MONTH="M";H.DISPLAY_DAYS=42;H.STOP_RENDER="S";H.SHORT="short";H.LONG="long";H.MEDIUM="medium";H.ONE_CHAR="1char";H._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 L=H._DEFAULT_CONFIG;H._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"};H._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"};H.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(A){var B={id:null,container:null,config:null};if(A&&A.length&&A.length>0){switch(A.length){case 1:B.id=null;B.container=A[0];B.config=null;break;case 2:if(I.isObject(A[1])&&!A[1].tagName&&!(A[1] instanceof String)){B.id=null;B.container=A[0];B.config=A[1]}else{B.id=A[0];B.container=A[1];B.config=null}break;default:B.id=A[0];B.container=A[1];B.config=A[2];break}}else{}return B},init:function(A,C,B){var D=this._parseArgs(arguments);A=D.id;C=D.container;B=D.config;this.oDomContainer=K.get(C);if(!this.oDomContainer.id){this.oDomContainer.id=K.generateId()}if(!A){A=this.oDomContainer.id+"_t"}this.id=A;this.containerId=this.oDomContainer.id;this.initEvents();this.today=new Date();J.clearTime(this.today);this.cfg=new YAHOO.util.Config(this);this.Options={};this.Locale={};this.initStyles();K.addClass(this.oDomContainer,this.Style.CSS_CONTAINER);K.addClass(this.oDomContainer,this.Style.CSS_SINGLE);this.cellDates=[];this.cells=[];this.renderStack=[];this._renderStack=[];this.setupConfig();if(B){this.cfg.applyConfig(B,true)}this.cfg.fireQueue()},configIframe:function(C,D,B){var E=D[0];if(!this.parent){if(K.inDocument(this.oDomContainer)){if(E){var A=K.getStyle(this.oDomContainer,"position");if(A=="absolute"||A=="relative"){if(!K.inDocument(this.iframe)){this.iframe=document.createElement("iframe");this.iframe.src="javascript:false;";K.setStyle(this.iframe,"opacity","0");if(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6){K.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(D,E,C){var A=E[0];if(A){this.createTitleBar(A)}else{var B=this.cfg.getProperty(L.CLOSE.key);if(!B){this.removeTitleBar()}else{this.createTitleBar("&#160;")}}},configClose:function(D,E,C){var A=E[0],B=this.cfg.getProperty(L.TITLE.key);if(A){if(!B){this.createTitleBar("&#160;")}this.createCloseButton()}else{this.removeCloseButton();if(!B){this.removeTitleBar()}}},initEvents:function(){var C=H._EVENT_TYPES,A=YAHOO.util.CustomEvent,B=this;B.beforeSelectEvent=new A(C.BEFORE_SELECT);B.selectEvent=new A(C.SELECT);B.beforeDeselectEvent=new A(C.BEFORE_DESELECT);B.deselectEvent=new A(C.DESELECT);B.changePageEvent=new A(C.CHANGE_PAGE);B.beforeRenderEvent=new A(C.BEFORE_RENDER);B.renderEvent=new A(C.RENDER);B.beforeDestroyEvent=new A(C.BEFORE_DESTROY);B.destroyEvent=new A(C.DESTROY);B.resetEvent=new A(C.RESET);B.clearEvent=new A(C.CLEAR);B.beforeShowEvent=new A(C.BEFORE_SHOW);B.showEvent=new A(C.SHOW);B.beforeHideEvent=new A(C.BEFORE_HIDE);B.hideEvent=new A(C.HIDE);B.beforeShowNavEvent=new A(C.BEFORE_SHOW_NAV);B.showNavEvent=new A(C.SHOW_NAV);B.beforeHideNavEvent=new A(C.BEFORE_HIDE_NAV);B.hideNavEvent=new A(C.HIDE_NAV);B.beforeRenderNavEvent=new A(C.BEFORE_RENDER_NAV);B.renderNavEvent=new A(C.RENDER_NAV);B.beforeSelectEvent.subscribe(B.onBeforeSelect,this,true);B.selectEvent.subscribe(B.onSelect,this,true);B.beforeDeselectEvent.subscribe(B.onBeforeDeselect,this,true);B.deselectEvent.subscribe(B.onDeselect,this,true);B.changePageEvent.subscribe(B.onChangePage,this,true);B.renderEvent.subscribe(B.onRender,this,true);B.resetEvent.subscribe(B.onReset,this,true);B.clearEvent.subscribe(B.onClear,this,true)},doPreviousMonthNav:function(A,B){G.preventDefault(A);setTimeout(function(){B.previousMonth();var D=K.getElementsByClassName(B.Style.CSS_NAV_LEFT,"a",B.oDomContainer);if(D&&D[0]){try{D[0].focus()}catch(C){}}},0)},doNextMonthNav:function(A,B){G.preventDefault(A);setTimeout(function(){B.nextMonth();var D=K.getElementsByClassName(B.Style.CSS_NAV_RIGHT,"a",B.oDomContainer);if(D&&D[0]){try{D[0].focus()}catch(C){}}},0)},doSelectCell:function(F,X){var A,D,V,S;var E=G.getTarget(F),W=E.tagName.toLowerCase(),T=false;while(W!="td"&&!K.hasClass(E,X.Style.CSS_CELL_SELECTABLE)){if(!T&&W=="a"&&K.hasClass(E,X.Style.CSS_CELL_SELECTOR)){T=true}E=E.parentNode;W=E.tagName.toLowerCase();if(E==this.oDomContainer||W=="html"){return }}if(T){G.preventDefault(F)}A=E;if(K.hasClass(A,X.Style.CSS_CELL_SELECTABLE)){S=X.getIndexFromId(A.id);if(S>-1){D=X.cellDates[S];if(D){V=J.getDate(D[0],D[1]-1,D[2]);var B;if(X.Options.MULTI_SELECT){B=A.getElementsByTagName("a")[0];if(B){B.blur()}var U=X.cellDates[S];var C=X._indexOfSelectedFieldArray(U);if(C>-1){X.deselectCell(S)}else{X.selectCell(S)}}else{B=A.getElementsByTagName("a")[0];if(B){B.blur()}X.selectCell(S)}}}}},doCellMouseOver:function(A,B){var C;if(A){C=G.getTarget(A)}else{C=this}while(C.tagName&&C.tagName.toLowerCase()!="td"){C=C.parentNode;if(!C.tagName||C.tagName.toLowerCase()=="html"){return }}if(K.hasClass(C,B.Style.CSS_CELL_SELECTABLE)){K.addClass(C,B.Style.CSS_CELL_HOVER)}},doCellMouseOut:function(A,B){var C;if(A){C=G.getTarget(A)}else{C=this}while(C.tagName&&C.tagName.toLowerCase()!="td"){C=C.parentNode;if(!C.tagName||C.tagName.toLowerCase()=="html"){return }}if(K.hasClass(C,B.Style.CSS_CELL_SELECTABLE)){K.removeClass(C,B.Style.CSS_CELL_HOVER)}},setupConfig:function(){var B=this.cfg;B.addProperty(L.PAGEDATE.key,{value:new Date(),handler:this.configPageDate});B.addProperty(L.SELECTED.key,{value:[],handler:this.configSelected});B.addProperty(L.TITLE.key,{value:L.TITLE.value,handler:this.configTitle});B.addProperty(L.CLOSE.key,{value:L.CLOSE.value,handler:this.configClose});B.addProperty(L.IFRAME.key,{value:L.IFRAME.value,handler:this.configIframe,validator:B.checkBoolean});B.addProperty(L.MINDATE.key,{value:L.MINDATE.value,handler:this.configMinDate});B.addProperty(L.MAXDATE.key,{value:L.MAXDATE.value,handler:this.configMaxDate});B.addProperty(L.MULTI_SELECT.key,{value:L.MULTI_SELECT.value,handler:this.configOptions,validator:B.checkBoolean});B.addProperty(L.START_WEEKDAY.key,{value:L.START_WEEKDAY.value,handler:this.configOptions,validator:B.checkNumber});B.addProperty(L.SHOW_WEEKDAYS.key,{value:L.SHOW_WEEKDAYS.value,handler:this.configOptions,validator:B.checkBoolean});B.addProperty(L.SHOW_WEEK_HEADER.key,{value:L.SHOW_WEEK_HEADER.value,handler:this.configOptions,validator:B.checkBoolean});B.addProperty(L.SHOW_WEEK_FOOTER.key,{value:L.SHOW_WEEK_FOOTER.value,handler:this.configOptions,validator:B.checkBoolean});B.addProperty(L.HIDE_BLANK_WEEKS.key,{value:L.HIDE_BLANK_WEEKS.value,handler:this.configOptions,validator:B.checkBoolean});B.addProperty(L.NAV_ARROW_LEFT.key,{value:L.NAV_ARROW_LEFT.value,handler:this.configOptions});B.addProperty(L.NAV_ARROW_RIGHT.key,{value:L.NAV_ARROW_RIGHT.value,handler:this.configOptions});B.addProperty(L.MONTHS_SHORT.key,{value:L.MONTHS_SHORT.value,handler:this.configLocale});B.addProperty(L.MONTHS_LONG.key,{value:L.MONTHS_LONG.value,handler:this.configLocale});B.addProperty(L.WEEKDAYS_1CHAR.key,{value:L.WEEKDAYS_1CHAR.value,handler:this.configLocale});B.addProperty(L.WEEKDAYS_SHORT.key,{value:L.WEEKDAYS_SHORT.value,handler:this.configLocale});B.addProperty(L.WEEKDAYS_MEDIUM.key,{value:L.WEEKDAYS_MEDIUM.value,handler:this.configLocale});B.addProperty(L.WEEKDAYS_LONG.key,{value:L.WEEKDAYS_LONG.value,handler:this.configLocale});var A=function(){B.refireEvent(L.LOCALE_MONTHS.key);B.refireEvent(L.LOCALE_WEEKDAYS.key)};B.subscribeToConfigEvent(L.START_WEEKDAY.key,A,this,true);B.subscribeToConfigEvent(L.MONTHS_SHORT.key,A,this,true);B.subscribeToConfigEvent(L.MONTHS_LONG.key,A,this,true);B.subscribeToConfigEvent(L.WEEKDAYS_1CHAR.key,A,this,true);B.subscribeToConfigEvent(L.WEEKDAYS_SHORT.key,A,this,true);B.subscribeToConfigEvent(L.WEEKDAYS_MEDIUM.key,A,this,true);B.subscribeToConfigEvent(L.WEEKDAYS_LONG.key,A,this,true);B.addProperty(L.LOCALE_MONTHS.key,{value:L.LOCALE_MONTHS.value,handler:this.configLocaleValues});B.addProperty(L.LOCALE_WEEKDAYS.key,{value:L.LOCALE_WEEKDAYS.value,handler:this.configLocaleValues});B.addProperty(L.DATE_DELIMITER.key,{value:L.DATE_DELIMITER.value,handler:this.configLocale});B.addProperty(L.DATE_FIELD_DELIMITER.key,{value:L.DATE_FIELD_DELIMITER.value,handler:this.configLocale});B.addProperty(L.DATE_RANGE_DELIMITER.key,{value:L.DATE_RANGE_DELIMITER.value,handler:this.configLocale});B.addProperty(L.MY_MONTH_POSITION.key,{value:L.MY_MONTH_POSITION.value,handler:this.configLocale,validator:B.checkNumber});B.addProperty(L.MY_YEAR_POSITION.key,{value:L.MY_YEAR_POSITION.value,handler:this.configLocale,validator:B.checkNumber});B.addProperty(L.MD_MONTH_POSITION.key,{value:L.MD_MONTH_POSITION.value,handler:this.configLocale,validator:B.checkNumber});B.addProperty(L.MD_DAY_POSITION.key,{value:L.MD_DAY_POSITION.value,handler:this.configLocale,validator:B.checkNumber});B.addProperty(L.MDY_MONTH_POSITION.key,{value:L.MDY_MONTH_POSITION.value,handler:this.configLocale,validator:B.checkNumber});B.addProperty(L.MDY_DAY_POSITION.key,{value:L.MDY_DAY_POSITION.value,handler:this.configLocale,validator:B.checkNumber});B.addProperty(L.MDY_YEAR_POSITION.key,{value:L.MDY_YEAR_POSITION.value,handler:this.configLocale,validator:B.checkNumber});B.addProperty(L.MY_LABEL_MONTH_POSITION.key,{value:L.MY_LABEL_MONTH_POSITION.value,handler:this.configLocale,validator:B.checkNumber});B.addProperty(L.MY_LABEL_YEAR_POSITION.key,{value:L.MY_LABEL_YEAR_POSITION.value,handler:this.configLocale,validator:B.checkNumber});B.addProperty(L.MY_LABEL_MONTH_SUFFIX.key,{value:L.MY_LABEL_MONTH_SUFFIX.value,handler:this.configLocale});B.addProperty(L.MY_LABEL_YEAR_SUFFIX.key,{value:L.MY_LABEL_YEAR_SUFFIX.value,handler:this.configLocale});B.addProperty(L.NAV.key,{value:L.NAV.value,handler:this.configNavigator});B.addProperty(L.STRINGS.key,{value:L.STRINGS.value,handler:this.configStrings,validator:function(C){return I.isObject(C)},supercedes:L.STRINGS.supercedes})},configStrings:function(C,D,B){var A=I.merge(L.STRINGS.value,D[0]);this.cfg.setProperty(L.STRINGS.key,A,true)},configPageDate:function(B,C,A){this.cfg.setProperty(L.PAGEDATE.key,this._parsePageDate(C[0]),true)},configMinDate:function(C,D,B){var A=D[0];if(I.isString(A)){A=this._parseDate(A);this.cfg.setProperty(L.MINDATE.key,J.getDate(A[0],(A[1]-1),A[2]))}},configMaxDate:function(C,D,B){var A=D[0];if(I.isString(A)){A=this._parseDate(A);this.cfg.setProperty(L.MAXDATE.key,J.getDate(A[0],(A[1]-1),A[2]))}},configSelected:function(C,E,A){var D=E[0],B=L.SELECTED.key;if(D){if(I.isString(D)){this.cfg.setProperty(B,this._parseDates(D),true)}}if(!this._selectedDates){this._selectedDates=this.cfg.getProperty(B)}},configOptions:function(B,C,A){this.Options[B.toUpperCase()]=C[0]},configLocale:function(B,C,A){this.Locale[B.toUpperCase()]=C[0];this.cfg.refireEvent(L.LOCALE_MONTHS.key);this.cfg.refireEvent(L.LOCALE_WEEKDAYS.key)},configLocaleValues:function(C,D,B){C=C.toLowerCase();var P=D[0],E=this.cfg,O=this.Locale;switch(C){case L.LOCALE_MONTHS.key:switch(P){case H.SHORT:O.LOCALE_MONTHS=E.getProperty(L.MONTHS_SHORT.key).concat();break;case H.LONG:O.LOCALE_MONTHS=E.getProperty(L.MONTHS_LONG.key).concat();break}break;case L.LOCALE_WEEKDAYS.key:switch(P){case H.ONE_CHAR:O.LOCALE_WEEKDAYS=E.getProperty(L.WEEKDAYS_1CHAR.key).concat();break;case H.SHORT:O.LOCALE_WEEKDAYS=E.getProperty(L.WEEKDAYS_SHORT.key).concat();break;case H.MEDIUM:O.LOCALE_WEEKDAYS=E.getProperty(L.WEEKDAYS_MEDIUM.key).concat();break;case H.LONG:O.LOCALE_WEEKDAYS=E.getProperty(L.WEEKDAYS_LONG.key).concat();break}var A=E.getProperty(L.START_WEEKDAY.key);if(A>0){for(var F=0;F<A;++F){O.LOCALE_WEEKDAYS.push(O.LOCALE_WEEKDAYS.shift())}}break}},configNavigator:function(C,D,B){var A=D[0];if(YAHOO.widget.CalendarNavigator&&(A===true||I.isObject(A))){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 A=H._STYLES;this.Style={CSS_ROW_HEADER:A.CSS_ROW_HEADER,CSS_ROW_FOOTER:A.CSS_ROW_FOOTER,CSS_CELL:A.CSS_CELL,CSS_CELL_SELECTOR:A.CSS_CELL_SELECTOR,CSS_CELL_SELECTED:A.CSS_CELL_SELECTED,CSS_CELL_SELECTABLE:A.CSS_CELL_SELECTABLE,CSS_CELL_RESTRICTED:A.CSS_CELL_RESTRICTED,CSS_CELL_TODAY:A.CSS_CELL_TODAY,CSS_CELL_OOM:A.CSS_CELL_OOM,CSS_CELL_OOB:A.CSS_CELL_OOB,CSS_HEADER:A.CSS_HEADER,CSS_HEADER_TEXT:A.CSS_HEADER_TEXT,CSS_BODY:A.CSS_BODY,CSS_WEEKDAY_CELL:A.CSS_WEEKDAY_CELL,CSS_WEEKDAY_ROW:A.CSS_WEEKDAY_ROW,CSS_FOOTER:A.CSS_FOOTER,CSS_CALENDAR:A.CSS_CALENDAR,CSS_SINGLE:A.CSS_SINGLE,CSS_CONTAINER:A.CSS_CONTAINER,CSS_NAV_LEFT:A.CSS_NAV_LEFT,CSS_NAV_RIGHT:A.CSS_NAV_RIGHT,CSS_NAV:A.CSS_NAV,CSS_CLOSE:A.CSS_CLOSE,CSS_CELL_TOP:A.CSS_CELL_TOP,CSS_CELL_LEFT:A.CSS_CELL_LEFT,CSS_CELL_RIGHT:A.CSS_CELL_RIGHT,CSS_CELL_BOTTOM:A.CSS_CELL_BOTTOM,CSS_CELL_HOVER:A.CSS_CELL_HOVER,CSS_CELL_HIGHLIGHT1:A.CSS_CELL_HIGHLIGHT1,CSS_CELL_HIGHLIGHT2:A.CSS_CELL_HIGHLIGHT2,CSS_CELL_HIGHLIGHT3:A.CSS_CELL_HIGHLIGHT3,CSS_CELL_HIGHLIGHT4:A.CSS_CELL_HIGHLIGHT4}},buildMonthLabel:function(){return this._buildMonthLabel(this.cfg.getProperty(L.PAGEDATE.key))},_buildMonthLabel:function(C){var A=this.Locale.LOCALE_MONTHS[C.getMonth()]+this.Locale.MY_LABEL_MONTH_SUFFIX,B=C.getFullYear()+this.Locale.MY_LABEL_YEAR_SUFFIX;if(this.Locale.MY_LABEL_MONTH_POSITION==2||this.Locale.MY_LABEL_YEAR_POSITION==1){return B+A}else{return A+B}},buildDayLabel:function(A){return A.getDate()},createTitleBar:function(B){var A=K.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE,"div",this.oDomContainer)[0]||document.createElement("div");A.className=YAHOO.widget.CalendarGroup.CSS_2UPTITLE;A.innerHTML=B;this.oDomContainer.insertBefore(A,this.oDomContainer.firstChild);K.addClass(this.oDomContainer,"withtitle");return A},removeTitleBar:function(){var A=K.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE,"div",this.oDomContainer)[0]||null;if(A){G.purgeElement(A);this.oDomContainer.removeChild(A)}K.removeClass(this.oDomContainer,"withtitle")},createCloseButton:function(){var C=YAHOO.widget.CalendarGroup.CSS_2UPCLOSE,A="us/my/bn/x_d.gif",B=K.getElementsByClassName("link-close","a",this.oDomContainer)[0],F=this.cfg.getProperty(L.STRINGS.key),E=(F&&F.close)?F.close:"";if(!B){B=document.createElement("a");G.addListener(B,"click",function(O,P){P.hide();G.preventDefault(O)},this)}B.href="#";B.className="link-close";if(H.IMG_ROOT!==null){var D=K.getElementsByClassName(C,"img",B)[0]||document.createElement("img");D.src=H.IMG_ROOT+A;D.className=C;B.appendChild(D)}else{B.innerHTML='<span class="'+C+" "+this.Style.CSS_CLOSE+'">'+E+"</span>"}this.oDomContainer.appendChild(B);return B},removeCloseButton:function(){var A=K.getElementsByClassName("link-close","a",this.oDomContainer)[0]||null;if(A){G.purgeElement(A);this.oDomContainer.removeChild(A)}},renderHeader:function(Z){var a=7,b="us/tr/callt.gif",k="us/tr/calrt.gif",c=this.cfg,f=c.getProperty(L.PAGEDATE.key),e=c.getProperty(L.STRINGS.key),C=(e&&e.previousMonth)?e.previousMonth:"",j=(e&&e.nextMonth)?e.nextMonth:"",d;if(c.getProperty(L.SHOW_WEEK_HEADER.key)){a+=1}if(c.getProperty(L.SHOW_WEEK_FOOTER.key)){a+=1}Z[Z.length]="<thead>";Z[Z.length]="<tr>";Z[Z.length]='<th colspan="'+a+'" class="'+this.Style.CSS_HEADER_TEXT+'">';Z[Z.length]='<div class="'+this.Style.CSS_HEADER+'">';var A,D=false;if(this.parent){if(this.index===0){A=true}if(this.index==(this.parent.cfg.getProperty("pages")-1)){D=true}}else{A=true;D=true}if(A){d=this._buildMonthLabel(J.subtract(f,J.MONTH,1));var Y=c.getProperty(L.NAV_ARROW_LEFT.key);if(Y===null&&H.IMG_ROOT!==null){Y=H.IMG_ROOT+b}var h=(Y===null)?"":' style="background-image:url('+Y+')"';Z[Z.length]='<a class="'+this.Style.CSS_NAV_LEFT+'"'+h+' href="#">'+C+" ("+d+")</a>"}var B=this.buildMonthLabel();var F=this.parent||this;if(F.cfg.getProperty("navigator")){B='<a class="'+this.Style.CSS_NAV+'" href="#">'+B+"</a>"}Z[Z.length]=B;if(D){d=this._buildMonthLabel(J.add(f,J.MONTH,1));var E=c.getProperty(L.NAV_ARROW_RIGHT.key);if(E===null&&H.IMG_ROOT!==null){E=H.IMG_ROOT+k}var g=(E===null)?"":' style="background-image:url('+E+')"';Z[Z.length]='<a class="'+this.Style.CSS_NAV_RIGHT+'"'+g+' href="#">'+j+" ("+d+")</a>"}Z[Z.length]="</div>\n</th>\n</tr>";if(c.getProperty(L.SHOW_WEEKDAYS.key)){Z=this.buildWeekdays(Z)}Z[Z.length]="</thead>";return Z},buildWeekdays:function(A){A[A.length]='<tr class="'+this.Style.CSS_WEEKDAY_ROW+'">';if(this.cfg.getProperty(L.SHOW_WEEK_HEADER.key)){A[A.length]="<th>&#160;</th>"}for(var B=0;B<this.Locale.LOCALE_WEEKDAYS.length;++B){A[A.length]='<th class="calweekdaycell">'+this.Locale.LOCALE_WEEKDAYS[B]+"</th>"}if(this.cfg.getProperty(L.SHOW_WEEK_FOOTER.key)){A[A.length]="<th>&#160;</th>"}A[A.length]="</tr>";return A},renderBody:function(Ae,Ag){var A=this.cfg.getProperty(L.START_WEEKDAY.key);this.preMonthDays=Ae.getDay();if(A>0){this.preMonthDays-=A}if(this.preMonthDays<0){this.preMonthDays+=7}this.monthDays=J.findMonthEnd(Ae).getDate();this.postMonthDays=H.DISPLAY_DAYS-this.preMonthDays-this.monthDays;Ae=J.subtract(Ae,J.DAY,this.preMonthDays);var s,AN,AO="w",Ak="_cell",Am="wd",AY="d",AL,Aa,AC=this.today,AM=this.cfg,AD=AC.getFullYear(),AZ=AC.getMonth(),AR=AC.getDate(),AF=AM.getProperty(L.PAGEDATE.key),AS=AM.getProperty(L.HIDE_BLANK_WEEKS.key),Ah=AM.getProperty(L.SHOW_WEEK_FOOTER.key),An=AM.getProperty(L.SHOW_WEEK_HEADER.key),AG=AM.getProperty(L.MINDATE.key),F=AM.getProperty(L.MAXDATE.key);if(AG){AG=J.clearTime(AG)}if(F){F=J.clearTime(F)}Ag[Ag.length]='<tbody class="m'+(AF.getMonth()+1)+" "+this.Style.CSS_BODY+'">';var C=0,AJ=document.createElement("div"),Af=document.createElement("td");AJ.appendChild(Af);var AV=this.parent||this;for(var r=0;r<6;r++){s=J.getWeekNumber(Ae,A);AN=AO+s;if(r!==0&&AS===true&&Ae.getMonth()!=AF.getMonth()){break}else{Ag[Ag.length]='<tr class="'+AN+'">';if(An){Ag=this.renderRowHeader(s,Ag)}for(var B=0;B<7;B++){AL=[];this.clearElement(Af);Af.className=this.Style.CSS_CELL;Af.id=this.id+Ak+C;if(Ae.getDate()==AR&&Ae.getMonth()==AZ&&Ae.getFullYear()==AD){AL[AL.length]=AV.renderCellStyleToday}var p=[Ae.getFullYear(),Ae.getMonth()+1,Ae.getDate()];this.cellDates[this.cellDates.length]=p;if(Ae.getMonth()!=AF.getMonth()){AL[AL.length]=AV.renderCellNotThisMonth}else{K.addClass(Af,Am+Ae.getDay());K.addClass(Af,AY+Ae.getDate());for(var x=0;x<this.renderStack.length;++x){Aa=null;var AX=this.renderStack[x],Ao=AX[0],AT,Al,AP;switch(Ao){case H.DATE:AT=AX[1][1];Al=AX[1][2];AP=AX[1][0];if(Ae.getMonth()+1==AT&&Ae.getDate()==Al&&Ae.getFullYear()==AP){Aa=AX[2];this.renderStack.splice(x,1)}break;case H.MONTH_DAY:AT=AX[1][0];Al=AX[1][1];if(Ae.getMonth()+1==AT&&Ae.getDate()==Al){Aa=AX[2];this.renderStack.splice(x,1)}break;case H.RANGE:var Ai=AX[1][0],Aj=AX[1][1],Ad=Ai[1],AH=Ai[2],t=Ai[0],D=J.getDate(t,Ad-1,AH),AQ=Aj[1],Ab=Aj[2],AU=Aj[0],E=J.getDate(AU,AQ-1,Ab);if(Ae.getTime()>=D.getTime()&&Ae.getTime()<=E.getTime()){Aa=AX[2];if(Ae.getTime()==E.getTime()){this.renderStack.splice(x,1)}}break;case H.WEEKDAY:var AI=AX[1][0];if(Ae.getDay()+1==AI){Aa=AX[2]}break;case H.MONTH:AT=AX[1][0];if(Ae.getMonth()+1==AT){Aa=AX[2]}break}if(Aa){AL[AL.length]=Aa}}}if(this._indexOfSelectedFieldArray(p)>-1){AL[AL.length]=AV.renderCellStyleSelected}if((AG&&(Ae.getTime()<AG.getTime()))||(F&&(Ae.getTime()>F.getTime()))){AL[AL.length]=AV.renderOutOfBoundsDate}else{AL[AL.length]=AV.styleCellDefault;AL[AL.length]=AV.renderCellDefault}for(var AW=0;AW<AL.length;++AW){if(AL[AW].call(AV,Ae,Af)==H.STOP_RENDER){break}}Ae.setTime(Ae.getTime()+J.ONE_DAY_MS);Ae=J.clearTime(Ae);if(C>=0&&C<=6){K.addClass(Af,this.Style.CSS_CELL_TOP)}if((C%7)===0){K.addClass(Af,this.Style.CSS_CELL_LEFT)}if(((C+1)%7)===0){K.addClass(Af,this.Style.CSS_CELL_RIGHT)}var Ac=this.postMonthDays;if(AS&&Ac>=7){var AE=Math.floor(Ac/7);for(var d=0;d<AE;++d){Ac-=7}}if(C>=((this.preMonthDays+Ac+this.monthDays)-7)){K.addClass(Af,this.Style.CSS_CELL_BOTTOM)}Ag[Ag.length]=AJ.innerHTML;C++}if(Ah){Ag=this.renderRowFooter(s,Ag)}Ag[Ag.length]="</tr>"}}Ag[Ag.length]="</tbody>";return Ag},renderFooter:function(A){return A},render:function(){this.beforeRenderEvent.fire();var A=J.findMonthStart(this.cfg.getProperty(L.PAGEDATE.key));this.resetRenderers();this.cellDates.length=0;G.purgeElement(this.oDomContainer,true);var B=[];B[B.length]='<table cellSpacing="0" class="'+this.Style.CSS_CALENDAR+" y"+A.getFullYear()+'" id="'+this.id+'">';B=this.renderHeader(B);B=this.renderBody(A,B);B=this.renderFooter(B);B[B.length]="</table>";this.oDomContainer.innerHTML=B.join("\n");this.applyListeners();this.cells=this.oDomContainer.getElementsByTagName("td");this.cfg.refireEvent(L.TITLE.key);this.cfg.refireEvent(L.CLOSE.key);this.cfg.refireEvent(L.IFRAME.key);this.renderEvent.fire()},applyListeners:function(){var D=this.oDomContainer,Y=this.parent||this,U="a",A="click";var T=K.getElementsByClassName(this.Style.CSS_NAV_LEFT,U,D),X=K.getElementsByClassName(this.Style.CSS_NAV_RIGHT,U,D);if(T&&T.length>0){this.linkLeft=T[0];G.addListener(this.linkLeft,A,this.doPreviousMonthNav,Y,true)}if(X&&X.length>0){this.linkRight=X[0];G.addListener(this.linkRight,A,this.doNextMonthNav,Y,true)}if(Y.cfg.getProperty("navigator")!==null){this.applyNavListeners()}if(this.domEventMap){var W,Z;for(var B in this.domEventMap){if(I.hasOwnProperty(this.domEventMap,B)){var F=this.domEventMap[B];if(!(F instanceof Array)){F=[F]}for(var V=0;V<F.length;V++){var C=F[V];Z=K.getElementsByClassName(B,C.tag,this.oDomContainer);for(var E=0;E<Z.length;E++){W=Z[E];G.addListener(W,C.event,C.handler,C.scope,C.correct)}}}}}G.addListener(this.oDomContainer,"click",this.doSelectCell,this);G.addListener(this.oDomContainer,"mouseover",this.doCellMouseOver,this);G.addListener(this.oDomContainer,"mouseout",this.doCellMouseOut,this)},applyNavListeners:function(){var B=this.parent||this,A=this,C=K.getElementsByClassName(this.Style.CSS_NAV,"a",this.oDomContainer);if(C.length>0){G.addListener(C,"click",function(O,P){var D=G.getTarget(O);if(this===D||K.isAncestor(this,D)){G.preventDefault(O)}var F=B.oNavigator;if(F){var E=A.cfg.getProperty("pagedate");F.setYear(E.getFullYear());F.setMonth(E.getMonth());F.show()}})}},getDateByCellId:function(A){var B=this.getDateFieldsByCellId(A);return(B)?J.getDate(B[0],B[1]-1,B[2]):null},getDateFieldsByCellId:function(A){A=this.getIndexFromId(A);return(A>-1)?this.cellDates[A]:null},getCellIndex:function(D){var E=-1;if(D){var F=D.getMonth(),O=D.getFullYear(),P=D.getDate(),B=this.cellDates;for(var C=0;C<B.length;++C){var A=B[C];if(A[0]===O&&A[1]===F+1&&A[2]===P){E=C;break}}}return E},getIndexFromId:function(A){var B=-1,C=A.lastIndexOf("_cell");if(C>-1){B=parseInt(A.substring(C+5),10)}return B},renderOutOfBoundsDate:function(A,B){K.addClass(B,this.Style.CSS_CELL_OOB);B.innerHTML=A.getDate();return H.STOP_RENDER},renderRowHeader:function(A,B){B[B.length]='<th class="calrowhead">'+A+"</th>";return B},renderRowFooter:function(A,B){B[B.length]='<th class="calrowfoot">'+A+"</th>";return B},renderCellDefault:function(A,B){B.innerHTML='<a href="#" class="'+this.Style.CSS_CELL_SELECTOR+'">'+this.buildDayLabel(A)+"</a>"},styleCellDefault:function(A,B){K.addClass(B,this.Style.CSS_CELL_SELECTABLE)},renderCellStyleHighlight1:function(A,B){K.addClass(B,this.Style.CSS_CELL_HIGHLIGHT1)},renderCellStyleHighlight2:function(A,B){K.addClass(B,this.Style.CSS_CELL_HIGHLIGHT2)},renderCellStyleHighlight3:function(A,B){K.addClass(B,this.Style.CSS_CELL_HIGHLIGHT3)},renderCellStyleHighlight4:function(A,B){K.addClass(B,this.Style.CSS_CELL_HIGHLIGHT4)},renderCellStyleToday:function(A,B){K.addClass(B,this.Style.CSS_CELL_TODAY)},renderCellStyleSelected:function(A,B){K.addClass(B,this.Style.CSS_CELL_SELECTED)},renderCellNotThisMonth:function(A,B){K.addClass(B,this.Style.CSS_CELL_OOM);B.innerHTML=A.getDate();return H.STOP_RENDER},renderBodyCellRestricted:function(A,B){K.addClass(B,this.Style.CSS_CELL);K.addClass(B,this.Style.CSS_CELL_RESTRICTED);B.innerHTML=A.getDate();return H.STOP_RENDER},addMonths:function(A){var B=L.PAGEDATE.key;this.cfg.setProperty(B,J.add(this.cfg.getProperty(B),J.MONTH,A));this.resetRenderers();this.changePageEvent.fire()},subtractMonths:function(A){var B=L.PAGEDATE.key;this.cfg.setProperty(B,J.subtract(this.cfg.getProperty(B),J.MONTH,A));this.resetRenderers();this.changePageEvent.fire()},addYears:function(A){var B=L.PAGEDATE.key;this.cfg.setProperty(B,J.add(this.cfg.getProperty(B),J.YEAR,A));this.resetRenderers();this.changePageEvent.fire()},subtractYears:function(A){var B=L.PAGEDATE.key;this.cfg.setProperty(B,J.subtract(this.cfg.getProperty(B),J.YEAR,A));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(L.SELECTED.key);this.cfg.resetProperty(L.PAGEDATE.key);this.resetEvent.fire()},clear:function(){this.cfg.setProperty(L.SELECTED.key,[]);this.cfg.setProperty(L.PAGEDATE.key,new Date(this.today.getTime()));this.clearEvent.fire()},select:function(D){var A=this._toFieldArray(D),E=[],B=[],N=L.SELECTED.key;for(var F=0;F<A.length;++F){var C=A[F];if(!this.isDateOOB(this._toDate(C))){if(E.length===0){this.beforeSelectEvent.fire();B=this.cfg.getProperty(N)}E.push(C);if(this._indexOfSelectedFieldArray(C)==-1){B[B.length]=C}}}if(E.length>0){if(this.parent){this.parent.cfg.setProperty(N,B)}else{this.cfg.setProperty(N,B)}this.selectEvent.fire(E)}return this.getSelectedDates()},selectCell:function(C){var E=this.cells[C],O=this.cellDates[C],P=this._toDate(O),D=K.hasClass(E,this.Style.CSS_CELL_SELECTABLE);if(D){this.beforeSelectEvent.fire();var A=L.SELECTED.key;var B=this.cfg.getProperty(A);var F=O.concat();if(this._indexOfSelectedFieldArray(F)==-1){B[B.length]=F}if(this.parent){this.parent.cfg.setProperty(A,B)}else{this.cfg.setProperty(A,B)}this.renderCellStyleSelected(P,E);this.selectEvent.fire([F]);this.doCellMouseOut.call(E,null,this)}return this.getSelectedDates()},deselect:function(B){var F=this._toFieldArray(B),C=[],P=[],O=L.SELECTED.key;for(var E=0;E<F.length;++E){var A=F[E];if(!this.isDateOOB(this._toDate(A))){if(C.length===0){this.beforeDeselectEvent.fire();P=this.cfg.getProperty(O)}C.push(A);var D=this._indexOfSelectedFieldArray(A);if(D!=-1){P.splice(D,1)}}}if(C.length>0){if(this.parent){this.parent.cfg.setProperty(O,P)}else{this.cfg.setProperty(O,P)}this.deselectEvent.fire(C)}return this.getSelectedDates()},deselectCell:function(B){var E=this.cells[B],O=this.cellDates[B],D=this._indexOfSelectedFieldArray(O);var C=K.hasClass(E,this.Style.CSS_CELL_SELECTABLE);if(C){this.beforeDeselectEvent.fire();var A=this.cfg.getProperty(L.SELECTED.key),P=this._toDate(O),F=O.concat();if(D>-1){if(this.cfg.getProperty(L.PAGEDATE.key).getMonth()==P.getMonth()&&this.cfg.getProperty(L.PAGEDATE.key).getFullYear()==P.getFullYear()){K.removeClass(E,this.Style.CSS_CELL_SELECTED)}A.splice(D,1)}if(this.parent){this.parent.cfg.setProperty(L.SELECTED.key,A)}else{this.cfg.setProperty(L.SELECTED.key,A)}this.deselectEvent.fire(F)}return this.getSelectedDates()},deselectAll:function(){this.beforeDeselectEvent.fire();var A=L.SELECTED.key,D=this.cfg.getProperty(A),C=D.length,B=D.concat();if(this.parent){this.parent.cfg.setProperty(A,[])}else{this.cfg.setProperty(A,[])}if(C>0){this.deselectEvent.fire(B)}return this.getSelectedDates()},_toFieldArray:function(C){var D=[];if(C instanceof Date){D=[[C.getFullYear(),C.getMonth()+1,C.getDate()]]}else{if(I.isString(C)){D=this._parseDates(C)}else{if(I.isArray(C)){for(var B=0;B<C.length;++B){var A=C[B];D[D.length]=[A.getFullYear(),A.getMonth()+1,A.getDate()]}}}}return D},toDate:function(A){return this._toDate(A)},_toDate:function(A){if(A instanceof Date){return A}else{return J.getDate(A[0],A[1]-1,A[2])}},_fieldArraysAreEqual:function(A,B){var C=false;if(A[0]==B[0]&&A[1]==B[1]&&A[2]==B[2]){C=true}return C},_indexOfSelectedFieldArray:function(A){var B=-1,E=this.cfg.getProperty(L.SELECTED.key);for(var C=0;C<E.length;++C){var D=E[C];if(A[0]==D[0]&&A[1]==D[1]&&A[2]==D[2]){B=C;break}}return B},isDateOOM:function(A){return(A.getMonth()!=this.cfg.getProperty(L.PAGEDATE.key).getMonth())},isDateOOB:function(C){var B=this.cfg.getProperty(L.MINDATE.key),A=this.cfg.getProperty(L.MAXDATE.key),D=J;if(B){B=D.clearTime(B)}if(A){A=D.clearTime(A)}var E=new Date(C.getTime());E=D.clearTime(E);return((B&&E.getTime()<B.getTime())||(A&&E.getTime()>A.getTime()))},_parsePageDate:function(E){var B;if(E){if(E instanceof Date){B=J.findMonthStart(E)}else{var A,C,D;D=E.split(this.cfg.getProperty(L.DATE_FIELD_DELIMITER.key));A=parseInt(D[this.cfg.getProperty(L.MY_MONTH_POSITION.key)-1],10)-1;C=parseInt(D[this.cfg.getProperty(L.MY_YEAR_POSITION.key)-1],10);B=J.getDate(C,A,1)}}else{B=J.getDate(this.today.getFullYear(),this.today.getMonth(),1)}return B},onBeforeSelect:function(){if(this.cfg.getProperty(L.MULTI_SELECT.key)===false){if(this.parent){this.parent.callChildFunction("clearAllBodyCellStyles",this.Style.CSS_CELL_SELECTED);this.parent.deselectAll()}else{this.clearAllBodyCellStyles(this.Style.CSS_CELL_SELECTED);this.deselectAll()}}},onSelect:function(A){},onBeforeDeselect:function(){},onDeselect:function(A){},onChangePage:function(){this.render()},onRender:function(){},onReset:function(){this.render()},onClear:function(){this.render()},validate:function(){return true},_parseDate:function(B){var A=B.split(this.Locale.DATE_FIELD_DELIMITER),D;if(A.length==2){D=[A[this.Locale.MD_MONTH_POSITION-1],A[this.Locale.MD_DAY_POSITION-1]];D.type=H.MONTH_DAY}else{D=[A[this.Locale.MDY_YEAR_POSITION-1],A[this.Locale.MDY_MONTH_POSITION-1],A[this.Locale.MDY_DAY_POSITION-1]];D.type=H.DATE}for(var C=0;C<D.length;C++){D[C]=parseInt(D[C],10)}return D},_parseDates:function(S){var B=[],C=S.split(this.Locale.DATE_DELIMITER);for(var D=0;D<C.length;++D){var E=C[D];if(E.indexOf(this.Locale.DATE_RANGE_DELIMITER)!=-1){var T=E.split(this.Locale.DATE_RANGE_DELIMITER),F=this._parseDate(T[0]),A=this._parseDate(T[1]),Q=this._parseRange(F,A);B=B.concat(Q)}else{var R=this._parseDate(E);B.push(R)}}return B},_parseRange:function(E,A){var D=J.add(J.getDate(E[0],E[1]-1,E[2]),J.DAY,1),B=J.getDate(A[0],A[1]-1,A[2]),C=[];C.push(E);while(D.getTime()<=B.getTime()){C.push([D.getFullYear(),D.getMonth()+1,D.getDate()]);D=J.add(D,J.DAY,1)}return C},resetRenderers:function(){this.renderStack=this._renderStack.concat()},removeRenderers:function(){this._renderStack=[];this.renderStack=[]},clearElement:function(A){A.innerHTML="&#160;";A.className=""},addRenderer:function(E,D){var B=this._parseDates(E);for(var C=0;C<B.length;++C){var A=B[C];if(A.length==2){if(A[0] instanceof Array){this._addRenderer(H.RANGE,A,D)}else{this._addRenderer(H.MONTH_DAY,A,D)}}else{if(A.length==3){this._addRenderer(H.DATE,A,D)}}}},_addRenderer:function(C,B,D){var A=[C,B,D];this.renderStack.unshift(A);this._renderStack=this.renderStack.concat()},addMonthRenderer:function(A,B){this._addRenderer(H.MONTH,[A],B)},addWeekdayRenderer:function(A,B){this._addRenderer(H.WEEKDAY,[A],B)},clearAllBodyCellStyles:function(B){for(var A=0;A<this.cells.length;++A){K.removeClass(this.cells[A],B)}},setMonth:function(A){var C=L.PAGEDATE.key,B=this.cfg.getProperty(C);B.setMonth(parseInt(A,10));this.cfg.setProperty(C,B)},setYear:function(B){var C=L.PAGEDATE.key,A=this.cfg.getProperty(C);A.setFullYear(parseInt(B,10));this.cfg.setProperty(C,A)},getSelectedDates:function(){var C=[],D=this.cfg.getProperty(L.SELECTED.key);for(var A=0;A<D.length;++A){var B=D[A];var E=J.getDate(B[0],B[1]-1,B[2]);C.push(E)}C.sort(function(N,F){return N-F});return C},hide:function(){if(this.beforeHideEvent.fire()){this.oDomContainer.style.display="none";this.hideEvent.fire()}},show:function(){if(this.beforeShowEvent.fire()){this.oDomContainer.style.display="block";this.showEvent.fire()}},browser:(function(){var A=navigator.userAgent.toLowerCase();if(A.indexOf("opera")!=-1){return"opera"}else{if(A.indexOf("msie 7")!=-1){return"ie7"}else{if(A.indexOf("msie")!=-1){return"ie"}else{if(A.indexOf("safari")!=-1){return"safari"}else{if(A.indexOf("gecko")!=-1){return"gecko"}else{return false}}}}}})(),toString:function(){return"Calendar "+this.id},destroy:function(){if(this.beforeDestroyEvent.fire()){var A=this;if(A.navigator){A.navigator.destroy()}if(A.cfg){A.cfg.destroy()}G.purgeElement(A.oDomContainer,true);K.removeClass(A.oDomContainer,"withtitle");K.removeClass(A.oDomContainer,A.Style.CSS_CONTAINER);K.removeClass(A.oDomContainer,A.Style.CSS_SINGLE);A.oDomContainer.innerHTML="";A.oDomContainer=null;A.cells=null;this.destroyEvent.fire()}}};YAHOO.widget.Calendar=H;YAHOO.widget.Calendar_Core=YAHOO.widget.Calendar;YAHOO.widget.Cal_Core=YAHOO.widget.Calendar})();(function(){var L=YAHOO.util.Dom,J=YAHOO.widget.DateMath,H=YAHOO.util.Event,K=YAHOO.lang,I=YAHOO.widget.Calendar;function N(A,C,B){if(arguments.length>0){this.init.apply(this,arguments)}}N._DEFAULT_CONFIG=I._DEFAULT_CONFIG;N._DEFAULT_CONFIG.PAGES={key:"pages",value:2};var M=N._DEFAULT_CONFIG;N.prototype={init:function(A,C,B){var D=this._parseArgs(arguments);A=D.id;C=D.container;B=D.config;this.oDomContainer=L.get(C);if(!this.oDomContainer.id){this.oDomContainer.id=L.generateId()}if(!A){A=this.oDomContainer.id+"_t"}this.id=A;this.containerId=this.oDomContainer.id;this.initEvents();this.initStyles();this.pages=[];L.addClass(this.oDomContainer,N.CSS_CONTAINER);L.addClass(this.oDomContainer,N.CSS_MULTI_UP);this.cfg=new YAHOO.util.Config(this);this.Options={};this.Locale={};this.setupConfig();if(B){this.cfg.applyConfig(B,true)}this.cfg.fireQueue();if(YAHOO.env.ua.opera){this.renderEvent.subscribe(this._fixWidth,this,true);this.showEvent.subscribe(this._fixWidth,this,true)}},setupConfig:function(){var A=this.cfg;A.addProperty(M.PAGES.key,{value:M.PAGES.value,validator:A.checkNumber,handler:this.configPages});A.addProperty(M.PAGEDATE.key,{value:new Date(),handler:this.configPageDate});A.addProperty(M.SELECTED.key,{value:[],handler:this.configSelected});A.addProperty(M.TITLE.key,{value:M.TITLE.value,handler:this.configTitle});A.addProperty(M.CLOSE.key,{value:M.CLOSE.value,handler:this.configClose});A.addProperty(M.IFRAME.key,{value:M.IFRAME.value,handler:this.configIframe,validator:A.checkBoolean});A.addProperty(M.MINDATE.key,{value:M.MINDATE.value,handler:this.delegateConfig});A.addProperty(M.MAXDATE.key,{value:M.MAXDATE.value,handler:this.delegateConfig});A.addProperty(M.MULTI_SELECT.key,{value:M.MULTI_SELECT.value,handler:this.delegateConfig,validator:A.checkBoolean});A.addProperty(M.START_WEEKDAY.key,{value:M.START_WEEKDAY.value,handler:this.delegateConfig,validator:A.checkNumber});A.addProperty(M.SHOW_WEEKDAYS.key,{value:M.SHOW_WEEKDAYS.value,handler:this.delegateConfig,validator:A.checkBoolean});A.addProperty(M.SHOW_WEEK_HEADER.key,{value:M.SHOW_WEEK_HEADER.value,handler:this.delegateConfig,validator:A.checkBoolean});A.addProperty(M.SHOW_WEEK_FOOTER.key,{value:M.SHOW_WEEK_FOOTER.value,handler:this.delegateConfig,validator:A.checkBoolean});A.addProperty(M.HIDE_BLANK_WEEKS.key,{value:M.HIDE_BLANK_WEEKS.value,handler:this.delegateConfig,validator:A.checkBoolean});A.addProperty(M.NAV_ARROW_LEFT.key,{value:M.NAV_ARROW_LEFT.value,handler:this.delegateConfig});A.addProperty(M.NAV_ARROW_RIGHT.key,{value:M.NAV_ARROW_RIGHT.value,handler:this.delegateConfig});A.addProperty(M.MONTHS_SHORT.key,{value:M.MONTHS_SHORT.value,handler:this.delegateConfig});A.addProperty(M.MONTHS_LONG.key,{value:M.MONTHS_LONG.value,handler:this.delegateConfig});A.addProperty(M.WEEKDAYS_1CHAR.key,{value:M.WEEKDAYS_1CHAR.value,handler:this.delegateConfig});A.addProperty(M.WEEKDAYS_SHORT.key,{value:M.WEEKDAYS_SHORT.value,handler:this.delegateConfig});A.addProperty(M.WEEKDAYS_MEDIUM.key,{value:M.WEEKDAYS_MEDIUM.value,handler:this.delegateConfig});A.addProperty(M.WEEKDAYS_LONG.key,{value:M.WEEKDAYS_LONG.value,handler:this.delegateConfig});A.addProperty(M.LOCALE_MONTHS.key,{value:M.LOCALE_MONTHS.value,handler:this.delegateConfig});A.addProperty(M.LOCALE_WEEKDAYS.key,{value:M.LOCALE_WEEKDAYS.value,handler:this.delegateConfig});A.addProperty(M.DATE_DELIMITER.key,{value:M.DATE_DELIMITER.value,handler:this.delegateConfig});A.addProperty(M.DATE_FIELD_DELIMITER.key,{value:M.DATE_FIELD_DELIMITER.value,handler:this.delegateConfig});A.addProperty(M.DATE_RANGE_DELIMITER.key,{value:M.DATE_RANGE_DELIMITER.value,handler:this.delegateConfig});A.addProperty(M.MY_MONTH_POSITION.key,{value:M.MY_MONTH_POSITION.value,handler:this.delegateConfig,validator:A.checkNumber});A.addProperty(M.MY_YEAR_POSITION.key,{value:M.MY_YEAR_POSITION.value,handler:this.delegateConfig,validator:A.checkNumber});A.addProperty(M.MD_MONTH_POSITION.key,{value:M.MD_MONTH_POSITION.value,handler:this.delegateConfig,validator:A.checkNumber});A.addProperty(M.MD_DAY_POSITION.key,{value:M.MD_DAY_POSITION.value,handler:this.delegateConfig,validator:A.checkNumber});A.addProperty(M.MDY_MONTH_POSITION.key,{value:M.MDY_MONTH_POSITION.value,handler:this.delegateConfig,validator:A.checkNumber});A.addProperty(M.MDY_DAY_POSITION.key,{value:M.MDY_DAY_POSITION.value,handler:this.delegateConfig,validator:A.checkNumber});A.addProperty(M.MDY_YEAR_POSITION.key,{value:M.MDY_YEAR_POSITION.value,handler:this.delegateConfig,validator:A.checkNumber});A.addProperty(M.MY_LABEL_MONTH_POSITION.key,{value:M.MY_LABEL_MONTH_POSITION.value,handler:this.delegateConfig,validator:A.checkNumber});A.addProperty(M.MY_LABEL_YEAR_POSITION.key,{value:M.MY_LABEL_YEAR_POSITION.value,handler:this.delegateConfig,validator:A.checkNumber});A.addProperty(M.MY_LABEL_MONTH_SUFFIX.key,{value:M.MY_LABEL_MONTH_SUFFIX.value,handler:this.delegateConfig});A.addProperty(M.MY_LABEL_YEAR_SUFFIX.key,{value:M.MY_LABEL_YEAR_SUFFIX.value,handler:this.delegateConfig});A.addProperty(M.NAV.key,{value:M.NAV.value,handler:this.configNavigator});A.addProperty(M.STRINGS.key,{value:M.STRINGS.value,handler:this.configStrings,validator:function(B){return K.isObject(B)},supercedes:M.STRINGS.supercedes})},initEvents:function(){var C=this,A="Event",F=YAHOO.util.CustomEvent;var D=function(U,G,V){for(var S=0;S<C.pages.length;++S){var T=C.pages[S];T[this.type+A].subscribe(U,G,V)}};var E=function(T,G){for(var R=0;R<C.pages.length;++R){var S=C.pages[R];S[this.type+A].unsubscribe(T,G)}};var B=I._EVENT_TYPES;C.beforeSelectEvent=new F(B.BEFORE_SELECT);C.beforeSelectEvent.subscribe=D;C.beforeSelectEvent.unsubscribe=E;C.selectEvent=new F(B.SELECT);C.selectEvent.subscribe=D;C.selectEvent.unsubscribe=E;C.beforeDeselectEvent=new F(B.BEFORE_DESELECT);C.beforeDeselectEvent.subscribe=D;C.beforeDeselectEvent.unsubscribe=E;C.deselectEvent=new F(B.DESELECT);C.deselectEvent.subscribe=D;C.deselectEvent.unsubscribe=E;C.changePageEvent=new F(B.CHANGE_PAGE);C.changePageEvent.subscribe=D;C.changePageEvent.unsubscribe=E;C.beforeRenderEvent=new F(B.BEFORE_RENDER);C.beforeRenderEvent.subscribe=D;C.beforeRenderEvent.unsubscribe=E;C.renderEvent=new F(B.RENDER);C.renderEvent.subscribe=D;C.renderEvent.unsubscribe=E;C.resetEvent=new F(B.RESET);C.resetEvent.subscribe=D;C.resetEvent.unsubscribe=E;C.clearEvent=new F(B.CLEAR);C.clearEvent.subscribe=D;C.clearEvent.unsubscribe=E;C.beforeShowEvent=new F(B.BEFORE_SHOW);C.showEvent=new F(B.SHOW);C.beforeHideEvent=new F(B.BEFORE_HIDE);C.hideEvent=new F(B.HIDE);C.beforeShowNavEvent=new F(B.BEFORE_SHOW_NAV);C.showNavEvent=new F(B.SHOW_NAV);C.beforeHideNavEvent=new F(B.BEFORE_HIDE_NAV);C.hideNavEvent=new F(B.HIDE_NAV);C.beforeRenderNavEvent=new F(B.BEFORE_RENDER_NAV);C.renderNavEvent=new F(B.RENDER_NAV);C.beforeDestroyEvent=new F(B.BEFORE_DESTROY);C.destroyEvent=new F(B.DESTROY)},configPages:function(E,F,X){var Z=F[0],b=M.PAGEDATE.key,A="_",D="groupcal",B="first-of-type",a="last-of-type";for(var c=0;c<Z;++c){var C=this.id+A+c,G=this.containerId+A+c,W=this.cfg.getConfig();W.close=false;W.title=false;W.navigator=null;var d=this.constructChild(C,G,W);var Y=d.cfg.getProperty(b);this._setMonthOnDate(Y,Y.getMonth()+c);d.cfg.setProperty(b,Y);L.removeClass(d.oDomContainer,this.Style.CSS_SINGLE);L.addClass(d.oDomContainer,D);if(c===0){L.addClass(d.oDomContainer,B)}if(c==(Z-1)){L.addClass(d.oDomContainer,a)}d.parent=this;d.index=c;this.pages[this.pages.length]=d}},configPageDate:function(B,C,E){var G=C[0],D;var F=M.PAGEDATE.key;for(var Q=0;Q<this.pages.length;++Q){var R=this.pages[Q];if(Q===0){D=R._parsePageDate(G);R.cfg.setProperty(F,D)}else{var A=new Date(D);this._setMonthOnDate(A,A.getMonth()+Q);R.cfg.setProperty(F,A)}}},configSelected:function(C,E,A){var B=M.SELECTED.key;this.delegateConfig(C,E,A);var D=(this.pages.length>0)?this.pages[0].cfg.getProperty(B):[];this.cfg.setProperty(B,D,true)},delegateConfig:function(D,E,A){var F=E[0];var B;for(var C=0;C<this.pages.length;C++){B=this.pages[C];B.cfg.setProperty(D,F)}},setChildFunction:function(A,C){var D=this.cfg.getProperty(M.PAGES.key);for(var B=0;B<D;++B){this.pages[B][A]=C}},callChildFunction:function(F,D){var E=this.cfg.getProperty(M.PAGES.key);for(var A=0;A<E;++A){var B=this.pages[A];if(B[F]){var C=B[F];C.call(B,D)}}},constructChild:function(A,C,B){var D=document.getElementById(C);if(!D){D=document.createElement("div");D.id=C;this.oDomContainer.appendChild(D)}return new I(A,C,B)},setMonth:function(A){A=parseInt(A,10);var F;var D=M.PAGEDATE.key;for(var B=0;B<this.pages.length;++B){var C=this.pages[B];var E=C.cfg.getProperty(D);if(B===0){F=E.getFullYear()}else{E.setFullYear(F)}this._setMonthOnDate(E,A+B);C.cfg.setProperty(D,E)}},setYear:function(C){var D=M.PAGEDATE.key;C=parseInt(C,10);for(var A=0;A<this.pages.length;++A){var B=this.pages[A];var E=B.cfg.getProperty(D);if((E.getMonth()+1)==1&&A>0){C+=1}B.setYear(C)}},render:function(){this.renderHeader();for(var A=0;A<this.pages.length;++A){var B=this.pages[A];B.render()}this.renderFooter()},select:function(C){for(var A=0;A<this.pages.length;++A){var B=this.pages[A];B.select(C)}return this.getSelectedDates()},selectCell:function(C){for(var A=0;A<this.pages.length;++A){var B=this.pages[A];B.selectCell(C)}return this.getSelectedDates()},deselect:function(C){for(var A=0;A<this.pages.length;++A){var B=this.pages[A];B.deselect(C)}return this.getSelectedDates()},deselectAll:function(){for(var A=0;A<this.pages.length;++A){var B=this.pages[A];B.deselectAll()}return this.getSelectedDates()},deselectCell:function(C){for(var A=0;A<this.pages.length;++A){var B=this.pages[A];B.deselectCell(C)}return this.getSelectedDates()},reset:function(){for(var A=0;A<this.pages.length;++A){var B=this.pages[A];B.reset()}},clear:function(){for(var A=0;A<this.pages.length;++A){var B=this.pages[A];B.clear()}this.cfg.setProperty(M.SELECTED.key,[]);this.cfg.setProperty(M.PAGEDATE.key,new Date(this.pages[0].today.getTime()));this.render()},nextMonth:function(){for(var A=0;A<this.pages.length;++A){var B=this.pages[A];B.nextMonth()}},previousMonth:function(){for(var A=this.pages.length-1;A>=0;--A){var B=this.pages[A];B.previousMonth()}},nextYear:function(){for(var A=0;A<this.pages.length;++A){var B=this.pages[A];B.nextYear()}},previousYear:function(){for(var A=0;A<this.pages.length;++A){var B=this.pages[A];B.previousYear()}},getSelectedDates:function(){var C=[];var D=this.cfg.getProperty(M.SELECTED.key);for(var A=0;A<D.length;++A){var B=D[A];var E=J.getDate(B[0],B[1]-1,B[2]);C.push(E)}C.sort(function(F,G){return F-G});return C},addRenderer:function(D,C){for(var A=0;A<this.pages.length;++A){var B=this.pages[A];B.addRenderer(D,C)}},addMonthRenderer:function(A,D){for(var B=0;B<this.pages.length;++B){var C=this.pages[B];C.addMonthRenderer(A,D)}},addWeekdayRenderer:function(C,D){for(var A=0;A<this.pages.length;++A){var B=this.pages[A];B.addWeekdayRenderer(C,D)}},removeRenderers:function(){this.callChildFunction("removeRenderers")},renderHeader:function(){},renderFooter:function(){},addMonths:function(A){this.callChildFunction("addMonths",A)},subtractMonths:function(A){this.callChildFunction("subtractMonths",A)},addYears:function(A){this.callChildFunction("addYears",A)},subtractYears:function(A){this.callChildFunction("subtractYears",A)},getCalendarPage:function(B){var G=null;if(B){var F=B.getFullYear(),C=B.getMonth();var D=this.pages;for(var A=0;A<D.length;++A){var E=D[A].cfg.getProperty("pagedate");if(E.getFullYear()===F&&E.getMonth()===C){G=D[A];break}}}return G},_setMonthOnDate:function(B,A){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420&&(A<0||A>11)){var C=J.add(B,J.MONTH,A-B.getMonth());B.setTime(C.getTime())}else{B.setMonth(A)}},_fixWidth:function(){var C=0;for(var A=0;A<this.pages.length;++A){var B=this.pages[A];C+=B.oDomContainer.offsetWidth}if(C>0){this.oDomContainer.style.width=C+"px"}},toString:function(){return"CalendarGroup "+this.id},destroy:function(){if(this.beforeDestroyEvent.fire()){var A=this;if(A.navigator){A.navigator.destroy()}if(A.cfg){A.cfg.destroy()}H.purgeElement(A.oDomContainer,true);L.removeClass(A.oDomContainer,N.CSS_CONTAINER);L.removeClass(A.oDomContainer,N.CSS_MULTI_UP);for(var B=0,C=A.pages.length;B<C;B++){A.pages[B].destroy();A.pages[B]=null}A.oDomContainer.innerHTML="";A.oDomContainer=null;this.destroyEvent.fire()}}};N.CSS_CONTAINER="yui-calcontainer";N.CSS_MULTI_UP="multi";N.CSS_2UPTITLE="title";N.CSS_2UPCLOSE="close-icon";YAHOO.lang.augmentProto(N,I,"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=N;YAHOO.widget.CalendarGroup=N;YAHOO.widget.Calendar2up=function(A,C,B){this.init(A,C,B)};YAHOO.extend(YAHOO.widget.Calendar2up,N);YAHOO.widget.Cal2up=YAHOO.widget.Calendar2up})();YAHOO.widget.CalendarNavigator=function(B){this.init(B)};(function(){var B=YAHOO.widget.CalendarNavigator;B.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"};B._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"};B.ID_SUFFIX="_nav";B.MONTH_SUFFIX="_month";B.YEAR_SUFFIX="_year";B.ERROR_SUFFIX="_error";B.CANCEL_SUFFIX="_cancel";B.SUBMIT_SUFFIX="_submit";B.YR_MAX_DIGITS=4;B.YR_MINOR_INC=1;B.YR_MAJOR_INC=10;B.UPDATE_DELAY=50;B.YR_PATTERN=/^\d+$/;B.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(D){var E=D.oDomContainer;this.cal=D;this.id=E.id+YAHOO.widget.CalendarNavigator.ID_SUFFIX;this._doc=E.ownerDocument;var F=YAHOO.env.ua.ie;this.__isIEQuirks=(F&&((F<=6)||(F===7&&this._doc.compatMode=="BackCompat")))},show:function(){var B=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,B.NAV_VISIBLE);this.cal.showNavEvent.fire()}},hide:function(){var B=YAHOO.widget.CalendarNavigator.CLASSES;if(this.cal.beforeHideNavEvent.fire()){this._show(this.navEl,false);this.hideMask();YAHOO.util.Dom.removeClass(this.cal.oDomContainer,B.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(B){if(B>=0&&B<12){this._month=B}this._updateMonthUI()},setYear:function(D){var C=YAHOO.widget.CalendarNavigator.YR_PATTERN;if(YAHOO.lang.isNumber(D)&&C.test(D+"")){this._year=D}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 H=YAHOO.widget.CalendarNavigator;var G=this._doc;var F=G.createElement("div");F.className=H.CLASSES.NAV;var E=this.renderNavContents([]);F.innerHTML=E.join("");this.cal.oDomContainer.appendChild(F);this.navEl=F;this.yearEl=G.getElementById(this.id+H.YEAR_SUFFIX);this.monthEl=G.getElementById(this.id+H.MONTH_SUFFIX);this.errorEl=G.getElementById(this.id+H.ERROR_SUFFIX);this.submitEl=G.getElementById(this.id+H.SUBMIT_SUFFIX);this.cancelEl=G.getElementById(this.id+H.CANCEL_SUFFIX);if(YAHOO.env.ua.gecko&&this.yearEl&&this.yearEl.type=="text"){this.yearEl.setAttribute("autocomplete","off")}this._setFirstLastElements()},createMask:function(){var D=YAHOO.widget.CalendarNavigator.CLASSES;var C=this._doc.createElement("div");C.className=D.MASK;this.cal.oDomContainer.appendChild(C);this.maskEl=C},_syncMask:function(){var D=this.cal.oDomContainer;if(D&&this.maskEl){var C=YAHOO.util.Dom.getRegion(D);YAHOO.util.Dom.setStyle(this.maskEl,"width",C.right-C.left+"px");YAHOO.util.Dom.setStyle(this.maskEl,"height",C.bottom-C.top+"px")}},renderNavContents:function(C){var G=YAHOO.widget.CalendarNavigator,F=G.CLASSES,H=C;H[H.length]='<div class="'+F.MONTH+'">';this.renderMonth(H);H[H.length]="</div>";H[H.length]='<div class="'+F.YEAR+'">';this.renderYear(H);H[H.length]="</div>";H[H.length]='<div class="'+F.BUTTONS+'">';this.renderButtons(H);H[H.length]="</div>";H[H.length]='<div class="'+F.ERROR+'" id="'+this.id+G.ERROR_SUFFIX+'"></div>';return H},renderMonth:function(O){var L=YAHOO.widget.CalendarNavigator,K=L.CLASSES;var J=this.id+L.MONTH_SUFFIX,M=this.__getCfg("monthFormat"),C=this.cal.cfg.getProperty((M==YAHOO.widget.Calendar.SHORT)?"MONTHS_SHORT":"MONTHS_LONG"),N=O;if(C&&C.length>0){N[N.length]='<label for="'+J+'">';N[N.length]=this.__getCfg("month",true);N[N.length]="</label>";N[N.length]='<select name="'+J+'" id="'+J+'" class="'+K.MONTH_CTRL+'">';for(var P=0;P<C.length;P++){N[N.length]='<option value="'+P+'">';N[N.length]=C[P];N[N.length]="</option>"}N[N.length]="</select>"}return N},renderYear:function(L){var J=YAHOO.widget.CalendarNavigator,I=J.CLASSES;var H=this.id+J.YEAR_SUFFIX,C=J.YR_MAX_DIGITS,K=L;K[K.length]='<label for="'+H+'">';K[K.length]=this.__getCfg("year",true);K[K.length]="</label>";K[K.length]='<input type="text" name="'+H+'" id="'+H+'" class="'+I.YEAR_CTRL+'" maxlength="'+C+'"/>';return K},renderButtons:function(C){var E=YAHOO.widget.CalendarNavigator.CLASSES;var F=C;F[F.length]='<span class="'+E.BUTTON+" "+E.DEFAULT+'">';F[F.length]='<button type="button" id="'+this.id+'_submit">';F[F.length]=this.__getCfg("submit",true);F[F.length]="</button>";F[F.length]="</span>";F[F.length]='<span class="'+E.BUTTON+'">';F[F.length]='<button type="button" id="'+this.id+'_cancel">';F[F.length]=this.__getCfg("cancel",true);F[F.length]="</button>";F[F.length]="</span>";return F},applyListeners:function(){var F=YAHOO.util.Event;function D(){if(this.validate()){this.setYear(this._getYearFromUI())}}function E(){this.setMonth(this._getMonthFromUI())}F.on(this.submitEl,"click",this.submit,this,true);F.on(this.cancelEl,"click",this.cancel,this,true);F.on(this.yearEl,"blur",D,this,true);F.on(this.monthEl,"change",E,this,true);if(this.__isIEQuirks){YAHOO.util.Event.on(this.cal.oDomContainer,"resize",this._syncMask,this,true)}this.applyKeyListeners()},purgeListeners:function(){var B=YAHOO.util.Event;B.removeListener(this.submitEl,"click",this.submit);B.removeListener(this.cancelEl,"click",this.cancel);B.removeListener(this.yearEl,"blur");B.removeListener(this.monthEl,"change");if(this.__isIEQuirks){B.removeListener(this.cal.oDomContainer,"resize",this._syncMask)}this.purgeKeyListeners()},applyKeyListeners:function(){var F=YAHOO.util.Event,E=YAHOO.env.ua;var G=(E.ie||E.webkit)?"keydown":"keypress";var H=(E.ie||E.opera||E.webkit)?"keydown":"keypress";F.on(this.yearEl,"keypress",this._handleEnterKey,this,true);F.on(this.yearEl,G,this._handleDirectionKeys,this,true);F.on(this.lastCtrl,H,this._handleTabKey,this,true);F.on(this.firstCtrl,H,this._handleShiftTabKey,this,true)},purgeKeyListeners:function(){var F=YAHOO.util.Event,E=YAHOO.env.ua;var G=(E.ie||E.webkit)?"keydown":"keypress";var H=(E.ie||E.opera||E.webkit)?"keydown":"keypress";F.removeListener(this.yearEl,"keypress",this._handleEnterKey);F.removeListener(this.yearEl,G,this._handleDirectionKeys);F.removeListener(this.lastCtrl,H,this._handleTabKey);F.removeListener(this.firstCtrl,H,this._handleShiftTabKey)},submit:function(){if(this.validate()){this.hide();this.setMonth(this._getMonthFromUI());this.setYear(this._getYearFromUI());var F=this.cal;var D=YAHOO.widget.CalendarNavigator.UPDATE_DELAY;if(D>0){var E=this;window.setTimeout(function(){E._update(F)},D)}else{this._update(F)}}},_update:function(B){B.setYear(this.getYear());B.setMonth(this.getMonth());B.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(B){if(this.errorEl){this.errorEl.innerHTML=B;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 E=this.submitEl,G=this.__getCfg("initialFocus");if(G&&G.toLowerCase){G=G.toLowerCase();if(G=="year"){E=this.yearEl;try{this.yearEl.select()}catch(H){}}else{if(G=="month"){E=this.monthEl}}}if(E&&YAHOO.lang.isFunction(E.focus)){try{E.focus()}catch(F){}}},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 D=this.navEl.parentNode;if(D){D.removeChild(this.navEl)}this.navEl=null;var C=this.maskEl.parentNode;if(C){C.removeChild(this.maskEl)}this.maskEl=null;this.__rendered=false}},destroy:function(){this.erase();this._doc=null;this.cal=null;this.id=null},_show:function(D,C){if(D){YAHOO.util.Dom.setStyle(D,"display",(C)?"block":"none")}},_getMonthFromUI:function(){if(this.monthEl){return this.monthEl.selectedIndex}else{return 0}},_getYearFromUI:function(){var F=YAHOO.widget.CalendarNavigator;var D=null;if(this.yearEl){var E=this.yearEl.value;E=E.replace(F.TRIM,"$1");if(F.YR_PATTERN.test(E)){D=parseInt(E,10)}}return D},_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(D){var C=YAHOO.util.KeyListener.KEY;if(YAHOO.util.Event.getCharCode(D)==C.ENTER){YAHOO.util.Event.preventDefault(D);this.submit()}},_handleDirectionKeys:function(I){var J=YAHOO.util.Event,E=YAHOO.util.KeyListener.KEY,L=YAHOO.widget.CalendarNavigator;var K=(this.yearEl.value)?parseInt(this.yearEl.value,10):null;if(isFinite(K)){var N=false;switch(J.getCharCode(I)){case E.UP:this.yearEl.value=K+L.YR_MINOR_INC;N=true;break;case E.DOWN:this.yearEl.value=Math.max(K-L.YR_MINOR_INC,0);N=true;break;case E.PAGE_UP:this.yearEl.value=K+L.YR_MAJOR_INC;N=true;break;case E.PAGE_DOWN:this.yearEl.value=Math.max(K-L.YR_MAJOR_INC,0);N=true;break;default:break}if(N){J.preventDefault(I);try{this.yearEl.select()}catch(M){}}}},_handleTabKey:function(F){var G=YAHOO.util.Event,E=YAHOO.util.KeyListener.KEY;if(G.getCharCode(F)==E.TAB&&!F.shiftKey){try{G.preventDefault(F);this.firstCtrl.focus()}catch(H){}}},_handleShiftTabKey:function(F){var G=YAHOO.util.Event,E=YAHOO.util.KeyListener.KEY;if(F.shiftKey&&G.getCharCode(F)==E.TAB){try{G.preventDefault(F);this.lastCtrl.focus()}catch(H){}}},__getCfg:function(F,H){var G=YAHOO.widget.CalendarNavigator._DEFAULT_CFG;var E=this.cal.cfg.getProperty("navigator");if(H){return(E!==true&&E.strings&&E.strings[F])?E.strings[F]:G.strings[F]}else{return(E!==true&&E[F])?E[F]:G[F]}},__isMac:(navigator.userAgent.toLowerCase().indexOf("macintosh")!=-1)};YAHOO.register("calendar",YAHOO.widget.Calendar,{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(A,C){if(A.className==C){return true}else{var B=A.className+XFORMS_SEPARATOR_1;if(B.indexOf(C+" ")==0){return true}if(B.indexOf(" "+C+" ")!=-1){return true}if(B.indexOf(" "+C+XFORMS_SEPARATOR_1)!=-1){return true}return false}},addClass:function(B,A){if(!this.hasClass(B,A)){B.className=B.className.length==0?A:(B.className+" "+A)}},setClasses:function(B,A){B.className=A},removeClass:function(D,C){if(this.hasClass(D,C)){var E=D.className.split(" ");var B="";for(var A=0;A<E.length;A++){if(E[A]!=C){if(B.length>0){B+=" "}B+=E[A]}}D.className=B}},getElementsByName:function(A,B,C){return A.getElementsByTagName(C==null?B:C+":"+B)}};ORBEON.util.MozDom={_regenerateClassName:function(C){var B="";for(var A in C.orbeonClasses){if(C.orbeonClasses[A]){if(B.length>0){B+=" "}B+=A}}C.className=B},_regenerateOrbeonClasses:function(C){C.orbeonClasses={};var A=C.className.split(" ");for(var B=0;B<A.length;B++){C.orbeonClasses[A[B]]=true}},hasClass:function(B,A){if(!B.orbeonClasses){this._regenerateOrbeonClasses(B)}return B.orbeonClasses[A]==true},addClass:function(B,A){if(!this.hasClass(B,A)){B.orbeonClasses[A]=true;this._regenerateClassName(B)}},setClasses:function(B,A){B.className=A;this._regenerateOrbeonClasses(B)},removeClass:function(B,A){if(this.hasClass(B,A)){B.orbeonClasses[A]=false;this._regenerateClassName(B)}},getElementsByName:function(A,B,C){return A.getElementsByTagName((ORBEON.xforms.Globals.isFF3&&C!=null?C+":":"")+B)}};ORBEON.util.Dom={ELEMENT_TYPE:1,isElement:function(A){return A.nodeType==this.ELEMENT_TYPE},getElementById:function(A){var B=ORBEON.xforms.Globals.idToElement[A];if(B==null||B.id!=A){B=ORBEON.util.Dom.getElementByIdNoCache(A);if(B!=null){ORBEON.xforms.Globals.idToElement[A]=B}}return B},getElementByIdNoCache:function(D){var B=document.getElementById(D);if(B&&(B.id!=D)&&document.all){B=null;var C=document.all[D];if(C){if(C.length){for(var A=0;A<C.length;A++){if(C[A].id==D){B=C[A];break}}}else{B=C}}}return B},getAttribute:function(A,B){if(ORBEON.xforms.Globals.isRenderingEngineTrident){return A.getAttribute(B)}else{if(A.hasAttribute(B)){if(ORBEON.xforms.Globals.isRenderingEngineWebCore){return ORBEON.util.String.replace(A.getAttribute(B),"&#38;","&")}else{return A.getAttribute(B)}}else{return null}}},setAttribute:function(G,H,D){if(H=="class"){ORBEON.util.Dom.setClasses(G,D)}else{if(H=="colspan"){G.colSpan=D}else{if(H=="rowspan"){G.rowSpan=D}else{if(H=="accesskey"){G.accessKey=D}else{if(H=="tabindex"){G.tabIndex=D}else{if(H=="type"){G.type=D}else{if(H=="name"&&G.tagName.toLowerCase()=="input"){G.setAttribute(H,D);if(YAHOO.lang.isObject(G.form)){var A=G.form[D];var E=false;if(A&&YAHOO.lang.isNumber(A.length)){for(var F=0;F<A.length;F++){if(A[F]==G){E=true}}}else{if(YAHOO.lang.isObject(A)){if(A==G){E=true}}}if(!E){var B=G.outerHTML;B=B.replace(new RegExp(" name=.*( |>)","g"),"$1");B=B.replace(new RegExp(">"),' name="'+D+'">');var C=document.createElement(B);G.parentNode.insertBefore(C,G);G.parentNode.removeChild(G)}}}else{G.setAttribute(H,D)}}}}}}}},getChildElementByIndex:function(D,B){for(var A=0;A<D.childNodes.length;A++){var C=D.childNodes[A];if(ORBEON.util.Dom.isElement(C)){if(B==0){return C}B--}}return null},getChildElementByClass:function(D,B){for(var A=0;A<D.childNodes.length;A++){var C=D.childNodes[A];if(ORBEON.util.Dom.isElement(C)&&ORBEON.util.Dom.hasClass(C,B)){return C}}return null},getChildElementsByClass:function(D,A){var B=[];for(var E=0;E<D.childNodes.length;E++){var C=D.childNodes[E];if(ORBEON.util.Dom.isElement(C)&&ORBEON.util.Dom.hasClass(C,A)){B[B.length]=C}}return B.length==0?null:B},nextSiblingElement:function(B){while(true){var A=B.nextSibling;if(A==null){return null}if(ORBEON.util.Dom.isElement(A)){return A}}},stringToDom:function(B){if(document.implementation.createDocument){return(new DOMParser()).parseFromString(B,"application/xml")}else{if(window.ActiveXObject){var A=new ActiveXObject("Microsoft.XMLDOM");A.async="false";A.loadXML(B);return A}}return null},clearUploadControl:function(B){var C=YAHOO.util.Dom.getElementsByClassName("xforms-upload-select",null,B)[0];var A=C.parentNode;var D=document.createElement("input");ORBEON.util.Dom.addClass(D,C.className);D.setAttribute("type",C.type);D.setAttribute("name",C.name);D.setAttribute("size",C.size);D.setAttribute("unselectable","on");A.replaceChild(D,C);if(ORBEON.xforms.Globals.isRenderingEngineTrident){ORBEON.xforms.Init.registerChangeListenerOnFormElement(D)}return null},getStringValue:function(D){if(D.innerText==null){var B="";for(var A=0;A<D.childNodes.length;A++){var C=D.childNodes[A];if(C.nodeType==TEXT_TYPE){B+=C.nodeValue}}return B}else{return D.innerText}},setStringValue:function(B,C){if(B.innerText==null){while(B.childNodes.length>0){B.removeChild(B.firstChild)}var A=B.ownerDocument.createTextNode(C);B.appendChild(A)}else{B.innerText=C}},nudgeAferDelay:function(A){if(YAHOO.env.ua.ie!=0&&YAHOO.env.ua.ie<=7){var B=A.getElementsByTagName("table");window.setTimeout(function(){A.className=A.className;for(var C=0;C<B.length;C++){var D=B[C];D.className=D.className}},ORBEON.util.Utils.getProperty(INTERNAL_SHORT_DELAY_PROPERTY))}},getElementByTagName:function(E,D){var F=null;if(YAHOO.lang.isArray(D)){var A=D;for(var B=0;B<A.length;B++){var D=A[B];var F=ORBEON.util.Dom.getElementByTagName(E,D);if(F!=null){break}}}else{if(E.tagName.toLowerCase()==D){F=E}else{var C=E.getElementsByTagName(D);if(C.length==1){F=C[0]}}}return F}};ORBEON.util.String={replace:function(C,A,B){return C.indexOf(A)==-1?C:C.replace(new RegExp(A,"g"),B)},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,A){var B=C.lastIndexOf(A);return B!=-1&&B+A.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(A,B){for(var F=0;F<B.length;F++){var D=B[F].re;var E=B[F].handler;var C=D.exec(A);if(C){return E(C)}}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(B,A){return ORBEON.util.DateTime.jsDateToISODate(B)+"T"+ORBEON.util.DateTime.jsDateToISOTime(A)},jsDateToformatDisplayTime:function(A){if(ORBEON.util.Utils.getProperty(FORMAT_INPUT_TIME_PROPERTY)=="[H]:[m]:[s]"){return A.getHours()+":"+ORBEON.util.DateTime._padAZero(A.getMinutes())+":"+ORBEON.util.DateTime._padAZero(A.getSeconds())}else{return(A.getHours()==12?12:A.getHours()%12)+":"+ORBEON.util.DateTime._padAZero(A.getMinutes())+":"+ORBEON.util.DateTime._padAZero(A.getSeconds())+(A.getHours()<12?" a.m.":" p.m.")}},jsDateToformatDisplayDate:function(A){if(ORBEON.util.Utils.getProperty(FORMAT_INPUT_DATE_PROPERTY)=="[D].[M].[Y]"){return A.getDate()+"."+(A.getMonth()+1)+"."+A.getFullYear()}else{if(ORBEON.util.Utils.getProperty(FORMAT_INPUT_DATE_PROPERTY)=="[D]/[M]/[Y]"){return A.getDate()+"/"+(A.getMonth()+1)+"/"+A.getFullYear()}else{return(A.getMonth()+1)+"/"+A.getDate()+"/"+A.getFullYear()}}},_timeParsePatterns:[{re:/^now$/i,handler:function(){return new Date()}},{re:/^(\d{1,2}):(\d{1,2}):(\d{1,2}) ?(p|pm|p\.m\.)$/,handler:function(A){var C=new Date();var B=parseInt(A[1],10);if(B<12){B+=12}C.setHours(B);C.setMinutes(parseInt(A[2],10));C.setSeconds(parseInt(A[3],10));return C}},{re:/^(\d{1,2}):(\d{1,2}) ?(p|pm|p\.m\.)$/,handler:function(A){var C=new Date();var B=parseInt(A[1],10);if(B<12){B+=12}C.setHours(B);C.setMinutes(parseInt(A[2],10));C.setSeconds(0);return C}},{re:/^(\d{1,2}) ?(p|pm|p\.m\.)$/,handler:function(A){var C=new Date();var B=parseInt(A[1],10);if(B<12){B+=12}C.setHours(B);C.setMinutes(0);C.setSeconds(0);return C}},{re:/^(\d{1,2}):(\d{1,2}):(\d{1,2}) ?(a|am|a\.m\.)?$/,handler:function(A){var C=new Date();var B=parseInt(A[1],10);if(!YAHOO.lang.isUndefined(A[4])&&A[4]!=""){B=B%12}C.setHours(B);C.setMinutes(parseInt(A[2],10));C.setSeconds(parseInt(A[3],10));return C}},{re:/^(\d{1,2}):(\d{1,2}) ?(a|am|a\.m\.)?$/,handler:function(A){var C=new Date();var B=parseInt(A[1],10);if(!YAHOO.lang.isUndefined(A[3])&&A[3]!=""){B=B%12}C.setHours(B);C.setMinutes(parseInt(A[2],10));C.setSeconds(0);return C}},{re:/^(\d{1,2}) ?(a|am|a\.m\.)?$/,handler:function(A){var C=new Date();var B=parseInt(A[1],10);if(!YAHOO.lang.isUndefined(A[2])&&A[2]!=""){B=B%12}C.setHours(B);C.setMinutes(0);C.setSeconds(0);return C}},{re:/^(\d{1,6})$/,handler:function(D){var C=new Date();var E=D[1].substring(0,2);var B=parseInt(D[1].substring(2,4),10);var A=parseInt(D[1].substring(4,6),10);if(isNaN(B)){B=0}if(isNaN(A)){A=0}C.setHours(parseInt(E,10));C.setMinutes(parseInt(B,10));C.setSeconds(parseInt(A,10));return C}}],_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(B){var A=new Date();A.setDate(parseInt(B[1],10));return A}},{re:/^(\d{1,2})(?:st|nd|rd|th)? (\w+)$/i,handler:function(A){return new Date(ORBEON.util.DateTime._currentYear,ORBEON.util.DateTime._parseMonth(A[2]),parseInt(A[1],10))}},{re:/^(\d{1,2})(?:st|nd|rd|th)? (\w+),? (\d{2,4})$/i,handler:function(A){return new Date(ORBEON.util.DateTime._parseYear(A[3]),ORBEON.util.DateTime._parseMonth(A[2]),parseInt(A[1],10))}},{re:/^(\w+) (\d{1,2})(?:st|nd|rd|th)?$/i,handler:function(A){return new Date(ORBEON.util.DateTime._currentYear,ORBEON.util.DateTime._parseMonth(A[1]),parseInt(A[2],10))}},{re:/^(\w+) (\d{1,2})(?:st|nd|rd|th)?,? (\d{2,4})$/i,handler:function(A){return new Date(ORBEON.util.DateTime._parseYear(A[3]),ORBEON.util.DateTime._parseMonth(A[1]),parseInt(A[2],10))}},{re:/^next (\w+)$/i,handler:function(D){var C=new Date();var A=C.getDay();var E=ORBEON.util.DateTime._parseWeekday(D[1]);var B=E-A;if(E<=A){B+=7}C.setDate(C.getDate()+B);return C}},{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(B){var A;if(ORBEON.util.Utils.getProperty(FORMAT_INPUT_DATE_PROPERTY)=="[D]/[M]/[Y]"){A=new Date(ORBEON.util.DateTime._parseYear(B[3]),parseInt(B[2],10)-1,parseInt(B[1],10))}else{A=new Date(ORBEON.util.DateTime._parseYear(B[3]),parseInt(B[1],10)-1,parseInt(B[2],10))}return A}},{re:/^(\d{1,2})\/(\d{1,2})$/,handler:function(B){var A;if(ORBEON.util.Utils.getProperty(FORMAT_INPUT_DATE_PROPERTY)=="[D]/[M]/[Y]"){A=new Date(ORBEON.util.DateTime._currentYear,parseInt(B[1],10)-1,parseInt(B[2],10))}else{A=new Date(ORBEON.util.DateTime._currentYear,parseInt(B[2],10)-1,parseInt(B[1],10))}return A}},{re:/^(\d{1,2})\.(\d{1,2})\.(\d{2,4})$/,handler:function(A){return new Date(ORBEON.util.DateTime._parseYear(A[3]),parseInt(A[2],10)-1,parseInt(A[1],10))}},{re:/(^\d{2,4})-(\d{1,2})-(\d{1,2})$/,handler:function(A){return new Date(ORBEON.util.DateTime._parseYear(A[1]),parseInt(A[2],10)-1,parseInt(A[3],10))}}],_padAZero:function(A){A=A.toString();if(A.length==1){return"0"+A}else{return A}},_monthNames:"January February March April May June July August September October November December".split(" "),_weekdayNames:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),_parseMonth:function(A){var B=ORBEON.util.DateTime._monthNames.filter(function(C){return new RegExp("^"+A,"i").test(C)});if(B.length==0){throw new Error("Invalid month string")}if(B.length>1){throw new Error("Ambiguous month")}return ORBEON.util.DateTime._monthNames.indexOf(B[0])},_parseWeekday:function(A){var B=ORBEON.util.DateTime._weekdayNames.filter(function(C){return new RegExp("^"+A,"i").test(C)});if(B.length==0){throw new Error("Invalid day string")}if(B.length>1){throw new Error("Ambiguous weekday")}return ORBEON.util.DateTime._weekdayNames.indexOf(B[0])},_currentYear:new Date().getFullYear(),_parseYear:function(A){A=parseInt(A,10);if(A<100){var B=1900+A;var C=2000+A;A=Math.abs(B-ORBEON.util.DateTime._currentYear)<Math.abs(C-ORBEON.util.DateTime._currentYear)?B:C}return A}};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(D,A){var B=0;var C=D.indexOf(A);while(C!=-1){B++;C=D.indexOf(A,C+1)}return B},appendToEffectiveId:function(C,B){var A=ORBEON.util.Utils.getEffectiveIdNoSuffix(C);return A+B+ORBEON.util.Utils.getEffectiveIdSuffixWithSeparator(C)},getEffectiveIdNoSuffix:function(A){if(A==null){return null}var B=A.indexOf(XFORMS_SEPARATOR_1);if(B!=-1){return A.substring(0,B)}else{return A}},getEffectiveIdSuffixWithSeparator:function(A){if(A==null){return null}var B=A.indexOf(XFORMS_SEPARATOR_1);if(B!=-1){return A.substring(B)}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(E,F,H){var D=F;for(var C=0;C<H;C++){D+=XFORMS_SEPARATOR_2+"1"}if(E.id){E.id=ORBEON.util.Utils.appendRepeatSuffix(E.id,D);ORBEON.xforms.Globals.idToElement[E.id]=E}if(E.htmlFor){E.htmlFor=ORBEON.util.Utils.appendRepeatSuffix(E.htmlFor,D)}if(E.name){var B=ORBEON.util.Utils.appendRepeatSuffix(E.name,D);if(E.tagName.toLowerCase()=="input"&&E.type.toLowerCase()=="radio"&&ORBEON.xforms.Globals.isRenderingEngineTrident){var A=document.createElement("<"+E.tagName+" name='"+B+"'>");for(var J=0;J<E.attributes.length;J++){var I=E.attributes[J];if(I.nodeName.toLowerCase()!="name"&&I.nodeName.toLowerCase()!="height"&&I.nodeValue){A.setAttribute(I.nodeName,I.nodeValue)}}YAHOO.util.Event.addListener(A,"focus",ORBEON.xforms.Events.focus);YAHOO.util.Event.addListener(A,"blur",ORBEON.xforms.Events.blur);YAHOO.util.Event.addListener(A,"change",ORBEON.xforms.Events.change);E.replaceNode(A)}else{E.name=B}}for(var G=0;G<E.childNodes.length;G++){var K=E.childNodes[G];if(K.nodeType==ELEMENT_TYPE){if(K.id&&K.id.indexOf("repeat-end-")==0){H--}ORBEON.util.Utils.addSuffixToIds(K,F,H);if(K.id&&K.id.indexOf("repeat-begin-")==0){H++}}}},getClassForRepeatId:function(A){var C=1;var B=A;while(true){B=ORBEON.xforms.Globals.repeatTreeChildToParent[B];if(B==null){break}C=(C==4)?1:C+1}return"xforms-repeat-selected-item-"+C},stringReplace:function(E,D,A){function B(H,F,I){switch(H.nodeType){case ELEMENT_TYPE:for(var J=0;J<H.attributes.length;J++){var G=new String(H.attributes[J].value).replace(F,I);if(G!=H.attributes[J].value){ORBEON.util.Dom.setAttribute(H,H.attributes[J].name,G)}}for(var J=0;J<H.childNodes.length;J++){B(H.childNodes[J],F,I)}break;case TEXT_TYPE:var G=new String(H.nodeValue).replace(F,I);if(G!=H.nodeValue){H.nodeValue=G}break}}D=D.replace(new RegExp("\\$","g"),"\\$");A=A.replace(new RegExp("\\$","g"),"$$$$");var C=new RegExp(D,"g");B(E,C,A)},appendRepeatSuffix:function(A,B){if(B==""){return A}if(B.charAt(0)==XFORMS_SEPARATOR_2){B=B.substring(1)}A+=A.indexOf(XFORMS_SEPARATOR_1)==-1?XFORMS_SEPARATOR_1:XFORMS_SEPARATOR_2;A+=B;return A},findRepeatDelimiter:function(A,E){var J="";var D=A;while(true){var C=ORBEON.xforms.Globals.repeatTreeChildToParent[D];if(C==null){break}var F=ORBEON.xforms.Globals.repeatTreeChildToParent[C];J=(F==null?XFORMS_SEPARATOR_1:XFORMS_SEPARATOR_2)+ORBEON.xforms.Globals.repeatIndexes[C]+J;D=C}var I="repeat-begin-"+A+J;var G=ORBEON.util.Dom.getElementById(I);if(!G){return null}var B=G;var H=0;while(true){while(B.nodeType!=ELEMENT_TYPE||!ORBEON.util.Dom.hasClass(B,"xforms-repeat-delimiter")){B=B.nextSibling;if(!B){return null}}H++;if(H==E){break}B=B.nextSibling}return B}};ORBEON.util.Test={executeWithInitialInstance:function(B,A){ORBEON.testing.executeCausingAjaxRequest(B,function(){ORBEON.xforms.Document.dispatchEvent("main-model","restore-instance")},function(){A.call(B)})},executeCausingAjaxRequest:function(B,A,C){function D(){if(ORBEON.xforms.Globals.requestInProgress||ORBEON.xforms.Globals.eventQueue.length>0){setTimeout(D,100)}else{B.resume(function(){C.call(B)})}}A.call(B);setTimeout(D,100);B.wait(20000)},startFirebugLite:function(){if(!window.firebug){var A=document.createElement("script");A.setAttribute("src","http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js");document.body.appendChild(A);(function(){if(window.firebug){firebug.init()}else{setTimeout(arguments.callee)}})()}}};ORBEON.xforms.Document={dispatchEvent:function(A,D,I,E,H,C,F){if(I==null){for(var B=0;B<document.forms.length;B++){var G=document.forms[B];if(ORBEON.util.Dom.hasClass(G,"xforms-form")){I=G;break}}}var J=new ORBEON.xforms.Server.Event(I,A,null,null,D,E,H,F);ORBEON.xforms.Server.fireEvents([J],C==undefined?false:C)},getValue:function(B){var A=ORBEON.util.Dom.getElementById(B);return ORBEON.xforms.Controls.getCurrentValue(A)},setValue:function(E,C){var B=""+C;var D=ORBEON.util.Dom.getElementById(E);if(D==null){throw"ORBEON.xforms.Document.setValue: can't find control id '"+E+"'"}ORBEON.xforms.Controls.setCurrentValue(D,B);var A=new ORBEON.xforms.Server.Event(null,D.id,null,B,"xxforms-value-change-with-focus-change");ORBEON.xforms.Server.fireEvents([A],false)},isReloading:function(){return ORBEON.xforms.Globals.isReloading},getRepeatIndex:function(A){return ORBEON.xforms.Globals.repeatIndexes[A]},setOfflineEncryptionPassword:function(B){ORBEON.xforms.Offline.init();B=encode_utf8(B);if(B.length==1){B+=B}md5_init();for(var A=0;B<B.length;A+=2){md5_update(B.charCodeAt(A))}md5_finish();var E=byteArrayToHex(digestBits);md5_init();for(A=1;A<B.length;A+=2){md5_update(B.charCodeAt(A))}md5_finish();var D=byteArrayToHex(digestBits);B=E+D;B=B.substring(32);var F=ORBEON.xforms.Offline.gearsDatabase.execute("select * from Current_Password");if(F.isValidRow()){var C=F.fieldByName("encrypted_password");if(C!=B){throw"Invalid password"}}else{ORBEON.xforms.Offline.gearsDatabase.execute("insert into Current_Password (encrypted_password) values (?)",[B])}document.cookie="orbeon.forms.encryption.password="+B+"; path=/; secure";ORBEON.xforms.Offline.encryptionKey=null},changeOfflineEncryptionPassword:function(C,D){ORBEON.xforms.Offline.init();ORBEON.xforms.Document.setOfflineEncryptionPassword(C);var G=ORBEON.xforms.Offline.getEncryptionKey();ORBEON.xforms.Offline.gearsDatabase.execute("delete from Current_Password");ORBEON.xforms.Document.setOfflineEncryptionPassword(D);var E=ORBEON.xforms.Offline.getEncryptionKey();var A=ORBEON.xforms.Offline.gearsDatabase.execute("select url, event_response, offline_events from Offline_Forms");while(A.isValidRow()){var B=A.fieldByName("url");var H=A.fieldByName("event_response");var F=A.fieldByName("offline_events");H=ORBEON.xforms.Offline._decrypt(H,G);H=ORBEON.xforms.Offline._encrypt(H,E);F=ORBEON.xforms.Offline._decrypt(F,G);F=ORBEON.xforms.Offline._encrypt(F,E);ORBEON.xforms.Offline.gearsDatabase.execute("update Offline_Forms set event_response = ?, offline_events = ? where url= ?",[H,F,B]).close();A.next()}A.close()},isOfflineAvailable:function(){ORBEON.xforms.Offline.init();return ORBEON.xforms.Offline.hasGears},isFormOffline:function(A){ORBEON.xforms.Offline.init();var C=ORBEON.xforms.Offline.gearsDatabase.execute("select * from Offline_Forms where url = ?",[A]);var B=C.isValidRow();C.close();return B},getOfflineControlValues:function(B){var A=ORBEON.xforms.Offline.gearsDatabase.execute("select control_values from Offline_Forms where url = ?",[B]);if(!A.isValidRow()){return null}var C=A.fieldByName("control_values");C=ORBEON.xforms.Offline._deserializerControlValues(C);return C},takeOfflineFromSummary:function(C,D){ORBEON.xforms.Offline.init();var A=false;var B=window.setInterval(function(){if(A){window.clearInterval(B);ORBEON.xforms.Offline.loadFormInIframe(C,function(E){var F=window.setInterval(function(){if(!E.contentWindow.ORBEON.xforms.Offline.isOnline){window.clearInterval(F);if(D){D(E.contentWindow)}}},100);E.contentWindow.ORBEON.xforms.Document.dispatchEvent("$containing-document$","xxforms-offline")})}},100);ORBEON.xforms.Offline.formStore.capture(C,function(F,E,G){A=true})},takeOnlineFromSummary:function(A,C,B){ORBEON.xforms.Offline.init();ORBEON.xforms.Offline.loadFormInIframe(A,function(D){if(B){D.contentWindow.ORBEON.xforms.Events.ajaxResponseProcessedEvent.subscribe(function(){B(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(A){if(typeof A.form=="undefined"){var B=A;while(B.tagName.toLowerCase()!="form"){B=B.parentNode}return B}else{return A.form}},getCurrentValue:function(U){if(ORBEON.util.Dom.hasClass(U,"xforms-type-time")){var V=YAHOO.util.Dom.getElementsByClassName("xforms-input-input",null,U)[0].value;var I=ORBEON.util.DateTime.magicTimeToJSDate(V);return I==null?V:ORBEON.util.DateTime.jsDateToISOTime(I)}else{if(ORBEON.util.Dom.hasClass(U,"xforms-type-date")){var AC;if(ORBEON.util.Dom.hasClass(U,"xforms-input-appearance-minimal")){var R=YAHOO.util.Dom.getElementsByClassName("xforms-input-appearance-minimal","img",U)[0];AC=ORBEON.util.Dom.getAttribute(R,"alt")}else{AC=YAHOO.util.Dom.getElementsByClassName("xforms-input-input",null,U)[0].value}var X=ORBEON.util.DateTime.magicDateToJSDate(AC);return X==null?AC:ORBEON.util.DateTime.jsDateToISODate(X)}else{if(ORBEON.util.Dom.hasClass(U,"xforms-type-dateTime")){var C=YAHOO.util.Dom.getElementsByClassName("xforms-type-date",null,U)[0].value;var AB=ORBEON.util.DateTime.magicDateToJSDate(C);var T=YAHOO.util.Dom.getElementsByClassName("xforms-type-time",null,U)[0].value;var P=ORBEON.util.DateTime.magicTimeToJSDate(T);if(AB==null||P==null){return C==""&&T==""?"":C+"T"+T}else{return ORBEON.util.DateTime.jsDateToISODateTime(AB,P)}}else{if((ORBEON.util.Dom.hasClass(U,"xforms-input")&&!ORBEON.util.Dom.hasClass(U,"xforms-type-boolean")&&!ORBEON.util.Dom.hasClass(U,"xforms-static"))||ORBEON.util.Dom.hasClass(U,"xforms-secret")){var Q=U.tagName.toLowerCase()=="input"?U:U.getElementsByTagName("input")[0];return Q.value}else{if(ORBEON.util.Dom.hasClass(U,"xforms-select1-open")){return YAHOO.util.Dom.getElementsByClassName("xforms-select1-open-input",null,U)[0].value}else{if(ORBEON.util.Dom.hasClass(U,"xforms-select-appearance-full")||ORBEON.util.Dom.hasClass(U,"xforms-select1-appearance-full")||(ORBEON.util.Dom.hasClass(U,"xforms-input")&&ORBEON.util.Dom.hasClass(U,"xforms-type-boolean"))){var Z=U.getElementsByTagName("input");var O="";for(var K=0;K<Z.length;K++){var Q=Z[K];if(Q.checked){if(O!=""){O+=" "}O+=Q.value}}if(O==""&&ORBEON.util.Dom.hasClass(U,"xforms-type-boolean")){O="false"}return O}else{if(ORBEON.util.Dom.hasClass(U,"xforms-select-appearance-compact")||ORBEON.util.Dom.hasClass(U,"xforms-select1-appearance-minimal")||ORBEON.util.Dom.hasClass(U,"xforms-select1-appearance-compact")||ORBEON.util.Dom.hasClass(U,"xforms-input-appearance-minimal")||ORBEON.util.Dom.hasClass(U,"xforms-input-appearance-compact")){var Y=ORBEON.util.Utils.isNewXHTMLLayout()?U.getElementsByTagName("select")[0].options:U.options;var M="";for(var W=0;W<Y.length;W++){var N=Y[W];if(N.selected){if(M!=""){M+=" "}M+=N.value}}return M}else{if(ORBEON.util.Dom.hasClass(U,"xforms-textarea")&&!ORBEON.util.Dom.hasClass(U,"xforms-mediatype-text-html")){var L=U.tagName.toLowerCase()=="textarea"?U:U.getElementsByTagName("textarea")[0];return L.value}else{if(ORBEON.util.Dom.hasClass(U,"xforms-textarea")&&ORBEON.util.Dom.hasClass(U,"xforms-mediatype-text-html")){if(ORBEON.util.Utils.getProperty(HTML_EDITOR_PROPERTY)=="yui"){return ORBEON.widgets.RTE.getValue(U)}else{var D=FCKeditorAPI.GetInstance(U.name);return D.GetXHTML()}}else{if(ORBEON.util.Dom.hasClass(U,"xforms-output")||(ORBEON.util.Dom.hasClass(U,"xforms-input")&&ORBEON.util.Dom.hasClass(U,"xforms-static"))){if(ORBEON.util.Dom.hasClass(U,"xforms-mediatype-image")){var J=ORBEON.util.Dom.getChildElementByIndex(U,0);return J.src}else{if(ORBEON.util.Dom.hasClass(U,"xforms-mediatype-text-html")){return U.innerHTML}else{var E=ORBEON.util.Utils.isNewXHTMLLayout()?U.getElementsByTagName("span")[0]:U;return ORBEON.util.Dom.getStringValue(E)}}}else{if(ORBEON.util.Dom.hasClass(U,"xforms-select-appearance-xxforms-tree")||ORBEON.util.Dom.hasClass(U,"xforms-select1-appearance-xxforms-tree")){var H=ORBEON.util.Dom.hasClass(U,"xforms-select1-appearance-xxforms-tree");var AA=ORBEON.xforms.Globals.treeYui[U.id];var S="";for(var F in AA._nodes){var G=AA._nodes[F];if(H){if(YAHOO.util.Dom.hasClass(G.getLabelEl(),"xforms-tree-label-selected")){return G.data.value}}else{if(G.checked){if(S!=""){S+=" "}S+=G.data.value}}}return S}else{if(ORBEON.util.Dom.hasClass(U,"xforms-range")){return ORBEON.xforms.Globals.sliderYui[U.id].previousVal/200}}}}}}}}}}}}},setCurrentValue:function(AS,AG,AX,AZ,Aa,Ab){var AI=ORBEON.util.Dom.hasClass(AS,"xforms-static");if(ORBEON.util.Dom.hasClass(AS,"xforms-output-appearance-xxforms-download")){var Al=ORBEON.util.Dom.getElementsByName(AS,"a")[0];if(AG==""){Al.setAttribute("href","#");YAHOO.util.Dom.addClass(Al,"xforms-readonly")}else{Al.setAttribute("href",AG);YAHOO.util.Dom.removeClass(Al,"xforms-readonly")}}else{if(ORBEON.util.Dom.hasClass(AS,"xforms-output")||AI){if(ORBEON.util.Dom.hasClass(AS,"xforms-mediatype-image")){var An=ORBEON.util.Utils.isNewXHTMLLayout()?YAHOO.util.Dom.getElementsByClassName("xforms-output-output",null,AS)[0]:ORBEON.util.Dom.getChildElementByIndex(AS,0);An.src=AG}else{var AQ=ORBEON.util.Utils.isNewXHTMLLayout()?YAHOO.util.Dom.getElementsByClassName("xforms-output-output",null,AS)[0]:AS;if(ORBEON.util.Dom.hasClass(AS,"xforms-mediatype-text-html")){AQ.innerHTML=AG}else{ORBEON.util.Dom.setStringValue(AQ,AG)}}}else{if(ORBEON.xforms.Globals.changedIdsRequest[AS.id]!=null){}else{if(ORBEON.util.Dom.hasClass(AS,"xforms-trigger")||ORBEON.util.Dom.hasClass(AS,"xforms-submit")){}else{if(ORBEON.util.Dom.hasClass(AS,"xforms-select1-open")){if(AS.value!=AG){AS.value=AG;AS.getElementsByTagName("input")[0].value=AG;AS.previousValue=AG}}else{if(ORBEON.util.Dom.hasClass(AS,"xforms-type-time")){var AM=AS.getElementsByTagName("input")[0];var W=ORBEON.util.DateTime.magicTimeToJSDate(AG);AM.value=W==null?AG:ORBEON.util.DateTime.jsDateToformatDisplayTime(W)}else{if(ORBEON.util.Dom.hasClass(AS,"xforms-type-date")){var W=ORBEON.util.DateTime.magicDateToJSDate(AG);var Ai=W==null?AG:ORBEON.util.DateTime.jsDateToformatDisplayDate(W);if(ORBEON.util.Dom.hasClass(AS,"xforms-input-appearance-minimal")){var AR=AS.getElementsByTagName("img")[0];ORBEON.util.Dom.setAttribute(AR,"alt",Ai)}else{var AM=AS.getElementsByTagName("input")[0];AM.value=Ai}}else{if((ORBEON.util.Dom.hasClass(AS,"xforms-input")&&!ORBEON.util.Dom.hasClass(AS,"xforms-type-boolean"))||ORBEON.util.Dom.hasClass(AS,"xforms-secret")){var Ao=AS.tagName.toLowerCase()=="input"?AS:AS.getElementsByTagName("input")[0];if(AS.value!=AG){AS.previousValue=AG;AS.valueSetByXForms++;AS.value=AG}if(Ao.value!=AG){Ao.value=AG}if(AX!=null){if(AX==""){Ao.removeAttribute("size")}else{Ao.size=AX}}if(AZ!=null){if(AZ==""){Ao.removeAttribute("maxlength")}else{Ao.maxLength=AZ}}if(Aa!=null){if(AZ==""){Ao.removeAttribute("autocomplete")}else{Ao.autocomplete=Aa}}}else{if(ORBEON.util.Dom.hasClass(AS,"xforms-select-appearance-full")||ORBEON.util.Dom.hasClass(AS,"xforms-select1-appearance-full")||(ORBEON.util.Dom.hasClass(AS,"xforms-input")&&ORBEON.util.Dom.hasClass(AS,"xforms-type-boolean"))){var AN=ORBEON.util.Dom.hasClass(AS,"xforms-select-appearance-full")?AG.split(" "):new Array(AG);var AH=AS.getElementsByTagName("input");for(var Ah=0;Ah<AH.length;Ah++){var Ac=AH[Ah];Ac.checked=xformsArrayContains(AN,Ac.value)}ORBEON.xforms.Controls._setRadioCheckboxClasses(AS)}else{if(ORBEON.util.Dom.hasClass(AS,"xforms-select-appearance-compact")||ORBEON.util.Dom.hasClass(AS,"xforms-select1-appearance-compact")||ORBEON.util.Dom.hasClass(AS,"xforms-select1-appearance-minimal")||ORBEON.util.Dom.hasClass(AS,"xforms-input-appearance-compact")||ORBEON.util.Dom.hasClass(AS,"xforms-input-appearance-minimal")){var AN=ORBEON.util.Dom.hasClass(AS,"xforms-select-appearance-compact")?AG.split(" "):new Array(AG);var AC=ORBEON.util.Utils.isNewXHTMLLayout()?AS.getElementsByTagName("select")[0]:AS;var AT=AC.options;if(AT!=null){for(var AE=0;AE<AT.length;AE++){var AF=AT[AE];try{AF.selected=xformsArrayContains(AN,AF.value)}catch(AA){}}}}else{if(ORBEON.util.Dom.hasClass(AS,"xforms-type-dateTime")){if(ORBEON.xforms.Controls.getCurrentValue(AS)!=AG){var Y=AG.indexOf("T");var AV=AG.substring(0,Y);var e=ORBEON.util.DateTime.magicDateToJSDate(AV);var AJ=AS.getElementsByTagName("input")[0];AJ.value=e==null?AV:ORBEON.util.DateTime.jsDateToformatDisplayDate(e);var Z=AG.substring(Y+1);var AY=ORBEON.util.DateTime.magicTimeToJSDate(Z);var AL=AS.getElementsByTagName("input")[1];AL.value=AY==null?Z:ORBEON.util.DateTime.jsDateToformatDisplayTime(AY)}}else{if(ORBEON.util.Dom.hasClass(AS,"xforms-textarea")&&!ORBEON.util.Dom.hasClass(AS,"xforms-mediatype-text-html")){var Ak=AS.tagName.toLowerCase()=="textarea"?AS:AS.getElementsByTagName("textarea")[0];Ak.value=AG;if(AZ!=null){if(AZ==""){Ak.removeAttribute("cols")}else{Ak.cols=AZ}}if(Aa!=null){if(AZ==""){Ak.removeAttribute("rows")}else{Ak.rows=Aa}}if(ORBEON.util.Dom.hasClass(AS,"xforms-textarea-appearance-xxforms-autosize")){ORBEON.xforms.Controls.autosizeTextarea(AS)}}else{if(ORBEON.util.Dom.hasClass(AS,"xforms-textarea")&&ORBEON.util.Dom.hasClass(AS,"xforms-mediatype-text-html")){if(ORBEON.util.Utils.getProperty(HTML_EDITOR_PROPERTY)=="yui"){ORBEON.widgets.RTE.setValue(AS,AG)}else{var Ae=FCKeditorAPI.GetInstance(AS.name);Ae.EditorDocument.body.innerHTML=AG;AS.value=AG;AS.previousValue=AG}}else{if(ORBEON.util.Dom.hasClass(AS,"xforms-select-appearance-xxforms-tree")){var X=AG.split(" ");var Aj=ORBEON.xforms.Globals.treeYui[AS.id];for(var Ad in Aj._nodes){var AK=Aj._nodes[Ad];if(AK.children.length==0){var AO=xformsArrayContains(X,AK.data.value);if(AO){AK.check()}else{AK.uncheck()}}}}else{if(ORBEON.util.Dom.hasClass(AS,"xforms-select1-appearance-xxforms-tree")){var Aj=ORBEON.xforms.Globals.treeYui[AS.id];ORBEON.xforms.Controls.treeOpenSelectedVisible(Aj,[AG]);var Ag=ORBEON.xforms.Controls.getCurrentValue(AS);var Am=Aj.getNodeByProperty("value",Ag);var Af=Aj.getNodeByProperty("value",AG);if(Am!=null){YAHOO.util.Dom.removeClass(Am.getLabelEl(),"xforms-tree-label-selected")}if(Af!=null){YAHOO.util.Dom.addClass(Af.getLabelEl(),"xforms-tree-label-selected")}}else{if(ORBEON.util.Dom.hasClass(AS,"xforms-upload")){var AD=YAHOO.util.Dom.getElementsByClassName("xforms-upload-info",null,AS)[0];var AP=YAHOO.util.Dom.getElementsByClassName("xforms-upload-filename",null,AS)[0];var AW=YAHOO.util.Dom.getElementsByClassName("xforms-upload-mediatype",null,AS)[0];var AB=YAHOO.util.Dom.getElementsByClassName("xforms-upload-size",null,AS)[0];if(AX=="empty"){ORBEON.util.Dom.removeClass(AS,"xforms-upload-state-file");ORBEON.util.Dom.addClass(AS,"xforms-upload-state-empty")}if(AX=="file"){ORBEON.util.Dom.removeClass(AS,"xforms-upload-state-empty");ORBEON.util.Dom.addClass(AS,"xforms-upload-state-file");ORBEON.util.Dom.clearUploadControl(AS)}if(AZ!=null){ORBEON.util.Dom.setStringValue(AP,AZ)}if(Aa!=null){ORBEON.util.Dom.setStringValue(AW,Aa)}if(Ab!=null){var AU=Ab>1024*1024?Math.round(Ab/(1024*1024)*10)/10+" MB":Ab>1024?Math.round(Ab/1024*10)/10+" KB":Ab+" B";ORBEON.util.Dom.setStringValue(AB,AU)}}else{if(typeof (AS.value)=="string"){AS.value=AG;AS.previousValue=AG}}}}}}}}}}}}}}}}}},_setRadioCheckboxClasses:function(E){var A=E.getElementsByTagName("input");for(var D=0;D<A.length;D++){var B=A[D];var C=B.parentNode.parentNode;if(B.checked){ORBEON.util.Dom.addClass(C,"xforms-selected");ORBEON.util.Dom.removeClass(C,"xforms-deselected")}else{ORBEON.util.Dom.addClass(C,"xforms-deselected");ORBEON.util.Dom.removeClass(C,"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(A,C){if(ORBEON.util.Utils.isNewXHTMLLayout()){var B=YAHOO.util.Dom.getElementsByClassName("xforms-"+C,null,A);if(B.length>0){return B[0]}}var D=ORBEON.util.Utils.appendToEffectiveId(A.id,ORBEON.xforms.Controls._classNameToId[C]);return YAHOO.util.Dom.get(D)},getControlForLHHA:function(B,C){var A=ORBEON.xforms.Controls._classNameToId[C];return B.id.indexOf(A)!=-1?YAHOO.util.Dom.get(B.id.replace(new RegExp(ORBEON.xforms.Controls._classNameToRegexp[C],"g"),"")):B.parentNode},_setMessage:function(C,A,E){var D=ORBEON.xforms.Controls._getControlLHHA(C,A);if(D!=null){D.innerHTML=E;var B=ORBEON.xforms.Controls._getControlLHHA(C,"help-image");if(E==""){ORBEON.util.Dom.addClass(D,"xforms-disabled-subsequent");if(A=="xforms-help"){ORBEON.util.Dom.addClass(B,"xforms-disabled-subsequent")}}else{if(ORBEON.xforms.Controls.isRelevant(C)){ORBEON.util.Dom.removeClass(D,"xforms-disabled");ORBEON.util.Dom.removeClass(D,"xforms-disabled-subsequent");if(A=="xforms-help"){ORBEON.util.Dom.removeClass(B,"xforms-disabled");ORBEON.util.Dom.removeClass(B,"xforms-disabled-subsequent")}}}}},getLabelMessage:function(C){if(ORBEON.util.Dom.hasClass(C,"xforms-trigger")||ORBEON.util.Dom.hasClass(C,"xforms-submit")){if(C.tagName.toLowerCase()=="input"){return C.alt}else{return C.innerHTML}}else{if(ORBEON.util.Dom.hasClass(C,"xforms-dialog")){var D=ORBEON.util.Dom.getChildElementByIndex(C,0);return D.innerHTML}else{if(ORBEON.util.Dom.hasClass(C,"xforms-group-appearance-xxforms-fieldset")){var A=ORBEON.util.Dom.getChildElementByIndex(C,0);if(A!=null){return A.innerHTML}}else{var B=ORBEON.xforms.Controls._getControlLHHA(C,"label");return B.innerHTML}}}},setLabelMessage:function(C,F){if(ORBEON.util.Dom.hasClass(C,"xforms-trigger")||ORBEON.util.Dom.hasClass(C,"xforms-submit")){var E=ORBEON.util.Utils.isNewXHTMLLayout()?YAHOO.util.Dom.getFirstChild(C):C;if(E.tagName.toLowerCase()=="input"){E.alt=F}else{E.innerHTML=F}}else{if(ORBEON.util.Dom.hasClass(C,"xforms-dialog")){var D=ORBEON.util.Dom.getChildElementByIndex(C,0);D.innerHTML=F}else{if(ORBEON.util.Dom.hasClass(C,"xforms-group-appearance-xxforms-fieldset")){var A=ORBEON.util.Dom.getChildElementByIndex(C,0);if(A!=null){A.innerHTML=F}}else{if(ORBEON.util.Dom.hasClass(C,"xforms-output-appearance-xxforms-download")){var B=YAHOO.util.Dom.getChildren(C)[0];B.innerHTML=F}else{ORBEON.xforms.Controls._setMessage(C,"label",F)}}}}},getHelpMessage:function(A){var B=ORBEON.xforms.Controls._getControlLHHA(A,"help");return B==null?"":ORBEON.util.Dom.getStringValue(B)},setHelpMessage:function(C,A){A=ORBEON.util.String.escapeHTMLMinimal(A);ORBEON.xforms.Controls._setMessage(C,"help",A);ORBEON.xforms.Controls._setTooltipMessage(C,A,ORBEON.xforms.Globals.helpTooltipForControl);var B=ORBEON.xforms.Controls._getControlLHHA(C,"help-image");ORBEON.util.Dom.removeClass(B,"xforms-disabled")},setValid:function(D,F){var E;var B=ORBEON.util.Dom.hasClass(D,"xforms-visited");if(F!=null){E=F!="false";if(E){ORBEON.util.Dom.removeClass(D,"xforms-invalid");ORBEON.util.Dom.removeClass(D,"xforms-invalid-visited")}else{ORBEON.util.Dom.addClass(D,"xforms-invalid");if(B){ORBEON.util.Dom.addClass(D,"xforms-invalid-visited")}}}else{E=ORBEON.xforms.Controls.isValid(D)}var A=ORBEON.xforms.Controls._getControlLHHA(D,"alert");if(A!=null){if(E){ORBEON.util.Dom.removeClass(A,"xforms-alert-active");ORBEON.util.Dom.removeClass(A,"xforms-alert-active-visited");ORBEON.util.Dom.addClass(A,"xforms-alert-inactive")}else{ORBEON.util.Dom.removeClass(A,"xforms-alert-inactive");ORBEON.util.Dom.addClass(A,"xforms-alert-active");if(B){ORBEON.util.Dom.addClass(A,"xforms-alert-active-visited")}}}var C=ORBEON.xforms.Globals.alertTooltipForControl[D.id];if(F&&C!=null){if(C!=true){C.destroy()}ORBEON.xforms.Globals.alertTooltipForControl[D.id]=null}},setRelevant:function(D,G){if(ORBEON.util.Dom.hasClass(D,"xforms-group-begin-end")){var A=false;if(G){var E=0;var B=D;while(true){B=YAHOO.util.Dom.getPreviousSibling(B);if(B==null){break}if(YAHOO.util.Dom.hasClass(B,"xforms-group-begin-end")){if(B.id.indexOf("group-end")==0){E++}if(B.id.indexOf("group-begin")==0){E--;if(E<0&&YAHOO.util.Dom.hasClass(B,"xforms-disabled")){A=true;break}}}}}if(G){ORBEON.util.Dom.removeClass(D,"xforms-disabled")}else{ORBEON.util.Dom.addClass(D,"xforms-disabled")}if(!(G&&A)){var E=1;var C=0;var B=D;while(true){B=YAHOO.util.Dom.getNextSibling(B);if(B==null){break}if(YAHOO.util.Dom.hasClass(B,"xforms-group-begin-end")){if(B.id.indexOf("group-begin")==0){E++;if(YAHOO.util.Dom.hasClass(B,"xforms-disabled")||C>0){C++}}else{if(B.id.indexOf("group-end")==0){E--;if(E==0){break}if(C>0){C--}}}}else{if(G&&C==0){ORBEON.util.Dom.removeClass(B,"xforms-disabled");ORBEON.util.Dom.removeClass(B,"xforms-disabled-subsequent");ORBEON.util.Dom.nudgeAferDelay(B)}if(!G){ORBEON.util.Dom.addClass(B,"xforms-disabled-subsequent")}}}}}else{var I=[D,ORBEON.xforms.Controls._getControlLHHA(D,"label"),ORBEON.xforms.Controls._getControlLHHA(D,"alert")];if(!G||(G&&ORBEON.xforms.Controls.getHelpMessage(D)!="")){I.push(ORBEON.xforms.Controls._getControlLHHA(D,"help"));I.push(ORBEON.xforms.Controls._getControlLHHA(D,"help-image"))}if(!G||(G&&ORBEON.xforms.Controls.getHintMessage(D)!="")){I.push(ORBEON.xforms.Controls._getControlLHHA(D,"hint"))}for(var H=0;H<I.length;H++){var F=I[H];if(F!=null){if(G){ORBEON.util.Dom.removeClass(F,"xforms-disabled");ORBEON.util.Dom.removeClass(F,"xforms-disabled-subsequent");ORBEON.util.Dom.nudgeAferDelay(F)}else{ORBEON.util.Dom.addClass(F,"xforms-disabled-subsequent")}}}}},setRepeatIterationRelevance:function(A,D,B){var C=ORBEON.util.Utils.findRepeatDelimiter(A,D).nextSibling;while(!(C.nodeType==ELEMENT_TYPE&&(ORBEON.util.Dom.hasClass(C,"xforms-repeat-delimiter")||ORBEON.util.Dom.hasClass(C,"xforms-repeat-begin-end")))){if(C.nodeType==ELEMENT_TYPE){if(B){ORBEON.util.Dom.removeClass(C,"xforms-disabled");ORBEON.util.Dom.removeClass(C,"xforms-disabled-subsequent")}else{ORBEON.util.Dom.addClass(C,"xforms-disabled-subsequent")}}C=C.nextSibling}},setReadonly:function(I,J){function E(K,L){if(L){K.setAttribute("disabled","disabled")}else{K.removeAttribute("disabled")}}if(J){ORBEON.util.Dom.addClass(I,"xforms-readonly")}else{ORBEON.util.Dom.removeClass(I,"xforms-readonly")}if(ORBEON.util.Dom.hasClass(I,"xforms-group-begin-end")){if(J){ORBEON.util.Dom.addClass(I,"xforms-readonly")}else{ORBEON.util.Dom.removeClass(I,"xforms-readonly")}}else{if((ORBEON.util.Dom.hasClass(I,"xforms-input"))||ORBEON.util.Dom.hasClass(I,"xforms-secret")||ORBEON.util.Dom.hasClass(I,"xforms-select1-appearance-full")||ORBEON.util.Dom.hasClass(I,"xforms-select-appearance-full")){if(J){ORBEON.util.Dom.addClass(I,"xforms-readonly")}else{ORBEON.util.Dom.removeClass(I,"xforms-readonly")}var F=I.getElementsByTagName("input");for(var A=0;A<F.length;A++){var D=F[A];E(D,J)}if(I.tagName.toLowerCase()=="input"){E(I,J)}}else{if(ORBEON.util.Dom.hasClass(I,"xforms-select-appearance-compact")||ORBEON.util.Dom.hasClass(I,"xforms-select1-appearance-minimal")||ORBEON.util.Dom.hasClass(I,"xforms-select1-appearance-compact")||ORBEON.util.Dom.hasClass(I,"xforms-input-appearance-minimal")||ORBEON.util.Dom.hasClass(I,"xforms-input-appearance-compact")){var C=ORBEON.util.Utils.isNewXHTMLLayout()?I.getElementsByTagName("select")[0]:I;E(C,J)}else{if(ORBEON.util.Dom.hasClass(I,"xforms-output")||ORBEON.util.Dom.hasClass(I,"xforms-group")){if(J){ORBEON.util.Dom.addClass(I,"xforms-readonly")}else{ORBEON.util.Dom.removeClass(I,"xforms-readonly")}}else{if(ORBEON.util.Dom.hasClass(I,"xforms-select1-appearance-xxforms-autocomplete")){var D=ORBEON.util.Dom.getChildElementByIndex(I,0);E(D,J)}else{if(ORBEON.util.Dom.hasClass(I,"xforms-textarea")&&ORBEON.util.Dom.hasClass(I,"xforms-mediatype-text-html")){var G=FCKeditorAPI.GetInstance(I.name);if(J){G.ToolbarSet.Collapse()}else{G.ToolbarSet.Expand()}}else{if(ORBEON.util.Dom.hasClass(I,"xforms-upload")){E(ORBEON.util.Dom.getChildElementByClass(I,"xforms-upload-select"),J)}else{if(ORBEON.util.Dom.hasClass(I,"xforms-textarea")){var B=ORBEON.util.Utils.isNewXHTMLLayout()?I.getElementsByTagName("textarea")[0]:I;E(B,J)}else{if((ORBEON.util.Dom.hasClass(I,"xforms-trigger")&&!ORBEON.util.Dom.hasClass(I,"xforms-trigger-appearance-minimal"))||ORBEON.util.Dom.hasClass(I,"xforms-submit")){var H=I.tagName.toLowerCase()=="button"?I:I.getElementsByTagName("button")[0];E(H,J)}else{if(ORBEON.util.Dom.hasClass(I,"xforms-trigger-appearance-minimal")){if(J){ORBEON.util.Dom.addClass(I,"xforms-trigger-readonly")}else{ORBEON.util.Dom.removeClass(I,"xforms-trigger-readonly")}}}}}}}}}}}},getAlertMessage:function(A){var B=ORBEON.xforms.Controls._getControlLHHA(A,"alert");return B.innerHTML},setAlertMessage:function(A,B){ORBEON.xforms.Controls._setMessage(A,"alert",B);ORBEON.xforms.Controls._setTooltipMessage(A,B,ORBEON.xforms.Globals.alertTooltipForControl)},getHintMessage:function(C){if(ORBEON.util.Dom.hasClass(C,"xforms-trigger")||ORBEON.util.Dom.hasClass(C,"xforms-submit")){var A=ORBEON.util.Dom.getElementByTagName(C,["a","button"]);return A.title}else{var B=ORBEON.xforms.Controls._getControlLHHA(C,"hint");return B==null?"":B.innerHTML}},setHintMessage:function(C,A){if(ORBEON.util.Dom.hasClass(C,"xforms-trigger")||ORBEON.util.Dom.hasClass(C,"xforms-submit")){if(ORBEON.xforms.Globals.hintTooltipForControl[C.id]==null){var B=ORBEON.util.Dom.getElementByTagName(C,["a","button"]);B.title=A}}else{ORBEON.xforms.Controls._setMessage(C,"hint",A)}ORBEON.xforms.Controls._setTooltipMessage(C,A,ORBEON.xforms.Globals.hintTooltipForControl)},_setTooltipMessage:function(D,A,C){var B=C[D.id];if(B){if(B==true){if(A!=""){C[D.id]=null}}else{if(A==""){B.destroy();C[D.id]=true}else{B.cfg.setProperty("text",A)}}}},setFocus:function(E){var D=ORBEON.util.Dom.getElementById(E);ORBEON.xforms.Globals.maskFocusEvents=true;if(ORBEON.util.Dom.hasClass(D,"xforms-input")&&!ORBEON.util.Dom.hasClass(D,"xforms-type-boolean")){ORBEON.util.Dom.getChildElementByIndex(D,0).focus()}else{if(ORBEON.util.Dom.hasClass(D,"xforms-select-appearance-full")||ORBEON.util.Dom.hasClass(D,"xforms-select1-appearance-full")){var G=0;var C=false;while(true){var F=ORBEON.util.Dom.getChildElementByIndex(D,G);if(F==null){break}var B=ORBEON.util.Dom.getChildElementByIndex(F,0);if(B.checked){C=true;break}G++}ORBEON.util.Dom.getChildElementByIndex(ORBEON.util.Dom.getChildElementByIndex(D,C?G:0),0).focus()}else{if(ORBEON.util.Dom.hasClass(D,"xforms-select1-appearance-xxforms-autocomplete")){ORBEON.util.Dom.getChildElementByIndex(D,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{if(typeof D.focus!="undefined"){D.focus()}}}}}if(typeof ORBEON.xforms.Globals.serverValue[E]=="undefined"){var A=ORBEON.xforms.Controls.getCurrentValue(D);ORBEON.xforms.Globals.serverValue[E]=A}},updateInvalidVisited:function(A){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(A,B){if(ORBEON.util.Dom.hasClass(A,"xforms-required")){if(B==""){ORBEON.util.Dom.addClass(A,"xforms-required-empty");ORBEON.util.Dom.removeClass(A,"xforms-required-filled");return true}else{ORBEON.util.Dom.addClass(A,"xforms-required-filled");ORBEON.util.Dom.removeClass(A,"xforms-required-empty");return false}}else{ORBEON.util.Dom.removeClass(A,"xforms-required-filled");ORBEON.util.Dom.removeClass(A,"xforms-required-empty");return false}},autosizeTextarea:function(B){if(B.tagName.toLowerCase()!="textarea"){B=B.getElementsByTagName("textarea")[0]}var D=B.scrollHeight;var A=B.clientHeight;if(B.rows==-1){B.rows=2}if(ORBEON.xforms.Globals.isFF3){B.style.height=0;D=B.scrollHeight;B.style.height=null}var C=A/B.rows;var E=0;if(D>A){while(D>=A){B.rows=B.rows+1;if(B.clientHeight<=A){break}A=B.clientHeight;E++}}else{if(D<A){while(B.rows>XFORMS_WIDE_TEXTAREA_MIN_ROWS&&D<A-C){B.rows=B.rows-1;if(B.clientHeight>=A){break}A=B.clientHeight;E--}}}},updateHTMLAreaClasses:function(B){var A=B.previousSibling;while(A.nodeType!=ORBEON.util.Dom.ELEMENT_TYPE){A=B.previousSibling}A.className=B.className},updateLoadingPosition:function(E){var B;var F=ORBEON.xforms.Globals.formLoadingLoadingInitialRightTop[E][0];var D=document.documentElement.scrollLeft||document.body.scrollLeft;B=D+YAHOO.util.Dom.getViewportWidth()-F;var C;var G=document.documentElement.scrollTop||document.body.scrollTop;var H=ORBEON.xforms.Globals.formLoadingLoadingInitialRightTop[E][1];C=G+ORBEON.util.Utils.getProperty(LOADING_MIN_TOP_PADDING_PROPERTY)>H?G+ORBEON.util.Utils.getProperty(LOADING_MIN_TOP_PADDING_PROPERTY):H;var A=ORBEON.xforms.Globals.formLoadingLoadingOverlay[E];A.cfg.setProperty("x",B);A.cfg.setProperty("y",C)},treeOpenSelectedVisible:function(D,A){for(var C in D._nodes){var E=D._nodes[C];if(xformsArrayContains(A,E.data.value)){var B=E.parent;while(B!=null){B.expand();B=B.parent}}}},showHelp:function(J){var P=ORBEON.xforms.Controls.getForm(J);if(ORBEON.xforms.Globals.formHelpPanel[P.id]==null){for(var D=0;D<P.childNodes.length;D++){var S=P.childNodes[D];if(ORBEON.util.Dom.isElement(S)&&ORBEON.util.Dom.hasClass(S,"xforms-help-panel")){YAHOO.util.Dom.generateId(S);ORBEON.util.Dom.removeClass(S,"xforms-initially-hidden");var A=new YAHOO.widget.Panel(S.id,{modal:false,fixedcenter:false,underlay:"shadow",visible:false,constraintoviewport:true,draggable:true,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.3}});A.render();A.element.style.display="none";ORBEON.xforms.Globals.formHelpPanel[P.id]=A;var K=ORBEON.util.Dom.getChildElementByClass(S,"bd");ORBEON.xforms.Globals.formHelpPanelMessageDiv[P.id]=YAHOO.util.Dom.getElementsByClassName("xforms-help-panel-message",null,K)[0];var B=YAHOO.util.Dom.getElementsByClassName("xforms-help-panel-close",null,K)[0];var Q=ORBEON.util.Dom.getChildElementByIndex(B,0);ORBEON.xforms.Globals.formHelpPanelCloseButton[P.id]=Q;YAHOO.util.Event.addListener(Q,"click",ORBEON.xforms.Events.helpDialogButtonClose,P.id);A.beforeHideEvent.subscribe(ORBEON.xforms.Events.helpDialogXClose,P.id);break}}}ORBEON.xforms.Globals.formHelpPanelMessageDiv[P.id].innerHTML=ORBEON.xforms.Controls.getHelpMessage(J);var O=YAHOO.util.Dom.getRegion(ORBEON.xforms.Globals.formHelpPanel[P.id].element);var N;if(O.top==null){N=true}else{var C=YAHOO.util.Dom.getViewportWidth();var I=YAHOO.util.Dom.getViewportHeight();var E=document.body.scrollLeft;var F=document.body.scrollTop;var H=O.top>=F&&O.bottom<=F+I;var L=O.left>=E&&O.right<=E+C;N=!H||!L}if(N){var G=ORBEON.util.Utils.isNewXHTMLLayout()?J:J.parentNode;var R=ORBEON.util.Dom.getChildElementByClass(G,"xforms-help-image");ORBEON.xforms.Globals.formHelpPanel[P.id].element.style.display="block";ORBEON.xforms.Globals.formHelpPanel[P.id].cfg.setProperty("context",[R,"bl","tl"]);ORBEON.xforms.Globals.formHelpPanel[P.id].show();ORBEON.xforms.Globals.formHelpPanel[P.id].cfg.setProperty("zIndex",ORBEON.xforms.Globals.lastDialogZIndex++)}var M=ORBEON.xforms.Globals.formHelpPanelMessageDiv[P.id].parentNode;if(M.scrollHeight<=M.clientHeight){ORBEON.xforms.Globals.formHelpPanelCloseButton[P.id].focus()}},showDialog:function(E,D){var B=ORBEON.util.Dom.getElementById(E);var A=ORBEON.xforms.Globals.dialogs[E];if(YAHOO.util.Dom.hasClass(B,"xforms-initially-hidden")){ORBEON.util.Dom.removeClass(B,"xforms-initially-hidden");A.render()}ORBEON.util.Dom.addClass(A.innerElement,"yui-module");ORBEON.util.Dom.addClass(A.innerElement,"yui-overlay");ORBEON.util.Dom.addClass(A.innerElement,"yui-panel");A.element.style.display="block";A.show();A.cfg.setProperty("zIndex",ORBEON.xforms.Globals.lastDialogZIndex++);if(D==null){A.center()}else{A.cfg.setProperty("context",[D,"tl","bl"]);A.align()}if(ORBEON.xforms.Globals.currentFocusControlId!=null){var C=ORBEON.util.Dom.getElementById(ORBEON.xforms.Globals.currentFocusControlId);if(C!=null){C.blur()}}},getWidget:function(A){for(var C in ORBEON.widgets){var B=ORBEON.widgets[C];if(B.extending!=null&&B.appliesToControl(A)){return B}}},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}};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 B in ORBEON.xforms.Globals.dialogs){var A=ORBEON.xforms.Globals.dialogs[B];if(A.iframe==C){return A.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(C){if(!ORBEON.xforms.Globals.maskFocusEvents){var B=ORBEON.xforms.Events._findParentXFormsControl(YAHOO.util.Event.getTarget(C));var E=ORBEON.xforms.Globals.currentFocusControlId!=null?ORBEON.util.Dom.getElementByIdNoCache(ORBEON.xforms.Globals.currentFocusControlId):null;if(B!=null){if(typeof ORBEON.xforms.Globals.serverValue[B.id]=="undefined"&&!ORBEON.util.Dom.hasClass(B,"xforms-select-appearance-compact")){var F=ORBEON.xforms.Controls.getCurrentValue(B);ORBEON.xforms.Globals.serverValue[B.id]=F}}var G=new Array();if(B!=null&&E!=B&&!ORBEON.util.Dom.hasClass(B,"xforms-dialog")){ORBEON.widgets.RTE.focusOnAnyFormControl(B);var D=false;if(E!=null){if(ORBEON.util.Dom.hasClass(E,"xforms-textarea")&&ORBEON.util.Dom.hasClass(E,"xforms-mediatype-text-html")&&ORBEON.util.Utils.getProperty(HTML_EDITOR_PROPERTY)=="fck"){var A=FCKeditorAPI.GetInstance(E.name);E.value=A.GetXHTML();D=true}else{if(ORBEON.util.Dom.hasClass(E,"xforms-select1-appearance-xxforms-tree")||ORBEON.util.Dom.hasClass(E,"xforms-select-appearance-xxforms-tree")){D=true}}if(D){xformsValueChanged(E,null)}G.push(new ORBEON.xforms.Server.Event(null,E.id,null,null,"DOMFocusOut"))}G.push(new ORBEON.xforms.Server.Event(null,B.id,null,null,"DOMFocusIn"));ORBEON.xforms.Globals.currentFocusControlId=B.id;ORBEON.xforms.Server.fireEvents(G,true)}}else{ORBEON.xforms.Globals.maskFocusEvents=false}},blur:function(A){if(!ORBEON.xforms.Globals.maskFocusEvents){var B=ORBEON.xforms.Events._findParentXFormsControl(YAHOO.util.Event.getTarget(A));if(B!=null){if(!ORBEON.util.Dom.hasClass(B,"xforms-visited")){ORBEON.xforms.Events.runOnNext(ORBEON.xforms.Events.ajaxResponseProcessedEvent,function(){ORBEON.xforms.Controls.updateInvalidVisited(B)})}if(!ORBEON.util.Dom.hasClass(B,"xforms-dialog")){ORBEON.xforms.Globals.currentFocusControlId=B.id}if(ORBEON.widgets.YUICalendar.appliesToControl(B)){ORBEON.widgets.YUICalendar.blur(A,B)}}}},change:function(E){var D=ORBEON.xforms.Events._findParentXFormsControl(YAHOO.util.Event.getTarget(E));if(D!=null){if(ORBEON.util.Dom.hasClass(D,"xforms-upload")){var E=new ORBEON.xforms.Server.Event(null,D.id,null,null,"xforms-select");ORBEON.xforms.Server.fireEvents([E],false)}else{if(ORBEON.xforms.Globals.changedIdsRequest[D.id]!=null){ORBEON.xforms.Globals.changedIdsRequest[D.id]=0}if(ORBEON.util.Dom.hasClass(D,"xforms-select1-appearance-compact")){var B=ORBEON.util.Utils.isNewXHTMLLayout()?YAHOO.util.Dom.getElementsByClassName("","select",D)[0]:D;if(B.value==""){B.options[0].selected=true}else{var C=false;for(var F=0;F<B.options.length;F++){var G=B.options[F];if(G.selected){if(C){G.selected=false}else{C=true}}}}}else{if(ORBEON.util.Dom.hasClass(D,"xforms-type-time")||(ORBEON.util.Dom.hasClass(D,"xforms-type-date")&&!ORBEON.util.Dom.hasClass(D,"xforms-input-appearance-minimal"))||ORBEON.util.Dom.hasClass(D,"xforms-type-dateTime")){function H(K,L,I){var J=L(K.value);if(J!=null){K.value=I(J)}}H(ORBEON.util.Dom.getChildElementByIndex(D,0),ORBEON.util.Dom.hasClass(D,"xforms-type-time")?ORBEON.util.DateTime.magicTimeToJSDate:ORBEON.util.DateTime.magicDateToJSDate,ORBEON.util.Dom.hasClass(D,"xforms-type-time")?ORBEON.util.DateTime.jsDateToformatDisplayTime:ORBEON.util.DateTime.jsDateToformatDisplayDate);if(ORBEON.util.Dom.hasClass(D,"xforms-type-dateTime")){H(ORBEON.util.Dom.getChildElementByIndex(D,1),ORBEON.util.DateTime.magicTimeToJSDate,ORBEON.util.DateTime.jsDateToformatDisplayTime)}}}var A=ORBEON.xforms.Controls.getCurrentValue(D);var E=new ORBEON.xforms.Server.Event(null,D.id,null,A,"xxforms-value-change-with-focus-change");ORBEON.xforms.Server.fireEvents([E],false)}}},_isChangingKey:function(A,B){return ;!YAHOO.lang.isUndefined(B)&&B!=9&&B!=16&&B!=17&&B!=18&&(ORBEON.util.Dom.hasClass(A,"xforms-input")||ORBEON.util.Dom.hasClass(A,"xforms-secret")||ORBEON.util.Dom.hasClass(A,"xforms-textarea"))},keydown:function(B){var A=ORBEON.xforms.Events._findParentXFormsControl(YAHOO.util.Event.getTarget(B));if(A!=null){if(ORBEON.xforms.Events._isChangingKey(A,B.keyCode)){ORBEON.xforms.Globals.changedIdsRequest[A.id]=ORBEON.xforms.Globals.changedIdsRequest[A.id]==null?1:ORBEON.xforms.Globals.changedIdsRequest[A.id]+1}if(ORBEON.widgets.JSCalendar.appliesToControl(A)){ORBEON.widgets.JSCalendar.keydown(B,A)}else{if(ORBEON.widgets.YUICalendar.appliesToControl(A)){ORBEON.widgets.YUICalendar.keydown(B,A)}}}},keypress:function(A){var C=ORBEON.xforms.Events._findParentXFormsControl(YAHOO.util.Event.getTarget(A));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(A.keyCode==10||A.keyCode==13){YAHOO.util.Event.preventDefault(A);var B=[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(B,false)}}}},keyup:function(B){var A=ORBEON.xforms.Events._findParentXFormsControl(YAHOO.util.Event.getTarget(B));if(A!=null){if(ORBEON.util.Dom.hasClass(A,"xforms-select1-open")){ORBEON.xforms.Globals.autoCompleteLastKeyCode[A.id]=B.keyCode}if(ORBEON.xforms.Events._isChangingKey(A,B.keyCode)){ORBEON.xforms.Globals.changedIdsRequest[A.id]--}if(ORBEON.util.Dom.hasClass(A,"xforms-incremental")){var B=new ORBEON.xforms.Server.Event(null,A.id,null,ORBEON.xforms.Controls.getCurrentValue(A),"xxforms-value-change-with-focus-change");ORBEON.xforms.Server.fireEvents([B],false)}if(ORBEON.util.Dom.hasClass(A,"xforms-textarea-appearance-xxforms-autosize")){ORBEON.xforms.Controls.autosizeTextarea(A)}}},resize:function(C){for(var A=0;A<ORBEON.xforms.Globals.autosizeTextareas.length;A++){var B=ORBEON.xforms.Globals.autosizeTextareas[A];ORBEON.xforms.Controls.autosizeTextarea(B)}},_showToolTip:function(G,E,C,F,B,D,I){if(YAHOO.lang.isObject(G[E.id])){if(!YAHOO.util.Dom.inDocument(G[E.id].orbeonControl,document)){G[E.id].destroy();G[E.id]=null}}if(G[E.id]==null){if(B!=""){var A=new YAHOO.widget.Tooltip(E.id+F,{context:C.id,text:B,showDelay:D,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.2},zIndex:1000});A.orbeonControl=E;var H=ORBEON.util.Dom.getElementById(C.id);A.onContextMouseMove.call(H,I,A);A.onContextMouseOver.call(H,I,A);G[E.id]=A}else{G[E.id]=true}}},mouseover:function(F){var C=ORBEON.xforms.Events._findParentXFormsControl(YAHOO.util.Event.getTarget(F));if(C!=null){if(!ORBEON.util.Dom.hasClass(document.body,"xforms-disable-hint-as-tooltip")){var G=ORBEON.xforms.Controls.getHintMessage(C);if(YAHOO.util.Dom.hasClass(C,"xforms-trigger")||ORBEON.util.Dom.hasClass(C,"xforms-submit")){var A=ORBEON.util.Dom.getElementByTagName(C,["a","button"]);A.title=""}ORBEON.xforms.Events._showToolTip(ORBEON.xforms.Globals.hintTooltipForControl,C,C,"-orbeon-hint-tooltip",G,200,F)}if(ORBEON.util.Dom.hasClass(C,"xforms-alert-active")&&!ORBEON.util.Dom.hasClass(document.body,"xforms-disable-alert-as-tooltip")){var D=ORBEON.xforms.Controls.getControlForLHHA(C,"alert");if(D){if(!YAHOO.util.Dom.hasClass(D,"xforms-control")){D=YAHOO.util.Dom.getAncestorByClassName(D,"xforms-control")}if(D){var G=ORBEON.xforms.Controls.getAlertMessage(D);YAHOO.util.Dom.generateId(C);ORBEON.xforms.Events._showToolTip(ORBEON.xforms.Globals.alertTooltipForControl,D,C,"-orbeon-alert-tooltip",G,10,F)}}}else{if(ORBEON.util.Dom.hasClass(C,"xforms-dialog-appearance-minimal")){ORBEON.xforms.Globals.dialogMinimalLastMouseOut[C.id]=-1}}if(ORBEON.util.Utils.getProperty(HELP_TOOLTIP_PROPERTY)&&ORBEON.util.Dom.hasClass(C,"xforms-help-image")){var B=C.nextSibling;if(!ORBEON.util.Dom.isElement(B)){B=B.nextSibling}var D=ORBEON.xforms.Controls.getControlForLHHA(C,"help-image");if(D){if(YAHOO.util.Dom.hasClass(D,"xforms-input-input")){D=YAHOO.util.Dom.getAncestorByClassName(D,"xforms-control")}var G=ORBEON.xforms.Controls.getHelpMessage(D);YAHOO.util.Dom.generateId(C);ORBEON.xforms.Events._showToolTip(ORBEON.xforms.Globals.helpTooltipForControl,D,C,"-orbeon-help-tooltip",G,0,F)}}var E=C;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 A=ORBEON.xforms.Events._findParentXFormsControl(YAHOO.util.Event.getTarget(B));if(A!=null){if(ORBEON.util.Dom.hasClass(A,"xforms-dialog-appearance-minimal")){}}},click:function(H){if(H.button!=0&&H.button!=1){return }ORBEON.xforms.Events.clickEvent.fire(H);var R=YAHOO.util.Event.getTarget(H);if(YAHOO.lang.isObject(R)&&YAHOO.lang.isBoolean(R.disabled)&&R.disabled){return }var C=ORBEON.xforms.Events._findParentXFormsControl(R);if(C!=null&&ORBEON.util.Dom.hasClass(C,"xforms-output")){ORBEON.xforms.Events.focus(H)}else{if(C!=null&&(ORBEON.util.Dom.hasClass(C,"xforms-trigger")||ORBEON.util.Dom.hasClass(C,"xforms-submit"))){YAHOO.util.Event.preventDefault(H);if(ORBEON.util.Dom.hasClass(C,"xxforms-offline-save")){ORBEON.xforms.Offline.storeEvents(ORBEON.xforms.Offline.memoryOfflineEvents);ORBEON.xforms.Offline.memoryOfflineEvents=[]}if(ORBEON.util.Dom.hasClass(C,"xxforms-online")){ORBEON.xforms.Offline.takeOnline()}if(!ORBEON.util.Dom.hasClass(C,"xforms-readonly")){ORBEON.xforms.Events.focus(H);var H=new ORBEON.xforms.Server.Event(null,C.id,null,null,"DOMActivate");ORBEON.xforms.Server.fireEvents([H],false)}if(ORBEON.util.Dom.hasClass(C,"xforms-trigger-appearance-modal")){C.blur();ORBEON.util.Utils.displayModalProgressPanel()}}else{if(C!=null&&(ORBEON.util.Dom.hasClass(C,"xforms-select1-appearance-full")||ORBEON.util.Dom.hasClass(C,"xforms-select-appearance-full")||(ORBEON.util.Dom.hasClass(C,"xforms-input")&&ORBEON.util.Dom.hasClass(C,"xforms-type-boolean")))){ORBEON.xforms.Controls._setRadioCheckboxClasses(C);var H=new ORBEON.xforms.Server.Event(null,C.id,null,ORBEON.xforms.Controls.getCurrentValue(C),"xxforms-value-change-with-focus-change");ORBEON.xforms.Server.fireEvents([H],false)}else{if(C!=null&&ORBEON.util.Dom.hasClass(R,"xforms-type-date")){if(ORBEON.util.Utils.getProperty(DATE_PICKER_PROPERTY)=="jscalendar"){ORBEON.widgets.JSCalendar.click(H,C)}else{ORBEON.widgets.YUICalendar.click(H,C)}}else{if(C!=null&&ORBEON.util.Dom.hasClass(C,"xforms-upload")&&ORBEON.util.Dom.hasClass(R,"xforms-upload-remove")){var H=new ORBEON.xforms.Server.Event(null,C.id,null,"","xxforms-value-change-with-focus-change");ORBEON.xforms.Server.fireEvents([H],false)}else{if(C!=null&&ORBEON.util.Dom.hasClass(C,"xforms-select1-appearance-xxforms-menu")){var L=[];var A=R;while(true){if(A.tagName.toLowerCase()=="li"){var O=0;while(true){var J=A.previousSibling;if(J==null){break}A=J;if(A.nodeType==ELEMENT_TYPE&&A.tagName.toLowerCase()=="li"){O++}}L.push(O)}else{if(A.tagName.toLowerCase()=="div"&&ORBEON.util.Dom.hasClass(A,"yuimenubar")){break}}A=A.parentNode}L=L.reverse();var G=ORBEON.xforms.Globals.menuItemsets[C.id];var D=0;for(var S=0;S<L.length;S++){var B=L[S];G=G[B+D];D=3}var N=G[1];var H=new ORBEON.xforms.Server.Event(null,C.id,null,N,"xxforms-value-change-with-focus-change");ORBEON.xforms.Server.fireEvents([H],false);ORBEON.xforms.Globals.menuYui[C.id].clearActiveItem()}else{if(C!=null&&ORBEON.util.Dom.hasClass(C,"xforms-help-image")){var K=ORBEON.xforms.Controls.getControlForLHHA(C,"help-image");if(ORBEON.util.Utils.getProperty(HELP_HANDLER_PROPERTY)){var H=new ORBEON.xforms.Server.Event(null,K.id,null,null,"xforms-help");ORBEON.xforms.Server.fireEvents([H],false)}else{ORBEON.xforms.Controls.showHelp(K)}}else{var I=R;while(I!=null&&!(ORBEON.util.Dom.isElement(I)&&I.tagName.toLowerCase()=="form")){var E=0;var M=false;var F=I;while(F!=null){if(ORBEON.util.Dom.isElement(F)){if(F.id.indexOf("repeat-begin-")==0){var Q=ORBEON.xforms.Controls.getForm(F);var P=F.id.substring("repeat-begin-".length);P+=P.indexOf(XFORMS_SEPARATOR_1)==-1?XFORMS_SEPARATOR_1:XFORMS_SEPARATOR_2;P+=E;var H=new ORBEON.xforms.Server.Event(Q,P,null,null,"DOMFocusIn");ORBEON.xforms.Server.fireEvents([H]);M=true;break}else{if(ORBEON.util.Dom.hasClass(F,"xforms-repeat-delimiter")){E++}}}F=F.previousSibling}if(M){break}I=I.parentNode}}}}}}}}},_resize:function(){var A=[ORBEON.xforms.Globals.hintTooltipForControl,ORBEON.xforms.Globals.helpTooltipForControl,ORBEON.xforms.Globals.alertTooltipForControl];for(var B=0;B<3;B++){var C=A[B];for(var D in C){var E=C[D];if(E!=null&&E!=true){if(YAHOO.lang.isObject(E.element)&&E.element.style.visibility=="hidden"){E.element.style.top=0;E.element.style.left=0}}}}},scrollOrResize:function(){for(var A in ORBEON.xforms.Globals.formLoadingLoadingOverlay){var B=ORBEON.xforms.Globals.formLoadingLoadingOverlay[A];if(B){ORBEON.xforms.Controls.updateLoadingPosition(A)}}ORBEON.xforms.Events._resize()},sliderValueChange:function(D){var C=ORBEON.util.Dom.getElementById(this.id);if(ORBEON.util.Utils.isNewXHTMLLayout()){C=C.parentNode}var A=D/200;var B=new ORBEON.xforms.Server.Event(null,C.id,null,String(A),"xxforms-value-change-with-focus-change");ORBEON.xforms.Server.fireEvents([B],false)},menuClick:function(B,D,A){var C=A.menu;var E=A.value;var F=new ORBEON.xforms.Server.Event(null,C.id,null,E,"xxforms-value-change-with-focus-change");ORBEON.xforms.Server.fireEvents([F],false)},dialogClose:function(E,A,C){var B=C;var F=ORBEON.util.Dom.getElementById(B);var D=new ORBEON.xforms.Server.Event(null,F.id,null,null,"xxforms-dialog-close");ORBEON.xforms.Server.fireEvents([D],false)},dialogShow:function(D,A,C){if(ORBEON.xforms.Globals.isRenderingEngineTrident){var B=C;var E=ORBEON.util.Dom.getElementById(B);E.className=E.className}},helpDialogButtonClose:function(B,A){var C=ORBEON.xforms.Globals.formHelpPanel[A];C.hide()},helpDialogXClose:function(A,B,D){var C=ORBEON.xforms.Globals.formHelpPanel[D];C.element.style.display="none"},treeClickFocus:function(C){var A=ORBEON.util.Dom.hasClass(C,"xforms-incremental");if(ORBEON.xforms.Globals.currentFocusControlId!=C.id){var B={target:C};ORBEON.xforms.Events.focus(B)}ORBEON.xforms.Globals.currentFocusControlId=C.id},treeClickValueUpdated:function(A){if(ORBEON.util.Dom.hasClass(A,"xforms-incremental")){var B=new ORBEON.xforms.Server.Event(null,A.id,null,ORBEON.xforms.Controls.getCurrentValue(A),"xxforms-value-change-with-focus-change");ORBEON.xforms.Server.fireEvents([B],false)}},treeCheckClick:function(){var B=this.tree;var D=ORBEON.util.Dom.getElementById(B.id);ORBEON.xforms.Events.treeClickFocus(D);D.value="";for(var C in B._nodes){var A=B._nodes[C];if(A.checkState==2){if(D.value!=""){D.value+=" "}D.value+=A.data.value}}ORBEON.xforms.Events.treeClickValueUpdated(D)},treeLabelClick:function(F){var E=this;var C=document.getElementById(E.id);if(ORBEON.util.Utils.isNewXHTMLLayout()){C=C.parentNode}var B=ORBEON.util.Dom.hasClass(C,"xforms-select");if(B){if(F.checked){F.uncheck()}else{F.check()}F.onCheckClick()}else{var A=ORBEON.xforms.Controls.getCurrentValue(C);var D=E.getNodeByProperty("value",A);if(D!=null){YAHOO.util.Dom.removeClass(D.getLabelEl(),"xforms-tree-label-selected")}if(F!=null){YAHOO.util.Dom.addClass(F.getLabelEl(),"xforms-tree-label-selected")}ORBEON.xforms.Events.treeClickFocus(C);C.value=F.data.value;ORBEON.xforms.Events.treeClickValueUpdated(C)}},errorShowHideDetails:function(){var A=this.parentNode.parentNode.parentNode;var B=ORBEON.util.Dom.getChildElementByClass(A,"xforms-error-panel-details-hidden");var C=ORBEON.util.Dom.getChildElementByClass(A,"xforms-error-panel-details-shown");if(this.className=="xforms-error-panel-show-details"){ORBEON.util.Dom.addClass(B,"xforms-disabled-subsequent");ORBEON.util.Dom.removeClass(C,"xforms-disabled");ORBEON.util.Dom.removeClass(C,"xforms-disabled-subsequent")}else{ORBEON.util.Dom.removeClass(B,"xforms-disabled");ORBEON.util.Dom.removeClass(B,"xforms-disabled-subsequent");ORBEON.util.Dom.addClass(C,"xforms-disabled-subsequent")}},errorPanelClosed:function(E,G,C){var F=ORBEON.xforms.Globals.formErrorPanel[C];var A=F.errorDetailsDiv.parentNode.parentNode;var B=ORBEON.util.Dom.getChildElementByClass(A,"xforms-error-panel-details-hidden");var D=ORBEON.util.Dom.getChildElementByClass(A,"xforms-error-panel-details-shown");ORBEON.util.Dom.removeClass(B,"xforms-disabled");ORBEON.util.Dom.removeClass(B,"xforms-disabled-subsequent");ORBEON.util.Dom.addClass(D,"xforms-disabled-subsequent")},errorCloseClicked:function(A,B){B.hide()},errorReloadClicked:function(A,B){ORBEON.xforms.Globals.isReloading=true;window.location.reload(true)},dialogMinimalBodyClick:function(B,A){if(A.element.style.display=="block"){var D=YAHOO.util.Event.getTarget(B);var C=false;while(D!=null&&D!=document){if(ORBEON.util.Dom.hasClass(D,"xforms-dialog-appearance-minimal")){C=true;break}D=D.parentNode}if(!C){var B=new ORBEON.xforms.Server.Event(null,A.id,null,null,"xxforms-dialog-close");ORBEON.xforms.Server.fireEvents([B],false)}}},dialogMinimalCheckMouseIn:function(A){var C=new Date().getTime();if(A.element.style.display=="block"&&ORBEON.xforms.Globals.dialogMinimalLastMouseOut[A.element.id]!=-1&&C-ORBEON.xforms.Globals.dialogMinimalLastMouseOut[A.element.id]>=ORBEON.util.Utils.getProperty(DELAY_BEFORE_CLOSE_MINIMAL_DIALOG_PROPERTY)){var B=new ORBEON.xforms.Server.Event(null,A.element.id,null,null,"xxforms-dialog-close");ORBEON.xforms.Server.fireEvents([B],false)}},sendHeartBeatIfNeeded:function(C){var D=new Date().getTime();if((D-ORBEON.xforms.Globals.lastEventSentTime)>=C){var A=ORBEON.util.Dom.getElementById("xforms-heartbeat");if(A==null){var E;for(var B=0;B<document.forms.length;B++){var F=document.forms[B];if(ORBEON.util.Dom.hasClass(F,"xforms-form")){E=F;break}}var A=document.createElement("div");A.className="xforms-heartbeat";A.id="xforms-heartbeat";E.appendChild(A)}var G=new ORBEON.xforms.Server.Event(null,A.id,null,null,"xxforms-session-heartbeat");ORBEON.xforms.Server.fireEvents([G],false)}},runOnNext:function(B,A,E,C){function D(){B.unsubscribe(D);if(C){A.call(E)}else{A(E)}}B.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(A,B){var C=null;var D=false;A.instance=function(F){var G=!YAHOO.lang.isUndefined(A.prototype.init);if(!D){D=true;if(G){var E=this.prototype.init;this.prototype.init=function(){if(!this.initialized){E.call(this);this.initialized=true}}}}if(F==null||!YAHOO.util.Dom.inDocument(F,document)){if(C==null){C={};for(methodName in A.prototype){C[methodName]=function(){}}}return C}else{var H=YAHOO.util.Dom.hasClass(F,B)?F:YAHOO.util.Dom.getAncestorByClassName(F,B);if(YAHOO.lang.isUndefined(this._instances)){this._instances={}}var I=this._instances[H.id];if(YAHOO.lang.isUndefined(I)||I.container!=H){I=new A(H);I.container=H;if(G){I.initialized=false;I.init()}this._instances[H.id]=I}return I}}}};ORBEON.widgets.Base=function(){return{extending:null,appliesToControl:function(A){},click:function(B,A){},blur:function(B,A){},keydown:function(B,A){}}}();ORBEON.widgets.JSCalendar=function(){function A(C){if(ORBEON.util.Dom.hasClass(C.activeDiv,"day")){var F;if(!YAHOO.lang.isNull(C.params.inputField)){var B=C.params.inputField;var G=ORBEON.util.DateTime.magicDateToJSDate(B.value);B.value=ORBEON.util.DateTime.jsDateToformatDisplayDate(G);F=B.parentNode}else{var E=C.params.imageField;E.alt=ORBEON.util.DateTime.jsDateToformatDisplayDate(C.date);F=E.parentNode}var D=new ORBEON.xforms.Server.Event(null,F.id,null,ORBEON.xforms.Controls.getCurrentValue(F),"xxforms-value-change-with-focus-change");ORBEON.xforms.Server.fireEvents([D],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(F,E){var C=ORBEON.util.Dom.getChildElementByIndex(E,0);var B={imageField:C,ifFormat:"%m/%d/%Y",showsTime:false,button:E.id,singleClick:true,step:1,onUpdate:A,electric:false};if(ORBEON.util.Dom.hasClass(C,"xforms-input-appearance-minimal")){B.imageField=C;var D=ORBEON.util.Dom.getAttribute(C,"alt");B.date=D}else{B.inputField=C}Calendar.setup(B);var G=E.onclick;E.onclick=null;G()},blur:function(B,C){},keydown:function(B,C){calendar.hide()}}}();ORBEON.widgets.YUICalendar=function(){var F={en:{properties:{MONTHS_LONG:["January","February","March","April","May","June","July","August","September","October","November","December"],WEEKDAYS_SHORT:["Su","Mo","Tu","We","Th","Fr","Sa"],START_WEEKDAY:0},navigator:{month:"Month",year:"Year",submit:"OK",cancel:"Cancel",invalidYear:"Year needs to be a number"}},fr:{properties:{MONTHS_LONG:["Janvier","F\xe9vrier","Mars","Avril","Mai","Juin","Juillet","Ao\xfbt","Septembre","Octobre","Novembre","D\xe9cembre"],WEEKDAYS_SHORT:["Di","Lu","Ma","Me","Je","Ve","Sa"],START_WEEKDAY:1},navigator:{month:"Moi",year:"Ann\xe9e",submit:"OK",cancel:"Annuler",invalidYear:"L'ann\xe9e est invalide"}},es:{properties:{MONTHS_LONG:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],WEEKDAYS_SHORT:["Do","Lu","Ma","Mi","Ju","Vi","S\xe1"],START_WEEKDAY:1},navigator:{month:"Mes",year:"A\xf1o",submit:"OK",cancel:"Aancelar",invalidYear:"A\xf1o debe ser un n\xfamero"}}};var L=null;var A=null;var H=null;var K=null;var I=false;function B(){I=true}function G(){I=false}function C(){YAHOO.util.Event.addListener(A,"mouseover",B);YAHOO.util.Event.addListener(A,"mouseout",G)}function E(){var N=L.getSelectedDates()[0];K.value=ORBEON.util.DateTime.jsDateToformatDisplayDate(N);if(ORBEON.util.Dom.hasClass(H,"xforms-input-appearance-minimal")){K.alt=K.value}var M=new ORBEON.xforms.Server.Event(null,H.id,null,ORBEON.xforms.Controls.getCurrentValue(H),"xxforms-value-change-with-focus-change");ORBEON.xforms.Server.fireEvents([M],false);D()}function D(){H=null;K=null;I=false;YAHOO.util.Dom.setStyle(A,"display","none");ORBEON.xforms.Events.clickEvent.unsubscribe(J)}function J(O,M){var N=M[0];var P=YAHOO.util.Event.getTarget(N);var Q=YAHOO.util.Dom.getAncestorByClassName(P,"yui-calcontainer");if(YAHOO.lang.isNull(Q)){D()}}return{extending:ORBEON.widgets.Base,appliesToControl:function(M){return(ORBEON.util.Dom.hasClass(M,"xforms-type-date")||ORBEON.util.Dom.hasClass(M,"xforms-type-dateTime"))&&ORBEON.util.Utils.getProperty(DATE_PICKER_PROPERTY)=="yui"},click:function(S,W){if(A==null){A=ORBEON.util.Dom.getElementById("orbeon-calendar-div")}if(A==null){A=document.createElement("div");A.id="orbeon-calendar-div";document.body.appendChild(A)}YAHOO.util.Dom.setStyle(A,"z-index",ORBEON.xforms.Globals.lastDialogZIndex++);if(L==null){var Z=ORBEON.util.Utils.getProperty(DATE_PICKER_TWO_MONTHS_PROPERTY);L=Z?new YAHOO.widget.CalendarGroup(A.id):new YAHOO.widget.Calendar(A.id);L.renderEvent.subscribe(C,L,true);L.selectEvent.subscribe(E,L,true);window.yuiCalendar=L;L.renderEvent.subscribe(function(){var f=YAHOO.util.Dom.getElementsByClassName("calnavleft",null,A)[0];var d=document.createElement("a");d.innerHTML="Previous Year";d.href="#";YAHOO.util.Dom.addClass(d,"calyearleft");YAHOO.util.Dom.insertBefore(d,f);YAHOO.util.Event.addListener(d,"click",function(g){YAHOO.util.Event.preventDefault(g);setTimeout(function(){L.previousYear();var h=YAHOO.util.Dom.getElementsByClassName("calyearleft","a",A);if(h&&h[0]){h[0].focus()}},0)});var c=YAHOO.util.Dom.getElementsByClassName("calnavright",null,A)[0];var e=document.createElement("a");e.innerHTML="Next Year";e.href="#";YAHOO.util.Dom.addClass(e,"calyearright");YAHOO.util.Dom.insertBefore(e,c);YAHOO.util.Event.addListener(e,"click",function(g){YAHOO.util.Event.preventDefault(g);setTimeout(function(){L.nextYear();var h=YAHOO.util.Dom.getElementsByClassName("calyearright","a",A);if(h&&h[0]){h[0].focus()}},0)})})}var Q=ORBEON.util.Dom.getAttribute(document.documentElement,"lang");if(Q==null||Q==""){Q="en"}Q=Q.substring(0,2);var b=F[Q];for(var P in b.properties){L.cfg.setProperty(P,b.properties[P])}var U=ORBEON.util.Utils.getProperty(DATE_PICKER_NAVIGATOR_PROPERTY);if(U){L.cfg.setProperty("navigator",{strings:b.navigator,monthFormat:YAHOO.widget.Calendar.SHORT,initialFocus:"year"})}ORBEON.xforms.Events.clickEvent.subscribe(J);H=W;var a=ORBEON.util.DateTime.magicDateToJSDate(ORBEON.xforms.Controls.getCurrentValue(H));if(a==null){L.cfg.setProperty("selected","",false)}else{var T=(a.getMonth()+1)+"/"+a.getDate()+"/"+a.getFullYear();L.cfg.setProperty("selected",T,false)}var Y=YAHOO.util.Dom.getAncestorByClassName(H,"xbl-fr-date");var R=Y!=null;var M=R?YAHOO.util.Dom.getElementsByClassName("xbl-fr-date-mindate",null,Y)[0]:null;L.cfg.setProperty("mindate",M==null?null:ORBEON.util.DateTime.magicDateToJSDate(ORBEON.xforms.Controls.getCurrentValue(M)));var X=R?YAHOO.util.Dom.getElementsByClassName("xbl-fr-date-maxdate",null,Y)[0]:null;L.cfg.setProperty("maxdate",X==null?null:ORBEON.util.DateTime.magicDateToJSDate(ORBEON.xforms.Controls.getCurrentValue(X)));var V=R?YAHOO.util.Dom.getElementsByClassName("xbl-fr-date-pagedate",null,Y)[0]:null;var O=V==null?null:ORBEON.util.DateTime.magicDateToJSDate(ORBEON.xforms.Controls.getCurrentValue(V));L.cfg.setProperty("pagedate",O==null?(a==null?new Date():a):O);ORBEON.xforms.Events.yuiCalendarCreated.fire({yuiCalendar:L,control:H});L.cfg.applyConfig();L.render();YAHOO.util.Dom.setStyle(A,"display","block");K=YAHOO.util.Dom.getElementsByClassName("xforms-input-input",null,H)[0];var N=YAHOO.util.Dom.getXY(K);N[1]=N[1]+20;YAHOO.util.Dom.setXY(A,N)},blur:function(N,M){if(!I){D()}},keydown:function(N,M){D()}}}();ORBEON.widgets.RTE=function(){rteEditors={};isIncremental={};editorWithFocus=null;renderedCustomEvents={};function A(D){var E=new ORBEON.xforms.Server.Event(null,D,null,ORBEON.widgets.RTE.getValue(ORBEON.util.Dom.getElementById(D)),"xxforms-value-change-with-focus-change");ORBEON.xforms.Server.fireEvents([E],true)}function B(D){var E=ORBEON.xforms.Globals.currentFocusControlId;if(E!=D){if(rteEditors[E]!=null){ORBEON.xforms.Events.blur({target:ORBEON.util.Dom.getElementById(E)})}ORBEON.xforms.Events.focus({target:ORBEON.util.Dom.getElementById(D)})}ORBEON.xforms.Events.keydown({target:ORBEON.util.Dom.getElementById(E)});ORBEON.xforms.Events.keyup({target:ORBEON.util.Dom.getElementById(E)})}var C={extending:ORBEON.widgets.Base,init:function(E){var D;if(typeof YUI_RTE_CUSTOM_CONFIG!="undefined"){D=YUI_RTE_CUSTOM_CONFIG}else{D={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 H=ORBEON.util.Utils.isNewXHTMLLayout()?E.getElementsByTagName("textarea")[0]:E;var F=new YAHOO.widget.Editor(H,D);var G=function(){F.on("editorKeyUp",function(){B(E.id)});F.on("afterNodeChange",function(){B(E.id)});F.removeListener("afterNodeChange",G)};F.on("afterNodeChange",G);rteEditors[E.id]=F;isIncremental[E.id]=ORBEON.util.Dom.hasClass(E,"xforms-incremental");F.on("editorContentLoaded",function(){if(!ORBEON.util.Utils.isNewXHTMLLayout()){var I=E.parentNode;I.className+=" "+E.className}var J=ORBEON.xforms.Controls.getCurrentValue(E);ORBEON.xforms.Globals.serverValue[E.id]=J;if(YAHOO.lang.isObject(renderedCustomEvents[E.id])){renderedCustomEvents[E.id].fire()}renderedCustomEvents[E.id]=true});F.render()},focusOnAnyFormControl:function(D){var E=ORBEON.xforms.Globals.currentFocusControlId;if(rteEditors[D.id]==null&&rteEditors[E]!=null){ORBEON.xforms.Events.change({target:ORBEON.util.Dom.getElementById(E)});ORBEON.xforms.Events.blur({target:ORBEON.util.Dom.getElementById(E)})}},setValue:function(D,E){if(!ORBEON.util.Dom.hasClass(D,"xforms-incremental")||ORBEON.xforms.Globals.currentFocusControlId!=D.id){var F=rteEditors[D.id];F.setEditorHTML(E)}},getValue:function(D){var F=rteEditors[D.id];var E=F.getEditorHTML();if(E=="<br>"){E=""}return E},setFocus:function(D){var E=rteEditors[D.id]},onRendered:function(E,D){if(renderedCustomEvents[E.id]===true){D()}else{if(renderedCustomEvents[E.id]===undefined){renderedCustomEvents[E.id]=new YAHOO.util.CustomEvent("rteRendered")}renderedCustomEvents[E.id].subscribe(D)}}};return C}();ORBEON.xforms.Init={_specialControlsInitFunctions:null,_getSpecialControlsInitFunctions:function(){ORBEON.xforms.Init._specialControlsInitFunctions=ORBEON.xforms.Init._specialControlsInitFunctions||{select1:{compact:ORBEON.xforms.Init._list,"{http://orbeon.org/oxf/xml/xforms}autocomplete":ORBEON.xforms.Init._autoComplete,"{http://orbeon.org/oxf/xml/xforms}menu":ORBEON.xforms.Init._menu,"{http://orbeon.org/oxf/xml/xforms}tree":ORBEON.xforms.Init._tree},select:{compact:ORBEON.xforms.Init._list,"{http://orbeon.org/oxf/xml/xforms}tree":ORBEON.xforms.Init._tree},range:{"":ORBEON.xforms.Init._range},textarea:{"{http://orbeon.org/oxf/xml/xforms}autosize":ORBEON.xforms.Init._widetextArea,"text/html":ORBEON.xforms.Init._htmlArea},dialog:{"":ORBEON.xforms.Init._dialog,full:ORBEON.xforms.Init._dialog,minimal:ORBEON.xforms.Init._dialog}};return ORBEON.xforms.Init._specialControlsInitFunctions},registerChangeListenerOnFormElements:function(){for(var E=0;E<document.forms.length;E++){var D=document.forms[E];if(ORBEON.util.Dom.hasClass(D,"xforms-form")){var C=D.elements.length;for(var B=0;B<C;B++){var A=D.elements[B];if(A.id!=null&&A.id!=""){ORBEON.xforms.Init.registerChangeListenerOnFormElement(A)}}}}},removeChangeListenerOnFormElements:function(){for(var E=0;E<document.forms.length;E++){var D=document.forms[E];if(ORBEON.util.Dom.hasClass(D,"xforms-form")){var C=D.elements.length;for(var B=0;B<C;B++){var A=D.elements[B];if(A.id!=null&&A.id!=""){ORBEON.xforms.Init.removeChangeListenerOnFormElement(A)}}}}},registerChangeListenerOnFormElement:function(A){YAHOO.util.Event.addListener(A,"change",ORBEON.xforms.Events.change)},removeChangeListenerOnFormElement:function(A){YAHOO.util.Event.removeListener(A,"change",ORBEON.xforms.Events.change)},registerDraggableListenersOnRepeatElements:function(C){var B=YAHOO.util.Dom.getElementsByClassName("xforms-dnd",null,C);for(var D=0;D<B.length;D++){var A=B[D];var E=A.tagName.toLowerCase();if(E=="div"||E=="tr"||E=="td"||E=="li"){ORBEON.xforms.Init.registerDraggableListenersOnRepeatElement(A)}}},registerDraggableListenersOnRepeatElement:function(A){var B=new ORBEON.xforms.DnD.DraggableItem(A);if(ORBEON.util.Dom.hasClass(A,"xforms-dnd-vertical")){B.setXConstraint(0,0)}else{if(ORBEON.util.Dom.hasClass(A,"xforms-dnd-horizontal")){B.setYConstraint(0,0)}}},document:function(){ORBEON.xforms.Globals={isMac:navigator.userAgent.toLowerCase().indexOf("macintosh")!=-1,isRenderingEngineGecko:navigator.userAgent.toLowerCase().indexOf("gecko")!=-1,isFF3:navigator.userAgent.toLowerCase().indexOf("firefox/3")!=-1,isRenderingEnginePresto:navigator.userAgent.toLowerCase().indexOf("opera")!=-1,isRenderingEngineWebCore:navigator.userAgent.toLowerCase().indexOf("safari")!=-1,isRenderingEngineWebCore13:navigator.userAgent.indexOf("AppleWebKit/312")!=-1,isRenderingEngineTrident:navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1,resourcesBaseURL:ORBEON.xforms.Globals.resourcesBaseURL,xformsServerURL:ORBEON.xforms.Globals.xformsServerURL,eventQueue:[],eventsFirstEventTime:0,requestForm:null,requestIgnoreErrors:false,requestInProgress:false,requestDocument:"",requestRetries:3,executeEventFunctionQueued:0,maskFocusEvents:false,currentFocusControlId:null,htmlAreaNames:[],repeatTreeChildToParent:{},repeatIndexes:{},repeatTreeParentToAllChildren:{},inputCalendarCommitedValue:{},yuiCalendar:null,tooltipLibraryInitialized:false,changedIdsRequest:{},serverValue:{},autoCompleteLastKeyCode:{},autoCompleteOpen:{},loadingOtherPage:false,activeControl:null,autosizeTextareas:[],fckEditorLoading:false,fckEditorsToLoad:[],dialogs:{},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,topLevelListenerRegistered:ORBEON.xforms.Globals.topLevelListenerRegistered==null?false:ORBEON.xforms.Globals.topLevelListenerRegistered};(function(){var B=ORBEON.xforms.Globals.isRenderingEngineTrident?ORBEON.util.IEDom:ORBEON.util.MozDom;for(var A in B){ORBEON.util.Dom[A]=B[A]}}());ORBEON.util.Dom.addClass(document.body,"yui-skin-sam");if(ORBEON.util.Utils.getProperty(OFFLINE_SUPPORT_PROPERTY)){ORBEON.xforms.Offline.pageLoad()}if(ORBEON.xforms.Globals.isRenderingEngineTrident){ORBEON.xforms.Init.registerChangeListenerOnFormElements();if(!ORBEON.xforms.Globals.topLevelListenerRegistered){YAHOO.util.Event.addListener(document,"focusin",ORBEON.xforms.Events.focus);YAHOO.util.Event.addListener(document,"focusout",ORBEON.xforms.Events.blur);YAHOO.util.Event.addListener(document,"change",ORBEON.xforms.Events.change)}}else{if(!ORBEON.xforms.Globals.topLevelListenerRegistered){document.addEventListener("focus",ORBEON.xforms.Events.focus,true);document.addEventListener("blur",ORBEON.xforms.Events.blur,true);document.addEventListener("change",ORBEON.xforms.Events.change,true)}}if(!ORBEON.xforms.Globals.topLevelListenerRegistered){YAHOO.util.Event.addListener(document,"keypress",ORBEON.xforms.Events.keypress);YAHOO.util.Event.addListener(document,"keydown",ORBEON.xforms.Events.keydown);YAHOO.util.Event.addListener(document,"keyup",ORBEON.xforms.Events.keyup);YAHOO.util.Event.addListener(document,"mouseover",ORBEON.xforms.Events.mouseover);YAHOO.util.Event.addListener(document,"mouseout",ORBEON.xforms.Events.mouseout);YAHOO.util.Event.addListener(document,"click",ORBEON.xforms.Events.click);YAHOO.util.Event.addListener(window,"resize",ORBEON.xforms.Events.resize);YAHOO.widget.Overlay.windowScrollEvent.subscribe(ORBEON.xforms.Events.scrollOrResize);YAHOO.widget.Overlay.windowResizeEvent.subscribe(ORBEON.xforms.Events.scrollOrResize)}ORBEON.xforms.Init._setBasePaths(document.getElementsByTagName("script"),ORBEON.util.Utils.getProperty(RESOURCES_VERSIONED)=="true");if(ORBEON.util.Utils.getProperty(SESSION_HEARTBEAT_PROPERTY)){var AR=ORBEON.util.Utils.getProperty(SESSION_HEARTBEAT_DELAY_PROPERTY);if(AR>0){window.setInterval(function(){ORBEON.xforms.Events.sendHeartBeatIfNeeded(AR)},AR/10)}}for(var Ac=0;Ac<document.forms.length;Ac++){var AD=document.forms[Ac];if(ORBEON.util.Dom.hasClass(AD,"xforms-form")){var V=document.forms[Ac].id;ORBEON.util.Dom.removeClass(AD,"xforms-initially-hidden");ORBEON.xforms.Init.registerDraggableListenersOnRepeatElements(AD);ORBEON.xforms.Globals.formErrorPanel[V]=null;ORBEON.xforms.Globals.formLoadingNone[V]=null;var Y=0;for(var T=0;T<AD.childNodes.length;T++){if(Y==3){break}var AI=AD.childNodes[T];if(AI.className=="xforms-loading-loading"){AI.style.display="block";ORBEON.xforms.Globals.formLoadingLoadingOverlay[V]=new YAHOO.widget.Overlay(AI,{visible:false,monitorresize:true});ORBEON.xforms.Globals.formLoadingLoadingInitialRightTop[V]=[YAHOO.util.Dom.getViewportWidth()-YAHOO.util.Dom.getX(AI),YAHOO.util.Dom.getY(AI)];AI.style.right="auto";Y++}else{if(ORBEON.util.Dom.isElement(AI)&&ORBEON.util.Dom.hasClass(AI,"xforms-error-panel")){YAHOO.util.Dom.generateId(AI);ORBEON.util.Dom.removeClass(AI,"xforms-initially-hidden");var AE=new YAHOO.widget.Panel(AI.id);AE.beforeHideEvent.subscribe(ORBEON.xforms.Events.errorPanelClosed,V);ORBEON.xforms.Globals.formErrorPanel[V]=AE;var AB=ORBEON.util.Dom.getChildElementByClass(AI,"hd");var AL=ORBEON.util.Dom.getChildElementByClass(AI,"bd");var Q=ORBEON.util.Dom.getChildElementByClass(AL,"xforms-error-panel-details-hidden");var AN=ORBEON.util.Dom.getChildElementByIndex(ORBEON.util.Dom.getChildElementByIndex(Q,0),0);YAHOO.util.Dom.generateId(AN);var U=ORBEON.util.Dom.getChildElementByClass(AL,"xforms-error-panel-details-shown");var S=ORBEON.util.Dom.getChildElementByIndex(ORBEON.util.Dom.getChildElementByIndex(U,0),0);YAHOO.util.Dom.generateId(S);AE.errorTitleDiv=AB;AE.errorDetailsDiv=ORBEON.util.Dom.getChildElementByClass(U,"xforms-error-panel-details");YAHOO.util.Event.addListener(AN.id,"click",ORBEON.xforms.Events.errorShowHideDetails);YAHOO.util.Event.addListener(S.id,"click",ORBEON.xforms.Events.errorShowHideDetails);var AZ=YAHOO.util.Dom.getElementsByClassName("xforms-error-panel-close",null,AI);if(AZ.length!=0){YAHOO.util.Dom.generateId(AZ[0]);YAHOO.util.Event.addListener(AZ[0].id,"click",ORBEON.xforms.Events.errorCloseClicked,AE)}var W=YAHOO.util.Dom.getElementsByClassName("xforms-error-panel-reload",null,AI);if(W.length!=0){YAHOO.util.Dom.generateId(W[0]);YAHOO.util.Event.addListener(W[0].id,"click",ORBEON.xforms.Events.errorReloadClicked,AE)}AE.cfg.setProperty("width","700px");AE.cfg.setProperty("modal",true);AE.cfg.setProperty("fixedcenter",false);AE.cfg.setProperty("underlay","shadow");AE.cfg.setProperty("visible",false);AE.cfg.setProperty("constraintoviewport",true);AE.cfg.setProperty("draggable",true);AE.cfg.setProperty("close",true);Y++}else{if(AI.className=="xforms-loading-none"){ORBEON.xforms.Globals.formLoadingNone[V]=AI;Y++}}}}var Ab=AD.elements;var AX;var AA;for(var AO=0;AO<Ab.length;AO++){var AS=Ab[AO];if(AS.name.indexOf("$static-state")!=-1){ORBEON.xforms.Globals.formStaticState[V]=AS}else{if(AS.name.indexOf("$dynamic-state")!=-1){ORBEON.xforms.Globals.formDynamicState[V]=AS}else{if(AS.name.indexOf("$server-events")!=-1){ORBEON.xforms.Globals.formServerEvents[V]=AS}else{if(AS.name.indexOf("$client-state")!=-1){ORBEON.xforms.Globals.formClientState[V]=AS;if(AS.value==""){xformsStoreInClientState(V,"initial-dynamic-state",ORBEON.xforms.Globals.formDynamicState[V].value)}}else{if(AS.name.indexOf("$repeat-tree")!=-1){AX=AS}else{if(AS.name.indexOf("$repeat-indexes")!=-1){AA=AS;break}}}}}}}var AF=AX.value;var AT=AF.split(",");for(var X=0;X<AT.length;X++){var Z=AT[X].split(" ");var AC=Z[0];if(Z.length>1){var AW=Z[Z.length-1];ORBEON.xforms.Globals.repeatTreeChildToParent[AC]=AW}}for(var AY in ORBEON.xforms.Globals.repeatTreeChildToParent){var AW=ORBEON.xforms.Globals.repeatTreeChildToParent[AY];while(AW!=null){if(!ORBEON.xforms.Globals.repeatTreeParentToAllChildren[AW]){ORBEON.xforms.Globals.repeatTreeParentToAllChildren[AW]=new Array()}ORBEON.xforms.Globals.repeatTreeParentToAllChildren[AW].push(AY);AW=ORBEON.xforms.Globals.repeatTreeChildToParent[AW]}}var AM=AA.value;var AH=AM.split(",");for(var X=0;X<AH.length;X++){var Z=AH[X].split(" ");var AC=Z[0];var AG=Z[Z.length-1];ORBEON.xforms.Globals.repeatIndexes[AC]=AG}if(xformsGetFromClientState(V,"load-did-run")==null){xformsStoreInClientState(V,"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 P=new ORBEON.xforms.Server.Event(AD,null,null,null,"xxforms-all-events-required");ORBEON.xforms.Server.fireEvents([P],false)}}}}if(!(window.opsXFormsControls===undefined)){var AJ=ORBEON.xforms.Init._getSpecialControlsInitFunctions();for(var Aa in window.opsXFormsControls.controls){if(AJ[Aa]){var R=window.opsXFormsControls.controls[Aa];for(var AU in R){var AQ=AJ[Aa][AU];if(AQ){var AV=R[AU];for(var AP=0;AP<AV.length;AP++){var AK=ORBEON.util.Dom.getElementById(AV[AP]);AQ(AK)}}}}}}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(B){if(B.nodeType==ORBEON.util.Dom.ELEMENT_TYPE){if(ORBEON.util.Dom.hasClass(B,"xforms-select1-appearance-xxforms-autocomplete")){ORBEON.xforms.Init._autoComplete(B)}else{if(ORBEON.util.Dom.hasClass(B,"xforms-textarea")&&ORBEON.util.Dom.hasClass(B,"xforms-mediatype-text-html")){ORBEON.xforms.Init._htmlArea(B)}}for(var C=0;C<B.childNodes.length;C++){var A=B.childNodes[C];if(A.nodeType==ORBEON.util.Dom.ELEMENT_TYPE){ORBEON.xforms.Init.insertedElement(A)}}}},_setBasePaths:function(H,G){for(var D=0;D<H.length;D++){var C=H[D];var J=ORBEON.util.Dom.getAttribute(C,"src");if(J!=null){var I=J.indexOf(PATH_TO_JAVASCRIPT_1);if(I!=-1){var F=J.substr(0,I);ORBEON.xforms.Globals.resourcesBaseURL=F;if(G){ORBEON.xforms.Globals.xformsServerURL=F.substring(0,F.lastIndexOf("/"))+XFORMS_SERVER_PATH}else{ORBEON.xforms.Globals.xformsServerURL=F+XFORMS_SERVER_PATH}break}else{I=J.indexOf(PATH_TO_JAVASCRIPT_2);if(I!=-1){var F=J.substr(0,I);var B=J.substr(I);if(G){var A=/^(\/[^\/]+)(\/[^\/]+)(\/.*)$/.exec(B);var E=A[2];ORBEON.xforms.Globals.resourcesBaseURL=F+E;ORBEON.xforms.Globals.xformsServerURL=F+XFORMS_SERVER_PATH}else{ORBEON.xforms.Globals.resourcesBaseURL=F;ORBEON.xforms.Globals.xformsServerURL=F+XFORMS_SERVER_PATH}break}}}}},_autoComplete:function(C){var D=ORBEON.util.Dom.getChildElementByIndex(C,0);var B=ORBEON.util.Dom.getChildElementByIndex(C,1);var F=new Array();for(var E=1;E<B.options.length;E++){F.push(B.options[E].value)}var A=ORBEON.util.Dom.hasClass(C,"xforms-select1-open-autocomplete-nofilter");ORBEON.xforms.Globals.autoCompleteOpen[C.id]=actb(D,F,A)},_widetextArea:function(A){ORBEON.xforms.Globals.autosizeTextareas.push(A);ORBEON.xforms.Controls.autosizeTextarea(A)},_range:function(B){B.tabIndex=0;ORBEON.xforms.Globals.serverValue[B.id]="0";var A;if(ORBEON.util.Utils.isNewXHTMLLayout()){A=YAHOO.util.Dom.getElementsByClassName("xforms-range-background","div",B)[0]}else{A=B}var C=YAHOO.util.Dom.getElementsByClassName("xforms-range-thumb","div",B)[0];C.id=ORBEON.util.Utils.appendToEffectiveId(B.id,"$$thumb");var D=YAHOO.widget.Slider.getHorizSlider(A.id,C.id,0,200);D.subscribe("change",ORBEON.xforms.Events.sliderValueChange);ORBEON.xforms.Globals.sliderYui[B.id]=D},_addToTree:function(C,A,F,B){for(var D=B;D<A.length;D++){var G=A[D];var K=G[0];var E=G[1];var I=G[2];var H=typeof I=="boolean";var J={label:K,value:E};var L;if(C.xformsAllowMultipleSelection){L=new YAHOO.widget.TaskNode(J,F,false);L.onCheckClick=ORBEON.xforms.Events.treeCheckClick}else{L=new YAHOO.widget.TextNode(J,F,false)}ORBEON.xforms.Init._addToTree(C,G,L,H?3:2);if(H&&I){if(C.value!=""){C.value+=" "}C.value+=E}}},_initTreeDivFromArray:function(B,E,A){var H=E.getRoot();ORBEON.xforms.Init._addToTree(B,A,H,0);if(B.xformsAllowMultipleSelection){var C=B.value.split(" ");var J=E.getNodesByProperty();if(J!=null){for(var G=0;G<J.length;G++){var I=J[G];var D=I.data.value;for(var F=0;F<C.length;F++){if(D==C[F]){I.check();break}}}}}var C=B.xformsAllowMultipleSelection?B.value.split(" "):[B.value];ORBEON.xforms.Controls.treeOpenSelectedVisible(E,C);E.draw()},_tree:function(treeDiv){var controlId=treeDiv.id;if(ORBEON.util.Utils.isNewXHTMLLayout()){treeDiv=treeDiv.getElementsByTagName("div")[0]}treeDiv.xformsAllowMultipleSelection=ORBEON.util.Dom.hasClass(treeDiv,"xforms-select");var treeString=ORBEON.util.Dom.getStringValue(treeDiv);var treeArray=ORBEON.util.String.eval(treeString);ORBEON.util.Dom.setStringValue(treeDiv,"");treeDiv.value="";var yuiTree=new YAHOO.widget.TreeView(treeDiv.id);ORBEON.xforms.Globals.treeYui[controlId]=yuiTree;ORBEON.xforms.Init._initTreeDivFromArray(treeDiv,yuiTree,treeArray);ORBEON.xforms.Globals.serverValue[controlId]=treeDiv.value;if(!treeDiv.xformsAllowMultipleSelection){var selectedNode=yuiTree.getNodeByProperty("value",treeDiv.value);if(selectedNode!=null){YAHOO.util.Dom.addClass(selectedNode.getLabelEl(),"xforms-tree-label-selected")}}yuiTree.subscribe("labelClick",ORBEON.xforms.Events.treeLabelClick);ORBEON.util.Dom.removeClass(ORBEON.util.Utils.isNewXHTMLLayout()?treeDiv.parentNode:treeDiv,"xforms-initially-hidden")},_addToMenuItem:function(H,A,J){if(J.element.id==""){YAHOO.util.Dom.generateId(J.element)}J.clickEvent.subscribe(ORBEON.xforms.Events.menuClick,{menu:H,value:A[1]});if(A.length>3){var E=new YAHOO.widget.Menu(J.element.id+"menu");for(var B=3;B<A.length;B++){var D=A[B];var I=D[0];var C=D[1];var F=D[2];var G=new YAHOO.widget.MenuItem(I);E.addItem(G);ORBEON.xforms.Init._addToMenuItem(H,D,G)}J.cfg.setProperty("submenu",E)}},_menu:function(menu){var yuiMenuDiv;var valuesDiv;for(var j=0;j<menu.childNodes.length;j++){var childNode=menu.childNodes[j];if(childNode.nodeType==ELEMENT_TYPE){if(ORBEON.util.Dom.hasClass(childNode,"yuimenubar")){yuiMenuDiv=childNode}else{if(ORBEON.util.Dom.hasClass(childNode,"xforms-initially-hidden")){valuesDiv=childNode}}}}var menuString=ORBEON.util.Dom.getStringValue(valuesDiv);ORBEON.xforms.Globals.menuItemsets[menu.id]=ORBEON.util.String.eval(menuString);YAHOO.util.Dom.generateId(yuiMenuDiv);var yuiMenu=new YAHOO.widget.MenuBar(yuiMenuDiv.id,{autosubmenudisplay:true,hidedelay:750,lazyload:true});yuiMenu.render();ORBEON.xforms.Globals.menuYui[menu.id]=yuiMenu},_htmlArea:function(A){if(ORBEON.util.Utils.getProperty(HTML_EDITOR_PROPERTY)=="yui"){ORBEON.widgets.RTE.init(A)}else{var B=new FCKeditor(A.name);if(!xformsArrayContains(ORBEON.xforms.Globals.htmlAreaNames,A.name)){ORBEON.xforms.Globals.htmlAreaNames.push(A.name)}B.BasePath=ORBEON.xforms.Globals.resourcesBaseURL+ORBEON.util.Utils.getProperty(FCK_EDITOR_BASE_PATH_PROPERTY);B.ToolbarSet="OPS";var C=typeof USER_LANGUAGE;if(C!="undefined"){B.Config.AutoDetectLanguage=false;B.Config.DefaultLanguage=(USER_LANGUAGE!="")?USER_LANGUAGE:"en"}C=typeof FCK_CUSTOM_CONFIG;if(C!="undefined"){B.Config.CustomConfigurationsPath=B.BasePath+FCK_CUSTOM_CONFIG}if(ORBEON.xforms.Globals.fckEditorLoading){ORBEON.xforms.Globals.fckEditorsToLoad.push(B)}else{ORBEON.xforms.Globals.fckEditorLoading=true;B.ReplaceTextarea();ORBEON.xforms.Controls.updateHTMLAreaClasses(ORBEON.util.Dom.getElementById(B.InstanceName))}}},_list:function(C){var D="";if(ORBEON.util.Utils.isNewXHTMLLayout()){C=YAHOO.util.Dom.getElementsByClassName("","select",C)[0]}for(var B=0;B<C.options.length;B++){var A=C.options[B];if(A.selected){if(D!=""){D+=" "}D+=A.value}}ORBEON.xforms.Globals.serverValue[C.id]=D},_dialog:function(G){var C=ORBEON.util.Dom.hasClass(G,"xforms-dialog-modal");var E=ORBEON.util.Dom.hasClass(G,"xforms-dialog-close-true");var A=ORBEON.util.Dom.hasClass(G,"xforms-dialog-draggable-true");var B=ORBEON.util.Dom.hasClass(G,"xforms-dialog-visible-true");var F=ORBEON.util.Dom.hasClass(G,"xforms-dialog-appearance-minimal");var D;if(F){D=new YAHOO.widget.Dialog(G.id,{modal:C,close:false,visible:false,draggable:false,fixedcenter:false,constraintoviewport:false,underlay:"none"});YAHOO.util.Event.addListener(document.body,"click",ORBEON.xforms.Events.dialogMinimalBodyClick,D)}else{D=new YAHOO.widget.Dialog(G.id,{modal:C,close:E,visible:false,draggable:A,fixedcenter:false,constraintoviewport:false,underlay:"none"});D.showEvent.subscribe(ORBEON.xforms.Events.dialogShow,G.id);D.beforeHideEvent.subscribe(ORBEON.xforms.Events.dialogClose,G.id)}ORBEON.xforms.Globals.dialogs[G.id]=D;if(B){ORBEON.xforms.Controls.showDialog(G.id,null)}}};ORBEON.xforms.Server={Event:function(K,A,G,B,F,H,J,I,E,C,D){this.form=YAHOO.lang.isObject(K)?K:YAHOO.lang.isString(A)?ORBEON.xforms.Controls.getForm(ORBEON.util.Dom.getElementById(A)):null;this.targetId=YAHOO.lang.isUndefined(A)?null:A;this.otherId=YAHOO.lang.isUndefined(G)?null:G;this.value=YAHOO.lang.isUndefined(B)?null:B;this.eventName=YAHOO.lang.isUndefined(F)?null:F;this.bubbles=YAHOO.lang.isUndefined(H)?null:H;this.cancelable=YAHOO.lang.isUndefined(J)?null:J;this.ignoreErrors=YAHOO.lang.isUndefined(I)?null:I;this.showProgress=YAHOO.lang.isBoolean(E)?E:true;this.progressMessage=YAHOO.lang.isUndefined(C)?null:C;this.additionalAttribs=YAHOO.lang.isUndefined(D)?null:D},exceptionWhenTalkingToServer:function(C,A){ORBEON.util.Utils.logMessage("JavaScript error");ORBEON.util.Utils.logMessage(C);var B="Exception in client-side code.";B+="<ul>";if(C.message!=null){B+="<li>Message: "+C.message+"</li>"}if(C.fileName!=null){B+="<li>File: "+C.fileName+"</li>"}if(C.lineNumber!=null){B+="<li>Line number: "+C.lineNumber+"</li>"}B+="</ul>";ORBEON.xforms.Server.showError("Exception in client-side code",B,A)},showError:function(C,A,D){ORBEON.xforms.Events.errorEvent.fire({title:C,details:A});if(!ORBEON.xforms.Globals.requestIgnoreErrors&&ORBEON.util.Utils.getProperty(SHOW_ERROR_DIALOG_PROPERTY)=="true"){var B=ORBEON.xforms.Globals.formErrorPanel[D];if(B){if(YAHOO.util.Dom.hasClass(B.element,"xforms-initially-hidden")){ORBEON.util.Dom.removeClass(B.element,"xforms-initially-hidden");B.render()}B.element.style.display="block";B.errorTitleDiv.innerHTML=C;B.errorDetailsDiv.innerHTML=A;B.show();B.center()}}},fireEvents:function(A,C){if(!ORBEON.xforms.Offline.isOnline){var B=[];for(var F=0;F<A.length;F++){var D=A[F];if(D.eventName=="xxforms-value-change-with-focus-change"){B.push(D);ORBEON.xforms.Offline.controlValues[D.targetId]=D.value}}if(B.length>0){ORBEON.xforms.Offline.memoryOfflineEvents=ORBEON.xforms.Offline.memoryOfflineEvents.concat(B);ORBEON.xforms.Globals.executeEventFunctionQueued++;window.setTimeout(function(){ORBEON.xforms.Globals.executeEventFunctionQueued--;if(ORBEON.xforms.Globals.executeEventFunctionQueued==0){ORBEON.xforms.Offline.evaluateMIPs()}},ORBEON.util.Utils.getProperty(INTERNAL_SHORT_DELAY_PROPERTY))}}else{if(ORBEON.xforms.Globals.modalProgressPanel==null){var E=new Date().getTime();if(ORBEON.xforms.Globals.eventQueue.length==0){ORBEON.xforms.Globals.eventsFirstEventTime=E}for(var F=0;F<A.length;F++){ORBEON.xforms.Globals.eventQueue.push(A[F])}ORBEON.xforms.Globals.executeEventFunctionQueued++;if(C&&!(E-ORBEON.xforms.Globals.eventsFirstEventTime>ORBEON.util.Utils.getProperty(DELAY_BEFORE_FORCE_INCREMENTAL_REQUEST_PROPERTY))){window.setTimeout(function(){ORBEON.xforms.Server.executeNextRequest(false)},ORBEON.util.Utils.getProperty(DELAY_BEFORE_INCREMENTAL_REQUEST_PROPERTY))}else{window.setTimeout(function(){ORBEON.xforms.Server.executeNextRequest(true)},ORBEON.util.Utils.getProperty(INTERNAL_SHORT_DELAY_PROPERTY))}ORBEON.xforms.Globals.lastEventSentTime=new Date().getTime()}}},_debugEventQueue:function(){ORBEON.util.Utils.logMessage("Event queue:");for(var B=0;B<ORBEON.xforms.Globals.eventQueue.length;B++){var A=ORBEON.xforms.Globals.eventQueue[B];ORBEON.util.Utils.logMessage(" "+B+" - name: "+A.eventName+" | targetId: "+A.targetId+" | value: "+A.value)}},executeNextRequest:function(K){K=typeof (K)=="boolean"&&K==true;ORBEON.xforms.Globals.executeEventFunctionQueued--;var U=false;if(!ORBEON.xforms.Globals.requestInProgress&&ORBEON.xforms.Globals.eventQueue.length>0&&(K||ORBEON.xforms.Globals.executeEventFunctionQueued==0)){var Z={};var S=ORBEON.util.Utils.getProperty(CLIENT_EVENTS_FILTER_PROPERTY).split(" ");for(var T=0;T<S.length;T++){Z[S[T]]=true}var W=false;if(ORBEON.util.Utils.getProperty(CLIENT_EVENTS_MODE_PROPERTY)=="deferred"){var L=null;var G=false;eventLoop:for(var T=0;T<ORBEON.xforms.Globals.eventQueue.length;T++){var F=ORBEON.xforms.Globals.eventQueue[T];if(F.eventName=="DOMActivate"){W=true;break eventLoop}if(F.targetId!=null&&Z[F.eventName]==null){var B=ORBEON.util.Dom.getElementById(F.targetId);if(B==null){W=true;break eventLoop}else{if(ORBEON.util.Dom.hasClass(B,"xxforms-events-mode-default")){W=true;break eventLoop}var R=B.parentNode;var O=false;while(R!=null){if(R.nodeType==ELEMENT_TYPE&&ORBEON.util.Dom.hasClass(R,"xxforms-events-mode-default")){O=true;if(G){W=true;break eventLoop}if(L==null){L=R}else{if(L!=R){W=true;break eventLoop}}break}R=R.parentNode}if(!O){G=true;if(L!=null){W=true;break eventLoop}}}}}}else{var W=true}if(W){var P={};var V=[];for(var T=0;T<ORBEON.xforms.Globals.eventQueue.length;T++){var F=ORBEON.xforms.Globals.eventQueue[T];if(Z[F.eventName]==null){if(F.eventName=="xxforms-value-change-with-focus-change"){if(P[F.targetId]==null){if(ORBEON.util.Dom.hasClass(ORBEON.util.Dom.getElementById(F.targetId),"xforms-upload")||(ORBEON.xforms.Globals.serverValue[F.targetId]!="undefined"&&ORBEON.xforms.Globals.serverValue[F.targetId]!=F.value)){P[F.targetId]=F;ORBEON.xforms.Globals.serverValue[F.targetId]=F.value;V.push(F)}}else{P[F.targetId].value=F.value;ORBEON.xforms.Globals.serverValue[F.targetId]=F.value}}else{P={};V.push(F)}}}ORBEON.xforms.Globals.eventQueue=V;if(ORBEON.xforms.Globals.eventQueue.length>0){ORBEON.xforms.Globals.requestForm=ORBEON.xforms.Globals.eventQueue[0].form;var J=ORBEON.xforms.Globals.requestForm.id;for(var M in ORBEON.xforms.Globals.changedIdsRequest){if(ORBEON.xforms.Globals.changedIdsRequest[M]==0){ORBEON.xforms.Globals.changedIdsRequest[M]=null}}ORBEON.xforms.Globals.requestIgnoreErrors=true;var H=false;var I=false;var N;for(var T=0;T<ORBEON.xforms.Globals.eventQueue.length;T++){var F=ORBEON.xforms.Globals.eventQueue[T];if(!F.ignoreErrors){ORBEON.xforms.Globals.requestIgnoreErrors=false}if(F.eventName=="xxforms-all-events-required"||F.eventName=="xxforms-offline"){H=true}if(F.showProgress){I=true}if(YAHOO.lang.isString(F.progressMessage)){N=T==0?F.progressMessage:N==F.progressMessage?F.progressMessage:null}else{N=null}if(F.eventName=="DOMActivate"){var D=ORBEON.util.Dom.getElementById(F.targetId);if(ORBEON.util.Dom.hasClass(D,"xxforms-offline")){H=true}}}ORBEON.xforms.Globals.requestInProgress=true;if(I){var AA=ORBEON.util.Utils.getProperty(DELAY_BEFORE_DISPLAY_LOADING_PROPERTY);if(AA==0){xformsDisplayLoading(N)}else{window.setTimeout(function(){xformsDisplayLoading(N)},AA)}}var C=[];C.push('<!DOCTYPE xxforms:event-request [<!ENTITY nbsp "&#160;">]>\n');var Q="    ";C.push('<xxforms:event-request xmlns:xxforms="http://orbeon.org/oxf/xml/xforms">\n');C.push(Q);C.push("<xxforms:static-state>");C.push(ORBEON.xforms.Globals.formStaticState[J].value);C.push("</xxforms:static-state>\n");C.push(Q);C.push("<xxforms:dynamic-state>");C.push(ORBEON.xforms.Globals.formDynamicState[J].value);C.push("</xxforms:dynamic-state>\n");if(H){C.push(Q);C.push("<xxforms:initial-dynamic-state>");C.push(xformsGetFromClientState(J,"initial-dynamic-state"));C.push("</xxforms:initial-dynamic-state>\n")}var Y=[];for(var E=0;E<ORBEON.xforms.Globals.eventQueue.length;E++){var F=ORBEON.xforms.Globals.eventQueue[E];if(ORBEON.xforms.Controls.getForm(F.form)==ORBEON.xforms.Globals.requestForm){if(F.eventName=="server-events"){C.push(Q);C.push("<xxforms:server-events>");C.push(F.value);C.push("</xxforms:server-events>");Y.unshift(E)}}}C.push(Q);C.push("<xxforms:action>\n");for(var E=0;E<ORBEON.xforms.Globals.eventQueue.length;E++){var F=ORBEON.xforms.Globals.eventQueue[E];if(ORBEON.xforms.Controls.getForm(F.form)==ORBEON.xforms.Globals.requestForm&&F.eventName!="server-events"){C.push(Q+Q);C.push("<xxforms:event");C.push(' name="'+F.eventName+'"');if(F.targetId!=null){C.push(' source-control-id="'+F.targetId+'"')}if(F.otherId!=null){C.push(' other-control-id="'+F.otherId+'"')}if(F.additionalAttribs!=null){for(var X=0;X<F.additionalAttribs.length-1;X+=2){C.push(" "+F.additionalAttribs[X]+'="'+F.additionalAttribs[X+1]+'"')}}C.push(">");if(F.value!=null){if(typeof F.value=="string"){F.value=F.value.replace(XFORMS_REGEXP_AMPERSAND,"&amp;");F.value=F.value.replace(XFORMS_REGEXP_OPEN_ANGLE,"&lt;")}C.push(F.value)}C.push("</xxforms:event>\n");Y.unshift(E)}}C.push(Q);C.push("</xxforms:action>\n");C.push("</xxforms:event-request>");for(var E=0;E<Y.length;E++){ORBEON.xforms.Globals.eventQueue.splice(Y[E],1)}U=true;ORBEON.xforms.Globals.requestRetries=ORBEON.util.Utils.getProperty(REQUEST_RETRIES_PROPERTY);ORBEON.xforms.Globals.requestDocument=C.join("");ORBEON.xforms.Server.asyncRequest()}}}if(!U&&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 B=ORBEON.util.Utils.getProperty(DELAY_BEFORE_AJAX_TIMEOUT_PROPERTY);if(B!=-1){C.timeout=B}YAHOO.util.Connect.asyncRequest("POST",ORBEON.xforms.Globals.xformsServerURL,C,ORBEON.xforms.Globals.requestDocument)}catch(A){ORBEON.xforms.Globals.requestInProgress=false;ORBEON.xforms.Server.exceptionWhenTalkingToServer(A,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 A=ORBEON.xforms.Globals.requestForm.id;var B="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",B,A)},ORBEON.util.Utils.getProperty(DELAY_BEFORE_GECKO_COMMUNICATION_ERROR_PROPERTY))}else{ORBEON.xforms.Server.showError("Error while processing response",B,A)}}},handleUploadResponse:function(C){var D=YAHOO.util.Dom.getElementsByClassName("xforms-upload","span");for(var A=0;A<D.length;A++){var B=D[A];if(ORBEON.util.Dom.hasClass(B,"xforms-upload-state-empty")){ORBEON.util.Dom.clearUploadControl(B)}}ORBEON.xforms.Server.handleResponseAjax(C)},handleResponseAjax:function(D){var E=D.responseXML;if(!YAHOO.lang.isUndefined(D.getResponseHeader)&&YAHOO.lang.trim(D.getResponseHeader["Content-Type"])=="text/html"){if(dojox&&dojox.html&&dojox.html.set){var C=document.createElement("div");C.innerHTML=D.responseText;var H=ORBEON.util.Dom.getChildElementByIndex(C,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,D.responseText,{renderStyles:false,executeScripts:true,adjustPaths:true,referencePath:"/"});ORBEON.xforms.Init.document()}}else{if(!E||(E&&E.documentElement&&E.documentElement.tagName.toLowerCase()=="html")){var F=D.responseText.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&");E=ORBEON.util.Dom.stringToDom(F)}var G=ORBEON.xforms.Globals.requestForm.id;var B=ORBEON.xforms.Server.hasReturningServerEvents(E);if(!B){ORBEON.util.Utils.hideModalProgressPanel()}ORBEON.xforms.Server.handleResponseDom(E,G);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)}},hasReturningServerEvents:function(B){if(B&&B.documentElement&&B.documentElement.tagName.indexOf("event-response")!=-1){var D=B.documentElement;for(var E=0;E<D.childNodes.length;E++){if(ORBEON.util.Utils.getLocalName(D.childNodes[E])=="action"){var C=D.childNodes[E];var H=null;var I=null;for(var A=0;A<C.childNodes.length;A++){var F=C.childNodes[A];var G=ORBEON.util.Utils.getLocalName(F);if(G=="server-events"){H=F}else{if(G=="submission"){I=F}}if(H&&I){break}}if(H&&!I){return true}else{if(H){var J=ORBEON.util.Dom.getAttribute(I,"replace");if(J=="instance"||J=="all"&&ORBEON.util.Dom.getAttribute(I,"target")==null){return true}}}break}}}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)}}if(ORBEON.xforms.Globals.isRenderingEngineWebCore13){ORBEON.xforms.Init.registerChangeListenerOnFormElements()}ORBEON.xforms.Init.registerDraggableListenersOnRepeatElements()}var deleteRepeatTemplateElements=ORBEON.util.Dom.getElementsByName(controlValuesElement,"delete-repeat-elements",xmlNamespace);var deleteRepeatTemplateElementsLength=deleteRepeatTemplateElements.length;for(var j=0;j<deleteRepeatTemplateElementsLength;j++){var deleteElementElement=deleteRepeatTemplateElements[j];var deleteId=ORBEON.util.Dom.getAttribute(deleteElementElement,"id");var parentIndexes=ORBEON.util.Dom.getAttribute(deleteElementElement,"parent-indexes");var count=ORBEON.util.Dom.getAttribute(deleteElementElement,"count");var repeatEnd=ORBEON.util.Dom.getElementById("repeat-end-"+ORBEON.util.Utils.appendRepeatSuffix(deleteId,parentIndexes));var lastElementToDelete;lastElementToDelete=repeatEnd.previousSibling;if(parentIndexes==""){while(true){if(lastElementToDelete.nodeType==ELEMENT_TYPE&&ORBEON.util.Dom.hasClass(lastElementToDelete,"xforms-repeat-delimiter")&&!ORBEON.util.Dom.hasClass(lastElementToDelete,"xforms-repeat-template")){break}lastElementToDelete=lastElementToDelete.previousSibling}lastElementToDelete=lastElementToDelete.previousSibling}for(var countIndex=0;countIndex<count;countIndex++){var nestedRepeatLevel=0;while(true){var wasDelimiter=false;if(lastElementToDelete.nodeType==ELEMENT_TYPE){if(ORBEON.util.Dom.hasClass(lastElementToDelete,"xforms-repeat-begin-end")&&lastElementToDelete.id.indexOf("repeat-end-")==0){nestedRepeatLevel++}else{if(ORBEON.util.Dom.hasClass(lastElementToDelete,"xforms-repeat-begin-end")&&lastElementToDelete.id.indexOf("repeat-begin-")==0){nestedRepeatLevel--}else{wasDelimiter=nestedRepeatLevel==0&&ORBEON.util.Dom.hasClass(lastElementToDelete,"xforms-repeat-delimiter")}}}var previous=lastElementToDelete.previousSibling;if(lastElementToDelete.nodeType==ELEMENT_TYPE){YAHOO.util.Dom.getElementsByClassName("xforms-control",null,lastElementToDelete,function(control){ORBEON.xforms.Globals.serverValue[control.id]=null});if(YAHOO.util.Dom.hasClass(lastElementToDelete,"xforms-control")){ORBEON.xforms.Globals.serverValue[lastElementToDelete.id]=null}}lastElementToDelete.parentNode.removeChild(lastElementToDelete);lastElementToDelete=previous;if(wasDelimiter){break}}}}}}var controlsWithUpdatedItemsets={};for(var actionIndex=0;actionIndex<actionElement.childNodes.length;actionIndex++){if(ORBEON.util.Utils.getLocalName(actionElement.childNodes[actionIndex])=="itemsets"){var itemsetsElement=actionElement.childNodes[actionIndex];for(var j=0;j<itemsetsElement.childNodes.length;j++){if(ORBEON.util.Utils.getLocalName(itemsetsElement.childNodes[j])=="itemset"){var itemsetElement=itemsetsElement.childNodes[j];var itemsetTree=ORBEON.util.String.eval(ORBEON.util.Dom.getStringValue(itemsetElement));var controlId=ORBEON.util.Dom.getAttribute(itemsetElement,"id");var documentElement=ORBEON.util.Dom.getElementById(controlId);var documentElementClasses=documentElement.className.split(" ");controlsWithUpdatedItemsets[controlId]=true;if(ORBEON.util.Dom.hasClass(documentElement,"xforms-select1-open")){var newValues=new Array();for(var topIndex=0;topIndex<itemsetTree.length;topIndex++){newValues.push(itemsetTree[topIndex][1])}var textfield=ORBEON.util.Dom.getChildElementByIndex(documentElement,0);textfield.actb_keywords=newValues;var lastKeyCode=ORBEON.xforms.Globals.autoCompleteLastKeyCode[documentElement.id];if(lastKeyCode!=null){ORBEON.xforms.Globals.autoCompleteOpen[documentElement.id](lastKeyCode)}}else{if(ORBEON.util.Dom.hasClass(documentElement,"xforms-select-appearance-xxforms-tree")||ORBEON.util.Dom.hasClass(documentElement,"xforms-select1-appearance-xxforms-tree")){var yuiTree=ORBEON.xforms.Globals.treeYui[documentElement.id];var yuiRoot=yuiTree.getRoot();yuiTree.removeChildren(yuiRoot);yuiRoot.expand();ORBEON.xforms.Init._initTreeDivFromArray(documentElement,yuiTree,itemsetTree)}else{if(ORBEON.util.Dom.hasClass(documentElement,"xforms-select1-appearance-compact")||ORBEON.util.Dom.hasClass(documentElement,"xforms-select-appearance-compact")||ORBEON.util.Dom.hasClass(documentElement,"xforms-select1-appearance-minimal")){var select=ORBEON.util.Utils.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,selectedValues){var selected=xformsArrayContains(selectedValues,value);return'<option value="'+ORBEON.util.String.escapeAttribute(value)+'"'+(selected?' selected="selected"':"")+">"+label+"</option>"}var sb=new Array();for(var topIndex=0;topIndex<itemsetTree.length;topIndex++){var itemElement=itemsetTree[topIndex];var label=itemElement[0];var value=itemElement[1];if(itemElement.length>2){sb[sb.length]='<optgroup label="'+ORBEON.util.String.escapeAttribute(label)+'">';for(var innerIndex=2;innerIndex<itemElement.length;innerIndex++){var itemElementOption=itemElement[innerIndex];sb[sb.length]=generateOption(itemElementOption[0],itemElementOption[1],selectedValues)}sb[sb.length]="</optgroup>"}else{sb[sb.length]=generateOption(label,value,selectedValues)}}if(ORBEON.xforms.Globals.isRenderingEngineTrident){YAHOO.util.Event.removeListener(select,"change");var selectOpeningTag=select.outerHTML.substring(0,select.outerHTML.indexOf(">")+1);select.outerHTML=selectOpeningTag+sb.join("")+"</select>";select=YAHOO.util.Dom.get(controlId);if(ORBEON.util.Utils.isNewXHTMLLayout()){select=documentElement.getElementsByTagName("select")[0]}ORBEON.xforms.Globals.idToElement[controlId]=select;ORBEON.xforms.Init.registerChangeListenerOnFormElement(select)}else{select.innerHTML=sb.join("")}}else{var template=ORBEON.util.Dom.hasClass(documentElement,"xforms-select")?ORBEON.util.Dom.getElementById("xforms-select-full-template"):ORBEON.util.Dom.getElementById("xforms-select1-full-template");template=ORBEON.util.Dom.getChildElementByIndex(template,0);var spanContainer=ORBEON.util.Utils.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(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=type=="{http://www.w3.org/2001/XMLSchema}date"||type=="{http://www.w3.org/2002/xforms}date";var isTimeType=type=="{http://www.w3.org/2001/XMLSchema}time"||type=="{http://www.w3.org/2002/xforms}time";var isDateTimeType=type=="{http://www.w3.org/2001/XMLSchema}dateTime"||type=="{http://www.w3.org/2002/xforms}dateTime";var isBooleanType=type=="{http://www.w3.org/2001/XMLSchema}boolean"||type=="{http://www.w3.org/2002/xforms}boolean";var isStringType=type==""||type=="{http://www.w3.org/2001/XMLSchema}string"||type=="{http://www.w3.org/2002/xforms}string";var isRecognizedType=isDateType||isTimeType||isDateTimeType||isBooleanType||isStringType;if(isRecognizedType){recreatedInput=true;ORBEON.util.Dom.removeClass(documentElement,"xforms-type-string");ORBEON.util.Dom.removeClass(documentElement,"xforms-type-date");ORBEON.util.Dom.removeClass(documentElement,"xforms-type-time");ORBEON.util.Dom.removeClass(documentElement,"xforms-type-dateTime");ORBEON.util.Dom.removeClass(documentElement,"xforms-type-boolean");ORBEON.util.Dom.removeClass(documentElement,"xforms-incremental");var isMinimal=ORBEON.util.Dom.hasClass(documentElement,"xforms-input-appearance-minimal");var lastLabelPosition=-1;var childElements=YAHOO.util.Dom.getChildren(documentElement);for(var childIndex=0;childIndex<childElements.length;childIndex++){var childElement=childElements[childIndex];var childTagName=childElement.tagName.toLowerCase();if(!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}function insertInputs(inputs){insertIntoDocument(inputs);if(ORBEON.xforms.Globals.isRenderingEngineTrident){for(var inputIndex=0;inputIndex<inputs.length;inputIndex++){ORBEON.xforms.Init.registerChangeListenerOnFormElement(inputs[inputIndex])}}}if(isStringType){insertInputs([createInput("xforms-type-string",1)]);ORBEON.util.Dom.addClass(documentElement,"xforms-type-string")}else{if(isDateType&&!isMinimal){insertInputs([createInput("xforms-type-date",1)]);ORBEON.util.Dom.addClass(documentElement,"xforms-type-date")}else{if(isDateType&&isMinimal){var image=document.createElement("img");image.setAttribute("src",ORBEON.xforms.Globals.resourcesBaseURL+"/ops/images/xforms/calendar.png");image.className="xforms-input-input xforms-type-date xforms-input-appearance-minimal";insertIntoDocument([image]);ORBEON.util.Dom.addClass(documentElement,"xforms-type-date")}else{if(isTimeType){insertInputs([createInput("xforms-type-time",1)]);ORBEON.util.Dom.addClass(documentElement,"xforms-type-time")}else{if(isDateTimeType){insertInputs([createInput("xforms-type-date",1),createInput("xforms-type-time",2)]);ORBEON.util.Dom.addClass(documentElement,"xforms-type-dateTime")}else{if(isBooleanType){var template=ORBEON.util.Dom.getElementById("xforms-select-full-template");template=ORBEON.util.Dom.getChildElementByIndex(template,0);var templateClone=template.cloneNode(true);var templateLabelElement=templateClone.getElementsByTagName("label")[0];templateLabelElement.parentNode.removeChild(templateLabelElement);insertIntoDocument([templateClone]);ORBEON.util.Utils.stringReplace(templateClone,"$xforms-template-value$","true");var itemEffectiveId=ORBEON.util.Utils.appendToEffectiveId(controlId,"$$e0");ORBEON.util.Utils.stringReplace(templateClone,"$xforms-item-effective-id$",itemEffectiveId);ORBEON.util.Utils.stringReplace(templateClone,"$xforms-effective-id$",controlId);ORBEON.util.Dom.addClass(documentElement,"xforms-type-boolean");ORBEON.util.Dom.addClass(documentElement,"xforms-input-appearance-minimal");ORBEON.util.Dom.addClass(documentElement,"xforms-type-boolean");ORBEON.util.Dom.addClass(documentElement,"xforms-incremental")}}}}}}}}if(readonly!=null&&!isStaticReadonly){ORBEON.xforms.Controls.setReadonly(documentElement,readonly=="true")}if(classes!=null){var classesArray=classes.split(" ");for(var classIndex=0;classIndex<classesArray.length;classIndex++){var currentClass=classesArray[classIndex];if(currentClass.charAt(0)=="-"){ORBEON.util.Dom.removeClass(documentElement,currentClass.substring(1))}else{ORBEON.util.Dom.addClass(documentElement,currentClass.charAt(0)=="+"?currentClass.substring(1):currentClass)}}}if(isLeafControl){if(ORBEON.util.Dom.hasClass(documentElement,"xforms-upload")){var state=ORBEON.util.Dom.getAttribute(controlElement,"state");var filename=ORBEON.util.Dom.getAttribute(controlElement,"filename");var mediatype=ORBEON.util.Dom.getAttribute(controlElement,"mediatype");var size=ORBEON.util.Dom.getAttribute(controlElement,"size");ORBEON.xforms.Controls.setCurrentValue(documentElement,newControlValue,state,filename,mediatype,size)}else{if(ORBEON.util.Dom.hasClass(documentElement,"xforms-output")||ORBEON.util.Dom.hasClass(documentElement,"xforms-static")){ORBEON.xforms.Controls.setCurrentValue(documentElement,newControlValue)}else{if(ORBEON.util.Dom.hasClass(documentElement,"xforms-trigger")||ORBEON.util.Dom.hasClass(documentElement,"xforms-submit")){}else{var currentValue=ORBEON.xforms.Controls.getCurrentValue(documentElement);if(currentValue!=null){previousServerValue=ORBEON.util.String.normalizeSerializedHTML(previousServerValue);currentValue=ORBEON.util.String.normalizeSerializedHTML(currentValue);newControlValue=ORBEON.util.String.normalizeSerializedHTML(newControlValue);var isInput=ORBEON.util.Dom.hasClass(documentElement,"xforms-input");var inputSize=isInput?ORBEON.util.Dom.getAttribute(controlElement,"size"):null;var inputLength=isInput?ORBEON.util.Dom.getAttribute(controlElement,"maxlength"):null;var inputAutocomplete=isInput?ORBEON.util.Dom.getAttribute(controlElement,"autocomplete"):null;var 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);ORBEON.xforms.Globals.serverValue[documentElement.id]=ORBEON.xforms.Controls.getCurrentValue(documentElement)}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 attributeElements=ORBEON.util.Dom.getElementsByName(controlValuesElement,"attribute",xmlNamespace);var attributeElementslength=attributeElements.length;for(var j=0;j<attributeElementslength;j++){var attributeElement=attributeElements[j];var newAttributeValue=ORBEON.util.Dom.getStringValue(attributeElement);var forAttribute=ORBEON.util.Dom.getAttribute(attributeElement,"for");var nameAttribute=ORBEON.util.Dom.getAttribute(attributeElement,"name");var htmlElement=ORBEON.util.Dom.getElementById(forAttribute);if(htmlElement!=null){ORBEON.util.Dom.setAttribute(htmlElement,nameAttribute,newAttributeValue)}}var textElements=ORBEON.util.Dom.getElementsByName(controlValuesElement,"text",xmlNamespace);var textElementslength=textElements.length;for(var j=0;j<textElementslength;j++){var textElement=textElements[j];var newTextValue=ORBEON.util.Dom.getStringValue(textElement);var forAttribute=ORBEON.util.Dom.getAttribute(textElement,"for");var htmlElement=ORBEON.util.Dom.getElementById(forAttribute);if(htmlElement!=null&&htmlElement.tagName.toLowerCase()=="title"){document.title=newTextValue}}var repeatIterationElements=ORBEON.util.Dom.getElementsByName(controlValuesElement,"repeat-iteration",xmlNamespace);var repeatIterationElementslength=repeatIterationElements.length;for(var j=0;j<repeatIterationElementslength;j++){var repeatIterationElement=repeatIterationElements[j];var repeatId=ORBEON.util.Dom.getAttribute(repeatIterationElement,"id");var iteration=ORBEON.util.Dom.getAttribute(repeatIterationElement,"iteration");var relevant=ORBEON.util.Dom.getAttribute(repeatIterationElement,"relevant");if(relevant!=null){ORBEON.xforms.Controls.setRepeatIterationRelevance(repeatId,iteration,relevant=="true"?true:false)}}var divsElements=ORBEON.util.Dom.getElementsByName(controlValuesElement,"div",xmlNamespace);var divElementslength=divsElements.length;for(var j=0;j<divElementslength;j++){var divElement=divsElements[j];var controlId=ORBEON.util.Dom.getAttribute(divElement,"id");var visible=ORBEON.util.Dom.getAttribute(divElement,"visibility")=="visible";var neighbor=ORBEON.util.Dom.getAttribute(divElement,"neighbor");var yuiDialog=ORBEON.xforms.Globals.dialogs[controlId];var children=new Array();if(yuiDialog==null){var caseBeginId="xforms-case-begin-"+controlId;var caseBegin=ORBEON.util.Dom.getElementById(caseBeginId);var caseBeginParent=caseBegin.parentNode;var foundCaseBegin=false;for(var childId=0;caseBeginParent.childNodes.length;childId++){var cursor=caseBeginParent.childNodes[childId];if(!foundCaseBegin){if(cursor.id==caseBegin.id){foundCaseBegin=true}else{continue}}if(cursor.nodeType==ELEMENT_TYPE){if(cursor.id=="xforms-case-end-"+controlId){break}if(visible){ORBEON.util.Dom.addClass(cursor,"xforms-case-selected");ORBEON.util.Dom.removeClass(cursor,"xforms-case-deselected");ORBEON.util.Dom.removeClass(cursor,"xforms-case-deselected-subsequent");ORBEON.util.Dom.nudgeAferDelay(cursor)}else{ORBEON.util.Dom.addClass(cursor,"xforms-case-deselected-subsequent");ORBEON.util.Dom.removeClass(cursor,"xforms-case-selected")}children[children.length]=cursor}}}else{if(visible){ORBEON.xforms.Controls.showDialog(controlId,neighbor);children[0]=ORBEON.util.Dom.getElementById(controlId)}else{yuiDialog.hide();yuiDialog.element.style.display="none"}}if(children.length>0&&ORBEON.xforms.Globals.isRenderingEngineGecko&&!ORBEON.xforms.Globals.isFF3&&ORBEON.xforms.Globals.htmlAreaNames.length>0){for(var childIndex=0;childIndex<children.length;childIndex++){var child=children[childIndex];var textHTMLElements=YAHOO.util.Dom.getElementsByClassName("xforms-mediatype-text-html",null,child);if(textHTMLElements!=null&&textHTMLElements.length>0){for(var htmlElementIndex=0;htmlElementIndex<textHTMLElements.length;htmlElementIndex++){var htmlElement=textHTMLElements[htmlElementIndex];if(htmlElement.name!=null&&htmlElement.name!=""&&ORBEON.util.Dom.hasClass(htmlElement,"xforms-textarea")){var editor=FCKeditorAPI.GetInstance(htmlElement.name);if(editor!=null){try{editor.EditorDocument.designMode="on"}catch(e){}}}}}}}}break;case"repeat-indexes":var repeatIndexesElement=actionElement.childNodes[actionIndex];var newRepeatIndexes=new Array();for(var j=0;j<repeatIndexesElement.childNodes.length;j++){if(ORBEON.util.Utils.getLocalName(repeatIndexesElement.childNodes[j])=="repeat-index"){var repeatIndexElement=repeatIndexesElement.childNodes[j];var repeatId=ORBEON.util.Dom.getAttribute(repeatIndexElement,"id");var newIndex=ORBEON.util.Dom.getAttribute(repeatIndexElement,"new-index");newRepeatIndexes[repeatId]=newIndex}}for(var repeatId in newRepeatIndexes){if(typeof repeatId=="string"){var children=ORBEON.xforms.Globals.repeatTreeParentToAllChildren[repeatId];if(children!=null){for(var childIndex in children){var child=children[childIndex];if(!newRepeatIndexes[child]){newRepeatIndexes[child]=ORBEON.xforms.Globals.repeatIndexes[child]}}}}}for(var repeatId in newRepeatIndexes){if(typeof repeatId=="string"){var oldIndex=ORBEON.xforms.Globals.repeatIndexes[repeatId];if(typeof oldIndex=="string"&&oldIndex!=0){var oldItemDelimiter=ORBEON.util.Utils.findRepeatDelimiter(repeatId,oldIndex);if(oldItemDelimiter!=null){var cursor=oldItemDelimiter.nextSibling;while(cursor.nodeType!=ELEMENT_TYPE||(!YAHOO.util.Dom.hasClass(cursor,"xforms-repeat-delimiter")&&!YAHOO.util.Dom.hasClass(cursor,"xforms-repeat-begin-end"))){if(cursor.nodeType==ELEMENT_TYPE){YAHOO.util.Dom.removeClass(cursor,ORBEON.util.Utils.getClassForRepeatId(repeatId))}cursor=cursor.nextSibling}}}}}for(var repeatId in newRepeatIndexes){var newIndex=newRepeatIndexes[repeatId];ORBEON.xforms.Globals.repeatIndexes[repeatId]=newIndex}for(var repeatId in newRepeatIndexes){if(typeof repeatId=="string"){var newIndex=newRepeatIndexes[repeatId];if(typeof newIndex=="string"&&newIndex!=0){var newItemDelimiter=ORBEON.util.Utils.findRepeatDelimiter(repeatId,newIndex);var cursor=newItemDelimiter.nextSibling;while(cursor.nodeType!=ELEMENT_TYPE||(!YAHOO.util.Dom.hasClass(cursor,"xforms-repeat-delimiter")&&!YAHOO.util.Dom.hasClass(cursor,"xforms-repeat-begin-end"))){if(cursor.nodeType==ELEMENT_TYPE){YAHOO.util.Dom.addClass(cursor,ORBEON.util.Utils.getClassForRepeatId(repeatId))}cursor=cursor.nextSibling}}}}break;case"server-events":var serverEventsElement=actionElement.childNodes[actionIndex];var delay=ORBEON.util.Dom.getAttribute(serverEventsElement,"delay");var showProgress=ORBEON.util.Dom.getAttribute(serverEventsElement,"show-progress");showProgress=YAHOO.lang.isNull(showProgress)||showProgress=="true";var progressMessage=ORBEON.util.Dom.getAttribute(serverEventsElement,"progress-message");if(delay==null){serverEventsIndex=actionIndex}else{var serverEvents=ORBEON.util.Dom.getStringValue(serverEventsElement);window.setTimeout(function(){var event=new ORBEON.xforms.Server.Event(ORBEON.util.Dom.getElementById(formID),null,null,serverEvents,"server-events",null,null,null,showProgress,progressMessage);ORBEON.xforms.Server.fireEvents([event])},delay)}break;case"submission":var submissionElement=actionElement.childNodes[actionIndex];var showProgress=ORBEON.util.Dom.getAttribute(submissionElement,"show-progress");var replace=ORBEON.util.Dom.getAttribute(submissionElement,"replace");var target=ORBEON.util.Dom.getAttribute(submissionElement,"target");if(replace==null){replace="all"}if(serverEventsIndex!=-1){ORBEON.xforms.Globals.formServerEvents[formID].value=ORBEON.util.Dom.getStringValue(actionElement.childNodes[serverEventsIndex])}else{ORBEON.xforms.Globals.formServerEvents[formID].value=""}var requestForm=ORBEON.util.Dom.getElementById(formID);if(replace=="all"){if(showProgress!="false"){newDynamicStateTriggersReplace=true}if(target==null){requestForm.removeAttribute("target")}else{requestForm.target=target}requestForm.submit()}else{YAHOO.util.Connect.setForm(requestForm,true,true);var callback={upload:ORBEON.xforms.Server.handleUploadResponse,failure:ORBEON.xforms.Server.handleFailure};YAHOO.util.Connect.asyncRequest("POST",ORBEON.xforms.Globals.xformsServerURL,callback)}ORBEON.xforms.Globals.formServerEvents[formID].value="";break;case"message":var messageElement=actionElement.childNodes[actionIndex];var message=ORBEON.util.Dom.getStringValue(messageElement);if(ORBEON.util.Dom.getAttribute(messageElement,"level")=="modal"){alert(message)}break;case"load":var loadElement=actionElement.childNodes[actionIndex];var resource=ORBEON.util.Dom.getAttribute(loadElement,"resource");var show=ORBEON.util.Dom.getAttribute(loadElement,"show");var target=ORBEON.util.Dom.getAttribute(loadElement,"target");var showProcess=ORBEON.util.Dom.getAttribute(loadElement,"show-progress");if(show=="replace"){if(target==null){if(resource.charAt(0)!="#"&&showProcess!="false"){newDynamicStateTriggersReplace=true}try{window.location.href=resource}catch(e){}}else{window.open(resource,target)}}else{window.open(resource,"_blank")}break;case"setfocus":var setfocusElement=actionElement.childNodes[actionIndex];var controlId=ORBEON.util.Dom.getAttribute(setfocusElement,"control-id");ORBEON.xforms.Controls.setFocus(controlId);break;case"script":var scriptElement=actionElement.childNodes[actionIndex];var functionName=ORBEON.util.Dom.getAttribute(scriptElement,"name");var targetId=ORBEON.util.Dom.getAttribute(scriptElement,"target-id");var observerId=ORBEON.util.Dom.getAttribute(scriptElement,"observer-id");ORBEON.xforms.Server.callUserScript(functionName,targetId,observerId);break;case"help":var helpElement=actionElement.childNodes[actionIndex];var controlId=ORBEON.util.Dom.getAttribute(helpElement,"control-id");var control=ORBEON.util.Dom.getElementById(controlId);ORBEON.xforms.Controls.showHelp(control);break;case"offline":var offlineElement=actionElement.childNodes[actionIndex];var eventsElements=ORBEON.util.Dom.getElementsByName(offlineElement,"events",xmlNamespace);var mappingsElements=ORBEON.util.Dom.getElementsByName(offlineElement,"mappings",xmlNamespace);if(eventsElements.length!=0&&mappingsElements.length!=0){var replayResponse=ORBEON.util.Dom.getStringValue(eventsElements[0]);var mappings=ORBEON.util.Dom.getStringValue(mappingsElements[0]);ORBEON.xforms.Offline.takeOffline(replayResponse,formID,mappings)}}}}}}}if(newDynamicStateTriggersReplace){xformsDisplayIndicator("loading");ORBEON.xforms.Globals.loadingOtherPage=true}}else{if(responseXML&&responseXML.documentElement&&responseXML.documentElement.tagName.indexOf("error")!=-1){var title=ORBEON.util.Dom.getStringValue(ORBEON.util.Dom.getElementsByName(responseXML.documentElement,"title",null)[0]);var details=ORBEON.util.Dom.getStringValue(ORBEON.util.Dom.getElementsByName(responseXML.documentElement,"body",null)[0]);ORBEON.xforms.Server.showError(title,details,formID)}else{ORBEON.xforms.Globals.lastRequestIsError=true;ORBEON.xforms.Server.showError("Server didn't respond with valid XML","Server didn't respond with valid XML",formID)}}}catch(e){ORBEON.xforms.Server.exceptionWhenTalkingToServer(e,formID);throw e}},callUserScript:function(functionName,targetId,observerId){function getElement(id){var element=YAHOO.util.Dom.get(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,B,E){ORBEON.xforms.DnD.DraggableItem.superclass.constructor.call(this,D,D.tagName,E);YAHOO.util.Dom.setStyle(D,"cursor","move");var A=this.getDragEl();if(!YAHOO.util.Dom.hasClass(A.parentNode,"xforms-form")){var C=ORBEON.xforms.Controls.getForm(D);C.appendChild(A)}}};YAHOO.extend(ORBEON.xforms.DnD.DraggableItem,YAHOO.util.DDProxy,{_startPosition:-1,_getPosition:function(A){var C=A;var B=0;while(true){if(YAHOO.util.Dom.hasClass(C,"xforms-repeat-begin-end")){break}if(YAHOO.util.Dom.hasClass(C,"xforms-repeat-delimiter")){B++}C=YAHOO.util.Dom.getPreviousSibling(C)}return B},_renumberIDsWorker:function(D,C,E){var F=D.id.indexOf(XFORMS_SEPARATOR_1);if(F!=-1){var B=D.id.substring(F+1).split(XFORMS_SEPARATOR_2);B[C]=E;var A=D.id.substring(0,F)+XFORMS_SEPARATOR_1+B.join(XFORMS_SEPARATOR_2);D.id=A}YAHOO.util.Dom.batch(YAHOO.util.Dom.getChildren(D),function(G){this._renumberIDsWorker(G,C,E)},this,true)},_renumberIDs:function(D){var E=0;var C=D;var A=C.indexOf(XFORMS_SEPARATOR_1);if(A!=-1){C=C.substring(0,A)}while(true){var B=ORBEON.xforms.Globals.repeatTreeChildToParent[C];if(!B){break}E++;C=B}var G=YAHOO.util.Dom.get("repeat-begin-"+D);var F=0;while(true){G=YAHOO.util.Dom.getNextSibling(G);if(G==null||YAHOO.util.Dom.hasClass(G,"xforms-repeat-begin-end")){break}if(!YAHOO.util.Dom.hasClass(G,"xforms-repeat-delimiter")&&!YAHOO.util.Dom.hasClass(G,"xforms-repeat-template")){F++;this._renumberIDsWorker(G,E,F)}}},startDrag:function(B,C){var F=this.getDragEl();var A=this.getEl();this._startPosition=this._getPosition(A);var D=YAHOO.util.Dom.getElementsByClassName("xforms-repeat-begin-end",null,A.parentNode)[0].id;this.sourceControlID=D.substring(13);YAHOO.util.Dom.setStyle(F,"opacity",0.67);YAHOO.util.Dom.setStyle(F,"width",parseInt(F.style.width)+2+"px");YAHOO.util.Dom.setStyle(F,"height","auto");var E=A.tagName.toLowerCase();F.innerHTML=E=="tr"?"<table'><tr>"+A.innerHTML+"</tr></table>":A.innerHTML;F.className=A.className;YAHOO.util.Dom.setStyle(A,"visibility","hidden")},onDrag:function(B){var A=YAHOO.util.Event.getPageY(B);if(A<this.lastY){this.goingUp=true}else{if(A>this.lastY){this.goingUp=false}}this.lastY=A},onDragOver:function(D,C){var B=this.getEl();var A=YAHOO.util.Dom.getPreviousSibling(B);var E=YAHOO.util.Dom.get(C)[0];if(ORBEON.util.Dom.hasClass(B,"xforms-dnd")&&B.nodeName.toLowerCase()==E.getEl().nodeName.toLowerCase()){var G=E.getEl().parentNode;this.overElement=E.getEl();G.removeChild(A);G.removeChild(B);if(this.goingUp){var F=this.overElement;G.insertBefore(B,F);G.insertBefore(A,F)}else{var F=YAHOO.util.Dom.getNextSibling(this.overElement);G.insertBefore(A,F);G.insertBefore(B,F)}YAHOO.util.DragDropMgr.refreshCache()}},endDrag:function(D){var B=this.getEl();var H=this.getDragEl();var A=H.id;var C=this.id;YAHOO.util.Dom.setStyle(A,"visibility","hidden");YAHOO.util.Dom.setStyle(C,"visibility","");var E=this._getPosition(B);if(E!=this._startPosition){var F=ORBEON.xforms.Controls.getForm(B);var G=new ORBEON.xforms.Server.Event(F,this.sourceControlID,null,null,"xxforms-dnd",null,null,null,null,null,["dnd-start",this._startPosition,"dnd-end",E]);this._renumberIDs(this.sourceControlID);ORBEON.xforms.Server.fireEvents([G],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 B=typeof GearsFactory!="undefined"?new GearsFactory():new ActiveXObject("Gears.Factory")}catch(A){return false}},init:function(){if(window.google&&google.gears){return }var B=null;if(typeof GearsFactory!="undefined"){B=new GearsFactory()}else{try{B=new ActiveXObject("Gears.Factory");if(B.getBuildInfo().indexOf("ie_mobile")!=-1){B.privateSetGlobalObject(this)}}catch(C){if((typeof navigator.mimeTypes!="undefined")&&navigator.mimeTypes["application/x-googlegears"]){B=document.createElement("object");B.style.display="none";B.width=0;B.height=0;B.type="application/x-googlegears";document.documentElement.appendChild(B)}}}if(!B){return }if(!window.google){google={}}if(!google.gears){google.gears={factory:B}}ORBEON.xforms.Offline.hasGears=window.google&&google.gears;if(ORBEON.xforms.Offline.hasGears){var A=google.gears.factory.create("beta.database");ORBEON.xforms.Offline.gearsDatabase=A;A.open("orbeon.xforms");A.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();A.execute("create table if not exists Current_Password (encrypted_password text)").close();var D=google.gears.factory.create("beta.localserver");ORBEON.xforms.Offline.formStore=D.createStore("orbeon.form")}FunctionCallExpr.prototype.xpathfunctions["xxforms:if"]=function(F){var E=this.args[0].evaluate(F).booleanValue();return new StringValue(this.args[E?1:2].evaluate(F).stringValue())};FunctionCallExpr.prototype.xpathfunctions.matches=function(G){var F=this.args[0].evaluate(G).stringValue();var E=this.args[1].evaluate(G).stringValue();return new BooleanValue(new RegExp(E).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 B=document.cookie.split(";");for(var E=0;E<B.length;E++){var A=B[E];var C="orbeon.forms.encryption.password=";while(A.charAt(0)==" "){A=A.substring(1,A.length)}if(A.indexOf(C)==0){D=A.substring(C.length,A.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(F){ORBEON.xforms.Offline.init();var D=ORBEON.xforms.Offline.gearsDatabase.execute("select form_id, static_state, dynamic_state, offline_events from Offline_Forms where url = ?",[window.location.href]);var G=D.fieldByName("form_id");ORBEON.xforms.Globals.formDynamicState[G].value=D.fieldByName("dynamic_state");ORBEON.xforms.Globals.formStaticState[G].value=D.fieldByName("static_state");var B=D.fieldByName("offline_events");B=ORBEON.xforms.Offline._decrypt(B,ORBEON.xforms.Offline.getEncryptionKey());ORBEON.xforms.Offline.lastRequestIsTakeOnline=true;ORBEON.xforms.Offline.isOnline=true;if(B!=""){var C=B.split(" ");var A=[];for(var J=0;J<C.length;J++){var E=unescape(C[J]);var I=E.split(" ");for(var H=0;H<I.length;H++){I[H]=unescape(I[H])}A.push(new ORBEON.xforms.Server.Event(ORBEON.util.Dom.getElementById(I[0]),I[1],I[2],I[3],I[4],I[5],I[6]=="1",I[7]=="1"))}ORBEON.xforms.Server.fireEvents(A,false)}ORBEON.xforms.Document.dispatchEvent("$containing-document$","xxforms-online");if(!YAHOO.lang.isUndefined(F)){F(window)}},storeEvents:function(B){function A(C){return C==null?"":C}ORBEON.xforms.Offline._runShowingIndicator(function(){ORBEON.xforms.Offline.init();var G=[];for(var K=0;K<B.length;K++){var J=B[K];var I=[A(J.form.id),A(J.targetId),A(J.otherId),A(J.value),A(J.eventName),J.bubbles?1:0,J.cancelable?1:0,J.ignoreErrors?1:0];var D=[];for(var H=0;H<I.length;H++){if(H!=0){D.push(" ")}D.push(escape(I[H]))}if(G.length>0){G.push(" ")}G.push(escape(D.join("")))}if(G.length>0){var C=ORBEON.xforms.Offline.gearsDatabase.execute("select offline_events from Offline_Forms where url = ?",[window.location.href]);var E=C.fieldByName("offline_events");if(E!=""){E=ORBEON.xforms.Offline._decrypt(E,ORBEON.xforms.Offline.getEncryptionKey());E+=" "}E+=G.join("");E=ORBEON.xforms.Offline._encrypt(E,ORBEON.xforms.Offline.getEncryptionKey());var F=ORBEON.xforms.Offline._serializeControlValues(ORBEON.xforms.Offline.controlValues);ORBEON.xforms.Offline.gearsDatabase.execute("update Offline_Forms set control_values = ?, offline_events = ? where url = ?",[F,E,window.location.href]).close()}})},loadFormInIframe:function(B,A){var C="orbeon-offline-iframe";var D=ORBEON.util.Dom.getElementByIdNoCache(C);if(D!=null){D.parentNode.removeChild(D)}D=document.createElement("iframe");D.id=C;D.name=C;D.style.display="none";document.body.appendChild(D);window.childWindowOrbeonReady=function(){A(D)};D.src=B},evaluateMIPs:function(){function B(I,J,G,L,H,E,O){if(G(I)!=E){L(I,E);if(H){for(var D=0;D<J.relevant.inherited.length;D++){var M=H[D];var C=ORBEON.util.Dom.getElementById(M);if(C==null){C=ORBEON.util.Dom.getElementById("group-begin-"+M)}if(O&&C==null){var F=Math.max(M.lastIndexOf(XFORMS_SEPARATOR_1),M.lastIndexOf(XFORMS_SEPARATOR_2));var K=M.substring(0,F);var N=M.substring(F+1);ORBEON.xforms.Controls.setRepeatIterationRelevance(K,N,E)}else{L(C,E)}}}}}function A(E,D){try{return xpathParse(E).evaluate(D).value}catch(C){ORBEON.util.Utils.logMessage("Error evaluating XPath expression "+E);return null}}ORBEON.xforms.Offline._runShowingIndicator(function(){var I=document.createElement("dummy");var C=new ExprContext(I);for(var F in ORBEON.xforms.Offline.variables){var M=ORBEON.xforms.Offline.variables[F].value;var E=ORBEON.xforms.Controls.getCurrentValue(ORBEON.util.Dom.getElementById(M));C.setVariable(F,E)}for(var M in ORBEON.xforms.Offline.mips){var L=ORBEON.xforms.Offline.mips[M];var K=ORBEON.util.Dom.getElementById(M);var J=ORBEON.xforms.Controls.getCurrentValue(K);ORBEON.util.Dom.setStringValue(I,J);if(L.calculate){var P=A(L.calculate.value,C);if(P!=null){ORBEON.xforms.Controls.setCurrentValue(K,P);var F=ORBEON.xforms.Offline.controlIDToVariableName[M];if(F!=null){C.setVariable(F,P)}}}var D=true;if(L.constraint){var Q=A("boolean("+L.constraint.value+")",C);if(Q!=null){D=D&&Q}}if(L.required){var H=A(L.required.value,C);if(H!=null){D&=!(J==""&&H)}}if(L.relevant){var N=A("boolean("+L.relevant.value+")",C);if(N!=null){B(K,L,ORBEON.xforms.Controls.isRelevant,ORBEON.xforms.Controls.setRelevant,L.relevant.inherited,N,true)}}if(L.readonly){var O=A("boolean("+L.readonly.value+")",C);if(O!=null){B(K,L,ORBEON.xforms.Controls.isReadonly,ORBEON.xforms.Controls.setReadonly,L.readonly.inherited,O,false)}}if(L.type){var G=ORBEON.xforms.Offline.typeRegExps[L.type.value];if(G!=null){if(!J.match(G)){D=false}}}ORBEON.xforms.Controls.setValid(K,D?"true":"false")}})},_serializeControlValues:function(A){var B=[];for(controlID in A){if(B.length>0){B.push(" ")}B.push(escape(controlID));B.push(" ");B.push(escape(A[controlID]))}B=ORBEON.xforms.Offline._encrypt(B.join(""),ORBEON.xforms.Offline.getEncryptionKey());return B},_deserializerControlValues:function(B){B=ORBEON.xforms.Offline._decrypt(B,ORBEON.xforms.Offline.getEncryptionKey());var E=B.split(" ");var C={};for(var A=0;A<E.length/2;A++){var F=unescape(E[A*2]);var D=unescape(E[A*2+1]);C[F]=D}return C},_setVariables:function(C){ORBEON.xforms.Offline.variables=C;var A={};for(var B in C){var D=C[B].value;A[D]=B}ORBEON.xforms.Offline.controlIDToVariableName=A},_encrypt:function(A,B){return B==null?A:A==""?A:byteArrayToHex(rijndaelEncrypt(A,B,"ECB"))},_decrypt:function(A,B){return B==null?A:A==""?A:byteArrayToString(rijndaelDecrypt(hexToByteArray(A),B,"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,B){if(C.dispatchEvent){var A=document.createEvent("HTMLEvents");A.initEvent(B.toLowerCase(),true,true);C.dispatchEvent(A)}else{C.fireEvent("on"+B)}}function xformsPreventDefault(A){if(A.preventDefault){A.preventDefault()}else{return false}}function xformsArrayContains(C,A){for(var B=0;B<C.length;B++){if(C[B]==A){return true}}return false}function xformsLog(C){var E=ORBEON.util.Dom.getElementById("xforms-debug");if(E==null){var D;var A;if(navigator.appName.indexOf("Microsoft")!=-1){D=document.body.offsetWidth;A=document.body.offsetHeight}else{D=window.innerWidth;A=window.innerHeight}E=document.createElement("div");E.className="xforms-debug";E.id="xforms-debug";E.style.width=ORBEON.util.Utils.getProperty(DEBUG_WINDOW_WIDTH_PROPERTY)+"px";E.style.left=D-(ORBEON.util.Utils.getProperty(DEBUG_WINDOW_WIDTH_PROPERTY)+50)+"px";E.style.height=ORBEON.util.Utils.getProperty(DEBUG_WINDOW_HEIGHT_PROPERTY)+"px";E.style.top=A-(ORBEON.util.Utils.getProperty(DEBUG_WINDOW_HEIGHT_PROPERTY)+20)+"px";var B=document.createElement("BUTTON");B.appendChild(document.createTextNode("Clear"));E.appendChild(B);document.body.insertBefore(E,document.body.firstChild);YAHOO.util.Event.addListener(B,"click",function(G){var F=getEventTarget(G);while(F.nextSibling){F.parentNode.removeChild(F.nextSibling)}return false});YAHOO.util.Event.addListener(E,"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=C===undefined?"undefined":C===null?"null":typeof C=="string"&&C==""?"empty string":C.nodeType&&C.nodeType==ORBEON.util.Dom.ELEMENT_TYPE?"Element "+C.tagName:C.nodeType&&C.nodeType==ORBEON.util.Dom.TEXT_TYPE?"Text: "+ORBEON.util.Dom.getStringValue(C):C;E.innerHTML+=text+" | "}function xformsLogTime(A){var C=ORBEON.xforms.Globals.debugLastTime;var B=new Date().getTime();ORBEON.xforms.Globals.debugLastTime=B;xformsLog((B-C)+": "+A)}function xformsLogProperties(B){var A="[";var C=true;for(var D in B){if(C){C=false}else{A+=", "}A+=D+": "+B[D]}A+="]";xformsLog(A)}function xformsDisplayIndicator(D,B){var E=ORBEON.xforms.Globals.requestForm;if(E!=null){var C=E.id;switch(D){case"loading":var A=ORBEON.xforms.Globals.formLoadingLoadingOverlay[C];if(A!=null){ORBEON.util.Dom.setStringValue(A.element,B==null?DEFAULT_LOADING_TEXT:B);A.show();ORBEON.xforms.Controls.updateLoadingPosition(C)}if(ORBEON.xforms.Globals.formLoadingNone[C]!=null){ORBEON.xforms.Globals.formLoadingNone[C].style.display="block"}break;case"none":if(!ORBEON.xforms.Globals.loadingOtherPage){if(ORBEON.xforms.Globals.formLoadingLoadingOverlay[C]!=null){ORBEON.xforms.Globals.formLoadingLoadingOverlay[C].render(document.body);ORBEON.xforms.Globals.formLoadingLoadingOverlay[C].cfg.setProperty("visible",false)}if(ORBEON.xforms.Globals.formLoadingNone[C]!=null){ORBEON.xforms.Globals.formLoadingNone[C].style.display="block"}}break}}}function xformsGetFromClientState(C,D){var B=ORBEON.xforms.Globals.formClientState[C];var A=B.value.split("&");for(var E=0;E<A.length;E=E+2){if(A[E]==D){return unescape(A[E+1])}}return null}function xformsStoreInClientState(C,F,D){var B=ORBEON.xforms.Globals.formClientState[C];var A=B.value==""?new Array():B.value.split("&");var E=false;for(var G=0;G<A.length;G=G+2){if(A[G]==F){A[G+1]=escape(D);E=true;break}}if(!E){A.push(F);A.push(escape(D))}B.value=A.join("&")}function xformsValueChanged(D,B){var E=ORBEON.xforms.Controls.getCurrentValue(D);var A=E!=D.previousValue;var G=ORBEON.util.Dom.hasClass(D,"xforms-upload");if(A&&!G){D.previousValue=E;var F=B==null&&ORBEON.util.Dom.hasClass(D,"xforms-incremental");var C=YAHOO.lang.isObject(B)?B.id:null;var H=new ORBEON.xforms.Server.Event(null,D.id,C,E,"xxforms-value-change-with-focus-change");ORBEON.xforms.Server.fireEvents([H],F)}return A}function xformsHandleClick(B){var A=getEventTarget(B);if((ORBEON.util.Dom.hasClass(A,"xforms-trigger")||ORBEON.util.Dom.hasClass(A,"xforms-trigger"))&&!ORBEON.util.Dom.hasClass(A,"xforms-readonly")){var B=new ORBEON.xforms.Server.Event(null,A.id,null,null,"DOMActivate");ORBEON.xforms.Server.fireEvents([B],false)}return false}function xformsHandleAutoCompleteMouseChange(A){A.parentNode.lastKeyCode=-1;A.parentNode.value=A.value;xformsValueChanged(A.parentNode,null)}function xformsCreateEventArray(D,A,E,B,C){return new Array(D,A,E,B,C)}function getEventTarget(B){if(B&&B.LinkedField){return B.LinkedField}else{B=B?B:window.event;var A=B.srcElement?B.srcElement:B.target;if(A.xformsElement){return A.xformsElement}else{if(A.ownerDocument.xformsElement){return A.ownerDocument.xformsElement}else{return A}}}}function xformsHtmlEditorChange(A){A.LinkedField.value=A.GetXHTML();if(ORBEON.util.Dom.hasClass(A.LinkedField,"xforms-incremental")){xformsValueChanged(A.LinkedField,null)}}function FCKeditor_OnComplete(A){A.EditorDocument.xformsElement=A.LinkedField;if(ORBEON.util.Dom.hasClass(A.LinkedField,"xforms-incremental")){A.Events.AttachEvent("OnSelectionChange",xformsHtmlEditorChange)}YAHOO.util.Event.addListener(A.EditorDocument,"focus",ORBEON.xforms.Events.focus);YAHOO.util.Event.addListener(A.EditorDocument,"blur",ORBEON.xforms.Events.blur);YAHOO.util.Event.addListener(A.EditorDocument,"focusin",ORBEON.xforms.Events.focus);YAHOO.util.Event.addListener(A.EditorDocument,"focusout",ORBEON.xforms.Events.blur);if(ORBEON.xforms.Globals.fckEditorsToLoad.length>0){var B=ORBEON.xforms.Globals.fckEditorsToLoad.shift();B.ReplaceTextarea();ORBEON.xforms.Controls.updateHTMLAreaClasses(ORBEON.util.Dom.getElementById(B.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()}}