
if(typeof YAHOO=="undefined"){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=A[C].split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules;if(!I[A]){I[A]={versions:[],builds:[]};}var B=I[A],H=D.version,G=D.build,F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(var C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0};var B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang={isArray:function(B){if(B){var A=YAHOO.lang;return A.isNumber(B.length)&&A.isFunction(B.splice)&&!A.hasOwnProperty(B.length);}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"||YAHOO.lang.isFunction(A)))||false;},isString:function(A){return typeof A==="string";},isUndefined:function(A){return typeof A==="undefined";},hasOwnProperty:function(A,B){if(Object.prototype.hasOwnProperty){return A.hasOwnProperty(B);}return!YAHOO.lang.isUndefined(A[B])&&A.constructor.prototype[B]!==A[B];},_IEEnumFix:function(C,B){if(YAHOO.env.ua.ie){var E=["toString","valueOf"],A;for(A=0;A<E.length;A=A+1){var F=E[A],D=B[F];if(YAHOO.lang.isFunction(D)&&D!=Object.prototype[F]){C[F]=D;}}}},extend:function(D,E,C){if(!E||!D){throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");}var B=function(){};B.prototype=E.prototype;D.prototype=new B();D.prototype.constructor=D;D.superclass=E.prototype;if(E.prototype.constructor==Object.prototype.constructor){E.prototype.constructor=E;}if(C){for(var A in C){D.prototype[A]=C[A];}YAHOO.lang._IEEnumFix(D.prototype,C);}},augmentObject:function(E,D){if(!D||!E){throw new Error("Absorb failed, verify dependencies.");}var A=arguments,C,F,B=A[2];if(B&&B!==true){for(C=2;C<A.length;C=C+1){E[A[C]]=D[A[C]];}}else{for(F in D){if(B||!E[F]){E[F]=D[F];}}YAHOO.lang._IEEnumFix(E,D);}},augmentProto:function(D,C){if(!C||!D){throw new Error("Augment failed, verify dependencies.");}var A=[D.prototype,C.prototype];for(var B=2;B<arguments.length;B=B+1){A.push(arguments[B]);}YAHOO.lang.augmentObject.apply(this,A);},dump:function(A,G){var C=YAHOO.lang,D,F,I=[],J="{...}",B="f(){...}",H=", ",E=" => ";if(!C.isObject(A)){return A+"";}else{if(A instanceof Date||("nodeType"in A&&"tagName"in A)){return A;}else{if(C.isFunction(A)){return B;}}}G=(C.isNumber(G))?G:3;if(C.isArray(A)){I.push("[");for(D=0,F=A.length;D<F;D=D+1){if(C.isObject(A[D])){I.push((G>0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}if(I.length>1){I.pop();}I.push("]");}else{I.push("{");for(D in A){if(C.hasOwnProperty(A,D)){I.push(D+E);if(C.isObject(A[D])){I.push((G>0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}}if(I.length>1){I.pop();}I.push("}");}return I.join("");},substitute:function(Q,B,J){var G,F,E,M,N,P,D=YAHOO.lang,L=[],C,H="dump",K=" ",A="{",O="}";for(;;){G=Q.lastIndexOf(A);if(G<0){break;}F=Q.indexOf(O,G);if(G+1>=F){break;}C=Q.substring(G+1,F);M=C;P=null;E=M.indexOf(K);if(E>-1){P=M.substring(E+1);M=M.substring(0,E);}N=B[M];if(J){N=J(M,N,P);}if(D.isObject(N)){if(D.isArray(N)){N=D.dump(N,parseInt(P,10));}else{P=P||"";var I=P.indexOf(H);if(I>-1){P=P.substring(4);}if(N.toString===Object.prototype.toString||I>-1){N=D.dump(N,parseInt(P,10));}else{N=N.toString();}}}else{if(!D.isString(N)&&!D.isNumber(N)){N="~-"+L.length+"-~";L[L.length]=C;}}Q=Q.substring(0,G)+N+Q.substring(F+1);}for(G=L.length-1;G>=0;G=G-1){Q=Q.replace(new RegExp("~-"+G+"-~"),"{"+L[G]+"}","g");}return Q;},trim:function(A){try{return A.replace(/^\s+|\s+$/g,"");}catch(B){return A;}},merge:function(){var C={},A=arguments,B;for(B=0;B<A.length;B=B+1){YAHOO.lang.augmentObject(C,A[B],true);}return C;},isValue:function(B){var A=YAHOO.lang;return(A.isObject(B)||A.isString(B)||A.isNumber(B)||A.isBoolean(B));}};YAHOO.util.Lang=YAHOO.lang;YAHOO.lang.augment=YAHOO.lang.augmentProto;YAHOO.augment=YAHOO.lang.augmentProto;YAHOO.extend=YAHOO.lang.extend;YAHOO.register("yahoo",YAHOO,{version:"2.3.1",build:"541"});(function(){var B=YAHOO.util,K,I,H=0,J={},F={};var C=YAHOO.env.ua.opera,L=YAHOO.env.ua.webkit,A=YAHOO.env.ua.gecko,G=YAHOO.env.ua.ie;var E={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i};var M=function(O){if(!E.HYPHEN.test(O)){return O;}if(J[O]){return J[O];}var P=O;while(E.HYPHEN.exec(P)){P=P.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}J[O]=P;return P;};var N=function(P){var O=F[P];if(!O){O=new RegExp("(?:^|\\s+)"+P+"(?:\\s+|$)");F[P]=O;}return O;};if(document.defaultView&&document.defaultView.getComputedStyle){K=function(O,R){var Q=null;if(R=="float"){R="cssFloat";}var P=document.defaultView.getComputedStyle(O,"");if(P){Q=P[M(R)];}return O.style[R]||Q;};}else{if(document.documentElement.currentStyle&&G){K=function(O,Q){switch(M(Q)){case"opacity":var S=100;try{S=O.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(R){try{S=O.filters("alpha").opacity;}catch(R){}}return S/100;case"float":Q="styleFloat";default:var P=O.currentStyle?O.currentStyle[Q]:null;return(O.style[Q]||P);}};}else{K=function(O,P){return O.style[P];};}}if(G){I=function(O,P,Q){switch(P){case"opacity":if(YAHOO.lang.isString(O.style.filter)){O.style.filter="alpha(opacity="+Q*100+")";if(!O.currentStyle||!O.currentStyle.hasLayout){O.style.zoom=1;}}break;case"float":P="styleFloat";default:O.style[P]=Q;}};}else{I=function(O,P,Q){if(P=="float"){P="cssFloat";}O.style[P]=Q;};}var D=function(O,P){return O&&O.nodeType==1&&(!P||P(O));};YAHOO.util.Dom={get:function(Q){if(Q&&(Q.tagName||Q.item)){return Q;}if(YAHOO.lang.isString(Q)||!Q){return document.getElementById(Q);}if(Q.length!==undefined){var R=[];for(var P=0,O=Q.length;P<O;++P){R[R.length]=B.Dom.get(Q[P]);}return R;}return Q;},getStyle:function(O,Q){Q=M(Q);var P=function(R){return K(R,Q);};return B.Dom.batch(O,P,B.Dom,true);},setStyle:function(O,Q,R){Q=M(Q);var P=function(S){I(S,Q,R);};B.Dom.batch(O,P,B.Dom,true);},getXY:function(O){var P=function(R){if((R.parentNode===null||R.offsetParent===null||this.getStyle(R,"display")=="none")&&R!=document.body){return false;}var Q=null;var V=[];var S;var T=R.ownerDocument;if(R.getBoundingClientRect){S=R.getBoundingClientRect();return[S.left+B.Dom.getDocumentScrollLeft(R.ownerDocument),S.top+B.Dom.getDocumentScrollTop(R.ownerDocument)];}else{V=[R.offsetLeft,R.offsetTop];Q=R.offsetParent;var U=this.getStyle(R,"position")=="absolute";if(Q!=R){while(Q){V[0]+=Q.offsetLeft;V[1]+=Q.offsetTop;if(L&&!U&&this.getStyle(Q,"position")=="absolute"){U=true;}Q=Q.offsetParent;}}if(L&&U){V[0]-=R.ownerDocument.body.offsetLeft;V[1]-=R.ownerDocument.body.offsetTop;}}Q=R.parentNode;while(Q.tagName&&!E.ROOT_TAG.test(Q.tagName)){if(B.Dom.getStyle(Q,"display").search(/^inline|table-row.*$/i)){V[0]-=Q.scrollLeft;V[1]-=Q.scrollTop;}Q=Q.parentNode;}return V;};return B.Dom.batch(O,P,B.Dom,true);},getX:function(O){var P=function(Q){return B.Dom.getXY(Q)[0];};return B.Dom.batch(O,P,B.Dom,true);},getY:function(O){var P=function(Q){return B.Dom.getXY(Q)[1];};return B.Dom.batch(O,P,B.Dom,true);},setXY:function(O,R,Q){var P=function(U){var T=this.getStyle(U,"position");if(T=="static"){this.setStyle(U,"position","relative");T="relative";}var W=this.getXY(U);if(W===false){return false;}var V=[parseInt(this.getStyle(U,"left"),10),parseInt(this.getStyle(U,"top"),10)];if(isNaN(V[0])){V[0]=(T=="relative")?0:U.offsetLeft;}if(isNaN(V[1])){V[1]=(T=="relative")?0:U.offsetTop;}if(R[0]!==null){U.style.left=R[0]-W[0]+V[0]+"px";}if(R[1]!==null){U.style.top=R[1]-W[1]+V[1]+"px";}if(!Q){var S=this.getXY(U);if((R[0]!==null&&S[0]!=R[0])||(R[1]!==null&&S[1]!=R[1])){this.setXY(U,R,true);}}};B.Dom.batch(O,P,B.Dom,true);},setX:function(P,O){B.Dom.setXY(P,[O,null]);},setY:function(O,P){B.Dom.setXY(O,[null,P]);},getRegion:function(O){var P=function(Q){if((Q.parentNode===null||Q.offsetParent===null||this.getStyle(Q,"display")=="none")&&Q!=document.body){return false;}var R=B.Region.getRegion(Q);return R;};return B.Dom.batch(O,P,B.Dom,true);},getClientWidth:function(){return B.Dom.getViewportWidth();},getClientHeight:function(){return B.Dom.getViewportHeight();},getElementsByClassName:function(S,W,T,U){W=W||"*";T=(T)?B.Dom.get(T):null||document;if(!T){return[];}var P=[],O=T.getElementsByTagName(W),V=N(S);for(var Q=0,R=O.length;Q<R;++Q){if(V.test(O[Q].className)){P[P.length]=O[Q];if(U){U.call(O[Q],O[Q]);}}}return P;},hasClass:function(Q,P){var O=N(P);var R=function(S){return O.test(S.className);};return B.Dom.batch(Q,R,B.Dom,true);},addClass:function(P,O){var Q=function(R){if(this.hasClass(R,O)){return false;}R.className=YAHOO.lang.trim([R.className,O].join(" "));return true;};return B.Dom.batch(P,Q,B.Dom,true);},removeClass:function(Q,P){var O=N(P);var R=function(S){if(!this.hasClass(S,P)){return false;}var T=S.className;S.className=T.replace(O," ");if(this.hasClass(S,P)){this.removeClass(S,P);}S.className=YAHOO.lang.trim(S.className);return true;};return B.Dom.batch(Q,R,B.Dom,true);},replaceClass:function(R,P,O){if(!O||P===O){return false;}var Q=N(P);var S=function(T){if(!this.hasClass(T,P)){this.addClass(T,O);return true;}T.className=T.className.replace(Q," "+O+" ");if(this.hasClass(T,P)){this.replaceClass(T,P,O);}T.className=YAHOO.lang.trim(T.className);return true;};return B.Dom.batch(R,S,B.Dom,true);},generateId:function(O,Q){Q=Q||"yui-gen";var P=function(R){if(R&&R.id){return R.id;}var S=Q+H++;if(R){R.id=S;}return S;};return B.Dom.batch(O,P,B.Dom,true)||P.apply(B.Dom,arguments);},isAncestor:function(P,Q){P=B.Dom.get(P);if(!P||!Q){return false;}var O=function(R){if(P.contains&&R.nodeType&&!L){return P.contains(R);}else{if(P.compareDocumentPosition&&R.nodeType){return!!(P.compareDocumentPosition(R)&16);}else{if(R.nodeType){return!!this.getAncestorBy(R,function(S){return S==P;});}}}return false;};return B.Dom.batch(Q,O,B.Dom,true);},inDocument:function(O){var P=function(Q){if(L){while(Q=Q.parentNode){if(Q==document.documentElement){return true;}}return false;}return this.isAncestor(document.documentElement,Q);};return B.Dom.batch(O,P,B.Dom,true);},getElementsBy:function(V,P,Q,S){P=P||"*";Q=(Q)?B.Dom.get(Q):null||document;if(!Q){return[];}var R=[],U=Q.getElementsByTagName(P);for(var T=0,O=U.length;T<O;++T){if(V(U[T])){R[R.length]=U[T];if(S){S(U[T]);}}}return R;},batch:function(S,V,U,Q){S=(S&&(S.tagName||S.item))?S:B.Dom.get(S);if(!S||!V){return false;}var R=(Q)?U:window;if(S.tagName||S.length===undefined){return V.call(R,S,U);}var T=[];for(var P=0,O=S.length;P<O;++P){T[T.length]=V.call(R,S[P],U);}return T;},getDocumentHeight:function(){var P=(document.compatMode!="CSS1Compat")?document.body.scrollHeight:document.documentElement.scrollHeight;var O=Math.max(P,B.Dom.getViewportHeight());return O;},getDocumentWidth:function(){var P=(document.compatMode!="CSS1Compat")?document.body.scrollWidth:document.documentElement.scrollWidth;var O=Math.max(P,B.Dom.getViewportWidth());return O;},getViewportHeight:function(){var O=self.innerHeight;var P=document.compatMode;if((P||G)&&!C){O=(P=="CSS1Compat")?document.documentElement.clientHeight:document.body.clientHeight;}return O;},getViewportWidth:function(){var O=self.innerWidth;var P=document.compatMode;if(P||G){O=(P=="CSS1Compat")?document.documentElement.clientWidth:document.body.clientWidth;}return O;},getAncestorBy:function(O,P){while(O=O.parentNode){if(D(O,P)){return O;}}return null;},getAncestorByClassName:function(P,O){P=B.Dom.get(P);if(!P){return null;}var Q=function(R){return B.Dom.hasClass(R,O);};return B.Dom.getAncestorBy(P,Q);},getAncestorByTagName:function(P,O){P=B.Dom.get(P);if(!P){return null;}var Q=function(R){return R.tagName&&R.tagName.toUpperCase()==O.toUpperCase();};return B.Dom.getAncestorBy(P,Q);},getPreviousSiblingBy:function(O,P){while(O){O=O.previousSibling;if(D(O,P)){return O;}}return null;},getPreviousSibling:function(O){O=B.Dom.get(O);if(!O){return null;}return B.Dom.getPreviousSiblingBy(O);},getNextSiblingBy:function(O,P){while(O){O=O.nextSibling;if(D(O,P)){return O;}}return null;},getNextSibling:function(O){O=B.Dom.get(O);if(!O){return null;}return B.Dom.getNextSiblingBy(O);},getFirstChildBy:function(O,Q){var P=(D(O.firstChild,Q))?O.firstChild:null;return P||B.Dom.getNextSiblingBy(O.firstChild,Q);},getFirstChild:function(O,P){O=B.Dom.get(O);if(!O){return null;}return B.Dom.getFirstChildBy(O);},getLastChildBy:function(O,Q){if(!O){return null;}var P=(D(O.lastChild,Q))?O.lastChild:null;return P||B.Dom.getPreviousSiblingBy(O.lastChild,Q);},getLastChild:function(O){O=B.Dom.get(O);return B.Dom.getLastChildBy(O);},getChildrenBy:function(P,R){var Q=B.Dom.getFirstChildBy(P,R);var O=Q?[Q]:[];B.Dom.getNextSiblingBy(Q,function(S){if(!R||R(S)){O[O.length]=S;}return false;});return O;},getChildren:function(O){O=B.Dom.get(O);if(!O){}return B.Dom.getChildrenBy(O);},getDocumentScrollLeft:function(O){O=O||document;return Math.max(O.documentElement.scrollLeft,O.body.scrollLeft);},getDocumentScrollTop:function(O){O=O||document;return Math.max(O.documentElement.scrollTop,O.body.scrollTop);},insertBefore:function(P,O){P=B.Dom.get(P);O=B.Dom.get(O);if(!P||!O||!O.parentNode){return null;}return O.parentNode.insertBefore(P,O);},insertAfter:function(P,O){P=B.Dom.get(P);O=B.Dom.get(O);if(!P||!O||!O.parentNode){return null;}if(O.nextSibling){return O.parentNode.insertBefore(P,O.nextSibling);}else{return O.parentNode.appendChild(P);}}};})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this[0]=B;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.3.1",build:"541"});YAHOO.util.CustomEvent=function(D,B,C,A){this.type=D;this.scope=B||window;this.silent=C;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(B,C,A){if(!B){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(B,C,A);}this.subscribers.push(new YAHOO.util.Subscriber(B,C,A));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true;}}return E;},fire:function(){var E=this.subscribers.length;if(!E&&this.silent){return true;}var H=[],G=true,D,I=false;for(D=0;D<arguments.length;++D){H.push(arguments[D]);}var A=H.length;if(!this.silent){}for(D=0;D<E;++D){var L=this.subscribers[D];if(!L){I=true;}else{if(!this.silent){}var K=L.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var B=null;if(H.length>0){B=H[0];}try{G=L.fn.call(K,B,L.obj);}catch(F){this.lastError=F;}}else{try{G=L.fn.call(K,this.type,H,L.obj);}catch(F){this.lastError=F;}}if(false===G){if(!this.silent){}return false;}}}if(I){var J=[],C=this.subscribers;for(D=0,E=C.length;D<E;D=D+1){J.push(C[D]);}this.subscribers=J;}return true;},unsubscribeAll:function(){for(var B=0,A=this.subscribers.length;B<A;++B){this._delete(A-1-B);}this.subscribers=[];return B;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers[A]=null;},toString:function(){return"CustomEvent: '"+this.type+"', scope: "+this.scope;}};YAHOO.util.Subscriber=function(B,C,A){this.fn=B;this.obj=YAHOO.lang.isUndefined(C)?null:C;this.override=A;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}return A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var J=false;var I=[];var K=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39};return{POLL_RETRYS:4000,POLL_INTERVAL:10,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,startInterval:function(){if(!this._interval){var L=this;var M=function(){L._tryPreloadAttach();};this._interval=setInterval(M,this.POLL_INTERVAL);}},onAvailable:function(N,L,O,M){F.push({id:N,fn:L,obj:O,override:M,checkReady:false});C=this.POLL_RETRYS;this.startInterval();},onDOMReady:function(L,N,M){if(J){setTimeout(function(){var O=window;if(M){if(M===true){O=N;}else{O=M;}}L.call(O,"DOMReady",[],N);},0);}else{this.DOMReadyEvent.subscribe(L,N,M);}},onContentReady:function(N,L,O,M){F.push({id:N,fn:L,obj:O,override:M,checkReady:true});C=this.POLL_RETRYS;this.startInterval();},addListener:function(N,L,W,R,M){if(!W||!W.call){return false;}if(this._isValidCollection(N)){var X=true;for(var S=0,U=N.length;S<U;++S){X=this.on(N[S],L,W,R,M)&&X;}return X;}else{if(YAHOO.lang.isString(N)){var Q=this.getEl(N);if(Q){N=Q;}else{this.onAvailable(N,function(){YAHOO.util.Event.on(N,L,W,R,M);});return true;}}}if(!N){return false;}if("unload"==L&&R!==this){K[K.length]=[N,L,W,R,M];return true;}var Z=N;if(M){if(M===true){Z=R;}else{Z=M;}}var O=function(a){return W.call(Z,YAHOO.util.Event.getEvent(a,N),R);};var Y=[N,L,W,O,Z,R,M];var T=I.length;I[T]=Y;if(this.useLegacyEvent(N,L)){var P=this.getLegacyIndex(N,L);if(P==-1||N!=G[P][0]){P=G.length;B[N.id+L]=P;G[P]=[N,L,N["on"+L]];E[P]=[];N["on"+L]=function(a){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(a),P);};}E[P].push(Y);}else{try{this._simpleAdd(N,L,O,false);}catch(V){this.lastError=V;this.removeListener(N,L,W);return false;}}return true;},fireLegacyEvent:function(P,N){var R=true,L,T,S,U,Q;T=E[N];for(var M=0,O=T.length;M<O;++M){S=T[M];if(S&&S[this.WFN]){U=S[this.ADJ_SCOPE];Q=S[this.WFN].call(U,P);R=(R&&Q);}}L=G[N];if(L&&L[2]){L[2](P);}return R;},getLegacyIndex:function(M,N){var L=this.generateId(M)+N;if(typeof B[L]=="undefined"){return-1;}else{return B[L];}},useLegacyEvent:function(M,N){if(this.webkit&&("click"==N||"dblclick"==N)){var L=parseInt(this.webkit,10);if(!isNaN(L)&&L<418){return true;}}return false;},removeListener:function(M,L,U){var P,S,W;if(typeof M=="string"){M=this.getEl(M);}else{if(this._isValidCollection(M)){var V=true;for(P=0,S=M.length;P<S;++P){V=(this.removeListener(M[P],L,U)&&V);}return V;}}if(!U||!U.call){return this.purgeElement(M,false,L);}if("unload"==L){for(P=0,S=K.length;P<S;P++){W=K[P];if(W&&W[0]==M&&W[1]==L&&W[2]==U){K[P]=null;return true;}}return false;}var Q=null;var R=arguments[3];if("undefined"===typeof R){R=this._getCacheIndex(M,L,U);}if(R>=0){Q=I[R];}if(!M||!Q){return false;}if(this.useLegacyEvent(M,L)){var O=this.getLegacyIndex(M,L);var N=E[O];if(N){for(P=0,S=N.length;P<S;++P){W=N[P];if(W&&W[this.EL]==M&&W[this.TYPE]==L&&W[this.FN]==U){N[P]=null;break;}}}}else{try{this._simpleRemove(M,L,Q[this.WFN],false);}catch(T){this.lastError=T;return false;}}delete I[R][this.WFN];delete I[R][this.FN];I[R]=null;return true;},getTarget:function(N,M){var L=N.target||N.srcElement;return this.resolveTextNode(L);},resolveTextNode:function(L){if(L&&3==L.nodeType){return L.parentNode;}else{return L;}},getPageX:function(M){var L=M.pageX;if(!L&&0!==L){L=M.clientX||0;if(this.isIE){L+=this._getScrollLeft();}}return L;},getPageY:function(L){var M=L.pageY;if(!M&&0!==M){M=L.clientY||0;if(this.isIE){M+=this._getScrollTop();}}return M;},getXY:function(L){return[this.getPageX(L),this.getPageY(L)];},getRelatedTarget:function(M){var L=M.relatedTarget;if(!L){if(M.type=="mouseout"){L=M.toElement;}else{if(M.type=="mouseover"){L=M.fromElement;}}}return this.resolveTextNode(L);},getTime:function(N){if(!N.time){var M=new Date().getTime();try{N.time=M;}catch(L){this.lastError=L;return M;}}return N.time;},stopEvent:function(L){this.stopPropagation(L);this.preventDefault(L);},stopPropagation:function(L){if(L.stopPropagation){L.stopPropagation();}else{L.cancelBubble=true;}},preventDefault:function(L){if(L.preventDefault){L.preventDefault();}else{L.returnValue=false;}},getEvent:function(Q,O){var P=Q||window.event;if(!P){var R=this.getEvent.caller;while(R){P=R.arguments[0];if(P&&Event==P.constructor){break;}R=R.caller;}}if(P&&this.isIE){try{var N=P.srcElement;if(N){var M=N.type;}}catch(L){P.target=O;}}return P;},getCharCode:function(M){var L=M.keyCode||M.charCode||0;if(YAHOO.env.ua.webkit&&(L in D)){L=D[L];}return L;},_getCacheIndex:function(P,Q,O){for(var N=0,M=I.length;N<M;++N){var L=I[N];if(L&&L[this.FN]==O&&L[this.EL]==P&&L[this.TYPE]==Q){return N;}}return-1;},generateId:function(L){var M=L.id;if(!M){M="yuievtautoid-"+A;++A;L.id=M;}return M;},_isValidCollection:function(M){try{return(typeof M!=="string"&&M.length&&!M.tagName&&!M.alert&&typeof M[0]!=="undefined");}catch(L){return false;}},elCache:{},getEl:function(L){return(typeof L==="string")?document.getElementById(L):L;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(M){if(!H){H=true;var L=YAHOO.util.Event;L._ready();L._tryPreloadAttach();}},_ready:function(M){if(!J){J=true;var L=YAHOO.util.Event;L.DOMReadyEvent.fire();L._simpleRemove(document,"DOMContentLoaded",L._ready);}},_tryPreloadAttach:function(){if(this.locked){return false;}if(this.isIE){if(!J){this.startInterval();return false;}}this.locked=true;var Q=!H;if(!Q){Q=(C>0);}var P=[];var R=function(T,U){var S=T;if(U.override){if(U.override===true){S=U.obj;}else{S=U.override;}}U.fn.call(S,U.obj);};var M,L,O,N;for(M=0,L=F.length;M<L;++M){O=F[M];if(O&&!O.checkReady){N=this.getEl(O.id);if(N){R(N,O);F[M]=null;}else{P.push(O);}}}for(M=0,L=F.length;M<L;++M){O=F[M];if(O&&O.checkReady){N=this.getEl(O.id);if(N){if(H||N.nextSibling){R(N,O);F[M]=null;}}else{P.push(O);}}}C=(P.length===0)?0:C-1;if(Q){this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;return true;},purgeElement:function(O,P,R){var Q=this.getListeners(O,R),N,L;if(Q){for(N=0,L=Q.length;N<L;++N){var M=Q[N];this.removeListener(O,M.type,M.fn,M.index);}}if(P&&O&&O.childNodes){for(N=0,L=O.childNodes.length;N<L;++N){this.purgeElement(O.childNodes[N],P,R);}}},getListeners:function(N,L){var Q=[],M;if(!L){M=[I,K];}else{if(L=="unload"){M=[K];}else{M=[I];}}for(var P=0;P<M.length;P=P+1){var T=M[P];if(T&&T.length>0){for(var R=0,S=T.length;R<S;++R){var O=T[R];if(O&&O[this.EL]===N&&(!L||L===O[this.TYPE])){Q.push({type:O[this.TYPE],fn:O[this.FN],obj:O[this.OBJ],adjust:O[this.OVERRIDE],scope:O[this.ADJ_SCOPE],index:R});}}}}return(Q.length)?Q:null;},_unload:function(S){var R=YAHOO.util.Event,P,O,M,L,N;for(P=0,L=K.length;P<L;++P){M=K[P];if(M){var Q=window;if(M[R.ADJ_SCOPE]){if(M[R.ADJ_SCOPE]===true){Q=M[R.UNLOAD_OBJ];}else{Q=M[R.ADJ_SCOPE];}}M[R.FN].call(Q,R.getEvent(S,M[R.EL]),M[R.UNLOAD_OBJ]);K[P]=null;M=null;Q=null;}}K=null;if(I&&I.length>0){O=I.length;while(O){N=O-1;M=I[N];if(M){R.removeListener(M[R.EL],M[R.TYPE],M[R.FN],N);}O=O-1;}M=null;R.clearCache();}for(P=0,L=G.length;P<L;++P){G[P][0]=null;G[P]=null;}G=null;R._simpleRemove(window,"unload",R._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var L=document.documentElement,M=document.body;if(L&&(L.scrollTop||L.scrollLeft)){return[L.scrollTop,L.scrollLeft];}else{if(M){return[M.scrollTop,M.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(N,O,M,L){N.addEventListener(O,M,(L));};}else{if(window.attachEvent){return function(N,O,M,L){N.attachEvent("on"+O,M);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(N,O,M,L){N.removeEventListener(O,M,(L));};}else{if(window.detachEvent){return function(M,N,L){M.detachEvent("on"+N,L);};}else{return function(){};}}}()};}();(function(){var D=YAHOO.util.Event;D.on=D.addListener;if(D.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var B,E=document,A=E.body;if(("undefined"!==typeof YAHOO_config)&&YAHOO_config.injecting){B=document.createElement("script");var C=E.getElementsByTagName("head")[0]||A;C.insertBefore(B,C.firstChild);}else{E.write("<script id=\"_yui_eu_dr\" defer=\"true\" src=\"//:\"></script>");B=document.getElementById("_yui_eu_dr");}if(B){B.onreadystatechange=function(){if("complete"===this.readyState){this.parentNode.removeChild(this);YAHOO.util.Event._ready();}};}else{}B=null;}else{if(D.webkit){D._drwatch=setInterval(function(){var F=document.readyState;if("loaded"==F||"complete"==F){clearInterval(D._drwatch);D._drwatch=null;D._ready();}},D.POLL_INTERVAL);}else{D._simpleAdd(document,"DOMContentLoaded",D._ready);}}D._simpleAdd(window,"load",D._load);D._simpleAdd(window,"unload",D._unload);D._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,override:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].override);}}}return I[G];},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null;}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F]);}return G.fire.apply(G,B);},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true;}}return false;}};YAHOO.util.KeyListener=function(A,F,B,C){if(!A){}else{if(!F){}else{if(!B){}}}if(!C){C=YAHOO.util.KeyListener.KEYDOWN;}var D=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof A=="string"){A=document.getElementById(A);}if(typeof B=="function"){D.subscribe(B);}else{D.subscribe(B.fn,B.scope,B.correctScope);}function E(K,J){if(!F.shift){F.shift=false;}if(!F.alt){F.alt=false;}if(!F.ctrl){F.ctrl=false;}if(K.shiftKey==F.shift&&K.altKey==F.alt&&K.ctrlKey==F.ctrl){var H;var G;if(F.keys instanceof Array){for(var I=0;I<F.keys.length;I++){H=F.keys[I];if(H==K.charCode){D.fire(K.charCode,K);break;}else{if(H==K.keyCode){D.fire(K.keyCode,K);break;}}}}else{H=F.keys;if(H==K.charCode){D.fire(K.charCode,K);}else{if(H==K.keyCode){D.fire(K.keyCode,K);}}}}}this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(A,C,E);this.enabledEvent.fire(F);}this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(A,C,E);this.disabledEvent.fire(F);}this.enabled=false;};this.toString=function(){return"KeyListener ["+F.keys+"] "+A.tagName+(A.id?"["+A.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.register("event",YAHOO.util.Event,{version:"2.3.1",build:"541"});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(q){try{var S=YAHOO.util.Event.getTarget(q);if(S.type.toLowerCase()=="submit"){YAHOO.util.Connect._submitElementValue=encodeURIComponent(S.name)+"="+encodeURIComponent(S.value);}}catch(q){}});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(S){this._msxml_progid.unshift(S);},setDefaultPostHeader:function(S){if(typeof S=="string"){this._default_post_header=S;}else{if(typeof S=="boolean"){this._use_default_post_header=S;}}},setDefaultXhrHeader:function(S){if(typeof S=="string"){this._default_xhr_header=S;}else{this._use_default_xhr_header=S;}},setPollingInterval:function(S){if(typeof S=="number"&&isFinite(S)){this._polling_interval=S;}},createXhrObject:function(w){var m,S;try{S=new XMLHttpRequest();m={conn:S,tId:w};}catch(R){for(var q=0;q<this._msxml_progid.length;++q){try{S=new ActiveXObject(this._msxml_progid[q]);m={conn:S,tId:w};break;}catch(R){}}}finally{return m;}},getConnectionObject:function(S){var R;var m=this._transaction_id;try{if(!S){R=this.createXhrObject(m);}else{R={};R.tId=m;R.isUpload=true;}if(R){this._transaction_id++;}}catch(q){}finally{return R;}},asyncRequest:function(w,q,m,S){var R=(this._isFileUpload)?this.getConnectionObject(true):this.getConnectionObject();if(!R){return null;}else{if(m&&m.customevents){this.initCustomEvents(R,m);}if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(R,m,q,S);return R;}if(w.toUpperCase()=="GET"){if(this._sFormData.length!==0){q+=((q.indexOf("?")==-1)?"?":"&")+this._sFormData;}else{q+="?"+this._sFormData;}}else{if(w.toUpperCase()=="POST"){S=S?this._sFormData+"&"+S:this._sFormData;}}}R.conn.open(w,q,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(this._isFormSubmit==false&&this._use_default_post_header){this.initHeader("Content-Type",this._default_post_header);}if(this._has_default_headers||this._has_http_headers){this.setHeader(R);}this.handleReadyState(R,m);R.conn.send(S||null);this.startEvent.fire(R);if(R.startEvent){R.startEvent.fire(R);}return R;}},initCustomEvents:function(S,R){for(var q in R.customevents){if(this._customEvents[q][0]){S[this._customEvents[q][0]]=new YAHOO.util.CustomEvent(this._customEvents[q][1],(R.scope)?R.scope:null);S[this._customEvents[q][0]].subscribe(R.customevents[q]);}}},handleReadyState:function(q,R){var S=this;if(R&&R.timeout){this._timeOut[q.tId]=window.setTimeout(function(){S.abort(q,R,true);},R.timeout);}this._poll[q.tId]=window.setInterval(function(){if(q.conn&&q.conn.readyState===4){window.clearInterval(S._poll[q.tId]);delete S._poll[q.tId];if(R&&R.timeout){window.clearTimeout(S._timeOut[q.tId]);delete S._timeOut[q.tId];}S.completeEvent.fire(q);if(q.completeEvent){q.completeEvent.fire(q);}S.handleTransactionResponse(q,R);}},this._polling_interval);},handleTransactionResponse:function(w,V,S){var R,q;try{if(w.conn.status!==undefined&&w.conn.status!==0){R=w.conn.status;}else{R=13030;}}catch(m){R=13030;}if(R>=200&&R<300||R===1223){q=this.createResponseObject(w,(V&&V.argument)?V.argument:undefined);if(V){if(V.success){if(!V.scope){V.success(q);}else{V.success.apply(V.scope,[q]);}}}this.successEvent.fire(q);if(w.successEvent){w.successEvent.fire(q);}}else{switch(R){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:q=this.createExceptionObject(w.tId,(V&&V.argument)?V.argument:undefined,(S?S:false));if(V){if(V.failure){if(!V.scope){V.failure(q);}else{V.failure.apply(V.scope,[q]);}}}break;default:q=this.createResponseObject(w,(V&&V.argument)?V.argument:undefined);if(V){if(V.failure){if(!V.scope){V.failure(q);}else{V.failure.apply(V.scope,[q]);}}}}this.failureEvent.fire(q);if(w.failureEvent){w.failureEvent.fire(q);}}this.releaseObject(w);q=null;},createResponseObject:function(S,d){var m={};var T={};try{var R=S.conn.getAllResponseHeaders();var V=R.split("\n");for(var w=0;w<V.length;w++){var q=V[w].indexOf(":");if(q!=-1){T[V[w].substring(0,q)]=V[w].substring(q+2);}}}catch(N){}m.tId=S.tId;m.status=(S.conn.status==1223)?204:S.conn.status;m.statusText=(S.conn.status==1223)?"No Content":S.conn.statusText;m.getResponseHeader=T;m.getAllResponseHeaders=R;m.responseText=S.conn.responseText;m.responseXML=S.conn.responseXML;if(typeof d!==undefined){m.argument=d;}return m;},createExceptionObject:function(N,m,S){var V=0;var d="communication failure";var R=-1;var q="transaction aborted";var w={};w.tId=N;if(S){w.status=R;w.statusText=q;}else{w.status=V;w.statusText=d;}if(m){w.argument=m;}return w;},initHeader:function(S,m,R){var q=(R)?this._default_headers:this._http_headers;q[S]=m;if(R){this._has_default_headers=true;}else{this._has_http_headers=true;}},setHeader:function(S){if(this._has_default_headers){for(var q in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,q)){S.conn.setRequestHeader(q,this._default_headers[q]);}}}if(this._has_http_headers){for(var q in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,q)){S.conn.setRequestHeader(q,this._http_headers[q]);}}delete this._http_headers;this._http_headers={};this._has_http_headers=false;}},resetDefaultHeaders:function(){delete this._default_headers;this._default_headers={};this._has_default_headers=false;},setForm:function(M,w,q){this.resetFormState();var f;if(typeof M=="string"){f=(document.getElementById(M)||document.forms[M]);}else{if(typeof M=="object"){f=M;}else{return;}}if(w){var V=this.createFrame(q?q:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=f;return;}var S,T,d,p;var N=false;for(var m=0;m<f.elements.length;m++){S=f.elements[m];p=f.elements[m].disabled;T=f.elements[m].name;d=f.elements[m].value;if(!p&&T){switch(S.type){case"select-one":case"select-multiple":for(var R=0;R<S.options.length;R++){if(S.options[R].selected){if(window.ActiveXObject){this._sFormData+=encodeURIComponent(T)+"="+encodeURIComponent(S.options[R].attributes["value"].specified?S.options[R].value:S.options[R].text)+"&";}else{this._sFormData+=encodeURIComponent(T)+"="+encodeURIComponent(S.options[R].hasAttribute("value")?S.options[R].value:S.options[R].text)+"&";}}}break;case"radio":case"checkbox":if(S.checked){this._sFormData+=encodeURIComponent(T)+"="+encodeURIComponent(d)+"&";}break;case"file":case undefined:case"reset":case"button":break;case"submit":if(N===false){if(this._hasSubmitListener&&this._submitElementValue){this._sFormData+=this._submitElementValue+"&";}else{this._sFormData+=encodeURIComponent(T)+"="+encodeURIComponent(d)+"&";}N=true;}break;default:this._sFormData+=encodeURIComponent(T)+"="+encodeURIComponent(d)+"&";}}}this._isFormSubmit=true;this._sFormData=this._sFormData.substr(0,this._sFormData.length-1);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(S){var q="yuiIO"+this._transaction_id;var R;if(window.ActiveXObject){R=document.createElement("<iframe id=\""+q+"\" name=\""+q+"\" />");if(typeof S=="boolean"){R.src="javascript:false";}else{if(typeof secureURI=="string"){R.src=S;}}}else{R=document.createElement("iframe");R.id=q;R.name=q;}R.style.position="absolute";R.style.top="-1000px";R.style.left="-1000px";document.body.appendChild(R);},appendPostData:function(S){var m=[];var q=S.split("&");for(var R=0;R<q.length;R++){var w=q[R].indexOf("=");if(w!=-1){m[R]=document.createElement("input");m[R].type="hidden";m[R].name=q[R].substring(0,w);m[R].value=q[R].substring(w+1);this._formNode.appendChild(m[R]);}}return m;},uploadFile:function(m,p,w,R){var N="yuiIO"+m.tId;var T="multipart/form-data";var f=document.getElementById(N);var U=this;var q={action:this._formNode.getAttribute("action"),method:this._formNode.getAttribute("method"),target:this._formNode.getAttribute("target")};this._formNode.setAttribute("action",w);this._formNode.setAttribute("method","POST");this._formNode.setAttribute("target",N);if(this._formNode.encoding){this._formNode.setAttribute("encoding",T);}else{this._formNode.setAttribute("enctype",T);}if(R){var M=this.appendPostData(R);}this._formNode.submit();this.startEvent.fire(m);if(m.startEvent){m.startEvent.fire(m);}if(p&&p.timeout){this._timeOut[m.tId]=window.setTimeout(function(){U.abort(m,p,true);},p.timeout);}if(M&&M.length>0){for(var d=0;d<M.length;d++){this._formNode.removeChild(M[d]);}}for(var S in q){if(YAHOO.lang.hasOwnProperty(q,S)){if(q[S]){this._formNode.setAttribute(S,q[S]);}else{this._formNode.removeAttribute(S);}}}this.resetFormState();var V=function(){if(p&&p.timeout){window.clearTimeout(U._timeOut[m.tId]);delete U._timeOut[m.tId];}U.completeEvent.fire(m);if(m.completeEvent){m.completeEvent.fire(m);}var v={};v.tId=m.tId;v.argument=p.argument;try{v.responseText=f.contentWindow.document.body?f.contentWindow.document.body.innerHTML:f.contentWindow.document.documentElement.textContent;v.responseXML=f.contentWindow.document.XMLDocument?f.contentWindow.document.XMLDocument:f.contentWindow.document;}catch(u){}if(p&&p.upload){if(!p.scope){p.upload(v);}else{p.upload.apply(p.scope,[v]);}}U.uploadEvent.fire(v);if(m.uploadEvent){m.uploadEvent.fire(v);}YAHOO.util.Event.removeListener(f,"load",V);setTimeout(function(){document.body.removeChild(f);U.releaseObject(m);},100);};YAHOO.util.Event.addListener(f,"load",V);},abort:function(m,V,S){var R;if(m.conn){if(this.isCallInProgress(m)){m.conn.abort();window.clearInterval(this._poll[m.tId]);delete this._poll[m.tId];if(S){window.clearTimeout(this._timeOut[m.tId]);delete this._timeOut[m.tId];}R=true;}}else{if(m.isUpload===true){var q="yuiIO"+m.tId;var w=document.getElementById(q);if(w){YAHOO.util.Event.removeListener(w,"load",uploadCallback);document.body.removeChild(w);if(S){window.clearTimeout(this._timeOut[m.tId]);delete this._timeOut[m.tId];}R=true;}}else{R=false;}}if(R===true){this.abortEvent.fire(m);if(m.abortEvent){m.abortEvent.fire(m);}this.handleTransactionResponse(m,V,true);}return R;},isCallInProgress:function(q){if(q&&q.conn){return q.conn.readyState!==4&&q.conn.readyState!==0;}else{if(q&&q.isUpload===true){var S="yuiIO"+q.tId;return document.getElementById(S)?true:false;}else{return false;}}},releaseObject:function(S){if(S.conn){S.conn=null;}S=null;}};YAHOO.register("connection",YAHOO.util.Connect,{version:"2.3.1",build:"541"});YAHOO.util.Anim=function(B,A,C,D){if(!B){}this.init(B,A,C,D);};YAHOO.util.Anim.prototype={toString:function(){var A=this.getEl();var B=A.id||A.tagName||A;return("Anim "+B);},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(A,C,B){return this.method(this.currentFrame,C,B-C,this.totalFrames);},setAttribute:function(A,C,B){if(this.patterns.noNegatives.test(A)){C=(C>0)?C:0;}YAHOO.util.Dom.setStyle(this.getEl(),A,C+B);},getAttribute:function(A){var C=this.getEl();var E=YAHOO.util.Dom.getStyle(C,A);if(E!=="auto"&&!this.patterns.offsetUnit.test(E)){return parseFloat(E);}var B=this.patterns.offsetAttribute.exec(A)||[];var F=!!(B[3]);var D=!!(B[2]);if(D||(YAHOO.util.Dom.getStyle(C,"position")=="absolute"&&F)){E=C["offset"+B[0].charAt(0).toUpperCase()+B[0].substr(1)];}else{E=0;}return E;},getDefaultUnit:function(A){if(this.patterns.defaultUnit.test(A)){return"px";}return"";},setRuntimeAttribute:function(B){var G;var C;var D=this.attributes;this.runtimeAttributes[B]={};var F=function(H){return(typeof H!=="undefined");};if(!F(D[B]["to"])&&!F(D[B]["by"])){return false;}G=(F(D[B]["from"]))?D[B]["from"]:this.getAttribute(B);if(F(D[B]["to"])){C=D[B]["to"];}else{if(F(D[B]["by"])){if(G.constructor==Array){C=[];for(var E=0,A=G.length;E<A;++E){C[E]=G[E]+D[B]["by"][E]*1;}}else{C=G+D[B]["by"]*1;}}}this.runtimeAttributes[B].start=G;this.runtimeAttributes[B].end=C;this.runtimeAttributes[B].unit=(F(D[B].unit))?D[B]["unit"]:this.getDefaultUnit(B);return true;},init:function(C,H,G,A){var B=false;var D=null;var F=0;C=YAHOO.util.Dom.get(C);this.attributes=H||{};this.duration=!YAHOO.lang.isUndefined(G)?G:1;this.method=A||YAHOO.util.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=YAHOO.util.AnimMgr.fps;this.setEl=function(K){C=YAHOO.util.Dom.get(K);};this.getEl=function(){return C;};this.isAnimated=function(){return B;};this.getStartTime=function(){return D;};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false;}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(YAHOO.util.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1;}YAHOO.util.AnimMgr.registerElement(this);return true;};this.stop=function(K){if(K){this.currentFrame=this.totalFrames;this._onTween.fire();}YAHOO.util.AnimMgr.stop(this);};var J=function(){this.onStart.fire();this.runtimeAttributes={};for(var K in this.attributes){this.setRuntimeAttribute(K);}B=true;F=0;D=new Date();};var I=function(){var M={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};M.toString=function(){return("duration: "+M.duration+", currentFrame: "+M.currentFrame);};this.onTween.fire(M);var L=this.runtimeAttributes;for(var K in L){this.setAttribute(K,this.doMethod(K,L[K].start,L[K].end),L[K].unit);}F+=1;};var E=function(){var K=(new Date()-D)/1000;var L={duration:K,frames:F,fps:F/K};L.toString=function(){return("duration: "+L.duration+", frames: "+L.frames+", fps: "+L.fps);};B=false;F=0;this.onComplete.fire(L);};this._onStart=new YAHOO.util.CustomEvent("_start",this,true);this.onStart=new YAHOO.util.CustomEvent("start",this);this.onTween=new YAHOO.util.CustomEvent("tween",this);this._onTween=new YAHOO.util.CustomEvent("_tween",this,true);this.onComplete=new YAHOO.util.CustomEvent("complete",this);this._onComplete=new YAHOO.util.CustomEvent("_complete",this,true);this._onStart.subscribe(J);this._onTween.subscribe(I);this._onComplete.subscribe(E);}};YAHOO.util.AnimMgr=new function(){var C=null;var B=[];var A=0;this.fps=1000;this.delay=1;this.registerElement=function(F){B[B.length]=F;A+=1;F._onStart.fire();this.start();};this.unRegister=function(G,F){G._onComplete.fire();F=F||E(G);if(F==-1){return false;}B.splice(F,1);A-=1;if(A<=0){this.stop();}return true;};this.start=function(){if(C===null){C=setInterval(this.run,this.delay);}};this.stop=function(H){if(!H){clearInterval(C);for(var G=0,F=B.length;G<F;++G){if(B[0].isAnimated()){this.unRegister(B[0],0);}}B=[];C=null;A=0;}else{this.unRegister(H);}};this.run=function(){for(var H=0,F=B.length;H<F;++H){var G=B[H];if(!G||!G.isAnimated()){continue;}if(G.currentFrame<G.totalFrames||G.totalFrames===null){G.currentFrame+=1;if(G.useSeconds){D(G);}G._onTween.fire();}else{YAHOO.util.AnimMgr.stop(G,H);}}};var E=function(H){for(var G=0,F=B.length;G<F;++G){if(B[G]==H){return G;}}return-1;};var D=function(G){var J=G.totalFrames;var I=G.currentFrame;var H=(G.currentFrame*G.duration*1000/G.totalFrames);var F=(new Date()-G.getStartTime());var K=0;if(F<G.duration*1000){K=Math.round((F/H-1)*G.currentFrame);}else{K=J-(I+1);}if(K>0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1);}G.currentFrame+=K;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B<F;++B){C[B]=[E[B][0],E[B][1]];}for(var A=1;A<F;++A){for(B=0;B<F-A;++B){C[B][0]=(1-D)*C[B][0]+D*C[parseInt(B+1,10)][0];C[B][1]=(1-D)*C[B][1]+D*C[parseInt(B+1,10)][1];}}return[C[0][0],C[0][1]];};};(function(){YAHOO.util.ColorAnim=function(E,D,F,G){YAHOO.util.ColorAnim.superclass.constructor.call(this,E,D,F,G);};YAHOO.extend(YAHOO.util.ColorAnim,YAHOO.util.Anim);var B=YAHOO.util;var C=B.ColorAnim.superclass;var A=B.ColorAnim.prototype;A.toString=function(){var D=this.getEl();var E=D.id||D.tagName;return("ColorAnim "+E);};A.patterns.color=/color$/i;A.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;A.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;A.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;A.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;A.parseColor=function(D){if(D.length==3){return D;}var E=this.patterns.hex.exec(D);if(E&&E.length==4){return[parseInt(E[1],16),parseInt(E[2],16),parseInt(E[3],16)];}E=this.patterns.rgb.exec(D);if(E&&E.length==4){return[parseInt(E[1],10),parseInt(E[2],10),parseInt(E[3],10)];}E=this.patterns.hex3.exec(D);if(E&&E.length==4){return[parseInt(E[1]+E[1],16),parseInt(E[2]+E[2],16),parseInt(E[3]+E[3],16)];}return null;};A.getAttribute=function(D){var F=this.getEl();if(this.patterns.color.test(D)){var G=YAHOO.util.Dom.getStyle(F,D);if(this.patterns.transparent.test(G)){var E=F.parentNode;G=B.Dom.getStyle(E,D);while(E&&this.patterns.transparent.test(G)){E=E.parentNode;G=B.Dom.getStyle(E,D);if(E.tagName.toUpperCase()=="HTML"){G="#fff";}}}}else{G=C.getAttribute.call(this,D);}return G;};A.doMethod=function(E,I,F){var H;if(this.patterns.color.test(E)){H=[];for(var G=0,D=I.length;G<D;++G){H[G]=C.doMethod.call(this,E,I[G],F[G]);}H="rgb("+Math.floor(H[0])+","+Math.floor(H[1])+","+Math.floor(H[2])+")";}else{H=C.doMethod.call(this,E,I,F);}return H;};A.setRuntimeAttribute=function(E){C.setRuntimeAttribute.call(this,E);if(this.patterns.color.test(E)){var G=this.attributes;var I=this.parseColor(this.runtimeAttributes[E].start);var F=this.parseColor(this.runtimeAttributes[E].end);if(typeof G[E]["to"]==="undefined"&&typeof G[E]["by"]!=="undefined"){F=this.parseColor(G[E].by);for(var H=0,D=I.length;H<D;++H){F[H]=I[H]+F[H];}}this.runtimeAttributes[E].start=I;this.runtimeAttributes[E].end=F;}};})();YAHOO.util.Easing={easeNone:function(B,A,D,C){return D*B/C+A;},easeIn:function(B,A,D,C){return D*(B/=C)*B+A;},easeOut:function(B,A,D,C){return-D*(B/=C)*(B-2)+A;},easeBoth:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B+A;}return-D/2*((--B)*(B-2)-1)+A;},easeInStrong:function(B,A,D,C){return D*(B/=C)*B*B*B+A;},easeOutStrong:function(B,A,D,C){return-D*((B=B/C-1)*B*B*B-1)+A;},easeBothStrong:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B*B*B+A;}return-D/2*((B-=2)*B*B*B-2)+A;},elasticIn:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return-(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;},elasticOut:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return B*Math.pow(2,-10*C)*Math.sin((C*F-D)*(2*Math.PI)/E)+G+A;},elasticBoth:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F/2)==2){return A+G;}if(!E){E=F*(0.3*1.5);}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}if(C<1){return-0.5*(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;}return B*Math.pow(2,-10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E)*0.5+G+A;},backIn:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*(B/=D)*B*((C+1)*B-C)+A;},backOut:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*((B=B/D-1)*B*((C+1)*B+C)+1)+A;},backBoth:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}if((B/=D/2)<1){return E/2*(B*B*(((C*=(1.525))+1)*B-C))+A;}return E/2*((B-=2)*B*(((C*=(1.525))+1)*B+C)+2)+A;},bounceIn:function(B,A,D,C){return D-YAHOO.util.Easing.bounceOut(C-B,0,D,C)+A;},bounceOut:function(B,A,D,C){if((B/=C)<(1/2.75)){return D*(7.5625*B*B)+A;}else{if(B<(2/2.75)){return D*(7.5625*(B-=(1.5/2.75))*B+0.75)+A;}else{if(B<(2.5/2.75)){return D*(7.5625*(B-=(2.25/2.75))*B+0.9375)+A;}}}return D*(7.5625*(B-=(2.625/2.75))*B+0.984375)+A;},bounceBoth:function(B,A,D,C){if(B<C/2){return YAHOO.util.Easing.bounceIn(B*2,0,D,C)*0.5+A;}return YAHOO.util.Easing.bounceOut(B*2-C,0,D,C)*0.5+D*0.5+A;}};(function(){YAHOO.util.Motion=function(G,F,H,I){if(G){YAHOO.util.Motion.superclass.constructor.call(this,G,F,H,I);}};YAHOO.extend(YAHOO.util.Motion,YAHOO.util.ColorAnim);var D=YAHOO.util;var E=D.Motion.superclass;var B=D.Motion.prototype;B.toString=function(){var F=this.getEl();var G=F.id||F.tagName;return("Motion "+G);};B.patterns.points=/^points$/i;B.setAttribute=function(F,H,G){if(this.patterns.points.test(F)){G=G||"px";E.setAttribute.call(this,"left",H[0],G);E.setAttribute.call(this,"top",H[1],G);}else{E.setAttribute.call(this,F,H,G);}};B.getAttribute=function(F){if(this.patterns.points.test(F)){var G=[E.getAttribute.call(this,"left"),E.getAttribute.call(this,"top")];}else{G=E.getAttribute.call(this,F);}return G;};B.doMethod=function(F,J,G){var I=null;if(this.patterns.points.test(F)){var H=this.method(this.currentFrame,0,100,this.totalFrames)/100;I=D.Bezier.getPosition(this.runtimeAttributes[F],H);}else{I=E.doMethod.call(this,F,J,G);}return I;};B.setRuntimeAttribute=function(O){if(this.patterns.points.test(O)){var G=this.getEl();var I=this.attributes;var F;var K=I["points"]["control"]||[];var H;var L,N;if(K.length>0&&!(K[0]instanceof Array)){K=[K];}else{var J=[];for(L=0,N=K.length;L<N;++L){J[L]=K[L];}K=J;}if(D.Dom.getStyle(G,"position")=="static"){D.Dom.setStyle(G,"position","relative");}if(C(I["points"]["from"])){D.Dom.setXY(G,I["points"]["from"]);}else{D.Dom.setXY(G,D.Dom.getXY(G));}F=this.getAttribute("points");if(C(I["points"]["to"])){H=A.call(this,I["points"]["to"],F);var M=D.Dom.getXY(this.getEl());for(L=0,N=K.length;L<N;++L){K[L]=A.call(this,K[L],F);}}else{if(C(I["points"]["by"])){H=[F[0]+I["points"]["by"][0],F[1]+I["points"]["by"][1]];for(L=0,N=K.length;L<N;++L){K[L]=[F[0]+K[L][0],F[1]+K[L][1]];}}}this.runtimeAttributes[O]=[F];if(K.length>0){this.runtimeAttributes[O]=this.runtimeAttributes[O].concat(K);}this.runtimeAttributes[O][this.runtimeAttributes[O].length]=H;}else{E.setRuntimeAttribute.call(this,O);}};var A=function(F,H){var G=D.Dom.getXY(this.getEl());F=[F[0]-G[0]+H[0],F[1]-G[1]+H[1]];return F;};var C=function(F){return(typeof F!=="undefined");};})();(function(){YAHOO.util.Scroll=function(E,D,F,G){if(E){YAHOO.util.Scroll.superclass.constructor.call(this,E,D,F,G);}};YAHOO.extend(YAHOO.util.Scroll,YAHOO.util.ColorAnim);var B=YAHOO.util;var C=B.Scroll.superclass;var A=B.Scroll.prototype;A.toString=function(){var D=this.getEl();var E=D.id||D.tagName;return("Scroll "+E);};A.doMethod=function(D,G,E){var F=null;if(D=="scroll"){F=[this.method(this.currentFrame,G[0],E[0]-G[0],this.totalFrames),this.method(this.currentFrame,G[1],E[1]-G[1],this.totalFrames)];}else{F=C.doMethod.call(this,D,G,E);}return F;};A.getAttribute=function(D){var F=null;var E=this.getEl();if(D=="scroll"){F=[E.scrollLeft,E.scrollTop];}else{F=C.getAttribute.call(this,D);}return F;};A.setAttribute=function(D,G,F){var E=this.getEl();if(D=="scroll"){E.scrollLeft=G[0];E.scrollTop=G[1];}else{C.setAttribute.call(this,D,G,F);}};})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.3.1",build:"541"});if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var A=YAHOO.util.Event;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true;},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(D,C){for(var E in this.ids){for(var B in this.ids[E]){var F=this.ids[E][B];if(!this.isTypeOfDD(F)){continue;}F[D].apply(F,C);}}},_onLoad:function(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true);},_onResize:function(B){this._execOnAll("resetConstraints",[]);},lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isLocked:function(){return this.locked;},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(C,B){if(!this.initialized){this.init();}if(!this.ids[B]){this.ids[B]={};}this.ids[B][C.id]=C;},removeDDFromGroup:function(D,B){if(!this.ids[B]){this.ids[B]={};}var C=this.ids[B];if(C&&C[D.id]){delete C[D.id];}},_remove:function(C){for(var B in C.groups){if(B&&this.ids[B][C.id]){delete this.ids[B][C.id];}}delete this.handleIds[C.id];},regHandle:function(C,B){if(!this.handleIds[C]){this.handleIds[C]={};}this.handleIds[C][B]=B;},isDragDrop:function(B){return(this.getDDById(B))?true:false;},getRelated:function(G,C){var F=[];for(var E in G.groups){for(var D in this.ids[E]){var B=this.ids[E][D];if(!this.isTypeOfDD(B)){continue;}if(!C||B.isTarget){F[F.length]=B;}}}return F;},isLegalTarget:function(F,E){var C=this.getRelated(F,true);for(var D=0,B=C.length;D<B;++D){if(C[D].id==E.id){return true;}}return false;},isTypeOfDD:function(B){return(B&&B.__ygDragDrop);},isHandle:function(C,B){return(this.handleIds[C]&&this.handleIds[C][B]);},getDDById:function(C){for(var B in this.ids){if(this.ids[B][C]){return this.ids[B][C];}}return null;},handleMouseDown:function(D,C){this.currentTarget=YAHOO.util.Event.getTarget(D);this.dragCurrent=C;var B=C.getEl();this.startX=YAHOO.util.Event.getPageX(D);this.startY=YAHOO.util.Event.getPageY(D);this.deltaX=this.startX-B.offsetLeft;this.deltaY=this.startY-B.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var E=YAHOO.util.DDM;E.startDrag(E.startX,E.startY);},this.clickTimeThresh);},startDrag:function(B,D){clearTimeout(this.clickTimeout);var C=this.dragCurrent;if(C){C.b4StartDrag(B,D);}if(C){C.startDrag(B,D);}this.dragThreshMet=true;},handleMouseUp:function(B){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){this.fireEvents(B,true);}else{}this.stopDrag(B);this.stopEvent(B);}},stopEvent:function(B){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(B);}if(this.preventDefault){YAHOO.util.Event.preventDefault(B);}},stopDrag:function(C,B){if(this.dragCurrent&&!B){if(this.dragThreshMet){this.dragCurrent.b4EndDrag(C);this.dragCurrent.endDrag(C);}this.dragCurrent.onMouseUp(C);}this.dragCurrent=null;this.dragOvers={};},handleMouseMove:function(E){var B=this.dragCurrent;if(B){if(YAHOO.util.Event.isIE&&!E.button){this.stopEvent(E);return this.handleMouseUp(E);}if(!this.dragThreshMet){var D=Math.abs(this.startX-YAHOO.util.Event.getPageX(E));var C=Math.abs(this.startY-YAHOO.util.Event.getPageY(E));if(D>this.clickPixelThresh||C>this.clickPixelThresh){this.startDrag(this.startX,this.startY);}}if(this.dragThreshMet){B.b4Drag(E);if(B){B.onDrag(E);}if(B){this.fireEvents(E,false);}}this.stopEvent(E);}},fireEvents:function(Q,H){var S=this.dragCurrent;if(!S||S.isLocked()){return;}var J=YAHOO.util.Event.getPageX(Q),I=YAHOO.util.Event.getPageY(Q),K=new YAHOO.util.Point(J,I),F=S.getTargetCoord(K.x,K.y),C=S.getDragEl(),P=new YAHOO.util.Region(F.y,F.x+C.offsetWidth,F.y+C.offsetHeight,F.x),E=[],G=[],B=[],R=[],O=[];for(var M in this.dragOvers){var T=this.dragOvers[M];if(!this.isTypeOfDD(T)){continue;}if(!this.isOverTarget(K,T,this.mode,P)){G.push(T);}E[M]=true;delete this.dragOvers[M];}for(var L in S.groups){if("string"!=typeof L){continue;}for(M in this.ids[L]){var D=this.ids[L][M];if(!this.isTypeOfDD(D)){continue;}if(D.isTarget&&!D.isLocked()&&D!=S){if(this.isOverTarget(K,D,this.mode,P)){if(H){R.push(D);}else{if(!E[D.id]){O.push(D);}else{B.push(D);}this.dragOvers[D.id]=D;}}}}}this.interactionInfo={out:G,enter:O,over:B,drop:R,point:K,draggedRegion:P,sourceRegion:this.locationCache[S.id],validDrop:H};if(H&&!R.length){this.interactionInfo.validDrop=false;S.onInvalidDrop(Q);}if(this.mode){if(G.length){S.b4DragOut(Q,G);if(S){S.onDragOut(Q,G);}}if(O.length){if(S){S.onDragEnter(Q,O);}}if(B.length){if(S){S.b4DragOver(Q,B);}if(S){S.onDragOver(Q,B);}}if(R.length){if(S){S.b4DragDrop(Q,R);}if(S){S.onDragDrop(Q,R);}}}else{var N=0;for(M=0,N=G.length;M<N;++M){if(S){S.b4DragOut(Q,G[M].id);}if(S){S.onDragOut(Q,G[M].id);}}for(M=0,N=O.length;M<N;++M){if(S){S.onDragEnter(Q,O[M].id);}}for(M=0,N=B.length;M<N;++M){if(S){S.b4DragOver(Q,B[M].id);}if(S){S.onDragOver(Q,B[M].id);}}for(M=0,N=R.length;M<N;++M){if(S){S.b4DragDrop(Q,R[M].id);}if(S){S.onDragDrop(Q,R[M].id);}}}},getBestMatch:function(D){var F=null;var C=D.length;if(C==1){F=D[0];}else{for(var E=0;E<C;++E){var B=D[E];if(this.mode==this.INTERSECT&&B.cursorIsOver){F=B;break;}else{if(!F||!F.overlap||(B.overlap&&F.overlap.getArea()<B.overlap.getArea())){F=B;}}}}return F;},refreshCache:function(C){var E=C||this.ids;for(var B in E){if("string"!=typeof B){continue;}for(var D in this.ids[B]){var F=this.ids[B][D];if(this.isTypeOfDD(F)){var G=this.getLocation(F);if(G){this.locationCache[F.id]=G;}else{delete this.locationCache[F.id];}}}}},verifyEl:function(C){try{if(C){var B=C.offsetParent;if(B){return true;}}}catch(D){}return false;},getLocation:function(G){if(!this.isTypeOfDD(G)){return null;}var E=G.getEl(),J,D,C,L,K,M,B,I,F;try{J=YAHOO.util.Dom.getXY(E);}catch(H){}if(!J){return null;}D=J[0];C=D+E.offsetWidth;L=J[1];K=L+E.offsetHeight;M=L-G.padding[0];B=C+G.padding[1];I=K+G.padding[2];F=D-G.padding[3];return new YAHOO.util.Region(M,B,I,F);},isOverTarget:function(J,B,D,E){var F=this.locationCache[B.id];if(!F||!this.useCache){F=this.getLocation(B);this.locationCache[B.id]=F;}if(!F){return false;}B.cursorIsOver=F.contains(J);var I=this.dragCurrent;if(!I||(!D&&!I.constrainX&&!I.constrainY)){return B.cursorIsOver;}B.overlap=null;if(!E){var G=I.getTargetCoord(J.x,J.y);var C=I.getDragEl();E=new YAHOO.util.Region(G.y,G.x+C.offsetWidth,G.y+C.offsetHeight,G.x);}var H=E.intersect(F);if(H){B.overlap=H;return(D)?true:B.cursorIsOver;}else{return false;}},_onUnload:function(C,B){this.unregAll();},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null;}this._execOnAll("unreg",[]);this.ids={};},elementCache:{},getElWrapper:function(C){var B=this.elementCache[C];if(!B||!B.el){B=this.elementCache[C]=new this.ElementWrapper(YAHOO.util.Dom.get(C));}return B;},getElement:function(B){return YAHOO.util.Dom.get(B);},getCss:function(C){var B=YAHOO.util.Dom.get(C);return(B)?B.style:null;},ElementWrapper:function(B){this.el=B||null;this.id=this.el&&B.id;this.css=this.el&&B.style;},getPosX:function(B){return YAHOO.util.Dom.getX(B);},getPosY:function(B){return YAHOO.util.Dom.getY(B);},swapNode:function(D,B){if(D.swapNode){D.swapNode(B);}else{var E=B.parentNode;var C=B.nextSibling;if(C==D){E.insertBefore(D,B);}else{if(B==D.nextSibling){E.insertBefore(B,D);}else{D.parentNode.replaceChild(B,D);E.insertBefore(D,C);}}}},getScroll:function(){var D,B,E=document.documentElement,C=document.body;if(E&&(E.scrollTop||E.scrollLeft)){D=E.scrollTop;B=E.scrollLeft;}else{if(C){D=C.scrollTop;B=C.scrollLeft;}else{}}return{top:D,left:B};},getStyle:function(C,B){return YAHOO.util.Dom.getStyle(C,B);},getScrollTop:function(){return this.getScroll().top;},getScrollLeft:function(){return this.getScroll().left;},moveToEl:function(B,D){var C=YAHOO.util.Dom.getXY(D);YAHOO.util.Dom.setXY(B,C);},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight();},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth();},numericSort:function(C,B){return(C-B);},_timeoutCount:0,_addListeners:function(){var B=YAHOO.util.DDM;if(YAHOO.util.Event&&document){B._onLoad();}else{if(B._timeoutCount>2000){}else{setTimeout(B._addListeners,10);if(document&&document.body){B._timeoutCount+=1;}}}},handleWasClicked:function(B,D){if(this.isHandle(D,B.id)){return true;}else{var C=B.parentNode;while(C){if(this.isHandle(D,C.id)){return true;}else{C=C.parentNode;}}}return false;}};}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners();}(function(){var A=YAHOO.util.Event;var B=YAHOO.util.Dom;YAHOO.util.DragDrop=function(E,C,D){if(E){this.init(E,C,D);}};YAHOO.util.DragDrop.prototype={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,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:function(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:function(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=B.get(this.id);}return this._domRef;},getDragEl:function(){return B.get(this.dragElId);},init:function(E,C,D){this.initTarget(E,C,D);A.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);},initTarget:function(E,C,D){this.config=D||{};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof E!=="string"){this._domRef=E;E=B.generateId(E);}this.id=E;this.addToGroup((C)?C:"default");this.handleElId=E;A.onAvailable(E,this.handleOnAvailable,this,true);this.setDragElId(E);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();},applyConfig:function(){this.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);},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable();},setPadding:function(E,C,F,D){if(!C&&0!==C){this.padding=[E,E,E,E];}else{if(!F&&0!==F){this.padding=[E,C,E,C];}else{this.padding=[E,C,F,D];}}},setInitPosition:function(F,E){var G=this.getEl();if(!this.DDM.verifyEl(G)){return;}var D=F||0;var C=E||0;var H=B.getXY(G);this.initPageX=H[0]-D;this.initPageY=H[1]-C;this.lastPageX=H[0];this.lastPageY=H[1];this.setStartPosition(H);},setStartPosition:function(D){var C=D||B.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=C[0];this.startPageY=C[1];},addToGroup:function(C){this.groups[C]=true;this.DDM.regDragDrop(this,C);},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C];}this.DDM.removeDDFromGroup(this,C);},setDragElId:function(C){this.dragElId=C;},setHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.handleElId=C;this.DDM.regHandle(this.id,C);},setOuterHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}A.on(C,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(C);this.hasOuterHandles=true;},unreg:function(){A.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this);},isLocked:function(){return(this.DDM.isLocked()||this.locked);},handleMouseDown:function(F,E){var C=F.which||F.button;if(this.primaryButtonOnly&&C>1){return;}if(this.isLocked()){return;}this.b4MouseDown(F);this.onMouseDown(F);this.DDM.refreshCache(this.groups);var D=new YAHOO.util.Point(A.getPageX(F),A.getPageY(F));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(D,this)){}else{if(this.clickValidator(F)){this.setStartPosition();this.DDM.handleMouseDown(F,this);this.DDM.stopEvent(F);}else{}}},clickValidator:function(D){var C=A.getTarget(D);return(this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.handleWasClicked(C,this.id)));},getTargetCoord:function(E,D){var C=E-this.deltaX;var F=D-this.deltaY;if(this.constrainX){if(C<this.minX){C=this.minX;}if(C>this.maxX){C=this.maxX;}}if(this.constrainY){if(F<this.minY){F=this.minY;}if(F>this.maxY){F=this.maxY;}}C=this.getTick(C,this.xTicks);F=this.getTick(F,this.yTicks);return{x:C,y:F};},addInvalidHandleType:function(C){var D=C.toUpperCase();this.invalidHandleTypes[D]=D;},addInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.invalidHandleIds[C]=C;},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C);},removeInvalidHandleType:function(C){var D=C.toUpperCase();delete this.invalidHandleTypes[D];},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}delete this.invalidHandleIds[C];},removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.length;E<C;++E){if(this.invalidHandleClasses[E]==D){delete this.invalidHandleClasses[E];}}},isValidHandleChild:function(F){var E=true;var H;try{H=F.nodeName.toUpperCase();}catch(G){H=F.nodeName;}E=E&&!this.invalidHandleTypes[H];E=E&&!this.invalidHandleIds[F.id];for(var D=0,C=this.invalidHandleClasses.length;E&&D<C;++D){E=!B.hasClass(F,this.invalidHandleClasses[D]);}return E;},setXTicks:function(F,C){this.xTicks=[];this.xTickSize=C;var E={};for(var D=this.initPageX;D>=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}this.xTicks.sort(this.DDM.numericSort);},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}this.yTicks.sort(this.DDM.numericSort);},setXConstraint:function(E,D,C){this.leftConstraint=parseInt(E,10);this.rightConstraint=parseInt(D,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(C){this.setXTicks(this.initPageX,C);}this.constrainX=true;},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks();},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0;},setYConstraint:function(C,E,D){this.topConstraint=parseInt(C,10);this.bottomConstraint=parseInt(E,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(D){this.setYTicks(this.initPageY,D);}this.constrainY=true;},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C);}else{this.setInitPosition();}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize);}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize);}},getTick:function(I,F){if(!F){return I;}else{if(F[0]>=I){return F[0];}else{for(var D=0,C=F.length;D<C;++D){var E=D+1;if(F[E]&&F[E]>=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E];}}return F[F.length-1];}}},toString:function(){return("DragDrop "+this.id);}};})();YAHOO.util.DD=function(C,A,B){if(C){this.init(C,A,B);}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D);},setDelta:function(B,A){this.deltaX=B;this.deltaY=A;},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B);},alignElWithMouse:function(B,F,E){var D=this.getTargetCoord(F,E);if(!this.deltaSetXY){var G=[D.x,D.y];YAHOO.util.Dom.setXY(B,G);var C=parseInt(YAHOO.util.Dom.getStyle(B,"left"),10);var A=parseInt(YAHOO.util.Dom.getStyle(B,"top"),10);this.deltaSetXY=[C-D.x,A-D.y];}else{YAHOO.util.Dom.setStyle(B,"left",(D.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(B,"top",(D.y+this.deltaSetXY[1])+"px");}this.cachePosition(D.x,D.y);this.autoScroll(D.x,D.y,B.offsetHeight,B.offsetWidth);},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A;}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1];}},autoScroll:function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G<C){window.scrollTo(D,N+A);}if(I<N&&N>0&&I-N<C){window.scrollTo(D,N-A);}if(M>B&&F<C){window.scrollTo(D+A,N);}if(J<D&&D>0&&J-D<C){window.scrollTo(D-A,N);}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false);},b4MouseDown:function(A){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},b4Drag:function(A){this.setDragElPos(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},toString:function(){return("DD "+this.id);}});YAHOO.util.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame();}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this,A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame();},50);return;}var F=this.getDragEl(),E=YAHOO.util.Dom;if(!F){F=document.createElement("div");F.id=this.dragElId;var D=F.style;D.position="absolute";D.visibility="hidden";D.cursor="move";D.border="2px solid #aaa";D.zIndex=999;D.height="25px";D.width="25px";var C=document.createElement("div");E.setStyle(C,"height","100%");E.setStyle(C,"width","100%");E.setStyle(C,"background-color","#ccc");E.setStyle(C,"opacity","0");F.appendChild(C);A.insertBefore(F,A.firstChild);}},initFrame:function(){this.createFrame();},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId);},showFrame:function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2));}this.setDragElPos(E,D);YAHOO.util.Dom.setStyle(A,"visibility","visible");},_resizeProxy:function(){if(this.resizeFrame){var H=YAHOO.util.Dom;var B=this.getEl();var C=this.getDragEl();var G=parseInt(H.getStyle(C,"borderTopWidth"),10);var I=parseInt(H.getStyle(C,"borderRightWidth"),10);var F=parseInt(H.getStyle(C,"borderBottomWidth"),10);var D=parseInt(H.getStyle(C,"borderLeftWidth"),10);if(isNaN(G)){G=0;}if(isNaN(I)){I=0;}if(isNaN(F)){F=0;}if(isNaN(D)){D=0;}var E=Math.max(0,B.offsetWidth-I-D);var A=Math.max(0,B.offsetHeight-G-F);H.setStyle(C,"width",E+"px");H.setStyle(C,"height",A+"px");}},b4MouseDown:function(B){this.setStartPosition();var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.autoOffset(A,C);},b4StartDrag:function(A,B){this.showFrame(A,B);},b4EndDrag:function(A){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden");},endDrag:function(D){var C=YAHOO.util.Dom;var B=this.getEl();var A=this.getDragEl();C.setStyle(A,"visibility","");C.setStyle(B,"visibility","hidden");YAHOO.util.DDM.moveToEl(B,A);C.setStyle(A,"visibility","hidden");C.setStyle(B,"visibility","");},toString:function(){return("DDProxy "+this.id);}});YAHOO.util.DDTarget=function(C,A,B){if(C){this.initTarget(C,A,B);}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id);}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.3.1",build:"541"});YAHOO.util.Attribute=function(B,A){if(A){this.owner=A;this.configure(B,true);}};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,validator:null,getValue:function(){return this.value;},setValue:function(F,B){var E;var A=this.owner;var C=this.name;var D={type:C,prevValue:this.getValue(),newValue:F};if(this.readOnly||(this.writeOnce&&this._written)){return false;}if(this.validator&&!this.validator.call(A,F)){return false;}if(!B){E=A.fireBeforeChangeEvent(D);if(E===false){return false;}}if(this.method){this.method.call(A,F);}this.value=F;this._written=true;D.type=C;if(!B){this.owner.fireChangeEvent(D);}return true;},configure:function(B,C){B=B||{};this._written=false;this._initialConfig=this._initialConfig||{};for(var A in B){if(A&&YAHOO.lang.hasOwnProperty(B,A)){this[A]=B[A];if(C){this._initialConfig[A]=B[A];}}}},resetValue:function(){return this.setValue(this._initialConfig.value);},resetConfig:function(){this.configure(this._initialConfig);},refresh:function(A){this.setValue(this.value,A);}};(function(){var A=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(C){this._configs=this._configs||{};var B=this._configs[C];if(!B){return undefined;}return B.value;},set:function(D,E,B){this._configs=this._configs||{};var C=this._configs[D];if(!C){return false;}return C.setValue(E,B);},getAttributeKeys:function(){this._configs=this._configs;var D=[];var B;for(var C in this._configs){B=this._configs[C];if(A.hasOwnProperty(this._configs,C)&&!A.isUndefined(B)){D[D.length]=C;}}return D;},setAttributes:function(D,B){for(var C in D){if(A.hasOwnProperty(D,C)){this.set(C,D[C],B);}}},resetValue:function(C,B){this._configs=this._configs||{};if(this._configs[C]){this.set(C,this._configs[C]._initialConfig.value,B);return true;}return false;},refresh:function(E,C){this._configs=this._configs;E=((A.isString(E))?[E]:E)||this.getAttributeKeys();for(var D=0,B=E.length;D<B;++D){if(this._configs[E[D]]&&!A.isUndefined(this._configs[E[D]].value)&&!A.isNull(this._configs[E[D]].value)){this._configs[E[D]].refresh(C);}}},register:function(B,C){this.setAttributeConfig(B,C);},getAttributeConfig:function(C){this._configs=this._configs||{};var B=this._configs[C]||{};var D={};for(C in B){if(A.hasOwnProperty(B,C)){D[C]=B[C];}}return D;},setAttributeConfig:function(B,C,D){this._configs=this._configs||{};C=C||{};if(!this._configs[B]){C.name=B;this._configs[B]=this.createAttribute(C);}else{this._configs[B].configure(C,D);}},configureAttribute:function(B,C,D){this.setAttributeConfig(B,C,D);},resetAttributeConfig:function(B){this._configs=this._configs||{};this._configs[B].resetConfig();},subscribe:function(B,C){this._events=this._events||{};if(!(B in this._events)){this._events[B]=this.createEvent(B);}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){this.subscribe.apply(this,arguments);},addListener:function(){this.subscribe.apply(this,arguments);},fireBeforeChangeEvent:function(C){var B="before";B+=C.type.charAt(0).toUpperCase()+C.type.substr(1)+"Change";C.type=B;return this.fireEvent(C.type,C);},fireChangeEvent:function(B){B.type+="Change";return this.fireEvent(B.type,B);},createAttribute:function(B){return new YAHOO.util.Attribute(B,this);}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider);})();(function(){var D=YAHOO.util.Dom,F=YAHOO.util.AttributeProvider;YAHOO.util.Element=function(G,H){if(arguments.length){this.init(G,H);}};YAHOO.util.Element.prototype={DOM_EVENTS:null,appendChild:function(G){G=G.get?G.get("element"):G;this.get("element").appendChild(G);},getElementsByTagName:function(G){return this.get("element").getElementsByTagName(G);},hasChildNodes:function(){return this.get("element").hasChildNodes();},insertBefore:function(G,H){G=G.get?G.get("element"):G;H=(H&&H.get)?H.get("element"):H;this.get("element").insertBefore(G,H);},removeChild:function(G){G=G.get?G.get("element"):G;this.get("element").removeChild(G);return true;},replaceChild:function(G,H){G=G.get?G.get("element"):G;H=H.get?H.get("element"):H;return this.get("element").replaceChild(G,H);},initAttributes:function(G){},addListener:function(K,J,L,I){var H=this.get("element");I=I||this;H=this.get("id")||H;var G=this;if(!this._events[K]){if(this.DOM_EVENTS[K]){YAHOO.util.Event.addListener(H,K,function(M){if(M.srcElement&&!M.target){M.target=M.srcElement;}G.fireEvent(K,M);},L,I);}this.createEvent(K,this);}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){this.addListener.apply(this,arguments);},subscribe:function(){this.addListener.apply(this,arguments);},removeListener:function(H,G){this.unsubscribe.apply(this,arguments);},addClass:function(G){D.addClass(this.get("element"),G);},getElementsByClassName:function(H,G){return D.getElementsByClassName(H,G,this.get("element"));},hasClass:function(G){return D.hasClass(this.get("element"),G);},removeClass:function(G){return D.removeClass(this.get("element"),G);},replaceClass:function(H,G){return D.replaceClass(this.get("element"),H,G);},setStyle:function(I,H){var G=this.get("element");if(!G){return this._queue[this._queue.length]=["setStyle",arguments];}return D.setStyle(G,I,H);},getStyle:function(G){return D.getStyle(this.get("element"),G);},fireQueue:function(){var H=this._queue;for(var I=0,G=H.length;I<G;++I){this[H[I][0]].apply(this,H[I][1]);}},appendTo:function(H,I){H=(H.get)?H.get("element"):D.get(H);this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:H});I=(I&&I.get)?I.get("element"):D.get(I);var G=this.get("element");if(!G){return false;}if(!H){return false;}if(G.parent!=H){if(I){H.insertBefore(G,I);}else{H.appendChild(G);}}this.fireEvent("appendTo",{type:"appendTo",target:H});},get:function(G){var I=this._configs||{};var H=I.element;if(H&&!I[G]&&!YAHOO.lang.isUndefined(H.value[G])){return H.value[G];}return F.prototype.get.call(this,G);},setAttributes:function(L,H){var K=this.get("element");for(var J in L){if(!this._configs[J]&&!YAHOO.lang.isUndefined(K[J])){this.setAttributeConfig(J);}}for(var I=0,G=this._configOrder.length;I<G;++I){if(L[this._configOrder[I]]){this.set(this._configOrder[I],L[this._configOrder[I]],H);}}},set:function(H,J,G){var I=this.get("element");if(!I){this._queue[this._queue.length]=["set",arguments];if(this._configs[H]){this._configs[H].value=J;}return;}if(!this._configs[H]&&!YAHOO.lang.isUndefined(I[H])){C.call(this,H);}return F.prototype.set.apply(this,arguments);},setAttributeConfig:function(G,I,J){var H=this.get("element");if(H&&!this._configs[G]&&!YAHOO.lang.isUndefined(H[G])){C.call(this,G,I);}else{F.prototype.setAttributeConfig.apply(this,arguments);}this._configOrder.push(G);},getAttributeKeys:function(){var H=this.get("element");var I=F.prototype.getAttributeKeys.call(this);for(var G in H){if(!this._configs[G]){I[G]=I[G]||H[G];}}return I;},createEvent:function(H,G){this._events[H]=true;F.prototype.createEvent.apply(this,arguments);},init:function(H,G){A.apply(this,arguments);}};var A=function(H,G){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._configOrder=[];G=G||{};G.element=G.element||H||null;this.DOM_EVENTS={"click":true,"dblclick":true,"keydown":true,"keypress":true,"keyup":true,"mousedown":true,"mousemove":true,"mouseout":true,"mouseover":true,"mouseup":true,"focus":true,"blur":true,"submit":true};var I=false;if(YAHOO.lang.isString(H)){C.call(this,"id",{value:G.element});}if(D.get(H)){I=true;E.call(this,G);B.call(this,G);}YAHOO.util.Event.onAvailable(G.element,function(){if(!I){E.call(this,G);}this.fireEvent("available",{type:"available",target:G.element});},this,true);YAHOO.util.Event.onContentReady(G.element,function(){if(!I){B.call(this,G);}this.fireEvent("contentReady",{type:"contentReady",target:G.element});},this,true);};var E=function(G){this.setAttributeConfig("element",{value:D.get(G.element),readOnly:true});};var B=function(G){this.initAttributes(G);this.setAttributes(G,true);this.fireQueue();};var C=function(G,I){var H=this.get("element");I=I||{};I.name=G;I.method=I.method||function(J){H[G]=J;};I.value=I.value||H[G];this._configs[G]=new YAHOO.util.Attribute(I,this);};YAHOO.augment(YAHOO.util.Element,F);})();YAHOO.register("element",YAHOO.util.Element,{version:"2.3.1",build:"541"});YAHOO.register("utilities",YAHOO,{version:"2.3.1",build:"541"});(function(){YAHOO.widget.TabView=function(K,J){J=J||{};if(arguments.length==1&&!YAHOO.lang.isString(K)&&!K.nodeName){J=K;K=J.element||null;}if(!K&&!J.element){K=I.call(this,J);}YAHOO.widget.TabView.superclass.constructor.call(this,K,J);};YAHOO.extend(YAHOO.widget.TabView,YAHOO.util.Element);var F=YAHOO.widget.TabView.prototype;var E=YAHOO.util.Dom;var H=YAHOO.util.Event;var D=YAHOO.widget.Tab;F.CLASSNAME="yui-navset";F.TAB_PARENT_CLASSNAME="yui-nav";F.CONTENT_PARENT_CLASSNAME="yui-content";F._tabParent=null;F._contentParent=null;F.addTab=function(M,O){var P=this.get("tabs");if(!P){this._queue[this._queue.length]=["addTab",arguments];return false;}O=(O===undefined)?P.length:O;var R=this.getTab(O);var T=this;var L=this.get("element");var S=this._tabParent;var Q=this._contentParent;var J=M.get("element");var K=M.get("contentEl");if(R){S.insertBefore(J,R.get("element"));}else{S.appendChild(J);}if(K&&!E.isAncestor(Q,K)){Q.appendChild(K);}if(!M.get("active")){M.set("contentVisible",false,true);}else{this.set("activeTab",M,true);}var N=function(V){YAHOO.util.Event.preventDefault(V);var U=false;if(this==T.get("activeTab")){U=true;}T.set("activeTab",this,U);};M.addListener(M.get("activationEvent"),N);M.addListener("activationEventChange",function(U){if(U.prevValue!=U.newValue){M.removeListener(U.prevValue,N);M.addListener(U.newValue,N);}});P.splice(O,0,M);};F.DOMEventHandler=function(P){var K=this.get("element");var Q=YAHOO.util.Event.getTarget(P);var S=this._tabParent;if(E.isAncestor(S,Q)){var L;var M=null;var J;var R=this.get("tabs");for(var N=0,O=R.length;N<O;N++){L=R[N].get("element");J=R[N].get("contentEl");if(Q==L||E.isAncestor(L,Q)){M=R[N];break;}}if(M){M.fireEvent(P.type,P);}}};F.getTab=function(J){return this.get("tabs")[J];};F.getTabIndex=function(N){var K=null;var M=this.get("tabs");for(var L=0,J=M.length;L<J;++L){if(N==M[L]){K=L;break;}}return K;};F.removeTab=function(M){var L=this.get("tabs").length;var K=this.getTabIndex(M);var J=K+1;if(M==this.get("activeTab")){if(L>1){if(K+1==L){this.set("activeIndex",K-1);}else{this.set("activeIndex",K+1);}}}this._tabParent.removeChild(M.get("element"));this._contentParent.removeChild(M.get("contentEl"));this._configs.tabs.value.splice(K,1);};F.toString=function(){var J=this.get("id")||this.get("tagName");return"TabView "+J;};F.contentTransition=function(K,J){K.set("contentVisible",true);J.set("contentVisible",false);};F.initAttributes=function(J){YAHOO.widget.TabView.superclass.initAttributes.call(this,J);if(!J.orientation){J.orientation="top";}var L=this.get("element");if(!YAHOO.util.Dom.hasClass(L,this.CLASSNAME)){YAHOO.util.Dom.addClass(L,this.CLASSNAME);}this.setAttributeConfig("tabs",{value:[],readOnly:true});this._tabParent=this.getElementsByClassName(this.TAB_PARENT_CLASSNAME,"ul")[0]||G.call(this);this._contentParent=this.getElementsByClassName(this.CONTENT_PARENT_CLASSNAME,"div")[0]||C.call(this);this.setAttributeConfig("orientation",{value:J.orientation,method:function(M){var N=this.get("orientation");this.addClass("yui-navset-"+M);if(N!=M){this.removeClass("yui-navset-"+N);}switch(M){case"bottom":this.appendChild(this._tabParent);break;}}});this.setAttributeConfig("activeIndex",{value:J.activeIndex,method:function(M){this.set("activeTab",this.getTab(M));},validator:function(M){return!this.getTab(M).get("disabled");}});this.setAttributeConfig("activeTab",{value:J.activeTab,method:function(N){var M=this.get("activeTab");if(N){N.set("active",true);this._configs["activeIndex"].value=this.getTabIndex(N);}if(M&&M!=N){M.set("active",false);}if(M&&N!=M){this.contentTransition(N,M);}else{if(N){N.set("contentVisible",true);}}},validator:function(M){return!M.get("disabled");}});if(this._tabParent){B.call(this);}this.DOM_EVENTS.submit=false;this.DOM_EVENTS.focus=false;this.DOM_EVENTS.blur=false;for(var K in this.DOM_EVENTS){if(YAHOO.lang.hasOwnProperty(this.DOM_EVENTS,K)){this.addListener.call(this,K,this.DOMEventHandler);}}};var B=function(){var Q,L,P;var O=this.get("element");var N=A(this._tabParent);var K=A(this._contentParent);for(var M=0,J=N.length;M<J;++M){L={};if(K[M]){L.contentEl=K[M];}Q=new YAHOO.widget.Tab(N[M],L);this.addTab(Q);if(Q.hasClass(Q.ACTIVE_CLASSNAME)){this._configs.activeTab.value=Q;this._configs.activeIndex.value=this.getTabIndex(Q);}}};var I=function(J){var K=document.createElement("div");if(this.CLASSNAME){K.className=this.CLASSNAME;}return K;};var G=function(J){var K=document.createElement("ul");if(this.TAB_PARENT_CLASSNAME){K.className=this.TAB_PARENT_CLASSNAME;}this.get("element").appendChild(K);return K;};var C=function(J){var K=document.createElement("div");if(this.CONTENT_PARENT_CLASSNAME){K.className=this.CONTENT_PARENT_CLASSNAME;}this.get("element").appendChild(K);return K;};var A=function(M){var K=[];var N=M.childNodes;for(var L=0,J=N.length;L<J;++L){if(N[L].nodeType==1){K[K.length]=N[L];}}return K;};})();(function(){var E=YAHOO.util.Dom,J=YAHOO.util.Event;var B=function(L,K){K=K||{};if(arguments.length==1&&!YAHOO.lang.isString(L)&&!L.nodeName){K=L;L=K.element;}if(!L&&!K.element){L=H.call(this,K);}this.loadHandler={success:function(M){this.set("content",M.responseText);},failure:function(M){}};B.superclass.constructor.call(this,L,K);this.DOM_EVENTS={};};YAHOO.extend(B,YAHOO.util.Element);var F=B.prototype;F.LABEL_TAGNAME="em";F.ACTIVE_CLASSNAME="selected";F.DISABLED_CLASSNAME="disabled";F.LOADING_CLASSNAME="loading";F.dataConnection=null;F.loadHandler=null;F._loading=false;F.toString=function(){var K=this.get("element");var L=K.id||K.tagName;return"Tab "+L;};F.initAttributes=function(K){K=K||{};B.superclass.initAttributes.call(this,K);var M=this.get("element");this.setAttributeConfig("activationEvent",{value:K.activationEvent||"click"});this.setAttributeConfig("labelEl",{value:K.labelEl||G.call(this),method:function(N){var O=this.get("labelEl");if(O){if(O==N){return false;}this.replaceChild(N,O);}else{if(M.firstChild){this.insertBefore(N,M.firstChild);}else{this.appendChild(N);}}}});this.setAttributeConfig("label",{value:K.label||D.call(this),method:function(O){var N=this.get("labelEl");if(!N){this.set("labelEl",I.call(this));}C.call(this,O);}});this.setAttributeConfig("contentEl",{value:K.contentEl||document.createElement("div"),method:function(N){var O=this.get("contentEl");if(O){if(O==N){return false;}this.replaceChild(N,O);}}});this.setAttributeConfig("content",{value:K.content,method:function(N){this.get("contentEl").innerHTML=N;}});var L=false;this.setAttributeConfig("dataSrc",{value:K.dataSrc});this.setAttributeConfig("cacheData",{value:K.cacheData||false,validator:YAHOO.lang.isBoolean});this.setAttributeConfig("loadMethod",{value:K.loadMethod||"GET",validator:YAHOO.lang.isString});this.setAttributeConfig("dataLoaded",{value:false,validator:YAHOO.lang.isBoolean,writeOnce:true});this.setAttributeConfig("dataTimeout",{value:K.dataTimeout||null,validator:YAHOO.lang.isNumber});this.setAttributeConfig("active",{value:K.active||this.hasClass(this.ACTIVE_CLASSNAME),method:function(N){if(N===true){this.addClass(this.ACTIVE_CLASSNAME);this.set("title","active");}else{this.removeClass(this.ACTIVE_CLASSNAME);this.set("title","");}},validator:function(N){return YAHOO.lang.isBoolean(N)&&!this.get("disabled");}});this.setAttributeConfig("disabled",{value:K.disabled||this.hasClass(this.DISABLED_CLASSNAME),method:function(N){if(N===true){E.addClass(this.get("element"),this.DISABLED_CLASSNAME);}else{E.removeClass(this.get("element"),this.DISABLED_CLASSNAME);}},validator:YAHOO.lang.isBoolean});this.setAttributeConfig("href",{value:K.href||this.getElementsByTagName("a")[0].getAttribute("href",2)||"#",method:function(N){this.getElementsByTagName("a")[0].href=N;},validator:YAHOO.lang.isString});this.setAttributeConfig("contentVisible",{value:K.contentVisible,method:function(N){if(N){this.get("contentEl").style.display="block";if(this.get("dataSrc")){if(!this._loading&&!(this.get("dataLoaded")&&this.get("cacheData"))){A.call(this);}}}else{this.get("contentEl").style.display="none";}},validator:YAHOO.lang.isBoolean});};var H=function(K){var O=document.createElement("li");var L=document.createElement("a");L.href=K.href||"#";O.appendChild(L);var N=K.label||null;var M=K.labelEl||null;if(M){if(!N){N=D.call(this,M);}}else{M=I.call(this);}L.appendChild(M);return O;};var G=function(){return this.getElementsByTagName(this.LABEL_TAGNAME)[0];};var I=function(){var K=document.createElement(this.LABEL_TAGNAME);return K;};var C=function(K){var L=this.get("labelEl");L.innerHTML=K;};var D=function(){var K,L=this.get("labelEl");if(!L){return undefined;}return L.innerHTML;};var A=function(){if(!YAHOO.util.Connect){return false;}E.addClass(this.get("contentEl").parentNode,this.LOADING_CLASSNAME);this._loading=true;this.dataConnection=YAHOO.util.Connect.asyncRequest(this.get("loadMethod"),this.get("dataSrc"),{success:function(K){this.loadHandler.success.call(this,K);this.set("dataLoaded",true);this.dataConnection=null;E.removeClass(this.get("contentEl").parentNode,this.LOADING_CLASSNAME);this._loading=false;},failure:function(K){this.loadHandler.failure.call(this,K);this.dataConnection=null;E.removeClass(this.get("contentEl").parentNode,this.LOADING_CLASSNAME);this._loading=false;},scope:this,timeout:this.get("dataTimeout")});};YAHOO.widget.Tab=B;})();YAHOO.register("tabview",YAHOO.widget.TabView,{version:"2.3.1",build:"541"});(function(){YAHOO.util.Config=function(D){if(D){this.init(D);}if(!D){}};var B=YAHOO.lang,C=YAHOO.util.CustomEvent,A=YAHOO.util.Config;A.CONFIG_CHANGED_EVENT="configChanged";A.BOOLEAN_TYPE="boolean";A.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(D){this.owner=D;this.configChangedEvent=this.createEvent(A.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=C.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[];},checkBoolean:function(D){return(typeof D==A.BOOLEAN_TYPE);},checkNumber:function(D){return(!isNaN(D));},fireEvent:function(D,F){var E=this.config[D];if(E&&E.event){E.event.fire(F);}},addProperty:function(E,D){E=E.toLowerCase();this.config[E]=D;D.event=this.createEvent(E,{scope:this.owner});D.event.signature=C.LIST;D.key=E;if(D.handler){D.event.subscribe(D.handler,this.owner);}this.setProperty(E,D.value,true);if(!D.suppressEvent){this.queueProperty(E,D.value);}},getConfig:function(){var D={},F,E;for(F in this.config){E=this.config[F];if(E&&E.event){D[F]=E.value;}}return D;},getProperty:function(D){var E=this.config[D.toLowerCase()];if(E&&E.event){return E.value;}else{return undefined;}},resetProperty:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event){if(this.initialConfig[D]&&!B.isUndefined(this.initialConfig[D])){this.setProperty(D,this.initialConfig[D]);return true;}}else{return false;}},setProperty:function(E,G,D){var F;E=E.toLowerCase();if(this.queueInProgress&&!D){this.queueProperty(E,G);return true;}else{F=this.config[E];if(F&&F.event){if(F.validator&&!F.validator(G)){return false;}else{F.value=G;if(!D){this.fireEvent(E,G);this.configChangedEvent.fire([E,G]);}return true;}}else{return false;}}},queueProperty:function(S,P){S=S.toLowerCase();var R=this.config[S],K=false,J,G,H,I,O,Q,F,M,N,D,L,T,E;if(R&&R.event){if(!B.isUndefined(P)&&R.validator&&!R.validator(P)){return false;}else{if(!B.isUndefined(P)){R.value=P;}else{P=R.value;}K=false;J=this.eventQueue.length;for(L=0;L<J;L++){G=this.eventQueue[L];if(G){H=G[0];I=G[1];if(H==S){this.eventQueue[L]=null;this.eventQueue.push([S,(!B.isUndefined(P)?P:I)]);K=true;break;}}}if(!K&&!B.isUndefined(P)){this.eventQueue.push([S,P]);}}if(R.supercedes){O=R.supercedes.length;for(T=0;T<O;T++){Q=R.supercedes[T];F=this.eventQueue.length;for(E=0;E<F;E++){M=this.eventQueue[E];if(M){N=M[0];D=M[1];if(N==Q.toLowerCase()){this.eventQueue.push([N,D]);this.eventQueue[E]=null;break;}}}}}return true;}else{return false;}},refireEvent:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event&&!B.isUndefined(E.value)){if(this.queueInProgress){this.queueProperty(D);}else{this.fireEvent(D,E.value);}}},applyConfig:function(E,H){var G,D,F;if(H){F={};for(G in E){if(B.hasOwnProperty(E,G)){F[G.toLowerCase()]=E[G];}}this.initialConfig=F;}for(G in E){if(B.hasOwnProperty(E,G)){this.queueProperty(G,E[G]);}}},refresh:function(){var D;for(D in this.config){this.refireEvent(D);}},fireQueue:function(){var E,H,D,G,F;this.queueInProgress=true;for(E=0;E<this.eventQueue.length;E++){H=this.eventQueue[E];if(H){D=H[0];G=H[1];F=this.config[D];F.value=G;this.fireEvent(D,G);}}this.queueInProgress=false;this.eventQueue=[];},subscribeToConfigEvent:function(E,F,H,D){var G=this.config[E.toLowerCase()];if(G&&G.event){if(!A.alreadySubscribed(G.event,F,H)){G.event.subscribe(F,H,D);}return true;}else{return false;}},unsubscribeFromConfigEvent:function(D,E,G){var F=this.config[D.toLowerCase()];if(F&&F.event){return F.event.unsubscribe(E,G);}else{return false;}},toString:function(){var D="Config";if(this.owner){D+=" ["+this.owner.toString()+"]";}return D;},outputEventQueue:function(){var D="",G,E,F=this.eventQueue.length;for(E=0;E<F;E++){G=this.eventQueue[E];if(G){D+=G[0]+"="+G[1]+", ";}}return D;},destroy:function(){var E=this.config,D,F;for(D in E){if(B.hasOwnProperty(E,D)){F=E[D];F.event.unsubscribeAll();F.event=null;}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null;}};A.alreadySubscribed=function(E,H,I){var F=E.subscribers.length,D,G;if(F>0){G=F-1;do{D=E.subscribers[G];if(D&&D.obj==I&&D.fn==H){return true;}}while(G--);}return false;};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Module=function(Q,P){if(Q){this.init(Q,P);}else{}};var F=YAHOO.util.Dom,D=YAHOO.util.Config,M=YAHOO.util.Event,L=YAHOO.util.CustomEvent,G=YAHOO.widget.Module,H,O,N,E,A={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTORY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},I={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:false}};G.IMG_ROOT=null;G.IMG_ROOT_SSL=null;G.CSS_MODULE="yui-module";G.CSS_HEADER="hd";G.CSS_BODY="bd";G.CSS_FOOTER="ft";G.RESIZE_MONITOR_SECURE_URL="javascript:false;";G.textResizeEvent=new L("textResize");function K(){if(!H){H=document.createElement("div");H.innerHTML=("<div class=\""+G.CSS_HEADER+"\"></div><div class=\""+G.CSS_BODY+"\"></div><div class=\""+G.CSS_FOOTER+"\"></div>");O=H.firstChild;N=O.nextSibling;E=N.nextSibling;}return H;}function J(){if(!O){K();}return(O.cloneNode(false));}function B(){if(!N){K();}return(N.cloneNode(false));}function C(){if(!E){K();}return(E.cloneNode(false));}G.prototype={constructor:G,element:null,header:null,body:null,footer:null,id:null,imageRoot:G.IMG_ROOT,initEvents:function(){var P=L.LIST;this.beforeInitEvent=this.createEvent(A.BEFORE_INIT);this.beforeInitEvent.signature=P;this.initEvent=this.createEvent(A.INIT);this.initEvent.signature=P;this.appendEvent=this.createEvent(A.APPEND);this.appendEvent.signature=P;this.beforeRenderEvent=this.createEvent(A.BEFORE_RENDER);this.beforeRenderEvent.signature=P;this.renderEvent=this.createEvent(A.RENDER);this.renderEvent.signature=P;this.changeHeaderEvent=this.createEvent(A.CHANGE_HEADER);this.changeHeaderEvent.signature=P;this.changeBodyEvent=this.createEvent(A.CHANGE_BODY);this.changeBodyEvent.signature=P;this.changeFooterEvent=this.createEvent(A.CHANGE_FOOTER);this.changeFooterEvent.signature=P;this.changeContentEvent=this.createEvent(A.CHANGE_CONTENT);this.changeContentEvent.signature=P;this.destroyEvent=this.createEvent(A.DESTORY);this.destroyEvent.signature=P;this.beforeShowEvent=this.createEvent(A.BEFORE_SHOW);this.beforeShowEvent.signature=P;this.showEvent=this.createEvent(A.SHOW);this.showEvent.signature=P;this.beforeHideEvent=this.createEvent(A.BEFORE_HIDE);this.beforeHideEvent.signature=P;this.hideEvent=this.createEvent(A.HIDE);this.hideEvent.signature=P;},platform:function(){var P=navigator.userAgent.toLowerCase();if(P.indexOf("windows")!=-1||P.indexOf("win32")!=-1){return"windows";}else{if(P.indexOf("macintosh")!=-1){return"mac";}else{return false;}}}(),browser:function(){var P=navigator.userAgent.toLowerCase();if(P.indexOf("opera")!=-1){return"opera";}else{if(P.indexOf("msie 7")!=-1){return"ie7";}else{if(P.indexOf("msie")!=-1){return"ie";}else{if(P.indexOf("safari")!=-1){return"safari";}else{if(P.indexOf("gecko")!=-1){return"gecko";}else{return false;}}}}}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true;}else{return false;}}(),initDefaultConfig:function(){this.cfg.addProperty(I.VISIBLE.key,{handler:this.configVisible,value:I.VISIBLE.value,validator:I.VISIBLE.validator});this.cfg.addProperty(I.EFFECT.key,{suppressEvent:I.EFFECT.suppressEvent,supercedes:I.EFFECT.supercedes});this.cfg.addProperty(I.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:I.MONITOR_RESIZE.value});this.cfg.addProperty(I.APPEND_TO_DOCUMENT_BODY.key,{value:I.APPEND_TO_DOCUMENT_BODY.value});},init:function(V,U){var R,T,W;this.initEvents();this.beforeInitEvent.fire(G);this.cfg=new D(this);if(this.isSecure){this.imageRoot=G.IMG_ROOT_SSL;}if(typeof V=="string"){R=V;V=document.getElementById(V);if(!V){V=(K()).cloneNode(false);V.id=R;}}this.element=V;if(V.id){this.id=V.id;}W=this.element.firstChild;if(W){var Q=false,P=false,S=false;do{if(1==W.nodeType){if(!Q&&F.hasClass(W,G.CSS_HEADER)){this.header=W;Q=true;}else{if(!P&&F.hasClass(W,G.CSS_BODY)){this.body=W;P=true;}else{if(!S&&F.hasClass(W,G.CSS_FOOTER)){this.footer=W;S=true;}}}}}while((W=W.nextSibling));}this.initDefaultConfig();F.addClass(this.element,G.CSS_MODULE);if(U){this.cfg.applyConfig(U,true);}if(!D.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true);}this.initEvent.fire(G);},initResizeMonitor:function(){var P,Q,S;function T(){G.textResizeEvent.fire();}if(!YAHOO.env.ua.opera){Q=F.get("_yuiResizeMonitor");if(!Q){Q=document.createElement("iframe");if(this.isSecure&&G.RESIZE_MONITOR_SECURE_URL&&YAHOO.env.ua.ie){Q.src=G.RESIZE_MONITOR_SECURE_URL;}if(YAHOO.env.ua.gecko){S="<html><head><script type=\"text/javascript\">window.onresize=function(){window.parent.YAHOO.widget.Module.textResizeEvent.fire();};window.parent.YAHOO.widget.Module.textResizeEvent.fire();</script></head><body></body></html>";Q.src="data:text/html;charset=utf-8,"+encodeURIComponent(S);}Q.id="_yuiResizeMonitor";Q.style.position="absolute";Q.style.visibility="hidden";var R=document.body.firstChild;if(R){document.body.insertBefore(Q,R);}else{document.body.appendChild(Q);}Q.style.width="10em";Q.style.height="10em";Q.style.top=(-1*Q.offsetHeight)+"px";Q.style.left=(-1*Q.offsetWidth)+"px";Q.style.borderWidth="0";Q.style.visibility="visible";if(YAHOO.env.ua.webkit){P=Q.contentWindow.document;P.open();P.close();}}if(Q&&Q.contentWindow){G.textResizeEvent.subscribe(this.onDomResize,this,true);if(!G.textResizeInitialized){if(!M.on(Q.contentWindow,"resize",T)){M.on(Q,"resize",T);}G.textResizeInitialized=true;}this.resizeMonitor=Q;}}},onDomResize:function(S,R){var Q=-1*this.resizeMonitor.offsetWidth,P=-1*this.resizeMonitor.offsetHeight;this.resizeMonitor.style.top=P+"px";this.resizeMonitor.style.left=Q+"px";},setHeader:function(Q){var P=this.header||(this.header=J());if(typeof Q=="string"){P.innerHTML=Q;}else{P.innerHTML="";P.appendChild(Q);}this.changeHeaderEvent.fire(Q);this.changeContentEvent.fire();},appendToHeader:function(Q){var P=this.header||(this.header=J());P.appendChild(Q);this.changeHeaderEvent.fire(Q);this.changeContentEvent.fire();},setBody:function(Q){var P=this.body||(this.body=B());if(typeof Q=="string"){P.innerHTML=Q;}else{P.innerHTML="";P.appendChild(Q);}this.changeBodyEvent.fire(Q);this.changeContentEvent.fire();},appendToBody:function(Q){var P=this.body||(this.body=B());P.appendChild(Q);this.changeBodyEvent.fire(Q);this.changeContentEvent.fire();},setFooter:function(Q){var P=this.footer||(this.footer=C());if(typeof Q=="string"){P.innerHTML=Q;}else{P.innerHTML="";P.appendChild(Q);}this.changeFooterEvent.fire(Q);this.changeContentEvent.fire();},appendToFooter:function(Q){var P=this.footer||(this.footer=C());P.appendChild(Q);this.changeFooterEvent.fire(Q);this.changeContentEvent.fire();},render:function(R,P){var S=this,T;function Q(U){if(typeof U=="string"){U=document.getElementById(U);}if(U){S._addToParent(U,S.element);S.appendEvent.fire();}}this.beforeRenderEvent.fire();if(!P){P=this.element;}if(R){Q(R);}else{if(!F.inDocument(this.element)){return false;}}if(this.header&&!F.inDocument(this.header)){T=P.firstChild;if(T){P.insertBefore(this.header,T);}else{P.appendChild(this.header);}}if(this.body&&!F.inDocument(this.body)){if(this.footer&&F.isAncestor(this.moduleElement,this.footer)){P.insertBefore(this.body,this.footer);}else{P.appendChild(this.body);}}if(this.footer&&!F.inDocument(this.footer)){P.appendChild(this.footer);}this.renderEvent.fire();return true;},destroy:function(){var P,Q;if(this.element){M.purgeElement(this.element,true);P=this.element.parentNode;}if(P){P.removeChild(this.element);}this.element=null;this.header=null;this.body=null;this.footer=null;G.textResizeEvent.unsubscribe(this.onDomResize,this);this.cfg.destroy();this.cfg=null;this.destroyEvent.fire();for(Q in this){if(Q instanceof L){Q.unsubscribeAll();}}},show:function(){this.cfg.setProperty("visible",true);},hide:function(){this.cfg.setProperty("visible",false);},configVisible:function(Q,P,R){var S=P[0];if(S){this.beforeShowEvent.fire();F.setStyle(this.element,"display","block");this.showEvent.fire();}else{this.beforeHideEvent.fire();F.setStyle(this.element,"display","none");this.hideEvent.fire();}},configMonitorResize:function(R,Q,S){var P=Q[0];if(P){this.initResizeMonitor();}else{G.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null;}},_addToParent:function(P,Q){if(!this.cfg.getProperty("appendtodocumentbody")&&P===document.body&&P.firstChild){P.insertBefore(Q,P.firstChild);}else{P.appendChild(Q);}},toString:function(){return"Module "+this.id;}};YAHOO.lang.augmentProto(G,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Overlay=function(L,K){YAHOO.widget.Overlay.superclass.constructor.call(this,L,K);};var F=YAHOO.lang,I=YAHOO.util.CustomEvent,E=YAHOO.widget.Module,J=YAHOO.util.Event,D=YAHOO.util.Dom,C=YAHOO.util.Config,B=YAHOO.widget.Overlay,G,A={"BEFORE_MOVE":"beforeMove","MOVE":"move"},H={"X":{key:"x",validator:F.isNumber,suppressEvent:true,supercedes:["iframe"]},"Y":{key:"y",validator:F.isNumber,suppressEvent:true,supercedes:["iframe"]},"XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context",suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",value:false,validator:F.isBoolean,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"HEIGHT":{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"ZINDEX":{key:"zindex",value:null},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:false,validator:F.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value:(YAHOO.env.ua.ie==6?true:false),validator:F.isBoolean,supercedes:["zindex"]}};B.IFRAME_SRC="javascript:false;";B.IFRAME_OFFSET=3;B.TOP_LEFT="tl";B.TOP_RIGHT="tr";B.BOTTOM_LEFT="bl";B.BOTTOM_RIGHT="br";B.CSS_OVERLAY="yui-overlay";B.windowScrollEvent=new I("windowScroll");B.windowResizeEvent=new I("windowResize");B.windowScrollHandler=function(K){if(YAHOO.env.ua.ie){if(!window.scrollEnd){window.scrollEnd=-1;}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){B.windowScrollEvent.fire();},1);}else{B.windowScrollEvent.fire();}};B.windowResizeHandler=function(K){if(YAHOO.env.ua.ie){if(!window.resizeEnd){window.resizeEnd=-1;}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){B.windowResizeEvent.fire();},100);}else{B.windowResizeEvent.fire();}};B._initialized=null;if(B._initialized===null){J.on(window,"scroll",B.windowScrollHandler);J.on(window,"resize",B.windowResizeHandler);B._initialized=true;}YAHOO.extend(B,E,{init:function(L,K){B.superclass.init.call(this,L);this.beforeInitEvent.fire(B);D.addClass(this.element,B.CSS_OVERLAY);if(K){this.cfg.applyConfig(K,true);}if(this.platform=="mac"&&YAHOO.env.ua.gecko){if(!C.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true);}if(!C.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true);}}this.initEvent.fire(B);},initEvents:function(){B.superclass.initEvents.call(this);var K=I.LIST;this.beforeMoveEvent=this.createEvent(A.BEFORE_MOVE);this.beforeMoveEvent.signature=K;this.moveEvent=this.createEvent(A.MOVE);this.moveEvent.signature=K;},initDefaultConfig:function(){B.superclass.initDefaultConfig.call(this);this.cfg.addProperty(H.X.key,{handler:this.configX,validator:H.X.validator,suppressEvent:H.X.suppressEvent,supercedes:H.X.supercedes});this.cfg.addProperty(H.Y.key,{handler:this.configY,validator:H.Y.validator,suppressEvent:H.Y.suppressEvent,supercedes:H.Y.supercedes});this.cfg.addProperty(H.XY.key,{handler:this.configXY,suppressEvent:H.XY.suppressEvent,supercedes:H.XY.supercedes});this.cfg.addProperty(H.CONTEXT.key,{handler:this.configContext,suppressEvent:H.CONTEXT.suppressEvent,supercedes:H.CONTEXT.supercedes});this.cfg.addProperty(H.FIXED_CENTER.key,{handler:this.configFixedCenter,value:H.FIXED_CENTER.value,validator:H.FIXED_CENTER.validator,supercedes:H.FIXED_CENTER.supercedes});this.cfg.addProperty(H.WIDTH.key,{handler:this.configWidth,suppressEvent:H.WIDTH.suppressEvent,supercedes:H.WIDTH.supercedes});this.cfg.addProperty(H.HEIGHT.key,{handler:this.configHeight,suppressEvent:H.HEIGHT.suppressEvent,supercedes:H.HEIGHT.supercedes});this.cfg.addProperty(H.ZINDEX.key,{handler:this.configzIndex,value:H.ZINDEX.value});this.cfg.addProperty(H.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:H.CONSTRAIN_TO_VIEWPORT.value,validator:H.CONSTRAIN_TO_VIEWPORT.validator,supercedes:H.CONSTRAIN_TO_VIEWPORT.supercedes});this.cfg.addProperty(H.IFRAME.key,{handler:this.configIframe,value:H.IFRAME.value,validator:H.IFRAME.validator,supercedes:H.IFRAME.supercedes});},moveTo:function(K,L){this.cfg.setProperty("xy",[K,L]);},hideMacGeckoScrollbars:function(){D.removeClass(this.element,"show-scrollbars");D.addClass(this.element,"hide-scrollbars");},showMacGeckoScrollbars:function(){D.removeClass(this.element,"hide-scrollbars");D.addClass(this.element,"show-scrollbars");},configVisible:function(N,K,T){var M=K[0],O=D.getStyle(this.element,"visibility"),U=this.cfg.getProperty("effect"),R=[],Q=(this.platform=="mac"&&YAHOO.env.ua.gecko),b=C.alreadySubscribed,S,L,a,Y,X,W,Z,V,P;if(O=="inherit"){a=this.element.parentNode;while(a.nodeType!=9&&a.nodeType!=11){O=D.getStyle(a,"visibility");if(O!="inherit"){break;}a=a.parentNode;}if(O=="inherit"){O="visible";}}if(U){if(U instanceof Array){V=U.length;for(Y=0;Y<V;Y++){S=U[Y];R[R.length]=S.effect(this,S.duration);}}else{R[R.length]=U.effect(this,U.duration);}}if(M){if(Q){this.showMacGeckoScrollbars();}if(U){if(M){if(O!="visible"||O===""){this.beforeShowEvent.fire();P=R.length;for(X=0;X<P;X++){L=R[X];if(X===0&&!b(L.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){L.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true);}L.animateIn();}}}}else{if(O!="visible"||O===""){this.beforeShowEvent.fire();D.setStyle(this.element,"visibility","visible");this.cfg.refireEvent("iframe");this.showEvent.fire();}}}else{if(Q){this.hideMacGeckoScrollbars();}if(U){if(O=="visible"){this.beforeHideEvent.fire();P=R.length;for(W=0;W<P;W++){Z=R[W];if(W===0&&!b(Z.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){Z.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true);}Z.animateOut();}}else{if(O===""){D.setStyle(this.element,"visibility","hidden");}}}else{if(O=="visible"||O===""){this.beforeHideEvent.fire();D.setStyle(this.element,"visibility","hidden");this.hideEvent.fire();}}}},doCenterOnDOMEvent:function(){if(this.cfg.getProperty("visible")){this.center();}},configFixedCenter:function(O,M,P){var Q=M[0],L=C.alreadySubscribed,N=B.windowResizeEvent,K=B.windowScrollEvent;if(Q){this.center();if(!L(this.beforeShowEvent,this.center,this)){this.beforeShowEvent.subscribe(this.center);}if(!L(N,this.doCenterOnDOMEvent,this)){N.subscribe(this.doCenterOnDOMEvent,this,true);}if(!L(K,this.doCenterOnDOMEvent,this)){K.subscribe(this.doCenterOnDOMEvent,this,true);}}else{this.beforeShowEvent.unsubscribe(this.center);N.unsubscribe(this.doCenterOnDOMEvent,this);K.unsubscribe(this.doCenterOnDOMEvent,this);}},configHeight:function(N,L,O){var K=L[0],M=this.element;D.setStyle(M,"height",K);this.cfg.refireEvent("iframe");},configWidth:function(N,K,O){var M=K[0],L=this.element;D.setStyle(L,"width",M);this.cfg.refireEvent("iframe");},configzIndex:function(M,K,N){var O=K[0],L=this.element;if(!O){O=D.getStyle(L,"zIndex");if(!O||isNaN(O)){O=0;}}if(this.iframe||this.cfg.getProperty("iframe")===true){if(O<=0){O=1;}}D.setStyle(L,"zIndex",O);this.cfg.setProperty("zIndex",O,true);if(this.iframe){this.stackIframe();}},configXY:function(M,L,N){var P=L[0],K=P[0],O=P[1];this.cfg.setProperty("x",K);this.cfg.setProperty("y",O);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O]);},configX:function(M,L,N){var K=L[0],O=this.cfg.getProperty("y");this.cfg.setProperty("x",K,true);this.cfg.setProperty("y",O,true);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");D.setX(this.element,K,true);this.cfg.setProperty("xy",[K,O],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O]);},configY:function(M,L,N){var K=this.cfg.getProperty("x"),O=L[0];this.cfg.setProperty("x",K,true);this.cfg.setProperty("y",O,true);this.beforeMoveEvent.fire([K,O]);K=this.cfg.getProperty("x");O=this.cfg.getProperty("y");D.setY(this.element,O,true);this.cfg.setProperty("xy",[K,O],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([K,O]);},showIframe:function(){var L=this.iframe,K;if(L){K=this.element.parentNode;if(K!=L.parentNode){this._addToParent(K,L);}L.style.display="block";}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none";}},syncIframe:function(){var K=this.iframe,M=this.element,O=B.IFRAME_OFFSET,L=(O*2),N;if(K){K.style.width=(M.offsetWidth+L+"px");K.style.height=(M.offsetHeight+L+"px");N=this.cfg.getProperty("xy");if(!F.isArray(N)||(isNaN(N[0])||isNaN(N[1]))){this.syncPosition();N=this.cfg.getProperty("xy");}D.setXY(K,[(N[0]-O),(N[1]-O)]);}},stackIframe:function(){if(this.iframe){var K=D.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(K)&&!isNaN(K)){D.setStyle(this.iframe,"zIndex",(K-1));}}},configIframe:function(N,M,O){var K=M[0];function P(){var R=this.iframe,S=this.element,U,T;if(!R){if(!G){G=document.createElement("iframe");if(this.isSecure){G.src=B.IFRAME_SRC;}if(YAHOO.env.ua.ie){G.style.filter="alpha(opacity=0)";G.frameBorder=0;}else{G.style.opacity="0";}G.style.position="absolute";G.style.border="none";G.style.margin="0";G.style.padding="0";G.style.display="none";}R=G.cloneNode(false);U=S.parentNode;var Q=U||document.body;this._addToParent(Q,R);this.iframe=R;}this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true;}}function L(){P.call(this);this.beforeShowEvent.unsubscribe(L);this._iframeDeferred=false;}if(K){if(this.cfg.getProperty("visible")){P.call(this);}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(L);this._iframeDeferred=true;}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false;}}},configConstrainToViewport:function(L,K,M){var N=K[0];if(N){if(!C.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true);}}else{this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this);}},configContext:function(M,L,O){var Q=L[0],N,P,K;if(Q){N=Q[0];P=Q[1];K=Q[2];if(N){if(typeof N=="string"){this.cfg.setProperty("context",[document.getElementById(N),P,K],true);}if(P&&K){this.align(P,K);}}}},align:function(L,K){var Q=this.cfg.getProperty("context"),P=this,O,N,R;function M(S,T){switch(L){case B.TOP_LEFT:P.moveTo(T,S);break;case B.TOP_RIGHT:P.moveTo((T-N.offsetWidth),S);break;case B.BOTTOM_LEFT:P.moveTo(T,(S-N.offsetHeight));break;case B.BOTTOM_RIGHT:P.moveTo((T-N.offsetWidth),(S-N.offsetHeight));break;}}if(Q){O=Q[0];N=this.element;P=this;if(!L){L=Q[1];}if(!K){K=Q[2];}if(N&&O){R=D.getRegion(O);switch(K){case B.TOP_LEFT:M(R.top,R.left);break;case B.TOP_RIGHT:M(R.top,R.right);break;case B.BOTTOM_LEFT:M(R.bottom,R.left);break;case B.BOTTOM_RIGHT:M(R.bottom,R.right);break;}}}},enforceConstraints:function(S,R,O){var U=R[0],W=U[0],V=U[1],L=this.element.offsetHeight,Q=this.element.offsetWidth,T=D.getViewportWidth(),N=D.getViewportHeight(),Z=D.getDocumentScrollLeft(),X=D.getDocumentScrollTop(),M=X+10,P=Z+10,K=X+N-L-10,Y=Z+T-Q-10;if(W<P){W=P;}else{if(W>Y){W=Y;}}if(V<M){V=M;}else{if(V>K){V=K;}}this.cfg.setProperty("x",W,true);this.cfg.setProperty("y",V,true);this.cfg.setProperty("xy",[W,V],true);},center:function(){var Q=D.getDocumentScrollLeft(),O=D.getDocumentScrollTop(),L=D.getClientWidth(),P=D.getClientHeight(),N=this.element.offsetWidth,M=this.element.offsetHeight,K=(L/2)-(N/2)+Q,R=(P/2)-(M/2)+O;this.cfg.setProperty("xy",[parseInt(K,10),parseInt(R,10)]);this.cfg.refireEvent("iframe");},syncPosition:function(){var K=D.getXY(this.element);this.cfg.setProperty("x",K[0],true);this.cfg.setProperty("y",K[1],true);this.cfg.setProperty("xy",K,true);},onDomResize:function(M,L){var K=this;B.superclass.onDomResize.call(this,M,L);setTimeout(function(){K.syncPosition();K.cfg.refireEvent("iframe");K.cfg.refireEvent("context");},0);},bringToTop:function(){var N=[],M=this.element;function P(T,S){var V=D.getStyle(T,"zIndex"),U=D.getStyle(S,"zIndex"),R=(!V||isNaN(V))?0:parseInt(V,10),Q=(!U||isNaN(U))?0:parseInt(U,10);if(R>Q){return-1;}else{if(R<Q){return 1;}else{return 0;}}}function L(S){var Q=D.hasClass(S,B.CSS_OVERLAY),R=YAHOO.widget.Panel;if(Q&&!D.isAncestor(M,Q)){if(R&&D.hasClass(S,R.CSS_PANEL)){N[N.length]=S.parentNode;}else{N[N.length]=S;}}}D.getElementsBy(L,"DIV",document.body);N.sort(P);var K=N[0],O;if(K){O=D.getStyle(K,"zIndex");if(!isNaN(O)&&K!=M){this.cfg.setProperty("zindex",(parseInt(O,10)+2));}}},destroy:function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe);}this.iframe=null;B.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);B.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);B.superclass.destroy.call(this);},toString:function(){return"Overlay "+this.id;}});}());(function(){YAHOO.widget.OverlayManager=function(G){this.init(G);};var D=YAHOO.widget.Overlay,C=YAHOO.util.Event,E=YAHOO.util.Dom,B=YAHOO.util.Config,F=YAHOO.util.CustomEvent,A=YAHOO.widget.OverlayManager;A.CSS_FOCUSED="focused";A.prototype={constructor:A,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"});},init:function(I){this.cfg=new B(this);this.initDefaultConfig();if(I){this.cfg.applyConfig(I,true);}this.cfg.fireQueue();var H=null;this.getActive=function(){return H;};this.focus=function(J){var K=this.find(J);if(K){if(H!=K){if(H){H.blur();}this.bringToTop(K);H=K;E.addClass(H.element,A.CSS_FOCUSED);K.focusEvent.fire();}}};this.remove=function(K){var M=this.find(K),J;if(M){if(H==M){H=null;}var L=(M.element===null&&M.cfg===null)?true:false;if(!L){J=E.getStyle(M.element,"zIndex");M.cfg.setProperty("zIndex",-1000,true);}this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));M.hideEvent.unsubscribe(M.blur);M.destroyEvent.unsubscribe(this._onOverlayDestroy,M);if(!L){C.removeListener(M.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);M.cfg.setProperty("zIndex",J,true);M.cfg.setProperty("manager",null);}M.focusEvent.unsubscribeAll();M.blurEvent.unsubscribeAll();M.focusEvent=null;M.blurEvent=null;M.focus=null;M.blur=null;}};this.blurAll=function(){var K=this.overlays.length,J;if(K>0){J=K-1;do{this.overlays[J].blur();}while(J--);}};this._onOverlayBlur=function(K,J){H=null;};var G=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[];}if(G){this.register(G);this.overlays.sort(this.compareZIndexDesc);}},_onOverlayElementFocus:function(I){var G=C.getTarget(I),H=this.close;if(H&&(G==H||E.isAncestor(H,G))){this.blur();}else{this.focus();}},_onOverlayDestroy:function(H,G,I){this.remove(I);},register:function(G){var K=this,L,I,H,J;if(G instanceof D){G.cfg.addProperty("manager",{value:this});G.focusEvent=G.createEvent("focus");G.focusEvent.signature=F.LIST;G.blurEvent=G.createEvent("blur");G.blurEvent.signature=F.LIST;G.focus=function(){K.focus(this);};G.blur=function(){if(K.getActive()==this){E.removeClass(this.element,A.CSS_FOCUSED);this.blurEvent.fire();}};G.blurEvent.subscribe(K._onOverlayBlur);G.hideEvent.subscribe(G.blur);G.destroyEvent.subscribe(this._onOverlayDestroy,G,this);C.on(G.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus,null,G);L=E.getStyle(G.element,"zIndex");if(!isNaN(L)){G.cfg.setProperty("zIndex",parseInt(L,10));}else{G.cfg.setProperty("zIndex",0);}this.overlays.push(G);this.bringToTop(G);return true;}else{if(G instanceof Array){I=0;J=G.length;for(H=0;H<J;H++){if(this.register(G[H])){I++;}}if(I>0){return true;}}else{return false;}}},bringToTop:function(K){var H=this.find(K),J,G,I;if(H){I=this.overlays;I.sort(this.compareZIndexDesc);G=I[0];if(G){J=E.getStyle(G.element,"zIndex");if(!isNaN(J)&&G!=H){H.cfg.setProperty("zIndex",(parseInt(J,10)+2));}I.sort(this.compareZIndexDesc);}}},find:function(G){var I=this.overlays,J=I.length,H;if(J>0){H=J-1;if(G instanceof D){do{if(I[H]==G){return I[H];}}while(H--);}else{if(typeof G=="string"){do{if(I[H].id==G){return I[H];}}while(H--);}}return null;}},compareZIndexDesc:function(J,I){var H=(J.cfg)?J.cfg.getProperty("zIndex"):null,G=(I.cfg)?I.cfg.getProperty("zIndex"):null;if(H===null&&G===null){return 0;}else{if(H===null){return 1;}else{if(G===null){return-1;}else{if(H>G){return-1;}else{if(H<G){return 1;}else{return 0;}}}}}},showAll:function(){var H=this.overlays,I=H.length,G;if(I>0){G=I-1;do{H[G].show();}while(G--);}},hideAll:function(){var H=this.overlays,I=H.length,G;if(I>0){G=I-1;do{H[G].hide();}while(G--);}},toString:function(){return"OverlayManager";}};}());(function(){YAHOO.widget.Tooltip=function(L,K){YAHOO.widget.Tooltip.superclass.constructor.call(this,L,K);};var D=YAHOO.lang,J=YAHOO.util.Event,B=YAHOO.util.Dom,F=YAHOO.widget.Tooltip,E,G={"PREVENT_OVERLAP":{key:"preventoverlap",value:true,validator:D.isBoolean,supercedes:["x","y","xy"]},"SHOW_DELAY":{key:"showdelay",value:200,validator:D.isNumber},"AUTO_DISMISS_DELAY":{key:"autodismissdelay",value:5000,validator:D.isNumber},"HIDE_DELAY":{key:"hidedelay",value:250,validator:D.isNumber},"TEXT":{key:"text",suppressEvent:true},"CONTAINER":{key:"container"}};F.CSS_TOOLTIP="yui-tt";function H(L,K,M){var P=M[0],N=M[1],O=this.cfg,Q=O.getProperty("width");if(Q==N){O.setProperty("width",P);}this.unsubscribe("hide",this._onHide,M);}function C(L,K){var M=document.body,Q=this.cfg,P=Q.getProperty("width"),N,O;if((!P||P=="auto")&&(Q.getProperty("container")!=M||Q.getProperty("x")>=B.getViewportWidth()||Q.getProperty("y")>=B.getViewportHeight())){O=this.element.cloneNode(true);O.style.visibility="hidden";O.style.top="0px";O.style.left="0px";M.appendChild(O);N=(O.offsetWidth+"px");M.removeChild(O);O=null;Q.setProperty("width",N);Q.refireEvent("xy");this.subscribe("hide",H,[(P||""),N]);}}function A(L,K,M){this.render(M);}function I(){J.onDOMReady(A,this.cfg.getProperty("container"),this);}YAHOO.extend(F,YAHOO.widget.Overlay,{init:function(L,K){F.superclass.init.call(this,L);this.beforeInitEvent.fire(F);B.addClass(this.element,F.CSS_TOOLTIP);if(K){this.cfg.applyConfig(K,true);}this.cfg.queueProperty("visible",false);this.cfg.queueProperty("constraintoviewport",true);this.setBody("");this.subscribe("beforeShow",C);this.subscribe("init",I);this.subscribe("render",this.onRender);this.initEvent.fire(F);},initDefaultConfig:function(){F.superclass.initDefaultConfig.call(this);this.cfg.addProperty(G.PREVENT_OVERLAP.key,{value:G.PREVENT_OVERLAP.value,validator:G.PREVENT_OVERLAP.validator,supercedes:G.PREVENT_OVERLAP.supercedes});this.cfg.addProperty(G.SHOW_DELAY.key,{handler:this.configShowDelay,value:200,validator:G.SHOW_DELAY.validator});this.cfg.addProperty(G.AUTO_DISMISS_DELAY.key,{handler:this.configAutoDismissDelay,value:G.AUTO_DISMISS_DELAY.value,validator:G.AUTO_DISMISS_DELAY.validator});this.cfg.addProperty(G.HIDE_DELAY.key,{handler:this.configHideDelay,value:G.HIDE_DELAY.value,validator:G.HIDE_DELAY.validator});this.cfg.addProperty(G.TEXT.key,{handler:this.configText,suppressEvent:G.TEXT.suppressEvent});this.cfg.addProperty(G.CONTAINER.key,{handler:this.configContainer,value:document.body});},configText:function(L,K,M){var N=K[0];if(N){this.setBody(N);}},configContainer:function(M,L,N){var K=L[0];if(typeof K=="string"){this.cfg.setProperty("container",document.getElementById(K),true);}},_removeEventListeners:function(){var N=this._context,K,M,L;if(N){K=N.length;if(K>0){L=K-1;do{M=N[L];J.removeListener(M,"mouseover",this.onContextMouseOver);J.removeListener(M,"mousemove",this.onContextMouseMove);J.removeListener(M,"mouseout",this.onContextMouseOut);}while(L--);}}},configContext:function(P,L,Q){var O=L[0],R,K,N,M;if(O){if(!(O instanceof Array)){if(typeof O=="string"){this.cfg.setProperty("context",[document.getElementById(O)],true);}else{this.cfg.setProperty("context",[O],true);}O=this.cfg.getProperty("context");}this._removeEventListeners();this._context=O;R=this._context;if(R){K=R.length;if(K>0){M=K-1;do{N=R[M];J.on(N,"mouseover",this.onContextMouseOver,this);J.on(N,"mousemove",this.onContextMouseMove,this);J.on(N,"mouseout",this.onContextMouseOut,this);}while(M--);}}}},onContextMouseMove:function(L,K){K.pageX=J.getPageX(L);K.pageY=J.getPageY(L);},onContextMouseOver:function(M,L){var K=this;if(L.hideProcId){clearTimeout(L.hideProcId);L.hideProcId=null;}J.on(K,"mousemove",L.onContextMouseMove,L);if(K.title){L._tempTitle=K.title;K.title="";}L.showProcId=L.doShow(M,K);},onContextMouseOut:function(M,L){var K=this;if(L._tempTitle){K.title=L._tempTitle;L._tempTitle=null;}if(L.showProcId){clearTimeout(L.showProcId);L.showProcId=null;}if(L.hideProcId){clearTimeout(L.hideProcId);L.hideProcId=null;}L.hideProcId=setTimeout(function(){L.hide();},L.cfg.getProperty("hidedelay"));},doShow:function(M,K){var N=25,L=this;if(YAHOO.env.ua.opera&&K.tagName&&K.tagName.toUpperCase()=="A"){N+=12;}return setTimeout(function(){if(L._tempTitle){L.setBody(L._tempTitle);}else{L.cfg.refireEvent("text");}L.moveTo(L.pageX,L.pageY+N);if(L.cfg.getProperty("preventoverlap")){L.preventOverlap(L.pageX,L.pageY);}J.removeListener(K,"mousemove",L.onContextMouseMove);L.show();L.hideProcId=L.doHide();},this.cfg.getProperty("showdelay"));},doHide:function(){var K=this;return setTimeout(function(){K.hide();},this.cfg.getProperty("autodismissdelay"));},preventOverlap:function(O,N){var K=this.element.offsetHeight,M=new YAHOO.util.Point(O,N),L=B.getRegion(this.element);L.top-=5;L.left-=5;L.right+=5;L.bottom+=5;if(L.contains(M)){this.cfg.setProperty("y",(N-K-5));}},onRender:function(O,N){function P(){var S=this.element,R=this._shadow;if(R){R.style.width=(S.offsetWidth+6)+"px";R.style.height=(S.offsetHeight+1)+"px";}}function L(){B.addClass(this._shadow,"yui-tt-shadow-visible");}function K(){B.removeClass(this._shadow,"yui-tt-shadow-visible");}function Q(){var T=this._shadow,S,R,V,U;if(!T){S=this.element;R=YAHOO.widget.Module;V=YAHOO.env.ua.ie;U=this;if(!E){E=document.createElement("div");E.className="yui-tt-shadow";}T=E.cloneNode(false);S.appendChild(T);this._shadow=T;L.call(this);this.subscribe("beforeShow",L);this.subscribe("beforeHide",K);if(V==6||(V==7&&document.compatMode=="BackCompat")){window.setTimeout(function(){P.call(U);},0);this.cfg.subscribeToConfigEvent("width",P);this.cfg.subscribeToConfigEvent("height",P);this.subscribe("changeContent",P);R.textResizeEvent.subscribe(P,this,true);this.subscribe("destroy",function(){R.textResizeEvent.unsubscribe(P,this);});}}}function M(){Q.call(this);this.unsubscribe("beforeShow",M);}if(this.cfg.getProperty("visible")){Q.call(this);}else{this.subscribe("beforeShow",M);}},destroy:function(){this._removeEventListeners();F.superclass.destroy.call(this);},toString:function(){return"Tooltip "+this.id;}});}());(function(){YAHOO.widget.Panel=function(U,T){YAHOO.widget.Panel.superclass.constructor.call(this,U,T);};var G=YAHOO.lang,N=YAHOO.util.DD,A=YAHOO.util.Dom,S=YAHOO.util.Event,I=YAHOO.widget.Overlay,L=YAHOO.util.CustomEvent,J=YAHOO.util.Config,O=YAHOO.widget.Panel,H,Q,D,E={"SHOW_MASK":"showMask","HIDE_MASK":"hideMask","DRAG":"drag"},M={"CLOSE":{key:"close",value:true,validator:G.isBoolean,supercedes:["visible"]},"DRAGGABLE":{key:"draggable",value:(N?true:false),validator:G.isBoolean,supercedes:["visible"]},"UNDERLAY":{key:"underlay",value:"shadow",supercedes:["visible"]},"MODAL":{key:"modal",value:false,validator:G.isBoolean,supercedes:["visible","zindex"]},"KEY_LISTENERS":{key:"keylisteners",suppressEvent:true,supercedes:["visible"]}};O.CSS_PANEL="yui-panel";O.CSS_PANEL_CONTAINER="yui-panel-container";function K(U,T){if(!this.header){this.setHeader("&#160;");}}function R(U,T,V){var Y=V[0],W=V[1],X=this.cfg,Z=X.getProperty("width");if(Z==W){X.setProperty("width",Y);}this.unsubscribe("hide",R,V);}function C(U,T){var Y=YAHOO.env.ua.ie,X,W,V;if(Y==6||(Y==7&&document.compatMode=="BackCompat")){X=this.cfg;W=X.getProperty("width");if(!W||W=="auto"){V=(this.element.offsetWidth+"px");X.setProperty("width",V);this.subscribe("hide",R,[(W||""),V]);}}}function F(){this.blur();}function P(V,U){var W=this;function T(Z){var Y=Z.tagName.toUpperCase(),X=false;switch(Y){case"A":case"BUTTON":case"SELECT":case"TEXTAREA":if(!A.isAncestor(W.element,Z)){S.on(Z,"focus",F,Z,true);X=true;}break;case"INPUT":if(Z.type!="hidden"&&!A.isAncestor(W.element,Z)){S.on(Z,"focus",F,Z,true);X=true;}break;}return X;}this.focusableElements=A.getElementsBy(T);}function B(V,U){var Y=this.focusableElements,T=Y.length,W,X;for(X=0;X<T;X++){W=Y[X];S.removeListener(W,"focus",F);}}YAHOO.extend(O,I,{init:function(U,T){O.superclass.init.call(this,U);this.beforeInitEvent.fire(O);A.addClass(this.element,O.CSS_PANEL);this.buildWrapper();if(T){this.cfg.applyConfig(T,true);}this.subscribe("showMask",P);this.subscribe("hideMask",B);if(this.cfg.getProperty("draggable")){this.subscribe("beforeRender",K);}this.initEvent.fire(O);},initEvents:function(){O.superclass.initEvents.call(this);var T=L.LIST;this.showMaskEvent=this.createEvent(E.SHOW_MASK);this.showMaskEvent.signature=T;this.hideMaskEvent=this.createEvent(E.HIDE_MASK);this.hideMaskEvent.signature=T;this.dragEvent=this.createEvent(E.DRAG);this.dragEvent.signature=T;},initDefaultConfig:function(){O.superclass.initDefaultConfig.call(this);this.cfg.addProperty(M.CLOSE.key,{handler:this.configClose,value:M.CLOSE.value,validator:M.CLOSE.validator,supercedes:M.CLOSE.supercedes});this.cfg.addProperty(M.DRAGGABLE.key,{handler:this.configDraggable,value:M.DRAGGABLE.value,validator:M.DRAGGABLE.validator,supercedes:M.DRAGGABLE.supercedes});this.cfg.addProperty(M.UNDERLAY.key,{handler:this.configUnderlay,value:M.UNDERLAY.value,supercedes:M.UNDERLAY.supercedes});this.cfg.addProperty(M.MODAL.key,{handler:this.configModal,value:M.MODAL.value,validator:M.MODAL.validator,supercedes:M.MODAL.supercedes});this.cfg.addProperty(M.KEY_LISTENERS.key,{handler:this.configKeyListeners,suppressEvent:M.KEY_LISTENERS.suppressEvent,supercedes:M.KEY_LISTENERS.supercedes});},configClose:function(V,T,X){var Y=T[0],U=this.close;function W(a,Z){Z.hide();}if(Y){if(!U){if(!D){D=document.createElement("span");D.innerHTML="&#160;";D.className="container-close";}U=D.cloneNode(true);this.innerElement.appendChild(U);S.on(U,"click",W,this);this.close=U;}else{U.style.display="block";}}else{if(U){U.style.display="none";}}},configDraggable:function(U,T,V){var W=T[0];if(W){if(!N){this.cfg.setProperty("draggable",false);return;}if(this.header){A.setStyle(this.header,"cursor","move");this.registerDragDrop();}if(!J.alreadySubscribed(this.beforeRenderEvent,K,null)){this.subscribe("beforeRender",K);}this.subscribe("beforeShow",C);}else{if(this.dd){this.dd.unreg();}if(this.header){A.setStyle(this.header,"cursor","auto");}this.unsubscribe("beforeRender",K);this.unsubscribe("beforeShow",C);}},configUnderlay:function(c,b,X){var a=YAHOO.env.ua,Z=(this.platform=="mac"&&a.gecko),d=b[0].toLowerCase(),T=this.underlay,U=this.element;function V(){var e;if(!T){if(!Q){Q=document.createElement("div");Q.className="underlay";}T=Q.cloneNode(false);this.element.appendChild(T);this.underlay=T;e=a.ie;if(e==6||(e==7&&document.compatMode=="BackCompat")){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);}}}function Y(){V.call(this);this._underlayDeferred=false;this.beforeShowEvent.unsubscribe(Y);}function W(){if(this._underlayDeferred){this.beforeShowEvent.unsubscribe(Y);this._underlayDeferred=false;}if(T){this.cfg.unsubscribeFromConfigEvent("width",this.sizeUnderlay);this.cfg.unsubscribeFromConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.sizeUnderlay);YAHOO.widget.Module.textResizeEvent.unsubscribe(this.sizeUnderlay,this,true);this.element.removeChild(T);this.underlay=null;}}switch(d){case"shadow":A.removeClass(U,"matte");A.addClass(U,"shadow");break;case"matte":if(!Z){W.call(this);}A.removeClass(U,"shadow");A.addClass(U,"matte");break;default:if(!Z){W.call(this);}A.removeClass(U,"shadow");A.removeClass(U,"matte");break;}if((d=="shadow")||(Z&&!T)){if(this.cfg.getProperty("visible")){V.call(this);}else{if(!this._underlayDeferred){this.beforeShowEvent.subscribe(Y);this._underlayDeferred=true;}}}},configModal:function(U,T,W){var V=T[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);I.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);I.windowResizeEvent.unsubscribe(this.sizeMask,this);this._hasModalityEventListeners=false;}}},removeMask:function(){var U=this.mask,T;if(U){this.hideMask();T=U.parentNode;if(T){T.removeChild(U);}this.mask=null;}},configKeyListeners:function(W,T,Z){var V=T[0],Y,X,U;if(V){if(V instanceof Array){X=V.length;for(U=0;U<X;U++){Y=V[U];if(!J.alreadySubscribed(this.showEvent,Y.enable,Y)){this.showEvent.subscribe(Y.enable,Y,true);}if(!J.alreadySubscribed(this.hideEvent,Y.disable,Y)){this.hideEvent.subscribe(Y.disable,Y,true);this.destroyEvent.subscribe(Y.disable,Y,true);}}}else{if(!J.alreadySubscribed(this.showEvent,V.enable,V)){this.showEvent.subscribe(V.enable,V,true);}if(!J.alreadySubscribed(this.hideEvent,V.disable,V)){this.hideEvent.subscribe(V.disable,V,true);this.destroyEvent.subscribe(V.disable,V,true);}}}},configHeight:function(W,U,X){var T=U[0],V=this.innerElement;A.setStyle(V,"height",T);this.cfg.refireEvent("iframe");},configWidth:function(W,T,X){var V=T[0],U=this.innerElement;A.setStyle(U,"width",V);this.cfg.refireEvent("iframe");},configzIndex:function(U,T,W){O.superclass.configzIndex.call(this,U,T,W);if(this.mask||this.cfg.getProperty("modal")===true){var V=A.getStyle(this.element,"zIndex");if(!V||isNaN(V)){V=0;}if(V===0){this.cfg.setProperty("zIndex",1);}else{this.stackMask();}}},buildWrapper:function(){var V=this.element.parentNode,T=this.element,U=document.createElement("div");U.className=O.CSS_PANEL_CONTAINER;U.id=T.id+"_c";if(V){V.insertBefore(U,T);}U.appendChild(T);this.element=U;this.innerElement=T;A.setStyle(this.innerElement,"visibility","inherit");},sizeUnderlay:function(){var U=this.underlay,T;if(U){T=this.element;U.style.width=T.offsetWidth+"px";U.style.height=T.offsetHeight+"px";}},registerDragDrop:function(){var T=this;if(this.header){if(!N){return;}this.dd=new N(this.element.id,this.id);if(!this.header.id){this.header.id=this.id+"_h";}this.dd.startDrag=function(){var V,Z,a,X,d,b,W,Y,U,c;if(YAHOO.env.ua.ie==6){A.addClass(T.element,"drag");}if(T.cfg.getProperty("constraintoviewport")){V=T.element.offsetHeight;Z=T.element.offsetWidth;a=A.getViewportWidth();X=A.getViewportHeight();d=A.getDocumentScrollLeft();b=A.getDocumentScrollTop();W=b+10;Y=d+10;U=b+X-V-10;c=d+a-Z-10;this.minX=Y;this.maxX=c;this.constrainX=true;this.minY=W;this.maxY=U;this.constrainY=true;}else{this.constrainX=false;this.constrainY=false;}T.dragEvent.fire("startDrag",arguments);};this.dd.onDrag=function(){T.syncPosition();T.cfg.refireEvent("iframe");if(this.platform=="mac"&&YAHOO.env.ua.gecko){this.showMacGeckoScrollbars();}T.dragEvent.fire("onDrag",arguments);};this.dd.endDrag=function(){if(YAHOO.env.ua.ie==6){A.removeClass(T.element,"drag");}T.dragEvent.fire("endDrag",arguments);T.moveEvent.fire(T.cfg.getProperty("xy"));};this.dd.setHandleElId(this.header.id);this.dd.addInvalidHandleType("INPUT");this.dd.addInvalidHandleType("SELECT");this.dd.addInvalidHandleType("TEXTAREA");}},buildMask:function(){var T=this.mask;if(!T){if(!H){H=document.createElement("div");H.className="mask";H.innerHTML="&#160;";}T=H.cloneNode(true);T.id=this.id+"_mask";document.body.insertBefore(T,document.body.firstChild);this.mask=T;this.stackMask();}},hideMask:function(){if(this.cfg.getProperty("modal")&&this.mask){this.mask.style.display="none";this.hideMaskEvent.fire();A.removeClass(document.body,"masked");}},showMask:function(){if(this.cfg.getProperty("modal")&&this.mask){A.addClass(document.body,"masked");this.sizeMask();this.mask.style.display="block";this.showMaskEvent.fire();}},sizeMask:function(){if(this.mask){this.mask.style.height=A.getDocumentHeight()+"px";this.mask.style.width=A.getDocumentWidth()+"px";}},stackMask:function(){if(this.mask){var T=A.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(T)&&!isNaN(T)){A.setStyle(this.mask,"zIndex",T-1);}}},render:function(T){return O.superclass.render.call(this,T,this.innerElement);},destroy:function(){I.windowResizeEvent.unsubscribe(this.sizeMask,this);this.removeMask();if(this.close){S.purgeElement(this.close);}O.superclass.destroy.call(this);},toString:function(){return"Panel "+this.id;}});}());(function(){YAHOO.widget.Dialog=function(L,K){YAHOO.widget.Dialog.superclass.constructor.call(this,L,K);};var J=YAHOO.util.Event,I=YAHOO.util.CustomEvent,D=YAHOO.util.Dom,B=YAHOO.util.KeyListener,H=YAHOO.util.Connect,F=YAHOO.widget.Dialog,E=YAHOO.lang,A={"BEFORE_SUBMIT":"beforeSubmit","SUBMIT":"submit","MANUAL_SUBMIT":"manualSubmit","ASYNC_SUBMIT":"asyncSubmit","FORM_SUBMIT":"formSubmit","CANCEL":"cancel"},G={"POST_METHOD":{key:"postmethod",value:"async"},"BUTTONS":{key:"buttons",value:"none"}};F.CSS_DIALOG="yui-dialog";function C(){var N=this._aButtons,L,M,K;if(E.isArray(N)){L=N.length;if(L>0){K=L-1;do{M=N[K];if(YAHOO.widget.Button&&M instanceof YAHOO.widget.Button){M.destroy();}else{if(M.tagName.toUpperCase()=="BUTTON"){J.purgeElement(M);J.purgeElement(M,false);}}}while(K--);}}}YAHOO.extend(F,YAHOO.widget.Panel,{form:null,initDefaultConfig:function(){F.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null};this.cfg.addProperty(G.POST_METHOD.key,{handler:this.configPostMethod,value:G.POST_METHOD.value,validator:function(K){if(K!="form"&&K!="async"&&K!="none"&&K!="manual"){return false;}else{return true;}}});this.cfg.addProperty(G.BUTTONS.key,{handler:this.configButtons,value:G.BUTTONS.value});},initEvents:function(){F.superclass.initEvents.call(this);var K=I.LIST;this.beforeSubmitEvent=this.createEvent(A.BEFORE_SUBMIT);this.beforeSubmitEvent.signature=K;this.submitEvent=this.createEvent(A.SUBMIT);this.submitEvent.signature=K;this.manualSubmitEvent=this.createEvent(A.MANUAL_SUBMIT);this.manualSubmitEvent.signature=K;this.asyncSubmitEvent=this.createEvent(A.ASYNC_SUBMIT);this.asyncSubmitEvent.signature=K;this.formSubmitEvent=this.createEvent(A.FORM_SUBMIT);this.formSubmitEvent.signature=K;this.cancelEvent=this.createEvent(A.CANCEL);this.cancelEvent.signature=K;},init:function(L,K){F.superclass.init.call(this,L);this.beforeInitEvent.fire(F);D.addClass(this.element,F.CSS_DIALOG);this.cfg.setProperty("visible",false);if(K){this.cfg.applyConfig(K,true);}this.showEvent.subscribe(this.focusFirst,this,true);this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.subscribe("changeBody",this.registerForm);this.initEvent.fire(F);},doSubmit:function(){var Q=this.form,O=false,N=false,P,K,M,L;switch(this.cfg.getProperty("postmethod")){case"async":P=Q.elements;K=P.length;if(K>0){M=K-1;do{if(P[M].type=="file"){O=true;break;}}while(M--);}if(O&&YAHOO.env.ua.ie&&this.isSecure){N=true;}L=(Q.getAttribute("method")||"POST").toUpperCase();H.setForm(Q,O,N);H.asyncRequest(L,Q.getAttribute("action"),this.callback);this.asyncSubmitEvent.fire();break;case"form":Q.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break;}},registerForm:function(){var M=this.element.getElementsByTagName("form")[0],L=this,K,N;if(this.form){if(this.form==M&&D.isAncestor(this.element,this.form)){return;}else{J.purgeElement(this.form);this.form=null;}}if(!M){M=document.createElement("form");M.name="frm_"+this.id;this.body.appendChild(M);}if(M){this.form=M;J.on(M,"submit",function(O){J.stopEvent(O);this.submit();this.form.blur();},this,true);this.firstFormElement=function(){var Q,P,O=M.elements.length;for(Q=0;Q<O;Q++){P=M.elements[Q];if(P.focus&&!P.disabled&&P.type!="hidden"){return P;}}return null;}();this.lastFormElement=function(){var Q,P,O=M.elements.length;for(Q=O-1;Q>=0;Q--){P=M.elements[Q];if(P.focus&&!P.disabled&&P.type!="hidden"){return P;}}return null;}();if(this.cfg.getProperty("modal")){K=this.firstFormElement||this.firstButton;if(K){this.preventBackTab=new B(K,{shift:true,keys:9},{fn:L.focusLast,scope:L,correctScope:true});this.showEvent.subscribe(this.preventBackTab.enable,this.preventBackTab,true);this.hideEvent.subscribe(this.preventBackTab.disable,this.preventBackTab,true);}N=this.lastButton||this.lastFormElement;if(N){this.preventTabOut=new B(N,{shift:false,keys:9},{fn:L.focusFirst,scope:L,correctScope:true});this.showEvent.subscribe(this.preventTabOut.enable,this.preventTabOut,true);this.hideEvent.subscribe(this.preventTabOut.disable,this.preventTabOut,true);}}}},configClose:function(M,K,N){var O=K[0];function L(Q,P){P.cancel();}if(O){if(!this.close){this.close=document.createElement("div");D.addClass(this.close,"container-close");this.close.innerHTML="&#160;";this.innerElement.appendChild(this.close);J.on(this.close,"click",L,this);}else{this.close.style.display="block";}}else{if(this.close){this.close.style.display="none";}}},configButtons:function(U,T,O){var P=YAHOO.widget.Button,W=T[0],M=this.innerElement,V,R,L,S,Q,K,N;C.call(this);this._aButtons=null;if(E.isArray(W)){Q=document.createElement("span");Q.className="button-group";S=W.length;this._aButtons=[];for(N=0;N<S;N++){V=W[N];if(P){L=new P({label:V.text,container:Q});R=L.get("element");if(V.isDefault){L.addClass("default");this.defaultHtmlButton=R;}if(E.isFunction(V.handler)){L.set("onclick",{fn:V.handler,obj:this,scope:this});}else{if(E.isObject(V.handler)&&E.isFunction(V.handler.fn)){L.set("onclick",{fn:V.handler.fn,obj:((!E.isUndefined(V.handler.obj))?V.handler.obj:this),scope:(V.handler.scope||this)});}}this._aButtons[this._aButtons.length]=L;}else{R=document.createElement("button");R.setAttribute("type","button");if(V.isDefault){R.className="default";this.defaultHtmlButton=R;}R.innerHTML=V.text;if(E.isFunction(V.handler)){J.on(R,"click",V.handler,this,true);}else{if(E.isObject(V.handler)&&E.isFunction(V.handler.fn)){J.on(R,"click",V.handler.fn,((!E.isUndefined(V.handler.obj))?V.handler.obj:this),(V.handler.scope||this));}}Q.appendChild(R);this._aButtons[this._aButtons.length]=R;}V.htmlButton=R;if(N===0){this.firstButton=R;}if(N==(S-1)){this.lastButton=R;}}this.setFooter(Q);K=this.footer;if(D.inDocument(this.element)&&!D.isAncestor(M,K)){M.appendChild(K);}this.buttonSpan=Q;}else{Q=this.buttonSpan;K=this.footer;if(Q&&K){K.removeChild(Q);this.buttonSpan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null;}}this.cfg.refireEvent("iframe");this.cfg.refireEvent("underlay");},getButtons:function(){var K=this._aButtons;if(K){return K;}},focusFirst:function(N,L,P){var M=this.firstFormElement,K;if(L){K=L[1];if(K){J.stopEvent(K);}}if(M){try{M.focus();}catch(O){}}else{this.focusDefaultButton();}},focusLast:function(N,L,P){var Q=this.cfg.getProperty("buttons"),M=this.lastFormElement,K;if(L){K=L[1];if(K){J.stopEvent(K);}}if(Q&&E.isArray(Q)){this.focusLastButton();}else{if(M){try{M.focus();}catch(O){}}}},focusDefaultButton:function(){var K=this.defaultHtmlButton;if(K){try{K.focus();}catch(L){}}},blurButtons:function(){var P=this.cfg.getProperty("buttons"),M,O,L,K;if(P&&E.isArray(P)){M=P.length;if(M>0){K=(M-1);do{O=P[K];if(O){L=O.htmlButton;if(L){try{L.blur();}catch(N){}}}}while(K--);}}},focusFirstButton:function(){var N=this.cfg.getProperty("buttons"),M,K;if(N&&E.isArray(N)){M=N[0];if(M){K=M.htmlButton;if(K){try{K.focus();}catch(L){}}}}},focusLastButton:function(){var O=this.cfg.getProperty("buttons"),L,N,K;if(O&&E.isArray(O)){L=O.length;if(L>0){N=O[(L-1)];if(N){K=N.htmlButton;if(K){try{K.focus();}catch(M){}}}}}},configPostMethod:function(M,L,N){var K=L[0];this.registerForm();},validate:function(){return true;},submit:function(){if(this.validate()){this.beforeSubmitEvent.fire();this.doSubmit();this.submitEvent.fire();this.hide();return true;}else{return false;}},cancel:function(){this.cancelEvent.fire();this.hide();},getData:function(){var a=this.form,M,T,W,O,U,R,Q,L,X,N,Y,b,K,P,c,Z,V;function S(e){var d=e.tagName.toUpperCase();return((d=="INPUT"||d=="TEXTAREA"||d=="SELECT")&&e.name==O);}if(a){M=a.elements;T=M.length;W={};for(Z=0;Z<T;Z++){O=M[Z].name;U=D.getElementsBy(S,"*",a);R=U.length;if(R>0){if(R==1){U=U[0];Q=U.type;L=U.tagName.toUpperCase();switch(L){case"INPUT":if(Q=="checkbox"){W[O]=U.checked;}else{if(Q!="radio"){W[O]=U.value;}}break;case"TEXTAREA":W[O]=U.value;break;case"SELECT":X=U.options;N=X.length;Y=[];for(V=0;V<N;V++){b=X[V];if(b.selected){K=b.value;if(!K||K===""){K=b.text;}Y[Y.length]=K;}}W[O]=Y;break;}}else{Q=U[0].type;switch(Q){case"radio":for(V=0;V<R;V++){P=U[V];if(P.checked){W[O]=P.value;break;}}break;case"checkbox":Y=[];for(V=0;V<R;V++){c=U[V];if(c.checked){Y[Y.length]=c.value;}}W[O]=Y;break;}}}}}return W;},destroy:function(){C.call(this);this._aButtons=null;var K=this.element.getElementsByTagName("form"),L;if(K.length>0){L=K[0];if(L){J.purgeElement(L);if(L.parentNode){L.parentNode.removeChild(L);}this.form=null;}}F.superclass.destroy.call(this);},toString:function(){return"Dialog "+this.id;}});}());(function(){YAHOO.widget.SimpleDialog=function(E,D){YAHOO.widget.SimpleDialog.superclass.constructor.call(this,E,D);};var C=YAHOO.util.Dom,B=YAHOO.widget.SimpleDialog,A={"ICON":{key:"icon",value:"none",suppressEvent:true},"TEXT":{key:"text",value:"",suppressEvent:true,supercedes:["icon"]}};B.ICON_BLOCK="blckicon";B.ICON_ALARM="alrticon";B.ICON_HELP="hlpicon";B.ICON_INFO="infoicon";B.ICON_WARN="warnicon";B.ICON_TIP="tipicon";B.ICON_CSS_CLASSNAME="yui-icon";B.CSS_SIMPLEDIALOG="yui-simple-dialog";YAHOO.extend(B,YAHOO.widget.Dialog,{initDefaultConfig:function(){B.superclass.initDefaultConfig.call(this);this.cfg.addProperty(A.ICON.key,{handler:this.configIcon,value:A.ICON.value,suppressEvent:A.ICON.suppressEvent});this.cfg.addProperty(A.TEXT.key,{handler:this.configText,value:A.TEXT.value,suppressEvent:A.TEXT.suppressEvent,supercedes:A.TEXT.supercedes});},init:function(E,D){B.superclass.init.call(this,E);this.beforeInitEvent.fire(B);C.addClass(this.element,B.CSS_SIMPLEDIALOG);this.cfg.queueProperty("postmethod","manual");if(D){this.cfg.applyConfig(D,true);}this.beforeRenderEvent.subscribe(function(){if(!this.body){this.setBody("");}},this,true);this.initEvent.fire(B);},registerForm:function(){B.superclass.registerForm.call(this);this.form.innerHTML+="<input type=\"hidden\" name=\""+this.id+"\" value=\"\"/>";},configIcon:function(F,E,J){var K=E[0],D=this.body,I=B.ICON_CSS_CLASSNAME,H,G;if(K&&K!="none"){H=C.getElementsByClassName(I,"*",D);if(H){G=H.parentNode;if(G){G.removeChild(H);H=null;}}if(K.indexOf(".")==-1){H=document.createElement("span");H.className=(I+" "+K);H.innerHTML="&#160;";}else{H=document.createElement("img");H.src=(this.imageRoot+K);H.className=I;}if(H){D.insertBefore(H,D.firstChild);}}},configText:function(E,D,F){var G=D[0];if(G){this.setBody(G);this.cfg.refireEvent("icon");}},toString:function(){return"SimpleDialog "+this.id;}});}());(function(){YAHOO.widget.ContainerEffect=function(F,I,H,E,G){if(!G){G=YAHOO.util.Anim;}this.overlay=F;this.attrIn=I;this.attrOut=H;this.targetElement=E||F.element;this.animClass=G;};var B=YAHOO.util.Dom,D=YAHOO.util.CustomEvent,C=YAHOO.util.Easing,A=YAHOO.widget.ContainerEffect;A.FADE=function(E,F){var G=new A(E,{attributes:{opacity:{from:0,to:1}},duration:F,method:C.easeIn},{attributes:{opacity:{to:0}},duration:F,method:C.easeOut},E.element);G.handleStartAnimateIn=function(I,H,J){B.addClass(J.overlay.element,"hide-select");if(!J.overlay.underlay){J.overlay.cfg.refireEvent("underlay");}if(J.overlay.underlay){J.initialUnderlayOpacity=B.getStyle(J.overlay.underlay,"opacity");J.overlay.underlay.style.filter=null;}B.setStyle(J.overlay.element,"visibility","visible");B.setStyle(J.overlay.element,"opacity",0);};G.handleCompleteAnimateIn=function(I,H,J){B.removeClass(J.overlay.element,"hide-select");if(J.overlay.element.style.filter){J.overlay.element.style.filter=null;}if(J.overlay.underlay){B.setStyle(J.overlay.underlay,"opacity",J.initialUnderlayOpacity);}J.overlay.cfg.refireEvent("iframe");J.animateInCompleteEvent.fire();};G.handleStartAnimateOut=function(I,H,J){B.addClass(J.overlay.element,"hide-select");if(J.overlay.underlay){J.overlay.underlay.style.filter=null;}};G.handleCompleteAnimateOut=function(I,H,J){B.removeClass(J.overlay.element,"hide-select");if(J.overlay.element.style.filter){J.overlay.element.style.filter=null;}B.setStyle(J.overlay.element,"visibility","hidden");B.setStyle(J.overlay.element,"opacity",1);J.overlay.cfg.refireEvent("iframe");J.animateOutCompleteEvent.fire();};G.init();return G;};A.SLIDE=function(G,I){var F=G.cfg.getProperty("x")||B.getX(G.element),K=G.cfg.getProperty("y")||B.getY(G.element),J=B.getClientWidth(),H=G.element.offsetWidth,E=new A(G,{attributes:{points:{to:[F,K]}},duration:I,method:C.easeIn},{attributes:{points:{to:[(J+25),K]}},duration:I,method:C.easeOut},G.element,YAHOO.util.Motion);E.handleStartAnimateIn=function(M,L,N){N.overlay.element.style.left=((-25)-H)+"px";N.overlay.element.style.top=K+"px";};E.handleTweenAnimateIn=function(O,N,P){var Q=B.getXY(P.overlay.element),M=Q[0],L=Q[1];if(B.getStyle(P.overlay.element,"visibility")=="hidden"&&M<F){B.setStyle(P.overlay.element,"visibility","visible");}P.overlay.cfg.setProperty("xy",[M,L],true);P.overlay.cfg.refireEvent("iframe");};E.handleCompleteAnimateIn=function(M,L,N){N.overlay.cfg.setProperty("xy",[F,K],true);N.startX=F;N.startY=K;N.overlay.cfg.refireEvent("iframe");N.animateInCompleteEvent.fire();};E.handleStartAnimateOut=function(N,M,Q){var O=B.getViewportWidth(),R=B.getXY(Q.overlay.element),P=R[1],L=Q.animOut.attributes.points.to;Q.animOut.attributes.points.to=[(O+25),P];};E.handleTweenAnimateOut=function(N,M,O){var Q=B.getXY(O.overlay.element),L=Q[0],P=Q[1];O.overlay.cfg.setProperty("xy",[L,P],true);O.overlay.cfg.refireEvent("iframe");};E.handleCompleteAnimateOut=function(M,L,N){B.setStyle(N.overlay.element,"visibility","hidden");N.overlay.cfg.setProperty("xy",[F,K]);N.animateOutCompleteEvent.fire();};E.init();return E;};A.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=D.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=D.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=D.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=D.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this);},animateIn:function(){this.beforeAnimateInEvent.fire();this.animIn.animate();},animateOut:function(){this.beforeAnimateOutEvent.fire();this.animOut.animate();},handleStartAnimateIn:function(F,E,G){},handleTweenAnimateIn:function(F,E,G){},handleCompleteAnimateIn:function(F,E,G){},handleStartAnimateOut:function(F,E,G){},handleTweenAnimateOut:function(F,E,G){},handleCompleteAnimateOut:function(F,E,G){},toString:function(){var E="ContainerEffect";if(this.overlay){E+=" ["+this.overlay.toString()+"]";}return E;}};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider);})();YAHOO.register("container",YAHOO.widget.Module,{version:"2.3.1",build:"541"});(function(){YAHOO.util.Config=function(D){if(D){this.init(D);}if(!D){}};var B=YAHOO.lang,C=YAHOO.util.CustomEvent,A=YAHOO.util.Config;A.CONFIG_CHANGED_EVENT="configChanged";A.BOOLEAN_TYPE="boolean";A.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(D){this.owner=D;this.configChangedEvent=this.createEvent(A.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=C.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[];},checkBoolean:function(D){return(typeof D==A.BOOLEAN_TYPE);},checkNumber:function(D){return(!isNaN(D));},fireEvent:function(D,F){var E=this.config[D];if(E&&E.event){E.event.fire(F);}},addProperty:function(E,D){E=E.toLowerCase();this.config[E]=D;D.event=this.createEvent(E,{scope:this.owner});D.event.signature=C.LIST;D.key=E;if(D.handler){D.event.subscribe(D.handler,this.owner);}this.setProperty(E,D.value,true);if(!D.suppressEvent){this.queueProperty(E,D.value);}},getConfig:function(){var D={},F,E;for(F in this.config){E=this.config[F];if(E&&E.event){D[F]=E.value;}}return D;},getProperty:function(D){var E=this.config[D.toLowerCase()];if(E&&E.event){return E.value;}else{return undefined;}},resetProperty:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event){if(this.initialConfig[D]&&!B.isUndefined(this.initialConfig[D])){this.setProperty(D,this.initialConfig[D]);return true;}}else{return false;}},setProperty:function(E,G,D){var F;E=E.toLowerCase();if(this.queueInProgress&&!D){this.queueProperty(E,G);return true;}else{F=this.config[E];if(F&&F.event){if(F.validator&&!F.validator(G)){return false;}else{F.value=G;if(!D){this.fireEvent(E,G);this.configChangedEvent.fire([E,G]);}return true;}}else{return false;}}},queueProperty:function(S,P){S=S.toLowerCase();var R=this.config[S],K=false,J,G,H,I,O,Q,F,M,N,D,L,T,E;if(R&&R.event){if(!B.isUndefined(P)&&R.validator&&!R.validator(P)){return false;}else{if(!B.isUndefined(P)){R.value=P;}else{P=R.value;}K=false;J=this.eventQueue.length;for(L=0;L<J;L++){G=this.eventQueue[L];if(G){H=G[0];I=G[1];if(H==S){this.eventQueue[L]=null;this.eventQueue.push([S,(!B.isUndefined(P)?P:I)]);K=true;break;}}}if(!K&&!B.isUndefined(P)){this.eventQueue.push([S,P]);}}if(R.supercedes){O=R.supercedes.length;for(T=0;T<O;T++){Q=R.supercedes[T];F=this.eventQueue.length;for(E=0;E<F;E++){M=this.eventQueue[E];if(M){N=M[0];D=M[1];if(N==Q.toLowerCase()){this.eventQueue.push([N,D]);this.eventQueue[E]=null;break;}}}}}return true;}else{return false;}},refireEvent:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event&&!B.isUndefined(E.value)){if(this.queueInProgress){this.queueProperty(D);}else{this.fireEvent(D,E.value);}}},applyConfig:function(E,H){var G,D,F;if(H){F={};for(G in E){if(B.hasOwnProperty(E,G)){F[G.toLowerCase()]=E[G];}}this.initialConfig=F;}for(G in E){if(B.hasOwnProperty(E,G)){this.queueProperty(G,E[G]);}}},refresh:function(){var D;for(D in this.config){this.refireEvent(D);}},fireQueue:function(){var E,H,D,G,F;this.queueInProgress=true;for(E=0;E<this.eventQueue.length;E++){H=this.eventQueue[E];if(H){D=H[0];G=H[1];F=this.config[D];F.value=G;this.fireEvent(D,G);}}this.queueInProgress=false;this.eventQueue=[];},subscribeToConfigEvent:function(E,F,H,D){var G=this.config[E.toLowerCase()];if(G&&G.event){if(!A.alreadySubscribed(G.event,F,H)){G.event.subscribe(F,H,D);}return true;}else{return false;}},unsubscribeFromConfigEvent:function(D,E,G){var F=this.config[D.toLowerCase()];if(F&&F.event){return F.event.unsubscribe(E,G);}else{return false;}},toString:function(){var D="Config";if(this.owner){D+=" ["+this.owner.toString()+"]";}return D;},outputEventQueue:function(){var D="",G,E,F=this.eventQueue.length;for(E=0;E<F;E++){G=this.eventQueue[E];if(G){D+=G[0]+"="+G[1]+", ";}}return D;},destroy:function(){var E=this.config,D,F;for(D in E){if(B.hasOwnProperty(E,D)){F=E[D];F.event.unsubscribeAll();F.event=null;}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null;}};A.alreadySubscribed=function(E,H,I){var F=E.subscribers.length,D,G;if(F>0){G=F-1;do{D=E.subscribers[G];if(D&&D.obj==I&&D.fn==H){return true;}}while(G--);}return false;};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider);}());YAHOO.widget.DateMath={DAY:"D",WEEK:"W",YEAR:"Y",MONTH:"M",ONE_DAY_MS:1000*60*60*24,add:function(A,D,C){var F=new Date(A.getTime());switch(D){case this.MONTH:var E=A.getMonth()+C;var B=0;if(E<0){while(E<0){E+=12;B-=1;}}else{if(E>11){while(E>11){E-=12;B+=1;}}}F.setMonth(E);F.setFullYear(A.getFullYear()+B);break;case this.DAY:F.setDate(A.getDate()+C);break;case this.YEAR:F.setFullYear(A.getFullYear()+C);break;case this.WEEK:F.setDate(A.getDate()+(C*7));break;}return F;},subtract:function(A,C,B){return this.add(A,C,(B*-1));},before:function(C,B){var A=B.getTime();if(C.getTime()<A){return true;}else{return false;}},after:function(C,B){var A=B.getTime();if(C.getTime()>A){return true;}else{return false;}},between:function(B,A,C){if(this.after(B,A)&&this.before(B,C)){return true;}else{return false;}},getJan1:function(A){return new Date(A,0,1);},getDayOffset:function(B,D){var C=this.getJan1(D);var A=Math.ceil((B.getTime()-C.getTime())/this.ONE_DAY_MS);return A;},getWeekNumber:function(C,F){C=this.clearTime(C);var E=new Date(C.getTime()+(4*this.ONE_DAY_MS)-((C.getDay())*this.ONE_DAY_MS));var B=new Date(E.getFullYear(),0,1);var A=((E.getTime()-B.getTime())/this.ONE_DAY_MS)-1;var D=Math.ceil((A)/7);return D;},isYearOverlapWeek:function(A){var C=false;var B=this.add(A,this.DAY,6);if(B.getFullYear()!=A.getFullYear()){C=true;}return C;},isMonthOverlapWeek:function(A){var C=false;var B=this.add(A,this.DAY,6);if(B.getMonth()!=A.getMonth()){C=true;}return C;},findMonthStart:function(A){var B=new Date(A.getFullYear(),A.getMonth(),1);return B;},findMonthEnd:function(B){var D=this.findMonthStart(B);var C=this.add(D,this.MONTH,1);var A=this.subtract(C,this.DAY,1);return A;},clearTime:function(A){A.setHours(12,0,0,0);return A;}};YAHOO.widget.Calendar=function(C,A,B){this.init(C,A,B);};YAHOO.widget.Calendar.IMG_ROOT=null;YAHOO.widget.Calendar.DATE="D";YAHOO.widget.Calendar.MONTH_DAY="MD";YAHOO.widget.Calendar.WEEKDAY="WD";YAHOO.widget.Calendar.RANGE="R";YAHOO.widget.Calendar.MONTH="M";YAHOO.widget.Calendar.DISPLAY_DAYS=42;YAHOO.widget.Calendar.STOP_RENDER="S";YAHOO.widget.Calendar.SHORT="short";YAHOO.widget.Calendar.LONG="long";YAHOO.widget.Calendar.MEDIUM="medium";YAHOO.widget.Calendar.ONE_CHAR="1char";YAHOO.widget.Calendar._DEFAULT_CONFIG={PAGEDATE:{key:"pagedate",value:null},SELECTED:{key:"selected",value:null},TITLE:{key:"title",value:""},CLOSE:{key:"close",value:false},IFRAME:{key:"iframe",value:(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6)?true:false},MINDATE:{key:"mindate",value:null},MAXDATE:{key:"maxdate",value:null},MULTI_SELECT:{key:"multi_select",value:false},START_WEEKDAY:{key:"start_weekday",value:0},SHOW_WEEKDAYS:{key:"show_weekdays",value:true},SHOW_WEEK_HEADER:{key:"show_week_header",value:false},SHOW_WEEK_FOOTER:{key:"show_week_footer",value:false},HIDE_BLANK_WEEKS:{key:"hide_blank_weeks",value:false},NAV_ARROW_LEFT:{key:"nav_arrow_left",value:null},NAV_ARROW_RIGHT:{key:"nav_arrow_right",value:null},MONTHS_SHORT:{key:"months_short",value:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},MONTHS_LONG:{key:"months_long",value:["January","February","March","April","May","June","July","August","September","October","November","December"]},WEEKDAYS_1CHAR:{key:"weekdays_1char",value:["S","M","T","W","T","F","S"]},WEEKDAYS_SHORT:{key:"weekdays_short",value:["Su","Mo","Tu","We","Th","Fr","Sa"]},WEEKDAYS_MEDIUM:{key:"weekdays_medium",value:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},WEEKDAYS_LONG:{key:"weekdays_long",value:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},LOCALE_MONTHS:{key:"locale_months",value:"long"},LOCALE_WEEKDAYS:{key:"locale_weekdays",value:"short"},DATE_DELIMITER:{key:"date_delimiter",value:","},DATE_FIELD_DELIMITER:{key:"date_field_delimiter",value:"/"},DATE_RANGE_DELIMITER:{key:"date_range_delimiter",value:"-"},MY_MONTH_POSITION:{key:"my_month_position",value:1},MY_YEAR_POSITION:{key:"my_year_position",value:2},MD_MONTH_POSITION:{key:"md_month_position",value:1},MD_DAY_POSITION:{key:"md_day_position",value:2},MDY_MONTH_POSITION:{key:"mdy_month_position",value:1},MDY_DAY_POSITION:{key:"mdy_day_position",value:2},MDY_YEAR_POSITION:{key:"mdy_year_position",value:3},MY_LABEL_MONTH_POSITION:{key:"my_label_month_position",value:1},MY_LABEL_YEAR_POSITION:{key:"my_label_year_position",value:2},MY_LABEL_MONTH_SUFFIX:{key:"my_label_month_suffix",value:" "},MY_LABEL_YEAR_SUFFIX:{key:"my_label_year_suffix",value:""}};YAHOO.widget.Calendar._EVENT_TYPES={BEFORE_SELECT:"beforeSelect",SELECT:"select",BEFORE_DESELECT:"beforeDeselect",DESELECT:"deselect",CHANGE_PAGE:"changePage",BEFORE_RENDER:"beforeRender",RENDER:"render",RESET:"reset",CLEAR:"clear"};YAHOO.widget.Calendar._STYLES={CSS_ROW_HEADER:"calrowhead",CSS_ROW_FOOTER:"calrowfoot",CSS_CELL:"calcell",CSS_CELL_SELECTOR:"selector",CSS_CELL_SELECTED:"selected",CSS_CELL_SELECTABLE:"selectable",CSS_CELL_RESTRICTED:"restricted",CSS_CELL_TODAY:"today",CSS_CELL_OOM:"oom",CSS_CELL_OOB:"previous",CSS_HEADER:"calheader",CSS_HEADER_TEXT:"calhead",CSS_BODY:"calbody",CSS_WEEKDAY_CELL:"calweekdaycell",CSS_WEEKDAY_ROW:"calweekdayrow",CSS_FOOTER:"calfoot",CSS_CALENDAR:"yui-calendar",CSS_SINGLE:"single",CSS_CONTAINER:"yui-calcontainer",CSS_NAV_LEFT:"calnavleft",CSS_NAV_RIGHT:"calnavright",CSS_CLOSE:"calclose",CSS_CELL_TOP:"calcelltop",CSS_CELL_LEFT:"calcellleft",CSS_CELL_RIGHT:"calcellright",CSS_CELL_BOTTOM:"calcellbottom",CSS_CELL_HOVER:"calcellhover",CSS_CELL_HIGHLIGHT1:"highlight1",CSS_CELL_HIGHLIGHT2:"highlight2",CSS_CELL_HIGHLIGHT3:"highlight3",CSS_CELL_HIGHLIGHT4:"highlight4"};YAHOO.widget.Calendar.prototype={Config:null,parent:null,index:-1,cells:null,cellDates:null,id:null,oDomContainer:null,today:null,renderStack:null,_renderStack:null,_selectedDates:null,domEventMap:null};YAHOO.widget.Calendar.prototype.init=function(C,A,B){this.initEvents();this.today=new Date();YAHOO.widget.DateMath.clearTime(this.today);this.id=C;this.oDomContainer=document.getElementById(A);this.cfg=new YAHOO.util.Config(this);this.Options={};this.Locale={};this.initStyles();YAHOO.util.Dom.addClass(this.oDomContainer,this.Style.CSS_CONTAINER);YAHOO.util.Dom.addClass(this.oDomContainer,this.Style.CSS_SINGLE);this.cellDates=[];this.cells=[];this.renderStack=[];this._renderStack=[];this.setupConfig();if(B){this.cfg.applyConfig(B,true);}this.cfg.fireQueue();};YAHOO.widget.Calendar.prototype.configIframe=function(C,B,D){var A=B[0];if(!this.parent){if(YAHOO.util.Dom.inDocument(this.oDomContainer)){if(A){var E=YAHOO.util.Dom.getStyle(this.oDomContainer,"position");if(E=="absolute"||E=="relative"){if(!YAHOO.util.Dom.inDocument(this.iframe)){this.iframe=document.createElement("iframe");this.iframe.src="javascript:false;";YAHOO.util.Dom.setStyle(this.iframe,"opacity","0");if(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6){YAHOO.util.Dom.addClass(this.iframe,"fixedsize");}this.oDomContainer.insertBefore(this.iframe,this.oDomContainer.firstChild);}}}else{if(this.iframe){if(this.iframe.parentNode){this.iframe.parentNode.removeChild(this.iframe);}this.iframe=null;}}}}};YAHOO.widget.Calendar.prototype.configTitle=function(B,A,C){var E=A[0],F;if(E){this.createTitleBar(E);}else{var D=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.CLOSE.key);if(!D){this.removeTitleBar();}else{this.createTitleBar("&#160;");}}};YAHOO.widget.Calendar.prototype.configClose=function(B,A,C){var E=A[0],D=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.TITLE.key);if(E){if(!D){this.createTitleBar("&#160;");}this.createCloseButton();}else{this.removeCloseButton();if(!D){this.removeTitleBar();}}};YAHOO.widget.Calendar.prototype.initEvents=function(){var A=YAHOO.widget.Calendar._EVENT_TYPES;this.beforeSelectEvent=new YAHOO.util.CustomEvent(A.BEFORE_SELECT);this.selectEvent=new YAHOO.util.CustomEvent(A.SELECT);this.beforeDeselectEvent=new YAHOO.util.CustomEvent(A.BEFORE_DESELECT);this.deselectEvent=new YAHOO.util.CustomEvent(A.DESELECT);this.changePageEvent=new YAHOO.util.CustomEvent(A.CHANGE_PAGE);this.beforeRenderEvent=new YAHOO.util.CustomEvent(A.BEFORE_RENDER);this.renderEvent=new YAHOO.util.CustomEvent(A.RENDER);this.resetEvent=new YAHOO.util.CustomEvent(A.RESET);this.clearEvent=new YAHOO.util.CustomEvent(A.CLEAR);this.beforeSelectEvent.subscribe(this.onBeforeSelect,this,true);this.selectEvent.subscribe(this.onSelect,this,true);this.beforeDeselectEvent.subscribe(this.onBeforeDeselect,this,true);this.deselectEvent.subscribe(this.onDeselect,this,true);this.changePageEvent.subscribe(this.onChangePage,this,true);this.renderEvent.subscribe(this.onRender,this,true);this.resetEvent.subscribe(this.onReset,this,true);this.clearEvent.subscribe(this.onClear,this,true);};YAHOO.widget.Calendar.prototype.doSelectCell=function(G,A){var L,F,I,C;var H=YAHOO.util.Event.getTarget(G);var B=H.tagName.toLowerCase();var E=false;while(B!="td"&&!YAHOO.util.Dom.hasClass(H,A.Style.CSS_CELL_SELECTABLE)){if(!E&&B=="a"&&YAHOO.util.Dom.hasClass(H,A.Style.CSS_CELL_SELECTOR)){E=true;}H=H.parentNode;B=H.tagName.toLowerCase();if(B=="html"){return;}}if(E){YAHOO.util.Event.preventDefault(G);}L=H;if(YAHOO.util.Dom.hasClass(L,A.Style.CSS_CELL_SELECTABLE)){F=L.id.split("cell")[1];I=A.cellDates[F];C=new Date(I[0],I[1]-1,I[2]);var K;if(A.Options.MULTI_SELECT){K=L.getElementsByTagName("a")[0];if(K){K.blur();}var D=A.cellDates[F];var J=A._indexOfSelectedFieldArray(D);if(J>-1){A.deselectCell(F);}else{A.selectCell(F);}}else{K=L.getElementsByTagName("a")[0];if(K){K.blur();}A.selectCell(F);}}};YAHOO.widget.Calendar.prototype.doCellMouseOver=function(C,B){var A;if(C){A=YAHOO.util.Event.getTarget(C);}else{A=this;}while(A.tagName.toLowerCase()!="td"){A=A.parentNode;if(A.tagName.toLowerCase()=="html"){return;}}if(YAHOO.util.Dom.hasClass(A,B.Style.CSS_CELL_SELECTABLE)){YAHOO.util.Dom.addClass(A,B.Style.CSS_CELL_HOVER);}};YAHOO.widget.Calendar.prototype.doCellMouseOut=function(C,B){var A;if(C){A=YAHOO.util.Event.getTarget(C);}else{A=this;}while(A.tagName.toLowerCase()!="td"){A=A.parentNode;if(A.tagName.toLowerCase()=="html"){return;}}if(YAHOO.util.Dom.hasClass(A,B.Style.CSS_CELL_SELECTABLE)){YAHOO.util.Dom.removeClass(A,B.Style.CSS_CELL_HOVER);}};YAHOO.widget.Calendar.prototype.setupConfig=function(){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.cfg.addProperty(A.PAGEDATE.key,{value:new Date(),handler:this.configPageDate});this.cfg.addProperty(A.SELECTED.key,{value:[],handler:this.configSelected});this.cfg.addProperty(A.TITLE.key,{value:A.TITLE.value,handler:this.configTitle});this.cfg.addProperty(A.CLOSE.key,{value:A.CLOSE.value,handler:this.configClose});this.cfg.addProperty(A.IFRAME.key,{value:A.IFRAME.value,handler:this.configIframe,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.MINDATE.key,{value:A.MINDATE.value,handler:this.configMinDate});this.cfg.addProperty(A.MAXDATE.key,{value:A.MAXDATE.value,handler:this.configMaxDate});this.cfg.addProperty(A.MULTI_SELECT.key,{value:A.MULTI_SELECT.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.START_WEEKDAY.key,{value:A.START_WEEKDAY.value,handler:this.configOptions,validator:this.cfg.checkNumber});this.cfg.addProperty(A.SHOW_WEEKDAYS.key,{value:A.SHOW_WEEKDAYS.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.SHOW_WEEK_HEADER.key,{value:A.SHOW_WEEK_HEADER.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.SHOW_WEEK_FOOTER.key,{value:A.SHOW_WEEK_FOOTER.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.HIDE_BLANK_WEEKS.key,{value:A.HIDE_BLANK_WEEKS.value,handler:this.configOptions,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.NAV_ARROW_LEFT.key,{value:A.NAV_ARROW_LEFT.value,handler:this.configOptions});this.cfg.addProperty(A.NAV_ARROW_RIGHT.key,{value:A.NAV_ARROW_RIGHT.value,handler:this.configOptions});this.cfg.addProperty(A.MONTHS_SHORT.key,{value:A.MONTHS_SHORT.value,handler:this.configLocale});this.cfg.addProperty(A.MONTHS_LONG.key,{value:A.MONTHS_LONG.value,handler:this.configLocale});this.cfg.addProperty(A.WEEKDAYS_1CHAR.key,{value:A.WEEKDAYS_1CHAR.value,handler:this.configLocale});this.cfg.addProperty(A.WEEKDAYS_SHORT.key,{value:A.WEEKDAYS_SHORT.value,handler:this.configLocale});this.cfg.addProperty(A.WEEKDAYS_MEDIUM.key,{value:A.WEEKDAYS_MEDIUM.value,handler:this.configLocale});this.cfg.addProperty(A.WEEKDAYS_LONG.key,{value:A.WEEKDAYS_LONG.value,handler:this.configLocale});var B=function(){this.cfg.refireEvent(A.LOCALE_MONTHS.key);this.cfg.refireEvent(A.LOCALE_WEEKDAYS.key);};this.cfg.subscribeToConfigEvent(A.START_WEEKDAY.key,B,this,true);this.cfg.subscribeToConfigEvent(A.MONTHS_SHORT.key,B,this,true);this.cfg.subscribeToConfigEvent(A.MONTHS_LONG.key,B,this,true);this.cfg.subscribeToConfigEvent(A.WEEKDAYS_1CHAR.key,B,this,true);this.cfg.subscribeToConfigEvent(A.WEEKDAYS_SHORT.key,B,this,true);this.cfg.subscribeToConfigEvent(A.WEEKDAYS_MEDIUM.key,B,this,true);this.cfg.subscribeToConfigEvent(A.WEEKDAYS_LONG.key,B,this,true);this.cfg.addProperty(A.LOCALE_MONTHS.key,{value:A.LOCALE_MONTHS.value,handler:this.configLocaleValues});this.cfg.addProperty(A.LOCALE_WEEKDAYS.key,{value:A.LOCALE_WEEKDAYS.value,handler:this.configLocaleValues});this.cfg.addProperty(A.DATE_DELIMITER.key,{value:A.DATE_DELIMITER.value,handler:this.configLocale});this.cfg.addProperty(A.DATE_FIELD_DELIMITER.key,{value:A.DATE_FIELD_DELIMITER.value,handler:this.configLocale});this.cfg.addProperty(A.DATE_RANGE_DELIMITER.key,{value:A.DATE_RANGE_DELIMITER.value,handler:this.configLocale});this.cfg.addProperty(A.MY_MONTH_POSITION.key,{value:A.MY_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_YEAR_POSITION.key,{value:A.MY_YEAR_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MD_MONTH_POSITION.key,{value:A.MD_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MD_DAY_POSITION.key,{value:A.MD_DAY_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_MONTH_POSITION.key,{value:A.MDY_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_DAY_POSITION.key,{value:A.MDY_DAY_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_YEAR_POSITION.key,{value:A.MDY_YEAR_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_MONTH_POSITION.key,{value:A.MY_LABEL_MONTH_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_YEAR_POSITION.key,{value:A.MY_LABEL_YEAR_POSITION.value,handler:this.configLocale,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_MONTH_SUFFIX.key,{value:A.MY_LABEL_MONTH_SUFFIX.value,handler:this.configLocale});this.cfg.addProperty(A.MY_LABEL_YEAR_SUFFIX.key,{value:A.MY_LABEL_YEAR_SUFFIX.value,handler:this.configLocale});};YAHOO.widget.Calendar.prototype.configPageDate=function(B,A,C){this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key,this._parsePageDate(A[0]),true);};YAHOO.widget.Calendar.prototype.configMinDate=function(B,A,C){var D=A[0];if(YAHOO.lang.isString(D)){D=this._parseDate(D);this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MINDATE.key,new Date(D[0],(D[1]-1),D[2]));}};YAHOO.widget.Calendar.prototype.configMaxDate=function(B,A,C){var D=A[0];if(YAHOO.lang.isString(D)){D=this._parseDate(D);this.cfg.setProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MAXDATE.key,new Date(D[0],(D[1]-1),D[2]));}};YAHOO.widget.Calendar.prototype.configSelected=function(C,A,E){var B=A[0];var D=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;if(B){if(YAHOO.lang.isString(B)){this.cfg.setProperty(D,this._parseDates(B),true);}}if(!this._selectedDates){this._selectedDates=this.cfg.getProperty(D);}};YAHOO.widget.Calendar.prototype.configOptions=function(B,A,C){this.Options[B.toUpperCase()]=A[0];};YAHOO.widget.Calendar.prototype.configLocale=function(C,B,D){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.Locale[C.toUpperCase()]=B[0];this.cfg.refireEvent(A.LOCALE_MONTHS.key);this.cfg.refireEvent(A.LOCALE_WEEKDAYS.key);};YAHOO.widget.Calendar.prototype.configLocaleValues=function(D,C,E){var B=YAHOO.widget.Calendar._DEFAULT_CONFIG;D=D.toLowerCase();var G=C[0];switch(D){case B.LOCALE_MONTHS.key:switch(G){case YAHOO.widget.Calendar.SHORT:this.Locale.LOCALE_MONTHS=this.cfg.getProperty(B.MONTHS_SHORT.key).concat();break;case YAHOO.widget.Calendar.LONG:this.Locale.LOCALE_MONTHS=this.cfg.getProperty(B.MONTHS_LONG.key).concat();break;}break;case B.LOCALE_WEEKDAYS.key:switch(G){case YAHOO.widget.Calendar.ONE_CHAR:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(B.WEEKDAYS_1CHAR.key).concat();break;case YAHOO.widget.Calendar.SHORT:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(B.WEEKDAYS_SHORT.key).concat();break;case YAHOO.widget.Calendar.MEDIUM:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(B.WEEKDAYS_MEDIUM.key).concat();break;case YAHOO.widget.Calendar.LONG:this.Locale.LOCALE_WEEKDAYS=this.cfg.getProperty(B.WEEKDAYS_LONG.key).concat();break;}var F=this.cfg.getProperty(B.START_WEEKDAY.key);if(F>0){for(var A=0;A<F;++A){this.Locale.LOCALE_WEEKDAYS.push(this.Locale.LOCALE_WEEKDAYS.shift());}}break;}};YAHOO.widget.Calendar.prototype.initStyles=function(){var A=YAHOO.widget.Calendar._STYLES;this.Style={CSS_ROW_HEADER:A.CSS_ROW_HEADER,CSS_ROW_FOOTER:A.CSS_ROW_FOOTER,CSS_CELL:A.CSS_CELL,CSS_CELL_SELECTOR:A.CSS_CELL_SELECTOR,CSS_CELL_SELECTED:A.CSS_CELL_SELECTED,CSS_CELL_SELECTABLE:A.CSS_CELL_SELECTABLE,CSS_CELL_RESTRICTED:A.CSS_CELL_RESTRICTED,CSS_CELL_TODAY:A.CSS_CELL_TODAY,CSS_CELL_OOM:A.CSS_CELL_OOM,CSS_CELL_OOB:A.CSS_CELL_OOB,CSS_HEADER:A.CSS_HEADER,CSS_HEADER_TEXT:A.CSS_HEADER_TEXT,CSS_BODY:A.CSS_BODY,CSS_WEEKDAY_CELL:A.CSS_WEEKDAY_CELL,CSS_WEEKDAY_ROW:A.CSS_WEEKDAY_ROW,CSS_FOOTER:A.CSS_FOOTER,CSS_CALENDAR:A.CSS_CALENDAR,CSS_SINGLE:A.CSS_SINGLE,CSS_CONTAINER:A.CSS_CONTAINER,CSS_NAV_LEFT:A.CSS_NAV_LEFT,CSS_NAV_RIGHT:A.CSS_NAV_RIGHT,CSS_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};};YAHOO.widget.Calendar.prototype.buildMonthLabel=function(){var A=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key);var C=this.Locale.LOCALE_MONTHS[A.getMonth()]+this.Locale.MY_LABEL_MONTH_SUFFIX;var B=A.getFullYear()+this.Locale.MY_LABEL_YEAR_SUFFIX;if(this.Locale.MY_LABEL_MONTH_POSITION==2||this.Locale.MY_LABEL_YEAR_POSITION==1){return B+C;}else{return C+B;}};YAHOO.widget.Calendar.prototype.buildDayLabel=function(A){return A.getDate();};YAHOO.widget.Calendar.prototype.createTitleBar=function(A){var B=YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE,"div",this.oDomContainer)[0]||document.createElement("div");B.className=YAHOO.widget.CalendarGroup.CSS_2UPTITLE;B.innerHTML=A;this.oDomContainer.insertBefore(B,this.oDomContainer.firstChild);YAHOO.util.Dom.addClass(this.oDomContainer,"withtitle");return B;};YAHOO.widget.Calendar.prototype.removeTitleBar=function(){var A=YAHOO.util.Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE,"div",this.oDomContainer)[0]||null;if(A){YAHOO.util.Event.purgeElement(A);this.oDomContainer.removeChild(A);}YAHOO.util.Dom.removeClass(this.oDomContainer,"withtitle");};YAHOO.widget.Calendar.prototype.createCloseButton=function(){var D=YAHOO.util.Dom,A=YAHOO.util.Event,C=YAHOO.widget.CalendarGroup.CSS_2UPCLOSE,F="us/my/bn/x_d.gif";var E=D.getElementsByClassName("link-close","a",this.oDomContainer)[0];if(!E){E=document.createElement("a");A.addListener(E,"click",function(H,G){G.hide();A.preventDefault(H);},this);}E.href="#";E.className="link-close";if(YAHOO.widget.Calendar.IMG_ROOT!==null){var B=D.getElementsByClassName(C,"img",E)[0]||document.createElement("img");B.src=YAHOO.widget.Calendar.IMG_ROOT+F;B.className=C;E.appendChild(B);}else{E.innerHTML="<span class=\""+C+" "+this.Style.CSS_CLOSE+"\"></span>";}this.oDomContainer.appendChild(E);return E;};YAHOO.widget.Calendar.prototype.removeCloseButton=function(){var A=YAHOO.util.Dom.getElementsByClassName("link-close","a",this.oDomContainer)[0]||null;if(A){YAHOO.util.Event.purgeElement(A);this.oDomContainer.removeChild(A);}};YAHOO.widget.Calendar.prototype.renderHeader=function(E){var H=7;var F="us/tr/callt.gif";var G="us/tr/calrt.gif";var L=YAHOO.widget.Calendar._DEFAULT_CONFIG;if(this.cfg.getProperty(L.SHOW_WEEK_HEADER.key)){H+=1;}if(this.cfg.getProperty(L.SHOW_WEEK_FOOTER.key)){H+=1;}E[E.length]="<thead>";E[E.length]="<tr>";E[E.length]="<th colspan=\""+H+"\" class=\""+this.Style.CSS_HEADER_TEXT+"\">";E[E.length]="<div class=\""+this.Style.CSS_HEADER+"\">";var J,K=false;if(this.parent){if(this.index===0){J=true;}if(this.index==(this.parent.cfg.getProperty("pages")-1)){K=true;}}else{J=true;K=true;}var B=this.parent||this;if(J){var A=this.cfg.getProperty(L.NAV_ARROW_LEFT.key);if(A===null&&YAHOO.widget.Calendar.IMG_ROOT!==null){A=YAHOO.widget.Calendar.IMG_ROOT+F;}var C=(A===null)?"":" style=\"background-image:url("+A+")\"";E[E.length]="<a class=\""+this.Style.CSS_NAV_LEFT+"\""+C+" >&#160;</a>";}E[E.length]=this.buildMonthLabel();if(K){var D=this.cfg.getProperty(L.NAV_ARROW_RIGHT.key);if(D===null&&YAHOO.widget.Calendar.IMG_ROOT!==null){D=YAHOO.widget.Calendar.IMG_ROOT+G;}var I=(D===null)?"":" style=\"background-image:url("+D+")\"";E[E.length]="<a class=\""+this.Style.CSS_NAV_RIGHT+"\""+I+" >&#160;</a>";}E[E.length]="</div>\n</th>\n</tr>";if(this.cfg.getProperty(L.SHOW_WEEKDAYS.key)){E=this.buildWeekdays(E);}E[E.length]="</thead>";return E;};YAHOO.widget.Calendar.prototype.buildWeekdays=function(C){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;C[C.length]="<tr class=\""+this.Style.CSS_WEEKDAY_ROW+"\">";if(this.cfg.getProperty(A.SHOW_WEEK_HEADER.key)){C[C.length]="<th>&#160;</th>";}for(var B=0;B<this.Locale.LOCALE_WEEKDAYS.length;++B){C[C.length]="<th class=\"calweekdaycell\">"+this.Locale.LOCALE_WEEKDAYS[B]+"</th>";}if(this.cfg.getProperty(A.SHOW_WEEK_FOOTER.key)){C[C.length]="<th>&#160;</th>";}C[C.length]="</tr>";return C;};YAHOO.widget.Calendar.prototype.renderBody=function(c,a){var m=YAHOO.widget.Calendar._DEFAULT_CONFIG;var AC=this.cfg.getProperty(m.START_WEEKDAY.key);this.preMonthDays=c.getDay();if(AC>0){this.preMonthDays-=AC;}if(this.preMonthDays<0){this.preMonthDays+=7;}this.monthDays=YAHOO.widget.DateMath.findMonthEnd(c).getDate();this.postMonthDays=YAHOO.widget.Calendar.DISPLAY_DAYS-this.preMonthDays-this.monthDays;c=YAHOO.widget.DateMath.subtract(c,YAHOO.widget.DateMath.DAY,this.preMonthDays);var Q,H;var G="w";var W="_cell";var U="wd";var k="d";var I;var h;var O=this.today.getFullYear();var j=this.today.getMonth();var D=this.today.getDate();var q=this.cfg.getProperty(m.PAGEDATE.key);var C=this.cfg.getProperty(m.HIDE_BLANK_WEEKS.key);var Z=this.cfg.getProperty(m.SHOW_WEEK_FOOTER.key);var T=this.cfg.getProperty(m.SHOW_WEEK_HEADER.key);var M=this.cfg.getProperty(m.MINDATE.key);var S=this.cfg.getProperty(m.MAXDATE.key);if(M){M=YAHOO.widget.DateMath.clearTime(M);}if(S){S=YAHOO.widget.DateMath.clearTime(S);}a[a.length]="<tbody class=\"m"+(q.getMonth()+1)+" "+this.Style.CSS_BODY+"\">";var AA=0;var J=document.createElement("div");var b=document.createElement("td");J.appendChild(b);var z=new Date(q.getFullYear(),0,1);var o=this.parent||this;for(var u=0;u<6;u++){Q=YAHOO.widget.DateMath.getWeekNumber(c,q.getFullYear(),AC);H=G+Q;if(u!==0&&C===true&&c.getMonth()!=q.getMonth()){break;}else{a[a.length]="<tr class=\""+H+"\">";if(T){a=this.renderRowHeader(Q,a);}for(var AB=0;AB<7;AB++){I=[];h=null;this.clearElement(b);b.className=this.Style.CSS_CELL;b.id=this.id+W+AA;if(c.getDate()==D&&c.getMonth()==j&&c.getFullYear()==O){I[I.length]=o.renderCellStyleToday;}var R=[c.getFullYear(),c.getMonth()+1,c.getDate()];this.cellDates[this.cellDates.length]=R;if(c.getMonth()!=q.getMonth()){I[I.length]=o.renderCellNotThisMonth;}else{YAHOO.util.Dom.addClass(b,U+c.getDay());YAHOO.util.Dom.addClass(b,k+c.getDate());for(var t=0;t<this.renderStack.length;++t){var l=this.renderStack[t];var AD=l[0];var B;var V;var F;switch(AD){case YAHOO.widget.Calendar.DATE:B=l[1][1];V=l[1][2];F=l[1][0];if(c.getMonth()+1==B&&c.getDate()==V&&c.getFullYear()==F){h=l[2];this.renderStack.splice(t,1);}break;case YAHOO.widget.Calendar.MONTH_DAY:B=l[1][0];V=l[1][1];if(c.getMonth()+1==B&&c.getDate()==V){h=l[2];this.renderStack.splice(t,1);}break;case YAHOO.widget.Calendar.RANGE:var Y=l[1][0];var X=l[1][1];var e=Y[1];var L=Y[2];var P=Y[0];var y=new Date(P,e-1,L);var E=X[1];var g=X[2];var A=X[0];var w=new Date(A,E-1,g);if(c.getTime()>=y.getTime()&&c.getTime()<=w.getTime()){h=l[2];if(c.getTime()==w.getTime()){this.renderStack.splice(t,1);}}break;case YAHOO.widget.Calendar.WEEKDAY:var K=l[1][0];if(c.getDay()+1==K){h=l[2];}break;case YAHOO.widget.Calendar.MONTH:B=l[1][0];if(c.getMonth()+1==B){h=l[2];}break;}if(h){I[I.length]=h;}}}if(this._indexOfSelectedFieldArray(R)>-1){I[I.length]=o.renderCellStyleSelected;}if((M&&(c.getTime()<M.getTime()))||(S&&(c.getTime()>S.getTime()))){I[I.length]=o.renderOutOfBoundsDate;}else{I[I.length]=o.styleCellDefault;I[I.length]=o.renderCellDefault;}for(var n=0;n<I.length;++n){if(I[n].call(o,c,b)==YAHOO.widget.Calendar.STOP_RENDER){break;}}c.setTime(c.getTime()+YAHOO.widget.DateMath.ONE_DAY_MS);if(AA>=0&&AA<=6){YAHOO.util.Dom.addClass(b,this.Style.CSS_CELL_TOP);}if((AA%7)===0){YAHOO.util.Dom.addClass(b,this.Style.CSS_CELL_LEFT);}if(((AA+1)%7)===0){YAHOO.util.Dom.addClass(b,this.Style.CSS_CELL_RIGHT);}var f=this.postMonthDays;if(C&&f>=7){var N=Math.floor(f/7);for(var v=0;v<N;++v){f-=7;}}if(AA>=((this.preMonthDays+f+this.monthDays)-7)){YAHOO.util.Dom.addClass(b,this.Style.CSS_CELL_BOTTOM);}a[a.length]=J.innerHTML;AA++;}if(Z){a=this.renderRowFooter(Q,a);}a[a.length]="</tr>";}}a[a.length]="</tbody>";return a;};YAHOO.widget.Calendar.prototype.renderFooter=function(A){return A;};YAHOO.widget.Calendar.prototype.render=function(){this.beforeRenderEvent.fire();var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;var C=YAHOO.widget.DateMath.findMonthStart(this.cfg.getProperty(A.PAGEDATE.key));this.resetRenderers();this.cellDates.length=0;YAHOO.util.Event.purgeElement(this.oDomContainer,true);var B=[];B[B.length]="<table cellSpacing=\"0\" class=\""+this.Style.CSS_CALENDAR+" y"+C.getFullYear()+"\" id=\""+this.id+"\">";B=this.renderHeader(B);B=this.renderBody(C,B);B=this.renderFooter(B);B[B.length]="</table>";this.oDomContainer.innerHTML=B.join("\n");this.applyListeners();this.cells=this.oDomContainer.getElementsByTagName("td");this.cfg.refireEvent(A.TITLE.key);this.cfg.refireEvent(A.CLOSE.key);this.cfg.refireEvent(A.IFRAME.key);this.renderEvent.fire();};YAHOO.widget.Calendar.prototype.applyListeners=function(){var K=this.oDomContainer;var B=this.parent||this;var G="a";var D="mousedown";var H=YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_LEFT,G,K);var C=YAHOO.util.Dom.getElementsByClassName(this.Style.CSS_NAV_RIGHT,G,K);if(H&&H.length>0){this.linkLeft=H[0];YAHOO.util.Event.addListener(this.linkLeft,D,B.previousMonth,B,true);}if(C&&C.length>0){this.linkRight=C[0];YAHOO.util.Event.addListener(this.linkRight,D,B.nextMonth,B,true);}if(this.domEventMap){var E,A;for(var M in this.domEventMap){if(YAHOO.lang.hasOwnProperty(this.domEventMap,M)){var I=this.domEventMap[M];if(!(I instanceof Array)){I=[I];}for(var F=0;F<I.length;F++){var L=I[F];A=YAHOO.util.Dom.getElementsByClassName(M,L.tag,this.oDomContainer);for(var J=0;J<A.length;J++){E=A[J];YAHOO.util.Event.addListener(E,L.event,L.handler,L.scope,L.correct);}}}}}YAHOO.util.Event.addListener(this.oDomContainer,"click",this.doSelectCell,this);YAHOO.util.Event.addListener(this.oDomContainer,"mouseover",this.doCellMouseOver,this);YAHOO.util.Event.addListener(this.oDomContainer,"mouseout",this.doCellMouseOut,this);};YAHOO.widget.Calendar.prototype.getDateByCellId=function(B){var A=this.getDateFieldsByCellId(B);return new Date(A[0],A[1]-1,A[2]);};YAHOO.widget.Calendar.prototype.getDateFieldsByCellId=function(A){A=A.toLowerCase().split("_cell")[1];A=parseInt(A,10);return this.cellDates[A];};YAHOO.widget.Calendar.prototype.renderOutOfBoundsDate=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_OOB);A.innerHTML=B.getDate();return YAHOO.widget.Calendar.STOP_RENDER;};YAHOO.widget.Calendar.prototype.renderRowHeader=function(B,A){A[A.length]="<th class=\"calrowhead\">"+B+"</th>";return A;};YAHOO.widget.Calendar.prototype.renderRowFooter=function(B,A){A[A.length]="<th class=\"calrowfoot\">"+B+"</th>";return A;};YAHOO.widget.Calendar.prototype.renderCellDefault=function(B,A){A.innerHTML="<a href=\"#\" class=\""+this.Style.CSS_CELL_SELECTOR+"\">"+this.buildDayLabel(B)+"</a>";};YAHOO.widget.Calendar.prototype.styleCellDefault=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_SELECTABLE);};YAHOO.widget.Calendar.prototype.renderCellStyleHighlight1=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_HIGHLIGHT1);};YAHOO.widget.Calendar.prototype.renderCellStyleHighlight2=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_HIGHLIGHT2);};YAHOO.widget.Calendar.prototype.renderCellStyleHighlight3=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_HIGHLIGHT3);};YAHOO.widget.Calendar.prototype.renderCellStyleHighlight4=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_HIGHLIGHT4);};YAHOO.widget.Calendar.prototype.renderCellStyleToday=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_TODAY);};YAHOO.widget.Calendar.prototype.renderCellStyleSelected=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_SELECTED);};YAHOO.widget.Calendar.prototype.renderCellNotThisMonth=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_OOM);A.innerHTML=B.getDate();return YAHOO.widget.Calendar.STOP_RENDER;};YAHOO.widget.Calendar.prototype.renderBodyCellRestricted=function(B,A){YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL);YAHOO.util.Dom.addClass(A,this.Style.CSS_CELL_RESTRICTED);A.innerHTML=B.getDate();return YAHOO.widget.Calendar.STOP_RENDER;};YAHOO.widget.Calendar.prototype.addMonths=function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;this.cfg.setProperty(A,YAHOO.widget.DateMath.add(this.cfg.getProperty(A),YAHOO.widget.DateMath.MONTH,B));this.resetRenderers();this.changePageEvent.fire();};YAHOO.widget.Calendar.prototype.subtractMonths=function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;this.cfg.setProperty(A,YAHOO.widget.DateMath.subtract(this.cfg.getProperty(A),YAHOO.widget.DateMath.MONTH,B));this.resetRenderers();this.changePageEvent.fire();};YAHOO.widget.Calendar.prototype.addYears=function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;this.cfg.setProperty(A,YAHOO.widget.DateMath.add(this.cfg.getProperty(A),YAHOO.widget.DateMath.YEAR,B));this.resetRenderers();this.changePageEvent.fire();};YAHOO.widget.Calendar.prototype.subtractYears=function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;this.cfg.setProperty(A,YAHOO.widget.DateMath.subtract(this.cfg.getProperty(A),YAHOO.widget.DateMath.YEAR,B));this.resetRenderers();this.changePageEvent.fire();};YAHOO.widget.Calendar.prototype.nextMonth=function(){this.addMonths(1);};YAHOO.widget.Calendar.prototype.previousMonth=function(){this.subtractMonths(1);};YAHOO.widget.Calendar.prototype.nextYear=function(){this.addYears(1);};YAHOO.widget.Calendar.prototype.previousYear=function(){this.subtractYears(1);};YAHOO.widget.Calendar.prototype.reset=function(){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.cfg.resetProperty(A.SELECTED.key);this.cfg.resetProperty(A.PAGEDATE.key);this.resetEvent.fire();};YAHOO.widget.Calendar.prototype.clear=function(){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;this.cfg.setProperty(A.SELECTED.key,[]);this.cfg.setProperty(A.PAGEDATE.key,new Date(this.today.getTime()));this.clearEvent.fire();};YAHOO.widget.Calendar.prototype.select=function(C){var F=this._toFieldArray(C);var B=[];var E=[];var G=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;for(var A=0;A<F.length;++A){var D=F[A];if(!this.isDateOOB(this._toDate(D))){if(B.length===0){this.beforeSelectEvent.fire();E=this.cfg.getProperty(G);}B.push(D);if(this._indexOfSelectedFieldArray(D)==-1){E[E.length]=D;}}}if(B.length>0){if(this.parent){this.parent.cfg.setProperty(G,E);}else{this.cfg.setProperty(G,E);}this.selectEvent.fire(B);}return this.getSelectedDates();};YAHOO.widget.Calendar.prototype.selectCell=function(D){var B=this.cells[D];var H=this.cellDates[D];var G=this._toDate(H);var C=YAHOO.util.Dom.hasClass(B,this.Style.CSS_CELL_SELECTABLE);if(C){this.beforeSelectEvent.fire();var F=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;var E=this.cfg.getProperty(F);var A=H.concat();if(this._indexOfSelectedFieldArray(A)==-1){E[E.length]=A;}if(this.parent){this.parent.cfg.setProperty(F,E);}else{this.cfg.setProperty(F,E);}this.renderCellStyleSelected(G,B);this.selectEvent.fire([A]);this.doCellMouseOut.call(B,null,this);}return this.getSelectedDates();};YAHOO.widget.Calendar.prototype.deselect=function(E){var A=this._toFieldArray(E);var D=[];var G=[];var H=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;for(var B=0;B<A.length;++B){var F=A[B];if(!this.isDateOOB(this._toDate(F))){if(D.length===0){this.beforeDeselectEvent.fire();G=this.cfg.getProperty(H);}D.push(F);var C=this._indexOfSelectedFieldArray(F);if(C!=-1){G.splice(C,1);}}}if(D.length>0){if(this.parent){this.parent.cfg.setProperty(H,G);}else{this.cfg.setProperty(H,G);}this.deselectEvent.fire(D);}return this.getSelectedDates();};YAHOO.widget.Calendar.prototype.deselectCell=function(E){var H=this.cells[E];var B=this.cellDates[E];var F=this._indexOfSelectedFieldArray(B);var G=YAHOO.util.Dom.hasClass(H,this.Style.CSS_CELL_SELECTABLE);if(G){this.beforeDeselectEvent.fire();var I=YAHOO.widget.Calendar._DEFAULT_CONFIG;var D=this.cfg.getProperty(I.SELECTED.key);var C=this._toDate(B);var A=B.concat();if(F>-1){if(this.cfg.getProperty(I.PAGEDATE.key).getMonth()==C.getMonth()&&this.cfg.getProperty(I.PAGEDATE.key).getFullYear()==C.getFullYear()){YAHOO.util.Dom.removeClass(H,this.Style.CSS_CELL_SELECTED);}D.splice(F,1);}if(this.parent){this.parent.cfg.setProperty(I.SELECTED.key,D);}else{this.cfg.setProperty(I.SELECTED.key,D);}this.deselectEvent.fire(A);}return this.getSelectedDates();};YAHOO.widget.Calendar.prototype.deselectAll=function(){this.beforeDeselectEvent.fire();var D=YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key;var A=this.cfg.getProperty(D);var B=A.length;var C=A.concat();if(this.parent){this.parent.cfg.setProperty(D,[]);}else{this.cfg.setProperty(D,[]);}if(B>0){this.deselectEvent.fire(C);}return this.getSelectedDates();};YAHOO.widget.Calendar.prototype._toFieldArray=function(B){var A=[];if(B instanceof Date){A=[[B.getFullYear(),B.getMonth()+1,B.getDate()]];}else{if(YAHOO.lang.isString(B)){A=this._parseDates(B);}else{if(YAHOO.lang.isArray(B)){for(var C=0;C<B.length;++C){var D=B[C];A[A.length]=[D.getFullYear(),D.getMonth()+1,D.getDate()];}}}}return A;};YAHOO.widget.Calendar.prototype._toDate=function(A){if(A instanceof Date){return A;}else{return new Date(A[0],A[1]-1,A[2]);}};YAHOO.widget.Calendar.prototype._fieldArraysAreEqual=function(C,B){var A=false;if(C[0]==B[0]&&C[1]==B[1]&&C[2]==B[2]){A=true;}return A;};YAHOO.widget.Calendar.prototype._indexOfSelectedFieldArray=function(E){var D=-1;var A=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key);for(var C=0;C<A.length;++C){var B=A[C];if(E[0]==B[0]&&E[1]==B[1]&&E[2]==B[2]){D=C;break;}}return D;};YAHOO.widget.Calendar.prototype.isDateOOM=function(A){return(A.getMonth()!=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key).getMonth());};YAHOO.widget.Calendar.prototype.isDateOOB=function(D){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;var E=this.cfg.getProperty(A.MINDATE.key);var F=this.cfg.getProperty(A.MAXDATE.key);var C=YAHOO.widget.DateMath;if(E){E=C.clearTime(E);}if(F){F=C.clearTime(F);}var B=new Date(D.getTime());B=C.clearTime(B);return((E&&B.getTime()<E.getTime())||(F&&B.getTime()>F.getTime()));};YAHOO.widget.Calendar.prototype._parsePageDate=function(B){var E;var A=YAHOO.widget.Calendar._DEFAULT_CONFIG;if(B){if(B instanceof Date){E=YAHOO.widget.DateMath.findMonthStart(B);}else{var F,D,C;C=B.split(this.cfg.getProperty(A.DATE_FIELD_DELIMITER.key));F=parseInt(C[this.cfg.getProperty(A.MY_MONTH_POSITION.key)-1],10)-1;D=parseInt(C[this.cfg.getProperty(A.MY_YEAR_POSITION.key)-1],10);E=new Date(D,F,1);}}else{E=new Date(this.today.getFullYear(),this.today.getMonth(),1);}return E;};YAHOO.widget.Calendar.prototype.onBeforeSelect=function(){if(this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.MULTI_SELECT.key)===false){if(this.parent){this.parent.callChildFunction("clearAllBodyCellStyles",this.Style.CSS_CELL_SELECTED);this.parent.deselectAll();}else{this.clearAllBodyCellStyles(this.Style.CSS_CELL_SELECTED);this.deselectAll();}}};YAHOO.widget.Calendar.prototype.onSelect=function(A){};YAHOO.widget.Calendar.prototype.onBeforeDeselect=function(){};YAHOO.widget.Calendar.prototype.onDeselect=function(A){};YAHOO.widget.Calendar.prototype.onChangePage=function(){this.render();};YAHOO.widget.Calendar.prototype.onRender=function(){};YAHOO.widget.Calendar.prototype.onReset=function(){this.render();};YAHOO.widget.Calendar.prototype.onClear=function(){this.render();};YAHOO.widget.Calendar.prototype.validate=function(){return true;};YAHOO.widget.Calendar.prototype._parseDate=function(C){var D=C.split(this.Locale.DATE_FIELD_DELIMITER);var A;if(D.length==2){A=[D[this.Locale.MD_MONTH_POSITION-1],D[this.Locale.MD_DAY_POSITION-1]];A.type=YAHOO.widget.Calendar.MONTH_DAY;}else{A=[D[this.Locale.MDY_YEAR_POSITION-1],D[this.Locale.MDY_MONTH_POSITION-1],D[this.Locale.MDY_DAY_POSITION-1]];A.type=YAHOO.widget.Calendar.DATE;}for(var B=0;B<A.length;B++){A[B]=parseInt(A[B],10);}return A;};YAHOO.widget.Calendar.prototype._parseDates=function(B){var I=[];var H=B.split(this.Locale.DATE_DELIMITER);for(var G=0;G<H.length;++G){var F=H[G];if(F.indexOf(this.Locale.DATE_RANGE_DELIMITER)!=-1){var A=F.split(this.Locale.DATE_RANGE_DELIMITER);var E=this._parseDate(A[0]);var J=this._parseDate(A[1]);var D=this._parseRange(E,J);I=I.concat(D);}else{var C=this._parseDate(F);I.push(C);}}return I;};YAHOO.widget.Calendar.prototype._parseRange=function(A,F){var E=new Date(A[0],A[1]-1,A[2]);var B=YAHOO.widget.DateMath.add(new Date(A[0],A[1]-1,A[2]),YAHOO.widget.DateMath.DAY,1);var D=new Date(F[0],F[1]-1,F[2]);var C=[];C.push(A);while(B.getTime()<=D.getTime()){C.push([B.getFullYear(),B.getMonth()+1,B.getDate()]);B=YAHOO.widget.DateMath.add(B,YAHOO.widget.DateMath.DAY,1);}return C;};YAHOO.widget.Calendar.prototype.resetRenderers=function(){this.renderStack=this._renderStack.concat();};YAHOO.widget.Calendar.prototype.clearElement=function(A){A.innerHTML="&#160;";A.className="";};YAHOO.widget.Calendar.prototype.addRenderer=function(A,B){var D=this._parseDates(A);for(var C=0;C<D.length;++C){var E=D[C];if(E.length==2){if(E[0]instanceof Array){this._addRenderer(YAHOO.widget.Calendar.RANGE,E,B);}else{this._addRenderer(YAHOO.widget.Calendar.MONTH_DAY,E,B);}}else{if(E.length==3){this._addRenderer(YAHOO.widget.Calendar.DATE,E,B);}}}};YAHOO.widget.Calendar.prototype._addRenderer=function(B,C,A){var D=[B,C,A];this.renderStack.unshift(D);this._renderStack=this.renderStack.concat();};YAHOO.widget.Calendar.prototype.addMonthRenderer=function(B,A){this._addRenderer(YAHOO.widget.Calendar.MONTH,[B],A);};YAHOO.widget.Calendar.prototype.addWeekdayRenderer=function(B,A){this._addRenderer(YAHOO.widget.Calendar.WEEKDAY,[B],A);};YAHOO.widget.Calendar.prototype.clearAllBodyCellStyles=function(A){for(var B=0;B<this.cells.length;++B){YAHOO.util.Dom.removeClass(this.cells[B],A);}};YAHOO.widget.Calendar.prototype.setMonth=function(C){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;var B=this.cfg.getProperty(A);B.setMonth(parseInt(C,10));this.cfg.setProperty(A,B);};YAHOO.widget.Calendar.prototype.setYear=function(B){var A=YAHOO.widget.Calendar._DEFAULT_CONFIG.PAGEDATE.key;var C=this.cfg.getProperty(A);C.setFullYear(parseInt(B,10));this.cfg.setProperty(A,C);};YAHOO.widget.Calendar.prototype.getSelectedDates=function(){var C=[];var B=this.cfg.getProperty(YAHOO.widget.Calendar._DEFAULT_CONFIG.SELECTED.key);for(var E=0;E<B.length;++E){var D=B[E];var A=new Date(D[0],D[1]-1,D[2]);C.push(A);}C.sort(function(G,F){return G-F;});return C;};YAHOO.widget.Calendar.prototype.hide=function(){this.oDomContainer.style.display="none";};YAHOO.widget.Calendar.prototype.show=function(){this.oDomContainer.style.display="block";};YAHOO.widget.Calendar.prototype.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;}}}}}}();YAHOO.widget.Calendar.prototype.toString=function(){return"Calendar "+this.id;};YAHOO.widget.Calendar_Core=YAHOO.widget.Calendar;YAHOO.widget.Cal_Core=YAHOO.widget.Calendar;YAHOO.widget.CalendarGroup=function(C,A,B){if(arguments.length>0){this.init(C,A,B);}};YAHOO.widget.CalendarGroup.prototype.init=function(C,A,B){this.initEvents();this.initStyles();this.pages=[];this.id=C;this.containerId=A;this.oDomContainer=document.getElementById(A);YAHOO.util.Dom.addClass(this.oDomContainer,YAHOO.widget.CalendarGroup.CSS_CONTAINER);YAHOO.util.Dom.addClass(this.oDomContainer,YAHOO.widget.CalendarGroup.CSS_MULTI_UP);this.cfg=new YAHOO.util.Config(this);this.Options={};this.Locale={};this.setupConfig();if(B){this.cfg.applyConfig(B,true);}this.cfg.fireQueue();if(YAHOO.env.ua.opera){this.renderEvent.subscribe(this._fixWidth,this,true);}};YAHOO.widget.CalendarGroup.prototype.setupConfig=function(){var A=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG;this.cfg.addProperty(A.PAGES.key,{value:A.PAGES.value,validator:this.cfg.checkNumber,handler:this.configPages});this.cfg.addProperty(A.PAGEDATE.key,{value:new Date(),handler:this.configPageDate});this.cfg.addProperty(A.SELECTED.key,{value:[],handler:this.configSelected});this.cfg.addProperty(A.TITLE.key,{value:A.TITLE.value,handler:this.configTitle});this.cfg.addProperty(A.CLOSE.key,{value:A.CLOSE.value,handler:this.configClose});this.cfg.addProperty(A.IFRAME.key,{value:A.IFRAME.value,handler:this.configIframe,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.MINDATE.key,{value:A.MINDATE.value,handler:this.delegateConfig});this.cfg.addProperty(A.MAXDATE.key,{value:A.MAXDATE.value,handler:this.delegateConfig});this.cfg.addProperty(A.MULTI_SELECT.key,{value:A.MULTI_SELECT.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.START_WEEKDAY.key,{value:A.START_WEEKDAY.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.SHOW_WEEKDAYS.key,{value:A.SHOW_WEEKDAYS.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.SHOW_WEEK_HEADER.key,{value:A.SHOW_WEEK_HEADER.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.SHOW_WEEK_FOOTER.key,{value:A.SHOW_WEEK_FOOTER.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.HIDE_BLANK_WEEKS.key,{value:A.HIDE_BLANK_WEEKS.value,handler:this.delegateConfig,validator:this.cfg.checkBoolean});this.cfg.addProperty(A.NAV_ARROW_LEFT.key,{value:A.NAV_ARROW_LEFT.value,handler:this.delegateConfig});this.cfg.addProperty(A.NAV_ARROW_RIGHT.key,{value:A.NAV_ARROW_RIGHT.value,handler:this.delegateConfig});this.cfg.addProperty(A.MONTHS_SHORT.key,{value:A.MONTHS_SHORT.value,handler:this.delegateConfig});this.cfg.addProperty(A.MONTHS_LONG.key,{value:A.MONTHS_LONG.value,handler:this.delegateConfig});this.cfg.addProperty(A.WEEKDAYS_1CHAR.key,{value:A.WEEKDAYS_1CHAR.value,handler:this.delegateConfig});this.cfg.addProperty(A.WEEKDAYS_SHORT.key,{value:A.WEEKDAYS_SHORT.value,handler:this.delegateConfig});this.cfg.addProperty(A.WEEKDAYS_MEDIUM.key,{value:A.WEEKDAYS_MEDIUM.value,handler:this.delegateConfig});this.cfg.addProperty(A.WEEKDAYS_LONG.key,{value:A.WEEKDAYS_LONG.value,handler:this.delegateConfig});this.cfg.addProperty(A.LOCALE_MONTHS.key,{value:A.LOCALE_MONTHS.value,handler:this.delegateConfig});this.cfg.addProperty(A.LOCALE_WEEKDAYS.key,{value:A.LOCALE_WEEKDAYS.value,handler:this.delegateConfig});this.cfg.addProperty(A.DATE_DELIMITER.key,{value:A.DATE_DELIMITER.value,handler:this.delegateConfig});this.cfg.addProperty(A.DATE_FIELD_DELIMITER.key,{value:A.DATE_FIELD_DELIMITER.value,handler:this.delegateConfig});this.cfg.addProperty(A.DATE_RANGE_DELIMITER.key,{value:A.DATE_RANGE_DELIMITER.value,handler:this.delegateConfig});this.cfg.addProperty(A.MY_MONTH_POSITION.key,{value:A.MY_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_YEAR_POSITION.key,{value:A.MY_YEAR_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MD_MONTH_POSITION.key,{value:A.MD_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MD_DAY_POSITION.key,{value:A.MD_DAY_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_MONTH_POSITION.key,{value:A.MDY_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_DAY_POSITION.key,{value:A.MDY_DAY_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MDY_YEAR_POSITION.key,{value:A.MDY_YEAR_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_MONTH_POSITION.key,{value:A.MY_LABEL_MONTH_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_YEAR_POSITION.key,{value:A.MY_LABEL_YEAR_POSITION.value,handler:this.delegateConfig,validator:this.cfg.checkNumber});this.cfg.addProperty(A.MY_LABEL_MONTH_SUFFIX.key,{value:A.MY_LABEL_MONTH_SUFFIX.value,handler:this.delegateConfig});this.cfg.addProperty(A.MY_LABEL_YEAR_SUFFIX.key,{value:A.MY_LABEL_YEAR_SUFFIX.value,handler:this.delegateConfig});};YAHOO.widget.CalendarGroup.prototype.initEvents=function(){var C=this;var E="Event";var B=function(G,J,F){for(var I=0;I<C.pages.length;++I){var H=C.pages[I];H[this.type+E].subscribe(G,J,F);}};var A=function(F,I){for(var H=0;H<C.pages.length;++H){var G=C.pages[H];G[this.type+E].unsubscribe(F,I);}};var D=YAHOO.widget.Calendar._EVENT_TYPES;this.beforeSelectEvent=new YAHOO.util.CustomEvent(D.BEFORE_SELECT);this.beforeSelectEvent.subscribe=B;this.beforeSelectEvent.unsubscribe=A;this.selectEvent=new YAHOO.util.CustomEvent(D.SELECT);this.selectEvent.subscribe=B;this.selectEvent.unsubscribe=A;this.beforeDeselectEvent=new YAHOO.util.CustomEvent(D.BEFORE_DESELECT);this.beforeDeselectEvent.subscribe=B;this.beforeDeselectEvent.unsubscribe=A;this.deselectEvent=new YAHOO.util.CustomEvent(D.DESELECT);this.deselectEvent.subscribe=B;this.deselectEvent.unsubscribe=A;this.changePageEvent=new YAHOO.util.CustomEvent(D.CHANGE_PAGE);this.changePageEvent.subscribe=B;this.changePageEvent.unsubscribe=A;this.beforeRenderEvent=new YAHOO.util.CustomEvent(D.BEFORE_RENDER);this.beforeRenderEvent.subscribe=B;this.beforeRenderEvent.unsubscribe=A;this.renderEvent=new YAHOO.util.CustomEvent(D.RENDER);this.renderEvent.subscribe=B;this.renderEvent.unsubscribe=A;this.resetEvent=new YAHOO.util.CustomEvent(D.RESET);this.resetEvent.subscribe=B;this.resetEvent.unsubscribe=A;this.clearEvent=new YAHOO.util.CustomEvent(D.CLEAR);this.clearEvent.subscribe=B;this.clearEvent.unsubscribe=A;};YAHOO.widget.CalendarGroup.prototype.configPages=function(K,J,G){var E=J[0];var C=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;var O="_";var L="groupcal";var N="first-of-type";var D="last-of-type";for(var B=0;B<E;++B){var M=this.id+O+B;var I=this.containerId+O+B;var H=this.cfg.getConfig();H.close=false;H.title=false;var A=this.constructChild(M,I,H);var F=A.cfg.getProperty(C);this._setMonthOnDate(F,F.getMonth()+B);A.cfg.setProperty(C,F);YAHOO.util.Dom.removeClass(A.oDomContainer,this.Style.CSS_SINGLE);YAHOO.util.Dom.addClass(A.oDomContainer,L);if(B===0){YAHOO.util.Dom.addClass(A.oDomContainer,N);}if(B==(E-1)){YAHOO.util.Dom.addClass(A.oDomContainer,D);}A.parent=this;A.index=B;this.pages[this.pages.length]=A;}};YAHOO.widget.CalendarGroup.prototype.configPageDate=function(H,G,E){var C=G[0];var F;var D=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;for(var B=0;B<this.pages.length;++B){var A=this.pages[B];if(B===0){F=A._parsePageDate(C);A.cfg.setProperty(D,F);}else{var I=new Date(F);this._setMonthOnDate(I,I.getMonth()+B);A.cfg.setProperty(D,I);}}};YAHOO.widget.CalendarGroup.prototype.configSelected=function(C,A,E){var D=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.SELECTED.key;this.delegateConfig(C,A,E);var B=(this.pages.length>0)?this.pages[0].cfg.getProperty(D):[];this.cfg.setProperty(D,B,true);};YAHOO.widget.CalendarGroup.prototype.delegateConfig=function(B,A,E){var F=A[0];var D;for(var C=0;C<this.pages.length;C++){D=this.pages[C];D.cfg.setProperty(B,F);}};YAHOO.widget.CalendarGroup.prototype.setChildFunction=function(D,B){var A=this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES.key);for(var C=0;C<A;++C){this.pages[C][D]=B;}};YAHOO.widget.CalendarGroup.prototype.callChildFunction=function(F,B){var A=this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES.key);for(var E=0;E<A;++E){var D=this.pages[E];if(D[F]){var C=D[F];C.call(D,B);}}};YAHOO.widget.CalendarGroup.prototype.constructChild=function(D,B,C){var A=document.getElementById(B);if(!A){A=document.createElement("div");A.id=B;this.oDomContainer.appendChild(A);}return new YAHOO.widget.Calendar(D,B,C);};YAHOO.widget.CalendarGroup.prototype.setMonth=function(E){E=parseInt(E,10);var F;var B=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;for(var D=0;D<this.pages.length;++D){var C=this.pages[D];var A=C.cfg.getProperty(B);if(D===0){F=A.getFullYear();}else{A.setYear(F);}this._setMonthOnDate(A,E+D);C.cfg.setProperty(B,A);}};YAHOO.widget.CalendarGroup.prototype.setYear=function(C){var B=YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGEDATE.key;C=parseInt(C,10);for(var E=0;E<this.pages.length;++E){var D=this.pages[E];var A=D.cfg.getProperty(B);if((A.getMonth()+1)==1&&E>0){C+=1;}D.setYear(C);}};YAHOO.widget.CalendarGroup.prototype.render=function(){this.renderHeader();for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.render();}this.renderFooter();};YAHOO.widget.CalendarGroup.prototype.select=function(A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.select(A);}return this.getSelectedDates();};YAHOO.widget.CalendarGroup.prototype.selectCell=function(A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.selectCell(A);}return this.getSelectedDates();};YAHOO.widget.CalendarGroup.prototype.deselect=function(A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.deselect(A);}return this.getSelectedDates();};YAHOO.widget.CalendarGroup.prototype.deselectAll=function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.deselectAll();}return this.getSelectedDates();};YAHOO.widget.CalendarGroup.prototype.deselectCell=function(A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.deselectCell(A);}return this.getSelectedDates();};YAHOO.widget.CalendarGroup.prototype.reset=function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.reset();}};YAHOO.widget.CalendarGroup.prototype.clear=function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.clear();}};YAHOO.widget.CalendarGroup.prototype.nextMonth=function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.nextMonth();}};YAHOO.widget.CalendarGroup.prototype.previousMonth=function(){for(var B=this.pages.length-1;B>=0;--B){var A=this.pages[B];A.previousMonth();}};YAHOO.widget.CalendarGroup.prototype.nextYear=function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.nextYear();}};YAHOO.widget.CalendarGroup.prototype.previousYear=function(){for(var B=0;B<this.pages.length;++B){var A=this.pages[B];A.previousYear();}};YAHOO.widget.CalendarGroup.prototype.getSelectedDates=function(){var C=[];var B=this.cfg.getProperty(YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.SELECTED.key);for(var E=0;E<B.length;++E){var D=B[E];var A=new Date(D[0],D[1]-1,D[2]);C.push(A);}C.sort(function(G,F){return G-F;});return C;};YAHOO.widget.CalendarGroup.prototype.addRenderer=function(A,B){for(var D=0;D<this.pages.length;++D){var C=this.pages[D];C.addRenderer(A,B);}};YAHOO.widget.CalendarGroup.prototype.addMonthRenderer=function(D,A){for(var C=0;C<this.pages.length;++C){var B=this.pages[C];B.addMonthRenderer(D,A);}};YAHOO.widget.CalendarGroup.prototype.addWeekdayRenderer=function(B,A){for(var D=0;D<this.pages.length;++D){var C=this.pages[D];C.addWeekdayRenderer(B,A);}};YAHOO.widget.CalendarGroup.prototype.renderHeader=function(){};YAHOO.widget.CalendarGroup.prototype.renderFooter=function(){};YAHOO.widget.CalendarGroup.prototype.addMonths=function(A){this.callChildFunction("addMonths",A);};YAHOO.widget.CalendarGroup.prototype.subtractMonths=function(A){this.callChildFunction("subtractMonths",A);};YAHOO.widget.CalendarGroup.prototype.addYears=function(A){this.callChildFunction("addYears",A);};YAHOO.widget.CalendarGroup.prototype.subtractYears=function(A){this.callChildFunction("subtractYears",A);};YAHOO.widget.CalendarGroup.prototype.show=function(){this.oDomContainer.style.display="block";if(YAHOO.env.ua.opera){this._fixWidth();}};YAHOO.widget.CalendarGroup.prototype._setMonthOnDate=function(C,D){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420&&(D<0||D>11)){var B=YAHOO.widget.DateMath;var A=B.add(C,B.MONTH,D-C.getMonth());C.setTime(A.getTime());}else{C.setMonth(D);}};YAHOO.widget.CalendarGroup.prototype._fixWidth=function(){var B=this.oDomContainer.offsetWidth;var A=0;for(var D=0;D<this.pages.length;++D){var C=this.pages[D];A+=C.oDomContainer.offsetWidth;}if(A>0){this.oDomContainer.style.width=A+"px";}};YAHOO.widget.CalendarGroup.CSS_CONTAINER="yui-calcontainer";YAHOO.widget.CalendarGroup.CSS_MULTI_UP="multi";YAHOO.widget.CalendarGroup.CSS_2UPTITLE="title";YAHOO.widget.CalendarGroup.CSS_2UPCLOSE="close-icon";YAHOO.lang.augmentProto(YAHOO.widget.CalendarGroup,YAHOO.widget.Calendar,"buildDayLabel","buildMonthLabel","renderOutOfBoundsDate","renderRowHeader","renderRowFooter","renderCellDefault","styleCellDefault","renderCellStyleHighlight1","renderCellStyleHighlight2","renderCellStyleHighlight3","renderCellStyleHighlight4","renderCellStyleToday","renderCellStyleSelected","renderCellNotThisMonth","renderBodyCellRestricted","initStyles","configTitle","configClose","configIframe","createTitleBar","createCloseButton","removeTitleBar","removeCloseButton","hide","browser");YAHOO.widget.CalendarGroup._DEFAULT_CONFIG=YAHOO.widget.Calendar._DEFAULT_CONFIG;YAHOO.widget.CalendarGroup._DEFAULT_CONFIG.PAGES={key:"pages",value:2};YAHOO.widget.CalendarGroup.prototype.toString=function(){return"CalendarGroup "+this.id;};YAHOO.widget.CalGrp=YAHOO.widget.CalendarGroup;YAHOO.widget.Calendar2up=function(C,A,B){this.init(C,A,B);};YAHOO.extend(YAHOO.widget.Calendar2up,YAHOO.widget.CalendarGroup);YAHOO.widget.Cal2up=YAHOO.widget.Calendar2up;YAHOO.register("calendar",YAHOO.widget.Calendar,{version:"2.3.1",build:"541"});var Dom=YAHOO.util.Dom;var Event=YAHOO.util.Event;var DDM=YAHOO.util.DragDropMgr;YAHOO.namespace("dagblad");YAHOO.dagblad.carouselConfigurator={initCarousel:function(panelConfig){var targetObject=Dom.get("photoCarousel_"+panelConfig.id);if(targetObject){this.buildStructure(targetObject,panelConfig.id);var photoCarousel=new YAHOO.extension.Carousel(targetObject.id,{numVisible:3,animationSpeed:0.4,scrollInc:3,loadInitHandler:this.loadInitialItems,prevElement:"photoCarousel_"+panelConfig.id+"_prevArrow",nextElement:"photoCarousel_"+panelConfig.id+"_nextArrow",loadNextHandler:this.loadNextItems,loadPrevHandler:this.loadPrevItems,prevButtonStateHandler:this.handlePrevButtonState,nextButtonStateHandler:this.handleNextButtonState});}},buildStructure:function(targetObject,id){var carouselClipRegion=document.createElement("div");Dom.addClass(carouselClipRegion,"carousel-clip-region");targetObject.appendChild(carouselClipRegion);var carouselItemList=document.createElement("ul");Dom.addClass(carouselItemList,"carousel-list");Dom.addClass(carouselItemList,"carousel-horizontal");carouselClipRegion.appendChild(carouselItemList);var carouselControls=document.createElement("div");carouselControls.setAttribute("id","photoCarousel_"+id+"_controls");Dom.addClass(carouselControls,"carouselControls");Dom.addClass(carouselControls,"clearFix");targetObject.parentNode.parentNode.appendChild(carouselControls);var nextPageObject=document.createElement("div");Dom.addClass(nextPageObject,"arrowContainer");carouselControls.appendChild(nextPageObject);var nextPageImage=document.createElement("img");Dom.addClass(nextPageImage,"nextArrow");nextPageImage.setAttribute("id","photoCarousel_"+id+"_nextArrow");nextPageImage.setAttribute("alt","Volgende");nextPageImage.setAttribute("src",templateUrl+"gfx/btn_next.gif");nextPageObject.appendChild(nextPageImage);var prevPageObject=document.createElement("div");Dom.addClass(prevPageObject,"arrowContainer");carouselControls.appendChild(prevPageObject);var prevPageImage=document.createElement("img");Dom.addClass(prevPageImage,"prevArrow");prevPageImage.setAttribute("id","photoCarousel_"+id+"_prevArrow");prevPageImage.setAttribute("alt","Volgende");prevPageImage.setAttribute("src",templateUrl+"gfx/btn_prev.gif");prevPageObject.appendChild(prevPageImage);},loadInitialItems:function(type,args){var start=args[0];var last=args[1];var currentPage=1;YAHOO.dagblad.carouselConfigurator.makeRequest(this,templateUrl+'component/panel/panelData.jsp',"12",start,(last-start+1)*2,currentPage);},loadNextItems:function(type,args){var start=args[0];var last=args[1];var currentPage=Math.ceil(last/parseInt(this.cfg.config.numvisible.value));var alreadyCached=args[2];var carouselObjectId=this._carouselElemID.split("_")[1];YAHOO.dagblad.carouselConfigurator.showPaginationPage(currentPage,"photoCarousel_"+carouselObjectId+"_pagination");if(!alreadyCached){YAHOO.dagblad.carouselConfigurator.makeRequest(this,templateUrl+'component/panel/panelData.jsp',"12",start,(last-start+1)*2,currentPage);}},loadPrevItems:function(type,args){var start=args[0];var last=args[1];var currentPage=Math.ceil(last/parseInt(this.cfg.config.numvisible.value));var alreadyCached=args[2];var carouselObjectId=this._carouselElemID.split("_")[1];YAHOO.dagblad.carouselConfigurator.showPaginationPage(currentPage,"photoCarousel_"+carouselObjectId+"_pagination");if(!alreadyCached){YAHOO.dagblad.carouselConfigurator.makeRequest(this,templateUrl+'component/panel/panelData.jsp',"12",start,(last-start+1)*2,currentPage);}},handlePrevButtonState:function(type,args){var enabling=args[0];var leftImage=args[1];if(enabling){leftImage.src=templateUrl+"gfx/btn_prev.gif";}else{leftImage.src=templateUrl+"gfx/btn_prev_disabled.gif";}},handleNextButtonState:function(type,args){var enabling=args[0];var rightImage=args[1];if(enabling){rightImage.src=templateUrl+"gfx/btn_next.gif";}else{rightImage.src=templateUrl+"gfx/btn_next_disabled.gif";}},handleSuccess:function(callbackResponse){var start=callbackResponse.argument[0];var numResults=callbackResponse.argument[1];var carousel=callbackResponse.argument[2];if(callbackResponse.responseXML!==undefined){var pictorials=callbackResponse.responseXML.getElementsByTagName("article");var firstNode=0;var nextNode=1;for(var i=0;i<parseInt(pictorials.length/2);i++){if(pictorials[firstNode]){var result={thumbUrl:pictorials[firstNode].getElementsByTagName("articleCarouselPictureUrl")[0].firstChild.nodeValue,title:pictorials[firstNode].getElementsByTagName("articleTitle")[0].firstChild.nodeValue,description:pictorials[firstNode].getElementsByTagName("articleTitle")[0].firstChild.nodeValue,articleUrl:pictorials[firstNode].getElementsByTagName("articleUrl")[0].firstChild.nodeValue};}
if(pictorials[nextNode]){var result2={thumbUrl:pictorials[nextNode].getElementsByTagName("articleCarouselPictureUrl")[0].firstChild.nodeValue,title:pictorials[nextNode].getElementsByTagName("articleTitle")[0].firstChild.nodeValue,description:pictorials[nextNode].getElementsByTagName("articleTitle")[0].firstChild.nodeValue,articleUrl:pictorials[nextNode].getElementsByTagName("articleUrl")[0].firstChild.nodeValue};}
if(!result2){carousel.addItem(start+i,YAHOO.dagblad.carouselConfigurator.createCarouselItem(result));}
else{carousel.addItem(start+i,YAHOO.dagblad.carouselConfigurator.createCarouselItem(result)+YAHOO.dagblad.carouselConfigurator.createCarouselItem(result2));}
firstNode=nextNode+1;nextNode=firstNode+1;}
var controlId=carousel._carouselElemID;if(pictorials.length<=1){var carouselContainer=Dom.get(controlId).parentNode.parentNode;Dom.addClass(carouselContainer,"noItems");carouselContainer.innerHTML="Geen foto's beschikbaar";}
var paginateObject=Dom.get(controlId+"_pagination");if(!paginateObject&&pictorials.length>=2){var totalItems=callbackResponse.responseXML.getElementsByTagName("articles")[0].getAttribute("totalItems");var currentPage=callbackResponse.responseXML.getElementsByTagName("articles")[0].getAttribute("pageNr");var totalPages=Math.ceil(totalItems/numResults);var parentObject=Dom.get(controlId+"_controls");var paginateObject=document.createElement("div");paginateObject.setAttribute("id",controlId+"_pagination");Dom.addClass(paginateObject,"carouselPagination");parentObject.appendChild(paginateObject);var pageUl=document.createElement("ul");for(var i=1;i<=totalPages;i++){var pageLi=document.createElement("li");if(i==1){Dom.addClass(pageLi,"currentPage");}
var pageLiLink=document.createElement("a");var pageLiText=document.createTextNode(i);pageLiLink.appendChild(pageLiText);pageLi.appendChild(pageLiLink);pageUl.appendChild(pageLi);}
paginateObject.appendChild(pageUl);this.argument[2].setProperty("size",Math.ceil(totalItems/2),true);}}},showPaginationPage:function(currentPage,id){var paginateObject=Dom.get(id);var pageList=paginateObject.childNodes[0];var pageItems=pageList.getElementsByTagName("li");for(var i=0;i<pageItems.length;i++){if(i+1!=currentPage){Dom.removeClass(pageItems[i],"currentPage");}else{Dom.addClass(pageItems[i],"currentPage");}}},createCarouselItem:function(result){var tripInnerHTML='<div class="thumbHolder"><a href="'+result.articleUrl+'" style="background:url('+result.thumbUrl+') no-repeat;" title="Bekijk artikel"></a></div>';return tripInnerHTML;},handleFailure:function(o){var result=o.status+" "+o.statusText;},makeRequest:function(carousel,url,catId,start,numResults,page){var carouselObjectId=carousel._carouselElemID.split("_")[1];var panelDataArray=Dom.get("editPanel_"+carouselObjectId).rel.split(";");var carouselMainCategory=panelDataArray[4];var carouselTotalItems=panelDataArray[5];var carouselSubCategories=panelDataArray[3];var params='?menu='+carouselMainCategory+'&subCats='+carouselSubCategories+'&reqImg=1&numItems='+carouselTotalItems+'&pageNr='+page;var callback={success:YAHOO.dagblad.carouselConfigurator.handleSuccess,failure:YAHOO.dagblad.carouselConfigurator.handleFailure,argument:[start,numResults,carousel]};var sUrl=url+params;YAHOO.util.Connect.asyncRequest("GET",sUrl,callback,null);},trunc:function(str,maxLen,maxWordLen){str=str.replace("<b>","");str=str.replace("<\/b>","");str=str.replace("<B>","");str=str.replace("<\/B>","");if(str.length>maxLen){str=str.substring(0,maxLen)+"...";}
var start=0;var loopCnt=0;var strSlice=str;do{var spaceBreak=strSlice.indexOf(' ');var lenOfWord=spaceBreak;if(lenOfWord==-1){lenOfWord=strSlice.length;}
if(lenOfWord>maxWordLen){str=str.substring(0,maxWordLen);}
start=spaceBreak+1;strSlice=strSlice.substring(start);spaceBreak=strSlice.indexOf(' ');}while(spaceBreak!=-1)
return str;}};YAHOO.dagblad.notificationHandler={disableDefaultBehaviour:function(e){Event.preventDefault(e);},init:function(){},notify:function(message,type){if(!Dom.get("notifyPanel")){this.notifyPanel=new YAHOO.widget.Panel("notifyPanel",{width:"320px",modal:true,visible:true,draggable:false,close:true,fixedcenter:true,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.5}});this.notifyPanel.setHeader(type);this.notifyPanel.setBody(message);this.notifyPanel.render(document.body);var timedClearing=function(dialog){var tC=window.setTimeout(function(){dialog.destroy()},50);}
this.notifyPanel.hideEvent.subscribe(function(){timedClearing(this)});}},panelNotify:function(notifySettings){if(notifySettings.targetObj){if(Dom.get(notifySettings.notifyId)){notifySettings.targetObj.removeChild(Dom.get(notifySettings.notifyId));}
var notifyObj=document.createElement("div");Dom.addClass(notifyObj,notifySettings.notifyClass);notifyObj.setAttribute("id",notifySettings.notifyId);var closeNotifyBox=function(){notifySettings.targetObj.removeChild(Dom.get(this.rel));if(notifySettings.cookie){createCookie('panelNotifyViewed','panelTabHelp',356);}}
var closeButton=document.createElement("a");closeButton.setAttribute("href","#");closeButton.setAttribute("rel",notifySettings.notifyId);closeButton.setAttribute("title","Sluiten");Dom.addClass(closeButton,"panelNotifyClose");notifyObj.appendChild(closeButton);Event.addListener(closeButton,"click",this.disableDefaultBehaviour);Event.addListener(closeButton,"click",closeNotifyBox);var notifyText=document.createElement("p");notifyObj.appendChild(notifyText);var notifyTextObj=document.createTextNode("");notifyText.appendChild(notifyTextObj);notifyText.innerHTML=notifySettings.message;notifySettings.targetObj.insertBefore(notifyObj,notifySettings.targetObj.firstChild);}}}
YAHOO.dagblad.fontChanger={disableAnchor:function(e){Event.preventDefault(e);},init:function(){var fontChangeControls=Dom.getElementsByClassName("fontChange","a","fontChange");for(var i=0;i<fontChangeControls.length;i++){Event.addListener(fontChangeControls[i],"click",this.disableAnchor);Event.addListener(fontChangeControls[i],"click",this.changeFont,fontChangeControls[i].rel);}
if(readCookie('dagblad.fontsize')!=null){Dom.setStyle("container","font-size",readCookie('dagblad.fontsize'));}},changeFont:function(e,perc){Dom.setStyle("container","font-size",perc);createCookie('dagblad.fontsize',perc,356);}};YAHOO.dagblad.siteSearch={init:function(inputField){var searchField=Dom.get(inputField);if(searchField){searchField.value="Typ een zoekterm";var initField=function(){if(searchField.value=="Typ een zoekterm"){searchField.value="";}}
var initFieldBlur=function(){if(searchField.value==""){searchField.value="Typ een zoekterm";}}
Event.addListener(searchField,"click",initField);Event.addListener(searchField,"blur",initFieldBlur);}}}
var initEditablePanels=function(){var disableDefaultBehaviour=function(e){Event.preventDefault(e);}
var editablePanels=Dom.getElementsByClassName("editablePanel","div","container");var toggleEditControlsOn=function(e,parentObj){var editObject=Dom.getElementsByClassName("editPanel","span",parentObj);if(editObject[0]){editObject[0].style.display="block";}}
var toggleEditControlsOff=function(e,parentObj){var editObject=Dom.getElementsByClassName("editPanel","span",parentObj);if(editObject[0]){editObject[0].style.display="none";}}
for(var i=0;i<editablePanels.length;i++){Event.removeListener(editablePanels[i],"mouseover",toggleEditControlsOn);Event.removeListener(editablePanels[i],"mouseout",toggleEditControlsOff);var panelConfigObj=Dom.get("editPanel_"+editablePanels[i].id.split("_")[1]);if(panelConfigObj&&panelConfigObj.rel&&panelConfigObj.rel.split(";").length==10){Event.addListener(editablePanels[i],"mouseover",toggleEditControlsOn,editablePanels[i]);Event.addListener(editablePanels[i],"mouseout",toggleEditControlsOff,editablePanels[i]);}}
var editPanelLinks=Dom.getElementsByClassName("editUserPanel","a","leftColumn");for(var i=0;i<editPanelLinks.length;i++){Event.removeListener(editPanelLinks[i],"click",disableDefaultBehaviour);Event.removeListener(editPanelLinks[i],"click",YAHOO.dagblad.userPanelHandler.editStaticPanel);if(editPanelLinks[i].rel&&editPanelLinks[i].rel.split(";").length==10){Event.addListener(editPanelLinks[i],"click",disableDefaultBehaviour);Event.addListener(editPanelLinks[i],"click",YAHOO.dagblad.userPanelHandler.editStaticPanel,null);}}}
YAHOO.dagblad.toggle={init:function(toggleElements){var toToggle=toggleElements.split(",");for(var i=0;i<toToggle.length;i++){Event.addListener(toToggle[i],"click",function(e){Event.preventDefault(e)});Event.addListener(toToggle[i],"click",this.toggleElement);}},toggleElement:function(e,controlNode){if(this.rel){controlNode=this;}
if(typeof(controlNode)=="string"){controlNode=Dom.get(controlNode);}
var refEl=Dom.get(controlNode.rel);if(controlNode&&refEl){var mainControlNode=Dom.get(refEl.getAttribute("rel"));if(Dom.getStyle(refEl,"display")=="block"){Dom.setStyle(refEl,"display","none");Dom.removeClass(mainControlNode,"selected");}
else{Dom.setStyle(refEl,"display","block");Dom.addClass(mainControlNode,"selected");}}
return false;}}
YAHOO.dagblad.mainTab;var initYuiTabs=function(){var panelCheck=function(e){if(Dom.hasClass("homeTab","selected")){if(!Dom.hasClass("homeTab","article")){Dom.removeClass(Dom.get("addNewPanel"),"disabled");}
Dom.removeClass(Dom.get("defaultView"),"disabled");}
else{if(Dom.hasClass("homeTab","article")){Dom.addClass(Dom.get("addNewPanel"),"disabled");}
Dom.addClass(Dom.get("defaultView"),"disabled");}}
var customTabChange=function(e){var selectedTab=Dom.get(e.newValue.get('id'));var selectedTabLink=selectedTab.getElementsByTagName("a")[0];if(!Dom.hasClass("selected",selectedTab)&&selectedTabLink.rel!="newTab"){self.location.href=selectedTabLink.href;return false;}}
var tabsets=Dom.getElementsByClassName("yui-navset","div","container");if(tabsets){var allTabs=new Array();for(var i=0;i<tabsets.length;i++){allTabs[i]=new YAHOO.widget.TabView(tabsets[i]);if(tabsets[i].id=="contentFrame"){allTabs[i].addListener("beforeActiveTabChange",customTabChange);allTabs[i].removeListener("activeTabChange",panelCheck);allTabs[i].addListener("activeTabChange",panelCheck);YAHOO.dagblad.mainTab=allTabs[i];}}}
var mainTabs=Dom.get("mainTabs");if(mainTabs){YAHOO.dagblad.userTabHandler.init();YAHOO.dagblad.userPanelHandler.init();if(Dom.hasClass(mainTabs,"article")&&Dom.hasClass("homeTab","selected")){Dom.addClass(Dom.get("addNewPanel"),"disabled");}}}
YAHOO.dagblad.articlePictorial={disableDefaultBehaviour:function(e){Event.preventDefault(e);},init:function(){var articlePictorial=Dom.get("articlePictorial");var additionalPictures=Dom.get("additionalPictures");if(articlePictorial&&additionalPictures){var pictureLinks=additionalPictures.getElementsByTagName("a");for(var i=0;i<pictureLinks.length;i++){Event.addListener(pictureLinks[i],"click",YAHOO.dagblad.articlePictorial.disableDefaultBehaviour);Event.addListener(pictureLinks[i],"click",YAHOO.dagblad.articlePictorial.showPicture);}}
else{return false;}},showPicture:function(){var previousPicture=Dom.getElementsByClassName("selected","li","additionalPictures")[0];if(previousPicture){Dom.removeClass(previousPicture,"selected");}
Dom.addClass(this.parentNode,"selected");var pictureItems=Dom.get("additionalPictures").getElementsByTagName("li");var cellCounter=1;var maxRows=3;for(var i=0;i<pictureItems.length;i++){if(cellCounter==maxRows){Dom.addClass(pictureItems[i],"lastColumn");cellCounter=1;}
else{Dom.removeClass(pictureItems[i],"lastColumn");cellCounter++;}}
var fullPictureObject=Dom.get("fullPictureObject");var fullPictureObjectLink=Dom.get("fullPictureObjectLink");if(fullPictureObject&&fullPictureObjectLink){fullPictureObject.setAttribute("src",this.rel);fullPictureObject.setAttribute("alt",this.title);var imageIndex=this.id.replace(/(.*)(_{1})(\d+)/g,"$3");fullPictureObjectLink.setAttribute("onclick","return GB_showImageSet(imageCollection, '"+imageIndex+"')");fullPictureObjectLink.getAttribute("onclick");fullPictureObjectLink.parentNode.innerHTML=fullPictureObjectLink.parentNode.innerHTML;}else{return false;}}}
YAHOO.dagblad.slideshow={slideshowAutoStart:false,slideshowPreload:false,slideshowSpeed:2000,slideshowRootNode:null,slideshowListItems:null,slideshowFrames:null,slideshowFrameContainerId:null,slideshowIsAnimating:false,slideshowFadeInObject:null,slideshowFadeOutObject:null,slideshowShowDescription:false,isActve:null,isNext:null,disableDefaultBehaviour:function(e){Event.preventDefault(e);},init:function(slideshowProperties){this.slideshowAutoStart=slideshowProperties.autoStart;this.slideshowPreload=slideshowProperties.preloadImages;this.slideshowSpeed=slideshowProperties.slideSpeed;this.slideshowRootNode=document.getElementById(slideshowProperties.rootId);this.slideshowFrameContainerId=slideshowProperties.frameContainer;this.slideshowShowDescription=slideshowProperties.slideshowShowDescription;if(this.slideshowRootNode){var slideshowList=this.slideshowRootNode.getElementsByTagName("ul")[0];this.slideshowListItems=slideshowList.getElementsByTagName("li");this.slideshowFrames=Dom.getElementsByClassName("frame","li",slideshowList);this.isActive=this.getCurrent();this.isNext=this.getNext();this.buildContainer();this.slideshowFadeInObject=Dom.get("slide2");this.slideshowFadeOutObject=Dom.get("slide1");this.initPagination();if(this.slideshowAutoStart){this.slideshowIsAnimating=true;this.startTimer();}
if(this.slideshowPreload){this.preloadImages();}}},initPagination:function(){for(var i=0;i<this.slideshowListItems.length;i++){var controlNode=this.slideshowListItems[i].getElementsByTagName("a")[0];Event.addListener(controlNode,"click",this.disableDefaultBehaviour);switch(true){case Dom.hasClass(this.slideshowListItems[i],"navPrev"):var slideTarget=-1;break;case Dom.hasClass(this.slideshowListItems[i],"navNext"):var slideTarget=1;break;default:var slideTarget=0;break;}
Event.addListener(controlNode,"click",this.slideTo,{slidePosition:slideTarget,slideshowObject:this});}},slideTo:function(e,slideProperties,refObj){var slideshowObject=slideProperties.slideshowObject;slideshowObject.slideshowAutoStart=false;if(!refObj){refObj=this;}
if(slideshowObject.slideshowIsAnimating){var timedAnim=window.setTimeout(function(){slideshowObject.slideTo(null,slideProperties,refObj);},1000);return false;}
if(slideProperties.slidePosition==1){slideshowObject.isNext=slideshowObject.getNext();}
else if(slideProperties.slidePosition==-1){slideshowObject.isNext=slideshowObject.getPrevious();}
else{slideshowObject.isNext=slideshowObject.getSelected(refObj);}
slideshowObject.slideshowFadeInObject.src=slideshowObject.slideshowFrames[slideshowObject.isNext].getElementsByTagName("a")[0].getAttribute("href");slideshowObject.startAnimate(slideshowObject);},getCurrent:function(){if(this.slideshowFrames.length>0){for(var i=0;i<this.slideshowFrames.length;i++){if(Dom.hasClass(this.slideshowFrames[i],"isActive")){return i;}}}},getSelected:function(refObject){Dom.removeClass(this.slideshowFrames[this.isActive],"isActive");Dom.addClass(refObject.parentNode,"isActive");return this.getCurrent();},getNext:function(){if(this.isActive==this.slideshowFrames.length-1){return 0;}else{return this.isActive+1;}},getPrevious:function(){if(this.isActive==0){return this.slideshowFrames.length-1;}else{return this.isActive-1;}},buildContainer:function(){if(!document.getElementById(this.slideshowFrameContainerId)){var frameContainer=document.createElement("div");frameContainer.id=this.slideshowFrameContainerId;var imgA=document.createElement("img");var imgB=document.createElement("img");imgA.setAttribute("src",this.slideshowFrames[this.isActive].getElementsByTagName("a")[0].getAttribute("href"));imgB.setAttribute("src",this.slideshowFrames[this.isNext].getElementsByTagName("a")[0].getAttribute("href"));Dom.addClass(imgA,"slide1");Dom.addClass(imgB,"slide2");imgA.id="slide1";imgB.id="slide2";frameContainer.appendChild(imgA);frameContainer.appendChild(imgB);this.slideshowRootNode.appendChild(frameContainer);}
if(this.slideshowShowDescription===true){var descDiv=document.createElement("div");descDiv.id="descDiv";Dom.setStyle(descDiv,"visibility","hidden");var descText=this.slideshowFrames[this.isActive].getElementsByTagName("a")[0].getAttribute("title");descDiv.innerHTML=descText;this.slideshowRootNode.appendChild(descDiv);var setHeightTimer=setTimeout(function(){YAHOO.dagblad.slideshow.setContainerHeight();},500);}},setContainerHeight:function(){var startHeight="";var activeSlide=Dom.getElementsByClassName("slide1","img",this.slideshowFrameContainerId)[0];startHeight=Dom.getRegion(activeSlide).bottom-Dom.getRegion(activeSlide).top;Dom.setStyle(this.slideshowFrameContainerId,"height",startHeight+"px");Dom.setStyle("descDiv","visibility","visible");},startTimer:function(){var slideShowObject=this;var animationTimer=window.setTimeout(function(){slideShowObject.startAnimate(slideShowObject);},this.slideshowSpeed);},startAnimate:function(slideShowObject){if(slideShowObject.slideshowShowDescription===true){Dom.setStyle("descDiv","visibility","hidden");}
fadeOutAnimation=new YAHOO.util.Anim(slideShowObject.slideshowFadeOutObject,{opacity:{to:0}});fadeOutAnimation.animate();slideShowObject.slideshowIsAnimating=true;fadeInAnimation=new YAHOO.util.Anim(slideShowObject.slideshowFadeInObject,{opacity:{to:.999}});fadeInEnd=function(){if(slideShowObject.slideshowShowDescription===true){if(!document.getElementById("descDiv")){var descDiv=document.createElement("div");descDiv.id="descDiv";}else{var descDiv=document.getElementById("descDiv");}
var descText=slideShowObject.slideshowFrames[slideShowObject.isNext].getElementsByTagName("a")[0].getAttribute("title");descDiv.innerHTML=descText;slideShowObject.slideshowRootNode.appendChild(descDiv);}
Dom.removeClass(slideShowObject.slideshowFrames[slideShowObject.isActive],"isActive");Dom.addClass(slideShowObject.slideshowFrames[slideShowObject.isNext],"isActive");slideShowObject.slideshowFadeOutObject.src=slideShowObject.slideshowFrames[slideShowObject.isActive].getElementsByTagName("a")[0].getAttribute("href");slideShowObject.isActive=slideShowObject.isNext;Dom.replaceClass(slideShowObject.slideshowFadeInObject,"slide2","slide1");Dom.replaceClass(slideShowObject.slideshowFadeOutObject,"slide1","slide2");slideShowObject.slideshowFadeInObject=Dom.getElementsByClassName("slide2","img",slideShowObject.slideshowRootNode)[0];slideShowObject.slideshowFadeOutObject=Dom.getElementsByClassName("slide1","img",slideShowObject.slidsShowRootNode)[0];slideShowObject.slideshowFadeInObject.removeAttribute("style");slideShowObject.slideshowFadeOutObject.removeAttribute("style");slideShowObject.slideshowIsAnimating=false;if(slideShowObject.slideshowAutoStart){slideShowObject.isNext=slideShowObject.getNext();slideShowObject.slideshowFadeInObject.src=slideShowObject.slideshowFrames[isNext].childNodes[0].getAttribute("href");slideShowObject.startTimer();}
if(slideShowObject.slideshowShowDescription===true){slideShowObject.setContainerHeight();}}
fadeInAnimation.onComplete.subscribe(fadeInEnd);fadeInAnimation.animate();},preloadImages:function(){for(var i=2;i<slideshowFrames.length;i++){var preLoadImage=document.createElement("img");preLoadImage.src=this.slideshowFrames[i].firstChild.getAttribute("href");}},traceState:function(){console.debug("isActive: "+this.isActive);console.debug("isNext: "+this.isNext);console.debug("---------------------------");}};YAHOO.dagblad.tooltip={init:function(){var tooltipElements=Dom.getElementsByClassName("tooltip","a");for(var i=0;i<tooltipElements.length;i++){this.add(tooltipElements[i]);}},add:function(tooltipNode){var tooltip=new YAHOO.widget.Tooltip("tooltip_"+randomString(6),{context:tooltipNode});}}
YAHOO.dagblad.panelCarousels={init:function(panelCarousels){for(var i=0;i<panelCarousels.length;i++){var panelId=panelCarousels[i].id.split("_")[1];var panelConfig=Dom.get("editPanel_"+panelId).rel;if(panelConfig){if(panelConfig.split(";")[4]==4){var carouselObj=Dom.get("photoCarousel_"+panelId);if(carouselObj){carouselObj.innerHTML='';}
var carouselControls=Dom.get("photoCarousel_"+panelId+"_controls");if(carouselControls){carouselControls.parentNode.removeChild(carouselControls);}
YAHOO.dagblad.carouselConfigurator.initCarousel({id:panelId});}}}}}
function addToFavorites(title,url){if(window.sidebar){alert("Gebruik CTRL-D om een bookmark van deze pagina te maken");}else if(window.opera&&window.print){var elem=document.createElement('a');elem.setAttribute('href',url);elem.setAttribute('title',title);elem.setAttribute('rel','sidebar');elem.click();}else if(document.all){window.external.AddFavorite(url,title);}else{alert("not supported by browser");}}
function sendToFriend(title,url){var subject=encodeURIComponent("Artikel: "+title+" - "+publicationName);var body=encodeURIComponent("Op de website van "+publicationName+" kwam ik het volgende artikel tegen: \n\n"+"'"+title+"'\n\n"+"Klik op onderstaande link om het artikel te lezen.\n\n"+url);return"mailto:?subject="+subject+"&body="+body;}
var initSendToFriend=function(){if(Dom.get("sendToFriend")){Dom.get("sendToFriend").setAttribute("href",sendToFriend(document.title,document.location.href));}}
function mentometerState(pollId){var cookies=document.cookie;var pos=cookies.indexOf('mentometer=');if(pos!=-1){var start=pos+11;var end=cookies.indexOf(';',start);if(end==-1){end=cookies.length;}
var value=cookies.substring(start,end);value=unescape(value);var mentometerIds=value.split('M');for(var i=0;i<mentometerIds.length;i++){if(mentometerIds[i]==pollId){document.getElementById('voted').style.display='block';document.getElementById('vote').style.display='none';return;}}
document.getElementById('voted').style.display='none';document.getElementById('vote').style.display='block';}else{document.getElementById('voted').style.display='none';document.getElementById('vote').style.display='block';}}
function size(pTotalVotes,pVotes,pSize){return Math.round((pSize*percent(pTotalVotes,pVotes))/100);}
function percent(pTotalVotes,pVotes){var result=0;if(pTotalVotes>0){result=(pVotes*100)/pTotalVotes;}
return Math.round(result);}
function readCookie(pCookieName){var cookieName=pCookieName+'='
var cookies=document.cookie;var pos=cookies.indexOf(cookieName);if(pos!=-1){var start=pos+cookieName.length;var end=cookies.indexOf(';',start);if(end==-1){end=cookies.length;}
return unescape(cookies.substring(start,end));}}
function setCookie(pName,pValue){var date=new Date();date.setTime(date.getTime()+(365*24*60*60*1000));var expires="; expires="+date.toGMTString();document.cookie=pName+'='+escape(pValue)+expires;}
function readPollCookie(pollId){var pollCookie=readCookie('pollCache');if(pollCookie==null){return null;}
var pollCacheCookies=pollCookie.split(';');for(var i=0;i<pollCacheCookies.length;i++){var pollCookie=pollCacheCookies[i];if(pollCookie.indexOf(pollId)!=-1){return pollCookie;}}}
function readPollCookieIds(){var pollCookie=readCookie('pollCache');if(pollCookie==null){return null;}
var pollCacheCookies=pollCookie.split(';');var result=new Array(pollCacheCookies.length);for(var i=0;i<pollCacheCookies.length;i++){var hepp=pollCacheCookies[i].split(':')
result[i]=hepp[0];}
return result;}
function setPollCookie(pollId,vote){var values='';var pollCookieIds=readPollCookieIds();if(pollCookieIds!=null){for(var i=0;i<pollCookieIds.length;i++){values+=readPollCookie(pollCookieIds[i])+';';}}
values+='pollId-'+pollId+':'+timestamp+':'+vote;setCookie('pollCache',values);}
function launchPopup(url,name,width,height,resizable,scrollbars,toolbar,location){popup_window=window.open(url,name,'width='+width+',height='+height+',resizable='+resizable+',scrollbars='+scrollbars+',toolbar='+toolbar+',location='+location+'');popup_window.focus();}
var timestamp='<%= System.currentTimeMillis() %>';function show(pElementName,pDisplay){var voted=document.getElementById(pElementName);voted.style.display=pDisplay;}
function hide(pElementName){var voted=document.getElementById(pElementName);voted.style.display="none";}
function change(pHideElementName,pShowElementName){hide(pHideElementName);show(pShowElementName,'block');}
var initPoll=function(){if(typeof pollId!="undefined"){mentometerState(pollId);}}
function openWeather(){var weer=window.open(weatherUrl,'weer','width=630,height=500,status=no,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no');};function randomString(length){var chars="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";var randomString="";for(x=0;x<length;x++){i=Math.floor(Math.random()*62);randomString+=chars.charAt(i);}
return randomString;}
function isOdd(num){return(num%2)==1;}
function isEven(num){return(num%2)==0;}
function trim(value){if(!value||value.length==0){return"";}
else{value=value.replace(/^\s+/,'');value=value.replace(/\s+$/,'');return value;}}
Array.prototype.inArray=function(value){var i;for(i=0;i<this.length;i++){if(this[i]===value){return true;}}
return false;};function trimContent(inputString,size){if(size>inputString.length){size=inputString.length;}
var i=1;var currentpos=size;while((size+i<inputString.length)&&(inputString.substring(currentpos,size+i)!=" ")){currentpos++;i++;}
return inputString.substring(0,size+i);}
function validateTextInput(i){var re=/^[^'"`~@%&;:<>]*$/;if(!re.test(i.value)){i.value=i.value.replace(/['"`~@%&:;<>]/g,"");}}
function stripTags(str){return str.replace(/<\/?[^>]+>/gi,'');}
function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}
else var expires="";document.cookie=name+"="+value+expires+"; path=/";}
function readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
return null;}
var base64chars='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'.split("");var base64inv={};for(var i=0;i<base64chars.length;i++){base64inv[base64chars[i]]=i;}
function base64url_encode(s){var r="";var p="";var c=s.length%3;if(c>0){for(;c<3;c++){p+='=';s+="\0";}}
for(c=0;c<s.length;c+=3){if(c>0&&(c/3*4)%76==0){r+="\r\n";}
var n=(s.charCodeAt(c)<<16)+(s.charCodeAt(c+1)<<8)+s.charCodeAt(c+2);n=[(n>>>18)&63,(n>>>12)&63,(n>>>6)&63,n&63];r+=base64chars[n[0]]+base64chars[n[1]]+base64chars[n[2]]+base64chars[n[3]];}
return r.substring(0,r.length-p.length)+p;}
function base64_decode(s){var p=(s.charAt(s.length-1)=='='?(s.charAt(s.length-2)=='='?'AA':'A'):"");var r="";s=s.substr(0,s.length-p.length)+p;s=s.replace(new RegExp('[^'+base64chars.join("")+']','g'),"");for(var c=0;c<s.length;c+=4){var n=(base64inv[s.charAt(c)]<<18)+base64inv[s.charAt(c+3)]+
(base64inv[s.charAt(c+1)]<<12)+(base64inv[s.charAt(c+2)]<<6);r+=String.fromCharCode((n>>>16)&255,(n>>>8)&255,n&255);}
return r.substring(0,r.length-p.length);}
function html_entity_decode(string,quote_style){var histogram={},symbol='',tmp_str='',entity='';tmp_str=string.toString();if(false===(histogram=get_html_translation_table('HTML_ENTITIES',quote_style))){return false;}
for(symbol in histogram){entity=histogram[symbol];tmp_str=tmp_str.split(entity).join(symbol);}
tmp_str=tmp_str.split('&#039;').join("'");tmp_str=tmp_str.split('&#39;').join("'");return tmp_str;}
function get_html_translation_table(table,quote_style){var entities={},histogram={},decimal=0,symbol='';var constMappingTable={},constMappingQuoteStyle={};var useTable={},useQuoteStyle={};constMappingTable[0]='HTML_SPECIALCHARS';constMappingTable[1]='HTML_ENTITIES';constMappingQuoteStyle[0]='ENT_NOQUOTES';constMappingQuoteStyle[2]='ENT_COMPAT';constMappingQuoteStyle[3]='ENT_QUOTES';useTable=!isNaN(table)?constMappingTable[table]:table?table.toUpperCase():'HTML_SPECIALCHARS';useQuoteStyle=!isNaN(quote_style)?constMappingQuoteStyle[quote_style]:quote_style?quote_style.toUpperCase():'ENT_COMPAT';if(useTable!=='HTML_SPECIALCHARS'&&useTable!=='HTML_ENTITIES'){throw new Error("Table: "+useTable+' not supported');}
if(useTable==='HTML_ENTITIES'){entities['160']='&nbsp;';entities['161']='&iexcl;';entities['162']='&cent;';entities['163']='&pound;';entities['164']='&curren;';entities['165']='&yen;';entities['166']='&brvbar;';entities['167']='&sect;';entities['168']='&uml;';entities['169']='&copy;';entities['170']='&ordf;';entities['171']='&laquo;';entities['172']='&not;';entities['173']='&shy;';entities['174']='&reg;';entities['175']='&macr;';entities['176']='&deg;';entities['177']='&plusmn;';entities['178']='&sup2;';entities['179']='&sup3;';entities['180']='&acute;';entities['181']='&micro;';entities['182']='&para;';entities['183']='&middot;';entities['184']='&cedil;';entities['185']='&sup1;';entities['186']='&ordm;';entities['187']='&raquo;';entities['188']='&frac14;';entities['189']='&frac12;';entities['190']='&frac34;';entities['191']='&iquest;';entities['192']='&Agrave;';entities['193']='&Aacute;';entities['194']='&Acirc;';entities['195']='&Atilde;';entities['196']='&Auml;';entities['197']='&Aring;';entities['198']='&AElig;';entities['199']='&Ccedil;';entities['200']='&Egrave;';entities['201']='&Eacute;';entities['202']='&Ecirc;';entities['203']='&Euml;';entities['204']='&Igrave;';entities['205']='&Iacute;';entities['206']='&Icirc;';entities['207']='&Iuml;';entities['208']='&ETH;';entities['209']='&Ntilde;';entities['210']='&Ograve;';entities['211']='&Oacute;';entities['212']='&Ocirc;';entities['213']='&Otilde;';entities['214']='&Ouml;';entities['215']='&times;';entities['216']='&Oslash;';entities['217']='&Ugrave;';entities['218']='&Uacute;';entities['219']='&Ucirc;';entities['220']='&Uuml;';entities['221']='&Yacute;';entities['222']='&THORN;';entities['223']='&szlig;';entities['224']='&agrave;';entities['225']='&aacute;';entities['226']='&acirc;';entities['227']='&atilde;';entities['228']='&auml;';entities['229']='&aring;';entities['230']='&aelig;';entities['231']='&ccedil;';entities['232']='&egrave;';entities['233']='&eacute;';entities['234']='&ecirc;';entities['235']='&euml;';entities['236']='&igrave;';entities['237']='&iacute;';entities['238']='&icirc;';entities['239']='&iuml;';entities['240']='&eth;';entities['241']='&ntilde;';entities['242']='&ograve;';entities['243']='&oacute;';entities['244']='&ocirc;';entities['245']='&otilde;';entities['246']='&ouml;';entities['247']='&divide;';entities['248']='&oslash;';entities['249']='&ugrave;';entities['250']='&uacute;';entities['251']='&ucirc;';entities['252']='&uuml;';entities['253']='&yacute;';entities['254']='&thorn;';entities['255']='&yuml;';}
if(useQuoteStyle!=='ENT_NOQUOTES'){entities['34']='&quot;';}
if(useQuoteStyle==='ENT_QUOTES'){entities['39']='&#39;';}
entities['60']='&lt;';entities['62']='&gt;';entities['38']='&amp;';for(decimal in entities){symbol=String.fromCharCode(decimal);histogram[symbol]=entities[decimal];}
return histogram;}
YAHOO.dagblad.frontpageAdSwitcher={init:function(settings){var ref=this;var timedSwitch=window.setTimeout(function(){ref.switchAd(settings.adId,settings.flashId,settings.removeAd);},settings.time);},switchAd:function(adId,flashId,removeAd){var adObject=Dom.get(adId);if(adObject){if(removeAd){adObject.parentNode.removeChild(adObject);}
else{Dom.setStyle(adId,"display","none");if(so!="undefined"){so.write("flashcontent");}}
Dom.setStyle(flashId,"display","block");}
else{return false;}}}
YAHOO.dagblad.register={settings:{nameInputId:"s_username",userNameCheckContainer:"userNameCheck",invalidCharMessage:"Deze weergavenaam bevat ongeldige tekens",validationServiceUri:publicationUrl+"nameCheckEsenic.do",errorClass:"error",errorMsgId:"displayNameError",statusNotAvailableMsg:"Deze weergavenaam is niet beschikbaar, kies een andere."},init:function(){Event.addListener(this.settings.nameInputId,"keyup",function(e){if(e.keyCode==13){return false;}});Event.addListener(this.settings.nameInputId,"blur",this.checkAvailability,this);},checkAvailability:function(e,refObj){var callback={cache:false,success:function(o){if(trim(o.responseText)=="succes"){o.argument.refObj.setFieldStatus(o.argument.refObj.settings.nameInputId,true,"");}else{o.argument.refObj.setFieldStatus(o.argument.refObj.settings.nameInputId,false,o.argument.refObj.settings.statusNotAvailableMsg);}},failure:function(o){o.argument.refObj.setFieldStatus(o.argument.refObj.settings.nameInputId,false,o.argument.refObj.settings.statusNotAvailableMsg);},argument:{query:this.value,refObj:refObj}}
var re=new RegExp("[^ !@#$%^&*()=\\+<>,?\\*\\\\\/)]+");if(this.value.match(re)!=this.value){refObj.setFieldStatus(refObj.settings.nameInputId,false,refObj.settings.invalidCharMessage);}else{var transaction=YAHOO.util.Connect.asyncRequest('GET',refObj.settings.validationServiceUri+"?username="+this.value,callback);}},setFieldStatus:function(fieldId,valid,statusMsg){var fieldContainer=Dom.get(this.settings.userNameCheckContainer);if(!Dom.get(this.settings.errorMsgId)){var errorNode=document.createElement("div");Dom.addClass(errorNode,"myIDtip");errorNode.setAttribute("id",this.settings.errorMsgId);var errorTextNode=document.createElement("div");Dom.addClass(errorTextNode,"tipText");errorNode.appendChild(errorTextNode);var errorNodeBottom=document.createElement("div");Dom.addClass(errorNodeBottom,"bottom");errorNode.appendChild(errorNodeBottom);fieldContainer.parentNode.insertBefore(errorNode,fieldContainer.nextSibling);}else{var errorNode=Dom.get(this.settings.errorMsgId);}
if(valid){errorNode.parentNode.removeChild(errorNode);Dom.get(fieldId).removeAttribute("style");Dom.removeClass("s_username","error");}else{Dom.addClass(errorNode,"error");Dom.addClass("s_username","error");var errorTextNode=Dom.getElementsByClassName("tipText","div",errorNode)[0];errorTextNode.innerHTML=statusMsg;Dom.setStyle(fieldId,"color","red");}}}
YAHOO.dagblad.flashLoader={settings:{flashContainerClass:"flashFrame",flashLoadingClass:"loadingFlash",swfobjPrefix:"swfobj_",initializedClass:"initialized"},init:function(){var allFlashContainers=Dom.getElementsByClassName(this.settings.flashContainerClass);for(var i=0;i<allFlashContainers.length;i++){var flashAttributes=allFlashContainers[i].title.split(",");var so=new SWFObject(flashAttributes[0],flashAttributes[1],flashAttributes[2],flashAttributes[3],"8","");so.write(this.settings.swfobjPrefix+flashAttributes[1]);allFlashContainers[i].removeAttribute("title");Dom.removeClass(allFlashContainers[i],this.settings.flashLoadingClass);Dom.addClass(allFlashContainers[i],this.settings.initializedClass);}}};YAHOO.dagblad.commentsFilter={settings:{filterComboId:"showComments",saveCommentFilterId:"setCommentFilter",ratedCommentsListId:"ratedCommentsList",ratedCommentClass:"ratedComment"},init:function(){var commentFilter=Dom.get(this.settings.filterComboId);var saveCommentFilter=Dom.get(this.settings.saveCommentFilterId);if(commentFilter){this.setActiveComments();YAHOO.util.Event.addListener(commentFilter,"change",function(){YAHOO.dagblad.commentsFilter.setActiveComments();});YAHOO.util.Event.addListener(saveCommentFilter,"click",function(){YAHOO.dagblad.commentsFilter.setCommentFilter();});}},setCommentFilter:function(){var commentFilter=Dom.get(this.settings.filterComboId);var selectedRatingValue=commentFilter.options[commentFilter.selectedIndex].value;var callback={success:function(){alert('Het filter is opgeslagen.')},failure:function(){alert('Opslaan van het filter is mislukt.')}}
var ajaxLink=publicationUrl+"forum/commentFilter.do?starRating="+selectedRatingValue;YAHOO.util.Connect.asyncRequest('GET',ajaxLink,callback);},setActiveComments:function(){var commentFilter=Dom.get(this.settings.filterComboId);var selectedRatingValue=commentFilter.options[commentFilter.selectedIndex].value;var ratedComments=Dom.getElementsByClassName(this.settings.ratedCommentClass,"li",this.settings.ratedCommentsListId);for(var i=0;i<ratedComments.length;i++){this.filterComment(ratedComments[i],selectedRatingValue);}},filterComment:function(el,selectedRating){switch(parseInt(selectedRating)){case 0:el.style.display="none";break;case 1:el.style.display="block";break;case 2:if(Dom.hasClass(el,"rated2")||Dom.hasClass(el,"rated3")&&Dom.hasClass(el,"rated4")&&Dom.hasClass(el,"rated5")){el.style.display="block";}else{el.style.display="none";}
break;case 3:if(Dom.hasClass(el,"rated3")&&Dom.hasClass(el,"rated4")&&Dom.hasClass(el,"rated5")){el.style.display="block";}else{el.style.display="none";}
break;case 4:if(Dom.hasClass(el,"rated4")&&Dom.hasClass(el,"rated5")){el.style.display="block";}else{el.style.display="none";}
break;case 5:if(Dom.hasClass(el,"rated5")){el.style.display="block";}else{el.style.display="none";}
break;}}}
var pageInit=function(){YAHOO.dagblad.siteSearch.init("topSearchField");YAHOO.dagblad.tooltip.init();YAHOO.dagblad.register.init();YAHOO.dagblad.commentsFilter.init();initYuiTabs();initEditablePanels();YAHOO.dagblad.panelCarousels.init(Dom.getElementsByClassName("carousel-component","div","leftColumn"))
YAHOO.dagblad.userPanelHandler.initRssPanels();Event.onDOMReady(YAHOO.dagblad.DDApp.init,YAHOO.dagblad.DDApp,true);YAHOO.dagblad.flashLoader.init();YAHOO.dagblad.articlePictorial.init();YAHOO.dagblad.slideshow.init({rootId:"slideshowModule",autoStart:false,slideshowShowDescription:true,slideSpeed:5000,preloadImages:true,frameContainer:"slideshowFrameContainer"});initSendToFriend();YAHOO.dagblad.frontpageAdSwitcher.init({adId:"fpRectangle",flashId:"videoContainer",time:25000,removeAd:false});if(showplayer){so.write("flashcontent");YAHOO.util.Dom.setStyle("flashcontent","display","block");}
if(ekcoachbanner){cvhjCookie();updateCvhjTeaser();}
var articleMap=document.getElementById("articleMap");if(articleMap){initializeMap();}
var editorialTabview=new YAHOO.widget.TabView('editorialNewslist');var tabSets=Dom.getElementsByClassName("yui-navset");for(var i=0;i<tabSets.length;i++){new YAHOO.widget.TabView(tabSets[i]);}
editorialTabview.addListener("activeTabChange",function(){YAHOO.dagblad.slideshow.init(this.get('activeTab').getElementsByTagName("a")[0].rel,true);});YAHOO.util.Event.onAvailable("voted",initPoll);}
YAHOO.util.Event.onDOMReady(pageInit);var prePageLoadInit=function(){YAHOO.dagblad.toggle.init("sitemapOption,loginOption,closeLoginLayer,closeSitemapLayer,mijnDagbladOption,closeMijnDagbladLayer");YAHOO.dagblad.fontChanger.init();}
YAHOO.util.Event.onAvailable("topMenu",prePageLoadInit);YAHOO.namespace("extension");YAHOO.extension.Carousel=function(carouselElementID,carouselCfg){this.init(carouselElementID,carouselCfg);};YAHOO.extension.Carousel.prototype={UNBOUNDED_SIZE:1000000,init:function(carouselElementID,carouselCfg){var oThis=this;this.getCarouselItem=this.getItem;var carouselListClass="carousel-list";var carouselClipRegionClass="carousel-clip-region";var carouselNextClass="carousel-next";var carouselPrevClass="carousel-prev";this._carouselElemID=carouselElementID;this.carouselElem=YAHOO.util.Dom.get(carouselElementID);this._prevEnabled=true;this._nextEnabled=true;this.cfg=new YAHOO.util.Config(this);this.cfg.addProperty("scrollBeforeAmount",{value:0,handler:function(type,args,carouselElem){},validator:oThis.cfg.checkNumber});this.cfg.addProperty("scrollAfterAmount",{value:0,handler:function(type,args,carouselElem){},validator:oThis.cfg.checkNumber});this.cfg.addProperty("loadOnStart",{value:true,handler:function(type,args,carouselElem){},validator:oThis.cfg.checkBoolean});this.cfg.addProperty("orientation",{value:"horizontal",handler:function(type,args,carouselElem){oThis.reload();},validator:function(orientation){if(typeof orientation=="string"){return("horizontal,vertical".indexOf(orientation.toLowerCase())!=-1);}else{return false;}}});this.cfg.addProperty("size",{value:this.UNBOUNDED_SIZE,handler:function(type,args,carouselElem){oThis.reload();},validator:oThis.cfg.checkNumber});this.cfg.addProperty("numVisible",{value:3,handler:function(type,args,carouselElem){oThis.reload();},validator:oThis.cfg.checkNumber});this.cfg.addProperty("firstVisible",{value:1,handler:function(type,args,carouselElem){oThis.moveTo(args[0]);},validator:oThis.cfg.checkNumber});this.cfg.addProperty("scrollInc",{value:3,handler:function(type,args,carouselElem){},validator:oThis.cfg.checkNumber});this.cfg.addProperty("animationSpeed",{value:0.25,handler:function(type,args,carouselElem){oThis.animationSpeed=args[0];},validator:oThis.cfg.checkNumber});this.cfg.addProperty("animationMethod",{value:YAHOO.util.Easing.easeOut,handler:function(type,args,carouselElem){}});this.cfg.addProperty("animationCompleteHandler",{value:null,handler:function(type,args,carouselElem){if(oThis._animationCompleteEvt){oThis._animationCompleteEvt.unsubscribe(oThis._currAnimationCompleteHandler,oThis);}
oThis._currAnimationCompleteHandler=args[0];if(oThis._currAnimationCompleteHandler){if(!oThis._animationCompleteEvt){oThis._animationCompleteEvt=new YAHOO.util.CustomEvent("onAnimationComplete",oThis);}
oThis._animationCompleteEvt.subscribe(oThis._currAnimationCompleteHandler,oThis);}}});this.cfg.addProperty("autoPlay",{value:0,handler:function(type,args,carouselElem){var autoPlay=args[0];if(autoPlay>0)
oThis.startAutoPlay();else
oThis.stopAutoPlay();}});this.cfg.addProperty("wrap",{value:false,handler:function(type,args,carouselElem){},validator:oThis.cfg.checkBoolean});this.cfg.addProperty("navMargin",{value:0,handler:function(type,args,carouselElem){oThis.calculateSize();},validator:oThis.cfg.checkNumber});this.cfg.addProperty("revealAmount",{value:0,handler:function(type,args,carouselElem){oThis.reload();},validator:oThis.cfg.checkNumber});this.cfg.addProperty("prevElementID",{value:null,handler:function(type,args,carouselElem){if(oThis._carouselPrev){YAHOO.util.Event.removeListener(oThis._carouselPrev,"click",oThis._scrollPrev);}
oThis._prevElementID=args[0];if(oThis._prevElementID==null){oThis._carouselPrev=YAHOO.util.Dom.getElementsByClassName(carouselPrevClass,"div",oThis.carouselElem)[0];}else{oThis._carouselPrev=YAHOO.util.Dom.get(oThis._prevElementID);}
YAHOO.util.Event.addListener(oThis._carouselPrev,"click",oThis._scrollPrev,oThis);}});this.cfg.addProperty("prevElement",{value:null,handler:function(type,args,carouselElem){if(oThis._carouselPrev){YAHOO.util.Event.removeListener(oThis._carouselPrev,"click",oThis._scrollPrev);}
oThis._prevElementID=args[0];if(oThis._prevElementID==null){oThis._carouselPrev=YAHOO.util.Dom.getElementsByClassName(carouselPrevClass,"div",oThis.carouselElem)[0];}else{oThis._carouselPrev=YAHOO.util.Dom.get(oThis._prevElementID);}
YAHOO.util.Event.addListener(oThis._carouselPrev,"click",oThis._scrollPrev,oThis);}});this.cfg.addProperty("nextElementID",{value:null,handler:function(type,args,carouselElem){if(oThis._carouselNext){YAHOO.util.Event.removeListener(oThis._carouselNext,"click",oThis._scrollNext);}
oThis._nextElementID=args[0];if(oThis._nextElementID==null){oThis._carouselNext=YAHOO.util.Dom.getElementsByClassName(carouselNextClass,"div",oThis.carouselElem);}else{oThis._carouselNext=YAHOO.util.Dom.get(oThis._nextElementID);}
if(oThis._carouselNext){YAHOO.util.Event.addListener(oThis._carouselNext,"click",oThis._scrollNext,oThis);}}});this.cfg.addProperty("nextElement",{value:null,handler:function(type,args,carouselElem){if(oThis._carouselNext){YAHOO.util.Event.removeListener(oThis._carouselNext,"click",oThis._scrollNext);}
oThis._nextElementID=args[0];if(oThis._nextElementID==null){oThis._carouselNext=YAHOO.util.Dom.getElementsByClassName(carouselNextClass,"div",oThis.carouselElem);}else{oThis._carouselNext=YAHOO.util.Dom.get(oThis._nextElementID);}
if(oThis._carouselNext){YAHOO.util.Event.addListener(oThis._carouselNext,"click",oThis._scrollNext,oThis);}}});this.cfg.addProperty("loadInitHandler",{value:null,handler:function(type,args,carouselElem){if(oThis._loadInitHandlerEvt){oThis._loadInitHandlerEvt.unsubscribe(oThis._currLoadInitHandler,oThis);}
oThis._currLoadInitHandler=args[0];if(oThis._currLoadInitHandler){if(!oThis._loadInitHandlerEvt){oThis._loadInitHandlerEvt=new YAHOO.util.CustomEvent("onLoadInit",oThis);}
oThis._loadInitHandlerEvt.subscribe(oThis._currLoadInitHandler,oThis);}}});this.cfg.addProperty("loadNextHandler",{value:null,handler:function(type,args,carouselElem){if(oThis._loadNextHandlerEvt){oThis._loadNextHandlerEvt.unsubscribe(oThis._currLoadNextHandler,oThis);}
oThis._currLoadNextHandler=args[0];if(oThis._currLoadNextHandler){if(!oThis._loadNextHandlerEvt){oThis._loadNextHandlerEvt=new YAHOO.util.CustomEvent("onLoadNext",oThis);}
oThis._loadNextHandlerEvt.subscribe(oThis._currLoadNextHandler,oThis);}}});this.cfg.addProperty("loadPrevHandler",{value:null,handler:function(type,args,carouselElem){if(oThis._loadPrevHandlerEvt){oThis._loadPrevHandlerEvt.unsubscribe(oThis._currLoadPrevHandler,oThis);}
oThis._currLoadPrevHandler=args[0];if(oThis._currLoadPrevHandler){if(!oThis._loadPrevHandlerEvt){oThis._loadPrevHandlerEvt=new YAHOO.util.CustomEvent("onLoadPrev",oThis);}
oThis._loadPrevHandlerEvt.subscribe(oThis._currLoadPrevHandler,oThis);}}});this.cfg.addProperty("prevButtonStateHandler",{value:null,handler:function(type,args,carouselElem){if(oThis._currPrevButtonStateHandler){oThis._prevButtonStateHandlerEvt.unsubscribe(oThis._currPrevButtonStateHandler,oThis);}
oThis._currPrevButtonStateHandler=args[0];if(oThis._currPrevButtonStateHandler){if(!oThis._prevButtonStateHandlerEvt){oThis._prevButtonStateHandlerEvt=new YAHOO.util.CustomEvent("onPrevButtonStateChange",oThis);}
oThis._prevButtonStateHandlerEvt.subscribe(oThis._currPrevButtonStateHandler,oThis);}}});this.cfg.addProperty("nextButtonStateHandler",{value:null,handler:function(type,args,carouselElem){if(oThis._currNextButtonStateHandler){oThis._nextButtonStateHandlerEvt.unsubscribe(oThis._currNextButtonStateHandler,oThis);}
oThis._currNextButtonStateHandler=args[0];if(oThis._currNextButtonStateHandler){if(!oThis._nextButtonStateHandlerEvt){oThis._nextButtonStateHandlerEvt=new YAHOO.util.CustomEvent("onNextButtonStateChange",oThis);}
oThis._nextButtonStateHandlerEvt.subscribe(oThis._currNextButtonStateHandler,oThis);}}});if(carouselCfg){this.cfg.applyConfig(carouselCfg);}
this._origFirstVisible=this.cfg.getProperty("firstVisible");this._currLoadInitHandler=this.cfg.getProperty("loadInitHandler");this._currLoadNextHandler=this.cfg.getProperty("loadNextHandler");this._currLoadPrevHandler=this.cfg.getProperty("loadPrevHandler");this._currPrevButtonStateHandler=this.cfg.getProperty("prevButtonStateHandler");this._currNextButtonStateHandler=this.cfg.getProperty("nextButtonStateHandler");this._currAnimationCompleteHandler=this.cfg.getProperty("animationCompleteHandler");this._nextElementID=this.cfg.getProperty("nextElementID");if(!this._nextElementID)
this._nextElementID=this.cfg.getProperty("nextElement");this._prevElementID=this.cfg.getProperty("prevElementID");if(!this._prevElementID)
this._prevElementID=this.cfg.getProperty("prevElement");this._autoPlayTimer=null;this._priorLastVisible=this._priorFirstVisible=this.cfg.getProperty("firstVisible");this._lastPrebuiltIdx=0;this.carouselList=YAHOO.util.Dom.getElementsByClassName(carouselListClass,"ul",this.carouselElem)[0];if(this._nextElementID==null){this._carouselNext=YAHOO.util.Dom.getElementsByClassName(carouselNextClass,"div",this.carouselElem)[0];}else{this._carouselNext=YAHOO.util.Dom.get(this._nextElementID);}
if(this._prevElementID==null){this._carouselPrev=YAHOO.util.Dom.getElementsByClassName(carouselPrevClass,"div",this.carouselElem)[0];}else{this._carouselPrev=YAHOO.util.Dom.get(this._prevElementID);}
this._clipReg=YAHOO.util.Dom.getElementsByClassName(carouselClipRegionClass,"div",this.carouselElem)[0];if(this.isVertical()){YAHOO.util.Dom.addClass(this.carouselList,"carousel-vertical");}
this._scrollNextAnim=new YAHOO.util.Motion(this.carouselList,this.scrollNextParams,this.cfg.getProperty("animationSpeed"),this.cfg.getProperty("animationMethod"));this._scrollPrevAnim=new YAHOO.util.Motion(this.carouselList,this.scrollPrevParams,this.cfg.getProperty("animationSpeed"),this.cfg.getProperty("animationMethod"));if(this._carouselNext){YAHOO.util.Event.addListener(this._carouselNext,"click",this._scrollNext,this);}
if(this._carouselPrev){YAHOO.util.Event.addListener(this._carouselPrev,"click",this._scrollPrev,this);}
var loadInitHandler=this.cfg.getProperty("loadInitHandler");if(loadInitHandler){this._loadInitHandlerEvt=new YAHOO.util.CustomEvent("onLoadInit",this);this._loadInitHandlerEvt.subscribe(loadInitHandler,this);}
var loadNextHandler=this.cfg.getProperty("loadNextHandler");if(loadNextHandler){this._loadNextHandlerEvt=new YAHOO.util.CustomEvent("onLoadNext",this);this._loadNextHandlerEvt.subscribe(loadNextHandler,this);}
var loadPrevHandler=this.cfg.getProperty("loadPrevHandler");if(loadPrevHandler){this._loadPrevHandlerEvt=new YAHOO.util.CustomEvent("onLoadPrev",this);this._loadPrevHandlerEvt.subscribe(loadPrevHandler,this);}
var animationCompleteHandler=this.cfg.getProperty("animationCompleteHandler");if(animationCompleteHandler){this._animationCompleteEvt=new YAHOO.util.CustomEvent("onAnimationComplete",this);this._animationCompleteEvt.subscribe(animationCompleteHandler,this);}
var prevButtonStateHandler=this.cfg.getProperty("prevButtonStateHandler");if(prevButtonStateHandler){this._prevButtonStateHandlerEvt=new YAHOO.util.CustomEvent("onPrevButtonStateChange",this);this._prevButtonStateHandlerEvt.subscribe(prevButtonStateHandler,this);}
var nextButtonStateHandler=this.cfg.getProperty("nextButtonStateHandler");if(nextButtonStateHandler){this._nextButtonStateHandlerEvt=new YAHOO.util.CustomEvent("onNextButtonStateChange",this);this._nextButtonStateHandlerEvt.subscribe(nextButtonStateHandler,this);}
var visibleExtent=this._calculateVisibleExtent();YAHOO.util.Event.onAvailable(this._carouselElemID+"-item-"+
visibleExtent.start,this._calculateSize,this);if(this.cfg.getProperty("loadOnStart"))
this._loadInitial();},clear:function(){var loadInitHandler=this.cfg.getProperty("loadInitHandler");if(loadInitHandler){this._removeChildrenFromNode(this.carouselList);this._lastPrebuiltIdx=0;}
this.stopAutoPlay();this._priorLastVisible=this._priorFirstVisible=this._origFirstVisible;this.cfg.setProperty("firstVisible",this._origFirstVisible,true);this.moveTo(this._origFirstVisible);},reload:function(numVisible){if(this._isValidObj(numVisible)){this.cfg.setProperty("numVisible",numVisible);}
this.clear();var visibleExtent=this._calculateVisibleExtent();YAHOO.util.Event.onAvailable(this._carouselElemID+"-item-"+visibleExtent.start,this._calculateSize,this);this._loadInitial();},load:function(){var visibleExtent=this._calculateVisibleExtent();YAHOO.util.Event.onAvailable(this._carouselElemID+"-item-"+visibleExtent.start,this._calculateSize,this);this._loadInitial();},addItem:function(idx,innerHTMLOrElem,itemClass){if(idx>this.cfg.getProperty("size")){return null;}
var liElem=this.getItem(idx);if(!this._isValidObj(liElem)){liElem=this._createItem(idx,innerHTMLOrElem);this.carouselList.appendChild(liElem);}else if(this._isValidObj(liElem.placeholder)){var newLiElem=this._createItem(idx,innerHTMLOrElem);this.carouselList.replaceChild(newLiElem,liElem);liElem=newLiElem;}
if(this._isValidObj(itemClass)){YAHOO.util.Dom.addClass(liElem,itemClass);}
if(this.isVertical())
setTimeout(function(){liElem.style.display="block";},1);return liElem;},insertBefore:function(refIdx,innerHTML){if(refIdx>=this.cfg.getProperty("size")){return null;}
if(refIdx<1){refIdx=1;}
var insertionIdx=refIdx-1;if(insertionIdx>this._lastPrebuiltIdx){this._prebuildItems(this._lastPrebuiltIdx,refIdx);}
var liElem=this._insertBeforeItem(refIdx,innerHTML);this._enableDisableControls();return liElem;},insertAfter:function(refIdx,innerHTML){if(refIdx>this.cfg.getProperty("size")){refIdx=this.cfg.getProperty("size");}
var insertionIdx=refIdx+1;if(insertionIdx>this._lastPrebuiltIdx){this._prebuildItems(this._lastPrebuiltIdx,insertionIdx+1);}
var liElem=this._insertAfterItem(refIdx,innerHTML);if(insertionIdx>this.cfg.getProperty("size")){this.cfg.setProperty("size",insertionIdx,true);}
this._enableDisableControls();return liElem;},scrollNext:function(){this._scrollNext(null,this);this._autoPlayTimer=null;if(this.cfg.getProperty("autoPlay")!==0){this._autoPlayTimer=this.startAutoPlay();}},scrollPrev:function(){this._scrollPrev(null,this);},scrollTo:function(newStart){this._position(newStart,true);},moveTo:function(newStart){this._position(newStart,false);},startAutoPlay:function(interval){if(this._isValidObj(interval)){this.cfg.setProperty("autoPlay",interval,true);}
if(this._autoPlayTimer!==null){return this._autoPlayTimer;}
var oThis=this;var autoScroll=function(){oThis.scrollNext();};this._autoPlayTimer=setTimeout(autoScroll,this.cfg.getProperty("autoPlay"));return this._autoPlayTimer;},stopAutoPlay:function(){if(this._autoPlayTimer!==null){clearTimeout(this._autoPlayTimer);this._autoPlayTimer=null;}},isVertical:function(){return(this.cfg.getProperty("orientation")!="horizontal");},isItemLoaded:function(idx){var liElem=this.getItem(idx);if(this._isValidObj(liElem)&&!this._isValidObj(liElem.placeholder)){return true;}
return false;},getItem:function(idx){var elemName=this._carouselElemID+"-item-"+idx;var liElem=YAHOO.util.Dom.get(elemName);return liElem;},show:function(){YAHOO.util.Dom.setStyle(this.carouselElem,"display","block");this.calculateSize();},hide:function(){YAHOO.util.Dom.setStyle(this.carouselElem,"display","none");},calculateSize:function(){var ulKids=this.carouselList.childNodes;var li=null;for(var i=0;i<ulKids.length;i++){li=ulKids[i];if(li.tagName=="LI"||li.tagName=="li"){break;}}
var navMargin=this.cfg.getProperty("navMargin");var numVisible=this.cfg.getProperty("numVisible");var firstVisible=this.cfg.getProperty("firstVisible");var pl=this._getStyleVal(li,"paddingLeft");var pr=this._getStyleVal(li,"paddingRight");var ml=this._getStyleVal(li,"marginLeft");var mr=this._getStyleVal(li,"marginRight");var pt=this._getStyleVal(li,"paddingTop");var pb=this._getStyleVal(li,"paddingBottom");var mt=this._getStyleVal(li,"marginTop");var mb=this._getStyleVal(li,"marginBottom");YAHOO.util.Dom.removeClass(this.carouselList,"carousel-vertical");YAHOO.util.Dom.removeClass(this.carouselList,"carousel-horizontal");if(this.isVertical()){var liPaddingMarginWidth=pl+pr+ml+mr;YAHOO.util.Dom.addClass(this.carouselList,"carousel-vertical");var liPaddingMarginHeight=pt+pb+mt+mb;var upt=this._getStyleVal(this.carouselList,"paddingTop");var upb=this._getStyleVal(this.carouselList,"paddingBottom");var umt=this._getStyleVal(this.carouselList,"marginTop")
var umb=this._getStyleVal(this.carouselList,"marginBottom")
var ulPaddingHeight=upt+upb+umt+umb;var revealAmt=(this._isExtraRevealed())?(this.cfg.getProperty("revealAmount")+(liPaddingMarginHeight)/2):0;var liHeight=this._getStyleVal(li,"height",true);this.scrollAmountPerInc=(liHeight+liPaddingMarginHeight);var liWidth=this._getStyleVal(li,"width");this.carouselElem.style.width=(liWidth+liPaddingMarginWidth)+"px";this._clipReg.style.height=(this.scrollAmountPerInc*numVisible+revealAmt*2+
ulPaddingHeight)+"px";this.carouselElem.style.height=(this.scrollAmountPerInc*numVisible+revealAmt*2+navMargin*2+
ulPaddingHeight)+"px";var revealTop=(this._isExtraRevealed())?(revealAmt-(Math.abs(mt-mb)+Math.abs(pt-pb))/2):0;YAHOO.util.Dom.setStyle(this.carouselList,"position","relative");YAHOO.util.Dom.setStyle(this.carouselList,"top",""+revealTop+"px");var currY=YAHOO.util.Dom.getY(this.carouselList);YAHOO.util.Dom.setY(this.carouselList,currY-this.scrollAmountPerInc*(firstVisible-1));}else{YAHOO.util.Dom.addClass(this.carouselList,"carousel-horizontal");var upl=this._getStyleVal(this.carouselList,"paddingLeft");var upr=this._getStyleVal(this.carouselList,"paddingRight");var uml=this._getStyleVal(this.carouselList,"marginLeft")
var umr=this._getStyleVal(this.carouselList,"marginRight")
var ulPaddingWidth=upl+upr+uml+umr;var liMarginWidth=ml+mr;var liPaddingMarginWidth=liMarginWidth+pr+pl;var revealAmt=(this._isExtraRevealed())?(this.cfg.getProperty("revealAmount")+(liPaddingMarginWidth)/2):0;var liWidth=li.offsetWidth;this.scrollAmountPerInc=liWidth+liMarginWidth;this._clipReg.style.width=(this.scrollAmountPerInc*numVisible+revealAmt*2)+"px";this.carouselElem.style.width=(this.scrollAmountPerInc*numVisible+navMargin*2+revealAmt*2+
ulPaddingWidth)+"px";var revealLeft=(this._isExtraRevealed())?(revealAmt-(Math.abs(mr-ml)+Math.abs(pr-pl))/2-(uml+upl)):0;YAHOO.util.Dom.setStyle(this.carouselList,"position","relative");YAHOO.util.Dom.setStyle(this.carouselList,"left",""+revealLeft+"px");var currX=YAHOO.util.Dom.getX(this.carouselList);YAHOO.util.Dom.setX(this.carouselList,currX-this.scrollAmountPerInc*(firstVisible-1));}},setProperty:function(property,value,silent){this.cfg.setProperty(property,value,silent);},getProperty:function(property){return this.cfg.getProperty(property);},getFirstItemRevealed:function(){return this._firstItemRevealed;},getLastItemRevealed:function(){return this._lastItemRevealed;},getFirstVisible:function(){return this.cfg.getProperty("firstVisible");},getLastVisible:function(){var firstVisible=this.cfg.getProperty("firstVisible");var numVisible=this.cfg.getProperty("numVisible");return firstVisible+numVisible-1;},_getStyleVal:function(li,style,returnFloat){var styleValStr=YAHOO.util.Dom.getStyle(li,style);var styleVal=returnFloat?parseFloat(styleValStr):parseInt(styleValStr,10);if(style=="height"&&isNaN(styleVal)){styleVal=li.offsetHeight;}else if(isNaN(styleVal)){styleVal=0;}
return styleVal;},_calculateSize:function(me){me.calculateSize();me.show();},_removeChildrenFromNode:function(node)
{if(!this._isValidObj(node))
{return;}
var len=node.childNodes.length;while(node.hasChildNodes())
{node.removeChild(node.firstChild);}},_prebuildLiElem:function(idx){if(idx<1)return;var liElem=document.createElement("li");liElem.id=this._carouselElemID+"-item-"+idx;liElem.placeholder=true;this.carouselList.appendChild(liElem);this._lastPrebuiltIdx=(idx>this._lastPrebuiltIdx)?idx:this._lastPrebuiltIdx;},_createItem:function(idx,innerHTMLOrElem){if(idx<1)return;var liElem=document.createElement("li");liElem.id=this._carouselElemID+"-item-"+idx;if(typeof(innerHTMLOrElem)==="string"){liElem.innerHTML=innerHTMLOrElem;}else{liElem.appendChild(innerHTMLOrElem);}
return liElem;},_insertAfterItem:function(refIdx,innerHTMLOrElem){return this._insertBeforeItem(refIdx+1,innerHTMLOrElem);},_insertBeforeItem:function(refIdx,innerHTMLOrElem){var refItem=this.getItem(refIdx);var size=this.cfg.getProperty("size");if(size!=this.UNBOUNDED_SIZE){this.cfg.setProperty("size",size+1,true);}
for(var i=this._lastPrebuiltIdx;i>=refIdx;i--){var anItem=this.getItem(i);if(this._isValidObj(anItem)){anItem.id=this._carouselElemID+"-item-"+(i+1);}}
var liElem=this._createItem(refIdx,innerHTMLOrElem);var insertedItem=this.carouselList.insertBefore(liElem,refItem);this._lastPrebuiltIdx+=1;return liElem;},insertAfterEnd:function(innerHTMLOrElem){return this.insertAfter(this.cfg.getProperty("size"),innerHTMLOrElem);},_position:function(newStart,showAnimation){var currStart=this._priorFirstVisible;if(newStart>currStart){var inc=newStart-currStart;this._scrollNextInc(inc,showAnimation);}else{var dec=currStart-newStart;this._scrollPrevInc(dec,showAnimation);}},_scrollPrev:function(e,carousel){if(e!==null){carousel.stopAutoPlay();}
if(carousel._scrollPrevAnim.isAnimated()){return false;}
carousel._scrollPrevInc(carousel.cfg.getProperty("scrollInc"),(carousel.cfg.getProperty("animationSpeed")!==0));},_scrollNext:function(e,carousel){if(e!==null){carousel.stopAutoPlay();}
if(carousel._scrollNextAnim.isAnimated()){return false;}
carousel._scrollNextInc(carousel.cfg.getProperty("scrollInc"),(carousel.cfg.getProperty("animationSpeed")!==0));},_handleAnimationComplete:function(type,args,argList){var carousel=argList[0];var direction=argList[1];carousel._animationCompleteEvt.fire(direction);},_areAllItemsLoaded:function(first,last){var itemsLoaded=true;for(var i=first;i<=last;i++){var liElem=this.getItem(i);if(!this._isValidObj(liElem)){this._prebuildLiElem(i);itemsLoaded=false;}else if(this._isValidObj(liElem.placeholder)){itemsLoaded=false;}}
return itemsLoaded;},_prebuildItems:function(first,last){for(var i=first;i<=last;i++){var liElem=this.getItem(i);if(!this._isValidObj(liElem)){this._prebuildLiElem(i);}}},_isExtraRevealed:function(){return(this.cfg.getProperty("revealAmount")>0);},_scrollNextInc:function(inc,showAnimation){var numVisible=this.cfg.getProperty("numVisible");var currStart=this._priorFirstVisible;var currEnd=this._priorLastVisible;var size=this.cfg.getProperty("size");var scrollExtent=this._calculateAllowableScrollExtent();if(this.cfg.getProperty("wrap")&&currEnd==scrollExtent.end){this.scrollTo(scrollExtent.start);return;}
var newStart=currStart+inc;var newEnd=newStart+numVisible-1;if(newEnd>scrollExtent.end){newEnd=scrollExtent.end;newStart=newEnd-numVisible+1;}
inc=newStart-currStart;this.cfg.setProperty("firstVisible",newStart,true);if(inc>0){if(this._isValidObj(this.cfg.getProperty("loadNextHandler"))){var visibleExtent=this._calculateVisibleExtent(newStart,newEnd);var cacheStart=(currEnd+1)<visibleExtent.start?(currEnd+1):visibleExtent.start;var alreadyCached=this._areAllItemsLoaded(cacheStart,visibleExtent.end);this._loadNextHandlerEvt.fire(visibleExtent.start,visibleExtent.end,alreadyCached);}
if(showAnimation){var nextParams={points:{by:[-this.scrollAmountPerInc*inc,0]}};if(this.isVertical()){nextParams={points:{by:[0,-this.scrollAmountPerInc*inc]}};}
this._scrollNextAnim=new YAHOO.util.Motion(this.carouselList,nextParams,this.cfg.getProperty("animationSpeed"),this.cfg.getProperty("animationMethod"));if(this.cfg.getProperty("animationCompleteHandler")){this._scrollNextAnim.onComplete.subscribe(this._handleAnimationComplete,[this,"next"]);}
this._scrollNextAnim.animate();}else{if(this.isVertical()){var currY=YAHOO.util.Dom.getY(this.carouselList);YAHOO.util.Dom.setY(this.carouselList,currY-this.scrollAmountPerInc*inc);}else{var currX=YAHOO.util.Dom.getX(this.carouselList);YAHOO.util.Dom.setX(this.carouselList,currX-this.scrollAmountPerInc*inc);}}}
this._priorFirstVisible=newStart;this._priorLastVisible=newEnd;this._enableDisableControls();return false;},_scrollPrevInc:function(dec,showAnimation){var numVisible=this.cfg.getProperty("numVisible");var currStart=this._priorFirstVisible;var currEnd=this._priorLastVisible;var size=this.cfg.getProperty("size");var newStart=currStart-dec;var scrollExtent=this._calculateAllowableScrollExtent();newStart=(newStart<scrollExtent.start)?scrollExtent.start:newStart;var newEnd=newStart+numVisible-1;if(newEnd>scrollExtent.end){newEnd=scrollExtent.end;newStart=newEnd-numVisible+1;}
dec=currStart-newStart;this.cfg.setProperty("firstVisible",newStart,true);if(dec>0){if(this._isValidObj(this.cfg.getProperty("loadPrevHandler"))){var visibleExtent=this._calculateVisibleExtent(newStart,newEnd);var cacheEnd=(currStart-1)>visibleExtent.end?(currStart-1):visibleExtent.end;var alreadyCached=this._areAllItemsLoaded(visibleExtent.start,cacheEnd);this._loadPrevHandlerEvt.fire(visibleExtent.start,visibleExtent.end,alreadyCached);}
if(showAnimation){var prevParams={points:{by:[this.scrollAmountPerInc*dec,0]}};if(this.isVertical()){prevParams={points:{by:[0,this.scrollAmountPerInc*dec]}};}
this._scrollPrevAnim=new YAHOO.util.Motion(this.carouselList,prevParams,this.cfg.getProperty("animationSpeed"),this.cfg.getProperty("animationMethod"));if(this.cfg.getProperty("animationCompleteHandler")){this._scrollPrevAnim.onComplete.subscribe(this._handleAnimationComplete,[this,"prev"]);}
this._scrollPrevAnim.animate();}else{if(this.isVertical()){var currY=YAHOO.util.Dom.getY(this.carouselList);YAHOO.util.Dom.setY(this.carouselList,currY+
this.scrollAmountPerInc*dec);}else{var currX=YAHOO.util.Dom.getX(this.carouselList);YAHOO.util.Dom.setX(this.carouselList,currX+
this.scrollAmountPerInc*dec);}}}
this._priorFirstVisible=newStart;this._priorLastVisible=newEnd;this._enableDisableControls();return false;},_enableDisableControls:function(){var firstVisible=this.cfg.getProperty("firstVisible");var lastVisible=this.getLastVisible();var scrollExtent=this._calculateAllowableScrollExtent();if(this._prevEnabled){if(firstVisible===scrollExtent.start){this._disablePrev();}}
if(this._prevEnabled===false){if(firstVisible>scrollExtent.start){this._enablePrev();}}
if(this._nextEnabled){if(lastVisible===scrollExtent.end){this._disableNext();}}
if(this._nextEnabled===false){if(lastVisible<scrollExtent.end){this._enableNext();}}},_loadInitial:function(){var firstVisible=this.cfg.getProperty("firstVisible");this._priorLastVisible=this.getLastVisible();if(this._loadInitHandlerEvt){var visibleExtent=this._calculateVisibleExtent(firstVisible,this._priorLastVisible);var alreadyCached=this._areAllItemsLoaded(1,visibleExtent.end);this._loadInitHandlerEvt.fire(visibleExtent.start,visibleExtent.end,alreadyCached);}
if(this.cfg.getProperty("autoPlay")!==0){this._autoPlayTimer=this.startAutoPlay();}
this._enableDisableControls();},_calculateAllowableScrollExtent:function(){var scrollBeforeAmount=this.cfg.getProperty("scrollBeforeAmount");var scrollAfterAmount=this.cfg.getProperty("scrollAfterAmount");var size=this.cfg.getProperty("size");var extent={start:1-scrollBeforeAmount,end:size+scrollAfterAmount};return extent;},_calculateVisibleExtent:function(start,end){if(!start){start=this.cfg.getProperty("firstVisible");end=this.getLastVisible();}
var size=this.cfg.getProperty("size");start=start<1?1:start;end=end>size?size:end;var extent={start:start,end:end};this._firstItemRevealed=-1;this._lastItemRevealed=-1;if(this._isExtraRevealed()){if(start>1){this._firstItemRevealed=start-1;extent.start=this._firstItemRevealed;}
if(end<size){this._lastItemRevealed=end+1;extent.end=this._lastItemRevealed;}}
return extent;},_disablePrev:function(){this._prevEnabled=false;if(this._prevButtonStateHandlerEvt){this._prevButtonStateHandlerEvt.fire(false,this._carouselPrev);}
if(this._isValidObj(this._carouselPrev)){YAHOO.util.Event.removeListener(this._carouselPrev,"click",this._scrollPrev);}},_enablePrev:function(){this._prevEnabled=true;if(this._prevButtonStateHandlerEvt){this._prevButtonStateHandlerEvt.fire(true,this._carouselPrev);}
if(this._isValidObj(this._carouselPrev)){YAHOO.util.Event.addListener(this._carouselPrev,"click",this._scrollPrev,this);}},_disableNext:function(){if(this.cfg.getProperty("wrap")){return;}
this._nextEnabled=false;if(this._isValidObj(this._nextButtonStateHandlerEvt)){this._nextButtonStateHandlerEvt.fire(false,this._carouselNext);}
if(this._isValidObj(this._carouselNext)){YAHOO.util.Event.removeListener(this._carouselNext,"click",this._scrollNext);}},_enableNext:function(){this._nextEnabled=true;if(this._isValidObj(this._nextButtonStateHandlerEvt)){this._nextButtonStateHandlerEvt.fire(true,this._carouselNext);}
if(this._isValidObj(this._carouselNext)){YAHOO.util.Event.addListener(this._carouselNext,"click",this._scrollNext,this);}},_isValidObj:function(obj){if(null==obj){return false;}
if("undefined"==typeof(obj)){return false;}
return true;}};YAHOO.dagblad.userTabHandler={disableDefaultBehaviour:function(e){Event.preventDefault(e);},init:function(){var homeTab=Dom.get("homeTab");if(homeTab&&Dom.hasClass(homeTab,"article")){var returnHomepage=function(){document.location.href=publicationUrl;}
Event.addListener(homeTab.getElementsByTagName("a")[0],"click",returnHomepage);}
var newTabControl=Dom.get("addNewTab");if(newTabControl){Event.removeListener(newTabControl,"click",YAHOO.dagblad.userTabHandler.disableDefaultBehaviour);Event.addListener(newTabControl,"click",YAHOO.dagblad.userTabHandler.disableDefaultBehaviour);Event.removeListener(newTabControl,"click",YAHOO.dagblad.userTabHandler.addTab);Event.addListener(newTabControl,"click",YAHOO.dagblad.userTabHandler.addTab);var userTabs=Dom.getElementsByClassName("removeTab","a");for(var i=0;i<userTabs.length;i++){var editTabNode=Dom.get("userTab_"+userTabs[i].rel).getElementsByTagName("a")[0];if(editTabNode){Event.removeListener(editTabNode,"click",YAHOO.dagblad.userTabHandler.editTab);Event.addListener(editTabNode,"click",YAHOO.dagblad.userTabHandler.editTab);}
var confirmTabRemove=function(){if(confirm("Weet u zeker dat u dit tabblad wilt verwijderen?")){YAHOO.dagblad.userTabHandler.removeTab(null,this);}}
Event.purgeElement(userTabs[i]);Event.addListener(userTabs[i],"click",confirmTabRemove);}}
else{return false;}},initTabContent:function(){var tabContentSets=Dom.getElementsByClassName("userTabContent","div","tabContent");for(var i=0;i<tabContentSets.length;i++){var tabId=tabContentSets[i].id.split("_")[1];var reload=false;if(i+1==tabContentSets.length){reload=true;}
this.loadTabContent(tabId,reload);}},loadTabContent:function(tabId,reload){var tabContentURL=templateUrl+"component/panel/tabData.jsp?tabId="+tabId;var callback={success:function(o){var tabContentContainer=Dom.get("userTabContent_"+tabId);tabContentContainer.innerHTML=o.responseText;if(reload){initEditablePanels();YAHOO.dagblad.DDApp.init();}},failure:function(o){YAHOO.dagblad.notificationHandler.notify("Tab content kon niet geladen worden.","Foutmelding");}}
var transaction=YAHOO.util.Connect.asyncRequest('GET',tabContentURL,callback,null);},getActiveTab:function(){var selectedTabId=Dom.getElementsByClassName("selected","li","mainTabs")[0].id;if(selectedTabId!="homeTab"){selectedTabId=selectedTabId.split("_")[1];}
return selectedTabId;},addTab:function(){var tabRoot=Dom.get(this.rel);var tabElements=tabRoot.getElementsByTagName("li").length;if(tabElements>=6){return false;}
else{var newTabButton=Dom.get("addNewTab");Dom.removeClass(newTabButton.parentNode,"inactive");newTabButton.setAttribute("title","Voeg een tabblad toe");}
var uniqueString=randomString(6);var uniqueTabName="userTab_"+uniqueString;var newTabRow=document.createElement("li");newTabRow.setAttribute("id",uniqueTabName);var tabLink=document.createElement("span");tabLink.setAttribute("id",uniqueString);var newTabForm=document.createElement("form");newTabForm.setAttribute("id","userTabForm_"+randomString(6));var focusInput=document.createElement("input");focusInput.setAttribute("type","hidden");focusInput.setAttribute("id","focusTarget");newTabForm.appendChild(focusInput);var tabNameInput=document.createElement("input");tabNameInput.setAttribute("value","Nieuwe tab");tabNameInput.setAttribute("type","text");tabNameInput.setAttribute("maxLength","30");tabNameInput.setAttribute("id","newtabinput");var validateInput=function(){validateTextInput(this);}
var validateInputBlur=function(e,tabSettings){validateTextInput(tabSettings.tabNameInput);YAHOO.dagblad.userTabHandler.saveTab(e,{tabLink:tabSettings.tabLinkObj,tabName:tabSettings.tabNameInput.value});}
Event.addListener(tabNameInput,"keyup",validateInput);Event.addListener(tabNameInput,"blur",validateInputBlur,{tabNameInput:tabNameInput,tabLinkObj:tabLink});var submitOnEnter=function(){try{Dom.get("focusTarget").focus();}
catch(e){window.focus();}}
Event.addListener(newTabForm,"submit",YAHOO.dagblad.userTabHandler.disableDefaultBehaviour);Event.addListener(newTabForm,"submit",submitOnEnter);newTabForm.appendChild(tabNameInput);tabLink.appendChild(newTabForm);newTabRow.appendChild(tabLink);var removeTabLink=document.createElement("a");removeTabLink.setAttribute("href","#");removeTabLink.setAttribute("title","Tabblad verwijderen");removeTabLink.setAttribute("rel",uniqueString);var confirmRemove=function(){if(confirm("Weet u zeker dat u dit tabblad wilt verwijderen?")){YAHOO.dagblad.userTabHandler.removeTab(null,this);}}
Event.removeListener(removeTabLink,"click",confirmRemove);Event.addListener(removeTabLink,"click",confirmRemove);Dom.addClass(removeTabLink,"removeTab");newTabRow.appendChild(removeTabLink);tabRoot.appendChild(newTabRow);tabNameInput.focus();if(tabElements>4){Dom.addClass(Dom.get("addNewTab"),"inactive");Dom.get("addNewTab").setAttribute("title","U kunt maximaal 5 tabbladen toevoegen");}},editTab:function(){if(Dom.hasClass(this.parentNode,"selected")){var currentName=this.firstChild.nodeValue;var uniqueString=randomString(6);var tabLink=document.createElement("span");var newTabForm=document.createElement("form");newTabForm.setAttribute("id","userTabForm_"+uniqueString);var focusInput=document.createElement("input");focusInput.setAttribute("type","hidden");focusInput.setAttribute("id","focusTarget");newTabForm.appendChild(focusInput);var orgName=document.createElement("input");orgName.setAttribute("type","hidden");orgName.setAttribute("value",currentName);orgName.setAttribute("id","orgTabName_"+uniqueString);newTabForm.appendChild(orgName);var tabNameInput=document.createElement("input");tabNameInput.setAttribute("id","userTab_"+uniqueString);tabNameInput.setAttribute("maxLength","30");tabNameInput.setAttribute("value",currentName);var validateInput=function(){validateTextInput(this);}
var validateInputBlur=function(e,tabSettings){validateTextInput(tabSettings.tabNameInput);YAHOO.dagblad.userTabHandler.saveTab(e,{tabLink:tabSettings.tabLinkObj,tabName:tabSettings.tabNameInput.value,oldName:currentName});}
Event.addListener(tabNameInput,"keyup",validateInput);Event.addListener(tabNameInput,"blur",validateInputBlur,{tabNameInput:tabNameInput,tabLinkObj:tabLink});newTabForm.appendChild(tabNameInput);tabLink.appendChild(newTabForm);var submitOnEnter=function(){try{Dom.get("focusTarget").focus();}
catch(e){window.focus();}}
Event.addListener(newTabForm,"submit",YAHOO.dagblad.userTabHandler.disableDefaultBehaviour);Event.addListener(newTabForm,"submit",submitOnEnter);this.parentNode.replaceChild(tabLink,this);tabNameInput.focus();}},saveTab:function(e,tabSettings){var tabName=tabSettings.tabName;var tabLink=tabSettings.tabLink;var nextTabNumber=Dom.getElementsByClassName("tabContentItem","div",tabContentRoot).length;var newLinkNode=document.createElement("a");newLinkNode.setAttribute("title",tabName);newLinkNode.setAttribute("href","#tab"+nextTabNumber);newLinkNode.setAttribute("rel","newTab");var linkNodeText=document.createTextNode(tabName);newLinkNode.appendChild(linkNodeText);tabLink.parentNode.replaceChild(newLinkNode,tabLink);if(tabLink.id){var tabContentRoot=Dom.get("tabContent");var uniqueString=randomString(6);var uniqueTabContentName="userTabContent_"+tabLink.id;var newTabContent=document.createElement("div");newTabContent.setAttribute("id",uniqueTabContentName);Dom.addClass(newTabContent,"tabContentItem");tabContentRoot.appendChild(newTabContent);var notifySettings={targetObj:newTabContent,notifyId:"tabIntro_"+tabLink.id,message:"Dit is uw persoonlijke tabblad. U kunt hier uw eigen geselecteerde nieuws, foto's en overige content toevoegen door middel van de 'voeg een paneel toe' button. Met de muis verplaatst u de panelen naar de linker of de rechter kolom. De indeling bepaalt u helemaal zelf.",notifyClass:"tabIntro",cookie:false}
YAHOO.dagblad.notificationHandler.panelNotify(notifySettings);var leftDragList=document.createElement("ul");leftDragList.setAttribute("id","draglist1_"+tabLink.id);Dom.addClass(leftDragList,"draggableColumn");Dom.addClass(leftDragList,"leftColumn");newTabContent.appendChild(leftDragList);var rightDragList=document.createElement("ul");rightDragList.setAttribute("id","draglist2_"+tabLink.id);Dom.addClass(rightDragList,"draggableColumn");Dom.addClass(rightDragList,"rightColumn");newTabContent.appendChild(rightDragList);var tabIdentifier=tabLink.id;}
else{var tabIdentifier=YAHOO.dagblad.userTabHandler.getActiveTab();}
initYuiTabs();Event.removeListener(newLinkNode,"click",YAHOO.dagblad.userTabHandler.editTab);Event.addListener(newLinkNode,"click",YAHOO.dagblad.userTabHandler.editTab);var stURL=publicationUrl+"homepage.do?action=saveTab&tabId="+tabIdentifier+"&tabName="+escape(tabName);var callback={success:function(o){},failure:function(o){if(tabLink.id){YAHOO.dagblad.notificationHandler.notify("Het opslaan van het tabblad is om technische redenen mislukt. Probeer het nogmaals.","Foutmelding");}
else{YAHOO.dagblad.notificationHandler.notify("Nieuwe tabbladnaam kon om technische redenen niet worden opgeslagen. Probeer het nogmaals.","Foutmelding");}}}
if(tabSettings.oldName!=tabSettings.tabName){var transaction=YAHOO.util.Connect.asyncRequest('GET',stURL,callback,null);}},removeTab:function(e,deleteLink){var targetTab=Dom.get("userTab_"+deleteLink.rel);var tabRoot=targetTab.parentNode;var targetTabContent=Dom.get("userTabContent_"+deleteLink.rel);Event.purgeElement(targetTab,true);Event.purgeElement(targetTabContent,true);tabRoot.removeChild(targetTab);targetTabContent.parentNode.removeChild(targetTabContent);var rtURL=publicationUrl+"homepage.do?action=delTab&tabId="+deleteLink.rel;var callback={success:function(o){},failure:function(o){YAHOO.dagblad.notificationHandler.notify("Tabblad kon om technische redenen niet verwijderd worden. Probeer het nogmaals.","Foutmelding");}}
var transaction=YAHOO.util.Connect.asyncRequest('GET',rtURL,callback,null);var tabElements=tabRoot.getElementsByTagName("li").length;if(tabElements<6){Dom.removeClass(Dom.get("addNewTab"),"inactive");Dom.get("addNewTab").setAttribute("title","Voeg een tabblad toe");}}};YAHOO.dagblad.userPanelHandler={disableDefaultBehaviour:function(e){Event.preventDefault(e);},init:function(){this.initWidgets();var newPanelControl=Dom.get("addNewPanel");if(newPanelControl){Event.removeListener(newPanelControl,"click",YAHOO.dagblad.userPanelHandler.disableDefaultBehaviour);Event.addListener(newPanelControl,"click",YAHOO.dagblad.userPanelHandler.disableDefaultBehaviour);Event.removeListener(newPanelControl,"click",YAHOO.dagblad.userPanelHandler.addSetupPanel);Event.addListener(newPanelControl,"click",YAHOO.dagblad.userPanelHandler.addSetupPanel,false);}
else{return false;}},initWidgets:function(){var panelWidgets=Dom.getElementsByClassName("panelWidget","a");for(var i=0;i<panelWidgets.length;i++){if(panelWidgets[i].rel&&!Dom.hasClass(panelWidgets[i],"initialized")){Dom.addClass(panelWidgets[i],"initialized");var panelDataArray=panelWidgets[i].rel.split(";");if(panelDataArray[6]=="false"){var rssFeed=false;}
else{var rssFeed=panelDataArray[6];}
var panelSettings={id:panelDataArray[0],panelName:panelDataArray[1],targetObj:null,mainCategory:panelDataArray[2],subCategories:panelDataArray[3],layoutType:panelDataArray[4],numItems:panelDataArray[5],rssFeed:rssFeed};var drawWidgetPanel=function(e,panelObj){if(!Dom.get("userPanel_"+panelSettings.id)){var tabContentSet=Dom.getElementsByClassName("tabContentItem","div","tabContent");for(var i=0;i<tabContentSet.length;i++){if(tabContentSet[i].style.display=="block"){var selectedTab=tabContentSet[i];break;}}
var dragLists=Dom.getElementsByClassName("draggableColumn","ul",selectedTab);if(!selectedTab||!dragLists||dragLists.length==0){YAHOO.dagblad.notificationHandler.notify("Paneel kan niet worden toegevoegd op deze pagina. Voeg een paneel toe op de homepage of op een persoonlijk tabblad.","Foutmelding");return false;}
var uniqueString=panelSettings.id;var dragListRoot=dragLists[0];var dragItem=document.createElement("li");dragItem.setAttribute("id","dragPanel_"+uniqueString);Dom.addClass(dragItem,"dragItem");var panelContainer=document.createElement("div");panelContainer.setAttribute("id","userPanel_"+uniqueString);Dom.addClass(panelContainer,"hpPanel");Dom.addClass(panelContainer,"editablePanel");dragItem.appendChild(panelContainer);if(!dragListRoot.firstChild){dragListRoot.appendChild(dragItem);}
else{dragListRoot.insertBefore(dragItem,dragListRoot.firstChild);}
panelSettings.targetObj=Dom.get("userPanel_"+panelSettings.id);panelSettings.tabId=YAHOO.dagblad.userTabHandler.getActiveTab();panelSettings.colIndex=0;panelSettings.posIndex=0;panelObj.addPanel(panelSettings);panelObj.savePanel(panelSettings);}
else{YAHOO.dagblad.notificationHandler.notify("U kunt deze Widget slechts 1 maal toevoegen op uw persoonlijke pagina.","Foutmelding");}}
Event.addListener(panelWidgets[i],"click",this.disableDefaultBehaviour);Event.removeListener(panelWidgets[i],"click",drawWidgetPanel);Event.addListener(panelWidgets[i],"click",drawWidgetPanel,this);}}},filterRssImage:function(rawData){var matchBegin=["src=&quot;","src=\"","src='","src="];var matchEnd=["&quot;","\"","'"," "];if(matchBegin.length!=matchEnd.length){return false;}
for(var i=0;i<matchBegin.length;i++){if(rawData.indexOf(matchBegin[i],0)!=-1){var pos1=rawData.indexOf(matchBegin[i],0);var pos2=rawData.indexOf(matchEnd[i],(pos1+matchBegin[i].length));var imgSrc=rawData.substring((pos1+matchBegin[i].length),pos2);break;}}
if(imgSrc){return imgSrc;}
else{return false;}},checkRssImages:function(rssItems,maxNum){var hasImage=false;for(var i=0;i<rssItems.length&&i<maxNum;i++){if(this.filterRssImage(rssItems[i].getElementsByTagName("description")[0].firstChild.nodeValue)){hasImage=true;break;}}
return hasImage;},initRssPanels:function(){var rssPanels=Dom.getElementsByClassName("rssPanel","a","tabContent");for(var i=0;i<rssPanels.length;i++){var panelId=rssPanels[i].id.split("_")[1];var panelConfig=rssPanels[i].rel.split(";");var mainCategory=panelConfig[2];if(mainCategory==5||mainCategory==1){var rssURL=panelConfig[6];}
else{var rssURL=publicationUrl+"rss/rssproxy.jsp?url="+escape(panelConfig[6]);}
if(mainCategory==6){var openNewWindow=true;}
else{var openNewWindow=false;}
var numItems=panelConfig[5];var layoutType=panelConfig[4];var panelId=panelConfig[0];if(layoutType==1||layoutType==3||layoutType==5){var listClass="newsList2";}
else{var listClass="newsList1";}
var panelConentNode=Dom.getElementsByClassName("hpPanelContent","div","userPanel_"+panelId)[0];panelConentNode.innerHTML="";var ajaxLoader=document.createElement("div");Dom.addClass(ajaxLoader,"ajaxLoaderRss");panelConentNode.appendChild(ajaxLoader);var args={panelConentNode:panelConentNode,layoutType:layoutType,listClass:listClass,numItems:numItems,openNewWindow:openNewWindow,panelId:panelId};var callback={success:function(o){var feedLink=o.responseXML.getElementsByTagName("link")[0];var linkInFeed=false;if(feedLink){linkInFeed=feedLink.firstChild.nodeValue;}
var feedItems=o.responseXML.getElementsByTagName("item");var feedType="rss";if(feedItems.length==0){feedItems=o.responseXML.getElementsByTagName("entry");feedType="atom";}
if(feedItems.length<o.argument.numItems){var numberToUse=feedItems.length;}
else{var numberToUse=o.argument.numItems;}
var rssConfig={feedItems:feedItems,numberToGenerate:numberToUse,listClass:o.argument.listClass,layoutType:o.argument.layoutType,openNewWindow:o.argument.openNewWindow,panelId:o.argument.panelId,feedType:feedType,feedLink:linkInFeed}
o.argument.panelConentNode.innerHTML="";o.argument.panelConentNode.appendChild(YAHOO.dagblad.userPanelHandler.generateRSSContent(rssConfig));},failure:function(o){var panelError=document.createElement("div");Dom.addClass(panelError,"panelErrorMsg");var panelErrorText=document.createTextNode("RSS niet beschikbaar");panelError.appendChild(panelErrorText);panelConentNode.innerHTML="";panelConentNode.appendChild(panelError);},argument:args}
var transaction=YAHOO.util.Connect.asyncRequest('GET',rssURL,callback,null);}},movePanel:function(panelSettings,panelDataArray){panelDataArray[8]=panelSettings.colIndex;panelDataArray[9]=panelSettings.posIndex;var panelRel="";for(var i=0;i<panelDataArray.length;i++){if(i>0){panelRel+=";"}
panelRel+=panelDataArray[i].toString();}
var setPanelConfigRel=function(panelId,panelRel){Dom.get("editPanel_"+panelId).setAttribute("rel",panelRel);}
var timedPanelConfig=window.setTimeout(function(){setPanelConfigRel(panelSettings.id,panelRel);},500)
var mvURL=publicationUrl+"homepage.do?action=movePanel&panelId="+panelSettings.id+"&newCol="+panelSettings.colIndex+"&newPos="+panelSettings.posIndex+"&tabId="+YAHOO.dagblad.userTabHandler.getActiveTab();;var callback={success:function(o){},failure:function(o){}}
var transaction=YAHOO.util.Connect.asyncRequest('GET',mvURL,callback,null);},addPanel:function(panelSettings){panelSettings.targetObj.innerHTML="";Dom.setStyle(panelSettings.targetObj,"opacity","0");Dom.addClass(panelSettings.targetObj.parentNode,"loading");var panelHeader=document.createElement("h2");panelHeader.setAttribute("id","panelHeader_"+panelSettings.id);panelSettings.targetObj.appendChild(panelHeader);Dom.addClass(panelHeader,"editable");var editPanelObject=document.createElement("span");Dom.addClass(editPanelObject,"editPanel");var editPanelLink=document.createElement("a");editPanelLink.setAttribute("href","#");editPanelLink.setAttribute("rel",panelSettings.id+";"+panelSettings.panelName+";"+panelSettings.mainCategory+";"+panelSettings.subCategories+";"+panelSettings.layoutType+";"+panelSettings.numItems+";"+panelSettings.rssFeed+";"+panelSettings.tabId+";"+panelSettings.colIndex+";"+panelSettings.posIndex);editPanelLink.setAttribute("id","editPanel_"+panelSettings.id);if(panelSettings.rssFeed.toString()!="false"||trim(panelSettings.rssFeed.toString()).length==0){Dom.addClass(editPanelLink,"rssPanel");}
editPanelObject.appendChild(editPanelLink);if(!Dom.get("userPanelForm_"+panelSettings.id)){Dom.addClass(editPanelLink,"editUserPanel");var editPanelLinkText=document.createTextNode("bewerken");editPanelLink.appendChild(editPanelLinkText);}
Event.addListener(editPanelLink,"click",YAHOO.dagblad.userPanelHandler.disableDefaultBehaviour);panelHeader.appendChild(editPanelObject);var editIconIndicator=document.createElement("span");Dom.addClass(editIconIndicator,"editIcon");var editIconText=document.createTextNode(" ");editIconIndicator.appendChild(editIconText);panelHeader.appendChild(editIconIndicator);var panelHeaderLink=document.createElement("a");panelHeaderLinkText=document.createTextNode(panelSettings.panelName);panelHeaderLink.appendChild(panelHeaderLinkText);panelHeaderLink.setAttribute("href","#");panelHeaderLink.setAttribute("id","panelHeaderLink_"+panelSettings.id);panelHeader.appendChild(panelHeaderLink);var panelContent=document.createElement("div");Dom.addClass(panelContent,"hpPanelContent");panelSettings.targetObj.appendChild(panelContent);if(panelSettings.layoutType==1||panelSettings.layoutType==3||panelSettings.layoutType==5){var listClass="newsList2";}
else{var listClass="newsList1";}
if(panelSettings.rssFeed){if(panelSettings.mainCategory==5){var dataUrl=panelSettings.rssFeed;}
else{var dataUrl=publicationUrl+"rss/rssproxy.jsp?url="+escape(panelSettings.rssFeed);}}
else if(panelSettings.mainCategory=="4"){var dataUrl=templateUrl+"component/panel/weather.jsp";}
else{if(panelSettings.layoutType==0||panelSettings.layoutType==2||panelSettings.layoutType==4){var layoutReqImg=1;}
else{var layoutReqImg=0;}
var dataUrl=templateUrl+"component/panel/panelData.jsp?menu="+panelSettings.mainCategory+"&subCats="+panelSettings.subCategories+"&reqImg="+layoutReqImg+"&numItems="+panelSettings.numItems+"&layout="+panelSettings.layoutType;}
var callback={success:function(o){if(panelSettings.rssFeed){addRssData(o.responseXML,panelSettings.layoutType);}
else if(panelSettings.mainCategory=="4"){addPlainHtml(o.responseText);}
else{if(panelSettings.layoutType==4){addPhotoCarouselData(o.responseXML.getElementsByTagName("articles")[0],panelSettings);}
else{addPanelData(o.responseXML.getElementsByTagName("articles")[0]);}
var panelHeaderLink=Dom.get("panelHeaderLink_"+panelSettings.id);if(panelHeaderLink){var headerLinkUrl=o.responseXML.getElementsByTagName("articles")[0].getAttribute("panelHeaderLink");if(headerLinkUrl){panelHeaderLink.setAttribute("href",headerLinkUrl);}}}
Dom.removeClass(panelSettings.targetObj.parentNode,"loading");fadeinPanel(panelSettings.targetObj);if(!Dom.get("userPanelForm_"+panelSettings.id)){initEditablePanels();YAHOO.dagblad.DDApp.init();}
if(panelSettings.layoutType!=4){YAHOO.dagblad.panelCarousels.init(Dom.getElementsByClassName("carousel-component","div","leftColumn"));}},failure:function(o){YAHOO.dagblad.notificationHandler.notify("Er is een fout opgetreden tijdens het laden van de data. Probeer het nogmaals.","Foutmelding");}}
var transaction=YAHOO.util.Connect.asyncRequest('GET',dataUrl,callback,null);var fadeinPanel=function(panelObj){var panelAnimation=new YAHOO.util.ColorAnim(panelObj,{opacity:{to:1}},1.5,YAHOO.util.Easing.easeOut);panelAnimation.animate();}
var addRssData=function(xmlObj,layoutType){var feedType="rss";var feedItems=xmlObj.getElementsByTagName("item");if(feedItems.length==0){var feedItems=xmlObj.getElementsByTagName("entry");feedType="atom";}
var totalInFeed=feedItems.length;if(totalInFeed<panelSettings.numItems){var numberToUse=totalInFeed;}
else{var numberToUse=panelSettings.numItems;}
if(panelSettings.mainCategory==6){var openNewWindow=true;}
else{var openNewWindow=false;}
var rssConfig={feedItems:feedItems,numberToGenerate:numberToUse,listClass:listClass,layoutType:layoutType,openNewWindow:openNewWindow,feedType:feedType}
panelContent.appendChild(YAHOO.dagblad.userPanelHandler.generateRSSContent(rssConfig));}
var addPlainHtml=function(htmlData){panelContent.innerHTML=htmlData;}
var addPhotoCarouselData=function(xmlObj,panelSettings){Dom.addClass(panelContent,"photoCarousel");var carouselContainer=document.createElement("div");Dom.addClass(carouselContainer,"carouselContainer");Dom.addClass(carouselContainer,"clearFix");panelContent.appendChild(carouselContainer);var carouselMainObject=document.createElement("div");carouselMainObject.setAttribute("id","photoCarousel_"+panelSettings.id);Dom.addClass(carouselMainObject,"carousel-component");carouselContainer.appendChild(carouselMainObject);YAHOO.dagblad.carouselConfigurator.initCarousel(panelSettings);}
var addPanelData=function(xmlObj){var feedItems=xmlObj.getElementsByTagName("article");var totalInFeed=feedItems.length;if(totalInFeed<panelSettings.numItems){var numberToUse=totalInFeed;}
else{var numberToUse=panelSettings.numItems;}
var newList=document.createElement("ul");Dom.addClass(newList,listClass);panelContent.appendChild(newList);for(var i=0;i<numberToUse;i++){var newListItem=document.createElement("li");if(i+1==numberToUse){Dom.addClass(newListItem,"lastItem");}
if((panelSettings.layoutType==2&&feedItems[i].getElementsByTagName("articleThumbUrl")[0].firstChild.nodeValue!="")||(panelSettings.layoutType==3&&feedItems[i].getElementsByTagName("articleThumbUrl")[0].firstChild.nodeValue!="")||panelSettings.layoutType==0){Dom.addClass(newListItem,"noBullet");var panelThumb=document.createElement("div");Dom.addClass(panelThumb,"panelThumb");var thumbUrl=document.createElement("a");thumbUrl.setAttribute("href",feedItems[i].getElementsByTagName("articleUrl")[0].firstChild.nodeValue);if(panelSettings.layoutType==0){var mediaNode=feedItems[i].getElementsByTagName("articleMediaUrl")[0];if(mediaNode){if(mediaNode.getAttribute("type")=="image"){var thumb=document.createElement("img");thumb.setAttribute("src",mediaNode.firstChild.nodeValue);thumb.setAttribute("alt",feedItems[i].getElementsByTagName("articleTitle")[0].firstChild.nodeValue);thumb.setAttribute("title",feedItems[i].getElementsByTagName("articleTitle")[0].firstChild.nodeValue);thumbUrl.appendChild(thumb);newListItem.appendChild(thumbUrl);}else if(mediaNode.getAttribute("type")=="swf"){var flashFrame=document.createElement("div");var randomFlashId=randomString(6);flashFrame.setAttribute("id","swfobj_"+randomFlashId);Dom.addClass(flashFrame,"flashFrame");flashFrame.setAttribute("title",mediaNode.firstChild.nodeValue+","+randomFlashId+",264,176");newListItem.appendChild(flashFrame);}}}
else{var panelThumb=document.createElement("div");Dom.addClass(panelThumb,"panelThumb");Dom.setStyle(thumbUrl,"background-image","url("+feedItems[i].getElementsByTagName("articleCarouselPictureUrl")[0].firstChild.nodeValue+" )");panelThumb.appendChild(thumbUrl);newListItem.appendChild(panelThumb);}}
var newHeading=document.createElement("h4");if(panelSettings.layoutType==0){Dom.addClass(newHeading,"clear");}
newListItem.appendChild(newHeading);var newLink=document.createElement("a");newLink.setAttribute("href",feedItems[i].getElementsByTagName("articleUrl")[0].firstChild.nodeValue);var newLinkText=document.createTextNode(feedItems[i].getElementsByTagName("articleTitle")[0].firstChild.nodeValue);newLink.appendChild(newLinkText);newHeading.appendChild(newLink);if(panelSettings.layoutType==0){var teaserParagraph=document.createElement("p");var teaserContent=document.createTextNode(trimContent(stripTags(feedItems[i].getElementsByTagName("articleTeaser")[0].firstChild.nodeValue),140)+"...");teaserParagraph.appendChild(teaserContent);newListItem.appendChild(teaserParagraph);var readMoreLink=document.createElement("a");readMoreLink.setAttribute("href",feedItems[i].getElementsByTagName("articleUrl")[0].firstChild.nodeValue);var readMoreLinkText=document.createTextNode("Meer..");readMoreLink.appendChild(readMoreLinkText);Dom.addClass(readMoreLink,"readmore");teaserParagraph.appendChild(readMoreLink);}
if(panelSettings.layoutType==5||panelSettings.layoutType==3){var teaserNode=document.createElement("p");teaserNode.innerHTML=trimContent(stripTags(feedItems[i].getElementsByTagName("articleTeaser")[0].firstChild.nodeValue),140)+"...";newListItem.appendChild(teaserNode);}
var subContent=document.createElement("span");Dom.addClass(subContent,"newsStats");newListItem.appendChild(subContent);var subContentDate=feedItems[i].getElementsByTagName("articlePublishDateTime")[0].firstChild.nodeValue;var subContentSource=feedItems[i].getElementsByTagName("articleSource")[0].firstChild.nodeValue;if(subContentSource!=""){subContentSource=" | "+subContentSource;}
var subContentTextNode1=document.createTextNode(subContentDate+subContentSource);subContent.appendChild(subContentTextNode1);var newsCategories=feedItems[i].getElementsByTagName("articleCategories")[0].getElementsByTagName("articleCategory");var deviderNode=document.createTextNode(" | ");subContent.appendChild(deviderNode);for(var y=0;y<newsCategories.length;y++){if(y>0){var commaNode=document.createTextNode(", ");subContent.appendChild(commaNode);}
var catLink=document.createElement("a");catLink.setAttribute("href",newsCategories[y].getAttribute("urlName"));var catLinkText=document.createTextNode(newsCategories[y].firstChild.nodeValue);catLink.appendChild(catLinkText);subContent.appendChild(catLink);}
var deviderNode=document.createTextNode(" | ");subContent.appendChild(deviderNode);if(feedItems[i].getElementsByTagName("articleComments")[0].firstChild.nodeValue!="-1"){var commentsLink=document.createElement("a");commentsLink.setAttribute("href",feedItems[i].getElementsByTagName("articleUrl")[0].firstChild.nodeValue+"#articleComments");if(parseInt(feedItems[i].getElementsByTagName("articleComments")[0].firstChild.nodeValue)>1||parseInt(feedItems[i].getElementsByTagName("articleComments")[0].firstChild.nodeValue)==0){var commentExt=" reacties";}
else{var commentExt=" reactie";}
var commentsLinkText=document.createTextNode(feedItems[i].getElementsByTagName("articleComments")[0].firstChild.nodeValue+commentExt);commentsLink.appendChild(commentsLinkText);subContent.appendChild(commentsLink);}
newList.appendChild(newListItem);}
if(totalInFeed==0){var noContentItem=document.createElement("li");Dom.addClass(noContentItem,"noBullet");if(panelSettings.layoutType==0||panelSettings.layoutType==2||panelSettings.layoutType==3){var noContentTextNode=document.createTextNode("Geen artikelen met foto's beschikbaar");}
else{var noContentTextNode=document.createTextNode("Geen artikelen beschikbaar");}
noContentItem.appendChild(noContentTextNode);newList.appendChild(noContentItem);}}
var panelSetupContainer=Dom.get("userPanel_"+panelSettings.id);var previewMode=Dom.get("panelPreview_"+panelSettings.id);if(panelSetupContainer&&!previewMode){Dom.removeClass(panelSetupContainer,"setupMode");}
var timedFlashLoad=window.setTimeout(function(){YAHOO.dagblad.flashLoader.init();},500);},generateRSSContent:function(rssConfig){var compactRssContent=function(str,stripNewlines,chars){while(str.indexOf("  ")!=-1){str=str.replace("  "," ");}
if(stripNewlines){str=str.replace(/[\n\r]+/g,"");}
return trimContent(str,chars);}
var panelHeader=Dom.get("panelHeader_"+rssConfig.panelId);var panelTitle=Dom.getElementsByClassName("rssTitle","span",panelHeader)[0];if(panelTitle&&rssConfig.feedLink){var feedLinkNode=document.createElement("a");feedLinkNode.setAttribute("href",rssConfig.feedLink);feedLinkNode.setAttribute("target","_blank");var feedLinkText=document.createTextNode(panelTitle.innerHTML);feedLinkNode.appendChild(feedLinkText);panelTitle.innerHTML="";panelTitle.appendChild(feedLinkNode);}
var rssList=document.createElement("ul");Dom.addClass(rssList,rssConfig.listClass);for(var i=0;i<rssConfig.numberToGenerate;i++){var newListItem=document.createElement("li");Dom.addClass(newListItem,"rssData");if(i+1==rssConfig.numberToGenerate){Dom.addClass(newListItem,"lastItem");}
if(rssConfig.feedType=="rss"){var hasDescNode=rssConfig.feedItems[i].getElementsByTagName("description")[0].firstChild;}else if(rssConfig.feedType=="atom"){var hasContentField=rssConfig.feedItems[i].getElementsByTagName("content")[0];if(hasContentField){var hasDescNode=hasContentField.firstChild;}else{var hasSummaryField=rssConfig.feedItems[i].getElementsByTagName("summary")[0];if(hasSummaryField){var hasDescNode=hasSummaryField.firstChild;}}}
if(hasDescNode){var rssImage=this.filterRssImage(hasDescNode.nodeValue);}else{var rssImage=false;}
if(rssImage&&(rssConfig.layoutType==2||rssConfig.layoutType==0||(rssConfig.layoutType==3))){Dom.addClass(newListItem,"noBullet");var panelThumb=document.createElement("div");Dom.addClass(panelThumb,"panelThumb");var thumbUrl=document.createElement("a");if(rssConfig.feedItems[i].getElementsByTagName("link")[0].getAttribute("href")){var linkHref=rssConfig.feedItems[i].getElementsByTagName("link")[0].getAttribute("href")}else{var linkHref=rssConfig.feedItems[i].getElementsByTagName("link")[0].firstChild.nodeValue;}
thumbUrl.setAttribute("href",linkHref);if(rssConfig.openNewWindow){thumbUrl.setAttribute("target","_blank");}
if(rssConfig.layoutType==0){var thumb=document.createElement("img");thumb.setAttribute("src",rssImage);var hasTitle=rssConfig.feedItems[i].getElementsByTagName("title")[0].firstChild;if(hasTitle){var tTitle=hasTitle.nodeValue;}else{var tTitle="Geen titel";}
thumb.setAttribute("alt",tTitle);thumb.setAttribute("title",tTitle);thumbUrl.appendChild(thumb);Dom.setStyle(thumb,"width","265px");newListItem.appendChild(thumbUrl);}
else{var panelThumb=document.createElement("div");Dom.addClass(panelThumb,"panelThumb");Dom.setStyle(thumbUrl,"background-image","url("+rssImage+" )");panelThumb.appendChild(thumbUrl);newListItem.appendChild(panelThumb);}}
var newHeading=document.createElement("h4");if(rssConfig.layoutType==0){Dom.addClass(newHeading,"clear");}
newListItem.appendChild(newHeading);var newLink=document.createElement("a");if(rssConfig.feedItems[i].getElementsByTagName("link")[0].getAttribute("href")){var linkHref=rssConfig.feedItems[i].getElementsByTagName("link")[0].getAttribute("href")}else{var linkHref=rssConfig.feedItems[i].getElementsByTagName("link")[0].firstChild.nodeValue;}
newLink.setAttribute("href",linkHref);if(rssConfig.openNewWindow){newLink.setAttribute("target","_blank");}
var hasTitle=rssConfig.feedItems[i].getElementsByTagName("title")[0].firstChild;if(hasTitle){var iTitle=hasTitle.nodeValue;}else{var iTitle="Geen titel";}
var rwt=iTitle;var newLinkText=document.createTextNode(html_entity_decode(iTitle));newLink.appendChild(newLinkText);newHeading.appendChild(newLink);if(rssConfig.layoutType==5||rssConfig.layoutType==0||rssConfig.layoutType==2||rssConfig.layoutType==3){if(rssConfig.feedType=="rss"){var descNode=rssConfig.feedItems[i].getElementsByTagName("description")[0];}else if(rssConfig.feedType=="atom"){var descNode=rssConfig.feedItems[i].getElementsByTagName("summary")[0];if(!descNode){var descNode=rssConfig.feedItems[i].getElementsByTagName("content")[0];}}
if(descNode.firstChild){var teaserNode=document.createElement("p");if(rssConfig.layoutType==0){if(rssConfig.panelId=="editorial-left"){var numChars=600;}else{var numChars=300;}}
else if(rssConfig.layoutType==2)var numChars=60;else numChars=70;var teaserContent=compactRssContent(stripTags(html_entity_decode(descNode.firstChild.nodeValue)),true,numChars)+"... ";var teaserTextNode=document.createTextNode("");teaserNode.appendChild(teaserTextNode);var readMoreLink=document.createElement("a");var readMoreLinkText=document.createTextNode("Meer");readMoreLink.appendChild(readMoreLinkText);if(rssConfig.feedItems[i].getElementsByTagName("link")[0].getAttribute("href")){var linkHref=rssConfig.feedItems[i].getElementsByTagName("link")[0].getAttribute("href")}else{var linkHref=rssConfig.feedItems[i].getElementsByTagName("link")[0].firstChild.nodeValue;}
readMoreLink.setAttribute("href",linkHref);if(rssConfig.openNewWindow){readMoreLink.setAttribute("target","_blank");}
newListItem.appendChild(teaserNode);teaserNode.innerHTML=teaserContent;teaserNode.appendChild(readMoreLink);}}
if(rssConfig.panelId=="editorial-right"&&i==0){}
else{rssList.appendChild(newListItem);}}
if(rssConfig.numberToGenerate==0){var noContentItem=document.createElement("li");Dom.addClass(noContentItem,"noBullet");var noContentTextNode=document.createTextNode("Geen artikelen beschikbaar");noContentItem.appendChild(noContentTextNode);rssList.appendChild(noContentItem);}
return rssList;},addSetupPanel:function(e,panelData){var reloadLayoutViews=function(panelListId){var panelLayoutList=Dom.get(panelListId);var panelLayoutListItems=panelLayoutList.getElementsByTagName("li");var selectedCategory=Dom.getElementsByClassName("selected","li","panelMainCategoryList_"+uniqueString)[0];var layoutSet=selectedCategory.firstChild.rel;for(var i=0;i<panelLayoutListItems.length;i++){if(!staticViewSettings[layoutSet].inArray(i)){panelLayoutListItems[i].style.display="none";Dom.removeClass(panelLayoutListItems[i],"selected");}
else{panelLayoutListItems[i].style.display="block";}}}
var setStep2Content=function(e,id){var targetObject=Dom.get("step2ContentPlaceHolder_"+id);if(panelData){var selectedCategory=Dom.getElementsByClassName("selected","li","panelMainCategoryList_"+uniqueString)[0].firstChild.rel;}
else{var selectedCategory=e.rel;}
Event.purgeElement(targetObject,true);targetObject.innerHTML="";switch(parseInt(selectedCategory)){case 0:case 2:case 3:{var panelHelp2=document.createElement("strong");var panelHelp2Text=document.createTextNode("Kies de rubriek(en) die u wilt toevoegen");panelHelp2.appendChild(panelHelp2Text);targetObject.appendChild(panelHelp2);var subCatList=document.createElement("ul");subCatList.setAttribute("id","panelSubCategoryList_"+uniqueString);Dom.addClass(subCatList,"panelSubCategoryList");Dom.addClass(subCatList,"clearFix");targetObject.appendChild(subCatList);if(panelData&&panelData.subCategories.length>0){var selectedSubCategories=panelData.subCategories.split(",");}
var subcatUrl=templateUrl+"component/panel/menuStep2/getSubmenuItems.jsp?menu="+selectedCategory;var callback={success:function(o){addSubcategories(o.responseXML.getElementsByTagName("item"));},failure:function(o){YAHOO.dagblad.notificationHandler.notify("Fout tijdens inladen categorieï¿½n, probeer nogmaals","Foutmelding");}}
var transaction=YAHOO.util.Connect.asyncRequest('GET',subcatUrl,callback,null);var addSubcategories=function(catXMLObj){for(var i=0;i<catXMLObj.length;i++){var catId=trim(catXMLObj[i].getElementsByTagName("id")[0].firstChild.nodeValue);var catName=trim(catXMLObj[i].getElementsByTagName("name")[0].firstChild.nodeValue);var newSubCategory=document.createElement("li");var newSubCatTextNode=document.createTextNode("");newSubCategory.appendChild(newSubCatTextNode);if(selectedCategory==2){var rgType="radio";var rgName="name=\"thema_subcat\"";}
else{var rgType="checkbox"
var rgName="";}
if(panelData&&panelData.subCategories.length>0&&selectedSubCategories.inArray(catId)){var rgChecked="checked=\"checked\"";}
else{rgChecked="";}
var compatibleInput='<input type="'+rgType+'" class="checkbox" value="'+catId+'" '+rgName+' id="subcat_'+catId+'_'+uniqueString+'" '+rgChecked+' /><label for="subcat_'+catId+'_'+uniqueString+'">'+catName+'</label>';newSubCategory.innerHTML=compatibleInput;subCatList.appendChild(newSubCategory);}}}
break;case 1:case 5:{var panelHelp2=document.createElement("strong");if(parseInt(selectedCategory)==1){var rssContext=["blog","Feeds"];}
else{var rssContext=["RSS feed","Feeds"];}
var panelHelp2Text=document.createTextNode("Selecteer een "+rssContext[0]);panelHelp2.appendChild(panelHelp2Text);targetObject.appendChild(panelHelp2);var blogFeeds=document.createElement("div");Dom.addClass(blogFeeds,"rssSetupRow");targetObject.appendChild(blogFeeds);var feedListLabel=document.createElement("label");feedListLabelText=document.createTextNode(rssContext[1]);feedListLabel.appendChild(feedListLabelText);feedListLabel.setAttribute("for","blogRSSList_"+uniqueString);blogFeeds.appendChild(feedListLabel);var subcatUrl=templateUrl+"component/panel/menuStep2/getSubmenuItems.jsp?menu="+selectedCategory;var callback={success:function(o){addBlogFeeds(o.responseXML.getElementsByTagName("item"));},failure:function(o){YAHOO.dagblad.notificationHandler.notify("Fout tijdens inladen blogs, probeer het nogmaals","Foutmelding");}}
var transaction=YAHOO.util.Connect.asyncRequest('GET',subcatUrl,callback,null);var setBlogFeed=function(){}
var addBlogFeeds=function(feedXMLObj){var feedList=document.createElement("select");feedList.setAttribute("id","blogRSSList_"+uniqueString);feedList.options[0]=new Option('Maak een keuze','');Event.addListener(feedList,"change",setBlogFeed);populateBlogFeedList(feedList,feedXMLObj);blogFeeds.appendChild(feedList);}
var populateBlogFeedList=function(feedList,feedXMLObj){for(var i=0;i<feedXMLObj.length;i++){var rssUrl=trim(feedXMLObj[i].getElementsByTagName("url")[0].firstChild.nodeValue);var oTitle=trim(feedXMLObj[i].getElementsByTagName("name")[0].firstChild.nodeValue);feedList.options[i+1]=new Option(oTitle,rssUrl);if(panelData&&panelData.rssFeed==rssUrl){feedList.options[i+1].selected=true;}}}}
break;case 6:{var panelHelp2=document.createElement("strong");var panelHelp2Text=document.createTextNode("Voer de locatie (url) van de RSS feed in.");panelHelp2.appendChild(panelHelp2Text);targetObject.appendChild(panelHelp2);var rssForm=document.createElement("form");targetObject.appendChild(rssForm);rssForm.setAttribute("id","rssForm_"+uniqueString);Dom.addClass(rssForm,"userRssForm");var rssFormFieldset=document.createElement("fieldset");rssForm.appendChild(rssFormFieldset);var defaultFeeds=document.createElement("div");Dom.addClass(defaultFeeds,"rssSetupRow");rssFormFieldset.appendChild(defaultFeeds);var feedListLabel=document.createElement("label");feedListLabelText=document.createTextNode("Populair");feedListLabel.appendChild(feedListLabelText);feedListLabel.setAttribute("for","defautRSSList");defaultFeeds.appendChild(feedListLabel);var feedList=document.createElement("select");feedList.setAttribute("id","defautRSSList");feedList.options[0]=new Option('Maak een keuze','');var setRSSUrl=function(){Dom.get("rssInput_"+uniqueString).value=this.value;if(this.options[this.selectedIndex].value!=""){Dom.get("validRss_"+uniqueString).value="true"}
else{Dom.get("validRss_"+uniqueString).value="false"}}
Event.addListener(feedList,"change",setRSSUrl);var pfURL=templateUrl+"component/panel/menuStep2/getSubmenuItems.jsp?menu="+selectedCategory;var callback={success:function(o){addPopularListitems(o.responseXML.getElementsByTagName("item"));},failure:function(o){}}
var transaction=YAHOO.util.Connect.asyncRequest('GET',pfURL,callback,null);var addPopularListitems=function(feedXMLObj){for(var i=0;i<feedXMLObj.length;i++){feedList.options[i+1]=new Option(trim(feedXMLObj[i].getElementsByTagName("name")[0].firstChild.nodeValue),trim(feedXMLObj[i].getElementsByTagName("url")[0].firstChild.nodeValue));}}
defaultFeeds.appendChild(feedList);var validationInput=document.createElement("input");validationInput.setAttribute("type","hidden");validationInput.setAttribute("id","validRss_"+uniqueString);if(panelData&&(panelData.rssFeed!="false"&&panelData.rssFeed!=false)){validationInput.setAttribute("value","true");}
else{validationInput.setAttribute("value","false");}
rssFormFieldset.appendChild(validationInput);var formRow=document.createElement("div");Dom.addClass(formRow,"rssSetupRow");rssFormFieldset.appendChild(formRow);var rssLabel=document.createElement("label");var rssLabelText=document.createTextNode("Url: ");rssLabel.appendChild(rssLabelText);formRow.appendChild(rssLabel);var resetRssStatus=function(){Dom.get("validRss_"+uniqueString).value="false";}
var rssInput=document.createElement("input");rssInput.setAttribute("id","rssInput_"+uniqueString);Dom.addClass(rssInput,"textField");Event.addListener(rssInput,"blur",YAHOO.dagblad.userPanelHandler.validateRss,uniqueString);Event.addListener(rssInput,"keyup",resetRssStatus);rssInput.setAttribute("type","text");if(panelData.rssFeed){rssInput.setAttribute("value",panelData.rssFeed);}
else{rssInput.setAttribute("value","");}
formRow.appendChild(rssInput);var ajaxLoader=document.createElement("div");ajaxLoader.setAttribute("id","ajaxLoader_"+uniqueString);var dummyTextNode=document.createTextNode(" ");ajaxLoader.appendChild(dummyTextNode);Dom.addClass(ajaxLoader,"ajaxLoader");formRow.appendChild(ajaxLoader);}
break;}}
var setErrorMessage=function(errorMessageObject,message){if(message!=""){errorMessageObject.style.visibility="visible";}
else{errorMessageObject.style.visibility="hidden";}
errorMessageObject.firstChild.nodeValue=message;}
var switchPanelStep=function(e,stepId){if(!Dom.getElementsByClassName("selected","li","panelMainCategoryList_"+uniqueString)[0]){setErrorMessage(Dom.get("panelErrorMsg_"+uniqueString+"_1"),"Fout: Selecteer een categorie");return false;}
if(stepId){var target=Dom.get(stepId);}
else{var target=this;}
if(target.rel=="panelStepContent_"+uniqueString+"_2"){var selectedCategory=Dom.getElementsByClassName("selected","li","panelMainCategoryList_"+uniqueString);if(!selectedCategory[0]){setErrorMessage(Dom.get("panelErrorMsg_"+uniqueString+"_1"),"Fout: Selecteer een categorie");return false;}
else{setErrorMessage(Dom.get("panelErrorMsg_"+uniqueString+"_1"),"");}}
if(target.rel=="panelStepContent_"+uniqueString+"_3"){var allSubCategories=Dom.getElementsByClassName("checkbox","input","panelSubCategoryList_"+uniqueString);var selectedCategory=Dom.getElementsByClassName("selected","li","panelMainCategoryList_"+uniqueString)[0].firstChild.rel
var step2Valid=false;var step2ErrorMsg="";switch(parseInt(selectedCategory)){case 0:case 2:case 3:case 4:{step2ErrorMsg="Selecteer minimaal 1 rubriek";for(var i=0;i<allSubCategories.length;i++){if(allSubCategories[i].checked){step2Valid=true;break;}}}
break;case 1:case 5:{step2ErrorMsg="Selecteer een RSS feed";var blogList=document.getElementById("blogRSSList_"+uniqueString);if(blogList.options[blogList.selectedIndex].value!=""){step2Valid=true;}}
break;case 6:{if(Dom.get("ajaxLoader_"+uniqueString).style.visibility=="visible"){step2ErrorMsg="Bezig met valideren";}
else{step2ErrorMsg="Voer een geldige URL in";}
Dom.removeClass("panelErrorMsg_"+uniqueString+"_2","panelRssValid");if(Dom.get("validRss_"+uniqueString).value=="true"){step2Valid=true;}}
break;}
if(!step2Valid){setErrorMessage(Dom.get("panelErrorMsg_"+uniqueString+"_2"),step2ErrorMsg);return false;}
else{reloadLayoutViews("panelLayoutList_"+uniqueString);setErrorMessage(Dom.get("panelErrorMsg_"+uniqueString+"_2"),"");}}
var allTabs=Dom.get("panelStepList_"+uniqueString).getElementsByTagName("a");var allTabsContents=Dom.getElementsByClassName("panelStepContent","fieldset","panelContent_"+uniqueString);for(var i=0;i<allTabs.length;i++){Dom.removeClass(allTabs[i].parentNode,"active");allTabsContents[i].style.display="none";}
Dom.addClass(target.parentNode,"active");Dom.get(target.rel).style.display="block";}
var getSelectedSubCategories=function(){var allSubCategories=Dom.getElementsByClassName("checkbox","input","panelSubCategoryList_"+uniqueString);var selectedSubCategories="";for(var i=0;i<allSubCategories.length;i++){if(allSubCategories[i].checked){if(selectedSubCategories==""){selectedSubCategories+=allSubCategories[i].value;}
else{selectedSubCategories+=","+allSubCategories[i].value;}}}
return selectedSubCategories;}
var validateFinalStep=function(){var step3Valid=false;var selectedLayout=Dom.getElementsByClassName("selected","li","panelLayoutList_"+uniqueString);var selectedMainCategory=Dom.getElementsByClassName("selected","li","panelMainCategoryList_"+uniqueString)[0].firstChild.rel;if(panelData){var panelConfigObj=Dom.get("editPanel_"+panelData.id);if(panelConfigObj){var panelConfigArray=panelConfigObj.rel.split(";");var panelCol=panelConfigArray[8];var panelPos=panelConfigArray[9];}}
else{var panelCol=0;var panelPos=0;}
if(selectedLayout[0]){step3Valid=true;var selectedSubCategories=getSelectedSubCategories();var numArticleSelect=Dom.get("numberOfItemsSelect_"+uniqueString);if(Dom.get("rssInput_"+uniqueString)){var rssUrl=Dom.get("rssInput_"+uniqueString).value;}
else if(selectedMainCategory==5||selectedMainCategory==1){var RSSList=Dom.get("blogRSSList_"+uniqueString);var rssUrl=RSSList.options[RSSList.selectedIndex].value;}
else{var rssUrl=false;}
var panelSettings={id:uniqueString,panelName:Dom.get("panelName_"+uniqueString).value,targetObj:Dom.get("userPanel_"+uniqueString),mainCategory:selectedMainCategory,subCategories:selectedSubCategories,layoutType:selectedLayout[0].firstChild.rel,numItems:numArticleSelect.options[numArticleSelect.selectedIndex].value,rssFeed:rssUrl,tabId:YAHOO.dagblad.userTabHandler.getActiveTab(),colIndex:panelCol,posIndex:panelPos}}
else if(selectedMainCategory==4){step3Valid=true;var panelSettings={id:uniqueString,panelName:Dom.get("panelName_"+uniqueString).value,targetObj:Dom.get("userPanel_"+uniqueString),layoutType:6,numItems:0,mainCategory:selectedMainCategory,subCategories:"",rssFeed:false,tabId:YAHOO.dagblad.userTabHandler.getActiveTab(),colIndex:panelCol,posIndex:panelPos}}
if(!step3Valid){setErrorMessage(Dom.get("panelErrorMsg_"+uniqueString+"_3"),"Selecteer een weergave");return false;}
else{setErrorMessage(Dom.get("panelErrorMsg_"+uniqueString+"_2"),"");YAHOO.dagblad.userPanelHandler.savePanel(panelSettings);}}
var tpc=["Nieuws","Blogs","Thema's","","Weer","RSS selectie","Eigen RSS feed"];var tlay=["Grote foto","Koppen","Lijst van kleine foto's","Foto's, kop + inleiding","Foto's","Kop + inleiding"];var minResultsPerView=[1,1,1,1,2,1];var maxResultsPerView=[10,15,10,10,24,10];var staticViewSettings=new Array();staticViewSettings[0]=[0,1,2,3,4,5];staticViewSettings[1]=[null,1,5];staticViewSettings[2]=[0,1,2,3,4,5];staticViewSettings[3]=[0,1,2,3,4,5];staticViewSettings[4]=[null,0];staticViewSettings[5]=[null,1,5];staticViewSettings[6]=[0,1,2,3,5];var tabContentSet=Dom.getElementsByClassName("tabContentItem","div","tabContent");for(var i=0;i<tabContentSet.length;i++){if(tabContentSet[i].style.display=="block"){var selectedTab=tabContentSet[i];break;}}
var dragLists=Dom.getElementsByClassName("draggableColumn","ul",selectedTab);if(!selectedTab||!dragLists){return false;}
if(panelData){var uniqueString=panelData.id;var dragListRoot=Dom.get("dragPanel_"+panelData.id).parentNode;}
else{var uniqueString=randomString(6);var dragListRoot=dragLists[0];}
var activeSetupPanels=Dom.getElementsByClassName("userPanelForm","form",selectedTab);if(activeSetupPanels.length>0){var notifySettings={targetObj:selectedTab,notifyId:"panelNotify",message:"U kunt slechts &eacute;&eacute;n paneel tegelijk bewerken. Sluit eerst het openstaande setup paneel.",notifyClass:"tabIntro",cookie:false}
YAHOO.dagblad.notificationHandler.panelNotify(notifySettings);return false;}
var dragItem=document.createElement("li");dragItem.setAttribute("id","dragPanel_"+uniqueString);Dom.addClass(dragItem,"dragItem");var panelContainer=document.createElement("div");panelContainer.setAttribute("id","userPanel_"+uniqueString);Dom.addClass(panelContainer,"hpPanel");Dom.addClass(panelContainer,"editablePanel");Dom.addClass(panelContainer,"setupMode");dragItem.appendChild(panelContainer);var submitOnEnter=function(e,id){try{Dom.get("focusTarget_"+id).focus();}
catch(e){window.focus();}}
var panelForm=document.createElement("form");panelForm.setAttribute("id","userPanelForm_"+uniqueString);Dom.addClass(panelForm,"userPanelForm");panelContainer.appendChild(panelForm);Event.addListener(panelForm,"submit",YAHOO.dagblad.userPanelHandler.disableDefaultBehaviour);Event.addListener(panelForm,"submit",submitOnEnter,uniqueString);var focusInput=document.createElement("input");focusInput.setAttribute("type","hidden");focusInput.setAttribute("id","focusTarget_"+uniqueString);panelForm.appendChild(focusInput);var panelHeader=document.createElement("div");Dom.addClass(panelHeader,"panelHeader");panelForm.appendChild(panelHeader);var closeButton=document.createElement("a");closeButton.setAttribute("id","newPanelCancel_"+uniqueString);closeButton.setAttribute("rel",uniqueString);closeButton.setAttribute("href","#");closeButton.setAttribute("title","Sluiten");panelHeader.appendChild(closeButton);Dom.addClass(closeButton,"newPanelCancel");Event.addListener(closeButton,"click",YAHOO.dagblad.userPanelHandler.disableDefaultBehaviour);if(panelData.id){var updateMode=true;}
else{var updateMode=false;}
var confirmedRemovePanel=function(){if(window.confirm("Weet u zeker dat u dit paneel wilt verwijderen?")){YAHOO.dagblad.userPanelHandler.removePanel(this,updateMode);}}
if(panelData){panelData.targetObj=Dom.get("userPanel_"+panelData.id);Event.addListener(closeButton,"click",YAHOO.dagblad.userPanelHandler.cancelPanel,panelData);}
else{var cancelSetupPanel=function(){YAHOO.dagblad.userPanelHandler.removePanel({rel:uniqueString},false);}
Event.addListener(closeButton,"click",cancelSetupPanel);}
var panelNameInput=document.createElement("input");panelNameInput.setAttribute("type","text");if(panelData){var panelValue=panelData.panelName;}
else{var panelValue="Nieuw paneel";}
panelNameInput.setAttribute("value",panelValue);panelNameInput.setAttribute("name","panelName_"+uniqueString);panelNameInput.setAttribute("id","panelName_"+uniqueString);panelNameInput.setAttribute("maxLength","25");panelHeader.appendChild(panelNameInput);var validateInput=function(){var tVal=document.getElementById(this.id);validateTextInput(tVal);}
Event.addListener(panelNameInput,"keyup",validateInput);Event.addListener(panelNameInput,"blur",validateInput);var setPreviewName=function(){if(Dom.get("panelHeader_"+uniqueString)){window.setTimeout(function(){Dom.get("panelHeader_"+uniqueString).firstChild.nodeValue=Dom.get("panelName_"+uniqueString).value;},0);}}
Event.addListener(panelNameInput,"keypress",setPreviewName);var panelContent=document.createElement("div");panelContent.setAttribute("id","panelContent_"+uniqueString);Dom.addClass(panelContent,"panelContent");panelForm.appendChild(panelContent);var panelStepList=document.createElement("ul");panelStepList.setAttribute("id","panelStepList_"+uniqueString);Dom.addClass(panelStepList,"clearFix");Dom.addClass(panelStepList,"panelStepList");panelContent.appendChild(panelStepList);var numberOfSteps=3;var stepContentContainers=new Array();for(var i=1;i<=numberOfSteps;i++){var newStepButton=document.createElement("li");Dom.addClass(newStepButton,"step"+i);if(panelData.mainCategory&&panelData.mainCategory==4&&i>1){Dom.addClass(newStepButton,"disabled");}
if(i==1){Dom.addClass(newStepButton,"active");}
if(i==numberOfSteps){Dom.addClass(newStepButton,"lastItem");}
var newStepButtonLink=document.createElement("a");newStepButton.appendChild(newStepButtonLink);newStepButtonLink.setAttribute("href","#");newStepButtonLink.setAttribute("rel","panelStepContent_"+uniqueString+"_"+i);newStepButtonLink.setAttribute("id","panelStepTab_"+uniqueString+"_"+i);var newStepButtonLinkText=document.createTextNode("Stap "+i);newStepButtonLink.appendChild(newStepButtonLinkText);panelStepList.appendChild(newStepButton);Event.addListener(newStepButtonLink,"click",YAHOO.dagblad.userPanelHandler.disableDefaultBehaviour);Event.addListener(newStepButtonLink,"click",switchPanelStep);stepContentContainers[i]=document.createElement("fieldset");stepContentContainers[i].setAttribute("id","panelStepContent_"+uniqueString+"_"+i);if(i!=1){stepContentContainers[i].style.display="none";}
Dom.addClass(stepContentContainers[i],"panelStepContent");panelContent.appendChild(stepContentContainers[i]);}
var panelHelp1=document.createElement("strong");var panelHelp1Text=document.createTextNode("Kies de categorie die u wilt toevoegen");panelHelp1.appendChild(panelHelp1Text);stepContentContainers[1].appendChild(panelHelp1);var mainCatList=document.createElement("ul");mainCatList.setAttribute("id","panelMainCategoryList_"+uniqueString);Dom.addClass(mainCatList,"panelMainCategoryList");Dom.addClass(mainCatList,"clearFix");stepContentContainers[1].appendChild(mainCatList);var selectMainCategory=function(){var allCategoryObjects=Dom.get("panelMainCategoryList_"+uniqueString).getElementsByTagName("li");for(var i=0;i<allCategoryObjects.length;i++){Dom.removeClass(allCategoryObjects[i],"selected");}
Dom.addClass(this.parentNode,"selected");Dom.get("panelErrorMsg_"+uniqueString+"_2").style.visibility="hidden";Dom.get("panelErrorMsg_"+uniqueString+"_3").style.visibility="hidden";Dom.get("panelErrorMsg_"+uniqueString+"_2").firstChild.nodeValue="";Dom.get("panelErrorMsg_"+uniqueString+"_3").firstChild.nodeValue="";if(this.rel==4){Dom.addClass(Dom.get("panelStepTab_"+uniqueString+"_2").parentNode,"disabled");Dom.addClass(Dom.get("panelStepTab_"+uniqueString+"_3").parentNode,"disabled");Dom.getElementsByClassName("nextStep","a","panelStepContent_"+uniqueString+"_1")[0].style.display="none";if(!Dom.get("addSpecialButton_"+uniqueString)){var addSpecialButton=document.createElement("a");addSpecialButton.setAttribute("href","#");addSpecialButton.setAttribute("id","addSpecialButton_"+uniqueString);Dom.get("panelStepContent_"+uniqueString+"_1").appendChild(addSpecialButton);Dom.addClass(addSpecialButton,"finalSpecialStep");Event.addListener(addSpecialButton,"click",YAHOO.dagblad.userPanelHandler.disableDefaultBehaviour);Event.addListener(addSpecialButton,"click",validateFinalStep);}}
else{Dom.removeClass(Dom.get("panelStepTab_"+uniqueString+"_2").parentNode,"disabled");Dom.removeClass(Dom.get("panelStepTab_"+uniqueString+"_3").parentNode,"disabled");Dom.getElementsByClassName("nextStep","a","panelStepContent_"+uniqueString+"_1")[0].style.display="block";var addSpecialButton=Dom.get("addSpecialButton_"+uniqueString);if(addSpecialButton){addSpecialButton.parentNode.removeChild(addSpecialButton);}}}
for(var i=0;i<tpc.length;i++){if(tpc[i]!=""){var newCategory=document.createElement("li");var newCategoryLink=document.createElement("a");newCategory.appendChild(newCategoryLink);newCategoryLink.setAttribute("href","#");newCategoryLink.setAttribute("rel",i);var newCategoryLinkText=document.createTextNode(tpc[i]);newCategoryLink.appendChild(newCategoryLinkText);Dom.addClass(newCategoryLink,"folder");mainCatList.appendChild(newCategory);Event.addListener(newCategoryLink,"click",YAHOO.dagblad.userPanelHandler.disableDefaultBehaviour);Event.addListener(newCategoryLink,"click",selectMainCategory);var timedContentSet=function(){var parentEl=this;window.setTimeout(function(){setStep2Content(parentEl,uniqueString);},0)}
Event.addListener(newCategoryLink,"click",timedContentSet);if(panelData.mainCategory&&panelData.mainCategory==i){Dom.addClass(newCategory,"selected");}}}
var panelErrorMsg1=document.createElement("div");panelErrorMsg1.setAttribute("id","panelErrorMsg_"+uniqueString+"_1");Dom.addClass(panelErrorMsg1,"panelErrorMsg");var errorTextNode=document.createTextNode(" ");panelErrorMsg1.appendChild(errorTextNode);stepContentContainers[1].appendChild(panelErrorMsg1);var nextStepButton=document.createElement("a");nextStepButton.setAttribute("href","#");stepContentContainers[1].appendChild(nextStepButton);Dom.addClass(nextStepButton,"nextStep");Event.addListener(nextStepButton,"click",YAHOO.dagblad.userPanelHandler.disableDefaultBehaviour);Event.addListener(nextStepButton,"click",switchPanelStep,"panelStepTab_"+uniqueString+"_2");if(panelData.mainCategory&&panelData.mainCategory==4){nextStepButton.style.display="none";var addSpecialButton=document.createElement("a");addSpecialButton.setAttribute("href","#");addSpecialButton.setAttribute("id","addSpecialButton_"+uniqueString);stepContentContainers[1].appendChild(addSpecialButton);Dom.addClass(addSpecialButton,"finalSpecialStep");Event.addListener(addSpecialButton,"click",YAHOO.dagblad.userPanelHandler.disableDefaultBehaviour);Event.addListener(addSpecialButton,"click",validateFinalStep);}
var step2ContentPlaceHolder=document.createElement("div");step2ContentPlaceHolder.setAttribute("id","step2ContentPlaceHolder_"+uniqueString);stepContentContainers[2].appendChild(step2ContentPlaceHolder);var panelErrorMsg2=document.createElement("div");panelErrorMsg2.setAttribute("id","panelErrorMsg_"+uniqueString+"_2");Dom.addClass(panelErrorMsg2,"panelErrorMsg");var errorTextNode=document.createTextNode(" ");panelErrorMsg2.appendChild(errorTextNode);stepContentContainers[2].appendChild(panelErrorMsg2);var nextStepButton=document.createElement("a");nextStepButton.setAttribute("href","#");stepContentContainers[2].appendChild(nextStepButton);Dom.addClass(nextStepButton,"nextStep");Event.addListener(nextStepButton,"click",YAHOO.dagblad.userPanelHandler.disableDefaultBehaviour);Event.addListener(nextStepButton,"click",switchPanelStep,"panelStepTab_"+uniqueString+"_3");var panelHelp3=document.createElement("strong");var panelHelp3Text=document.createTextNode("Kies de opmaak");panelHelp3.appendChild(panelHelp3Text);stepContentContainers[3].appendChild(panelHelp3);var layoutList=document.createElement("ul");layoutList.setAttribute("id","panelLayoutList_"+uniqueString);Dom.addClass(layoutList,"panelLayoutList");Dom.addClass(layoutList,"clearFix");stepContentContainers[3].appendChild(layoutList);var selectLayout=function(){var allLayoutObjects=Dom.get("panelLayoutList_"+uniqueString).getElementsByTagName("li");for(var i=0;i<allLayoutObjects.length;i++){Dom.removeClass(allLayoutObjects[i],"selected");}
Dom.addClass(this.parentNode,"selected");Dom.get("previewButton_"+uniqueString).style.display="block";}
var setNumberOptions=function(e,layoutType){if(layoutType){var selectedLayout=layoutType;}
else{var selectedLayout=this.rel;}
var maxResults=maxResultsPerView[selectedLayout];var minResults=minResultsPerView[selectedLayout];var selectBoxRoot=Dom.get("numberOfItemsSelect_"+uniqueString);selectBoxRoot.removeAttribute("disabled");for(i=selectBoxRoot.length-1;i>=0;i--)selectBoxRoot.remove(i);var specialCounter=0;for(i=minResults;i<=maxResults;i++){if(i>1){var optionName=i+" artikelen";}
else{var optionName=i+" artikel";}
var optionValue=i;if(selectedLayout==4){if(isEven(i)){selectBoxRoot.options[specialCounter]=new Option(optionName,optionValue);if(panelData.numItems&&panelData.numItems==optionValue){selectBoxRoot.options[specialCounter].selected="selected";}
specialCounter++;}}
else{selectBoxRoot.options[i-minResults]=new Option(optionName,optionValue);if(panelData.numItems&&panelData.numItems==optionValue){selectBoxRoot.options[i-minResults].selected="selected";}}}}
for(var i=0;i<tlay.length;i++){var newLayout=document.createElement("li");var newLayoutLink=document.createElement("a");newLayout.appendChild(newLayoutLink);newLayoutLink.setAttribute("href","#");newLayoutLink.setAttribute("rel",i);var newLayoutLinkText=document.createTextNode(tlay[i]);newLayoutLink.appendChild(newLayoutLinkText);Dom.addClass(newLayoutLink,"panelLayout_"+(i+1));layoutList.appendChild(newLayout);Event.addListener(newLayoutLink,"click",YAHOO.dagblad.userPanelHandler.disableDefaultBehaviour);Event.addListener(newLayoutLink,"click",selectLayout);Event.addListener(newLayoutLink,"click",setNumberOptions,null);if(panelData.layoutType&&panelData.layoutType==i){Dom.addClass(newLayout,"selected");}}
var numberOfItemsLabel=document.createElement("label");numberOfItemsLabel.setAttribute("for","numberOfItemsSelect_"+uniqueString);Dom.addClass(numberOfItemsLabel,"numberOfItemsLabel");var numberOfItemsLabelText=document.createTextNode("Toon:");numberOfItemsLabel.appendChild(numberOfItemsLabelText);stepContentContainers[3].appendChild(numberOfItemsLabel);var numberOfItemsSelect=document.createElement("select");numberOfItemsSelect.setAttribute("id","numberOfItemsSelect_"+uniqueString);numberOfItemsSelect.setAttribute("disabled","disabled");Dom.addClass(numberOfItemsSelect,"selectbox");stepContentContainers[3].appendChild(numberOfItemsSelect);var panelErrorMsg3=document.createElement("div");panelErrorMsg3.setAttribute("id","panelErrorMsg_"+uniqueString+"_3");Dom.addClass(panelErrorMsg3,"panelErrorMsg");var errorTextNode=document.createTextNode(" ");panelErrorMsg3.appendChild(errorTextNode);stepContentContainers[3].appendChild(panelErrorMsg3);var finalStepButton=document.createElement("a");finalStepButton.setAttribute("href","#");stepContentContainers[3].appendChild(finalStepButton);Dom.addClass(finalStepButton,"finalStep");Event.addListener(finalStepButton,"click",YAHOO.dagblad.userPanelHandler.disableDefaultBehaviour);Event.addListener(finalStepButton,"click",validateFinalStep);var showPreview=function(){var rssUrlInput=Dom.get("rssInput_"+uniqueString);var rssSelectList=Dom.get("blogRSSList_"+uniqueString);if(rssUrlInput){var rssUrl=rssUrlInput.value;}
else if(rssSelectList){var rssUrl=rssSelectList.options[rssSelectList.selectedIndex].value;}
else{var rssUrl=false;}
var panelSettings={id:uniqueString,panelName:Dom.get("panelName_"+uniqueString).value,targetObj:Dom.get("panelPreview_"+uniqueString),mainCategory:Dom.getElementsByClassName("selected","li","panelMainCategoryList_"+uniqueString)[0].firstChild.rel,subCategories:getSelectedSubCategories(),layoutType:Dom.getElementsByClassName("selected","li","panelLayoutList_"+uniqueString)[0].firstChild.rel,numItems:Dom.get("numberOfItemsSelect_"+uniqueString).options[Dom.get("numberOfItemsSelect_"+uniqueString).selectedIndex].value,rssFeed:rssUrl,tabId:YAHOO.dagblad.userTabHandler.getActiveTab(),colIndex:0,posIndex:0};YAHOO.dagblad.userPanelHandler.addPanel(panelSettings);}
var previewButton=document.createElement("a");previewButton.setAttribute("href","#");previewButton.setAttribute("id","previewButton_"+uniqueString);stepContentContainers[3].appendChild(previewButton);Dom.addClass(previewButton,"previewButton");Event.addListener(previewButton,"click",YAHOO.dagblad.userPanelHandler.disableDefaultBehaviour);Event.addListener(previewButton,"click",showPreview);if(panelData){Dom.setStyle(previewButton,"display","block");}
var panelPreview=document.createElement("div");panelPreview.setAttribute("id","panelPreview_"+uniqueString);panelContainer.appendChild(panelPreview);var oldPanel=Dom.get("dragPanel_"+panelData.id);if(!YAHOO.lang.isUndefined(dragListRoot)){if(!dragListRoot.firstChild){dragListRoot.appendChild(dragItem);}
else{if(oldPanel){dragListRoot.insertBefore(dragItem,oldPanel);Event.purgeElement(oldPanel,true);oldPanel.parentNode.removeChild(oldPanel);setNumberOptions(null,panelData.layoutType);setStep2Content(null,panelData.id);}
else{dragListRoot.insertBefore(dragItem,dragListRoot.firstChild);}}}
var hpTab=Dom.get("mainTabs").getElementsByTagName("li")[0];if(Dom.hasClass(hpTab,"selected")&&!panelData.id){window.scroll(0,680);}
var cancelLink=document.createElement("a");cancelLink.setAttribute("href","#");var cancelLinkText=document.createTextNode("Annuleren");cancelLink.appendChild(cancelLinkText);Dom.addClass(cancelLink,"cancelPanelSetup");panelContent.appendChild(cancelLink);Event.addListener(cancelLink,"click",YAHOO.dagblad.userPanelHandler.disableDefaultBehaviour);if(panelData){panelData.targetObj=Dom.get("userPanel_"+panelData.id);Event.addListener(cancelLink,"click",YAHOO.dagblad.userPanelHandler.cancelPanel,panelData);}
else{var removeSetupPanel=function(){YAHOO.dagblad.userPanelHandler.removePanel({rel:uniqueString},false);}
Event.addListener(cancelLink,"click",removeSetupPanel);}
if(panelData){var deleteLink=document.createElement("a");deleteLink.setAttribute("href","#");deleteLink.setAttribute("id","panelDelete_"+uniqueString);deleteLink.setAttribute("rel",uniqueString);var deleteLinkText=document.createTextNode("Paneel verwijderen");deleteLink.appendChild(deleteLinkText);Dom.addClass(deleteLink,"cancelPanelSetup");panelContent.appendChild(deleteLink);Event.addListener(deleteLink,"click",YAHOO.dagblad.userPanelHandler.disableDefaultBehaviour);Event.addListener(deleteLink,"click",confirmedRemovePanel);}},cancelPanel:function(e,panelData){YAHOO.dagblad.userPanelHandler.addPanel(panelData);},editPanel:function(e,panelSettings){YAHOO.dagblad.userPanelHandler.addSetupPanel(null,panelSettings);},editStaticPanel:function(e,refEl){if(this.rel){refEl=this;}
var panelDataArray=refEl.rel.split(";");if(panelDataArray[6]=="false"){var rssFeed=false;}
else{var rssFeed=panelDataArray[6];}
var panelSettings={id:panelDataArray[0],panelName:panelDataArray[1],targetObj:Dom.get("userPanel_"+panelDataArray[0]),mainCategory:panelDataArray[2],subCategories:panelDataArray[3],layoutType:panelDataArray[4],numItems:panelDataArray[5],rssFeed:rssFeed,tabId:panelDataArray[7],colIndex:panelDataArray[8],posIndex:panelDataArray[9]};YAHOO.dagblad.userPanelHandler.addSetupPanel(null,panelSettings);},currentRssFeed:{hasImages:false},validateRss:function(e,id){var url=Dom.get("rssInput_"+id);if(!url.value){return false;}
Dom.get("ajaxLoader_"+id).style.visibility="visible";var rssUrl=publicationUrl+"rss/rssproxy.jsp?url="+escape(url.value);var callback={success:function(o){var rv=false;if(o.responseXML){var feedType="rss";var xmlItems=o.responseXML.getElementsByTagName("item");if(xmlItems.length==0){var xmlItems=o.responseXML.getElementsByTagName("entry");feedType="atom";}
if(xmlItems.length>0){if(feedType=="rss"){var rssItemTitles=Dom.getElementsBy(function(el){return el.parentNode.nodeName=="item"},"title",o.responseXML);var rssItemLinks=Dom.getElementsBy(function(el){return el.parentNode.nodeName=="item"},"link",o.responseXML);}else if(feedType=="atom"){var rssItemTitles=Dom.getElementsBy(function(el){return el.parentNode.nodeName=="entry"},"title",o.responseXML);var rssItemLinks=Dom.getElementsBy(function(el){return el.parentNode.nodeName=="entry"},"link",o.responseXML);}else{var rssItemTitles=null;var rssItemLinks=null;}
if((feedType=="rss"&&rssItemTitles.length==rssItemLinks.length)||feedType=="atom"&&rssItemTitles.length<=rssItemLinks.length){rv=true;Dom.get("panelErrorMsg_"+id+"_2").firstChild.nodeValue="RSS gevalideerd";Dom.get("validRss_"+id).value="true";Dom.addClass(Dom.get("panelErrorMsg_"+id+"_2"),"panelRssValid");}
else{Dom.get("panelErrorMsg_"+id+"_2").firstChild.nodeValue="Onjuiste RSS feed";}}
else{Dom.get("panelErrorMsg_"+id+"_2").firstChild.nodeValue="Onjuiste RSS feed";}}
Dom.get("panelErrorMsg_"+id+"_2").style.visibility="visible";Dom.get("ajaxLoader_"+id).style.visibility="hidden";return rv;},failure:function(o){Dom.get("panelErrorMsg_"+id+"_2").style.visibility="visible";Dom.get("panelErrorMsg_"+id).firstChild.nodeValue="Onjuiste URL";Dom.get("ajaxLoader_"+id).style.visibility="hidden";return false;},argument:{refObj:YAHOO.dagblad.userPanelHandler}}
var transaction=YAHOO.util.Connect.asyncRequest('GET',rssUrl,callback,null);},removePanel:function(refObj,updateUserProfile){var targetPanel=Dom.get("dragPanel_"+refObj.rel);Event.purgeElement(targetPanel,true);targetPanel.parentNode.removeChild(targetPanel);if(updateUserProfile){var upURL=publicationUrl+"homepage.do?action=delPanel&panelId="+refObj.rel+"&tabId="+YAHOO.dagblad.userTabHandler.getActiveTab();var callback={success:function(o){},failure:function(o){YAHOO.dagblad.notificationHandler.notify("Paneel kon om technische redenen niet worden verwijderd. Probeer het nogmaals.","Foutmelding");}}
var transaction=YAHOO.util.Connect.asyncRequest('GET',upURL,callback,null);}},setPositions:function(dragColumn){var dragItems=Dom.getElementsByClassName("dragItem","li",dragColumn);for(var i=0;i<dragItems.length;i++){var panelId=dragItems[i].id.split("_")[1];var panelSettingsObj=Dom.get("editPanel_"+panelId);var currentSettings=panelSettingsObj.rel.split(";");var newSettings="";var seperator="";for(var j=0;j<currentSettings.length;j++){if(j>0){seperator=";";}
if(j==9){newSettings+=seperator+i;}
else{newSettings+=seperator+currentSettings[j];}}
panelSettingsObj.setAttribute("rel",newSettings);}},savePanel:function(panelSettings){Event.purgeElement("userPanelForm_"+panelSettings.id,true);YAHOO.dagblad.userPanelHandler.addPanel(panelSettings);YAHOO.dagblad.DDApp.init();var selectedTabId=Dom.getElementsByClassName("selected","li","mainTabs")[0].id;if(selectedTabId!="homeTab"){selectedTabId=selectedTabId.split("_")[1];}
var upURL=publicationUrl+"homepage.do?action=savePanel&panelConfig="+panelSettings.id+";"+panelSettings.panelName+";"+panelSettings.mainCategory+";"+panelSettings.subCategories+";"+panelSettings.layoutType+";"+panelSettings.numItems+";"+escape(panelSettings.rssFeed)+"&selectedTabId="+selectedTabId;var callback={success:function(o){if(trim(o.responseText)=="user not logged in"){var notifySettings={targetObj:Dom.get("leftColumn"),notifyId:"panelNotify",message:"Toegevoegde panelen worden niet opgeslagen. <a href='"+publicationUrl+"/signup.do'>Registreer</a> je en <a href='"+publicationUrl+"/profile/?ecepage=signin'>log in</a> om jouw persoonlijke instellingen op te kunnen slaan.",notifyClass:"panelNotify",cookie:true}
YAHOO.dagblad.notificationHandler.panelNotify(notifySettings);}
YAHOO.dagblad.userPanelHandler.setPositions(Dom.get("dragList1_"+o.argument.tabId));},failure:function(o){YAHOO.dagblad.notificationHandler.notify("Paneel kon om technische redenen niet worden opgeslagen. Probeer het nogmaals.","Foutmelding");},argument:{tabId:selectedTabId}}
var transaction=YAHOO.util.Connect.asyncRequest('GET',upURL,callback,null);}}
YAHOO.dagblad.DDApp={init:function(){var draggableLists=Dom.getElementsByClassName("draggableColumn","ul","container");for(var d=0;d<draggableLists.length;d++){new YAHOO.util.DDTarget(draggableLists[d]);var dragObjects=Dom.getElementsByClassName("dragItem","li",draggableLists[d]);for(var o=0;o<dragObjects.length;o++){var panelConfigObj=Dom.get("editPanel_"+dragObjects[o].id.split("_")[1]);if(panelConfigObj&&panelConfigObj.rel&&panelConfigObj.rel.split(";").length==10){var dragObj=new YAHOO.dagblad.DDList(dragObjects[o]);dragObj.setHandleElId(dragObjects[o].getElementsByTagName("h2")[0].id);}
else{Dom.addClass(Dom.get("panelHeader_"+dragObjects[o].id.split("_")[1]),"noDrag");}}}}};YAHOO.dagblad.DDList=function(id,sGroup,config){YAHOO.dagblad.DDList.superclass.constructor.call(this,id,sGroup,config);var el=this.getDragEl();Dom.setStyle(el,"opacity",0.67);this.goingUp=false;this.lastY=0;};YAHOO.extend(YAHOO.dagblad.DDList,YAHOO.util.DDProxy,{startDrag:function(x,y){var dragEl=this.getDragEl();var clickEl=this.getEl();Dom.setStyle(clickEl,"visibility","hidden");dragEl.innerHTML=clickEl.innerHTML;Dom.setStyle(dragEl,"color",Dom.getStyle(clickEl,"color"));Dom.setStyle(dragEl,"backgroundColor","#ffffff");Dom.setStyle(dragEl,"font-size","90%");Dom.setStyle(dragEl,"text-align","left");Dom.addClass(dragEl,"dragItem");Dom.setStyle(dragEl,"border","1px solid #A9BADC");dragEl.getElementsByTagName("div")[0].style.margin=0;},endDrag:function(e){var srcEl=this.getEl();var proxy=this.getDragEl();Dom.setStyle(proxy,"visibility","");var a=new YAHOO.util.Motion(proxy,{points:{to:Dom.getXY(srcEl)}},0.2,YAHOO.util.Easing.easeOut)
var proxyid=proxy.id;var thisid=this.id;a.onComplete.subscribe(function(){Dom.setStyle(proxyid,"visibility","hidden");Dom.setStyle(thisid,"visibility","");Dom.get(proxyid).innerHTML="";});a.animate();srcEl.parentNode.style.background="none";var panelDataNode=Dom.get("editPanel_"+srcEl.id.split("_")[1]);if(panelDataNode&&panelDataNode.rel!=""){var panelDataArray=panelDataNode.rel.split(";");if(panelDataArray[6]=="false"){var rssFeed=false;}
else{var rssFeed=panelDataArray[6];}
if(Dom.hasClass(srcEl.parentNode,"leftColumn")){var newColIndex=0;}
else{var newColIndex=1;}
var colListItems=Dom.getElementsByClassName("dragItem","li",srcEl.parentNode);var newPosIndex=0;for(var i=0;i<colListItems.length;i++){if(colListItems[i]===srcEl){newPosIndex=i;break;}}
var panelSettings={id:panelDataArray[0],panelName:panelDataArray[1],targetObj:null,mainCategory:panelDataArray[2],subCategories:panelDataArray[3],layoutType:panelDataArray[4],numItems:panelDataArray[5],rssFeed:rssFeed,tabId:panelDataArray[7],colIndex:newColIndex,posIndex:newPosIndex};if(newColIndex!=panelDataArray[8]||newPosIndex!=panelDataArray[9]){YAHOO.dagblad.userPanelHandler.movePanel(panelSettings,panelDataArray);}}},onDragDrop:function(e,id){if(DDM.interactionInfo.drop.length===1){var pt=DDM.interactionInfo.point;var region=DDM.interactionInfo.sourceRegion;if(!region.intersect(pt)){var destEl=Dom.get(id);var destDD=DDM.getDDById(id);destEl.appendChild(this.getEl());destDD.isEmpty=false;DDM.refreshCache();}}},onDrag:function(e){var y=Event.getPageY(e);if(y<this.lastY){this.goingUp=true;}else if(y>this.lastY){this.goingUp=false;}
this.lastY=y;},onDragOver:function(e,id){var srcEl=this.getEl();var destEl=Dom.get(id);if(destEl.nodeName.toLowerCase()=="li"){var orig_p=srcEl.parentNode;var p=destEl.parentNode;if(this.goingUp){p.insertBefore(srcEl,destEl);}else{p.insertBefore(srcEl,destEl.nextSibling);}
DDM.refreshCache();}},onDragEnter:function(e,id){var srcEl=this.getEl();var destEl=Dom.get(id);destEl.style.background="#E8E8E8";},onDragOut:function(e,id){var srcEl=this.getEl();var destEl=Dom.get(id);destEl.style.background="none";}});function RunFlashObject(width,height,path_flash,click_url)
{document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');document.write(' codebase="http://active.macromedia.com/flash/cabs/swflash.cab#version=5,0,0,0"');document.write(' id=eceAdBanner width='+width+' height='+height+'>');document.write(' <param name=movie value="'+path_flash+'?clickTAG='+click_url+'"> ');document.write(' <param name=quality value=autohigh> ');document.write(' <embed src="'+path_flash+'?clickTAG='+click_url+'"');document.write(' width='+width+' height='+height+'');document.write(' quality=autohigh');document.write(' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');document.write('</embed>');document.write('</object>');}
function validateForm(){msg='';var tr=document.getElementById("topSearchField").value;if(tr.length<3){msg=msg+"Een zoekopdracht moet uit minimaal drie karakters bestaan";}
if(msg!=''){alert(msg);return false;}else{return true;}}
var submitStarRatingFailure=function(errorString,exception){if(exception.javaClassName=="com.ndc.qualification.api.exception.AlreadyRatedException"){alert("U kunt een reactie slechts eenmaal beoordelen.");}else{alert("ERROR\n"+errorString+"\n"+exception.javaClassName);}}
var submitStarRatingCallBack=function(rating,element){if(rating!=null){var currentRating=YAHOO.util.Dom.getPreviousSiblingBy(element.parentNode,function(el){if(el.className=="current-rating"){return true;}
return false;});currentRating.style.width=(rating.totalAverage*15)+"px";}}
var submitFlaggingFailure=function(errorString,exception){if(exception.javaClassName=="com.ndc.qualification.api.exception.AlreadyFlaggedException"){alert("U kunt een reactie slechts eenmaal melden als ongepast.");}else{alert("ERROR\n"+errorString+"\n"+exception.javaClassName);}}
var submitFlaggingCallBack=function(flagging,element){if(flagging!=null){var okmsg=document.createTextNode("Gemeld als ongepast");var el=element.parentNode;el.removeChild(element);el.appendChild(okmsg);}}
var submitFavorite=function(userId,articleId,element){try{var meta={userId:userId,articleId:articleId,sectionId:null,publicationId:null}
QualificationPluginAjaxAccess.submitFavorite(meta,{callback:function(favorite){submitFavoriteCallBack(favorite,element);},exceptionHandler:generalFailure});}catch(ex){}}
var submitFavoriteCallBack=function(favorite,element){if(favorite!=null){if(favorite==true){element.parentNode.className='delete';document.getElementById('submitFavoriteLink').style.display='none';document.getElementById('deleteFavoriteLink').style.display='';}}}
var deleteFavoriteAndHide=function(userId,articleId,element){try{var meta={userId:userId,articleId:articleId,sectionId:null,publicationId:null}
QualificationPluginAjaxAccess.deleteFavorite(meta,{callback:function(favorite){deleteFavoriteAndHideCallBack(favorite,element);},exceptionHandler:generalFailure});}catch(ex){}}
var deleteFavoriteAndHideCallBack=function(favorite,element){element.style.display='none';}
var deleteFavorite=function(userId,articleId,element){try{var meta={userId:userId,articleId:articleId,sectionId:null,publicationId:null}
QualificationPluginAjaxAccess.deleteFavorite(meta,{callback:function(favorite){deleteFavoriteCallBack(favorite,element);},exceptionHandler:generalFailure});}catch(ex){}}
var deleteFavoriteCallBack=function(favorite,element){element.parentNode.className='save';document.getElementById('submitFavoriteLink').style.display='';document.getElementById('deleteFavoriteLink').style.display='none';}
var generalFailure=function(errorString,exception){alert("ERROR\n"+errorString+"\n"+exception.javaClassName);}
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return"";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;function thisMovie(movieName){if(navigator.appName.indexOf("Microsoft")!=-1){var oMovie=window[movieName];}else{var oMovie=document[movieName];}
return oMovie;}
function stopFlv(){thisMovie('flash_player').stopFlv();}
function pauzeFlv(txt){thisMovie('flash_player').pauzeFlv(txt);}
function loadXml(txt,title,artId,secId,pubId,artType){thisMovie('flash_player').loadXml(txt);document.getElementById('videoTitle').innerHTML='<h2>'+title+'</h2>';document.getElementById('videoCount').setAttribute("src",publicationUrl+'RecordViewStatistics.do?articleId='+artId+'&sectionId='+secId+'&publicationId='+pubId+'&articleType='+artType);}
function loadFlv(txt,img,logo,autoplay,hide_interface,aspect_ratio,end_url,end_image,end_only,t){thisMovie('flash_player').loadFlv(txt,img,logo,autoplay,hide_interface,aspect_ratio,end_url,end_image,end_only,t);}
AJS={BASE_URL:"",drag_obj:null,drag_elm:null,_drop_zones:[],_cur_pos:null,getScrollTop:function(){var t;if(document.documentElement&&document.documentElement.scrollTop){t=document.documentElement.scrollTop;}else{if(document.body){t=document.body.scrollTop;}}
return t;},addClass:function(){var _2=AJS.forceArray(arguments);var _3=_2.pop();var _4=function(o){if(!new RegExp("(^|\\s)"+_3+"(\\s|$)").test(o.className)){o.className+=(o.className?" ":"")+_3;}};AJS.map(_2,function(_6){_4(_6);});},setStyle:function(){var _7=AJS.forceArray(arguments);var _8=_7.pop();var _9=_7.pop();AJS.map(_7,function(_a){_a.style[_9]=AJS.getCssDim(_8);});},extend:function(_b){var _c=new this("no_init");for(k in _b){var _d=_c[k];var _e=_b[k];if(_d&&_d!=_e&&typeof _e=="function"){_e=this._parentize(_e,_d);}
_c[k]=_e;}
return new AJS.Class(_c);},log:function(o){if(window.console){console.log(o);}else{var div=AJS.$("ajs_logger");if(!div){div=AJS.DIV({id:"ajs_logger","style":"color: green; position: absolute; left: 0"});div.style.top=AJS.getScrollTop()+"px";AJS.ACN(AJS.getBody(),div);}
AJS.setHTML(div,""+o);}},setHeight:function(){var _11=AJS.forceArray(arguments);_11.splice(_11.length-1,0,"height");AJS.setStyle.apply(null,_11);},_getRealScope:function(fn,_13){_13=AJS.$A(_13);var _14=fn._cscope||window;return function(){var _15=AJS.$FA(arguments).concat(_13);return fn.apply(_14,_15);};},documentInsert:function(elm){if(typeof(elm)=="string"){elm=AJS.HTML2DOM(elm);}
document.write("<span id=\"dummy_holder\"></span>");AJS.swapDOM(AJS.$("dummy_holder"),elm);},getWindowSize:function(doc){doc=doc||document;var _18,_19;if(self.innerHeight){_18=self.innerWidth;_19=self.innerHeight;}else{if(doc.documentElement&&doc.documentElement.clientHeight){_18=doc.documentElement.clientWidth;_19=doc.documentElement.clientHeight;}else{if(doc.body){_18=doc.body.clientWidth;_19=doc.body.clientHeight;}}}
return{"w":_18,"h":_19};},flattenList:function(_1a){var r=[];var _1c=function(r,l){AJS.map(l,function(o){if(o==null){}else{if(AJS.isArray(o)){_1c(r,o);}else{r.push(o);}}});};_1c(r,_1a);return r;},isFunction:function(obj){return(typeof obj=="function");},setEventKey:function(e){e.key=e.keyCode?e.keyCode:e.charCode;if(window.event){e.ctrl=window.event.ctrlKey;e.shift=window.event.shiftKey;}else{e.ctrl=e.ctrlKey;e.shift=e.shiftKey;}
switch(e.key){case 63232:e.key=38;break;case 63233:e.key=40;break;case 63235:e.key=39;break;case 63234:e.key=37;break;}},removeElement:function(){var _22=AJS.forceArray(arguments);AJS.map(_22,function(elm){AJS.swapDOM(elm,null);});},_unloadListeners:function(){if(AJS.listeners){AJS.map(AJS.listeners,function(elm,_25,fn){AJS.REV(elm,_25,fn);});}
AJS.listeners=[];},join:function(_27,_28){try{return _28.join(_27);}
catch(e){var r=_28[0]||"";AJS.map(_28,function(elm){r+=_27+elm;},1);return r+"";}},getIndex:function(elm,_2c,_2d){for(var i=0;i<_2c.length;i++){if(_2d&&_2d(_2c[i])||elm==_2c[i]){return i;}}
return-1;},isIn:function(elm,_30){var i=AJS.getIndex(elm,_30);if(i!=-1){return true;}else{return false;}},isArray:function(obj){return obj instanceof Array;},setLeft:function(){var _33=AJS.forceArray(arguments);_33.splice(_33.length-1,0,"left");AJS.setStyle.apply(null,_33);},appendChildNodes:function(elm){if(arguments.length>=2){AJS.map(arguments,function(n){if(AJS.isString(n)){n=AJS.TN(n);}
if(AJS.isDefined(n)){elm.appendChild(n);}},1);}
return elm;},getElementsByTagAndClassName:function(_36,_37,_38,_39){var _3a=[];if(!AJS.isDefined(_38)){_38=document;}
if(!AJS.isDefined(_36)){_36="*";}
var els=_38.getElementsByTagName(_36);var _3c=els.length;var _3d=new RegExp("(^|\\s)"+_37+"(\\s|$)");for(i=0,j=0;i<_3c;i++){if(_3d.test(els[i].className)||_37==null){_3a[j]=els[i];j++;}}
if(_39){return _3a[0];}else{return _3a;}},isOpera:function(){return(navigator.userAgent.toLowerCase().indexOf("opera")!=-1);},isString:function(obj){return(typeof obj=="string");},hideElement:function(elm){var _40=AJS.forceArray(arguments);AJS.map(_40,function(elm){elm.style.display="none";});},setOpacity:function(elm,p){elm.style.opacity=p;elm.style.filter="alpha(opacity="+p*100+")";},insertBefore:function(elm,_45){_45.parentNode.insertBefore(elm,_45);return elm;},setWidth:function(){var _46=AJS.forceArray(arguments);_46.splice(_46.length-1,0,"width");AJS.setStyle.apply(null,_46);},createArray:function(v){if(AJS.isArray(v)&&!AJS.isString(v)){return v;}else{if(!v){return[];}else{return[v];}}},isDict:function(o){var _49=String(o);return _49.indexOf(" Object")!=-1;},isMozilla:function(){return(navigator.userAgent.toLowerCase().indexOf("gecko")!=-1&&navigator.productSub>=20030210);},removeEventListener:function(elm,_4b,fn,_4d){var _4e="ajsl_"+_4b+fn;if(!_4d){_4d=false;}
fn=elm[_4e]||fn;if(elm["on"+_4b]==fn){elm["on"+_4b]=elm[_4e+"old"];}
if(elm.removeEventListener){elm.removeEventListener(_4b,fn,_4d);if(AJS.isOpera()){elm.removeEventListener(_4b,fn,!_4d);}}else{if(elm.detachEvent){elm.detachEvent("on"+_4b,fn);}}},callLater:function(fn,_50){var _51=function(){fn();};window.setTimeout(_51,_50);},setTop:function(){var _52=AJS.forceArray(arguments);_52.splice(_52.length-1,0,"top");AJS.setStyle.apply(null,_52);},_createDomShortcuts:function(){var _53=["ul","li","td","tr","th","tbody","table","input","span","b","a","div","img","button","h1","h2","h3","h4","h5","h6","br","textarea","form","p","select","option","optgroup","iframe","script","center","dl","dt","dd","small","pre","i"];var _54=function(elm){AJS[elm.toUpperCase()]=function(){return AJS.createDOM.apply(null,[elm,arguments]);};};AJS.map(_53,_54);AJS.TN=function(_56){return document.createTextNode(_56);};},addCallback:function(fn){this.callbacks.unshift(fn);},bindMethods:function(_58){for(var k in _58){var _5a=_58[k];if(typeof(_5a)=="function"){_58[k]=AJS.$b(_5a,_58);}}},partial:function(fn){var _5c=AJS.$FA(arguments);_5c.shift();return function(){_5c=_5c.concat(AJS.$FA(arguments));return fn.apply(window,_5c);};},isNumber:function(obj){return(typeof obj=="number");},getCssDim:function(dim){if(AJS.isString(dim)){return dim;}else{return dim+"px";}},isIe:function(){return(navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1);},removeClass:function(){var _5f=AJS.forceArray(arguments);var cls=_5f.pop();var _61=function(o){o.className=o.className.replace(new RegExp("\\s?"+cls,"g"),"");};AJS.map(_5f,function(elm){_61(elm);});},setHTML:function(elm,_65){elm.innerHTML=_65;return elm;},map:function(_66,fn,_68,_69){var i=0,l=_66.length;if(_68){i=_68;}
if(_69){l=_69;}
for(i;i<l;i++){var val=fn(_66[i],i);if(val!=undefined){return val;}}},addEventListener:function(elm,_6e,fn,_70,_71){var _72="ajsl_"+_6e+fn;if(!_71){_71=false;}
AJS.listeners=AJS.$A(AJS.listeners);if(AJS.isIn(_6e,["keypress","keydown","keyup","click"])){var _73=fn;fn=function(e){AJS.setEventKey(e);return _73.apply(window,arguments);};}
var _75=AJS.isIn(_6e,["submit","load","scroll","resize"]);var _76=AJS.$A(elm);AJS.map(_76,function(_77){if(_70){var _78=fn;fn=function(e){AJS.REV(_77,_6e,fn);return _78.apply(window,arguments);};}
if(_75){var _7a=_77["on"+_6e];var _7b=function(){if(_7a){fn(arguments);return _7a(arguments);}else{return fn(arguments);}};_77[_72]=_7b;_77[_72+"old"]=_7a;elm["on"+_6e]=_7b;}else{_77[_72]=fn;if(_77.attachEvent){_77.attachEvent("on"+_6e,fn);}else{if(_77.addEventListener){_77.addEventListener(_6e,fn,_71);}}
AJS.listeners.push([_77,_6e,fn]);}});},preloadImages:function(){AJS.AEV(window,"load",AJS.$p(function(_7c){AJS.map(_7c,function(src){var pic=new Image();pic.src=src;});},arguments));},forceArray:function(_7f){var r=[];AJS.map(_7f,function(elm){r.push(elm);});return r;},update:function(l1,l2){for(var i in l2){l1[i]=l2[i];}
return l1;},getBody:function(){return AJS.$bytc("body")[0];},HTML2DOM:function(_85,_86){var d=AJS.DIV();d.innerHTML=_85;if(_86){return d.childNodes[0];}else{return d;}},getElement:function(id){if(AJS.isString(id)||AJS.isNumber(id)){return document.getElementById(id);}else{return id;}},showElement:function(){var _89=AJS.forceArray(arguments);AJS.map(_89,function(elm){elm.style.display="";});},bind:function(fn,_8c,_8d){fn._cscope=_8c;return AJS._getRealScope(fn,_8d);},createDOM:function(_8e,_8f){var i=0,_91;var elm=document.createElement(_8e);var _93=_8f[0];if(AJS.isDict(_8f[i])){for(k in _93){_91=_93[k];if(k=="style"||k=="s"){elm.style.cssText=_91;}else{if(k=="c"||k=="class"||k=="className"){elm.className=_91;}else{elm.setAttribute(k,_91);}}}
i++;}
if(_93==null){i=1;}
for(var j=i;j<_8f.length;j++){var _91=_8f[j];if(_91){var _95=typeof(_91);if(_95=="string"||_95=="number"){_91=AJS.TN(_91);}
elm.appendChild(_91);}}
return elm;},swapDOM:function(_96,src){_96=AJS.getElement(_96);var _98=_96.parentNode;if(src){src=AJS.getElement(src);_98.replaceChild(src,_96);}else{_98.removeChild(_96);}
return src;},isDefined:function(o){return(o!="undefined"&&o!=null);}};AJS.$=AJS.getElement;AJS.$$=AJS.getElements;AJS.$f=AJS.getFormElement;AJS.$p=AJS.partial;AJS.$b=AJS.bind;AJS.$A=AJS.createArray;AJS.DI=AJS.documentInsert;AJS.ACN=AJS.appendChildNodes;AJS.RCN=AJS.replaceChildNodes;AJS.AEV=AJS.addEventListener;AJS.REV=AJS.removeEventListener;AJS.$bytc=AJS.getElementsByTagAndClassName;AJS.$AP=AJS.absolutePosition;AJS.$FA=AJS.forceArray;AJS.addEventListener(window,"unload",AJS._unloadListeners);AJS._createDomShortcuts();AJS.Class=function(_9a){var fn=function(){if(arguments[0]!="no_init"){return this.init.apply(this,arguments);}};fn.prototype=_9a;AJS.update(fn,AJS.Class.prototype);return fn;};AJS.Class.prototype={extend:function(_9c){var _9d=new this("no_init");for(k in _9c){var _9e=_9d[k];var cur=_9c[k];if(_9e&&_9e!=cur&&typeof cur=="function"){cur=this._parentize(cur,_9e);}
_9d[k]=cur;}
return new AJS.Class(_9d);},implement:function(_a0){AJS.update(this.prototype,_a0);},_parentize:function(cur,_a2){return function(){this.parent=_a2;return cur.apply(this,arguments);};}};script_loaded=true;script_loaded=true;AJS.fx={_shades:{0:"ffffff",1:"ffffee",2:"ffffdd",3:"ffffcc",4:"ffffbb",5:"ffffaa",6:"ffff99"},highlight:function(_1,_2){var _3=new AJS.fx.Base();_3.elm=AJS.$(_1);_3.options.duration=600;_3.setOptions(_2);AJS.update(_3,{increase:function(){if(this.now==7){_1.style.backgroundColor="#fff";}else{_1.style.backgroundColor="#"+AJS.fx._shades[Math.floor(this.now)];}}});return _3.custom(6,0);},fadeIn:function(_4,_5){_5=_5||{};if(!_5.from){_5.from=0;AJS.setOpacity(_4,0);}
if(!_5.to){_5.to=1;}
var s=new AJS.fx.Style(_4,"opacity",_5);return s.custom(_5.from,_5.to);},fadeOut:function(_7,_8){_8=_8||{};if(!_8.from){_8.from=1;}
if(!_8.to){_8.to=0;}
_8.duration=300;var s=new AJS.fx.Style(_7,"opacity",_8);return s.custom(_8.from,_8.to);},setWidth:function(_a,_b){var s=new AJS.fx.Style(_a,"width",_b);return s.custom(_b.from,_b.to);},setHeight:function(_d,_e){var s=new AJS.fx.Style(_d,"height",_e);return s.custom(_e.from,_e.to);}};AJS.fx.Base=new AJS.Class({init:function(_10){this.options={onStart:function(){},onComplete:function(){},transition:AJS.fx.Transitions.sineInOut,duration:500,wait:true,fps:50};AJS.update(this.options,_10);AJS.bindMethods(this);},setOptions:function(_11){AJS.update(this.options,_11);},step:function(){var _12=new Date().getTime();if(_12<this.time+this.options.duration){this.cTime=_12-this.time;this.setNow();}else{setTimeout(AJS.$b(this.options.onComplete,this,[this.elm]),10);this.clearTimer();this.now=this.to;}
this.increase();},setNow:function(){this.now=this.compute(this.from,this.to);},compute:function(_13,to){var _15=to-_13;return this.options.transition(this.cTime,_13,_15,this.options.duration);},clearTimer:function(){clearInterval(this.timer);this.timer=null;return this;},_start:function(_16,to){if(!this.options.wait){this.clearTimer();}
if(this.timer){return;}
setTimeout(AJS.$p(this.options.onStart,this.elm),10);this.from=_16;this.to=to;this.time=new Date().getTime();this.timer=setInterval(this.step,Math.round(1000/this.options.fps));return this;},custom:function(_18,to){return this._start(_18,to);},set:function(to){this.now=to;this.increase();return this;},setStyle:function(elm,_1c,val){if(this.property=="opacity"){AJS.setOpacity(elm,val);}else{AJS.setStyle(elm,_1c,val);}}});AJS.fx.Style=AJS.fx.Base.extend({init:function(elm,_1f,_20){this.parent();this.elm=elm;this.setOptions(_20);this.property=_1f;},increase:function(){this.setStyle(this.elm,this.property,this.now);}});AJS.fx.Styles=AJS.fx.Base.extend({init:function(elm,_22){this.parent();this.elm=AJS.$(elm);this.setOptions(_22);this.now={};},setNow:function(){for(p in this.from){this.now[p]=this.compute(this.from[p],this.to[p]);}},custom:function(obj){if(this.timer&&this.options.wait){return;}
var _24={};var to={};for(p in obj){_24[p]=obj[p][0];to[p]=obj[p][1];}
return this._start(_24,to);},increase:function(){for(var p in this.now){this.setStyle(this.elm,p,this.now[p]);}}});AJS.fx.Transitions={linear:function(t,b,c,d){return c*t/d+b;},sineInOut:function(t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;}};script_loaded=true;script_loaded=true;var GB_CURRENT=null;GB_hide=function(cb){GB_CURRENT.hide(cb);};GreyBox=new AJS.Class({init:function(_2){this.use_fx=AJS.fx;this.type="page";this.overlay_click_close=true;this.salt=0;this.alttext="leeg";this.root_dir=GB_ROOT_DIR;this.callback_fns=[];this.reload_on_close=false;this.src_loader=this.root_dir+"loader_frame.html";this.historyCounter=0;var _3=window.location.hostname.indexOf("www");var _4=this.src_loader.indexOf("www");if(_3!=-1&&_4==-1){this.src_loader=this.src_loader.replace("://","://www.");}
if(_3==-1&&_4!=-1){this.src_loader=this.src_loader.replace("://www.","://");}
this.show_loading=true;AJS.update(this,_2);},addCallback:function(fn){if(fn){this.callback_fns.push(fn);}},show:function(_6,_999){GB_CURRENT=this;this.url=_6;this.alttext=_999;var _7=[AJS.$bytc("object"),AJS.$bytc("select")];AJS.map(AJS.flattenList(_7),function(_8){_8.style.visibility="hidden";});this.createElements();return false;},hide:function(cb){var me=this;AJS.callLater(function(){var _b=me.callback_fns;if(_b!=[]){AJS.map(_b,function(fn){fn();});}
me.onHide();if(me.use_fx){var _d=me.overlay;AJS.fx.fadeOut(me.overlay,{onComplete:function(){AJS.removeElement(_d);_d=null;},duration:300});if(BrowserDetect.browser=="Firefox"){me.g_window.style.display="none";}else{AJS.removeElement(me.g_window);}}else{if(BrowserDetect.browser=="Firefox"){me.g_window.style.display="none";}else{AJS.removeElement(me.g_window,me.overlay);}}
me.removeFrame();AJS.REV(window,"scroll",_GB_setOverlayDimension);AJS.REV(window,"resize",_GB_update);var _e=[AJS.$bytc("object"),AJS.$bytc("select")];AJS.map(AJS.flattenList(_e),function(_f){_f.style.visibility="visible";});GB_CURRENT=null;if(me.reload_on_close){window.location.reload();}
if(AJS.isFunction(cb)){cb();}},10);if(BrowserDetect.browser=="Firefox"){history.go(-(this.historyCounter+1));}},update:function(){this.setOverlayDimension();this.setFrameSize();this.setWindowPosition();},createElements:function(){this.initOverlay();this.g_window=AJS.DIV({"id":"GB_window"});AJS.hideElement(this.g_window);AJS.getBody().insertBefore(this.g_window,this.overlay.nextSibling);this.initFrame();this.initHook();this.update();var me=this;if(this.use_fx){AJS.fx.fadeIn(this.overlay,{duration:300,to:0.7,onComplete:function(){me.onShow();AJS.showElement(me.g_window);me.startLoading();}});}else{AJS.setOpacity(this.overlay,0.7);AJS.showElement(this.g_window);this.onShow();this.startLoading();}
AJS.AEV(window,"scroll",_GB_setOverlayDimension);AJS.AEV(window,"resize",_GB_update);},removeFrame:function(){try{if(BrowserDetect.browser=="Firefox"){this.g_window.style.display="none";}else{AJS.removeElement(this.iframe);}}
catch(e){}
this.iframe=null;},startLoading:function(){this.iframe.src=this.src_loader+"?s="+this.salt++;AJS.showElement(this.iframe);},setOverlayDimension:function(){var _11=AJS.getWindowSize();if(AJS.isMozilla()||AJS.isOpera()){AJS.setWidth(this.overlay,"100%");}else{AJS.setWidth(this.overlay,_11.w);}
var _12=Math.max(AJS.getScrollTop()+_11.h,AJS.getScrollTop()+this.height);if(_12<AJS.getScrollTop()){AJS.setHeight(this.overlay,_12);}else{AJS.setHeight(this.overlay,AJS.getScrollTop()+_11.h);}},initOverlay:function(){this.overlay=AJS.DIV({"id":"GB_overlay"});if(this.overlay_click_close){AJS.AEV(this.overlay,"click",GB_hide);}
AJS.setOpacity(this.overlay,0);AJS.getBody().insertBefore(this.overlay,AJS.getBody().firstChild);},initFrame:function(){if(!this.iframe){var d={"name":"GB_frame","class":"GB_frame","frameBorder":0};if(AJS.isIe()){d.src="javascript:false;document.write(\"\");";}
this.iframe=AJS.IFRAME(d);this.middle_cnt=AJS.DIV({"class":"content"},this.iframe);this.top_cnt=AJS.DIV();this.bottom_cnt=AJS.DIV();AJS.ACN(this.g_window,this.top_cnt,this.middle_cnt,this.bottom_cnt);}},onHide:function(){},onShow:function(){},setFrameSize:function(){},setWindowPosition:function(){},initHook:function(){},switchNext:function(){var closeImg=AJS.IMG({"src":this.url});AJS.AEV(closeImg,"click",GB_hide(parent.GB_CURRENT));}});_GB_update=function(){if(GB_CURRENT){GB_CURRENT.update();}};_GB_setOverlayDimension=function(){if(GB_CURRENT){GB_CURRENT.setOverlayDimension();}};AJS.preloadImages(GB_ROOT_DIR+"indicator.gif");script_loaded=true;var GB_SETS={};function decoGreyboxLinks(){var as=AJS.$bytc("a");AJS.map(as,function(a){if(a.getAttribute("href")&&a.getAttribute("rel")){var rel=a.getAttribute("rel");if(rel.indexOf("gb_")==0){var _17=rel.match(/\w+/)[0];var _18=rel.match(/\[(.*)\]/)[1];var _19=0;var _1a={"caption":a.title||"","url":a.href};if(_17=="gb_pageset"||_17=="gb_imageset"){if(!GB_SETS[_18]){GB_SETS[_18]=[];}
GB_SETS[_18].push(_1a);_19=GB_SETS[_18].length;}
if(_17=="gb_pageset"){a.onclick=function(){GB_showFullScreenSet(GB_SETS[_18],_19);return false;};}
if(_17=="gb_imageset"){a.onclick=function(){GB_showImageSet(GB_SETS[_18],_19);return false;};}
if(_17=="gb_image"){a.onclick=function(){GB_showImage(_1a.caption,_1a.url);return false;};}
if(_17=="gb_page"){a.onclick=function(){var sp=_18.split(/, ?/);GB_show(_1a.caption,_1a.url,parseInt(sp[1]),parseInt(sp[0]));return false;};}
if(_17=="gb_page_fs"){a.onclick=function(){GB_showFullScreen(_1a.caption,_1a.url);return false;};}
if(_17=="gb_page_center"){a.onclick=function(){var sp=_18.split(/, ?/);GB_showCenter(_1a.caption,_1a.url,parseInt(sp[1]),parseInt(sp[0]));return false;};}}}});}
YAHOO.util.Event.onDOMReady(decoGreyboxLinks);GB_showImage=function(_1d,url,_1f){var _20={width:300,height:300,type:"image",fullscreen:false,center_win:true,caption:_1d,callback_fn:_1f};var win=new GB_Gallery(_20);return win.show(url);};GB_showPage=function(_22,url,_24){var _25={type:"page",caption:_22,callback_fn:_24,fullscreen:true,center_win:false};var win=new GB_Gallery(_25);return win.show(url);};GB_Gallery=GreyBox.extend({init:function(_27){this.parent({});this.img_close=this.root_dir+"g_close.gif";AJS.update(this,_27);this.addCallback(this.callback_fn);},initHook:function(){AJS.addClass(this.g_window,"GB_Gallery");var _28=AJS.DIV({"class":"inner"});this.header=AJS.DIV({"class":"GB_header"},_28);AJS.setOpacity(this.header,0);AJS.getBody().insertBefore(this.header,this.overlay.nextSibling);var _29=AJS.TD({"id":"GB_caption","class":"caption","width":"40%"},this.caption);var _2a=AJS.TD({"id":"GB_middle","class":"middle","width":"20%"});var _2b=AJS.IMG({"src":this.img_close});AJS.AEV(_2b,"click",GB_hide);var _2c=AJS.TD({"class":"close","width":"40%"},_2b);var _2d=AJS.TBODY(AJS.TR(_29,_2a,_2c));var _2e=AJS.TABLE({"cellspacing":"0","cellpadding":0,"border":0},_2d);AJS.ACN(_28,_2e);if(this.fullscreen){AJS.AEV(window,"scroll",AJS.$b(this.setWindowPosition,this));}else{}},setFrameSize:function(){var _2f=this.overlay.offsetWidth;var _30=AJS.getWindowSize();if(this.fullscreen){this.width=_2f-40;this.height=_30.h-80;}
AJS.setWidth(this.iframe,this.width);AJS.setHeight(this.iframe,this.height);AJS.setWidth(this.header,_2f);},_setHeaderPos:function(){AJS.setTop(this.header,AJS.getScrollTop()+10);},setWindowPosition:function(){var _31=this.overlay.offsetWidth;var _32=AJS.getWindowSize();AJS.setLeft(this.g_window,((_31-50-this.width)/2));var _33=AJS.getScrollTop()+55;if(!this.center_win){AJS.setTop(this.g_window,_33);}else{var fl=((_32.h-this.height)/2)+20+AJS.getScrollTop();if(fl<0){fl=0;}
if(_33>fl){fl=_33;}
AJS.setTop(this.g_window,fl);}
this._setHeaderPos();},onHide:function(){AJS.removeElement(this.header);AJS.removeClass(this.g_window,"GB_Gallery");},onShow:function(){if(this.use_fx){AJS.fx.fadeIn(this.header,{to:1});}else{AJS.setOpacity(this.header,1);}}});AJS.preloadImages(GB_ROOT_DIR+"g_close.gif");GB_showFullScreenSet=function(set,_36,_37){var _38={type:"page",fullscreen:true,center_win:false};var _39=new GB_Sets(_38,set);_39.addCallback(_37);_39.showSet(_36-1);return false;};GB_showImageSet=function(set,_3b,_3c){var _3d={type:"image",fullscreen:false,center_win:true,width:300,height:300};var _3e=new GB_Sets(_3d,set);_3e.addCallback(_3c);_3e.showSet(_3b-1);return false;};GB_Sets=GB_Gallery.extend({init:function(_3f,set){this.parent(_3f);if(!this.img_next){this.img_next=this.root_dir+"next.gif";}
if(!this.img_prev){this.img_prev=this.root_dir+"prev.gif";}
this.current_set=set;},showSet:function(_41){this.current_index=_41;var _42=this.current_set[this.current_index];this.show(_42.url,_42.caption);this._setCaption(_42.caption);this.btn_prev=AJS.IMG({"class":"left",src:this.img_prev});this.btn_next=AJS.IMG({"class":"right",src:this.img_next});AJS.AEV(this.btn_prev,"click",AJS.$b(this.switchPrev,this));AJS.AEV(this.btn_next,"click",AJS.$b(this.switchNext,this));GB_STATUS=AJS.SPAN({"class":"GB_navStatus"});AJS.ACN(AJS.$("GB_middle"),this.btn_prev,GB_STATUS,this.btn_next);this.updateStatus();},updateStatus:function(){AJS.setHTML(GB_STATUS,(this.current_index+1)+" / "+this.current_set.length);if(this.current_index==0){AJS.addClass(this.btn_prev,"disabled");}else{AJS.removeClass(this.btn_prev,"disabled");}
if(this.current_index==this.current_set.length-1){AJS.addClass(this.btn_next,"disabled");}else{AJS.removeClass(this.btn_next,"disabled");}},_setCaption:function(_43){AJS.setHTML(AJS.$("GB_caption"),_43);},updateFrame:function(){var _44=this.current_set[this.current_index];this._setCaption(_44.caption);this.url=_44.url;this.alttext=_44.caption;this.startLoading();},switchPrev:function(){if(this.current_index!=0){this.historyCounter++;this.current_index--;this.updateFrame();this.updateStatus();}},switchNext:function(){if(this.current_index!=this.current_set.length-1){this.historyCounter++;this.current_index++;this.updateFrame();this.updateStatus();}else{var closeImg=AJS.IMG({"src":this.url});AJS.AEV(closeImg,"click",GB_hide(parent.GB_CURRENT));}}});AJS.AEV(window,"load",function(){AJS.preloadImages(GB_ROOT_DIR+"next.gif",GB_ROOT_DIR+"prev.gif");});GB_show=function(_45,url,_47,_48,_49){var _4a={caption:_45,height:_47||500,width:_48||500,fullscreen:false,callback_fn:_49};var win=new GB_Window(_4a);return win.show(url);};GB_showCenter=function(_4c,url,_4e,_4f,_50){var _51={caption:_4c,center_win:true,height:_4e||500,width:_4f||500,fullscreen:false,callback_fn:_50};var win=new GB_Window(_51);return win.show(url);};GB_showFullScreen=function(_53,url,_55){var _56={caption:_53,fullscreen:true,callback_fn:_55};var win=new GB_Window(_56);return win.show(url);};GB_Window=GreyBox.extend({init:function(_58){this.parent({});this.img_header=this.root_dir+"header_bg.gif";this.img_close=this.root_dir+"w_close.gif";this.show_close_img=true;AJS.update(this,_58);this.addCallback(this.callback_fn);},initHook:function(){AJS.addClass(this.g_window,"GB_Window");this.header=AJS.TABLE({"class":"header"});this.header.style.backgroundImage="url("+this.img_header+")";var _59=AJS.TD({"class":"caption"},this.caption);var _5a=AJS.TD({"class":"close"});if(this.show_close_img){var _5b=AJS.IMG({"src":this.img_close});var _5c=AJS.SPAN("Close");var btn=AJS.DIV(_5b,_5c);AJS.AEV([_5b,_5c],"mouseover",function(){AJS.addClass(_5c,"on");});AJS.AEV([_5b,_5c],"mouseout",function(){AJS.removeClass(_5c,"on");});AJS.AEV([_5b,_5c],"mousedown",function(){AJS.addClass(_5c,"click");});AJS.AEV([_5b,_5c],"mouseup",function(){AJS.removeClass(_5c,"click");});AJS.AEV([_5b,_5c],"click",GB_hide);AJS.ACN(_5a,btn);}
tbody_header=AJS.TBODY();AJS.ACN(tbody_header,AJS.TR(_59,_5a));AJS.ACN(this.header,tbody_header);AJS.ACN(this.top_cnt,this.header);if(this.fullscreen){AJS.AEV(window,"scroll",AJS.$b(this.setWindowPosition,this));}},setFrameSize:function(){if(this.fullscreen){var _5e=AJS.getWindowSize();overlay_h=_5e.h;this.width=Math.round(this.overlay.offsetWidth-(this.overlay.offsetWidth/100)*10);this.height=Math.round(overlay_h-(overlay_h/100)*10);}
AJS.setWidth(this.header,this.width+6);AJS.setWidth(this.iframe,this.width);AJS.setHeight(this.iframe,this.height);},setWindowPosition:function(){var _5f=AJS.getWindowSize();AJS.setLeft(this.g_window,((_5f.w-this.width)/2)-13);if(!this.center_win){AJS.setTop(this.g_window,AJS.getScrollTop());}else{var fl=((_5f.h-this.height)/2)-20+AJS.getScrollTop();if(fl<0){fl=0;}
AJS.setTop(this.g_window,fl);}}});AJS.preloadImages(GB_ROOT_DIR+"w_close.gif",GB_ROOT_DIR+"header_bg.gif");script_loaded=true;var BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS";},searchString:function(data){for(var i=0;i<data.length;i++){var dataString=data[i].string;var dataProp=data[i].prop;this.versionSearchString=data[i].versionSearch||data[i].identity;if(dataString){if(dataString.indexOf(data[i].subString)!=-1)
return data[i].identity;}
else if(dataProp)
return data[i].identity;}},searchVersion:function(dataString){var index=dataString.indexOf(this.versionSearchString);if(index==-1)return;return parseFloat(dataString.substring(index+this.versionSearchString.length+1));},dataBrowser:[{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};BrowserDetect.init();var MooTools={version:"1.2.1",build:"0d4845aab3d9a4fdee2f0d4a6dd59210e4b697cf"};var Native=function(K){K=K||{};var A=K.name;var I=K.legacy;var B=K.protect;var C=K.implement;var H=K.generics;var F=K.initialize;var G=K.afterImplement||function(){};var D=F||I;H=H!==false;D.constructor=Native;D.$family={name:"native"};if(I&&F){D.prototype=I.prototype;}D.prototype.constructor=D;if(A){var E=A.toLowerCase();D.prototype.$family={name:E};Native.typize(D,E);}var J=function(N,L,O,M){if(!B||M||!N.prototype[L]){N.prototype[L]=O;}if(H){Native.genericize(N,L,B);}G.call(N,L,O);return N;};D.alias=function(N,L,O){if(typeof N=="string"){if((N=this.prototype[N])){return J(this,L,N,O);}}for(var M in N){this.alias(M,N[M],L);}return this;};D.implement=function(M,L,O){if(typeof M=="string"){return J(this,M,L,O);}for(var N in M){J(this,N,M[N],L);}return this;};if(C){D.implement(C);}return D;};Native.genericize=function(B,C,A){if((!A||!B[C])&&typeof B.prototype[C]=="function"){B[C]=function(){var D=Array.prototype.slice.call(arguments);return B.prototype[C].apply(D.shift(),D);};}};Native.implement=function(D,C){for(var B=0,A=D.length;B<A;B++){D[B].implement(C);}};Native.typize=function(A,B){if(!A.type){A.type=function(C){return($type(C)===B);};}};(function(){var A={Array:Array,Date:Date,Function:Function,Number:Number,RegExp:RegExp,String:String};for(var G in A){new Native({name:G,initialize:A[G],protect:true});}var D={"boolean":Boolean,"native":Native,object:Object};for(var C in D){Native.typize(D[C],C);}var F={Array:["concat","indexOf","join","lastIndexOf","pop","push","reverse","shift","slice","sort","splice","toString","unshift","valueOf"],String:["charAt","charCodeAt","concat","indexOf","lastIndexOf","match","replace","search","slice","split","substr","substring","toLowerCase","toUpperCase","valueOf"]};for(var E in F){for(var B=F[E].length;B--;){Native.genericize(window[E],F[E][B],true);}}})();var Hash=new Native({name:"Hash",initialize:function(A){if($type(A)=="hash"){A=$unlink(A.getClean());}for(var B in A){this[B]=A[B];}return this;}});Hash.implement({forEach:function(B,C){for(var A in this){if(this.hasOwnProperty(A)){B.call(C,this[A],A,this);}}},getClean:function(){var B={};for(var A in this){if(this.hasOwnProperty(A)){B[A]=this[A];}}return B;},getLength:function(){var B=0;for(var A in this){if(this.hasOwnProperty(A)){B++;}}return B;}});Hash.alias("forEach","each");Array.implement({forEach:function(C,D){for(var B=0,A=this.length;B<A;B++){C.call(D,this[B],B,this);}}});Array.alias("forEach","each");function $A(C){if(C.item){var D=[];for(var B=0,A=C.length;B<A;B++){D[B]=C[B];}return D;}return Array.prototype.slice.call(C);}function $arguments(A){return function(){return arguments[A];};}function $chk(A){return!!(A||A===0);}function $clear(A){clearTimeout(A);clearInterval(A);return null;}function $defined(A){return(A!=undefined);}function $each(C,B,D){var A=$type(C);((A=="arguments"||A=="collection"||A=="array")?Array:Hash).each(C,B,D);}function $empty(){}function $extend(C,A){for(var B in(A||{})){C[B]=A[B];}return C;}function $H(A){return new Hash(A);}function $lambda(A){return(typeof A=="function")?A:function(){return A;};}function $merge(){var E={};for(var D=0,A=arguments.length;D<A;D++){var B=arguments[D];if($type(B)!="object"){continue;}for(var C in B){var G=B[C],F=E[C];E[C]=(F&&$type(G)=="object"&&$type(F)=="object")?$merge(F,G):$unlink(G);}}return E;}function $pick(){for(var B=0,A=arguments.length;B<A;B++){if(arguments[B]!=undefined){return arguments[B];}}return null;}function $random(B,A){return Math.floor(Math.random()*(A-B+1)+B);}function $splat(B){var A=$type(B);return(A)?((A!="array"&&A!="arguments")?[B]:B):[];}var $time=Date.now||function(){return+new Date;};function $try(){for(var B=0,A=arguments.length;B<A;B++){try{return arguments[B]();}catch(C){}}return null;}function $type(A){if(A==undefined){return false;}if(A.$family){return(A.$family.name=="number"&&!isFinite(A))?false:A.$family.name;}if(A.nodeName){switch(A.nodeType){case 1:return"element";case 3:return(/\S/).test(A.nodeValue)?"textnode":"whitespace";}}else{if(typeof A.length=="number"){if(A.callee){return"arguments";}else{if(A.item){return"collection";}}}}return typeof A;}function $unlink(C){var B;switch($type(C)){case"object":B={};for(var E in C){B[E]=$unlink(C[E]);}break;case"hash":B=new Hash(C);break;case"array":B=[];for(var D=0,A=C.length;D<A;D++){B[D]=$unlink(C[D]);}break;default:return C;}return B;}var Browser=$merge({Engine:{name:"unknown",version:0},Platform:{name:(window.orientation!=undefined)?"ipod":(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase()},Features:{xpath:!!(document.evaluate),air:!!(window.runtime),query:!!(document.querySelector)},Plugins:{},Engines:{presto:function(){return(!window.opera)?false:((arguments.callee.caller)?960:((document.getElementsByClassName)?950:925));},trident:function(){return(!window.ActiveXObject)?false:((window.XMLHttpRequest)?5:4);},webkit:function(){return(navigator.taintEnabled)?false:((Browser.Features.xpath)?((Browser.Features.query)?525:420):419);},gecko:function(){return(document.getBoxObjectFor==undefined)?false:((document.getElementsByClassName)?19:18);}}},Browser||{});Browser.Platform[Browser.Platform.name]=true;Browser.detect=function(){for(var B in this.Engines){var A=this.Engines[B]();if(A){this.Engine={name:B,version:A};this.Engine[B]=this.Engine[B+A]=true;break;}}return{name:B,version:A};};Browser.detect();Browser.Request=function(){return $try(function(){return new XMLHttpRequest();},function(){return new ActiveXObject("MSXML2.XMLHTTP");});};Browser.Features.xhr=!!(Browser.Request());Browser.Plugins.Flash=(function(){var A=($try(function(){return navigator.plugins["Shockwave Flash"].description;},function(){return new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version");})||"0 r0").match(/\d+/g);return{version:parseInt(A[0]||0+"."+A[1]||0),build:parseInt(A[2]||0)};})();function $exec(B){if(!B){return B;}if(window.execScript){window.execScript(B);}else{var A=document.createElement("script");A.setAttribute("type","text/javascript");A[(Browser.Engine.webkit&&Browser.Engine.version<420)?"innerText":"text"]=B;document.head.appendChild(A);document.head.removeChild(A);}return B;}Native.UID=1;var $uid=(Browser.Engine.trident)?function(A){return(A.uid||(A.uid=[Native.UID++]))[0];}:function(A){return A.uid||(A.uid=Native.UID++);};var Window=new Native({name:"Window",legacy:(Browser.Engine.trident)?null:window.Window,initialize:function(A){$uid(A);if(!A.Element){A.Element=$empty;if(Browser.Engine.webkit){A.document.createElement("iframe");}A.Element.prototype=(Browser.Engine.webkit)?window["[[DOMElement.prototype]]"]:{};}A.document.window=A;return $extend(A,Window.Prototype);},afterImplement:function(B,A){window[B]=Window.Prototype[B]=A;}});Window.Prototype={$family:{name:"window"}};new Window(window);var Document=new Native({name:"Document",legacy:(Browser.Engine.trident)?null:window.Document,initialize:function(A){$uid(A);A.head=A.getElementsByTagName("head")[0];A.html=A.getElementsByTagName("html")[0];if(Browser.Engine.trident&&Browser.Engine.version<=4){$try(function(){A.execCommand("BackgroundImageCache",false,true);});}if(Browser.Engine.trident){A.window.attachEvent("onunload",function(){A.window.detachEvent("onunload",arguments.callee);A.head=A.html=A.window=null;});}return $extend(A,Document.Prototype);},afterImplement:function(B,A){document[B]=Document.Prototype[B]=A;}});Document.Prototype={$family:{name:"document"}};new Document(document);Array.implement({every:function(C,D){for(var B=0,A=this.length;B<A;B++){if(!C.call(D,this[B],B,this)){return false;}}return true;},filter:function(D,E){var C=[];for(var B=0,A=this.length;B<A;B++){if(D.call(E,this[B],B,this)){C.push(this[B]);}}return C;},clean:function(){return this.filter($defined);},indexOf:function(C,D){var A=this.length;for(var B=(D<0)?Math.max(0,A+D):D||0;B<A;B++){if(this[B]===C){return B;}}return-1;},map:function(D,E){var C=[];for(var B=0,A=this.length;B<A;B++){C[B]=D.call(E,this[B],B,this);}return C;},some:function(C,D){for(var B=0,A=this.length;B<A;B++){if(C.call(D,this[B],B,this)){return true;}}return false;},associate:function(C){var D={},B=Math.min(this.length,C.length);for(var A=0;A<B;A++){D[C[A]]=this[A];}return D;},link:function(C){var A={};for(var E=0,B=this.length;E<B;E++){for(var D in C){if(C[D](this[E])){A[D]=this[E];delete C[D];break;}}}return A;},contains:function(A,B){return this.indexOf(A,B)!=-1;},extend:function(C){for(var B=0,A=C.length;B<A;B++){this.push(C[B]);}return this;},getLast:function(){return(this.length)?this[this.length-1]:null;},getRandom:function(){return(this.length)?this[$random(0,this.length-1)]:null;},include:function(A){if(!this.contains(A)){this.push(A);}return this;},combine:function(C){for(var B=0,A=C.length;B<A;B++){this.include(C[B]);}return this;},erase:function(B){for(var A=this.length;A--;A){if(this[A]===B){this.splice(A,1);}}return this;},empty:function(){this.length=0;return this;},flatten:function(){var D=[];for(var B=0,A=this.length;B<A;B++){var C=$type(this[B]);if(!C){continue;}D=D.concat((C=="array"||C=="collection"||C=="arguments")?Array.flatten(this[B]):this[B]);}return D;},hexToRgb:function(B){if(this.length!=3){return null;}var A=this.map(function(C){if(C.length==1){C+=C;}return C.toInt(16);});return(B)?A:"rgb("+A+")";},rgbToHex:function(D){if(this.length<3){return null;}if(this.length==4&&this[3]==0&&!D){return"transparent";}var B=[];for(var A=0;A<3;A++){var C=(this[A]-0).toString(16);B.push((C.length==1)?"0"+C:C);}return(D)?B:"#"+B.join("");}});Function.implement({extend:function(A){for(var B in A){this[B]=A[B];}return this;},create:function(B){var A=this;B=B||{};return function(D){var C=B.arguments;C=(C!=undefined)?$splat(C):Array.slice(arguments,(B.event)?1:0);if(B.event){C=[D||window.event].extend(C);}var E=function(){return A.apply(B.bind||null,C);};if(B.delay){return setTimeout(E,B.delay);}if(B.periodical){return setInterval(E,B.periodical);}if(B.attempt){return $try(E);}return E();};},run:function(A,B){return this.apply(B,$splat(A));},pass:function(A,B){return this.create({bind:B,arguments:A});},bind:function(B,A){return this.create({bind:B,arguments:A});},bindWithEvent:function(B,A){return this.create({bind:B,arguments:A,event:true});},attempt:function(A,B){return this.create({bind:B,arguments:A,attempt:true})();},delay:function(B,C,A){return this.create({bind:C,arguments:A,delay:B})();},periodical:function(C,B,A){return this.create({bind:B,arguments:A,periodical:C})();}});Number.implement({limit:function(B,A){return Math.min(A,Math.max(B,this));},round:function(A){A=Math.pow(10,A||0);return Math.round(this*A)/A;},times:function(B,C){for(var A=0;A<this;A++){B.call(C,A,this);}},toFloat:function(){return parseFloat(this);},toInt:function(A){return parseInt(this,A||10);}});Number.alias("times","each");(function(B){var A={};B.each(function(C){if(!Number[C]){A[C]=function(){return Math[C].apply(null,[this].concat($A(arguments)));};}});Number.implement(A);})(["abs","acos","asin","atan","atan2","ceil","cos","exp","floor","log","max","min","pow","sin","sqrt","tan"]);String.implement({test:function(A,B){return((typeof A=="string")?new RegExp(A,B):A).test(this);},contains:function(A,B){return(B)?(B+this+B).indexOf(B+A+B)>-1:this.indexOf(A)>-1;},trim:function(){return this.replace(/^\s+|\s+$/g,"");},clean:function(){return this.replace(/\s+/g," ").trim();},camelCase:function(){return this.replace(/-\D/g,function(A){return A.charAt(1).toUpperCase();});},hyphenate:function(){return this.replace(/[A-Z]/g,function(A){return("-"+A.charAt(0).toLowerCase());});},capitalize:function(){return this.replace(/\b[a-z]/g,function(A){return A.toUpperCase();});},escapeRegExp:function(){return this.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1");},toInt:function(A){return parseInt(this,A||10);},toFloat:function(){return parseFloat(this);},hexToRgb:function(B){var A=this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);return(A)?A.slice(1).hexToRgb(B):null;},rgbToHex:function(B){var A=this.match(/\d{1,3}/g);return(A)?A.rgbToHex(B):null;},stripScripts:function(B){var A="";var C=this.replace(/<script[^>]*>([\s\S]*?)<\/script>/gi,function(){A+=arguments[1]+"\n";return"";});if(B===true){$exec(A);}else{if($type(B)=="function"){B(A,C);}}return C;},substitute:function(A,B){return this.replace(B||(/\\?\{([^{}]+)\}/g),function(D,C){if(D.charAt(0)=="\\"){return D.slice(1);}return(A[C]!=undefined)?A[C]:"";});}});Hash.implement({has:Object.prototype.hasOwnProperty,keyOf:function(B){for(var A in this){if(this.hasOwnProperty(A)&&this[A]===B){return A;}}return null;},hasValue:function(A){return(Hash.keyOf(this,A)!==null);},extend:function(A){Hash.each(A,function(C,B){Hash.set(this,B,C);},this);return this;},combine:function(A){Hash.each(A,function(C,B){Hash.include(this,B,C);},this);return this;},erase:function(A){if(this.hasOwnProperty(A)){delete this[A];}return this;},get:function(A){return(this.hasOwnProperty(A))?this[A]:null;},set:function(A,B){if(!this[A]||this.hasOwnProperty(A)){this[A]=B;}return this;},empty:function(){Hash.each(this,function(B,A){delete this[A];},this);return this;},include:function(B,C){var A=this[B];if(A==undefined){this[B]=C;}return this;},map:function(B,C){var A=new Hash;Hash.each(this,function(E,D){A.set(D,B.call(C,E,D,this));},this);return A;},filter:function(B,C){var A=new Hash;Hash.each(this,function(E,D){if(B.call(C,E,D,this)){A.set(D,E);}},this);return A;},every:function(B,C){for(var A in this){if(this.hasOwnProperty(A)&&!B.call(C,this[A],A)){return false;}}return true;},some:function(B,C){for(var A in this){if(this.hasOwnProperty(A)&&B.call(C,this[A],A)){return true;}}return false;},getKeys:function(){var A=[];Hash.each(this,function(C,B){A.push(B);});return A;},getValues:function(){var A=[];Hash.each(this,function(B){A.push(B);});return A;},toQueryString:function(A){var B=[];Hash.each(this,function(F,E){if(A){E=A+"["+E+"]";}var D;switch($type(F)){case"object":D=Hash.toQueryString(F,E);break;case"array":var C={};F.each(function(H,G){C[G]=H;});D=Hash.toQueryString(C,E);break;default:D=E+"="+encodeURIComponent(F);}if(F!=undefined){B.push(D);}});return B.join("&");}});Hash.alias({keyOf:"indexOf",hasValue:"contains"});var EventMoo=new Native({name:"EventMoo",initialize:function(A,F){F=F||window;var K=F.document;A=A||F.event;if(A.$extended){return A;}this.$extended=true;var J=A.type;var G=A.target||A.srcElement;while(G&&G.nodeType==3){G=G.parentNode;}if(J.test(/key/)){var B=A.which||A.keyCode;var M=EventMoo.Keys.keyOf(B);if(J=="keydown"){var D=B-111;if(D>0&&D<13){M="f"+D;}}M=M||String.fromCharCode(B).toLowerCase();}else{if(J.match(/(click|mouse|menu)/i)){K=(!K.compatMode||K.compatMode=="CSS1Compat")?K.html:K.body;var I={x:A.pageX||A.clientX+K.scrollLeft,y:A.pageY||A.clientY+K.scrollTop};var C={x:(A.pageX)?A.pageX-F.pageXOffset:A.clientX,y:(A.pageY)?A.pageY-F.pageYOffset:A.clientY};if(J.match(/DOMMouseScroll|mousewheel/)){var H=(A.wheelDelta)?A.wheelDelta/120:-(A.detail||0)/3;}var E=(A.which==3)||(A.button==2);var L=null;if(J.match(/over|out/)){switch(J){case"mouseover":L=A.relatedTarget||A.fromElement;break;case"mouseout":L=A.relatedTarget||A.toElement;}if(!(function(){while(L&&L.nodeType==3){L=L.parentNode;}return true;}).create({attempt:Browser.Engine.gecko})()){L=false;}}}}return $extend(this,{event:A,type:J,page:I,client:C,rightClick:E,wheel:H,relatedTarget:L,target:G,code:B,key:M,shift:A.shiftKey,control:A.ctrlKey,alt:A.altKey,meta:A.metaKey});}});EventMoo.Keys=new Hash({enter:13,up:38,down:40,left:37,right:39,esc:27,space:32,backspace:8,tab:9,"delete":46});EventMoo.implement({stop:function(){return this.stopPropagation().preventDefault();},stopPropagation:function(){if(this.event.stopPropagation){this.event.stopPropagation();}else{this.event.cancelBubble=true;}return this;},preventDefault:function(){if(this.event.preventDefault){this.event.preventDefault();}else{this.event.returnValue=false;}return this;}});var Class=new Native({name:"Class",initialize:function(B){B=B||{};var A=function(){for(var E in this){if($type(this[E])!="function"){this[E]=$unlink(this[E]);}}this.constructor=A;if(Class.prototyping){return this;}var D=(this.initialize)?this.initialize.apply(this,arguments):this;if(this.options&&this.options.initialize){this.options.initialize.call(this);}return D;};for(var C in Class.Mutators){if(!B[C]){continue;}B=Class.Mutators[C](B,B[C]);delete B[C];}$extend(A,this);A.constructor=Class;A.prototype=B;return A;}});Class.Mutators={Extends:function(C,A){Class.prototyping=A.prototype;var B=new A;delete B.parent;B=Class.inherit(B,C);delete Class.prototyping;return B;},Implements:function(A,B){$splat(B).each(function(C){Class.prototying=C;$extend(A,($type(C)=="class")?new C:C);delete Class.prototyping;});return A;}};Class.extend({inherit:function(B,E){var A=arguments.callee.caller;for(var D in E){var C=E[D];var G=B[D];var F=$type(C);if(G&&F=="function"){if(C!=G){if(A){C.__parent=G;B[D]=C;}else{Class.override(B,D,C);}}}else{if(F=="object"){B[D]=$merge(G,C);}else{B[D]=C;}}}if(A){B.parent=function(){return arguments.callee.caller.__parent.apply(this,arguments);};}return B;},override:function(B,A,E){var D=Class.prototyping;if(D&&B[A]!=D[A]){D=null;}var C=function(){var F=this.parent;this.parent=D?D[A]:B[A];var G=E.apply(this,arguments);this.parent=F;return G;};B[A]=C;}});Class.implement({implement:function(){var A=this.prototype;$each(arguments,function(B){Class.inherit(A,B);});return this;}});var Chain=new Class({$chain:[],chain:function(){this.$chain.extend(Array.flatten(arguments));return this;},callChain:function(){return(this.$chain.length)?this.$chain.shift().apply(this,arguments):false;},clearChain:function(){this.$chain.empty();return this;}});var Events=new Class({$events:{},addEvent:function(C,B,A){C=Events.removeOn(C);if(B!=$empty){this.$events[C]=this.$events[C]||[];this.$events[C].include(B);if(A){B.internal=true;}}return this;},addEvents:function(A){for(var B in A){this.addEvent(B,A[B]);}return this;},fireEvent:function(C,B,A){C=Events.removeOn(C);if(!this.$events||!this.$events[C]){return this;}this.$events[C].each(function(D){D.create({bind:this,delay:A,"arguments":B})();},this);return this;},removeEvent:function(B,A){B=Events.removeOn(B);if(!this.$events[B]){return this;}if(!A.internal){this.$events[B].erase(A);}return this;},removeEvents:function(C){if($type(C)=="object"){for(var D in C){this.removeEvent(D,C[D]);}return this;}if(C){C=Events.removeOn(C);}for(var D in this.$events){if(C&&C!=D){continue;}var B=this.$events[D];for(var A=B.length;A--;A){this.removeEvent(D,B[A]);}}return this;}});Events.removeOn=function(A){return A.replace(/^on([A-Z])/,function(B,C){return C.toLowerCase();});};var Options=new Class({setOptions:function(){this.options=$merge.run([this.options].extend(arguments));if(!this.addEvent){return this;}for(var A in this.options){if($type(this.options[A])!="function"||!(/^on[A-Z]/).test(A)){continue;}this.addEvent(A,this.options[A]);delete this.options[A];}return this;}});var Element=new Native({name:"Element",legacy:window.Element,initialize:function(A,B){var C=Element.Constructors.get(A);if(C){return C(B);}if(typeof A=="string"){return document.newElement(A,B);}return $(A).set(B);},afterImplement:function(A,B){Element.Prototype[A]=B;if(Array[A]){return;}Elements.implement(A,function(){var C=[],G=true;for(var E=0,D=this.length;E<D;E++){var F=this[E][A].apply(this[E],arguments);C.push(F);if(G){G=($type(F)=="element");}}return(G)?new Elements(C):C;});}});Element.Prototype={$family:{name:"element"}};Element.Constructors=new Hash;var IFrame=new Native({name:"IFrame",generics:false,initialize:function(){var E=Array.link(arguments,{properties:Object.type,iframe:$defined});var C=E.properties||{};var B=$(E.iframe)||false;var D=C.onload||$empty;delete C.onload;C.id=C.name=$pick(C.id,C.name,B.id,B.name,"IFrame_"+$time());B=new Element(B||"iframe",C);var A=function(){var F=$try(function(){return B.contentWindow.location.host;});if(F&&F==window.location.host){var G=new Window(B.contentWindow);new Document(B.contentWindow.document);$extend(G.Element.prototype,Element.Prototype);}D.call(B.contentWindow,B.contentWindow.document);};(window.frames[C.id])?A():B.addListener("load",A);return B;}});var Elements=new Native({initialize:function(F,B){B=$extend({ddup:true,cash:true},B);F=F||[];if(B.ddup||B.cash){var G={},E=[];for(var C=0,A=F.length;C<A;C++){var D=$.element(F[C],!B.cash);if(B.ddup){if(G[D.uid]){continue;}G[D.uid]=true;}E.push(D);}F=E;}return(B.cash)?$extend(F,this):F;}});Elements.implement({filter:function(A,B){if(!A){return this;}return new Elements(Array.filter(this,(typeof A=="string")?function(C){return C.match(A);}:A,B));}});Document.implement({newElement:function(A,B){if(Browser.Engine.trident&&B){["name","type","checked"].each(function(C){if(!B[C]){return;}A+=" "+C+'="'+B[C]+'"';if(C!="checked"){delete B[C];}});A="<"+A+">";}return $.element(this.createElement(A)).set(B);},newTextNode:function(A){return this.createTextNode(A);},getDocument:function(){return this;},getWindow:function(){return this.window;}});Window.implement({$:function(B,C){if(B&&B.$family&&B.uid){return B;}var A=$type(B);return($[A])?$[A](B,C,this.document):null;},$$:function(A){if(arguments.length==1&&typeof A=="string"){return this.document.getElements(A);}var F=[];var C=Array.flatten(arguments);for(var D=0,B=C.length;D<B;D++){var E=C[D];switch($type(E)){case"element":F.push(E);break;case"string":F.extend(this.document.getElements(E,true));}}return new Elements(F);},getDocument:function(){return this.document;},getWindow:function(){return this;}});$.string=function(C,B,A){C=A.getElementById(C);return(C)?$.element(C,B):null;};$.element=function(A,D){$uid(A);if(!D&&!A.$family&&!(/^object|embed$/i).test(A.tagName)){var B=Element.Prototype;for(var C in B){A[C]=B[C];}}return A;};$.object=function(B,C,A){if(B.toElement){return $.element(B.toElement(A),C);}return null;};$.textnode=$.whitespace=$.window=$.document=$arguments(0);Native.implement([Element,Document],{getElement:function(A,B){return $(this.getElements(A,true)[0]||null,B);},getElements:function(A,D){A=A.split(",");var C=[];var B=(A.length>1);A.each(function(E){var F=this.getElementsByTagName(E.trim());(B)?C.extend(F):C=F;},this);return new Elements(C,{ddup:B,cash:!D});}});(function(){var H={},F={};var I={input:"checked",option:"selected",textarea:(Browser.Engine.webkit&&Browser.Engine.version<420)?"innerHTML":"value"};var C=function(L){return(F[L]||(F[L]={}));};var G=function(N,L){if(!N){return;}var M=N.uid;if(Browser.Engine.trident){if(N.clearAttributes){var P=L&&N.cloneNode(false);N.clearAttributes();if(P){N.mergeAttributes(P);}}else{if(N.removeEvents){N.removeEvents();}}if((/object/i).test(N.tagName)){for(var O in N){if(typeof N[O]=="function"){N[O]=$empty;}}Element.dispose(N);}}if(!M){return;}H[M]=F[M]=null;};var D=function(){Hash.each(H,G);if(Browser.Engine.trident){$A(document.getElementsByTagName("object")).each(G);}if(window.CollectGarbage){CollectGarbage();}H=F=null;};var J=function(N,L,S,M,P,R){var O=N[S||L];var Q=[];while(O){if(O.nodeType==1&&(!M||Element.match(O,M))){if(!P){return $(O,R);}Q.push(O);}O=O[L];}return(P)?new Elements(Q,{ddup:false,cash:!R}):null;};var E={html:"innerHTML","class":"className","for":"htmlFor",text:(Browser.Engine.trident||(Browser.Engine.webkit&&Browser.Engine.version<420))?"innerText":"textContent"};var B=["compact","nowrap","ismap","declare","noshade","checked","disabled","readonly","multiple","selected","noresize","defer"];var K=["value","accessKey","cellPadding","cellSpacing","colSpan","frameBorder","maxLength","readOnly","rowSpan","tabIndex","useMap"];Hash.extend(E,B.associate(B));Hash.extend(E,K.associate(K.map(String.toLowerCase)));var A={before:function(M,L){if(L.parentNode){L.parentNode.insertBefore(M,L);}},after:function(M,L){if(!L.parentNode){return;}var N=L.nextSibling;(N)?L.parentNode.insertBefore(M,N):L.parentNode.appendChild(M);},bottom:function(M,L){L.appendChild(M);},top:function(M,L){var N=L.firstChild;(N)?L.insertBefore(M,N):L.appendChild(M);}};A.inside=A.bottom;Hash.each(A,function(L,M){M=M.capitalize();Element.implement("inject"+M,function(N){L(this,$(N,true));return this;});Element.implement("grab"+M,function(N){L($(N,true),this);return this;});});Element.implement({set:function(O,M){switch($type(O)){case"object":for(var N in O){this.set(N,O[N]);}break;case"string":var L=Element.Properties.get(O);(L&&L.set)?L.set.apply(this,Array.slice(arguments,1)):this.setProperty(O,M);}return this;},get:function(M){var L=Element.Properties.get(M);return(L&&L.get)?L.get.apply(this,Array.slice(arguments,1)):this.getProperty(M);},erase:function(M){var L=Element.Properties.get(M);(L&&L.erase)?L.erase.apply(this):this.removeProperty(M);return this;},setProperty:function(M,N){var L=E[M];if(N==undefined){return this.removeProperty(M);}if(L&&B[M]){N=!!N;}(L)?this[L]=N:this.setAttribute(M,""+N);return this;},setProperties:function(L){for(var M in L){this.setProperty(M,L[M]);}return this;},getProperty:function(M){var L=E[M];var N=(L)?this[L]:this.getAttribute(M,2);return(B[M])?!!N:(L)?N:N||null;},getProperties:function(){var L=$A(arguments);return L.map(this.getProperty,this).associate(L);},removeProperty:function(M){var L=E[M];(L)?this[L]=(L&&B[M])?false:"":this.removeAttribute(M);return this;},removeProperties:function(){Array.each(arguments,this.removeProperty,this);return this;},hasClass:function(L){return this.className.contains(L," ");},addClass:function(L){if(!this.hasClass(L)){this.className=(this.className+" "+L).clean();}return this;},removeClass:function(L){this.className=this.className.replace(new RegExp("(^|\\s)"+L+"(?:\\s|$)"),"$1");return this;},toggleClass:function(L){return this.hasClass(L)?this.removeClass(L):this.addClass(L);},adopt:function(){Array.flatten(arguments).each(function(L){L=$(L,true);if(L){this.appendChild(L);}},this);return this;},appendText:function(M,L){return this.grab(this.getDocument().newTextNode(M),L);},grab:function(M,L){A[L||"bottom"]($(M,true),this);return this;},inject:function(M,L){A[L||"bottom"](this,$(M,true));return this;},replaces:function(L){L=$(L,true);L.parentNode.replaceChild(this,L);return this;},wraps:function(M,L){M=$(M,true);return this.replaces(M).grab(M,L);},getPrevious:function(L,M){return J(this,"previousSibling",null,L,false,M);},getAllPrevious:function(L,M){return J(this,"previousSibling",null,L,true,M);},getNext:function(L,M){return J(this,"nextSibling",null,L,false,M);},getAllNext:function(L,M){return J(this,"nextSibling",null,L,true,M);},getFirst:function(L,M){return J(this,"nextSibling","firstChild",L,false,M);},getLast:function(L,M){return J(this,"previousSibling","lastChild",L,false,M);},getParent:function(L,M){return J(this,"parentNode",null,L,false,M);},getParents:function(L,M){return J(this,"parentNode",null,L,true,M);},getChildren:function(L,M){return J(this,"nextSibling","firstChild",L,true,M);},getWindow:function(){return this.ownerDocument.window;},getDocument:function(){return this.ownerDocument;},getElementById:function(O,N){var M=this.ownerDocument.getElementById(O);if(!M){return null;}for(var L=M.parentNode;L!=this;L=L.parentNode){if(!L){return null;}}return $.element(M,N);},getSelected:function(){return new Elements($A(this.options).filter(function(L){return L.selected;}));},getComputedStyle:function(M){if(this.currentStyle){return this.currentStyle[M.camelCase()];}var L=this.getDocument().defaultView.getComputedStyle(this,null);return(L)?L.getPropertyValue([M.hyphenate()]):null;},toQueryString:function(){var L=[];this.getElements("input, select, textarea",true).each(function(M){if(!M.name||M.disabled){return;}var N=(M.tagName.toLowerCase()=="select")?Element.getSelected(M).map(function(O){return O.value;}):((M.type=="radio"||M.type=="checkbox")&&!M.checked)?null:M.value;$splat(N).each(function(O){if(typeof O!="undefined"){L.push(M.name+"="+encodeURIComponent(O));}});});return L.join("&");},clone:function(O,L){O=O!==false;var R=this.cloneNode(O);var N=function(V,U){if(!L){V.removeAttribute("id");}if(Browser.Engine.trident){V.clearAttributes();V.mergeAttributes(U);V.removeAttribute("uid");if(V.options){var W=V.options,S=U.options;for(var T=W.length;T--;){W[T].selected=S[T].selected;}}}var X=I[U.tagName.toLowerCase()];if(X&&U[X]){V[X]=U[X];}};if(O){var P=R.getElementsByTagName("*"),Q=this.getElementsByTagName("*");for(var M=P.length;M--;){N(P[M],Q[M]);}}N(R,this);return $(R);},destroy:function(){Element.empty(this);Element.dispose(this);G(this,true);return null;},empty:function(){$A(this.childNodes).each(function(L){Element.destroy(L);});return this;},dispose:function(){return(this.parentNode)?this.parentNode.removeChild(this):this;},hasChild:function(L){L=$(L,true);if(!L){return false;}if(Browser.Engine.webkit&&Browser.Engine.version<420){return $A(this.getElementsByTagName(L.tagName)).contains(L);}return(this.contains)?(this!=L&&this.contains(L)):!!(this.compareDocumentPosition(L)&16);},match:function(L){return(!L||(L==this)||(Element.get(this,"tag")==L));}});Native.implement([Element,Window,Document],{addListener:function(O,N){if(O=="unload"){var L=N,M=this;N=function(){M.removeListener("unload",N);L();};}else{H[this.uid]=this;}if(this.addEventListener){this.addEventListener(O,N,false);}else{this.attachEvent("on"+O,N);}return this;},removeListener:function(M,L){if(this.removeEventListener){this.removeEventListener(M,L,false);}else{this.detachEvent("on"+M,L);}return this;},retrieve:function(M,L){var O=C(this.uid),N=O[M];if(L!=undefined&&N==undefined){N=O[M]=L;}return $pick(N);},store:function(M,L){var N=C(this.uid);N[M]=L;return this;},eliminate:function(L){var M=C(this.uid);delete M[L];return this;}});window.addListener("unload",D);})();Element.Properties=new Hash;Element.Properties.style={set:function(A){this.style.cssText=A;},get:function(){return this.style.cssText;},erase:function(){this.style.cssText="";}};Element.Properties.tag={get:function(){return this.tagName.toLowerCase();}};Element.Properties.html=(function(){var C=document.createElement("div");var A={table:[1,"<table>","</table>"],select:[1,"<select>","</select>"],tbody:[2,"<table><tbody>","</tbody></table>"],tr:[3,"<table><tbody><tr>","</tr></tbody></table>"]};A.thead=A.tfoot=A.tbody;var B={set:function(){var E=Array.flatten(arguments).join("");var F=Browser.Engine.trident&&A[this.get("tag")];if(F){var G=C;G.innerHTML=F[1]+E+F[2];for(var D=F[0];D--;){G=G.firstChild;}this.empty().adopt(G.childNodes);}else{this.innerHTML=E;}}};B.erase=B.set;return B;})();if(Browser.Engine.webkit&&Browser.Engine.version<420){Element.Properties.text={get:function(){if(this.innerText){return this.innerText;}var A=this.ownerDocument.newElement("div",{html:this.innerHTML}).inject(this.ownerDocument.body);var B=A.innerText;A.destroy();return B;}};}Element.Properties.events={set:function(A){this.addEvents(A);}};Native.implement([Element,Window,Document],{addEvent:function(E,G){var H=this.retrieve("events",{});H[E]=H[E]||{keys:[],values:[]};if(H[E].keys.contains(G)){return this;}H[E].keys.push(G);var F=E,A=Element.Events.get(E),C=G,I=this;if(A){if(A.onAdd){A.onAdd.call(this,G);}if(A.condition){C=function(J){if(A.condition.call(this,J)){return G.call(this,J);}return true;};}F=A.base||F;}var D=function(){return G.call(I);};var B=Element.NativeEvents[F];if(B){if(B==2){D=function(J){J=new EventMoo(J,I.getWindow());if(C.call(I,J)===false){J.stop();}};}this.addListener(F,D);}H[E].values.push(D);return this;},removeEvent:function(C,B){var A=this.retrieve("events");if(!A||!A[C]){return this;}var F=A[C].keys.indexOf(B);if(F==-1){return this;}A[C].keys.splice(F,1);var E=A[C].values.splice(F,1)[0];var D=Element.Events.get(C);if(D){if(D.onRemove){D.onRemove.call(this,B);}C=D.base||C;}return(Element.NativeEvents[C])?this.removeListener(C,E):this;},addEvents:function(A){for(var B in A){this.addEvent(B,A[B]);}return this;},removeEvents:function(A){if($type(A)=="object"){for(var C in A){this.removeEvent(C,A[C]);}return this;}var B=this.retrieve("events");if(!B){return this;}if(!A){for(var C in B){this.removeEvents(C);}this.eliminate("events");}else{if(B[A]){while(B[A].keys[0]){this.removeEvent(A,B[A].keys[0]);}B[A]=null;}}return this;},fireEvent:function(D,B,A){var C=this.retrieve("events");if(!C||!C[D]){return this;}C[D].keys.each(function(E){E.create({bind:this,delay:A,"arguments":B})();},this);return this;},cloneEvents:function(D,A){D=$(D);var C=D.retrieve("events");if(!C){return this;}if(!A){for(var B in C){this.cloneEvents(D,B);}}else{if(C[A]){C[A].keys.each(function(E){this.addEvent(A,E);},this);}}return this;}});Element.NativeEvents={click:2,dblclick:2,mouseup:2,mousedown:2,contextmenu:2,mousewheel:2,DOMMouseScroll:2,mouseover:2,mouseout:2,mousemove:2,selectstart:2,selectend:2,keydown:2,keypress:2,keyup:2,focus:2,blur:2,change:2,reset:2,select:2,submit:2,load:1,unload:1,beforeunload:2,resize:1,move:1,DOMContentLoaded:1,readystatechange:1,error:1,abort:1,scroll:1};(function(){var A=function(B){var C=B.relatedTarget;if(C==undefined){return true;}if(C===false){return false;}return($type(this)!="document"&&C!=this&&C.prefix!="xul"&&!this.hasChild(C));};Element.Events=new Hash({mouseenter:{base:"mouseover",condition:A},mouseleave:{base:"mouseout",condition:A},mousewheel:{base:(Browser.Engine.gecko)?"DOMMouseScroll":"mousewheel"}});})();Element.Properties.styles={set:function(A){this.setStyles(A);}};Element.Properties.opacity={set:function(A,B){if(!B){if(A==0){if(this.style.visibility!="hidden"){this.style.visibility="hidden";}}else{if(this.style.visibility!="visible"){this.style.visibility="visible";}}}if(!this.currentStyle||!this.currentStyle.hasLayout){this.style.zoom=1;}if(Browser.Engine.trident){this.style.filter=(A==1)?"":"alpha(opacity="+A*100+")";}this.style.opacity=A;this.store("opacity",A);},get:function(){return this.retrieve("opacity",1);}};Element.implement({setOpacity:function(A){return this.set("opacity",A,true);},getOpacity:function(){return this.get("opacity");},setStyle:function(B,A){switch(B){case"opacity":return this.set("opacity",parseFloat(A));case"float":B=(Browser.Engine.trident)?"styleFloat":"cssFloat";}B=B.camelCase();if($type(A)!="string"){var C=(Element.Styles.get(B)||"@").split(" ");A=$splat(A).map(function(E,D){if(!C[D]){return"";}return($type(E)=="number")?C[D].replace("@",Math.round(E)):E;}).join(" ");}else{if(A==String(Number(A))){A=Math.round(A);}}this.style[B]=A;return this;},getStyle:function(G){switch(G){case"opacity":return this.get("opacity");case"float":G=(Browser.Engine.trident)?"styleFloat":"cssFloat";}G=G.camelCase();var A=this.style[G];if(!$chk(A)){A=[];for(var F in Element.ShortStyles){if(G!=F){continue;}for(var E in Element.ShortStyles[F]){A.push(this.getStyle(E));}return A.join(" ");}A=this.getComputedStyle(G);}if(A){A=String(A);var C=A.match(/rgba?\([\d\s,]+\)/);if(C){A=A.replace(C[0],C[0].rgbToHex());}}if(Browser.Engine.presto||(Browser.Engine.trident&&!$chk(parseInt(A)))){if(G.test(/^(height|width)$/)){var B=(G=="width")?["left","right"]:["top","bottom"],D=0;B.each(function(H){D+=this.getStyle("border-"+H+"-width").toInt()+this.getStyle("padding-"+H).toInt();},this);return this["offset"+G.capitalize()]-D+"px";}if((Browser.Engine.presto)&&String(A).test("px")){return A;}if(G.test(/(border(.+)Width|margin|padding)/)){return"0px";}}return A;},setStyles:function(B){for(var A in B){this.setStyle(A,B[A]);}return this;},getStyles:function(){var A={};Array.each(arguments,function(B){A[B]=this.getStyle(B);},this);return A;}});Element.Styles=new Hash({left:"@px",top:"@px",bottom:"@px",right:"@px",width:"@px",height:"@px",maxWidth:"@px",maxHeight:"@px",minWidth:"@px",minHeight:"@px",backgroundColor:"rgb(@, @, @)",backgroundPosition:"@px @px",color:"rgb(@, @, @)",fontSize:"@px",letterSpacing:"@px",lineHeight:"@px",clip:"rect(@px @px @px @px)",margin:"@px @px @px @px",padding:"@px @px @px @px",border:"@px @ rgb(@, @, @) @px @ rgb(@, @, @) @px @ rgb(@, @, @)",borderWidth:"@px @px @px @px",borderStyle:"@ @ @ @",borderColor:"rgb(@, @, @) rgb(@, @, @) rgb(@, @, @) rgb(@, @, @)",zIndex:"@",zoom:"@",fontWeight:"@",textIndent:"@px",opacity:"@"});Element.ShortStyles={margin:{},padding:{},border:{},borderWidth:{},borderStyle:{},borderColor:{}};["Top","Right","Bottom","Left"].each(function(G){var F=Element.ShortStyles;var B=Element.Styles;["margin","padding"].each(function(H){var I=H+G;F[H][I]=B[I]="@px";});var E="border"+G;F.border[E]=B[E]="@px @ rgb(@, @, @)";var D=E+"Width",A=E+"Style",C=E+"Color";F[E]={};F.borderWidth[D]=F[E][D]=B[D]="@px";F.borderStyle[A]=F[E][A]=B[A]="@";F.borderColor[C]=F[E][C]=B[C]="rgb(@, @, @)";});(function(){Element.implement({scrollTo:function(H,I){if(B(this)){this.getWindow().scrollTo(H,I);}else{this.scrollLeft=H;this.scrollTop=I;}return this;},getSize:function(){if(B(this)){return this.getWindow().getSize();}return{x:this.offsetWidth,y:this.offsetHeight};},getScrollSize:function(){if(B(this)){return this.getWindow().getScrollSize();}return{x:this.scrollWidth,y:this.scrollHeight};},getScroll:function(){if(B(this)){return this.getWindow().getScroll();}return{x:this.scrollLeft,y:this.scrollTop};},getScrolls:function(){var I=this,H={x:0,y:0};while(I&&!B(I)){H.x+=I.scrollLeft;H.y+=I.scrollTop;I=I.parentNode;}return H;},getOffsetParent:function(){var H=this;if(B(H)){return null;}if(!Browser.Engine.trident){return H.offsetParent;}while((H=H.parentNode)&&!B(H)){if(D(H,"position")!="static"){return H;}}return null;},getOffsets:function(){if(Browser.Engine.trident){var L=this.getBoundingClientRect(),J=this.getDocument().documentElement;return{x:L.left+J.scrollLeft-J.clientLeft,y:L.top+J.scrollTop-J.clientTop};}var I=this,H={x:0,y:0};if(B(this)){return H;}while(I&&!B(I)){H.x+=I.offsetLeft;H.y+=I.offsetTop;if(Browser.Engine.gecko){if(!F(I)){H.x+=C(I);H.y+=G(I);}var K=I.parentNode;if(K&&D(K,"overflow")!="visible"){H.x+=C(K);H.y+=G(K);}}else{if(I!=this&&Browser.Engine.webkit){H.x+=C(I);H.y+=G(I);}}I=I.offsetParent;}if(Browser.Engine.gecko&&!F(this)){H.x-=C(this);H.y-=G(this);}return H;},getPosition:function(K){if(B(this)){return{x:0,y:0};}var L=this.getOffsets(),I=this.getScrolls();var H={x:L.x-I.x,y:L.y-I.y};var J=(K&&(K=$(K)))?K.getPosition():{x:0,y:0};return{x:H.x-J.x,y:H.y-J.y};},getCoordinates:function(J){if(B(this)){return this.getWindow().getCoordinates();}var H=this.getPosition(J),I=this.getSize();var K={left:H.x,top:H.y,width:I.x,height:I.y};K.right=K.left+K.width;K.bottom=K.top+K.height;return K;},computePosition:function(H){return{left:H.x-E(this,"margin-left"),top:H.y-E(this,"margin-top")};},position:function(H){return this.setStyles(this.computePosition(H));}});Native.implement([Document,Window],{getSize:function(){var I=this.getWindow();if(Browser.Engine.presto||Browser.Engine.webkit){return{x:I.innerWidth,y:I.innerHeight};}var H=A(this);return{x:H.clientWidth,y:H.clientHeight};},getScroll:function(){var I=this.getWindow();var H=A(this);return{x:I.pageXOffset||H.scrollLeft,y:I.pageYOffset||H.scrollTop};},getScrollSize:function(){var I=A(this);var H=this.getSize();return{x:Math.max(I.scrollWidth,H.x),y:Math.max(I.scrollHeight,H.y)};},getPosition:function(){return{x:0,y:0};},getCoordinates:function(){var H=this.getSize();return{top:0,left:0,bottom:H.y,right:H.x,height:H.y,width:H.x};}});var D=Element.getComputedStyle;function E(H,I){return D(H,I).toInt()||0;}function F(H){return D(H,"-moz-box-sizing")=="border-box";}function G(H){return E(H,"border-top-width");}function C(H){return E(H,"border-left-width");}function B(H){return(/^(?:body|html)$/i).test(H.tagName);}function A(H){var I=H.getDocument();return(!I.compatMode||I.compatMode=="CSS1Compat")?I.html:I.body;}})();Native.implement([Window,Document,Element],{getHeight:function(){return this.getSize().y;},getWidth:function(){return this.getSize().x;},getScrollTop:function(){return this.getScroll().y;},getScrollLeft:function(){return this.getScroll().x;},getScrollHeight:function(){return this.getScrollSize().y;},getScrollWidth:function(){return this.getScrollSize().x;},getTop:function(){return this.getPosition().y;},getLeft:function(){return this.getPosition().x;}});Native.implement([Document,Element],{getElements:function(H,G){H=H.split(",");var C,E={};for(var D=0,B=H.length;D<B;D++){var A=H[D],F=Selectors.Utils.search(this,A,E);if(D!=0&&F.item){F=$A(F);}C=(D==0)?F:(C.item)?$A(C).concat(F):C.concat(F);}return new Elements(C,{ddup:(H.length>1),cash:!G});}});Element.implement({match:function(B){if(!B||(B==this)){return true;}var D=Selectors.Utils.parseTagAndID(B);var A=D[0],E=D[1];if(!Selectors.Filters.byID(this,E)||!Selectors.Filters.byTag(this,A)){return false;}var C=Selectors.Utils.parseSelector(B);return(C)?Selectors.Utils.filter(this,C,{}):true;}});var Selectors={Cache:{nth:{},parsed:{}}};Selectors.RegExps={id:(/#([\w-]+)/),tag:(/^(\w+|\*)/),quick:(/^(\w+|\*)$/),splitter:(/\s*([+>~\s])\s*([a-zA-Z#.*:\[])/g),combined:(/\.([\w-]+)|\[(\w+)(?:([!*^$~|]?=)(["']?)([^\4]*?)\4)?\]|:([\w-]+)(?:\(["']?(.*?)?["']?\)|$)/g)};Selectors.Utils={chk:function(B,C){if(!C){return true;}var A=$uid(B);if(!C[A]){return C[A]=true;}return false;},parseNthArgument:function(F){if(Selectors.Cache.nth[F]){return Selectors.Cache.nth[F];}var C=F.match(/^([+-]?\d*)?([a-z]+)?([+-]?\d*)?$/);if(!C){return false;}var E=parseInt(C[1]);var B=(E||E===0)?E:1;var D=C[2]||false;var A=parseInt(C[3])||0;if(B!=0){A--;while(A<1){A+=B;}while(A>=B){A-=B;}}else{B=A;D="index";}switch(D){case"n":C={a:B,b:A,special:"n"};break;case"odd":C={a:2,b:0,special:"n"};break;case"even":C={a:2,b:1,special:"n"};break;case"first":C={a:0,special:"index"};break;case"last":C={special:"last-child"};break;case"only":C={special:"only-child"};break;default:C={a:(B-1),special:"index"};}return Selectors.Cache.nth[F]=C;},parseSelector:function(E){if(Selectors.Cache.parsed[E]){return Selectors.Cache.parsed[E];}var D,H={classes:[],pseudos:[],attributes:[]};while((D=Selectors.RegExps.combined.exec(E))){var I=D[1],G=D[2],F=D[3],B=D[5],C=D[6],J=D[7];if(I){H.classes.push(I);}else{if(C){var A=Selectors.Pseudo.get(C);if(A){H.pseudos.push({parser:A,argument:J});}else{H.attributes.push({name:C,operator:"=",value:J});}}else{if(G){H.attributes.push({name:G,operator:F,value:B});}}}}if(!H.classes.length){delete H.classes;}if(!H.attributes.length){delete H.attributes;}if(!H.pseudos.length){delete H.pseudos;}if(!H.classes&&!H.attributes&&!H.pseudos){H=null;}return Selectors.Cache.parsed[E]=H;},parseTagAndID:function(B){var A=B.match(Selectors.RegExps.tag);var C=B.match(Selectors.RegExps.id);return[(A)?A[1]:"*",(C)?C[1]:false];},filter:function(F,C,E){var D;if(C.classes){for(D=C.classes.length;D--;D){var G=C.classes[D];if(!Selectors.Filters.byClass(F,G)){return false;}}}if(C.attributes){for(D=C.attributes.length;D--;D){var B=C.attributes[D];if(!Selectors.Filters.byAttribute(F,B.name,B.operator,B.value)){return false;}}}if(C.pseudos){for(D=C.pseudos.length;D--;D){var A=C.pseudos[D];if(!Selectors.Filters.byPseudo(F,A.parser,A.argument,E)){return false;}}}return true;},getByTagAndID:function(B,A,D){if(D){var C=(B.getElementById)?B.getElementById(D,true):Element.getElementById(B,D,true);return(C&&Selectors.Filters.byTag(C,A))?[C]:[];}else{return B.getElementsByTagName(A);}},search:function(I,H,N){var B=[];var C=H.trim().replace(Selectors.RegExps.splitter,function(Y,X,W){B.push(X);return":)"+W;}).split(":)");var J,E,U;for(var T=0,P=C.length;T<P;T++){var S=C[T];if(T==0&&Selectors.RegExps.quick.test(S)){J=I.getElementsByTagName(S);continue;}var A=B[T-1];var K=Selectors.Utils.parseTagAndID(S);var V=K[0],L=K[1];if(T==0){J=Selectors.Utils.getByTagAndID(I,V,L);}else{var D={},G=[];for(var R=0,Q=J.length;R<Q;R++){G=Selectors.Getters[A](G,J[R],V,L,D);}J=G;}var F=Selectors.Utils.parseSelector(S);if(F){E=[];for(var O=0,M=J.length;O<M;O++){U=J[O];if(Selectors.Utils.filter(U,F,N)){E.push(U);}}J=E;}}return J;}};Selectors.Getters={" ":function(H,G,I,A,E){var D=Selectors.Utils.getByTagAndID(G,I,A);for(var C=0,B=D.length;C<B;C++){var F=D[C];if(Selectors.Utils.chk(F,E)){H.push(F);}}return H;},">":function(H,G,I,A,F){var C=Selectors.Utils.getByTagAndID(G,I,A);for(var E=0,D=C.length;E<D;E++){var B=C[E];if(B.parentNode==G&&Selectors.Utils.chk(B,F)){H.push(B);}}return H;},"+":function(C,B,A,E,D){while((B=B.nextSibling)){if(B.nodeType==1){if(Selectors.Utils.chk(B,D)&&Selectors.Filters.byTag(B,A)&&Selectors.Filters.byID(B,E)){C.push(B);}break;}}return C;},"~":function(C,B,A,E,D){while((B=B.nextSibling)){if(B.nodeType==1){if(!Selectors.Utils.chk(B,D)){break;}if(Selectors.Filters.byTag(B,A)&&Selectors.Filters.byID(B,E)){C.push(B);}}}return C;}};Selectors.Filters={byTag:function(B,A){return(A=="*"||(B.tagName&&B.tagName.toLowerCase()==A));},byID:function(A,B){return(!B||(A.id&&A.id==B));},byClass:function(B,A){return(B.className&&B.className.contains(A," "));},byPseudo:function(A,D,C,B){return D.call(A,C,B);},byAttribute:function(C,D,B,E){var A=Element.prototype.getProperty.call(C,D);if(!A){return(B=="!=");}if(!B||E==undefined){return true;}switch(B){case"=":return(A==E);case"*=":return(A.contains(E));case"^=":return(A.substr(0,E.length)==E);case"$=":return(A.substr(A.length-E.length)==E);case"!=":return(A!=E);case"~=":return A.contains(E," ");case"|=":return A.contains(E,"-");}return false;}};Selectors.Pseudo=new Hash({checked:function(){return this.checked;},empty:function(){return!(this.innerText||this.textContent||"").length;},not:function(A){return!Element.match(this,A);},contains:function(A){return(this.innerText||this.textContent||"").contains(A);},"first-child":function(){return Selectors.Pseudo.index.call(this,0);},"last-child":function(){var A=this;while((A=A.nextSibling)){if(A.nodeType==1){return false;}}return true;},"only-child":function(){var B=this;while((B=B.previousSibling)){if(B.nodeType==1){return false;}}var A=this;while((A=A.nextSibling)){if(A.nodeType==1){return false;}}return true;},"nth-child":function(G,E){G=(G==undefined)?"n":G;var C=Selectors.Utils.parseNthArgument(G);if(C.special!="n"){return Selectors.Pseudo[C.special].call(this,C.a,E);}var F=0;E.positions=E.positions||{};var D=$uid(this);if(!E.positions[D]){var B=this;while((B=B.previousSibling)){if(B.nodeType!=1){continue;}F++;var A=E.positions[$uid(B)];if(A!=undefined){F=A+F;break;}}E.positions[D]=F;}return(E.positions[D]%C.a==C.b);},index:function(A){var B=this,C=0;while((B=B.previousSibling)){if(B.nodeType==1&&++C>A){return false;}}return(C==A);},even:function(B,A){return Selectors.Pseudo["nth-child"].call(this,"2n+1",A);},odd:function(B,A){return Selectors.Pseudo["nth-child"].call(this,"2n",A);}});Element.Events.domready={onAdd:function(A){if(Browser.loaded){A.call(this);}}};(function(){var B=function(){if(Browser.loaded){return;}Browser.loaded=true;window.fireEvent("domready");document.fireEvent("domready");};if(Browser.Engine.trident){var A=document.createElement("div");(function(){($try(function(){A.doScroll("left");return $(A).inject(document.body).set("html","temp").dispose();}))?B():arguments.callee.delay(50);})();}else{if(Browser.Engine.webkit&&Browser.Engine.version<525){(function(){(["loaded","complete"].contains(document.readyState))?B():arguments.callee.delay(50);})();}else{window.addEvent("load",B);document.addEvent("DOMContentLoaded",B);}}})();var JSON=new Hash({$specialChars:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},$replaceChars:function(A){return JSON.$specialChars[A]||"\\u00"+Math.floor(A.charCodeAt()/16).toString(16)+(A.charCodeAt()%16).toString(16);},encode:function(B){switch($type(B)){case"string":return'"'+B.replace(/[\x00-\x1f\\"]/g,JSON.$replaceChars)+'"';case"array":return"["+String(B.map(JSON.encode).filter($defined))+"]";case"object":case"hash":var A=[];Hash.each(B,function(E,D){var C=JSON.encode(E);if(C){A.push(JSON.encode(D)+":"+C);}});return"{"+A+"}";case"number":case"boolean":return String(B);case false:return"null";}return null;},decode:function(string,secure){if($type(string)!="string"||!string.length){return null;}if(secure&&!(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(string.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,""))){return null;}return eval("("+string+")");}});Native.implement([Hash,Array,String,Number],{toJSON:function(){return JSON.encode(this);}});var Cookie=new Class({Implements:Options,options:{path:false,domain:false,duration:false,secure:false,document:document},initialize:function(B,A){this.key=B;this.setOptions(A);},write:function(B){B=encodeURIComponent(B);if(this.options.domain){B+="; domain="+this.options.domain;}if(this.options.path){B+="; path="+this.options.path;}if(this.options.duration){var A=new Date();A.setTime(A.getTime()+this.options.duration*24*60*60*1000);B+="; expires="+A.toGMTString();}if(this.options.secure){B+="; secure";}this.options.document.cookie=this.key+"="+B;return this;},read:function(){var A=this.options.document.cookie.match("(?:^|;)\\s*"+this.key.escapeRegExp()+"=([^;]*)");return(A)?decodeURIComponent(A[1]):null;},dispose:function(){new Cookie(this.key,$merge(this.options,{duration:-1})).write("");return this;}});Cookie.write=function(B,C,A){return new Cookie(B,A).write(C);};Cookie.read=function(A){return new Cookie(A).read();};Cookie.dispose=function(B,A){return new Cookie(B,A).dispose();};var Swiff=new Class({Implements:[Options],options:{id:null,height:1,width:1,container:null,properties:{},params:{quality:"high",allowScriptAccess:"always",wMode:"transparent",swLiveConnect:true},callBacks:{},vars:{}},toElement:function(){return this.object;},initialize:function(L,M){this.instance="Swiff_"+$time();this.setOptions(M);M=this.options;var B=this.id=M.id||this.instance;var A=$(M.container);Swiff.CallBacks[this.instance]={};var E=M.params,G=M.vars,F=M.callBacks;var H=$extend({height:M.height,width:M.width},M.properties);var K=this;for(var D in F){Swiff.CallBacks[this.instance][D]=(function(N){return function(){return N.apply(K.object,arguments);};})(F[D]);G[D]="Swiff.CallBacks."+this.instance+"."+D;}E.flashVars=Hash.toQueryString(G);if(Browser.Engine.trident){H.classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";E.movie=L;}else{H.type="application/x-shockwave-flash";H.data=L;}var J='<object id="'+B+'"';for(var I in H){J+=" "+I+'="'+H[I]+'"';}J+=">";for(var C in E){if(E[C]){J+='<param name="'+C+'" value="'+E[C]+'" />';}}J+="</object>";this.object=((A)?A.empty():new Element("div")).set("html",J).firstChild;},replaces:function(A){A=$(A,true);A.parentNode.replaceChild(this.toElement(),A);return this;},inject:function(A){$(A,true).appendChild(this.toElement());return this;},remote:function(){return Swiff.remote.apply(Swiff,[this.toElement()].extend(arguments));}});Swiff.CallBacks={};Swiff.remote=function(obj,fn){var rs=obj.CallFunction('<invoke name="'+fn+'" returntype="javascript">'+__flash__argumentsToXML(arguments,2)+"</invoke>");return eval(rs);};var Fx=new Class({Implements:[Chain,Events,Options],options:{fps:50,unit:false,duration:500,link:"ignore"},initialize:function(A){this.subject=this.subject||this;this.setOptions(A);this.options.duration=Fx.Durations[this.options.duration]||this.options.duration.toInt();var B=this.options.wait;if(B===false){this.options.link="cancel";}},getTransition:function(){return function(A){return-(Math.cos(Math.PI*A)-1)/2;};},step:function(){var A=$time();if(A<this.time+this.options.duration){var B=this.transition((A-this.time)/this.options.duration);this.set(this.compute(this.from,this.to,B));}else{this.set(this.compute(this.from,this.to,1));this.complete();}},set:function(A){return A;},compute:function(C,B,A){return Fx.compute(C,B,A);},check:function(A){if(!this.timer){return true;}switch(this.options.link){case"cancel":this.cancel();return true;case"chain":this.chain(A.bind(this,Array.slice(arguments,1)));return false;}return false;},start:function(B,A){if(!this.check(arguments.callee,B,A)){return this;}this.from=B;this.to=A;this.time=0;this.transition=this.getTransition();this.startTimer();this.onStart();return this;},complete:function(){if(this.stopTimer()){this.onComplete();}return this;},cancel:function(){if(this.stopTimer()){this.onCancel();}return this;},onStart:function(){this.fireEvent("start",this.subject);},onComplete:function(){this.fireEvent("complete",this.subject);if(!this.callChain()){this.fireEvent("chainComplete",this.subject);}},onCancel:function(){this.fireEvent("cancel",this.subject).clearChain();},pause:function(){this.stopTimer();return this;},resume:function(){this.startTimer();return this;},stopTimer:function(){if(!this.timer){return false;}this.time=$time()-this.time;this.timer=$clear(this.timer);return true;},startTimer:function(){if(this.timer){return false;}this.time=$time()-this.time;this.timer=this.step.periodical(Math.round(1000/this.options.fps),this);return true;}});Fx.compute=function(C,B,A){return(B-C)*A+C;};Fx.Durations={"short":250,normal:500,"long":1000};Fx.CSS=new Class({Extends:Fx,prepare:function(D,E,B){B=$splat(B);var C=B[1];if(!$chk(C)){B[1]=B[0];B[0]=D.getStyle(E);}var A=B.map(this.parse);return{from:A[0],to:A[1]};},parse:function(A){A=$lambda(A)();A=(typeof A=="string")?A.split(" "):$splat(A);return A.map(function(C){C=String(C);var B=false;Fx.CSS.Parsers.each(function(F,E){if(B){return;}var D=F.parse(C);if($chk(D)){B={value:D,parser:F};}});B=B||{value:C,parser:Fx.CSS.Parsers.String};return B;});},compute:function(D,C,B){var A=[];(Math.min(D.length,C.length)).times(function(E){A.push({value:D[E].parser.compute(D[E].value,C[E].value,B),parser:D[E].parser});});A.$family={name:"fx:css:value"};return A;},serve:function(C,B){if($type(C)!="fx:css:value"){C=this.parse(C);}var A=[];C.each(function(D){A=A.concat(D.parser.serve(D.value,B));});return A;},render:function(A,D,C,B){A.setStyle(D,this.serve(C,B));},search:function(A){if(Fx.CSS.Cache[A]){return Fx.CSS.Cache[A];}var B={};Array.each(document.styleSheets,function(E,D){var C=E.href;if(C&&C.contains("://")&&!C.contains(document.domain)){return;}var F=E.rules||E.cssRules;Array.each(F,function(I,G){if(!I.style){return;}var H=(I.selectorText)?I.selectorText.replace(/^\w+/,function(J){return J.toLowerCase();}):null;if(!H||!H.test("^"+A+"$")){return;}Element.Styles.each(function(K,J){if(!I.style[J]||Element.ShortStyles[J]){return;}K=String(I.style[J]);B[J]=(K.test(/^rgb/))?K.rgbToHex():K;});});});return Fx.CSS.Cache[A]=B;}});Fx.CSS.Cache={};Fx.CSS.Parsers=new Hash({Color:{parse:function(A){if(A.match(/^#[0-9a-f]{3,6}$/i)){return A.hexToRgb(true);}return((A=A.match(/(\d+),\s*(\d+),\s*(\d+)/)))?[A[1],A[2],A[3]]:false;},compute:function(C,B,A){return C.map(function(E,D){return Math.round(Fx.compute(C[D],B[D],A));});},serve:function(A){return A.map(Number);}},Number:{parse:parseFloat,compute:Fx.compute,serve:function(B,A){return(A)?B+A:B;}},String:{parse:$lambda(false),compute:$arguments(1),serve:$arguments(0)}});Fx.Tween=new Class({Extends:Fx.CSS,initialize:function(B,A){this.element=this.subject=$(B);this.parent(A);},set:function(B,A){if(arguments.length==1){A=B;B=this.property||this.options.property;}this.render(this.element,B,A,this.options.unit);return this;},start:function(C,E,D){if(!this.check(arguments.callee,C,E,D)){return this;}var B=Array.flatten(arguments);this.property=this.options.property||B.shift();var A=this.prepare(this.element,this.property,B);return this.parent(A.from,A.to);}});Element.Properties.tween={set:function(A){var B=this.retrieve("tween");if(B){B.cancel();}return this.eliminate("tween").store("tween:options",$extend({link:"cancel"},A));},get:function(A){if(A||!this.retrieve("tween")){if(A||!this.retrieve("tween:options")){this.set("tween",A);}this.store("tween",new Fx.Tween(this,this.retrieve("tween:options")));}return this.retrieve("tween");}};Element.implement({tween:function(A,C,B){this.get("tween").start(arguments);return this;},fade:function(C){var E=this.get("tween"),D="opacity",A;C=$pick(C,"toggle");switch(C){case"in":E.start(D,1);break;case"out":E.start(D,0);break;case"show":E.set(D,1);break;case"hide":E.set(D,0);break;case"toggle":var B=this.retrieve("fade:flag",this.get("opacity")==1);E.start(D,(B)?0:1);this.store("fade:flag",!B);A=true;break;default:E.start(D,arguments);}if(!A){this.eliminate("fade:flag");}return this;},highlight:function(C,A){if(!A){A=this.retrieve("highlight:original",this.getStyle("background-color"));A=(A=="transparent")?"#fff":A;}var B=this.get("tween");B.start("background-color",C||"#ffff88",A).chain(function(){this.setStyle("background-color",this.retrieve("highlight:original"));B.callChain();}.bind(this));return this;}});Fx.Morph=new Class({Extends:Fx.CSS,initialize:function(B,A){this.element=this.subject=$(B);this.parent(A);},set:function(A){if(typeof A=="string"){A=this.search(A);}for(var B in A){this.render(this.element,B,A[B],this.options.unit);}return this;},compute:function(E,D,C){var A={};for(var B in E){A[B]=this.parent(E[B],D[B],C);}return A;},start:function(B){if(!this.check(arguments.callee,B)){return this;}if(typeof B=="string"){B=this.search(B);}var E={},D={};for(var C in B){var A=this.prepare(this.element,C,B[C]);E[C]=A.from;D[C]=A.to;}return this.parent(E,D);}});Element.Properties.morph={set:function(A){var B=this.retrieve("morph");if(B){B.cancel();}return this.eliminate("morph").store("morph:options",$extend({link:"cancel"},A));},get:function(A){if(A||!this.retrieve("morph")){if(A||!this.retrieve("morph:options")){this.set("morph",A);}this.store("morph",new Fx.Morph(this,this.retrieve("morph:options")));}return this.retrieve("morph");}};Element.implement({morph:function(A){this.get("morph").start(A);return this;}});Fx.implement({getTransition:function(){var A=this.options.transition||Fx.Transitions.Sine.easeInOut;if(typeof A=="string"){var B=A.split(":");A=Fx.Transitions;A=A[B[0]]||A[B[0].capitalize()];if(B[1]){A=A["ease"+B[1].capitalize()+(B[2]?B[2].capitalize():"")];}}return A;}});Fx.Transition=function(B,A){A=$splat(A);return $extend(B,{easeIn:function(C){return B(C,A);},easeOut:function(C){return 1-B(1-C,A);},easeInOut:function(C){return(C<=0.5)?B(2*C,A)/2:(2-B(2*(1-C),A))/2;}});};Fx.Transitions=new Hash({linear:$arguments(0)});Fx.Transitions.extend=function(A){for(var B in A){Fx.Transitions[B]=new Fx.Transition(A[B]);}};Fx.Transitions.extend({Pow:function(B,A){return Math.pow(B,A[0]||6);},Expo:function(A){return Math.pow(2,8*(A-1));},Circ:function(A){return 1-Math.sin(Math.acos(A));},Sine:function(A){return 1-Math.sin((1-A)*Math.PI/2);},Back:function(B,A){A=A[0]||1.618;return Math.pow(B,2)*((A+1)*B-A);},Bounce:function(D){var C;for(var B=0,A=1;1;B+=A,A/=2){if(D>=(7-4*B)/11){C=A*A-Math.pow((11-6*B-11*D)/4,2);break;}}return C;},Elastic:function(B,A){return Math.pow(2,10*--B)*Math.cos(20*B*Math.PI*(A[0]||1)/3);}});["Quad","Cubic","Quart","Quint"].each(function(B,A){Fx.Transitions[B]=new Fx.Transition(function(C){return Math.pow(C,[A+2]);});});var Request=new Class({Implements:[Chain,Events,Options],options:{url:"",data:"",headers:{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*"},async:true,format:false,method:"post",link:"ignore",isSuccess:null,emulation:true,urlEncoded:true,encoding:"utf-8",evalScripts:false,evalResponse:false},initialize:function(A){this.xhr=new Browser.Request();this.setOptions(A);this.options.isSuccess=this.options.isSuccess||this.isSuccess;this.headers=new Hash(this.options.headers);},onStateChange:function(){if(this.xhr.readyState!=4||!this.running){return;}this.running=false;this.status=0;$try(function(){this.status=this.xhr.status;}.bind(this));if(this.options.isSuccess.call(this,this.status)){this.response={text:this.xhr.responseText,xml:this.xhr.responseXML};this.success(this.response.text,this.response.xml);}else{this.response={text:null,xml:null};this.failure();}this.xhr.onreadystatechange=$empty;},isSuccess:function(){return((this.status>=200)&&(this.status<300));},processScripts:function(A){if(this.options.evalResponse||(/(ecma|java)script/).test(this.getHeader("Content-type"))){return $exec(A);}return A.stripScripts(this.options.evalScripts);},success:function(B,A){this.onSuccess(this.processScripts(B),A);},onSuccess:function(){this.fireEvent("complete",arguments).fireEvent("success",arguments).callChain();},failure:function(){this.onFailure();},onFailure:function(){this.fireEvent("complete").fireEvent("failure",this.xhr);},setHeader:function(A,B){this.headers.set(A,B);return this;},getHeader:function(A){return $try(function(){return this.xhr.getResponseHeader(A);}.bind(this));},check:function(A){if(!this.running){return true;}switch(this.options.link){case"cancel":this.cancel();return true;case"chain":this.chain(A.bind(this,Array.slice(arguments,1)));return false;}return false;},send:function(I){if(!this.check(arguments.callee,I)){return this;}this.running=true;var G=$type(I);if(G=="string"||G=="element"){I={data:I};}var D=this.options;I=$extend({data:D.data,url:D.url,method:D.method},I);var E=I.data,B=I.url,A=I.method;switch($type(E)){case"element":E=$(E).toQueryString();break;case"object":case"hash":E=Hash.toQueryString(E);}if(this.options.format){var H="format="+this.options.format;E=(E)?H+"&"+E:H;}if(this.options.emulation&&["put","delete"].contains(A)){var F="_method="+A;E=(E)?F+"&"+E:F;A="post";}if(this.options.urlEncoded&&A=="post"){var C=(this.options.encoding)?"; charset="+this.options.encoding:"";this.headers.set("Content-type","application/x-www-form-urlencoded"+C);}if(E&&A=="get"){B=B+(B.contains("?")?"&":"?")+E;E=null;}this.xhr.open(A.toUpperCase(),B,this.options.async);this.xhr.onreadystatechange=this.onStateChange.bind(this);this.headers.each(function(K,J){try{this.xhr.setRequestHeader(J,K);}catch(L){this.fireEvent("exception",[J,K]);}},this);this.fireEvent("request");this.xhr.send(E);if(!this.options.async){this.onStateChange();}return this;},cancel:function(){if(!this.running){return this;}this.running=false;this.xhr.abort();this.xhr.onreadystatechange=$empty;this.xhr=new Browser.Request();this.fireEvent("cancel");return this;}});(function(){var A={};["get","post","put","delete","GET","POST","PUT","DELETE"].each(function(B){A[B]=function(){var C=Array.link(arguments,{url:String.type,data:$defined});return this.send($extend(C,{method:B.toLowerCase()}));};});Request.implement(A);})();Element.Properties.send={set:function(A){var B=this.retrieve("send");if(B){B.cancel();}return this.eliminate("send").store("send:options",$extend({data:this,link:"cancel",method:this.get("method")||"post",url:this.get("action")},A));},get:function(A){if(A||!this.retrieve("send")){if(A||!this.retrieve("send:options")){this.set("send",A);}this.store("send",new Request(this.retrieve("send:options")));}return this.retrieve("send");}};Element.implement({send:function(A){var B=this.get("send");B.send({data:this,url:A||B.options.url});return this;}});Request.HTML=new Class({Extends:Request,options:{update:false,evalScripts:true,filter:false},processHTML:function(C){var B=C.match(/<body[^>]*>([\s\S]*?)<\/body>/i);C=(B)?B[1]:C;var A=new Element("div");return $try(function(){var D="<root>"+C+"</root>",G;if(Browser.Engine.trident){G=new ActiveXObject("Microsoft.XMLDOM");G.async=false;G.loadXML(D);}else{G=new DOMParser().parseFromString(D,"text/xml");}D=G.getElementsByTagName("root")[0];for(var F=0,E=D.childNodes.length;F<E;F++){var H=Element.clone(D.childNodes[F],true,true);if(H){A.grab(H);}}return A;})||A.set("html",C);},success:function(D){var C=this.options,B=this.response;B.html=D.stripScripts(function(E){B.javascript=E;});var A=this.processHTML(B.html);B.tree=A.childNodes;B.elements=A.getElements("*");if(C.filter){B.tree=B.elements.filter(C.filter);}if(C.update){$(C.update).empty().set("html",B.html);}if(C.evalScripts){$exec(B.javascript);}this.onSuccess(B.tree,B.elements,B.html,B.javascript);}});Element.Properties.load={set:function(A){var B=this.retrieve("load");if(B){B.cancel();}return this.eliminate("load").store("load:options",$extend({data:this,link:"cancel",update:this,method:"get"},A));},get:function(A){if(A||!this.retrieve("load")){if(A||!this.retrieve("load:options")){this.set("load",A);}this.store("load",new Request.HTML(this.retrieve("load:options")));}return this.retrieve("load");}};Element.implement({load:function(){this.get("load").send(Array.link(arguments,{data:Object.type,url:String.type}));return this;}});Request.JSON=new Class({Extends:Request,options:{secure:true},initialize:function(A){this.parent(A);this.headers.extend({Accept:"application/json","X-Request":"JSON"});},success:function(A){this.response.json=JSON.decode(A,this.options.secure);this.onSuccess(this.response.json,A);}});dhtmlxAjax={get:function(url,callback){var t=new dtmlXMLLoaderObject(true);t.async=(arguments.length<3);t.waitCall=callback;t.loadXML(url)
return t},post:function(url,post,callback){var t=new dtmlXMLLoaderObject(true);t.async=(arguments.length<4);t.waitCall=callback;t.loadXML(url,true,post)
return t},getSync:function(url){return this.get(url,null,true)},postSync:function(url,post){return this.post(url,post,null,true)}};function dtmlXMLLoaderObject(funcObject,dhtmlObject,async,rSeed){this.xmlDoc="";if(typeof(async)!="undefined")
this.async=async;else
this.async=true;this.onloadAction=funcObject||null;this.mainObject=dhtmlObject||null;this.waitCall=null;this.rSeed=rSeed||false;return this};dtmlXMLLoaderObject.prototype.waitLoadFunction=function(dhtmlObject){var once=true;this.check=function(){if((dhtmlObject)&&(dhtmlObject.onloadAction!=null)){if((!dhtmlObject.xmlDoc.readyState)||(dhtmlObject.xmlDoc.readyState==4)){if(!once)return;once=false;if(typeof dhtmlObject.onloadAction=="function")dhtmlObject.onloadAction(dhtmlObject.mainObject,null,null,null,dhtmlObject);if(dhtmlObject.waitCall){dhtmlObject.waitCall.call(this,dhtmlObject);dhtmlObject.waitCall=null}}}};return this.check};dtmlXMLLoaderObject.prototype.getXMLTopNode=function(tagName,oldObj){if(this.xmlDoc.responseXML){var temp=this.xmlDoc.responseXML.getElementsByTagName(tagName);if(temp.length==0&&tagName.indexOf(":")!=-1)
var temp=this.xmlDoc.responseXML.getElementsByTagName((tagName.split(":"))[1]);var z=temp[0]}else
var z=this.xmlDoc.documentElement;if(z){this._retry=false;return z};if((_isIE)&&(!this._retry)){var xmlString=this.xmlDoc.responseText;var oldObj=this.xmlDoc;this._retry=true;this.xmlDoc=new ActiveXObject("Microsoft.XMLDOM");this.xmlDoc.async=false;this.xmlDoc["loadXM"+"L"](xmlString);return this.getXMLTopNode(tagName,oldObj)};dhtmlxError.throwError("LoadXML","Incorrect XML",[(oldObj||this.xmlDoc),this.mainObject]);return document.createElement("DIV")};dtmlXMLLoaderObject.prototype.loadXMLString=function(xmlString){{try{var parser=new DOMParser();this.xmlDoc=parser.parseFromString(xmlString,"text/xml")}catch(e){this.xmlDoc=new ActiveXObject("Microsoft.XMLDOM");this.xmlDoc.async=this.async;this.xmlDoc["loadXM"+"L"](xmlString)}};this.onloadAction(this.mainObject,null,null,null,this);if(this.waitCall){this.waitCall();this.waitCall=null}};dtmlXMLLoaderObject.prototype.loadXML=function(filePath,postMode,postVars,rpc){if(this.rSeed)filePath+=((filePath.indexOf("?")!=-1)?"&":"?")+"a_dhx_rSeed="+(new Date()).valueOf();this.filePath=filePath;if((!_isIE)&&(window.XMLHttpRequest))
this.xmlDoc=new XMLHttpRequest();else{if(document.implementation&&document.implementation.createDocument){this.xmlDoc=document.implementation.createDocument("","",null);this.xmlDoc.onload=new this.waitLoadFunction(this);this.xmlDoc.load(filePath);return}else
this.xmlDoc=new ActiveXObject("Microsoft.XMLHTTP")};if(this.async)this.xmlDoc.onreadystatechange=new this.waitLoadFunction(this);this.xmlDoc.open(postMode?"POST":"GET",filePath,this.async);if(rpc){this.xmlDoc.setRequestHeader("User-Agent","dhtmlxRPC v0.1 ("+navigator.userAgent+")");this.xmlDoc.setRequestHeader("Content-type","text/xml")}else if(postMode)this.xmlDoc.setRequestHeader('Content-type','application/x-www-form-urlencoded');this.xmlDoc.setRequestHeader("X-Requested-With","XMLHttpRequest");this.xmlDoc.send(null||postVars);if(!this.async)(new this.waitLoadFunction(this))()};dtmlXMLLoaderObject.prototype.destructor=function(){this.onloadAction=null;this.mainObject=null;this.xmlDoc=null;return null};dtmlXMLLoaderObject.prototype.xmlNodeToJSON=function(node){var t={};for(var i=0;i<node.attributes.length;i++)t[node.attributes[i].name]=node.attributes[i].value;t["_tagvalue"]=node.firstChild?node.firstChild.nodeValue:"";for(var i=0;i<node.childNodes.length;i++){var name=node.childNodes[i].tagName;if(name){if(!t[name])t[name]=[];t[name].push(this.xmlNodeToJSON(node.childNodes[i]))}};return t};function callerFunction(funcObject,dhtmlObject){this.handler=function(e){if(!e)e=window.event;funcObject(e,dhtmlObject);return true};return this.handler};function getAbsoluteLeft(htmlObject){var xPos=htmlObject.offsetLeft;var temp=htmlObject.offsetParent;while(temp!=null){xPos+=temp.offsetLeft;temp=temp.offsetParent};return xPos};function getAbsoluteTop(htmlObject){var yPos=htmlObject.offsetTop;var temp=htmlObject.offsetParent;while(temp!=null){yPos+=temp.offsetTop;temp=temp.offsetParent};return yPos};function convertStringToBoolean(inputString){if(typeof(inputString)=="string")
inputString=inputString.toLowerCase();switch(inputString){case"1":case"true":case"yes":case"y":case 1:case true:return true;break;default:return false}};function getUrlSymbol(str){if(str.indexOf("?")!=-1)
return"&"
else
return"?"};function dhtmlDragAndDropObject(){if(window.dhtmlDragAndDrop)return window.dhtmlDragAndDrop;this.lastLanding=0;this.dragNode=0;this.dragStartNode=0;this.dragStartObject=0;this.tempDOMU=null;this.tempDOMM=null;this.waitDrag=0;window.dhtmlDragAndDrop=this;return this};dhtmlDragAndDropObject.prototype.removeDraggableItem=function(htmlNode){htmlNode.onmousedown=null;htmlNode.dragStarter=null;htmlNode.dragLanding=null};dhtmlDragAndDropObject.prototype.addDraggableItem=function(htmlNode,dhtmlObject){htmlNode.onmousedown=this.preCreateDragCopy;htmlNode.dragStarter=dhtmlObject;this.addDragLanding(htmlNode,dhtmlObject)};dhtmlDragAndDropObject.prototype.addDragLanding=function(htmlNode,dhtmlObject){htmlNode.dragLanding=dhtmlObject};dhtmlDragAndDropObject.prototype.preCreateDragCopy=function(e){if(e&&(e||event).button==2)
return;if(window.dhtmlDragAndDrop.waitDrag){window.dhtmlDragAndDrop.waitDrag=0;document.body.onmouseup=window.dhtmlDragAndDrop.tempDOMU;document.body.onmousemove=window.dhtmlDragAndDrop.tempDOMM;return false};window.dhtmlDragAndDrop.waitDrag=1;window.dhtmlDragAndDrop.tempDOMU=document.body.onmouseup;window.dhtmlDragAndDrop.tempDOMM=document.body.onmousemove;window.dhtmlDragAndDrop.dragStartNode=this;window.dhtmlDragAndDrop.dragStartObject=this.dragStarter;document.body.onmouseup=window.dhtmlDragAndDrop.preCreateDragCopy;document.body.onmousemove=window.dhtmlDragAndDrop.callDrag;if((e)&&(e.preventDefault)){e.preventDefault();return false};return false};dhtmlDragAndDropObject.prototype.callDrag=function(e){if(!e)e=window.event;dragger=window.dhtmlDragAndDrop;if((e.button==0)&&(_isIE))
return dragger.stopDrag();if(!dragger.dragNode&&dragger.waitDrag){dragger.dragNode=dragger.dragStartObject._createDragNode(dragger.dragStartNode,e);if(!dragger.dragNode)return dragger.stopDrag();dragger.gldragNode=dragger.dragNode;document.body.appendChild(dragger.dragNode);document.body.onmouseup=dragger.stopDrag;dragger.waitDrag=0;dragger.dragNode.pWindow=window;dragger.initFrameRoute()};if(dragger.dragNode.parentNode!=window.document.body){var grd=dragger.gldragNode;if(dragger.gldragNode.old)grd=dragger.gldragNode.old;grd.parentNode.removeChild(grd);var oldBody=dragger.dragNode.pWindow;if(_isIE){var div=document.createElement("Div");div.innerHTML=dragger.dragNode.outerHTML;dragger.dragNode=div.childNodes[0]}else
dragger.dragNode=dragger.dragNode.cloneNode(true);dragger.dragNode.pWindow=window;dragger.gldragNode.old=dragger.dragNode;document.body.appendChild(dragger.dragNode);oldBody.dhtmlDragAndDrop.dragNode=dragger.dragNode};dragger.dragNode.style.left=e.clientX+15+(dragger.fx?dragger.fx*(-1):0)
+(document.body.scrollLeft||document.documentElement.scrollLeft)+"px";dragger.dragNode.style.top=e.clientY+3+(dragger.fy?dragger.fy*(-1):0)
+(document.body.scrollTop||document.documentElement.scrollTop)+"px";if(!e.srcElement)var z=e.target;else
z=e.srcElement;dragger.checkLanding(z,e)};dhtmlDragAndDropObject.prototype.calculateFramePosition=function(n){if(window.name){var el=parent.frames[window.name].frameElement.offsetParent;var fx=0;var fy=0;while(el){fx+=el.offsetLeft;fy+=el.offsetTop;el=el.offsetParent};if((parent.dhtmlDragAndDrop)){var ls=parent.dhtmlDragAndDrop.calculateFramePosition(1);fx+=ls.split('_')[0]*1;fy+=ls.split('_')[1]*1};if(n)return fx+"_"+fy;else
this.fx=fx;this.fy=fy};return"0_0"};dhtmlDragAndDropObject.prototype.checkLanding=function(htmlObject,e){if((htmlObject)&&(htmlObject.dragLanding)){if(this.lastLanding)this.lastLanding.dragLanding._dragOut(this.lastLanding);this.lastLanding=htmlObject;this.lastLanding=this.lastLanding.dragLanding._dragIn(this.lastLanding,this.dragStartNode,e.clientX,e.clientY,e);this.lastLanding_scr=(_isIE?e.srcElement:e.target)}else{if((htmlObject)&&(htmlObject.tagName!="BODY"))
this.checkLanding(htmlObject.parentNode,e);else{if(this.lastLanding)this.lastLanding.dragLanding._dragOut(this.lastLanding,e.clientX,e.clientY,e);this.lastLanding=0;if(this._onNotFound)this._onNotFound()}}};dhtmlDragAndDropObject.prototype.stopDrag=function(e,mode){dragger=window.dhtmlDragAndDrop;if(!mode){dragger.stopFrameRoute();var temp=dragger.lastLanding;dragger.lastLanding=null;if(temp)temp.dragLanding._drag(dragger.dragStartNode,dragger.dragStartObject,temp,(_isIE?event.srcElement:e.target))};dragger.lastLanding=null;if((dragger.dragNode)&&(dragger.dragNode.parentNode==document.body))
dragger.dragNode.parentNode.removeChild(dragger.dragNode);dragger.dragNode=0;dragger.gldragNode=0;dragger.fx=0;dragger.fy=0;dragger.dragStartNode=0;dragger.dragStartObject=0;document.body.onmouseup=dragger.tempDOMU;document.body.onmousemove=dragger.tempDOMM;dragger.tempDOMU=null;dragger.tempDOMM=null;dragger.waitDrag=0};dhtmlDragAndDropObject.prototype.stopFrameRoute=function(win){if(win)window.dhtmlDragAndDrop.stopDrag(1,1);for(var i=0;i<window.frames.length;i++)if((window.frames[i]!=win)&&(window.frames[i].dhtmlDragAndDrop))
window.frames[i].dhtmlDragAndDrop.stopFrameRoute(window);if((parent.dhtmlDragAndDrop)&&(parent!=window)&&(parent!=win))
parent.dhtmlDragAndDrop.stopFrameRoute(window)};dhtmlDragAndDropObject.prototype.initFrameRoute=function(win,mode){if(win){window.dhtmlDragAndDrop.preCreateDragCopy();window.dhtmlDragAndDrop.dragStartNode=win.dhtmlDragAndDrop.dragStartNode;window.dhtmlDragAndDrop.dragStartObject=win.dhtmlDragAndDrop.dragStartObject;window.dhtmlDragAndDrop.dragNode=win.dhtmlDragAndDrop.dragNode;window.dhtmlDragAndDrop.gldragNode=win.dhtmlDragAndDrop.dragNode;window.document.body.onmouseup=window.dhtmlDragAndDrop.stopDrag;window.waitDrag=0;if(((!_isIE)&&(mode))&&((!_isFF)||(_FFrv<1.8)))
window.dhtmlDragAndDrop.calculateFramePosition()};if((parent.dhtmlDragAndDrop)&&(parent!=window)&&(parent!=win))
parent.dhtmlDragAndDrop.initFrameRoute(window);for(var i=0;i<window.frames.length;i++)if((window.frames[i]!=win)&&(window.frames[i].dhtmlDragAndDrop))
window.frames[i].dhtmlDragAndDrop.initFrameRoute(window,((!win||mode)?1:0))};var _isFF=false;var _isIE=false;var _isOpera=false;var _isKHTML=false;var _isMacOS=false;if(navigator.userAgent.indexOf('Macintosh')!=-1)
_isMacOS=true;if((navigator.userAgent.indexOf('Safari')!=-1)||(navigator.userAgent.indexOf('Konqueror')!=-1)){var _KHTMLrv=parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf('Safari')+7,5));if(_KHTMLrv>525){_isFF=true;var _FFrv=1.9}else
_isKHTML=true}else if(navigator.userAgent.indexOf('Opera')!=-1){_isOpera=true;_OperaRv=parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf('Opera')+6,3))}else if(navigator.appName.indexOf("Microsoft")!=-1)
_isIE=true;else{_isFF=true;var _FFrv=parseFloat(navigator.userAgent.split("rv:")[1])};function isIE(){if(navigator.appName.indexOf("Microsoft")!=-1)
if(navigator.userAgent.indexOf('Opera')==-1)
return true;return false};dtmlXMLLoaderObject.prototype.doXPath=function(xpathExp,docObj,namespace,result_type){if((_isKHTML))
return this.doXPathOpera(xpathExp,docObj);if(_isIE){if(!docObj)if(!this.xmlDoc.nodeName)docObj=this.xmlDoc.responseXML
else
docObj=this.xmlDoc;if(!docObj)dhtmlxError.throwError("LoadXML","Incorrect XML",[(docObj||this.xmlDoc),this.mainObject]);if(namespace!=null)docObj.setProperty("SelectionNamespaces","xmlns:xsl='"+namespace+"'");if(result_type=='single'){return docObj.selectSingleNode(xpathExp)}else{return docObj.selectNodes(xpathExp)||new Array(0)}}else{var nodeObj=docObj;if(!docObj){if(!this.xmlDoc.nodeName){docObj=this.xmlDoc.responseXML}else{docObj=this.xmlDoc}};if(!docObj)dhtmlxError.throwError("LoadXML","Incorrect XML",[(docObj||this.xmlDoc),this.mainObject]);if(docObj.nodeName.indexOf("document")!=-1){nodeObj=docObj}else{nodeObj=docObj;docObj=docObj.ownerDocument};var retType=XPathResult.ANY_TYPE;if(result_type=='single')retType=XPathResult.FIRST_ORDERED_NODE_TYPE
var rowsCol=new Array();var col=docObj.evaluate(xpathExp,nodeObj,function(pref){return namespace},retType,null);if(retType==XPathResult.FIRST_ORDERED_NODE_TYPE){return col.singleNodeValue};var thisColMemb=col.iterateNext();while(thisColMemb){rowsCol[rowsCol.length]=thisColMemb;thisColMemb=col.iterateNext()};return rowsCol}};function _dhtmlxError(type,name,params){if(!this.catches)this.catches=new Array();return this};_dhtmlxError.prototype.catchError=function(type,func_name){this.catches[type]=func_name};_dhtmlxError.prototype.throwError=function(type,name,params){if(this.catches[type])return this.catches[type](type,name,params);if(this.catches["ALL"])return this.catches["ALL"](type,name,params);alert("Error type: "+arguments[0]+"\nDescription: "+arguments[1]);return null};window.dhtmlxError=new _dhtmlxError();dtmlXMLLoaderObject.prototype.doXPathOpera=function(xpathExp,docObj){var z=xpathExp.replace(/[\/]+/gi,"/").split('/');var obj=null;var i=1;if(!z.length)return[];if(z[0]==".")obj=[docObj];else if(z[0]==""){obj=(this.xmlDoc.responseXML||this.xmlDoc).getElementsByTagName(z[i].replace(/\[[^\]]*\]/g,""));i++}else
return[];for(i;i<z.length;i++)obj=this._getAllNamedChilds(obj,z[i]);if(z[i-1].indexOf("[")!=-1)
obj=this._filterXPath(obj,z[i-1]);return obj};dtmlXMLLoaderObject.prototype._filterXPath=function(a,b){var c=new Array();var b=b.replace(/[^\[]*\[\@/g,"").replace(/[\[\]\@]*/g,"");for(var i=0;i<a.length;i++)if(a[i].getAttribute(b))
c[c.length]=a[i];return c};dtmlXMLLoaderObject.prototype._getAllNamedChilds=function(a,b){var c=new Array();if(_isKHTML)b=b.toUpperCase();for(var i=0;i<a.length;i++)for(var j=0;j<a[i].childNodes.length;j++){if(_isKHTML){if(a[i].childNodes[j].tagName&&a[i].childNodes[j].tagName.toUpperCase()==b)
c[c.length]=a[i].childNodes[j]}else if(a[i].childNodes[j].tagName==b)c[c.length]=a[i].childNodes[j]};return c};function dhtmlXHeir(a,b){for(var c in b)if(typeof(b[c])=="function")
a[c]=b[c];return a};function dhtmlxEvent(el,event,handler){if(el.addEventListener)el.addEventListener(event,handler,false);else if(el.attachEvent)el.attachEvent("on"+event,handler)};dtmlXMLLoaderObject.prototype.xslDoc=null;dtmlXMLLoaderObject.prototype.setXSLParamValue=function(paramName,paramValue,xslDoc){if(!xslDoc)xslDoc=this.xslDoc
if(xslDoc.responseXML)xslDoc=xslDoc.responseXML;var item=this.doXPath("/xsl:stylesheet/xsl:variable[@name='"+paramName+"']",xslDoc,"http:/\/www.w3.org/1999/XSL/Transform","single");if(item!=null)item.firstChild.nodeValue=paramValue};dtmlXMLLoaderObject.prototype.doXSLTransToObject=function(xslDoc,xmlDoc){if(!xslDoc)xslDoc=this.xslDoc;if(xslDoc.responseXML)xslDoc=xslDoc.responseXML
if(!xmlDoc)xmlDoc=this.xmlDoc;if(xmlDoc.responseXML)xmlDoc=xmlDoc.responseXML
if(!isIE()){if(!this.XSLProcessor){this.XSLProcessor=new XSLTProcessor();this.XSLProcessor.importStylesheet(xslDoc)};var result=this.XSLProcessor.transformToDocument(xmlDoc)}else{var result=new ActiveXObject("Msxml2.DOMDocument.3.0");xmlDoc.transformNodeToObject(xslDoc,result)};return result};dtmlXMLLoaderObject.prototype.doXSLTransToString=function(xslDoc,xmlDoc){return this.doSerialization(this.doXSLTransToObject(xslDoc,xmlDoc))};dtmlXMLLoaderObject.prototype.doSerialization=function(xmlDoc){if(!xmlDoc)xmlDoc=this.xmlDoc;if(xmlDoc.responseXML)xmlDoc=xmlDoc.responseXML
if(!isIE()){var xmlSerializer=new XMLSerializer();return xmlSerializer.serializeToString(xmlDoc)}else
return xmlDoc.xml};function dhtmlXComboFromSelect(parent,size){if(typeof(parent)=="string")
parent=document.getElementById(parent);size=size||parent.getAttribute("width")||(window.getComputedStyle?window.getComputedStyle(parent,null)["width"]:(parent.currentStyle?parent.currentStyle["width"]:0));if((!size)||(size=="auto"))
size=parent.offsetWidth||100;var z=document.createElement("SPAN");if(parent.style.direction=="rtl")z.style.direction="rtl";parent.parentNode.insertBefore(z,parent);parent.style.display='none';var s_type=parent.getAttribute('opt_type');var w=new dhtmlXCombo(z,parent.name,size,s_type,parent.tabIndex);var x=new Array();var sel=0;for(var i=0;i<parent.options.length;i++){if(parent.options[i].selected)sel=i;var label=parent.options[i].innerHTML;var val=parent.options[i].getAttribute("value");if((typeof(val)=="undefined")||(val===null))val=label;x[i]={value:val,text:label,img_src:parent.options[i].getAttribute("img_src")}};w.addOption(x);parent.parentNode.removeChild(parent);w.selectOption(sel,null,true);if(parent.onchange)w.attachEvent("onChange",parent.onchange);return w};var dhtmlXCombo_optionTypes=[];function dhtmlXCombo(parent,name,width,optionType,tabIndex){if(typeof(parent)=="string")
parent=document.getElementById(parent);this.dhx_Event();this.optionType=(optionType!=window.undefined&&dhtmlXCombo_optionTypes[optionType])?optionType:'default';this._optionObject=dhtmlXCombo_optionTypes[this.optionType];this._disabled=false;if(parent.style.direction=="rtl")this.rtl=true;else this.rtl=false;if(!window.dhx_glbSelectAr){window.dhx_glbSelectAr=new Array();window.dhx_openedSelect=null;window.dhx_SelectId=1;dhtmlxEvent(document.body,"click",this.closeAll);dhtmlxEvent(document.body,"keydown",function(e){try{if((e||event).keyCode==9)window.dhx_glbSelectAr[0].closeAll()}catch(e){};return true})};if(parent.tagName=="SELECT")return dhtmlXComboFromSelect(parent);else
this._createSelf(parent,name,width,tabIndex);dhx_glbSelectAr.push(this)};dhtmlXCombo.prototype.setSize=function(new_size){this.DOMlist.style.width=new_size+"px";if(this.DOMlistF)this.DOMlistF.style.width=new_size+"px";this.DOMelem.style.width=new_size+"px";this.DOMelem_input.style.width=(new_size-19)+'px'};dhtmlXCombo.prototype.enableFilteringMode=function(mode,url,cache,autosubload){this._filter=convertStringToBoolean(mode);if(url){this._xml=url;this._autoxml=convertStringToBoolean(autosubload)};if(convertStringToBoolean(cache))this._xmlCache=[]};dhtmlXCombo.prototype.setFilteringParam=function(name,value){if(!this._prs)this._prs=[];this._prs.push([name,value])};dhtmlXCombo.prototype.disable=function(mode){var z=convertStringToBoolean(mode);if(this._disabled==z)return;this.DOMelem_input.disabled=z;this._disabled=z};dhtmlXCombo.prototype.readonly=function(mode,autosearch){this.DOMelem_input.readOnly=mode?true:false;if(autosearch===false||mode===false){this.DOMelem.onkeyup=function(ev){}}else{var that=this;this.DOMelem.onkeyup=function(ev){ev=ev||window.event;if(ev.keyCode!=9)ev.cancelBubble=true;if((ev.keyCode>=48&&ev.keyCode<=57)||(ev.keyCode>=65&&ev.keyCode<=90)){for(var i=0;i<that.optionsArr.length;i++){var text=that.optionsArr[i].text;if(text.toString().toUpperCase().indexOf(String.fromCharCode(ev.keyCode))==0){that.selectOption(i);break}};ev.cancelBubble=true}}}};dhtmlXCombo.prototype.getOption=function(value)
{for(var i=0;i<this.optionsArr.length;i++)if(this.optionsArr[i].value==value)return this.optionsArr[i];return null};dhtmlXCombo.prototype.getOptionByLabel=function(value)
{value=value.replace(/&/g,"&amp;")
for(var i=0;i<this.optionsArr.length;i++)if(this.optionsArr[i].text==value)return this.optionsArr[i];return null};dhtmlXCombo.prototype.getOptionByIndex=function(ind){return this.optionsArr[ind]};dhtmlXCombo.prototype.clearAll=function(all)
{if(all)this.setComboText("");this.optionsArr=new Array();this.redrawOptions();if(all)this._confirmSelection()};dhtmlXCombo.prototype.deleteOption=function(value)
{var ind=this.getIndexByValue(value);if(ind<0)return;if(this.optionsArr[ind]==this._selOption)this._selOption=null;this.optionsArr.splice(ind,1);this.redrawOptions()};dhtmlXCombo.prototype.render=function(mode){this._skiprender=(!convertStringToBoolean(mode));this.redrawOptions()};dhtmlXCombo.prototype.updateOption=function(oldvalue,avalue,atext,acss)
{var dOpt=this.getOption(oldvalue);if(typeof(avalue)!="object")avalue={text:atext,value:avalue,css:acss};dOpt.setValue(avalue);this.redrawOptions()};dhtmlXCombo.prototype.addOption=function(options)
{if(!arguments[0].length||typeof(arguments[0])!="object")
args=[arguments];else
args=options;this.render(false);for(var i=0;i<args.length;i++){var attr=args[i];if(attr.length){attr.value=attr[0]||"";attr.text=attr[1]||"";attr.css=attr[2]||""};this._addOption(attr)};this.render(true)};dhtmlXCombo.prototype._addOption=function(attr)
{dOpt=new this._optionObject();this.optionsArr.push(dOpt);dOpt.setValue.apply(dOpt,[attr]);this.redrawOptions()};dhtmlXCombo.prototype.getIndexByValue=function(val){for(var i=0;i<this.optionsArr.length;i++)if(this.optionsArr[i].value==val)return i;return-1};dhtmlXCombo.prototype.getSelectedValue=function(){return(this._selOption?this._selOption.value:null)};dhtmlXCombo.prototype.getComboText=function(){return this.DOMelem_input.value};dhtmlXCombo.prototype.setComboText=function(text){this.DOMelem_input.value=text};dhtmlXCombo.prototype.setComboValue=function(text){this.setComboText(text);for(var i=0;i<this.optionsArr.length;i++)if(this.optionsArr[i].data()[0]==text)
return this.selectOption(i,null,true);this.DOMelem_hidden_input.value=text};dhtmlXCombo.prototype.getActualValue=function(){return this.DOMelem_hidden_input.value};dhtmlXCombo.prototype.getSelectedText=function(){return(this._selOption?this._selOption.text:"")};dhtmlXCombo.prototype.getSelectedIndex=function(){for(var i=0;i<this.optionsArr.length;i++)if(this.optionsArr[i]==this._selOption)return i;return-1};dhtmlXCombo.prototype.setName=function(name){this.DOMelem_hidden_input.name=name;this.DOMelem_hidden_input2=name+"_new_value";this.name=name};dhtmlXCombo.prototype.show=function(mode){if(convertStringToBoolean(mode))
this.DOMelem.style.display="";else
this.DOMelem.style.display="none"};dhtmlXCombo.prototype.destructor=function()
{var _sID=this._inID;this.DOMParent.removeChild(this.DOMelem);this.DOMlist.parentNode.removeChild(this.DOMlist);var s=dhx_glbSelectAr;this.DOMParent=this.DOMlist=this.DOMelem=0;this.DOMlist.combo=this.DOMelem.combo=0;for(var i=0;i<s.length;i++){if(s[i]._inID==_sID){s[i]=null;s.splice(i,1);return}}};dhtmlXCombo.prototype._createSelf=function(selParent,name,width,tab)
{if(width.toString().indexOf("%")!=-1){var self=this;var resWidht=parseInt(width)/100;window.setInterval(function(){if(!selParent.parentNode)return;var ts=selParent.parentNode.offsetWidth*resWidht-2;if(ts<0)return;if(ts==self._lastTs)return;self.setSize(self._lastTs=ts)},500);var width=parseInt(selParent.offsetWidth)};var width=parseInt(width||100);this.ListPosition="Bottom";this.DOMParent=selParent;this._inID=null;this.name=name;this._selOption=null;this.optionsArr=Array();var opt=new this._optionObject();opt.DrawHeader(this,name,width,tab);this.DOMlist=document.createElement("DIV");this.DOMlist.className='dhx_combo_list';if(this.rtl)this.DOMlist.className='dhx_combo_list_rtl';this.DOMlist.style.width=width-(_isIE?0:0)+"px";if(_isOpera||_isKHTML)this.DOMlist.style.overflow="auto";this.DOMlist.style.display="none";document.body.insertBefore(this.DOMlist,document.body.firstChild);if(_isIE){this.DOMlistF=document.createElement("IFRAME");this.DOMlistF.style.border="0px";this.DOMlistF.className='dhx_combo_list';this.DOMlistF.style.width=width-(_isIE?0:0)+"px";this.DOMlistF.style.display="none";this.DOMlistF.src="javascript:false;";document.body.insertBefore(this.DOMlistF,document.body.firstChild)};this.DOMlist.combo=this.DOMelem.combo=this;this.DOMelem_input.onkeydown=this._onKey;this.DOMelem_input.onkeypress=this._onKeyF;this.DOMelem_input.onblur=this._onBlur;this.DOMelem.onclick=this._toggleSelect;this.DOMlist.onclick=this._selectOption;this.DOMlist.onmousedown=function(){this._skipBlur=true};this.DOMlist.onkeydown=function(e){this.combo.DOMelem_input.focus();(e||event).cancelBubble=true;this.combo.DOMelem_input.onkeydown(e)};this.DOMlist.onmouseover=this._listOver};dhtmlXCombo.prototype._listOver=function(e)
{e=e||event;e.cancelBubble=true;var node=(_isIE?event.srcElement:e.target);var that=this.combo;if(node.parentNode==that.DOMlist){if(that._selOption)that._selOption.deselect();if(that._tempSel)that._tempSel.deselect();var i=0;for(i;i<that.DOMlist.childNodes.length;i++){if(that.DOMlist.childNodes[i]==node)break};var z=that.optionsArr[i];that._tempSel=z;that._tempSel.select();if((that._autoxml)&&((i+1)==that._lastLength))
that._fetchOptions(i+1,that._lasttext||"")}};dhtmlXCombo.prototype._positList=function()
{var pos=this.getPosition(this.DOMelem);if(this.ListPosition=='Bottom'){this.DOMlist.style.top=pos[1]+this.DOMelem.offsetHeight+"px";this.DOMlist.style.left=pos[0]+"px"}else if(this.ListPosition=='Top'){this.DOMlist.style.top=pos[1]-this.DOMlist.offsetHeight+"px";this.DOMlist.style.left=pos[0]+"px"}else{this.DOMlist.style.top=pos[1]+"px";this.DOMlist.style.left=pos[0]+this.DOMelem.offsetWidth+"px"}};dhtmlXCombo.prototype.getPosition=function(oNode,pNode){if(!pNode)var pNode=document.body
var oCurrentNode=oNode;var iLeft=0;var iTop=0;while((oCurrentNode)&&(oCurrentNode!=pNode)){iLeft+=oCurrentNode.offsetLeft-oCurrentNode.scrollLeft;iTop+=oCurrentNode.offsetTop-oCurrentNode.scrollTop;oCurrentNode=oCurrentNode.offsetParent};if(pNode==document.body){if(_isIE){if(document.documentElement.scrollTop)iTop+=document.documentElement.scrollTop;if(document.documentElement.scrollLeft)iLeft+=document.documentElement.scrollLeft}else
if(!_isFF){iLeft+=document.body.offsetLeft;iTop+=document.body.offsetTop}};return new Array(iLeft,iTop)};dhtmlXCombo.prototype._correctSelection=function(){if(this.getComboText()!="")
for(var i=0;i<this.optionsArr.length;i++)if(!this.optionsArr[i].isHidden()){return this.selectOption(i,true,false)};this.unSelectOption()};dhtmlXCombo.prototype.selectNext=function(step){var z=this.getSelectedIndex()+step;while(this.optionsArr[z]){if(!this.optionsArr[z].isHidden())
return this.selectOption(z,false,false);z+=step}};dhtmlXCombo.prototype._onKeyF=function(e){var that=this.parentNode.combo;var ev=e||event;ev.cancelBubble=true;if(ev.keyCode=="13"||ev.keyCode=="9"){that._confirmSelection();that.closeAll()}else
if(ev.keyCode=="27"){that._resetSelection();that.closeAll()}else that._activeMode=true;if(ev.keyCode=="13"||ev.keyCode=="27"){that.callEvent("onKeyPressed",[ev.keyCode])
return false};return true};dhtmlXCombo.prototype._onKey=function(e){var that=this.parentNode.combo;(e||event).cancelBubble=true;var ev=(e||event).keyCode;if(ev>15&&ev<19)return true;if(ev==27)return;if((that.DOMlist.style.display!="block")&&(ev!="13")&&(ev!="9")&&((!that._filter)||(that._filterAny)))
that.DOMelem.onclick(e||event);if((ev!="13")&&(ev!="9")){window.setTimeout(function(){that._onKeyB(ev)},1);if(ev=="40"||ev=="38")return false}else if(ev==9){that.closeAll();(e||event).cancelBubble=false}};dhtmlXCombo.prototype._onKeyB=function(ev)
{if(ev=="40"){var z=this.selectNext(1)}else if(ev=="38"){this.selectNext(-1)}else{this.callEvent("onKeyPressed",[ev])
if(this._filter)return this.filterSelf((ev==8)||(ev==46));for(var i=0;i<this.optionsArr.length;i++)if(this.optionsArr[i].data()[1]==this.DOMelem_input.value){this.selectOption(i,false,false);return false};this.unSelectOption()};return true};dhtmlXCombo.prototype._onBlur=function()
{var self=this.parentNode._self;window.setTimeout(function(){if(self.DOMlist._skipBlur)return!(self.DOMlist._skipBlur=false);self._confirmSelection();self.callEvent("onBlur",[])},100)};dhtmlXCombo.prototype.redrawOptions=function(){if(this._skiprender)return;for(var i=this.DOMlist.childNodes.length-1;i>=0;i--)this.DOMlist.removeChild(this.DOMlist.childNodes[i]);for(var i=0;i<this.optionsArr.length;i++)this.DOMlist.appendChild(this.optionsArr[i].render())};dhtmlXCombo.prototype.loadXML=function(url,afterCall){this._load=true;if((this._xmlCache)&&(this._xmlCache[url])){this._fillFromXML(this,null,null,null,this._xmlCache[url]);if(afterCall)afterCall()}else{var xml=(new dtmlXMLLoaderObject(this._fillFromXML,this,true,true));if(afterCall)xml.waitCall=afterCall;if(this._prs)for(var i=0;i<this._prs.length;i++)url+=[getUrlSymbol(url),escape(this._prs[i][0]),"=",escape(this._prs[i][1])].join("");xml._cPath=url;xml.loadXML(url)}};dhtmlXCombo.prototype.loadXMLString=function(astring){var xml=(new dtmlXMLLoaderObject(this._fillFromXML,this,true,true));xml.loadXMLString(astring)};dhtmlXCombo.prototype._fillFromXML=function(obj,b,c,d,xml){if(obj._xmlCache)obj._xmlCache[xml._cPath]=xml;var toptag=xml.getXMLTopNode("complete");if(toptag.tagName!="complete")return;var top=xml.doXPath("//complete");var options=xml.doXPath("//option");obj.render(false);if((!top[0])||(!top[0].getAttribute("add"))){obj.clearAll();obj._lastLength=options.length;if(obj._xml){if((!options)||(!options.length))
obj.closeAll();else{if(obj._activeMode){obj._positList();obj.DOMlist.style.display="block";if(_isIE)obj._IEFix(true)}}}}else
obj._lastLength+=options.length;for(var i=0;i<options.length;i++){var attr=new Object();attr.text=options[i].firstChild?options[i].firstChild.nodeValue:"";for(var j=0;j<options[i].attributes.length;j++){var a=options[i].attributes[j];if(a)attr[a.nodeName]=a.nodeValue};obj._addOption(attr)};obj.render(true);if((obj._load)&&(obj._load!==true))
obj.loadXML(obj._load);else{obj._load=false;if((!obj._lkmode)&&(!obj._filter))
obj._correctSelection()};var selected=xml.doXPath("//option[@selected]");if(selected.length)obj.selectOption(obj.getIndexByValue(selected[0].getAttribute("value")),false,true)};dhtmlXCombo.prototype.unSelectOption=function(){if(this._selOption)this._selOption.deselect();this._selOption=null};dhtmlXCombo.prototype._confirmSelection=function(data,status){if(arguments.length==0){var z=this.getOptionByLabel(this.DOMelem_input.value);data=z?z.value:this.DOMelem_input.value;status=(z==null);if(data==this.getActualValue())return};this.DOMelem_hidden_input.value=data;this.DOMelem_hidden_input2.value=(status?"true":"false");this.callEvent("onChange",[]);this._activeMode=false};dhtmlXCombo.prototype._resetSelection=function(data,status){var z=this.getOption(this.DOMelem_hidden_input.value);this.setComboValue(z?z.data()[0]:this.DOMelem_hidden_input.value)
this.setComboText(z?z.data()[1]:this.DOMelem_hidden_input.value)};dhtmlXCombo.prototype.selectOption=function(ind,filter,conf){if(arguments.length<3)conf=true;this.unSelectOption();var z=this.optionsArr[ind];if(!z)return;this._selOption=z;this._selOption.select();var corr=this._selOption.content.offsetTop+this._selOption.content.offsetHeight-this.DOMlist.scrollTop-this.DOMlist.offsetHeight;if(corr>0)this.DOMlist.scrollTop+=corr;corr=this.DOMlist.scrollTop-this._selOption.content.offsetTop;if(corr>0)this.DOMlist.scrollTop-=corr;var data=this._selOption.data();if(conf){this.setComboText(data[1]);this._confirmSelection(data[0],false)};if((this._autoxml)&&((ind+1)==this._lastLength))
this._fetchOptions(ind+1,this._lasttext||"");if(filter){var text=this.getComboText();if(text!=data[1]){this.setComboText(data[1]);dhtmlXRange(this.DOMelem_input,text.length+1,data[1].length)}}else
this.setComboText(data[1]);this._selOption.RedrawHeader(this);this.callEvent("onSelectionChange",[])};dhtmlXCombo.prototype._selectOption=function(e)
{(e||event).cancelBubble=true;var node=(_isIE?event.srcElement:e.target);var that=this.combo;while(!node._self){node=node.parentNode;if(!node)return};var i=0;for(i;i<that.DOMlist.childNodes.length;i++){if(that.DOMlist.childNodes[i]==node)break};that.selectOption(i,false,true);that.closeAll();that.callEvent("onBlur",[])
that._activeMode=false};dhtmlXCombo.prototype.openSelect=function(){if(this._disabled)return;this.closeAll();this._positList();this.DOMlist.style.display="block";this.callEvent("onOpen",[]);if(this._tempSel)this._tempSel.deselect();if(this._selOption)this._selOption.select();if(this._selOption){var corr=this._selOption.content.offsetTop+this._selOption.content.offsetHeight-this.DOMlist.scrollTop-this.DOMlist.offsetHeight;if(corr>0)this.DOMlist.scrollTop+=corr;corr=this.DOMlist.scrollTop-this._selOption.content.offsetTop;if(corr>0)this.DOMlist.scrollTop-=corr};if(_isIE)this._IEFix(true);this.DOMelem_input.focus();if(this._filter)this.filterSelf()};dhtmlXCombo.prototype._toggleSelect=function(e)
{var that=this.combo;if(that.DOMlist.style.display=="block"){that.closeAll()}else{that.openSelect()};(e||event).cancelBubble=true};dhtmlXCombo.prototype._fetchOptions=function(ind,text){if(text==""){this.closeAll();return this.clearAll()};var url=this._xml+((this._xml.indexOf("?")!=-1)?"&":"?")+"pos="+ind+"&mask="+encodeURIComponent(text);this._lasttext=text;if(this._load)this._load=url;else this.loadXML(url)};dhtmlXCombo.prototype.filterSelf=function(mode)
{var text=this.getComboText();if(this._xml){this._lkmode=mode;this._fetchOptions(0,text)};try{var filter=new RegExp("^"+text,"i")}catch(e){var filter=new RegExp("^"+text.replace(/([\[\]\{\}\(\)\+\*\\])/g,"\\$1"))};this.filterAny=false;for(var i=0;i<this.optionsArr.length;i++){var z=filter.test(this.optionsArr[i].text);this.filterAny|=z;this.optionsArr[i].hide(!z)};if(!this.filterAny){this.closeAll();this._activeMode=true}else{if(this.DOMlist.style.display!="block")this.openSelect();if(_isIE)this._IEFix(true)};if(!mode)this._correctSelection();else this.unSelectOption()};dhtmlXCombo.prototype._IEFix=function(mode){this.DOMlistF.style.display=(mode?"block":"none");this.DOMlistF.style.top=this.DOMlist.style.top;this.DOMlistF.style.left=this.DOMlist.style.left};dhtmlXCombo.prototype.closeAll=function()
{if(window.dhx_glbSelectAr)for(var i=0;i<dhx_glbSelectAr.length;i++){if(dhx_glbSelectAr[i].DOMlist.style.display=="block"){dhx_glbSelectAr[i].DOMlist.style.display="none";if(_isIE)dhx_glbSelectAr[i]._IEFix(false)};dhx_glbSelectAr[i]._activeMode=false}};function dhtmlXRange(InputId,Start,End)
{var Input=typeof(InputId)=='object'?InputId:document.getElementById(InputId);try{Input.focus()}catch(e){};var Length=Input.value.length;Start--;if(Start<0||Start>End||Start>Length)Start=0;if(End>Length)End=Length;if(Start==End)return;if(Input.setSelectionRange){Input.setSelectionRange(Start,End)}else if(Input.createTextRange){var range=Input.createTextRange();range.moveStart('character',Start);range.moveEnd('character',End-Length);range.select()}};dhtmlXCombo_defaultOption=function(){this.init()};dhtmlXCombo_defaultOption.prototype.init=function(){this.value=null;this.text="";this.selected=false;this.css=""};dhtmlXCombo_defaultOption.prototype.select=function(){if(this.content)this.content.className="dhx_selected_option"};dhtmlXCombo_defaultOption.prototype.hide=function(mode){this.render().style.display=mode?"none":""};dhtmlXCombo_defaultOption.prototype.isHidden=function(){return(this.render().style.display=="none")};dhtmlXCombo_defaultOption.prototype.deselect=function(){if(this.content)this.render();this.content.className=""};dhtmlXCombo_defaultOption.prototype.setValue=function(attr){this.value=attr.value||"";this.text=attr.text||"";this.css=attr.css||"";this.content=null};dhtmlXCombo_defaultOption.prototype.render=function(){if(!this.content){this.content=document.createElement("DIV");this.content._self=this;this.content.style.cssText='width:100%;overflow:hidden;'+this.css;if(_isOpera||_isKHTML)this.content.style.padding="2px 0px 2px 0px";this.content.innerHTML=this.text;this._ctext=_isIE?this.content.innerText:this.content.textContent};return this.content};dhtmlXCombo_defaultOption.prototype.data=function(){if(this.content)return[this.value,this._ctext?this._ctext:this.text]};dhtmlXCombo_defaultOption.prototype.DrawHeader=function(self,name,width,tab)
{var z=document.createElement("DIV");z.style.width=width+"px";z.className='dhx_combo_box';z._self=self;self.DOMelem=z;this._DrawHeaderInput(self,name,width,tab);this._DrawHeaderButton(self,name,width);self.DOMParent.appendChild(self.DOMelem)};dhtmlXCombo_defaultOption.prototype._DrawHeaderInput=function(self,name,width,tab)
{if(self.rtl&&_isIE){var z=document.createElement('textarea');z.style.overflow="hidden";z.style.whiteSpace="nowrap"}else{var z=document.createElement('input');z.setAttribute("autocomplete","off");z.type='text'};z.className='dhx_combo_input';if(self.rtl){z.style.left="18px";z.style.direction="rtl";z.style.unicodeBidi="bidi-override"};if(tab)z.tabIndex=tab;z.style.width=(width-19)+'px';self.DOMelem.appendChild(z);self.DOMelem_input=z;z=document.createElement('input');z.type='hidden';z.name=name;self.DOMelem.appendChild(z);self.DOMelem_hidden_input=z;z=document.createElement('input');z.type='hidden';z.name=name+"_new_value";z.value="true";self.DOMelem.appendChild(z);self.DOMelem_hidden_input2=z};dhtmlXCombo_defaultOption.prototype._DrawHeaderButton=function(self,name,width)
{var z=document.createElement('img');z.className=(self.rtl)?'dhx_combo_img_rtl':'dhx_combo_img';z.src=(window.dhx_globalImgPath?dhx_globalImgPath:"")+'combo_select.gif';self.DOMelem.appendChild(z);self.DOMelem_button=z};dhtmlXCombo_defaultOption.prototype.RedrawHeader=function(self)
{};dhtmlXCombo_optionTypes['default']=dhtmlXCombo_defaultOption;dhtmlXCombo.prototype.dhx_Event=function()
{this.dhx_SeverCatcherPath="";this.attachEvent=function(original,catcher,CallObj)
{CallObj=CallObj||this;original='ev_'+original;if((!this[original])||(!this[original].addEvent)){var z=new this.eventCatcher(CallObj);z.addEvent(this[original]);this[original]=z};return(original+':'+this[original].addEvent(catcher))};this.callEvent=function(name,arg0){if(this["ev_"+name])return this["ev_"+name].apply(this,arg0);return true};this.checkEvent=function(name){if(this["ev_"+name])return true;return false};this.eventCatcher=function(obj)
{var dhx_catch=new Array();var m_obj=obj;var func_server=function(catcher,rpc)
{catcher=catcher.split(":");var postVar="";var postVar2="";var target=catcher[1];if(catcher[1]=="rpc"){postVar='<?xml version="1.0"?><methodCall><methodName>'+catcher[2]+'</methodName><params>';postVar2="</params></methodCall>";target=rpc};var z=function(){};return z};var z=function()
{if(dhx_catch)var res=true;for(var i=0;i<dhx_catch.length;i++){if(dhx_catch[i]!=null){var zr=dhx_catch[i].apply(m_obj,arguments);res=res&&zr}};return res};z.addEvent=function(ev)
{if(typeof(ev)!="function")
if(ev&&ev.indexOf&&ev.indexOf("server:")==0)
ev=new func_server(ev,m_obj.rpcServer);else
ev=eval(ev);if(ev)return dhx_catch.push(ev)-1;return false};z.removeEvent=function(id)
{dhx_catch[id]=null};return z};this.detachEvent=function(id)
{if(id!=false){var list=id.split(':');this[list[0]].removeEvent(list[1])}}};var sregion='17';var stheme='50';var scityid='';var scitytxt='';var sPreferredRegionId='';var sPreferredRegionTxt='';var sClickedRegionId='';var sCookieRegionId='';var sregiontxtHolder='';var hdcSite='nhd';var bCookiesSupported=false;var bHasCookieRegion=false;var bPopupShown=false;var bAskCity=false;var res=screen.width+'*'+screen.height;var os=navigator.platform;var nocache=Math.random();function getBannerFromArray(item){if(null!=parent.aContentBanners[item]&&'undefined'!=parent.aContentBanners[item]){return parent.aContentBanners[item];}else{return'0';}}
var nVer=navigator.appVersion;var nAgt=navigator.userAgent;var browserName=navigator.appName;var fullVersion=''+parseFloat(navigator.appVersion);var nameOffset,verOffset,ix;if((verOffset=nAgt.indexOf("MSIE"))!=-1){browserName="Microsoft Internet Explorer";fullVersion=nAgt.substring(verOffset+5);}
else if((verOffset=nAgt.indexOf("Opera"))!=-1){browserName="Opera";fullVersion=nAgt.substring(verOffset+6);}
else if((verOffset=nAgt.indexOf("Chrome"))!=-1){browserName="Chrome";fullVersion=nAgt.substring(verOffset+7);}
else if((verOffset=nAgt.indexOf("Safari"))!=-1){browserName="Safari";fullVersion=nAgt.substring(verOffset+7);}
else if((verOffset=nAgt.indexOf("Firefox"))!=-1){browserName="Firefox";fullVersion=nAgt.substring(verOffset+8);}
else if((nameOffset=nAgt.lastIndexOf(' ')+1)<(verOffset=nAgt.lastIndexOf('/')))
{browserName=nAgt.substring(nameOffset,verOffset);fullVersion=nAgt.substring(verOffset+1);if(browserName.toLowerCase()==browserName.toUpperCase()){browserName=navigator.appName;}}
if((ix=fullVersion.indexOf(";"))!=-1)fullVersion=fullVersion.substring(0,ix);if((ix=fullVersion.indexOf(" "))!=-1)fullVersion=fullVersion.substring(0,ix);var bro=browserName+' '+fullVersion;function Set_Cookie(name,value,expires,path,domain,secure)
{var today=new Date();today.setTime(today.getTime());if(expires)
{expires=expires*1000*60*60*24;}
var expires_date=new Date(today.getTime()+(expires));document.cookie=name+"="+escape(value)+
((expires)?";expires="+expires_date.toGMTString():"")+
((path)?";path="+path:"")+
((domain)?";domain="+domain:"")+
((secure)?";secure":"");}
function Get_Cookie(check_name){var a_all_cookies=document.cookie.split(';');var a_temp_cookie='';var cookie_name='';var cookie_value='';var b_cookie_found=false;for(i=0;i<a_all_cookies.length;i++)
{a_temp_cookie=a_all_cookies[i].split('=');cookie_name=a_temp_cookie[0].replace(/^\s+|\s+$/g,'');if(cookie_name==check_name)
{b_cookie_found=true;if(a_temp_cookie.length>1)
{cookie_value=unescape(a_temp_cookie[1].replace(/^\s+|\s+$/g,''));}
return cookie_value;break;}
a_temp_cookie=null;cookie_name='';}
if(!b_cookie_found)
{return null;}}
if(Get_Cookie('regionid')){sregion=Get_Cookie('regionid');}
if(Get_Cookie('ClickedRegionId')){sClickedRegionId=Get_Cookie('ClickedRegionId');}
if(Get_Cookie('PreferredRegionId')){sPreferredRegionId=Get_Cookie('PreferredRegionId');sPreferredRegionTxt=Get_Cookie('PreferredRegionTxt');}
if(Get_Cookie('cityid')){scityid=Get_Cookie('cityid');scitytxt=Get_Cookie('citytxt');}
if(location.href.indexOf("stadstreek")!=-1){stheme='41';}
if(location.href.indexOf("stadstreek/enkhuizen-westfriesland")!=-1){sregion='18';stheme='43';sregiontxtHolder='Enkhuizen & West-Friesland';}
if(location.href.indexOf("stadstreek/schagen")!=-1){sregion='19';stheme='43';sregiontxtHolder='Schagen e.o.';}
if(location.href.indexOf("stadstreek/denhelder")!=-1){sregion='19';stheme='43';sregiontxtHolder='Den Helder e.o.';}
if(location.href.indexOf("stadstreek/kennemerland")!=-1){sregion='23';stheme='43';sregiontxtHolder='Kennemerland';}
if(location.href.indexOf("stadstreek/waterland")!=-1){sregion='20';stheme='43';sregiontxtHolder='Waterland';}
if(location.href.indexOf("stadstreek/zaanstreek")!=-1){sregion='21';stheme='43';sregiontxtHolder='Zaanstreek';}
if(location.href.indexOf("stadstreek/alkmaar")!=-1){sregion='22';stheme='43';sregiontxtHolder='Alkmaar e.o.';}
if(location.href.indexOf("ijmuidercourant.nl")!=-1){hdcSite='yc';sregion='23';stheme='41';if(location.href.indexOf("/regionaal/ijmond/")!=-1){sregiontxtHolder='IJmond';stheme='43';}
if(location.href.indexOf("/regionaal/haarlemeo/")!=-1){sregiontxtHolder='Haarlem e.o.';stheme='43';}
if(location.href.indexOf("/regionaal/haarlemmermeer/")!=-1){sregiontxtHolder='Haarlemmermeer';stheme='43';}}
if(location.href.indexOf("haarlemsdagblad.nl")!=-1){hdcSite='hd';sregion='24';stheme='41';if(location.href.indexOf("/regionaal/ijmond/")!=-1){sregiontxtHolder='IJmond';stheme='43';}
if(location.href.indexOf("/regionaal/haarlemeo/")!=-1){sregiontxtHolder='Haarlem e.o.';stheme='43';}
if(location.href.indexOf("/regionaal/haarlemmermeer/")!=-1){sregiontxtHolder='Haarlemmermeer';stheme='43';}}
if(location.href.indexOf("almerevandaag.nl")!=-1){hdcSite='av';sregion='26';stheme='41';if(location.href.indexOf("/regionaal/almere/")!=-1){sregiontxtHolder='Almere';stheme='43';}}
if(location.href.indexOf("leidschdagblad.nl")!=-1){hdcSite='ld';sregion='27';stheme='41';if(location.href.indexOf("/regionaal/leidenenregio/")!=-1){sregiontxtHolder='Leiden en Regio';stheme='43';}
if(location.href.indexOf("/regionaal/duinenbollen/")!=-1){sregiontxtHolder='Duin en Bollen';stheme='43';}
if(location.href.indexOf("/regionaal/rijnenveen/")!=-1){sregiontxtHolder='Rijn en Veen';stheme='43';}}
if(location.href.indexOf("gooieneemlander.nl")!=-1){hdcSite='ge';sregion='37';stheme='41';if(location.href.indexOf("/regionaal/hilversumplassen/")!=-1){sregiontxtHolder='Hilversum & Plassen';stheme='43';}
if(location.href.indexOf("/regionaal/gooivechtstreek/")!=-1){sregiontxtHolder='Gooi & Vechtstreek';stheme='43';}
if(location.href.indexOf("/regionaal/eemland/")!=-1){sregiontxtHolder='Eemland';stheme='43';}}
if(location.href.indexOf("/auto")!=-1){stheme='37';}
if(location.href.indexOf("/culinair")!=-1){stheme='38';}
if(location.href.indexOf("nieuws/videooverview")!=-1){stheme='39';}
if(location.href.indexOf("nieuws/economie")!=-1){stheme='42';}
if(location.href.indexOf("nieuws/sport")!=-1){stheme='44';}
if(location.href.indexOf("nieuws/cultuur")!=-1){stheme='45';}
if(location.href.indexOf("/werkenmeer")!=-1){stheme='46';}
if(location.href.indexOf("/wonen")!=-1){stheme='48';}
if(location.href.indexOf("/reizen")!=-1){stheme='60';}
function getRegionIdFromTxt(regionName){switch(hdcSite)
{case'nhd':switch(regionName)
{case'Alkmaar e.o.':Set_Cookie('PreferredRegionTxt','Alkmaar e.o.','1825','/','','');return'22';break;case'Enkhuizen & West-Friesland':Set_Cookie('PreferredRegionTxt','Enkhuizen & West-Friesland','1825','/','','');return'18';break;case'Schagen e.o.':Set_Cookie('PreferredRegionTxt','Schagen e.o.','1825','/','','');return'19';break;case'Den Helder e.o.':Set_Cookie('PreferredRegionTxt','Den Helder e.o.','1825','/','','');return'19';break;case'Kennemerland':Set_Cookie('PreferredRegionTxt','Kennemerland','1825','/','','');return'23';break;case'Waterland':Set_Cookie('PreferredRegionTxt','Waterland','1825','/','','');return'20';break;case'Zaanstreek':Set_Cookie('PreferredRegionTxt','Zaanstreek','1825','/','','');return'21';break;}
break;case'yc':switch(regionName)
{case'IJmond':Set_Cookie('PreferredRegionTxt','IJmond','1825','/','','');return'23';break;case'Haarlem e.o.':Set_Cookie('PreferredRegionTxt','Haarlem e.o.','1825','/','','');return'24';break;case'Haarlemmermeer':Set_Cookie('PreferredRegionTxt','Haarlemmermeer','1825','/','','');return'24';break;}
break;case'hd':switch(regionName)
{case'IJmond':Set_Cookie('PreferredRegionTxt','IJmond','1825','/','','');return'23';break;case'Haarlem e.o.':Set_Cookie('PreferredRegionTxt','Haarlem e.o.','1825','/','','');return'24';break;case'Haarlemmermeer':Set_Cookie('PreferredRegionTxt','Haarlemmermeer','1825','/','','');return'24';break;}
break;case'av':switch(regionName)
{case'Almere':Set_Cookie('PreferredRegionTxt','Almere','1825','/','','');return'26';break;}
break;case'ld':switch(regionName)
{case'Duin en Bollen':Set_Cookie('PreferredRegionTxt','Duin en Bollen','1825','/','','');return'27';break;case'Leiden en Regio':Set_Cookie('PreferredRegionTxt','Leiden en Regio','1825','/','','');return'27';break;case'Rijn en Veen':Set_Cookie('PreferredRegionTxt','Rijn en Veen','1825','/','','');return'27';break;}
break;case'ge':switch(regionName)
{case'Eemland':Set_Cookie('PreferredRegionTxt','Eemland','1825','/','','');return'37';break;case'Gooi & Vechtstreek':Set_Cookie('PreferredRegionTxt','Gooi & Vechtstreek','1825','/','','');return'37';break;case'Hilversum & Plassen':Set_Cookie('PreferredRegionTxt','Hilversum & Plassen','1825','/','','');return'37';break;}
break;}}
var Region=new Array(17);function buildRegionArray(){for(i=0;i<Region.length;++i)
{Region[i]=new Array(2);}
Region[0][0]="Alkmaar e.o.";Region[1][0]="Almere";Region[2][0]="Den Helder e.o.";Region[3][0]="Duin en Bollen";Region[4][0]="Eemland";Region[5][0]="Enkhuizen & West-Friesland";Region[6][0]="Gooi & Vechtstreek";Region[7][0]="Haarlem e.o.";Region[8][0]="Haarlemmermeer";Region[9][0]="Hilversum & Plassen";Region[10][0]="IJmond";Region[11][0]="Kennemerland";Region[12][0]="Leiden en Regio";Region[13][0]="Rijn en Veen";Region[14][0]="Schagen e.o.";Region[15][0]="Waterland";Region[16][0]="Zaanstreek";for(i=0;i<Region.length;++i)
{Region[i][1]=0;}}
function visitCount(a,b){a=a[1];b=b[1];return b==a?0:(b<a?-1:1)}
function setRegionFromCookie(cookieValue){if(cookieValue!=null){switch(cookieValue)
{case"Alkmaar e.o.":Region[0][1]=Region[0][1]+1;break;case"Almere":Region[1][1]=Region[1][1]+1;break;case"Den Helder e.o.":Region[2][1]=Region[2][1]+1;break;case"Duin en Bollen":Region[3][1]=Region[3][1]+1;break;case"Eemland":Region[4][1]=Region[4][1]+1;break;case"Enkhuizen & West-Friesland":Region[5][1]=Region[5][1]+1;break;case"Gooi & Vechtstreek":Region[6][1]=Region[6][1]+1;break;case"Haarlem e.o.":Region[7][1]=Region[7][1]+1;break;case"Haarlemmermeer":Region[8][1]=Region[8][1]+1;break;case"Hilversum & Plassen":Region[9][1]=Region[9][1]+1;break;case"IJmond":Region[10][1]=Region[10][1]+1;break;case"Kennemerland":Region[11][1]=Region[11][1]+1;break;case"Leiden en Regio":Region[12][1]=Region[12][1]+1;break;case"Rijn en Veen":Region[13][1]=Region[13][1]+1;break;case"Schagen e.o.":Region[14][1]=Region[14][1]+1;break;case"Waterland":Region[15][1]=Region[15][1]+1;break;case"Zaanstreek":Region[16][1]=Region[16][1]+1;break;}}}
function readCookieRegions(){setRegionFromCookie(Get_Cookie('hdcPrefRegion1'));setRegionFromCookie(Get_Cookie('hdcPrefRegion2'));setRegionFromCookie(Get_Cookie('hdcPrefRegion3'));setRegionFromCookie(Get_Cookie('hdcPrefRegion4'));setRegionFromCookie(Get_Cookie('hdcPrefRegion5'));setRegionFromCookie(Get_Cookie('hdcPrefRegion6'));Region.sort(visitCount);var visitcount=Region[0][1];var regionName=Region[0][0];if((visitcount/6)*100>49.9){sregion=getRegionIdFromTxt(regionName);sCookieRegionId=sregion;sregiontxtHolder=regionName;}}
if(sregiontxtHolder.length>1){if(location.href.indexOf("/article")!=-1){Set_Cookie('hdcPrefRegion6',Get_Cookie('hdcPrefRegion5'),'1825','/','','');Set_Cookie('hdcPrefRegion5',Get_Cookie('hdcPrefRegion4'),'1825','/','','');Set_Cookie('hdcPrefRegion4',Get_Cookie('hdcPrefRegion3'),'1825','/','','');Set_Cookie('hdcPrefRegion3',Get_Cookie('hdcPrefRegion2'),'1825','/','','');Set_Cookie('hdcPrefRegion2',Get_Cookie('hdcPrefRegion1'),'1825','/','','');Set_Cookie('hdcPrefRegion1',sregiontxtHolder,'1825','/','','');}else{if(getRegionIdFromTxt(sregiontxtHolder)!=''&&scitytxt==''){sClickedRegionId=getRegionIdFromTxt(sregiontxtHolder);Set_Cookie('ClickedRegionId',getRegionIdFromTxt(sregiontxtHolder),'1825','/','','');Set_Cookie('PreferredRegionId',sClickedRegionId,'1825','/','','');if(Get_Cookie('PreferredRegionId')){sPreferredRegionId=Get_Cookie('PreferredRegionId');sPreferredRegionTxt=Get_Cookie('PreferredRegionTxt');}}}}
if(sPreferredRegionId!=null&&sPreferredRegionId!=''){sregion=sPreferredRegionId;if(scitytxt!=''){sregiontxtHolder=sPreferredRegionTxt+' ('+scitytxt+')';}else{sregiontxtHolder=sPreferredRegionTxt;}}else{if(sClickedRegionId!=''){sregion=sClickedRegionId;sregiontxtHolder=sPreferredRegionTxt;}else{buildRegionArray();readCookieRegions();}}