if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var F=arguments,G=null,I,J,H;for(I=0;I<F.length;I=I+1){H=F[I].split(".");G=YAHOO;for(J=(H[0]=="YAHOO")?1:0;J<H.length;J=J+1){G[H[J]]=G[H[J]]||{};G=G[H[J]];}}return G;};YAHOO.log=function(F,E,G){var H=YAHOO.widget.Logger;if(H&&H.log){return H.log(F,E,G);}else{return false;}};YAHOO.register=function(M,R,J){var N=YAHOO.env.modules;if(!N[M]){N[M]={versions:[],builds:[]};}var L=N[M],O=J.version,P=J.build,Q=YAHOO.env.listeners;L.name=M;L.version=O;L.build=P;L.versions.push(O);L.builds.push(P);L.mainClass=R;for(var K=0;K<Q.length;K=K+1){Q[K](L);}if(R){R.VERSION=O;R.BUILD=P;}else{YAHOO.log("mainClass is undefined for module "+M,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(B){return YAHOO.env.modules[B]||null;};YAHOO.env.ua=function(){var E={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0};var F=navigator.userAgent,D;if((/KHTML/).test(F)){E.webkit=1;}D=F.match(/AppleWebKit\/([^\s]*)/);if(D&&D[1]){E.webkit=parseFloat(D[1]);if(/ Mobile\//.test(F)){E.mobile="Apple";}else{D=F.match(/NokiaN[^\/]*/);if(D){E.mobile=D[0];}}D=F.match(/AdobeAIR\/([^\s]*)/);if(D){E.air=D[0];}}if(!E.webkit){D=F.match(/Opera[\s\/]([^\s]*)/);if(D&&D[1]){E.opera=parseFloat(D[1]);D=F.match(/Opera Mini[^;]*/);if(D){E.mobile=D[0];}}else{D=F.match(/MSIE\s([^;]*)/);if(D&&D[1]){E.ie=parseFloat(D[1]);}else{D=F.match(/Gecko\/([^\s]*)/);if(D){E.gecko=1;D=F.match(/rv:([^\s\)]*)/);if(D&&D[1]){E.gecko=parseFloat(D[1]);}}}}}return E;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var H=YAHOO_config.listener,E=YAHOO.env.listeners,F=true,G;if(H){for(G=0;G<E.length;G=G+1){if(E[G]==H){F=false;break;}}if(F){E.push(H);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var D=YAHOO.lang,E=["toString","valueOf"],F={isArray:function(A){if(A){return D.isNumber(A.length)&&D.isFunction(A.splice);}return false;},isBoolean:function(A){return typeof A==="boolean";},isFunction:function(A){return typeof A==="function";},isNull:function(A){return A===null;},isNumber:function(A){return typeof A==="number"&&isFinite(A);},isObject:function(A){return(A&&(typeof A==="object"||D.isFunction(A)))||false;},isString:function(A){return typeof A==="string";},isUndefined:function(A){return typeof A==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(C,I){for(var J=0;J<E.length;J=J+1){var A=E[J],B=I[A];if(D.isFunction(B)&&B!=Object.prototype[A]){C[A]=B;}}}:function(){},extend:function(B,A,C){if(!A||!B){throw new Error("extend failed, please check that all dependencies are included.");}var J=function(){};J.prototype=A.prototype;B.prototype=new J();B.prototype.constructor=B;B.superclass=A.prototype;if(A.prototype.constructor==Object.prototype.constructor){A.prototype.constructor=A;}if(C){for(var K in C){if(D.hasOwnProperty(C,K)){B.prototype[K]=C[K];}}D._IEEnumFix(B.prototype,C);}},augmentObject:function(B,C){if(!C||!B){throw new Error("Absorb failed, verify dependencies.");}var L=arguments,J,A,K=L[2];if(K&&K!==true){for(J=2;J<L.length;J=J+1){B[L[J]]=C[L[J]];}}else{for(A in C){if(K||!(A in B)){B[A]=C[A];}}D._IEEnumFix(B,C);}},augmentProto:function(A,B){if(!B||!A){throw new Error("Augment failed, verify dependencies.");}var H=[A.prototype,B.prototype];for(var C=2;C<arguments.length;C=C+1){H.push(arguments[C]);}D.augmentObject.apply(this,H);},dump:function(A,N){var Q,O,C=[],B="{...}",R="f(){...}",M=", ",P=" => ";if(!D.isObject(A)){return A+"";}else{if(A instanceof Date||("nodeType" in A&&"tagName" in A)){return A;}else{if(D.isFunction(A)){return R;}}}N=(D.isNumber(N))?N:3;if(D.isArray(A)){C.push("[");for(Q=0,O=A.length;Q<O;Q=Q+1){if(D.isObject(A[Q])){C.push((N>0)?D.dump(A[Q],N-1):B);}else{C.push(A[Q]);}C.push(M);}if(C.length>1){C.pop();}C.push("]");}else{C.push("{");for(Q in A){if(D.hasOwnProperty(A,Q)){C.push(Q+P);if(D.isObject(A[Q])){C.push((N>0)?D.dump(A[Q],N-1):B);}else{C.push(A[Q]);}C.push(M);}}if(C.length>1){C.pop();}C.push("}");}return C.join("");},substitute:function(B,f,Y){var b,c,d,V,U,C,W=[],e,a="dump",X=" ",A="{",T="}";for(;;){b=B.lastIndexOf(A);if(b<0){break;}c=B.indexOf(T,b);if(b+1>=c){break;}e=B.substring(b+1,c);V=e;C=null;d=V.indexOf(X);if(d>-1){C=V.substring(d+1);V=V.substring(0,d);}U=f[V];if(Y){U=Y(V,U,C);}if(D.isObject(U)){if(D.isArray(U)){U=D.dump(U,parseInt(C,10));}else{C=C||"";var Z=C.indexOf(a);if(Z>-1){C=C.substring(4);}if(U.toString===Object.prototype.toString||Z>-1){U=D.dump(U,parseInt(C,10));}else{U=U.toString();}}}else{if(!D.isString(U)&&!D.isNumber(U)){U="~-"+W.length+"-~";W[W.length]=e;}}B=B.substring(0,b)+U+B.substring(c+1);}for(b=W.length-1;b>=0;b=b-1){B=B.replace(new RegExp("~-"+b+"-~"),"{"+W[b]+"}","g");}return B;},trim:function(B){try{return B.replace(/^\s+|\s+$/g,"");}catch(A){return B;}},merge:function(){var A={},C=arguments;for(var B=0,H=C.length;B<H;B=B+1){D.augmentObject(A,C[B],true);}return A;},later:function(C,R,B,P,O){C=C||0;R=R||{};var Q=B,M=P,N,A;if(D.isString(B)){Q=R[B];}if(!Q){throw new TypeError("method undefined");}if(!D.isArray(M)){M=[P];}N=function(){Q.apply(R,M);};A=(O)?setInterval(N,C):setTimeout(N,C);return{interval:O,cancel:function(){if(this.interval){clearInterval(A);}else{clearTimeout(A);}}};},isValue:function(A){return(D.isObject(A)||D.isString(A)||D.isNumber(A)||D.isBoolean(A));}};D.hasOwnProperty=(Object.prototype.hasOwnProperty)?function(B,A){return B&&B.hasOwnProperty(A);}:function(B,A){return !D.isUndefined(B[A])&&B.constructor.prototype[A]!==B[A];};F.augmentObject(D,F,true);YAHOO.util.Lang=D;D.augment=D.augmentProto;YAHOO.augment=D.augmentProto;YAHOO.extend=D.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.5.2",build:"1076"});(function(){var R=YAHOO.util,X,Z,Y={},c={},V=window.document;YAHOO.env._id_counter=YAHOO.env._id_counter||0;var Q=YAHOO.env.ua.opera,W=YAHOO.env.ua.webkit,S=YAHOO.env.ua.gecko,b=YAHOO.env.ua.ie;var d={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i,OP_SCROLL:/^(?:inline|table-row)$/i};var U=function(B){if(!d.HYPHEN.test(B)){return B;}if(Y[B]){return Y[B];}var A=B;while(d.HYPHEN.exec(A)){A=A.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}Y[B]=A;return A;};var T=function(A){var B=c[A];if(!B){B=new RegExp("(?:^|\\s+)"+A+"(?:\\s+|$)");c[A]=B;}return B;};if(V.defaultView&&V.defaultView.getComputedStyle){X=function(D,A){var B=null;if(A=="float"){A="cssFloat";}var C=D.ownerDocument.defaultView.getComputedStyle(D,"");if(C){B=C[U(A)];}return D.style[A]||B;};}else{if(V.documentElement.currentStyle&&b){X=function(E,C){switch(U(C)){case"opacity":var A=100;try{A=E.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(B){try{A=E.filters("alpha").opacity;}catch(B){}}return A/100;case"float":C="styleFloat";default:var D=E.currentStyle?E.currentStyle[C]:null;return(E.style[C]||D);}};}else{X=function(B,A){return B.style[A];};}}if(b){Z=function(C,B,A){switch(B){case"opacity":if(YAHOO.lang.isString(C.style.filter)){C.style.filter="alpha(opacity="+A*100+")";if(!C.currentStyle||!C.currentStyle.hasLayout){C.style.zoom=1;}}break;case"float":B="styleFloat";default:C.style[B]=A;}};}else{Z=function(C,B,A){if(B=="float"){B="cssFloat";}C.style[B]=A;};}var P=function(B,A){return B&&B.nodeType==1&&(!A||A(B));};YAHOO.util.Dom={get:function(B){if(B&&(B.nodeType||B.item)){return B;}if(YAHOO.lang.isString(B)||!B){return V.getElementById(B);}if(B.length!==undefined){var A=[];for(var C=0,D=B.length;C<D;++C){A[A.length]=R.Dom.get(B[C]);}return A;}return B;},getStyle:function(C,A){A=U(A);var B=function(D){return X(D,A);};return R.Dom.batch(C,B,R.Dom,true);},setStyle:function(D,B,A){B=U(B);var C=function(E){Z(E,B,A);};R.Dom.batch(D,C,R.Dom,true);},getXY:function(B){var A=function(C){if((C.parentNode===null||C.offsetParent===null||this.getStyle(C,"display")=="none")&&C!=C.ownerDocument.body){return false;}return a(C);};return R.Dom.batch(B,A,R.Dom,true);},getX:function(B){var A=function(C){return R.Dom.getXY(C)[0];};return R.Dom.batch(B,A,R.Dom,true);},getY:function(B){var A=function(C){return R.Dom.getXY(C)[1];};return R.Dom.batch(B,A,R.Dom,true);},setXY:function(D,A,B){var C=function(F){var G=this.getStyle(F,"position");if(G=="static"){this.setStyle(F,"position","relative");G="relative";}var I=this.getXY(F);if(I===false){return false;}var E=[parseInt(this.getStyle(F,"left"),10),parseInt(this.getStyle(F,"top"),10)];if(isNaN(E[0])){E[0]=(G=="relative")?0:F.offsetLeft;}if(isNaN(E[1])){E[1]=(G=="relative")?0:F.offsetTop;}if(A[0]!==null){F.style.left=A[0]-I[0]+E[0]+"px";}if(A[1]!==null){F.style.top=A[1]-I[1]+E[1]+"px";}if(!B){var H=this.getXY(F);if((A[0]!==null&&H[0]!=A[0])||(A[1]!==null&&H[1]!=A[1])){this.setXY(F,A,true);}}};R.Dom.batch(D,C,R.Dom,true);},setX:function(A,B){R.Dom.setXY(A,[B,null]);},setY:function(B,A){R.Dom.setXY(B,[null,A]);},getRegion:function(B){var A=function(D){if((D.parentNode===null||D.offsetParent===null||this.getStyle(D,"display")=="none")&&D!=D.ownerDocument.body){return false;}var C=R.Region.getRegion(D);return C;};return R.Dom.batch(B,A,R.Dom,true);},getClientWidth:function(){return R.Dom.getViewportWidth();},getClientHeight:function(){return R.Dom.getViewportHeight();},getElementsByClassName:function(E,A,D,C){A=A||"*";D=(D)?R.Dom.get(D):null||V;if(!D){return[];}var H=[],I=D.getElementsByTagName(A),B=T(E);for(var G=0,F=I.length;G<F;++G){if(B.test(I[G].className)){H[H.length]=I[G];if(C){C.call(I[G],I[G]);}}}return H;},hasClass:function(B,C){var D=T(C);var A=function(E){return D.test(E.className);};return R.Dom.batch(B,A,R.Dom,true);},addClass:function(B,C){var A=function(D){if(this.hasClass(D,C)){return false;}D.className=YAHOO.lang.trim([D.className,C].join(" "));return true;};return R.Dom.batch(B,A,R.Dom,true);},removeClass:function(B,C){var D=T(C);var A=function(F){if(!C||!this.hasClass(F,C)){return false;}var E=F.className;F.className=E.replace(D," ");if(this.hasClass(F,C)){this.removeClass(F,C);}F.className=YAHOO.lang.trim(F.className);return true;};return R.Dom.batch(B,A,R.Dom,true);},replaceClass:function(B,D,E){if(!E||D===E){return false;}var C=T(D);var A=function(F){if(!this.hasClass(F,D)){this.addClass(F,E);return true;}F.className=F.className.replace(C," "+E+" ");if(this.hasClass(F,D)){this.replaceClass(F,D,E);}F.className=YAHOO.lang.trim(F.className);return true;};return R.Dom.batch(B,A,R.Dom,true);},generateId:function(C,A){A=A||"yui-gen";var B=function(E){if(E&&E.id){return E.id;}var D=A+YAHOO.env._id_counter++;if(E){E.id=D;}return D;};return R.Dom.batch(C,B,R.Dom,true)||B.apply(R.Dom,arguments);},isAncestor:function(B,A){B=R.Dom.get(B);A=R.Dom.get(A);if(!B||!A){return false;}if(B.contains&&A.nodeType&&!W){return B.contains(A);}else{if(B.compareDocumentPosition&&A.nodeType){return !!(B.compareDocumentPosition(A)&16);}else{if(A.nodeType){return !!this.getAncestorBy(A,function(C){return C==B;});}}}return false;},inDocument:function(A){return this.isAncestor(V.documentElement,A);},getElementsBy:function(A,G,F,D){G=G||"*";F=(F)?R.Dom.get(F):null||V;if(!F){return[];}var E=[],B=F.getElementsByTagName(G);for(var C=0,H=B.length;C<H;++C){if(A(B[C])){E[E.length]=B[C];if(D){D(B[C]);}}}return E;},batch:function(D,A,B,F){D=(D&&(D.tagName||D.item))?D:R.Dom.get(D);if(!D||!A){return false;}var E=(F)?B:window;if(D.tagName||D.length===undefined){return A.call(E,D,B);}var C=[];for(var G=0,H=D.length;G<H;++G){C[C.length]=A.call(E,D[G],B);}return C;},getDocumentHeight:function(){var A=(V.compatMode!="CSS1Compat")?V.body.scrollHeight:V.documentElement.scrollHeight;var B=Math.max(A,R.Dom.getViewportHeight());return B;},getDocumentWidth:function(){var A=(V.compatMode!="CSS1Compat")?V.body.scrollWidth:V.documentElement.scrollWidth;var B=Math.max(A,R.Dom.getViewportWidth());return B;},getViewportHeight:function(){var B=self.innerHeight;var A=V.compatMode;if((A||b)&&!Q){B=(A=="CSS1Compat")?V.documentElement.clientHeight:V.body.clientHeight;}return B;},getViewportWidth:function(){var B=self.innerWidth;var A=V.compatMode;if(A||b){B=(A=="CSS1Compat")?V.documentElement.clientWidth:V.body.clientWidth;}return B;},getAncestorBy:function(B,A){while(B=B.parentNode){if(P(B,A)){return B;}}return null;},getAncestorByClassName:function(B,C){B=R.Dom.get(B);if(!B){return null;}var A=function(D){return R.Dom.hasClass(D,C);};return R.Dom.getAncestorBy(B,A);},getAncestorByTagName:function(B,C){B=R.Dom.get(B);if(!B){return null;}var A=function(D){return D.tagName&&D.tagName.toUpperCase()==C.toUpperCase();};return R.Dom.getAncestorBy(B,A);},getPreviousSiblingBy:function(B,A){while(B){B=B.previousSibling;if(P(B,A)){return B;}}return null;},getPreviousSibling:function(A){A=R.Dom.get(A);if(!A){return null;}return R.Dom.getPreviousSiblingBy(A);},getNextSiblingBy:function(B,A){while(B){B=B.nextSibling;if(P(B,A)){return B;}}return null;},getNextSibling:function(A){A=R.Dom.get(A);if(!A){return null;}return R.Dom.getNextSiblingBy(A);},getFirstChildBy:function(C,A){var B=(P(C.firstChild,A))?C.firstChild:null;return B||R.Dom.getNextSiblingBy(C.firstChild,A);},getFirstChild:function(B,A){B=R.Dom.get(B);if(!B){return null;}return R.Dom.getFirstChildBy(B);},getLastChildBy:function(C,A){if(!C){return null;}var B=(P(C.lastChild,A))?C.lastChild:null;return B||R.Dom.getPreviousSiblingBy(C.lastChild,A);},getLastChild:function(A){A=R.Dom.get(A);return R.Dom.getLastChildBy(A);},getChildrenBy:function(C,A){var B=R.Dom.getFirstChildBy(C,A);var D=B?[B]:[];R.Dom.getNextSiblingBy(B,function(E){if(!A||A(E)){D[D.length]=E;}return false;});return D;},getChildren:function(A){A=R.Dom.get(A);if(!A){}return R.Dom.getChildrenBy(A);},getDocumentScrollLeft:function(A){A=A||V;return Math.max(A.documentElement.scrollLeft,A.body.scrollLeft);},getDocumentScrollTop:function(A){A=A||V;return Math.max(A.documentElement.scrollTop,A.body.scrollTop);},insertBefore:function(A,B){A=R.Dom.get(A);B=R.Dom.get(B);if(!A||!B||!B.parentNode){return null;}return B.parentNode.insertBefore(A,B);},insertAfter:function(A,B){A=R.Dom.get(A);B=R.Dom.get(B);if(!A||!B||!B.parentNode){return null;}if(B.nextSibling){return B.parentNode.insertBefore(A,B.nextSibling);}else{return B.parentNode.appendChild(A);}},getClientRegion:function(){var B=R.Dom.getDocumentScrollTop(),C=R.Dom.getDocumentScrollLeft(),A=R.Dom.getViewportWidth()+C,D=R.Dom.getViewportHeight()+B;return new R.Region(B,A,D,C);}};var a=function(){if(V.documentElement.getBoundingClientRect){return function(B){var A=B.getBoundingClientRect();var C=B.ownerDocument;return[A.left+R.Dom.getDocumentScrollLeft(C),A.top+R.Dom.getDocumentScrollTop(C)];};}else{return function(B){var A=[B.offsetLeft,B.offsetTop];var C=B.offsetParent;var D=(W&&R.Dom.getStyle(B,"position")=="absolute"&&B.offsetParent==B.ownerDocument.body);if(C!=B){while(C){A[0]+=C.offsetLeft;A[1]+=C.offsetTop;if(!D&&W&&R.Dom.getStyle(C,"position")=="absolute"){D=true;}C=C.offsetParent;}}if(D){A[0]-=B.ownerDocument.body.offsetLeft;A[1]-=B.ownerDocument.body.offsetTop;}C=B.parentNode;while(C.tagName&&!d.ROOT_TAG.test(C.tagName)){if(C.scrollTop||C.scrollLeft){if(!d.OP_SCROLL.test(R.Dom.getStyle(C,"display"))){if(!Q||R.Dom.getStyle(C,"overflow")!=="visible"){A[0]-=C.scrollLeft;A[1]-=C.scrollTop;}}}C=C.parentNode;}return A;};}}();})();YAHOO.util.Region=function(G,F,E,H){this.top=G;this[1]=G;this.right=F;this.bottom=E;this.left=H;this[0]=H;};YAHOO.util.Region.prototype.contains=function(B){return(B.left>=this.left&&B.right<=this.right&&B.top>=this.top&&B.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(G){var I=Math.max(this.top,G.top);var H=Math.min(this.right,G.right);var F=Math.min(this.bottom,G.bottom);var J=Math.max(this.left,G.left);if(F>=I&&H>=J){return new YAHOO.util.Region(I,H,F,J);}else{return null;}};YAHOO.util.Region.prototype.union=function(G){var I=Math.min(this.top,G.top);var H=Math.max(this.right,G.right);var F=Math.max(this.bottom,G.bottom);var J=Math.min(this.left,G.left);return new YAHOO.util.Region(I,H,F,J);};YAHOO.util.Region.prototype.toString=function(){return("Region {top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(J){var H=YAHOO.util.Dom.getXY(J);var K=H[1];var I=H[0]+J.offsetWidth;var G=H[1]+J.offsetHeight;var L=H[0];return new YAHOO.util.Region(K,I,G,L);};YAHOO.util.Point=function(C,D){if(YAHOO.lang.isArray(C)){D=C[1];C=C[0];}this.x=this.right=this.left=this[0]=C;this.y=this.top=this.bottom=this[1]=D;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.5.2",build:"1076"});YAHOO.util.CustomEvent=function(H,J,I,F){this.type=H;this.scope=J||window;this.silent=I;this.signature=F||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var G="_YUICEOnSubscribe";if(H!==G){this.subscribeEvent=new YAHOO.util.CustomEvent(G,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(F,E,D){if(!F){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(F,E,D);}this.subscribers.push(new YAHOO.util.Subscriber(F,E,D));},unsubscribe:function(J,H){if(!J){return this.unsubscribeAll();}var I=false;for(var L=0,G=this.subscribers.length;L<G;++L){var K=this.subscribers[L];if(K&&K.contains(J,H)){this._delete(L);I=true;}}return I;},fire:function(){this.lastError=null;var T=[],Z=this.subscribers.length;if(!Z&&this.silent){return true;}var V=[].slice.call(arguments,0),X=true,N,U=false;if(!this.silent){}var O=this.subscribers.slice(),Q=YAHOO.util.Event.throwErrors;for(N=0;N<Z;++N){var R=O[N];if(!R){U=true;}else{if(!this.silent){}var S=R.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var P=null;if(V.length>0){P=V[0];}try{X=R.fn.call(S,P,R.obj);}catch(Y){this.lastError=Y;if(Q){throw Y;}}}else{try{X=R.fn.call(S,this.type,V,R.obj);}catch(W){this.lastError=W;if(Q){throw W;}}}if(false===X){if(!this.silent){}break;}}}return(X!==false);},unsubscribeAll:function(){for(var B=this.subscribers.length-1;B>-1;B--){this._delete(B);}this.subscribers=[];return B;},_delete:function(C){var D=this.subscribers[C];if(D){delete D.fn;delete D.obj;}this.subscribers.splice(C,1);},toString:function(){return"CustomEvent: '"+this.type+"', scope: "+this.scope;}};YAHOO.util.Subscriber=function(F,E,D){this.fn=F;this.obj=YAHOO.lang.isUndefined(E)?null:E;this.override=D;};YAHOO.util.Subscriber.prototype.getScope=function(B){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}return B;};YAHOO.util.Subscriber.prototype.contains=function(C,D){if(D){return(this.fn==C&&this.obj==D);}else{return(this.fn==C);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var Q=false;var P=[];var O=[];var R=[];var T=[];var L=0;var S=[];var M=[];var N=0;var K={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){var B=this;var A=function(){B._tryPreloadAttach();};this._interval=setInterval(A,this.POLL_INTERVAL);}},onAvailable:function(D,G,C,E,F){var B=(YAHOO.lang.isString(D))?[D]:D;for(var A=0;A<B.length;A=A+1){S.push({id:B[A],fn:G,obj:C,override:E,checkReady:F});}L=this.POLL_RETRYS;this.startInterval();},onContentReady:function(D,B,C,A){this.onAvailable(D,B,C,A,true);},onDOMReady:function(B,C,A){if(this.DOMReady){setTimeout(function(){var D=window;if(A){if(A===true){D=C;}else{D=A;}}B.call(D,"DOMReady",[],C);},0);}else{this.DOMReadyEvent.subscribe(B,C,A);}},addListener:function(b,d,D,I,c){if(!D||!D.call){return false;}if(this._isValidCollection(b)){var C=true;for(var H=0,F=b.length;H<F;++H){C=this.on(b[H],d,D,I,c)&&C;}return C;}else{if(YAHOO.lang.isString(b)){var J=this.getEl(b);if(J){b=J;}else{this.onAvailable(b,function(){YAHOO.util.Event.on(b,d,D,I,c);});return true;}}}if(!b){return false;}if("unload"==d&&I!==this){O[O.length]=[b,d,D,I,c];return true;}var A=b;if(c){if(c===true){A=I;}else{A=c;}}var a=function(U){return D.call(A,YAHOO.util.Event.getEvent(U,b),I);};var B=[b,d,D,a,A,I,c];var G=P.length;P[G]=B;if(this.useLegacyEvent(b,d)){var Z=this.getLegacyIndex(b,d);if(Z==-1||b!=R[Z][0]){Z=R.length;M[b.id+d]=Z;R[Z]=[b,d,b["on"+d]];T[Z]=[];b["on"+d]=function(U){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(U),Z);};}T[Z].push(B);}else{try{this._simpleAdd(b,d,a,false);}catch(E){this.lastError=E;this.removeListener(b,d,D);return false;}}return true;},fireLegacyEvent:function(F,H){var D=true,J,B,C,A,E;B=T[H].slice();for(var I=0,G=B.length;I<G;++I){C=B[I];if(C&&C[this.WFN]){A=C[this.ADJ_SCOPE];E=C[this.WFN].call(A,F);D=(D&&E);}}J=R[H];if(J&&J[2]){J[2](F);}return D;},getLegacyIndex:function(A,C){var B=this.generateId(A)+C;if(typeof M[B]=="undefined"){return -1;}else{return M[B];}},useLegacyEvent:function(A,C){if(this.webkit&&("click"==C||"dblclick"==C)){var B=parseInt(this.webkit,10);if(!isNaN(B)&&B<418){return true;}}return false;},removeListener:function(W,X,C){var H,E,A;if(typeof W=="string"){W=this.getEl(W);}else{if(this._isValidCollection(W)){var B=true;for(H=W.length-1;H>-1;H--){B=(this.removeListener(W[H],X,C)&&B);}return B;}}if(!C||!C.call){return this.purgeElement(W,false,X);}if("unload"==X){for(H=O.length-1;H>-1;H--){A=O[H];if(A&&A[0]==W&&A[1]==X&&A[2]==C){O.splice(H,1);return true;}}return false;}var G=null;var F=arguments[3];if("undefined"===typeof F){F=this._getCacheIndex(W,X,C);}if(F>=0){G=P[F];}if(!W||!G){return false;}if(this.useLegacyEvent(W,X)){var I=this.getLegacyIndex(W,X);var J=T[I];if(J){for(H=0,E=J.length;H<E;++H){A=J[H];if(A&&A[this.EL]==W&&A[this.TYPE]==X&&A[this.FN]==C){J.splice(H,1);break;}}}}else{try{this._simpleRemove(W,X,G[this.WFN],false);}catch(D){this.lastError=D;return false;}}delete P[F][this.WFN];delete P[F][this.FN];P.splice(F,1);return true;},getTarget:function(C,A){var B=C.target||C.srcElement;return this.resolveTextNode(B);},resolveTextNode:function(A){try{if(A&&3==A.nodeType){return A.parentNode;}}catch(B){}return A;},getPageX:function(A){var B=A.pageX;if(!B&&0!==B){B=A.clientX||0;if(this.isIE){B+=this._getScrollLeft();}}return B;},getPageY:function(B){var A=B.pageY;if(!A&&0!==A){A=B.clientY||0;if(this.isIE){A+=this._getScrollTop();}}return A;},getXY:function(A){return[this.getPageX(A),this.getPageY(A)];},getRelatedTarget:function(A){var B=A.relatedTarget;if(!B){if(A.type=="mouseout"){B=A.toElement;}else{if(A.type=="mouseover"){B=A.fromElement;}}}return this.resolveTextNode(B);},getTime:function(C){if(!C.time){var A=new Date().getTime();try{C.time=A;}catch(B){this.lastError=B;return A;}}return C.time;},stopEvent:function(A){this.stopPropagation(A);this.preventDefault(A);},stopPropagation:function(A){if(A.stopPropagation){A.stopPropagation();}else{A.cancelBubble=true;}},preventDefault:function(A){if(A.preventDefault){A.preventDefault();}else{A.returnValue=false;}},getEvent:function(D,B){var A=D||window.event;if(!A){var C=this.getEvent.caller;while(C){A=C.arguments[0];if(A&&Event==A.constructor){break;}C=C.caller;}}return A;},getCharCode:function(A){var B=A.keyCode||A.charCode||0;if(YAHOO.env.ua.webkit&&(B in K)){B=K[B];}return B;},_getCacheIndex:function(D,C,E){for(var F=0,A=P.length;F<A;F=F+1){var B=P[F];if(B&&B[this.FN]==E&&B[this.EL]==D&&B[this.TYPE]==C){return F;}}return -1;},generateId:function(B){var A=B.id;if(!A){A="yuievtautoid-"+N;++N;B.id=A;}return A;},_isValidCollection:function(A){try{return(A&&typeof A!=="string"&&A.length&&!A.tagName&&!A.alert&&typeof A[0]!=="undefined");}catch(B){return false;}},elCache:{},getEl:function(A){return(typeof A==="string")?document.getElementById(A):A;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(A){if(!Q){Q=true;var B=YAHOO.util.Event;B._ready();B._tryPreloadAttach();}},_ready:function(A){var B=YAHOO.util.Event;if(!B.DOMReady){B.DOMReady=true;B.DOMReadyEvent.fire();B._simpleRemove(document,"DOMContentLoaded",B._ready);}},_tryPreloadAttach:function(){if(S.length===0){L=0;clearInterval(this._interval);this._interval=null;return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var D=!Q;if(!D){D=(L>0&&S.length>0);}var E=[];var C=function(J,I){var V=J;if(I.override){if(I.override===true){V=I.obj;}else{V=I.override;}}I.fn.call(V,I.obj);};var A,B,F,G,H=[];for(A=0,B=S.length;A<B;A=A+1){F=S[A];if(F){G=this.getEl(F.id);if(G){if(F.checkReady){if(Q||G.nextSibling||!D){H.push(F);S[A]=null;}}else{C(G,F);S[A]=null;}}else{E.push(F);}}}for(A=0,B=H.length;A<B;A=A+1){F=H[A];C(this.getEl(F.id),F);}L--;if(D){for(A=S.length-1;A>-1;A--){F=S[A];if(!F||!F.id){S.splice(A,1);}}this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;},purgeElement:function(F,E,C){var H=(YAHOO.lang.isString(F))?this.getEl(F):F;var D=this.getListeners(H,C),G,B;if(D){for(G=D.length-1;G>-1;G--){var A=D[G];this.removeListener(H,A.type,A.fn);}}if(E&&H&&H.childNodes){for(G=0,B=H.childNodes.length;G<B;++G){this.purgeElement(H.childNodes[G],E,C);}}},getListeners:function(H,J){var E=[],I;if(!J){I=[P,O];}else{if(J==="unload"){I=[O];}else{I=[P];}}var C=(YAHOO.lang.isString(H))?this.getEl(H):H;for(var F=0;F<I.length;F=F+1){var A=I[F];if(A){for(var D=0,B=A.length;D<B;++D){var G=A[D];if(G&&G[this.EL]===C&&(!J||J===G[this.TYPE])){E.push({type:G[this.TYPE],fn:G[this.FN],obj:G[this.OBJ],adjust:G[this.OVERRIDE],scope:G[this.ADJ_SCOPE],index:D});}}}}return(E.length)?E:null;},_unload:function(C){var I=YAHOO.util.Event,F,G,H,D,E,B=O.slice();for(F=0,D=O.length;F<D;++F){H=B[F];if(H){var A=window;if(H[I.ADJ_SCOPE]){if(H[I.ADJ_SCOPE]===true){A=H[I.UNLOAD_OBJ];}else{A=H[I.ADJ_SCOPE];}}H[I.FN].call(A,I.getEvent(C,H[I.EL]),H[I.UNLOAD_OBJ]);B[F]=null;H=null;A=null;}}O=null;if(P){for(G=P.length-1;G>-1;G--){H=P[G];if(H){I.removeListener(H[I.EL],H[I.TYPE],H[I.FN],G);}}H=null;}R=null;I._simpleRemove(window,"unload",I._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var B=document.documentElement,A=document.body;if(B&&(B.scrollTop||B.scrollLeft)){return[B.scrollTop,B.scrollLeft];}else{if(A){return[A.scrollTop,A.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(D,C,A,B){D.addEventListener(C,A,(B));};}else{if(window.attachEvent){return function(D,C,A,B){D.attachEvent("on"+C,A);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(D,C,A,B){D.removeEventListener(C,A,(B));};}else{if(window.detachEvent){return function(A,C,B){A.detachEvent("on"+C,B);};}else{return function(){};}}}()};}();(function(){var A=YAHOO.util.Event;A.on=A.addListener;if(A.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var B=document.createElement("p");A._dri=setInterval(function(){try{B.doScroll("left");clearInterval(A._dri);A._dri=null;A._ready();B=null;}catch(C){}},A.POLL_INTERVAL);}else{if(A.webkit&&A.webkit<525){A._dri=setInterval(function(){var C=document.readyState;if("loaded"==C||"complete"==C){clearInterval(A._dri);A._dri=null;A._ready();}},A.POLL_INTERVAL);}else{A._simpleAdd(document,"DOMContentLoaded",A._ready);}}A._simpleAdd(window,"load",A._load);A._simpleAdd(window,"unload",A._unload);A._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(G,K,H,I){this.__yui_events=this.__yui_events||{};var J=this.__yui_events[G];if(J){J.subscribe(K,H,I);}else{this.__yui_subscribers=this.__yui_subscribers||{};var L=this.__yui_subscribers;if(!L[G]){L[G]=[];}L[G].push({fn:K,obj:H,override:I});}},unsubscribe:function(M,K,I){this.__yui_events=this.__yui_events||{};var H=this.__yui_events;if(M){var J=H[M];if(J){return J.unsubscribe(K,I);}}else{var N=true;for(var L in H){if(YAHOO.lang.hasOwnProperty(H,L)){N=N&&H[L].unsubscribe(K,I);}}return N;}return false;},unsubscribeAll:function(B){return this.unsubscribe(B);},createEvent:function(P,J){this.__yui_events=this.__yui_events||{};var M=J||{};var N=this.__yui_events;if(N[P]){}else{var O=M.scope||this;var R=(M.silent);var L=new YAHOO.util.CustomEvent(P,O,R,YAHOO.util.CustomEvent.FLAT);N[P]=L;if(M.onSubscribeCallback){L.subscribeEvent.subscribe(M.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var Q=this.__yui_subscribers[P];if(Q){for(var K=0;K<Q.length;++K){L.subscribe(Q[K].fn,Q[K].obj,Q[K].override);}}}return N[P];},fireEvent:function(K,L,H,M){this.__yui_events=this.__yui_events||{};var I=this.__yui_events[K];if(!I){return null;}var N=[];for(var J=1;J<arguments.length;++J){N.push(arguments[J]);}return I.fire.apply(I,N);},hasEvent:function(B){if(this.__yui_events){if(this.__yui_events[B]){return true;}}return false;}};YAHOO.util.KeyListener=function(G,H,L,K){if(!G){}else{if(!H){}else{if(!L){}}}if(!K){K=YAHOO.util.KeyListener.KEYDOWN;}var J=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof G=="string"){G=document.getElementById(G);}if(typeof L=="function"){J.subscribe(L);}else{J.subscribe(L.fn,L.scope,L.correctScope);}function I(A,B){if(!H.shift){H.shift=false;}if(!H.alt){H.alt=false;}if(!H.ctrl){H.ctrl=false;}if(A.shiftKey==H.shift&&A.altKey==H.alt&&A.ctrlKey==H.ctrl){var D;if(H.keys instanceof Array){for(var C=0;C<H.keys.length;C++){D=H.keys[C];if(D==A.charCode){J.fire(A.charCode,A);break;}else{if(D==A.keyCode){J.fire(A.keyCode,A);break;}}}}else{D=H.keys;if(D==A.charCode){J.fire(A.charCode,A);}else{if(D==A.keyCode){J.fire(A.keyCode,A);}}}}}this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(G,K,I);this.enabledEvent.fire(H);}this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(G,K,I);this.disabledEvent.fire(H);}this.enabled=false;};this.toString=function(){return"KeyListener ["+H.keys+"] "+G.tagName+(G.id?"["+G.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.util.KeyListener.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};YAHOO.register("event",YAHOO.util.Event,{version:"2.5.2",build:"1076"});YAHOO.register("yahoo-dom-event",YAHOO,{version:"2.5.2",build:"1076"});YAHOO.util.History=(function(){var C=null;var K=null;var F=false;var D=[];var B=[];function I(){var M,L;L=top.location.href;M=L.indexOf("#");return M>=0?L.substr(M+1):null;}function A(){var M,N,O=[],L=[];for(M in D){if(YAHOO.lang.hasOwnProperty(D,M)){N=D[M];O.push(M+"="+N.initialState);L.push(M+"="+N.currentState);}}K.value=O.join("&")+"|"+L.join("&");if(YAHOO.env.ua.webkit){K.value+="|"+B.join(",");}}function H(L){var Q,R,M,O,P,T,S,N;if(!L){for(M in D){if(YAHOO.lang.hasOwnProperty(D,M)){O=D[M];O.currentState=O.initialState;O.onStateChange(unescape(O.currentState));}}return;}P=[];T=L.split("&");for(Q=0,R=T.length;Q<R;Q++){S=T[Q].split("=");if(S.length===2){M=S[0];N=S[1];P[M]=N;}}for(M in D){if(YAHOO.lang.hasOwnProperty(D,M)){O=D[M];N=P[M];if(!N||O.currentState!==N){O.currentState=N||O.initialState;O.onStateChange(unescape(O.currentState));}}}}function J(O){var L,N;L='<html><body><div id="state">'+O+"</div></body></html>";try{N=C.contentWindow.document;N.open();N.write(L);N.close();return true;}catch(M){return false;}}function G(){var O,L,N,M;if(!C.contentWindow||!C.contentWindow.document){setTimeout(G,10);return;}O=C.contentWindow.document;L=O.getElementById("state");N=L?L.innerText:null;M=I();setInterval(function(){var U,Q,R,S,T,P;O=C.contentWindow.document;L=O.getElementById("state");U=L?L.innerText:null;T=I();if(U!==N){N=U;H(N);if(!N){Q=[];for(R in D){if(YAHOO.lang.hasOwnProperty(D,R)){S=D[R];Q.push(R+"="+S.initialState);}}T=Q.join("&");}else{T=N;}top.location.hash=T;M=T;A();}else{if(T!==M){M=T;J(T);}}},50);F=true;YAHOO.util.History.onLoadEvent.fire();}function E(){var S,U,Q,W,M,O,V,P,T,N,L,R;Q=K.value.split("|");if(Q.length>1){V=Q[0].split("&");for(S=0,U=V.length;S<U;S++){W=V[S].split("=");if(W.length===2){M=W[0];P=W[1];O=D[M];if(O){O.initialState=P;}}}T=Q[1].split("&");for(S=0,U=T.length;S<U;S++){W=T[S].split("=");if(W.length>=2){M=W[0];N=W[1];O=D[M];if(O){O.currentState=N;}}}}if(Q.length>2){B=Q[2].split(",");}if(YAHOO.env.ua.ie){if(typeof document.documentMode==="undefined"||document.documentMode<8){G();}else{YAHOO.util.Event.on(top,"hashchange",function(){var X=I();H(X);A();});F=true;YAHOO.util.History.onLoadEvent.fire();}}else{L=history.length;R=I();setInterval(function(){var Z,X,Y;X=I();Y=history.length;if(X!==R){R=X;L=Y;H(R);A();}else{if(Y!==L&&YAHOO.env.ua.webkit){R=X;L=Y;Z=B[L-1];H(Z);A();}}},50);F=true;YAHOO.util.History.onLoadEvent.fire();}}return{onLoadEvent:new YAHOO.util.CustomEvent("onLoad"),onReady:function(M,N,L){if(F){setTimeout(function(){var O=window;if(L){if(L===true){O=N;}else{O=L;}}M.call(O,"onLoad",[],N);},0);}else{YAHOO.util.History.onLoadEvent.subscribe(M,N,L);}},register:function(O,L,Q,R,N){var P,M;if(typeof O!=="string"||YAHOO.lang.trim(O)===""||typeof L!=="string"||typeof Q!=="function"){throw new Error("Missing or invalid argument");}if(D[O]){return;}if(F){throw new Error("All modules must be registered before calling YAHOO.util.History.initialize");}O=escape(O);L=escape(L);P=null;if(N===true){P=R;}else{P=N;}M=function(S){return Q.call(P,S,R);};D[O]={name:O,initialState:L,currentState:L,onStateChange:M};},initialize:function(L,M){if(F){return;}if(YAHOO.env.ua.opera&&typeof history.navigationMode!=="undefined"){history.navigationMode="compatible";}if(typeof L==="string"){L=document.getElementById(L);}if(!L||L.tagName.toUpperCase()!=="TEXTAREA"&&(L.tagName.toUpperCase()!=="INPUT"||L.type!=="hidden"&&L.type!=="text")){throw new Error("Missing or invalid argument");}K=L;if(YAHOO.env.ua.ie&&(typeof document.documentMode==="undefined"||document.documentMode<8)){if(typeof M==="string"){M=document.getElementById(M);}if(!M||M.tagName.toUpperCase()!=="IFRAME"){throw new Error("Missing or invalid argument");}C=M;}YAHOO.util.Event.onDOMReady(E);},navigate:function(M,N){var L;if(typeof M!=="string"||typeof N!=="string"){throw new Error("Missing or invalid argument");}L={};L[M]=N;return YAHOO.util.History.multiNavigate(L);},multiNavigate:function(M){var L,N,P,O,Q;if(typeof M!=="object"){throw new Error("Missing or invalid argument");}if(!F){throw new Error("The Browser History Manager is not initialized");}for(N in M){if(!D[N]){throw new Error("The following module has not been registered: "+N);}}L=[];for(N in D){if(YAHOO.lang.hasOwnProperty(D,N)){P=D[N];if(YAHOO.lang.hasOwnProperty(M,N)){O=M[unescape(N)];}else{O=unescape(P.currentState);}N=escape(N);O=escape(O);L.push(N+"="+O);}}Q=L.join("&");if(YAHOO.env.ua.ie&&(typeof document.documentMode==="undefined"||document.documentMode<8)){return J(Q);}else{top.location.hash=Q;if(YAHOO.env.ua.webkit){B[history.length]=Q;A();}return true;}},getCurrentState:function(L){var M;if(typeof L!=="string"){throw new Error("Missing or invalid argument");}if(!F){throw new Error("The Browser History Manager is not initialized");}M=D[L];if(!M){throw new Error("No such registered module: "+L);}return unescape(M.currentState);},getBookmarkedState:function(Q){var P,M,L,S,N,R,O;if(typeof Q!=="string"){throw new Error("Missing or invalid argument");}L=top.location.href.indexOf("#");if(L>=0){S=top.location.href.substr(L+1);N=S.split("&");for(P=0,M=N.length;P<M;P++){R=N[P].split("=");if(R.length===2){O=R[0];if(O===Q){return unescape(R[1]);}}}}return null;},getQueryStringParameter:function(Q,N){var O,M,L,S,R,P;N=N||top.location.href;L=N.indexOf("?");S=L>=0?N.substr(L+1):N;L=S.lastIndexOf("#");S=L>=0?S.substr(0,L):S;R=S.split("&");for(O=0,M=R.length;O<M;O++){P=R[O].split("=");if(P.length>=2){if(P[0]===Q){return unescape(P[1]);}}}return null;}};})();YAHOO.register("history",YAHOO.util.History,{version:"2.7.0",build:"1799"});String.prototype.trim=function(){return(this.replace(new RegExp("^([\\s]+)|([\\s]+)$","gm"),""));};Array.prototype.clean=function(C){var B=[];for(var A=0;A<this.length;A++){if(this[A]!=C){B.push(this[A]);}}return B;};if(typeof Array.indexOf!="function"){Array.prototype.indexOf=function(B,C){var D=C||0;for(var A=D;A<this.length;A++){if(B===this[A]){return A;}}return -1;};}Array.prototype.remove=function(B,A){var C=this.slice((A||B)+1||this.length);this.length=(B<0?this.length+B:B);return this.push.apply(this,C);};function RefreshBanner(A,B){var C=document.getElementById(A);var D=C.src;C.src="about:blank";C.src=D;setTimeout("RefreshBanner('"+A+"','"+B+"')",B*1000);}function RefreshBanner2(A,B,E){var C=document.getElementById(A);var D=C.src;C.src="about:blank";C.src=D;E=E-1;if(E>0){setTimeout("RefreshBanner2('"+A+"','"+B+"','"+E+"')",B*1000);}}var PERF={initBrowserHistory:function(){try{YAHOO.util.History.initialize("yui-history-field","yui-history-iframe");}catch(A){}},setText:function(B,A){B[document.all?"innerText":"textContent"]=A;},getCookie:function(C){var D=document.cookie.indexOf(C+"=");var A=D+C.length+1;if((!D)&&(C!=document.cookie.substring(0,C.length))){return null;}if(D==-1){return null;}var B=document.cookie.indexOf(";",A);if(B==-1){B=document.cookie.length;}return unescape(document.cookie.substring(A,B));},setCookie:function(C,E,A,H,D,G){var B=new Date();B.setTime(B.getTime());if(A){A=A*1000*60*60*24;}var F=new Date(B.getTime()+(A));document.cookie=C+"="+escape(E)+((H)?";path="+H:"")+((A)?";expires="+F.toGMTString():"")+";domain=perfspot.com"+((G)?";secure":"");},deleteCookie:function(A,C,B){if(getCookie(A)){document.cookie=A+"="+((C)?";path="+C:"")+((B)?";domain="+B:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT";}},getQueryStringParameterValue:function(E,B){B=B||window.location.href;var A="[\\?&]"+E+"=([^&#]*)";var D=new RegExp(A);var C=D.exec(B);if(C==null){return"";}else{return C[1];}},getRelativeUrlPathName:function(){return location.pathname.substr(0,(location.pathname.lastIndexOf("/")+1));},getAbsoluteUrlPathName:function(){var A=location.protocol+"//"+location.host;return A+this.getRelativeUrlPathName();},parseNode:function(F,B,E){var D=F.getElementsByTagName(B)[0];if(!D){return"";}if(!E||D.childNodes.length==1){return(D!=null&&D.childNodes.length>0)?D.firstChild.nodeValue:"";}else{var C="";for(var A=0;A<D.childNodes.length;A++){C+=D.childNodes[A].nodeValue;}return C;}},parseNodeNumeric:function(B,A){return Number(this.parseNode(B,A));},parseNodeBool:function(B,A){return this.parseNode(B,A).trim().toLowerCase()=="true"?true:false;},requestVariableEditPictures:"editPictures_albumContentsEditor",encoding:"",makeLink:function(A){var C=function(){this.className+=this.className.trim().length==0?"linkHover":" linkHover";};var B=function(){this.className=this.className.replace("linkHover","").trim();};if(YAHOO.util.Event){YAHOO.util.Event.addListener(A,"mouseover",C);YAHOO.util.Event.addListener(A,"mouseout",B);}else{if(window.attachEvent){A.attachEvent("onmouseover",C);A.attachEvent("onmouseout",B);}else{A.addEventListener("onmouseover",C,false);A.addEventListener("onmouseout",B,false);}}},removeLink:function(A){YAHOO.util.Event.addListener(A,"mouseover");YAHOO.util.Event.addListener(A,"mouseout");}};function formatLongDate(M){var C="";if(M==undefined){return M;}var L=new String(M);if(L.trim().length==0){return M;}var K=new Array("January ","February ","March ","April ","May ","June ","July ","August ","September ","October ","November ","December ");var G=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");try{var F=new Date(M);var A=F.getMonth();var I=String(K[A]);var D=String(A);D=A<10?"0"+D:D;var B=F.getDate();var N=String(F.getDate());var E=String(G[F.getDay()]);var J=String(F.getFullYear());C=E+", "+I+" "+N+", "+J;}catch(H){}return C;}function formatDateMMDDYYYY(I){var B="";if(I==undefined){return I;}var H=new String(I);if(H.trim().length==0){return I;}try{var E=new Date(I);var A=E.getMonth()+1;var D=String(A);D=A<10?"0"+D:D;var C=E.getDate();var J=String(E.getDate());J=C<10?"0"+J:J;var G=String(E.getFullYear());B=D+"/"+J+"/"+G;}catch(F){}return B;}function addNode(G,I,B,E,H,A){var C=null;B=B==undefined?"":B;E=E==undefined?"":E;H=H==undefined?"":H;if(I.length>0){C=document.createElement("input");switch(I){case"hidden":C.setAttribute("type","hidden");break;case"textbox":C.setAttribute("type","text");break;case"button":C.setAttribute("type","button");break;case"checkbox":C.setAttribute("type","checkbox");break;case"radio":try{var F="<input type='radio' name='"+A+"' />";C=document.createElement(F);}catch(D){C=document.createElement("input");C.setAttribute("type","radio");C.setAttribute("name",A);}break;default:C=document.createElement(I);break;}}if(H.length>0){if(C==null){C=G;}switch(C.tagName){case"OPTION":C.appendChild(document.createTextNode(H));C.value=H;break;case"INPUT":C.value=H;break;default:C.innerHTML=H;break;}}if(B.length>0){C.id=B;C.name=B;}if(E.length>0){C.className=E;}G.appendChild(C);return C;}var Url={encode:function(A){return escape(this._utf8_encode(A));},decode:function(A){return this._utf8_decode(unescape(A));},_utf8_encode:function(B){var A="";for(var D=0;D<B.length;D++){var C=B.charCodeAt(D);if(C<128){A+=String.fromCharCode(C);}else{if((C>127)&&(C<2048)){A+=String.fromCharCode((C>>6)|192);A+=String.fromCharCode((C&63)|128);}else{A+=String.fromCharCode((C>>12)|224);A+=String.fromCharCode(((C>>6)&63)|128);A+=String.fromCharCode((C&63)|128);}}}return A;},_utf8_decode:function(A){var B="";var C=0;var D=c1=c2=0;while(C<A.length){D=A.charCodeAt(C);if(D<128){B+=String.fromCharCode(D);C++;}else{if((D>191)&&(D<224)){c2=A.charCodeAt(C+1);B+=String.fromCharCode(((D&31)<<6)|(c2&63));C+=2;}else{c2=A.charCodeAt(C+1);c3=A.charCodeAt(C+2);B+=String.fromCharCode(((D&15)<<12)|((c2&63)<<6)|(c3&63));C+=3;}}}return B;}};function pop(D,C,B,E,A){var G,F;G=screen.availHeight/2-E/2;F=screen.availWidth/2-B/2;window.open(D,C,"width="+B+",height="+E+",top="+G+",left="+F+",toolbar=no,location=no,directories=no,status=no,scrollbars="+A+",resizable=no,menubar=no,screenX=200,screenY=200");}function getHttpRequestObj(){var A=false;if(window.XMLHttpRequest){try{A=new XMLHttpRequest();}catch(B){A=false;}}else{if(window.ActiveXObject){try{A=new ActiveXObject("Msxml2.XMLHTTP");}catch(B){try{A=new ActiveXObject("Microsoft.XMLHTTP");}catch(B){A=false;}}}}return A;}var click=false;function cpress(A){click=true;}function uload(){if(!click){var A="/close.asp";http=getHttpRequestObj();http.open("GET",A,true);http.send(null);}}document.onclick=cpress;var perfUI={};perfUI.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=A[C].split(".");E=perfUI;for(B=(D[0]=="perfUI")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};perfUI.namespace("widgets");perfUI.namespace("content");perfUI.namespace("util");perfUI.namespace("dashboard");perfUI.namespace("skin");perfUI.namespace("chat");perfUI.namespace("UI");perfUI.namespace("gadgets");perfUI.namespace("messages");perfUI.util.addEl=function(E,D,H){switch(D.toLowerCase()){case"hidden":D=document.createElement("INPUT");D.setAttribute("type","hidden");break;case"textbox":case"text":D=document.createElement("INPUT");D.setAttribute("type","text");break;case"checkbox":D=document.createElement("INPUT");D.setAttribute("type","checkbox");break;case"button":D=document.createElement("INPUT");D.setAttribute("type","button");break;case"submit":D=document.createElement("INPUT");D.setAttribute("type","submit");break;case"radio":if(YAHOO.env.ua.ie){D=document.createElement("<input type='radio' name='"+D+"'/>");}else{D=document.createElement("input");D.setAttribute("type","radio");}break;case"tr":D=E.insertRow(E.rows.length);break;case"td":D=E.insertCell(E.cells.length);break;default:D=document.createElement(D);}for(var B in H){switch(B.toLowerCase()){case"style":var C=H[B].split(";");var F="";for(var A=0;A<C.length;A++){F=C[A].split(":");if(F[0].indexOf("-")>-1){F[0]=F[0].substr(0,F[0].indexOf("-"))+F[0].charAt(F[0].indexOf("-")+1).toUpperCase()+F[0].substr(F[0].indexOf("-")+2);}try{D.style[F[0]]=F[1];}catch(G){}}break;case"class":D.className=H[B];break;case"text":D[document.all?"innerText":"textContent"]=H[B];break;case"for":D.setAttribute("for",H[B]);break;default:D[B]=H[B];}}if(D.tagName!="TR"&&D.tagName!="TD"){E.appendChild(D);}D._=perfUI.util.addEl._;D.addSibling=perfUI.util.addEl._;D.c=perfUI.util.addEl.c;D.addChild=perfUI.util.addEl.c;E=null;return D;};perfUI.util.addEl._=function(B,A){return perfUI.util.addEl(this.parentNode,B,A);};perfUI.util.addEl.c=function(B,A){return perfUI.util.addEl(this,B,A);};perfUI.util.getNode=function(B,C){if(B==null){return null;}if(B.nodeName.toLowerCase()==C){return B;}else{var A=B.getElementsByTagName(C);if(A!=null){return A;}else{return null;}}};perfUI.widgets.translator=function(C){var B=[];var A=C||1;this.setLanguageId=function(D){A=D;};this.getLanguageId=function(){return A;};this.addKeys=function(D){for(k in D){this.addKey(k,D[k]);}};this.addKey=function(D,F){var E=new this.key(D,F);B.push(E);};this.getKey=function(D){for(var F=0;F<B.length;F++){var E=B[F];if(E.index==D){return E;}}return null;};this.getValue=function(D){var E=this.getKey(D);if(E){return E.value;}else{return"";}};this.parseValue=function(F,D){for(var E=0;E<D.length;E++){F=F.replace(new RegExp("%x"+(E+1)+"%","g"),D[E]);}return F;};this.getKeys=function(){return B;};};perfUI.widgets.translator.prototype.key=function(A,B){this.index=A||0;this.value=B||"";};perfUI.util.insertClientScript=function(B){var A=null;A=document.createElement("script");A.setAttribute("type","text/javascript");A.text=B;var C=document.getElementsByTagName("head")[0];C.appendChild(A);return A;};perfUI.util.loadClientResource=function(C,D,B){var A=null;switch(D){case"js":A=document.createElement("script");A.setAttribute("type","text/javascript");A.setAttribute("src",C);if(B){if(YAHOO.env.ua.ie>0){var E=A;if(B.scope&&B.scope==true){E=B.obj;}A.onreadystatechange=function(){if(this.readyState=="complete"||this.readyState=="loaded"){B.fn();}};}else{YAHOO.util.Event.addListener(A,"load",B.fn,B.obj,B.scope);}}break;case"css":A=document.createElement("link");A.setAttribute("rel","stylesheet");A.setAttribute("type","text/css");A.setAttribute("href",C);break;}var F=document.getElementsByTagName("head")[0];F.appendChild(A);return A;};perfUI.util.startPresenceTimer=function(B){var A=this.presenceTimer=self.setInterval("perfUI.util.presenceTimerCallback()",B*60000);this.url="/api/call.asp?function=Members.LoggedIn&rnd=";};perfUI.util.presenceTimerCallback=function(){var C=this.httpObj=getHttpRequestObj();var A=this.presenceTimer;this.httpObj.onreadystatechange=function(){if(C.readyState==4){if(C.status==200){try{if(C.responseXML.getElementsByTagName("success")[0].childNodes[0].nodeValue=="false"){self.clearInterval(A);}}catch(D){}}C.close;}};var B=this.url+(new Date().getTime());this.httpObj.open("GET",B,true);this.httpObj.send(null);};perfUI.UI.notificationTemplate={icons:0,links:1};perfUI.UI.notifications={translations:[],cssBase:"pf_notifications",cssOn:"notification_on",cssOff:"notification_off",coins:{template:perfUI.UI.notificationTemplate.icons,elementId:"",refresh:function(G){var J=perfUI.UI.notifications.translations;var D=perfUI.util.addEl;var C=YAHOO.util.Dom;var I=YAHOO.util.Event;var B=document.getElementById(this.elementId);if(!B){return;}I.purgeElement(B);B.innerHTML="";C.addClass(B,perfUI.UI.notifications.cssBase);var A="/gifts/give.asp";var H=J.length==3?J[2]:"";switch(this.template){case perfUI.UI.notificationTemplate.icons:var F=D(B,"div",{"class":"coins_count","title":H});I.addListener(F,"click",function(){location.href=A;});var E=D(B,"a",{"href":A,"innerHTML":String(G),"title":H,"class":perfUI.UI.notifications.cssOff});break;case perfUI.UI.notificationTemplate.links:var E=D(B,"a",{"href":A,"innerHTML":H+"&nbsp;("+String(G)+")"});break;}}},messages:{template:perfUI.UI.notificationTemplate.icons,elementId:"",refresh:function(E,F){var L=perfUI.UI.notifications.translations;var G=perfUI.util.addEl;var D=YAHOO.util.Dom;var K=YAHOO.util.Event;var B=document.getElementById(this.elementId);K.purgeElement(B);if(!B){return;}B.innerHTML="";D.addClass(B,perfUI.UI.notifications.cssBase);var C=Number(E)+Number(F);var A="/inbox/inbox.asp";if(E<=0&&F>0){A="/inbox.asp";}var J=L.length>=1?L[0]:"";switch(this.template){case perfUI.UI.notificationTemplate.icons:var I=G(B,"div",{"class":"PH_headerMenu_img PH_headerMenu_img_incomingMail","title":J});K.addListener(I,"click",function(){location.href=A;});var H=G(B,"a",{"href":A,"innerHTML":String(C),"title":J,"class":C>0?perfUI.UI.notifications.cssOn:perfUI.UI.notifications.cssOff});break;case perfUI.UI.notificationTemplate.links:var H=G(B,"a",{"href":A,"innerHTML":J+"&nbsp;("+String(C)+")"});break;}}},friendRequests:{template:perfUI.UI.notificationTemplate.icons,elementId:"",refresh:function(D){var J=perfUI.UI.notifications.translations;var E=perfUI.util.addEl;var C=YAHOO.util.Dom;var I=YAHOO.util.Event;var B=document.getElementById(this.elementId);if(!B){return;}I.purgeElement(B);B.innerHTML="";C.addClass(B,perfUI.UI.notifications.cssBase);var A="/friendrequests.asp";var H=J.length>=2?J[1]:"";switch(this.template){case perfUI.UI.notificationTemplate.icons:var G=E(B,"div",{"class":"PH_headerMenu_img PH_headerMenu_img_incomingFriendRequest","title":H});I.addListener(G,"click",function(){location.href=A;});var F=E(B,"a",{"href":A,"innerHTML":String(D),"title":H,"class":D>0?perfUI.UI.notifications.cssOn:perfUI.UI.notifications.cssOff});break;case perfUI.UI.notificationTemplate.links:var F=E(B,"a",{"href":A,"innerHTML":H+"&nbsp;("+String(D)+")"});break;}}}};perfUI.util.presenceTimer={interval:2,url:"/api/call.asp?function=Members.LoggedIn&rnd=",onSuccess:new YAHOO.util.CustomEvent("onSuccess"),onFailure:new YAHOO.util.CustomEvent("onFailure")};perfUI.util.presenceTimer.startTimer=function(A,B){this.interval=A||this.interval;this.url=B||this.url;perfUI.util.presenceTimer.stopTimer();this.presenceTimer=self.setInterval("perfUI.util.presenceTimer.sendRequest()",A*60000);};perfUI.util.presenceTimer.stopTimer=function(){if(this.presenceTimer){self.clearInterval(this.presenceTimer);}};perfUI.util.presenceTimer.sendRequest=function(){var E=this;var B=this.presenceTimer;var D=function(G){this.onFailure.fire();};var A=function(H){var G=this.getStatus(H.responseXML);if(G.success){this.onSuccess.fire(G);perfUI.UI.notifications.messages.refresh(G.inboxUnread,G.inboxUnreadOld);perfUI.UI.notifications.friendRequests.refresh(G.friendRequestUnread);perfUI.UI.notifications.coins.refresh(G.coins);}else{if(B){self.clearInterval(B);}this.onFailure.fire(G);}};var F={success:A,failure:D,scope:E};var C=this.url+(new Date().getTime());YAHOO.util.Connect.asyncRequest("GET",C,F,null);};perfUI.util.presenceTimer.getStatus=function(B){var C=PERF.parseNodeBool(B,"success");var G=PERF.parseNode(B,"inboxUnread");var A=PERF.parseNode(B,"inboxUnreadOld");var F=PERF.parseNode(B,"friendRequestUnread");var E=PERF.parseNode(B,"coins");var D={dataSource:B,success:C,inboxUnread:G,inboxUnreadOld:A,friendRequestUnread:F,coins:E};return D;};perfUI.widgets.menu=function(A,C){this.menuClosed=true;if(typeof A=="string"){this.containerID=A;A=document.getElementById(A);}else{if(A.getAttribute("id")!=null){this.containerID=A.getAttribute("id");}else{var D=Math.ceil(Math.random()*(new Date()).getTime());A.setAttribute("id",D);this.containerID=D;}}var B=C||null;if(!B){B=document.createElement("DIV");B.className="perfMenu";}this.getContainer=function(){return A;};this.getElement=function(){return B;};this.menuItems=[];this.drawMenu=function(){for(var E=0;E<this.menuItems.length;E++){perfUI.util.addEl(B,"DIV",{"noWrap":true,"style":"white-space:nowrap;"+(this.menuItems[E].style?this.menuItems[E].style:""),"innerHTML":this.menuItems[E].text,"onmouseover":this.itemMouseOver,"onmouseout":this.itemMouseOut,"class":this.menuItems[E].className||""});if(this.menuItems[E].onclick){YAHOO.util.Event.addListener(B.lastChild,"click",this.menuItems[E].onclick.fn,this.menuItems[E].onclick.obj,this.menuItems[E].onclick.scope);}}};this.addItems=function(E){if(typeof E=="object"){for(var F=0;F<E.length;F++){this.menuItems.push(E[F]);}}else{this.menuItems.push(E);}};this.subscribe=new Function();};perfUI.widgets.menu.prototype.clearMenu=function(){var B=this.getElement();for(var A=0;A<B.childNodes.length;A++){YAHOO.util.Event.purgeElement(B.childNodes[A]);}B.innerHTML="";};perfUI.widgets.menu.prototype.closeMenu=function(){this.clearMenu();if(this.menuClosed){return;}this.menuClosed=true;if(this.getContainer().parentNode){try{this.getContainer().parentNode.removeChild(this.getElement());}catch(A){}}document.onclick=null;};perfUI.widgets.menu.prototype.adjustCoordinates=function(){};perfUI.widgets.menu.prototype.render=function(){};perfUI.widgets.menu.prototype.show=function(E){var B=this.getContainer();var C=this.getElement();var A=document.all?-2:0;var D=YAHOO.util.Dom.getXY(YAHOO.util.Event.getTarget(E));C.style.top=D[1]+11+A+"px";C.style.left=D[0]+A+"px";this.menuClosed=false;B.parentNode.appendChild(C);this.clearMenu();this.drawMenu();if((11+A+D[1]+C.offsetHeight)-document.body.scrollTop>YAHOO.util.Dom.getViewportHeight()){D[1]-=C.offsetHeight;C.style.top=D[1]+"px";}if((D[0]+A+C.offsetWidth)-document.body.scrollLeft>YAHOO.util.Dom.getViewportWidth()){D[0]-=C.offsetWidth;C.style.left=D[0]+11+A+"px";}YAHOO.util.Event.addListener(document,"click",this.closeMenu,this,true);YAHOO.util.Event.addListener(window,"resize",this.closeMenu,this,true);YAHOO.util.Event.stopPropagation(E);this.adjustCoordinates();};perfUI.widgets.menu.prototype.itemMouseOver=function(){this.style.color="#6464FF";};perfUI.widgets.menu.prototype.itemMouseOut=function(){this.style.color="";};perfUI.widgets.hoverMenu=function(A,B){perfUI.widgets.hoverMenu.superclass.constructor.call(this,A,B);this.stopTimer=true;this.timerLength=1500;};YAHOO.extend(perfUI.widgets.hoverMenu,perfUI.widgets.menu);perfUI.widgets.hoverMenu.DDobjects={};perfUI.widgets.hoverMenu.prototype.render=function(){perfUI.widgets.hoverMenu.DDobjects[this.containerID]=this;YAHOO.util.Event.addListener(this.getContainer(),"mouseover",this.show,this,true);};perfUI.widgets.hoverMenu.prototype.show=function(A){if(!this.menuClosed){return;}this.attachListeners();this.getContainer().className="header_over";perfUI.widgets.hoverMenu.superclass.show.call(this,A);};perfUI.widgets.hoverMenu.prototype.attachListeners=function(){var A=this.getElement();var B=this.getContainer();YAHOO.util.Event.addListener(A,"mouseover",this.onmouseover,this,true);YAHOO.util.Event.addListener(B,"mouseover",this.onmouseover,this,true);YAHOO.util.Event.addListener(A,"mouseout",this.onmouseout,this,true);YAHOO.util.Event.addListener(B,"mouseout",this.onmouseout,this,true);};perfUI.widgets.hoverMenu.prototype.onmouseover=function(A){this.stopTimer=true;};perfUI.widgets.hoverMenu.prototype.onmouseout=function(B){var A=perfUI.widgets.hoverMenu.DDobjects[this.containerID];A.stopTimer=false;setTimeout("perfUI.widgets.hoverMenu.timer('"+this.containerID+"')",A.timerLength);};perfUI.widgets.hoverMenu.timer=function(A){var B=perfUI.widgets.hoverMenu.DDobjects[A];if(B&&!B.stopTimer){B.onTimerEnd();}};perfUI.widgets.hoverMenu.prototype.onTimerEnd=function(){this.onBeforeCloseMenu();if(!this.menuClosed){this.clearMenu();this.closeMenu();}};perfUI.widgets.hoverMenu.prototype.onBeforeCloseMenu=function(){this.getContainer().className="header_normal";};perfUI.widgets.headerMenu=function(A,B){var B=document.createElement("DIV");B.className="PH_header";perfUI.widgets.headerMenu.superclass.constructor.call(this,A,B);this.align="left";this.timerLength=0;this.minWidth=100;};YAHOO.extend(perfUI.widgets.headerMenu,perfUI.widgets.hoverMenu);perfUI.widgets.headerMenu.prototype.show=function(F){if(!this.menuClosed){return;}this.attachListeners();var A=this.getContainer();var C=this.getElement();A.className="PH_header_over";A.firstChild.className="PH_header_nested_over";this.menuClosed=false;C.style.visibility="hidden";A.parentNode.appendChild(C);this.clearMenu();this.drawMenu();var D=(document.all?C.offsetWidth:C.clientWidth+2)+10;if(D<this.minWidth){D=this.minWidth;}var E=(document.all?A.offsetWidth:A.clientWidth+2);if(D<E){D=E-(document.all?8:16);}for(var B=0;B<C.childNodes.length;B++){C.childNodes[B].style.width=D+"px";}this.drawBorder();C.style.visibility="visible";YAHOO.util.Event.stopPropagation(F);this.adjustCoordinates();};perfUI.widgets.headerMenu.prototype.drawBorder=function(){var Dom=YAHOO.util.Dom;var container=this.getContainer();var element=this.getElement();var containerRegion=YAHOO.util.Dom.getRegion(container);var IEoffset=(document.all?2:0);if(this.align=="left"){Dom.setStyle(element,"left",(containerRegion.left-IEoffset)+"px");Dom.setStyle(element,"top",(containerRegion.bottom-IEoffset)+"px");var elementRegion=YAHOO.util.Dom.getRegion(element);var div=document.createElement("DIV");div.className="PH_header_specialBorder";with(div.style){left=(containerRegion.right-containerRegion.left-1)+"px";top="-1px";width=(elementRegion.right-containerRegion.right)+"px";}}else{Dom.setStyle(element,"left",(containerRegion.right-(document.all?element.offsetWidth:element.clientWidth+2)-IEoffset)+"px");Dom.setStyle(element,"top",(containerRegion.bottom-IEoffset)+"px");var elementRegion=YAHOO.util.Dom.getRegion(element);var div=document.createElement("DIV");div.className="PH_header_specialBorder";with(div.style){left="-1px";top="-1px";width=(containerRegion.left-elementRegion.left)+"px";}}element.appendChild(div);};perfUI.widgets.headerMenu.prototype.addItem=function(B,C,A){this.menuItems.push({"text":"<div class='PH_headerMenu_img PH_headerMenu_img_"+B+"'></div><div class='PH_headerMenu_txt'>"+C+"</div><br clear=all>","className":"PH_headerMenu_row","onclick":{"fn":function(){top.location.href=A;},"obj":x,"scope":false}});};perfUI.widgets.headerMenu.prototype.addSeparator=function(){this.menuItems.push({"text":"<div></div>","className":"PH_headerMenu_row_break"});};perfUI.widgets.headerMenu.prototype.itemMouseOver=function(){if(this.className=="PH_headerMenu_row_break"){return;}this.className="PH_headerMenu_row_over";};perfUI.widgets.headerMenu.prototype.itemMouseOut=function(){if(this.className=="PH_headerMenu_row_break"){return;}this.className="PH_headerMenu_row";};perfUI.widgets.headerMenu.prototype.onBeforeCloseMenu=function(){var A=this.getContainer();A.className="PH_header_normal";A.firstChild.className="PH_header_nested";};YAHOO.util.Connect={_msxml_progid:["Microsoft.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:"application/x-www-form-urlencoded; charset=UTF-8",_default_form_header:"application/x-www-form-urlencoded",_use_default_xhr_header:true,_default_xhr_header:"XMLHttpRequest",_has_default_headers:true,_default_headers:{},_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,_submitElementValue:null,_hasSubmitListener:(function(){if(YAHOO.util.Event){YAHOO.util.Event.addListener(document,"click",function(D){var C=YAHOO.util.Event.getTarget(D);if(C.nodeName.toLowerCase()=="input"&&(C.type&&C.type.toLowerCase()=="submit")){YAHOO.util.Connect._submitElementValue=encodeURIComponent(C.name)+"="+encodeURIComponent(C.value);}});return true;}return false;})(),startEvent:new YAHOO.util.CustomEvent("start"),completeEvent:new YAHOO.util.CustomEvent("complete"),successEvent:new YAHOO.util.CustomEvent("success"),failureEvent:new YAHOO.util.CustomEvent("failure"),uploadEvent:new YAHOO.util.CustomEvent("upload"),abortEvent:new YAHOO.util.CustomEvent("abort"),_customEvents:{onStart:["startEvent","start"],onComplete:["completeEvent","complete"],onSuccess:["successEvent","success"],onFailure:["failureEvent","failure"],onUpload:["uploadEvent","upload"],onAbort:["abortEvent","abort"]},setProgId:function(B){this._msxml_progid.unshift(B);YAHOO.log("ActiveX Program Id  "+B+" added to _msxml_progid.","info","Connection");},setDefaultPostHeader:function(B){if(typeof B=="string"){this._default_post_header=B;YAHOO.log("Default POST header set to  "+B,"info","Connection");}else{if(typeof B=="boolean"){this._use_default_post_header=B;}}},setDefaultXhrHeader:function(B){if(typeof B=="string"){this._default_xhr_header=B;YAHOO.log("Default XHR header set to  "+B,"info","Connection");}else{this._use_default_xhr_header=B;}},setPollingInterval:function(B){if(typeof B=="number"&&isFinite(B)){this._polling_interval=B;YAHOO.log("Default polling interval set to "+B+"ms","info","Connection");}},createXhrObject:function(G){var H,F;try{F=new XMLHttpRequest();H={conn:F,tId:G};YAHOO.log("XHR object created for transaction "+G,"info","Connection");}catch(I){for(var J=0;J<this._msxml_progid.length;++J){try{F=new ActiveXObject(this._msxml_progid[J]);H={conn:F,tId:G};YAHOO.log("ActiveX XHR object created for transaction "+G,"info","Connection");break;}catch(I){}}}finally{return H;}},getConnectionObject:function(E){var G;var F=this._transaction_id;try{if(!E){G=this.createXhrObject(F);}else{G={};G.tId=F;G.isUpload=true;}if(G){this._transaction_id++;}}catch(H){}finally{return G;}},asyncRequest:function(H,K,I,G){var J=(this._isFileUpload)?this.getConnectionObject(true):this.getConnectionObject();var L=(I&&I.argument)?I.argument:null;if(!J){YAHOO.log("Unable to create connection object.","error","Connection");return null;}else{if(I&&I.customevents){this.initCustomEvents(J,I);}if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(J,I,K,G);return J;}if(H.toUpperCase()=="GET"){if(this._sFormData.length!==0){K+=((K.indexOf("?")==-1)?"?":"&")+this._sFormData;}}else{if(H.toUpperCase()=="POST"){G=G?this._sFormData+"&"+G:this._sFormData;}}}if(H.toUpperCase()=="GET"&&(I&&I.cache===false)){K+=((K.indexOf("?")==-1)?"?":"&")+"rnd="+new Date().valueOf().toString();}J.conn.open(H,K,true);if(this._use_default_xhr_header){if(!this._default_headers["X-Requested-With"]){this.initHeader("X-Requested-With",this._default_xhr_header,true);YAHOO.log("Initialize transaction header X-Request-Header to XMLHttpRequest.","info","Connection");}}if((H.toUpperCase()=="POST"&&this._use_default_post_header)&&this._isFormSubmit===false){this.initHeader("Content-Type",this._default_post_header);YAHOO.log("Initialize header Content-Type to application/x-www-form-urlencoded; UTF-8 for POST transaction.","info","Connection");}if(this._has_default_headers||this._has_http_headers){this.setHeader(J);}this.handleReadyState(J,I);J.conn.send(G||"");YAHOO.log("Transaction "+J.tId+" sent.","info","Connection");if(this._isFormSubmit===true){this.resetFormState();}this.startEvent.fire(J,L);if(J.startEvent){J.startEvent.fire(J,L);}return J;}},initCustomEvents:function(D,E){for(var F in E.customevents){if(this._customEvents[F][0]){D[this._customEvents[F][0]]=new YAHOO.util.CustomEvent(this._customEvents[F][1],(E.scope)?E.scope:null);YAHOO.log("Transaction-specific Custom Event "+D[this._customEvents[F][1]]+" created.","info","Connection");D[this._customEvents[F][0]].subscribe(E.customevents[F]);YAHOO.log("Transaction-specific Custom Event "+D[this._customEvents[F][1]]+" subscribed.","info","Connection");}}},handleReadyState:function(G,F){var H=this;var E=(F&&F.argument)?F.argument:null;if(F&&F.timeout){this._timeOut[G.tId]=window.setTimeout(function(){H.abort(G,F,true);},F.timeout);}this._poll[G.tId]=window.setInterval(function(){if(G.conn&&G.conn.readyState===4){window.clearInterval(H._poll[G.tId]);delete H._poll[G.tId];if(F&&F.timeout){window.clearTimeout(H._timeOut[G.tId]);delete H._timeOut[G.tId];}H.completeEvent.fire(G,E);if(G.completeEvent){G.completeEvent.fire(G,E);}H.handleTransactionResponse(G,F);}},this._polling_interval);},handleTransactionResponse:function(J,I,H){var L,M;var N=(I&&I.argument)?I.argument:null;try{if(J.conn.status!==undefined&&J.conn.status!==0){L=J.conn.status;}else{L=13030;}}catch(K){L=13030;}if(L>=200&&L<300||L===1223){M=this.createResponseObject(J,N);if(I&&I.success){if(!I.scope){I.success(M);YAHOO.log("Success callback. HTTP code is "+L,"info","Connection");}else{I.success.apply(I.scope,[M]);YAHOO.log("Success callback with scope. HTTP code is "+L,"info","Connection");}}this.successEvent.fire(M);if(J.successEvent){J.successEvent.fire(M);}}else{switch(L){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:M=this.createExceptionObject(J.tId,N,(H?H:false));if(I&&I.failure){if(!I.scope){I.failure(M);YAHOO.log("Failure callback. Exception detected. Status code is "+L,"warn","Connection");}else{I.failure.apply(I.scope,[M]);YAHOO.log("Failure callback with scope. Exception detected. Status code is "+L,"warn","Connection");}}break;default:M=this.createResponseObject(J,N);if(I&&I.failure){if(!I.scope){I.failure(M);YAHOO.log("Failure callback. HTTP status code is "+L,"warn","Connection");}else{I.failure.apply(I.scope,[M]);YAHOO.log("Failure callback with scope. HTTP status code is "+L,"warn","Connection");}}}this.failureEvent.fire(M);if(J.failureEvent){J.failureEvent.fire(M);}}this.releaseObject(J);M=null;},createResponseObject:function(M,P){var J={};var N={};try{var K=M.conn.getAllResponseHeaders();var Q=K.split("\n");for(var R=0;R<Q.length;R++){var L=Q[R].indexOf(":");if(L!=-1){N[Q[R].substring(0,L)]=Q[R].substring(L+2);}}}catch(O){}J.tId=M.tId;J.status=(M.conn.status==1223)?204:M.conn.status;J.statusText=(M.conn.status==1223)?"No Content":M.conn.statusText;J.getResponseHeader=N;J.getAllResponseHeaders=K;J.responseText=M.conn.responseText;J.responseXML=M.conn.responseXML;if(P){J.argument=P;}return J;},createExceptionObject:function(J,N,I){var L=0;var K="communication failure";var O=-1;var P="transaction aborted";var M={};M.tId=J;if(I){M.status=O;M.statusText=P;}else{M.status=L;M.statusText=K;}if(N){M.argument=N;}return M;},initHeader:function(E,F,G){var H=(G)?this._default_headers:this._http_headers;H[E]=F;if(G){this._has_default_headers=true;}else{this._has_http_headers=true;}},setHeader:function(C){if(this._has_default_headers){for(var D in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,D)){C.conn.setRequestHeader(D,this._default_headers[D]);YAHOO.log("Default HTTP header "+D+" set with value of "+this._default_headers[D],"info","Connection");}}}if(this._has_http_headers){for(var D in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,D)){C.conn.setRequestHeader(D,this._http_headers[D]);YAHOO.log("HTTP header "+D+" set with value of "+this._http_headers[D],"info","Connection");}}delete this._http_headers;this._http_headers={};this._has_http_headers=false;}},resetDefaultHeaders:function(){delete this._default_headers;this._default_headers={};this._has_default_headers=false;},setForm:function(R,X,O){this.resetFormState();var S;if(typeof R=="string"){S=(document.getElementById(R)||document.forms[R]);}else{if(typeof R=="object"){S=R;}else{YAHOO.log("Unable to create form object "+R,"warn","Connection");return;}}if(X){var W=this.createFrame((window.location.href.toLowerCase().indexOf("https")===0||O)?true:false);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=S;return;}var P,T,V,Q;var U=false;for(var M=0;M<S.elements.length;M++){P=S.elements[M];Q=P.disabled;T=P.name;V=P.value;if(!Q&&T){switch(P.type){case"select-one":case"select-multiple":for(var N=0;N<P.options.length;N++){if(P.options[N].selected){if(window.ActiveXObject){this._sFormData+=encodeURIComponent(T)+"="+encodeURIComponent(P.options[N].attributes["value"].specified?P.options[N].value:P.options[N].text)+"&";}else{this._sFormData+=encodeURIComponent(T)+"="+encodeURIComponent(P.options[N].hasAttribute("value")?P.options[N].value:P.options[N].text)+"&";}}}break;case"radio":case"checkbox":if(P.checked){this._sFormData+=encodeURIComponent(T)+"="+encodeURIComponent(V)+"&";}break;case"file":case undefined:case"reset":case"button":break;case"submit":if(U===false){if(this._hasSubmitListener&&this._submitElementValue){this._sFormData+=this._submitElementValue+"&";}else{this._sFormData+=encodeURIComponent(T)+"="+encodeURIComponent(V)+"&";}U=true;}break;default:this._sFormData+=encodeURIComponent(T)+"="+encodeURIComponent(V)+"&";}}}this._isFormSubmit=true;this._sFormData=this._sFormData.substr(0,this._sFormData.length-1);YAHOO.log("Form initialized for transaction. HTML form POST message is: "+this._sFormData,"info","Connection");this.initHeader("Content-Type",this._default_form_header);YAHOO.log("Initialize header Content-Type to application/x-www-form-urlencoded for setForm() transaction.","info","Connection");return this._sFormData;},resetFormState:function(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData="";},createFrame:function(D){var F="yuiIO"+this._transaction_id;var E;if(window.ActiveXObject){E=document.createElement('<iframe id="'+F+'" name="'+F+'" />');if(typeof D=="boolean"){E.src="javascript:false";}}else{E=document.createElement("iframe");E.id=F;E.name=F;}E.style.position="absolute";E.style.top="-1000px";E.style.left="-1000px";document.body.appendChild(E);YAHOO.log("File upload iframe created. Id is:"+F,"info","Connection");},appendPostData:function(F){var H=[];var J=F.split("&");for(var I=0;I<J.length;I++){var G=J[I].indexOf("=");if(G!=-1){H[I]=document.createElement("input");H[I].type="hidden";H[I].name=J[I].substring(0,G);H[I].value=J[I].substring(G+1);this._formNode.appendChild(H[I]);}}return H;},uploadFile:function(O,T,b,P){var S=this;var Y="yuiIO"+O.tId;var X="multipart/form-data";var V=document.getElementById(Y);var W=(T&&T.argument)?T.argument:null;var Q={action:this._formNode.getAttribute("action"),method:this._formNode.getAttribute("method"),target:this._formNode.getAttribute("target")};this._formNode.setAttribute("action",b);this._formNode.setAttribute("method","POST");this._formNode.setAttribute("target",Y);if(YAHOO.env.ua.ie){this._formNode.setAttribute("encoding",X);}else{this._formNode.setAttribute("enctype",X);}if(P){var U=this.appendPostData(P);}this._formNode.submit();this.startEvent.fire(O,W);if(O.startEvent){O.startEvent.fire(O,W);}if(T&&T.timeout){this._timeOut[O.tId]=window.setTimeout(function(){S.abort(O,T,true);},T.timeout);}if(U&&U.length>0){for(var Z=0;Z<U.length;Z++){this._formNode.removeChild(U[Z]);}}for(var R in Q){if(YAHOO.lang.hasOwnProperty(Q,R)){if(Q[R]){this._formNode.setAttribute(R,Q[R]);}else{this._formNode.removeAttribute(R);}}}this.resetFormState();var a=function(){if(T&&T.timeout){window.clearTimeout(S._timeOut[O.tId]);delete S._timeOut[O.tId];}S.completeEvent.fire(O,W);if(O.completeEvent){O.completeEvent.fire(O,W);}var A={};A.tId=O.tId;A.argument=T.argument;try{A.responseText=V.contentWindow.document.body?V.contentWindow.document.body.innerHTML:V.contentWindow.document.documentElement.textContent;A.responseXML=V.contentWindow.document.XMLDocument?V.contentWindow.document.XMLDocument:V.contentWindow.document;}catch(B){}if(T&&T.upload){if(!T.scope){T.upload(A);YAHOO.log("Upload callback.","info","Connection");}else{T.upload.apply(T.scope,[A]);YAHOO.log("Upload callback with scope.","info","Connection");}}S.uploadEvent.fire(A);if(O.uploadEvent){O.uploadEvent.fire(A);}YAHOO.util.Event.removeListener(V,"load",a);setTimeout(function(){document.body.removeChild(V);S.releaseObject(O);YAHOO.log("File upload iframe destroyed. Id is:"+Y,"info","Connection");},100);};YAHOO.util.Event.addListener(V,"load",a);},abort:function(K,I,H){var L;var N=(I&&I.argument)?I.argument:null;if(K&&K.conn){if(this.isCallInProgress(K)){K.conn.abort();window.clearInterval(this._poll[K.tId]);delete this._poll[K.tId];if(H){window.clearTimeout(this._timeOut[K.tId]);delete this._timeOut[K.tId];}L=true;}}else{if(K&&K.isUpload===true){var M="yuiIO"+K.tId;var J=document.getElementById(M);if(J){YAHOO.util.Event.removeListener(J,"load");document.body.removeChild(J);YAHOO.log("File upload iframe destroyed. Id is:"+M,"info","Connection");if(H){window.clearTimeout(this._timeOut[K.tId]);delete this._timeOut[K.tId];}L=true;}}else{L=false;}}if(L===true){this.abortEvent.fire(K,N);if(K.abortEvent){K.abortEvent.fire(K,N);}this.handleTransactionResponse(K,I,true);YAHOO.log("Transaction "+K.tId+" aborted.","info","Connection");}return L;},isCallInProgress:function(D){if(D&&D.conn){return D.conn.readyState!==4&&D.conn.readyState!==0;}else{if(D&&D.isUpload===true){var C="yuiIO"+D.tId;return document.getElementById(C)?true:false;}else{return false;}}},releaseObject:function(B){if(B&&B.conn){B.conn=null;YAHOO.log("Connection object for transaction "+B.tId+" destroyed.","info","Connection");B=null;}}};YAHOO.register("connection",YAHOO.util.Connect,{version:"2.5.2",build:"1076"});(function(){var D=YAHOO.util;var C=function(G,H,B,A){if(!G){}this.init(G,H,B,A);};C.NAME="Anim";C.prototype={toString:function(){var B=this.getEl()||{};var A=B.id||B.tagName;return(this.constructor.NAME+": "+A);},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(F,A,B){return this.method(this.currentFrame,A,B-A,this.totalFrames);},setAttribute:function(F,A,B){if(this.patterns.noNegatives.test(F)){A=(A>0)?A:0;}D.Dom.setStyle(this.getEl(),F,A+B);},getAttribute:function(L){var J=this.getEl();var B=D.Dom.getStyle(J,L);if(B!=="auto"&&!this.patterns.offsetUnit.test(B)){return parseFloat(B);}var K=this.patterns.offsetAttribute.exec(L)||[];var A=!!(K[3]);var I=!!(K[2]);if(I||(D.Dom.getStyle(J,"position")=="absolute"&&A)){B=J["offset"+K[0].charAt(0).toUpperCase()+K[0].substr(1)];}else{B=0;}return B;},getDefaultUnit:function(A){if(this.patterns.defaultUnit.test(A)){return"px";}return"";},setRuntimeAttribute:function(M){var A;var L;var K=this.attributes;this.runtimeAttributes[M]={};var B=function(E){return(typeof E!=="undefined");};if(!B(K[M]["to"])&&!B(K[M]["by"])){return false;}A=(B(K[M]["from"]))?K[M]["from"]:this.getAttribute(M);if(B(K[M]["to"])){L=K[M]["to"];}else{if(B(K[M]["by"])){if(A.constructor==Array){L=[];for(var J=0,N=A.length;J<N;++J){L[J]=A[J]+K[M]["by"][J]*1;}}else{L=A+K[M]["by"]*1;}}}this.runtimeAttributes[M].start=A;this.runtimeAttributes[M].end=L;this.runtimeAttributes[M].unit=(B(K[M].unit))?K[M]["unit"]:this.getDefaultUnit(M);return true;},init:function(T,O,P,B){var A=false;var S=null;var Q=0;T=D.Dom.get(T);this.attributes=O||{};this.duration=!YAHOO.lang.isUndefined(P)?P:1;this.method=B||D.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=D.AnimMgr.fps;this.setEl=function(E){T=D.Dom.get(E);};this.getEl=function(){return T;};this.isAnimated=function(){return A;};this.getStartTime=function(){return S;};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false;}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(D.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1;}D.AnimMgr.registerElement(this);return true;};this.stop=function(E){if(!this.isAnimated()){return false;}if(E){this.currentFrame=this.totalFrames;this._onTween.fire();}D.AnimMgr.stop(this);};var M=function(){this.onStart.fire();this.runtimeAttributes={};for(var E in this.attributes){this.setRuntimeAttribute(E);}A=true;Q=0;S=new Date();};var N=function(){var E={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};E.toString=function(){return("duration: "+E.duration+", currentFrame: "+E.currentFrame);};this.onTween.fire(E);var F=this.runtimeAttributes;for(var G in F){this.setAttribute(G,this.doMethod(G,F[G].start,F[G].end),F[G].unit);}Q+=1;};var R=function(){var F=(new Date()-S)/1000;var E={duration:F,frames:Q,fps:Q/F};E.toString=function(){return("duration: "+E.duration+", frames: "+E.frames+", fps: "+E.fps);};A=false;Q=0;this.onComplete.fire(E);};this._onStart=new D.CustomEvent("_start",this,true);this.onStart=new D.CustomEvent("start",this);this.onTween=new D.CustomEvent("tween",this);this._onTween=new D.CustomEvent("_tween",this,true);this.onComplete=new D.CustomEvent("complete",this);this._onComplete=new D.CustomEvent("_complete",this,true);this._onStart.subscribe(M);this._onTween.subscribe(N);this._onComplete.subscribe(R);}};D.Anim=C;})();YAHOO.util.AnimMgr=new function(){var I=null;var J=[];var F=0;this.fps=1000;this.delay=1;this.registerElement=function(A){J[J.length]=A;F+=1;A._onStart.fire();this.start();};this.unRegister=function(A,B){B=B||G(A);if(!A.isAnimated()||B==-1){return false;}A._onComplete.fire();J.splice(B,1);F-=1;if(F<=0){this.stop();}return true;};this.start=function(){if(I===null){I=setInterval(this.run,this.delay);}};this.stop=function(A){if(!A){clearInterval(I);for(var B=0,C=J.length;B<C;++B){this.unRegister(J[0],0);}J=[];I=null;F=0;}else{this.unRegister(A);}};this.run=function(){for(var A=0,C=J.length;A<C;++A){var B=J[A];if(!B||!B.isAnimated()){continue;}if(B.currentFrame<B.totalFrames||B.totalFrames===null){B.currentFrame+=1;if(B.useSeconds){H(B);}B._onTween.fire();}else{YAHOO.util.AnimMgr.stop(B,A);}}};var G=function(A){for(var B=0,C=J.length;B<C;++B){if(J[B]==A){return B;}}return -1;};var H=function(E){var B=E.totalFrames;var C=E.currentFrame;var D=(E.currentFrame*E.duration*1000/E.totalFrames);var L=(new Date()-E.getStartTime());var A=0;if(L<E.duration*1000){A=Math.round((L/D-1)*E.currentFrame);}else{A=B-(C+1);}if(A>0&&isFinite(A)){if(E.currentFrame+A>=B){A=B-(C+1);}E.currentFrame+=A;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(I,J){var H=I.length;var K=[];for(var L=0;L<H;++L){K[L]=[I[L][0],I[L][1]];}for(var G=1;G<H;++G){for(L=0;L<H-G;++L){K[L][0]=(1-J)*K[L][0]+J*K[parseInt(L+1,10)][0];K[L][1]=(1-J)*K[L][1]+J*K[parseInt(L+1,10)][1];}}return[K[0][0],K[0][1]];};};(function(){var E=function(C,D,B,A){E.superclass.constructor.call(this,C,D,B,A);};E.NAME="ColorAnim";var G=YAHOO.util;YAHOO.extend(E,G.Anim);var F=E.superclass;var H=E.prototype;H.patterns.color=/color$/i;H.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;H.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;H.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;H.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;H.parseColor=function(B){if(B.length==3){return B;}var A=this.patterns.hex.exec(B);if(A&&A.length==4){return[parseInt(A[1],16),parseInt(A[2],16),parseInt(A[3],16)];}A=this.patterns.rgb.exec(B);if(A&&A.length==4){return[parseInt(A[1],10),parseInt(A[2],10),parseInt(A[3],10)];}A=this.patterns.hex3.exec(B);if(A&&A.length==4){return[parseInt(A[1]+A[1],16),parseInt(A[2]+A[2],16),parseInt(A[3]+A[3],16)];}return null;};H.getAttribute=function(D){var B=this.getEl();if(this.patterns.color.test(D)){var A=YAHOO.util.Dom.getStyle(B,D);if(this.patterns.transparent.test(A)){var C=B.parentNode;A=G.Dom.getStyle(C,D);while(C&&this.patterns.transparent.test(A)){C=C.parentNode;A=G.Dom.getStyle(C,D);if(C.tagName.toUpperCase()=="HTML"){A="#fff";}}}}else{A=F.getAttribute.call(this,D);}return A;};H.doMethod=function(K,A,D){var B;if(this.patterns.color.test(K)){B=[];for(var C=0,L=A.length;C<L;++C){B[C]=F.doMethod.call(this,K,A[C],D[C]);}B="rgb("+Math.floor(B[0])+","+Math.floor(B[1])+","+Math.floor(B[2])+")";}else{B=F.doMethod.call(this,K,A,D);}return B;};H.setRuntimeAttribute=function(K){F.setRuntimeAttribute.call(this,K);if(this.patterns.color.test(K)){var C=this.attributes;var A=this.parseColor(this.runtimeAttributes[K].start);var D=this.parseColor(this.runtimeAttributes[K].end);if(typeof C[K]["to"]==="undefined"&&typeof C[K]["by"]!=="undefined"){D=this.parseColor(C[K].by);for(var B=0,L=A.length;B<L;++B){D[B]=A[B]+D[B];}}this.runtimeAttributes[K].start=A;this.runtimeAttributes[K].end=D;}};G.ColorAnim=E;})();YAHOO.util.Easing={easeNone:function(H,E,F,G){return F*H/G+E;},easeIn:function(H,E,F,G){return F*(H/=G)*H+E;},easeOut:function(H,E,F,G){return -F*(H/=G)*(H-2)+E;},easeBoth:function(H,E,F,G){if((H/=G/2)<1){return F/2*H*H+E;}return -F/2*((--H)*(H-2)-1)+E;},easeInStrong:function(H,E,F,G){return F*(H/=G)*H*H*H+E;},easeOutStrong:function(H,E,F,G){return -F*((H=H/G-1)*H*H*H-1)+E;},easeBothStrong:function(H,E,F,G){if((H/=G/2)<1){return F/2*H*H*H*H+E;}return -F/2*((H-=2)*H*H*H-2)+E;},elasticIn:function(M,H,I,J,N,K){if(M==0){return H;}if((M/=J)==1){return H+I;}if(!K){K=J*0.3;}if(!N||N<Math.abs(I)){N=I;var L=K/4;}else{var L=K/(2*Math.PI)*Math.asin(I/N);}return -(N*Math.pow(2,10*(M-=1))*Math.sin((M*J-L)*(2*Math.PI)/K))+H;},elasticOut:function(M,H,I,J,N,K){if(M==0){return H;}if((M/=J)==1){return H+I;}if(!K){K=J*0.3;}if(!N||N<Math.abs(I)){N=I;var L=K/4;}else{var L=K/(2*Math.PI)*Math.asin(I/N);}return N*Math.pow(2,-10*M)*Math.sin((M*J-L)*(2*Math.PI)/K)+I+H;},elasticBoth:function(M,H,I,J,N,K){if(M==0){return H;}if((M/=J/2)==2){return H+I;}if(!K){K=J*(0.3*1.5);}if(!N||N<Math.abs(I)){N=I;var L=K/4;}else{var L=K/(2*Math.PI)*Math.asin(I/N);}if(M<1){return -0.5*(N*Math.pow(2,10*(M-=1))*Math.sin((M*J-L)*(2*Math.PI)/K))+H;}return N*Math.pow(2,-10*(M-=1))*Math.sin((M*J-L)*(2*Math.PI)/K)*0.5+I+H;},backIn:function(J,F,G,H,I){if(typeof I=="undefined"){I=1.70158;}return G*(J/=H)*J*((I+1)*J-I)+F;},backOut:function(J,F,G,H,I){if(typeof I=="undefined"){I=1.70158;}return G*((J=J/H-1)*J*((I+1)*J+I)+1)+F;},backBoth:function(J,F,G,H,I){if(typeof I=="undefined"){I=1.70158;}if((J/=H/2)<1){return G/2*(J*J*(((I*=(1.525))+1)*J-I))+F;}return G/2*((J-=2)*J*(((I*=(1.525))+1)*J+I)+2)+F;},bounceIn:function(H,E,F,G){return F-YAHOO.util.Easing.bounceOut(G-H,0,F,G)+E;},bounceOut:function(H,E,F,G){if((H/=G)<(1/2.75)){return F*(7.5625*H*H)+E;}else{if(H<(2/2.75)){return F*(7.5625*(H-=(1.5/2.75))*H+0.75)+E;}else{if(H<(2.5/2.75)){return F*(7.5625*(H-=(2.25/2.75))*H+0.9375)+E;}}}return F*(7.5625*(H-=(2.625/2.75))*H+0.984375)+E;},bounceBoth:function(H,E,F,G){if(H<G/2){return YAHOO.util.Easing.bounceIn(H*2,0,F,G)*0.5+E;}return YAHOO.util.Easing.bounceOut(H*2-G,0,F,G)*0.5+F*0.5+E;}};(function(){var G=function(C,D,B,A){if(C){G.superclass.constructor.call(this,C,D,B,A);}};G.NAME="Motion";var I=YAHOO.util;YAHOO.extend(G,I.ColorAnim);var H=G.superclass;var K=G.prototype;K.patterns.points=/^points$/i;K.setAttribute=function(C,A,B){if(this.patterns.points.test(C)){B=B||"px";H.setAttribute.call(this,"left",A[0],B);H.setAttribute.call(this,"top",A[1],B);}else{H.setAttribute.call(this,C,A,B);}};K.getAttribute=function(B){if(this.patterns.points.test(B)){var A=[H.getAttribute.call(this,"left"),H.getAttribute.call(this,"top")];}else{A=H.getAttribute.call(this,B);}return A;};K.doMethod=function(E,A,D){var B=null;if(this.patterns.points.test(E)){var C=this.method(this.currentFrame,0,100,this.totalFrames)/100;B=I.Bezier.getPosition(this.runtimeAttributes[E],C);}else{B=H.doMethod.call(this,E,A,D);}return B;};K.setRuntimeAttribute=function(A){if(this.patterns.points.test(A)){var S=this.getEl();var Q=this.attributes;var T;var E=Q["points"]["control"]||[];var R;var D,B;if(E.length>0&&!(E[0]instanceof Array)){E=[E];}else{var F=[];for(D=0,B=E.length;D<B;++D){F[D]=E[D];}E=F;}if(I.Dom.getStyle(S,"position")=="static"){I.Dom.setStyle(S,"position","relative");}if(J(Q["points"]["from"])){I.Dom.setXY(S,Q["points"]["from"]);}else{I.Dom.setXY(S,I.Dom.getXY(S));}T=this.getAttribute("points");if(J(Q["points"]["to"])){R=L.call(this,Q["points"]["to"],T);var C=I.Dom.getXY(this.getEl());for(D=0,B=E.length;D<B;++D){E[D]=L.call(this,E[D],T);}}else{if(J(Q["points"]["by"])){R=[T[0]+Q["points"]["by"][0],T[1]+Q["points"]["by"][1]];for(D=0,B=E.length;D<B;++D){E[D]=[T[0]+E[D][0],T[1]+E[D][1]];}}}this.runtimeAttributes[A]=[T];if(E.length>0){this.runtimeAttributes[A]=this.runtimeAttributes[A].concat(E);}this.runtimeAttributes[A][this.runtimeAttributes[A].length]=R;}else{H.setRuntimeAttribute.call(this,A);}};var L=function(C,A){var B=I.Dom.getXY(this.getEl());C=[C[0]-B[0]+A[0],C[1]-B[1]+A[1]];return C;};var J=function(A){return(typeof A!=="undefined");};I.Motion=G;})();(function(){var F=function(C,D,B,A){if(C){F.superclass.constructor.call(this,C,D,B,A);}};F.NAME="Scroll";var H=YAHOO.util;YAHOO.extend(F,H.ColorAnim);var G=F.superclass;var E=F.prototype;E.doMethod=function(D,A,C){var B=null;if(D=="scroll"){B=[this.method(this.currentFrame,A[0],C[0]-A[0],this.totalFrames),this.method(this.currentFrame,A[1],C[1]-A[1],this.totalFrames)];}else{B=G.doMethod.call(this,D,A,C);}return B;};E.getAttribute=function(C){var A=null;var B=this.getEl();if(C=="scroll"){A=[B.scrollLeft,B.scrollTop];}else{A=G.getAttribute.call(this,C);}return A;};E.setAttribute=function(D,A,B){var C=this.getEl();if(D=="scroll"){C.scrollLeft=A[0];C.scrollTop=A[1];}else{G.setAttribute.call(this,D,A,B);}};H.Scroll=F;})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.5.2",build:"1076"});(function(){var lang=YAHOO.lang,util=YAHOO.util,Ev=util.Event;util.DataSourceBase=function(oLiveData,oConfigs){if(oLiveData===null||oLiveData===undefined){return;}this.liveData=oLiveData;this._oQueue={interval:null,conn:null,requests:[]};this.responseSchema={};if(oConfigs&&(oConfigs.constructor==Object)){for(var sConfig in oConfigs){if(sConfig){this[sConfig]=oConfigs[sConfig];}}}var maxCacheEntries=this.maxCacheEntries;if(!lang.isNumber(maxCacheEntries)||(maxCacheEntries<0)){maxCacheEntries=0;}this._aIntervals=[];this.createEvent("cacheRequestEvent");this.createEvent("cacheResponseEvent");this.createEvent("requestEvent");this.createEvent("responseEvent");this.createEvent("responseParseEvent");this.createEvent("responseCacheEvent");this.createEvent("dataErrorEvent");this.createEvent("cacheFlushEvent");var DS=util.DataSourceBase;this._sName="DataSource instance"+DS._nIndex;DS._nIndex++;};var DS=util.DataSourceBase;lang.augmentObject(DS,{TYPE_UNKNOWN:-1,TYPE_JSARRAY:0,TYPE_JSFUNCTION:1,TYPE_XHR:2,TYPE_JSON:3,TYPE_XML:4,TYPE_TEXT:5,TYPE_HTMLTABLE:6,TYPE_SCRIPTNODE:7,TYPE_LOCAL:8,ERROR_DATAINVALID:"Invalid data",ERROR_DATANULL:"Null data",_nIndex:0,_nTransactionId:0,issueCallback:function(callback,params,error,scope){if(lang.isFunction(callback)){callback.apply(scope,params);}else{if(lang.isObject(callback)){scope=callback.scope||scope||window;var callbackFunc=callback.success;if(error){callbackFunc=callback.failure;}if(callbackFunc){callbackFunc.apply(scope,params.concat([callback.argument]));}}}},parseString:function(oData){if(!lang.isValue(oData)){return null;}var string=oData+"";if(lang.isString(string)){return string;}else{return null;}},parseNumber:function(oData){var number=oData*1;if(lang.isNumber(number)){return number;}else{return null;}},convertNumber:function(oData){return DS.parseNumber(oData);},parseDate:function(oData){var date=null;if(!(oData instanceof Date)){date=new Date(oData);}else{return oData;}if(date instanceof Date){return date;}else{return null;}},convertDate:function(oData){return DS.parseDate(oData);}});DS.Parser={string:DS.parseString,number:DS.parseNumber,date:DS.parseDate};DS.prototype={_sName:null,_aCache:null,_oQueue:null,_aIntervals:null,maxCacheEntries:0,liveData:null,dataType:DS.TYPE_UNKNOWN,responseType:DS.TYPE_UNKNOWN,responseSchema:null,toString:function(){return this._sName;},getCachedResponse:function(oRequest,oCallback,oCaller){var aCache=this._aCache;if(this.maxCacheEntries>0){if(!aCache){this._aCache=[];}else{var nCacheLength=aCache.length;if(nCacheLength>0){var oResponse=null;this.fireEvent("cacheRequestEvent",{request:oRequest,callback:oCallback,caller:oCaller});for(var i=nCacheLength-1;i>=0;i--){var oCacheElem=aCache[i];if(this.isCacheHit(oRequest,oCacheElem.request)){oResponse=oCacheElem.response;this.fireEvent("cacheResponseEvent",{request:oRequest,response:oResponse,callback:oCallback,caller:oCaller});if(i<nCacheLength-1){aCache.splice(i,1);this.addToCache(oRequest,oResponse);}oResponse.cached=true;break;}}return oResponse;}}}else{if(aCache){this._aCache=null;}}return null;},isCacheHit:function(oRequest,oCachedRequest){return(oRequest===oCachedRequest);},addToCache:function(oRequest,oResponse){var aCache=this._aCache;if(!aCache){return;}while(aCache.length>=this.maxCacheEntries){aCache.shift();}var oCacheElem={request:oRequest,response:oResponse};aCache[aCache.length]=oCacheElem;this.fireEvent("responseCacheEvent",{request:oRequest,response:oResponse});},flushCache:function(){if(this._aCache){this._aCache=[];this.fireEvent("cacheFlushEvent");}},setInterval:function(nMsec,oRequest,oCallback,oCaller){if(lang.isNumber(nMsec)&&(nMsec>=0)){var oSelf=this;var nId=setInterval(function(){oSelf.makeConnection(oRequest,oCallback,oCaller);},nMsec);this._aIntervals.push(nId);return nId;}else{}},clearInterval:function(nId){var tracker=this._aIntervals||[];for(var i=tracker.length-1;i>-1;i--){if(tracker[i]===nId){tracker.splice(i,1);clearInterval(nId);}}},clearAllIntervals:function(){var tracker=this._aIntervals||[];for(var i=tracker.length-1;i>-1;i--){clearInterval(tracker[i]);}tracker=[];},sendRequest:function(oRequest,oCallback,oCaller){var oCachedResponse=this.getCachedResponse(oRequest,oCallback,oCaller);if(oCachedResponse){DS.issueCallback(oCallback,[oRequest,oCachedResponse],false,oCaller);return null;}return this.makeConnection(oRequest,oCallback,oCaller);},makeConnection:function(oRequest,oCallback,oCaller){var tId=DS._nTransactionId++;this.fireEvent("requestEvent",{tId:tId,request:oRequest,callback:oCallback,caller:oCaller});var oRawResponse=this.liveData;this.handleResponse(oRequest,oRawResponse,oCallback,oCaller,tId);return tId;},handleResponse:function(oRequest,oRawResponse,oCallback,oCaller,tId){this.fireEvent("responseEvent",{tId:tId,request:oRequest,response:oRawResponse,callback:oCallback,caller:oCaller});var xhr=(this.dataType==DS.TYPE_XHR)?true:false;var oParsedResponse=null;var oFullResponse=oRawResponse;if(this.responseType===DS.TYPE_UNKNOWN){var ctype=(oRawResponse&&oRawResponse.getResponseHeader)?oRawResponse.getResponseHeader["Content-Type"]:null;if(ctype){if(ctype.indexOf("text/xml")>-1){this.responseType=DS.TYPE_XML;}else{if(ctype.indexOf("application/json")>-1){this.responseType=DS.TYPE_JSON;}else{if(ctype.indexOf("text/plain")>-1){this.responseType=DS.TYPE_TEXT;}}}}else{if(YAHOO.lang.isArray(oRawResponse)){this.responseType=DS.TYPE_JSARRAY;}else{if(oRawResponse&&oRawResponse.nodeType&&oRawResponse.nodeType==9){this.responseType=DS.TYPE_XML;}else{if(oRawResponse&&oRawResponse.nodeName&&(oRawResponse.nodeName.toLowerCase()=="table")){this.responseType=DS.TYPE_HTMLTABLE;}else{if(YAHOO.lang.isObject(oRawResponse)){this.responseType=DS.TYPE_JSON;}else{if(YAHOO.lang.isString(oRawResponse)){this.responseType=DS.TYPE_TEXT;}}}}}}}switch(this.responseType){case DS.TYPE_JSARRAY:if(xhr&&oRawResponse&&oRawResponse.responseText){oFullResponse=oRawResponse.responseText;}oFullResponse=this.doBeforeParseData(oRequest,oFullResponse,oCallback);oParsedResponse=this.parseArrayData(oRequest,oFullResponse);break;case DS.TYPE_JSON:if(xhr&&oRawResponse&&oRawResponse.responseText){oFullResponse=oRawResponse.responseText;}try{if(lang.isString(oFullResponse)){if(lang.JSON){oFullResponse=lang.JSON.parse(oFullResponse);}else{if(window.JSON&&JSON.parse){oFullResponse=JSON.parse(oFullResponse);}else{if(oFullResponse.parseJSON){oFullResponse=oFullResponse.parseJSON();}else{while(oFullResponse.length>0&&(oFullResponse.charAt(0)!="{")&&(oFullResponse.charAt(0)!="[")){oFullResponse=oFullResponse.substring(1,oFullResponse.length);}if(oFullResponse.length>0){var objEnd=Math.max(oFullResponse.lastIndexOf("]"),oFullResponse.lastIndexOf("}"));oFullResponse=oFullResponse.substring(0,objEnd+1);oFullResponse=eval("("+oFullResponse+")");}}}}}}catch(e){}oFullResponse=this.doBeforeParseData(oRequest,oFullResponse,oCallback);oParsedResponse=this.parseJSONData(oRequest,oFullResponse);break;case DS.TYPE_HTMLTABLE:if(xhr&&oRawResponse.responseText){oFullResponse=oRawResponse.responseText;}oFullResponse=this.doBeforeParseData(oRequest,oFullResponse,oCallback);oParsedResponse=this.parseHTMLTableData(oRequest,oFullResponse);break;case DS.TYPE_XML:if(xhr&&oRawResponse.responseXML){oFullResponse=oRawResponse.responseXML;}oFullResponse=this.doBeforeParseData(oRequest,oFullResponse,oCallback);oParsedResponse=this.parseXMLData(oRequest,oFullResponse);break;case DS.TYPE_TEXT:if(xhr&&lang.isString(oRawResponse.responseText)){oFullResponse=oRawResponse.responseText;}oFullResponse=this.doBeforeParseData(oRequest,oFullResponse,oCallback);oParsedResponse=this.parseTextData(oRequest,oFullResponse);break;default:oFullResponse=this.doBeforeParseData(oRequest,oFullResponse,oCallback);oParsedResponse=this.parseData(oRequest,oFullResponse);break;}oParsedResponse=oParsedResponse||{};if(!oParsedResponse.results){oParsedResponse.results=[];}if(!oParsedResponse.meta){oParsedResponse.meta={};}if(oParsedResponse&&!oParsedResponse.error){oParsedResponse=this.doBeforeCallback(oRequest,oFullResponse,oParsedResponse,oCallback);this.fireEvent("responseParseEvent",{request:oRequest,response:oParsedResponse,callback:oCallback,caller:oCaller});this.addToCache(oRequest,oParsedResponse);}else{oParsedResponse.error=true;this.fireEvent("dataErrorEvent",{request:oRequest,response:oRawResponse,callback:oCallback,caller:oCaller,message:DS.ERROR_DATANULL});}oParsedResponse.tId=tId;DS.issueCallback(oCallback,[oRequest,oParsedResponse],oParsedResponse.error,oCaller);},doBeforeParseData:function(oRequest,oFullResponse,oCallback){return oFullResponse;},doBeforeCallback:function(oRequest,oFullResponse,oParsedResponse,oCallback){return oParsedResponse;},parseData:function(oRequest,oFullResponse){if(lang.isValue(oFullResponse)){var oParsedResponse={results:oFullResponse,meta:{}};return oParsedResponse;}return null;},parseArrayData:function(oRequest,oFullResponse){if(lang.isArray(oFullResponse)){var results=[],i,j,rec,field,data;if(lang.isArray(this.responseSchema.fields)){var fields=this.responseSchema.fields;for(i=fields.length-1;i>=0;--i){if(typeof fields[i]!=="object"){fields[i]={key:fields[i]};}}var parsers={},p;for(i=fields.length-1;i>=0;--i){p=(typeof fields[i].parser==="function"?fields[i].parser:DS.Parser[fields[i].parser+""])||fields[i].converter;if(p){parsers[fields[i].key]=p;}}var arrType=lang.isArray(oFullResponse[0]);for(i=oFullResponse.length-1;i>-1;i--){var oResult={};rec=oFullResponse[i];if(typeof rec==="object"){for(j=fields.length-1;j>-1;j--){field=fields[j];data=arrType?rec[j]:rec[field.key];if(parsers[field.key]){data=parsers[field.key].call(this,data);}if(data===undefined){data=null;}oResult[field.key]=data;}}else{if(lang.isString(rec)){for(j=fields.length-1;j>-1;j--){field=fields[j];data=rec;if(parsers[field.key]){data=parsers[field.key].call(this,data);}if(data===undefined){data=null;}oResult[field.key]=data;}}}results[i]=oResult;}}else{results=oFullResponse;}var oParsedResponse={results:results};return oParsedResponse;}return null;},parseTextData:function(oRequest,oFullResponse){if(lang.isString(oFullResponse)){if(lang.isString(this.responseSchema.recordDelim)&&lang.isString(this.responseSchema.fieldDelim)){var oParsedResponse={results:[]};var recDelim=this.responseSchema.recordDelim;var fieldDelim=this.responseSchema.fieldDelim;if(oFullResponse.length>0){var newLength=oFullResponse.length-recDelim.length;if(oFullResponse.substr(newLength)==recDelim){oFullResponse=oFullResponse.substr(0,newLength);}if(oFullResponse.length>0){var recordsarray=oFullResponse.split(recDelim);for(var i=0,len=recordsarray.length,recIdx=0;i<len;++i){var bError=false,sRecord=recordsarray[i];if(lang.isString(sRecord)&&(sRecord.length>0)){var fielddataarray=recordsarray[i].split(fieldDelim);var oResult={};if(lang.isArray(this.responseSchema.fields)){var fields=this.responseSchema.fields;for(var j=fields.length-1;j>-1;j--){try{var data=fielddataarray[j];if(lang.isString(data)){if(data.charAt(0)=='"'){data=data.substr(1);}if(data.charAt(data.length-1)=='"'){data=data.substr(0,data.length-1);}var field=fields[j];var key=(lang.isValue(field.key))?field.key:field;if(!field.parser&&field.converter){field.parser=field.converter;}var parser=(typeof field.parser==="function")?field.parser:DS.Parser[field.parser+""];if(parser){data=parser.call(this,data);}if(data===undefined){data=null;}oResult[key]=data;}else{bError=true;}}catch(e){bError=true;}}}else{oResult=fielddataarray;}if(!bError){oParsedResponse.results[recIdx++]=oResult;}}}}}return oParsedResponse;}}return null;},parseXMLResult:function(result){var oResult={},schema=this.responseSchema;try{for(var m=schema.fields.length-1;m>=0;m--){var field=schema.fields[m];var key=(lang.isValue(field.key))?field.key:field;var data=null;var xmlAttr=result.attributes.getNamedItem(key);if(xmlAttr){data=xmlAttr.value;}else{var xmlNode=result.getElementsByTagName(key);if(xmlNode&&xmlNode.item(0)&&xmlNode.item(0)){data=xmlNode.item(0).firstChild.nodeValue;var item=xmlNode.item(0);data=(item.text)?item.text:(item.textContent)?item.textContent:null;if(!data){var datapieces=[];for(var j=0,len=item.childNodes.length;j<len;j++){if(item.childNodes[j].nodeValue){datapieces[datapieces.length]=item.childNodes[j].nodeValue;}}if(datapieces.length>0){data=datapieces.join("");}}}}if(data===null){data="";}if(!field.parser&&field.converter){field.parser=field.converter;}var parser=(typeof field.parser==="function")?field.parser:DS.Parser[field.parser+""];if(parser){data=parser.call(this,data);}if(data===undefined){data=null;}oResult[key]=data;}}catch(e){}return oResult;},parseXMLData:function(oRequest,oFullResponse){var bError=false,schema=this.responseSchema,oParsedResponse={meta:{}},xmlList=null,metaNode=schema.metaNode,metaLocators=schema.metaFields||{},i,k,loc,v;try{xmlList=(schema.resultNode)?oFullResponse.getElementsByTagName(schema.resultNode):null;metaNode=metaNode?oFullResponse.getElementsByTagName(metaNode)[0]:oFullResponse;if(metaNode){for(k in metaLocators){if(lang.hasOwnProperty(metaLocators,k)){loc=metaLocators[k];v=metaNode.getElementsByTagName(loc)[0];if(v){v=v.firstChild.nodeValue;}else{v=metaNode.attributes.getNamedItem(loc);if(v){v=v.value;}}if(lang.isValue(v)){oParsedResponse.meta[k]=v;}}}}}catch(e){}if(!xmlList||!lang.isArray(schema.fields)){bError=true;}else{oParsedResponse.results=[];for(i=xmlList.length-1;i>=0;--i){var oResult=this.parseXMLResult(xmlList.item(i));oParsedResponse.results[i]=oResult;}}if(bError){oParsedResponse.error=true;}else{}return oParsedResponse;},parseJSONData:function(oRequest,oFullResponse){var oParsedResponse={results:[],meta:{}};if(lang.isObject(oFullResponse)&&this.responseSchema.resultsList){var schema=this.responseSchema,fields=schema.fields,resultsList=oFullResponse,results=[],metaFields=schema.metaFields||{},fieldParsers=[],fieldPaths=[],simpleFields=[],bError=false,i,len,j,v,key,parser,path;var buildPath=function(needle){var path=null,keys=[],i=0;if(needle){needle=needle.replace(/\[(['"])(.*?)\1\]/g,function(x,$1,$2){keys[i]=$2;return".@"+(i++);}).replace(/\[(\d+)\]/g,function(x,$1){keys[i]=parseInt($1,10)|0;return".@"+(i++);}).replace(/^\./,"");if(!/[^\w\.\$@]/.test(needle)){path=needle.split(".");for(i=path.length-1;i>=0;--i){if(path[i].charAt(0)==="@"){path[i]=keys[parseInt(path[i].substr(1),10)];}}}else{}}return path;};var walkPath=function(path,origin){var v=origin,i=0,len=path.length;for(;i<len&&v;++i){v=v[path[i]];}return v;};path=buildPath(schema.resultsList);if(path){resultsList=walkPath(path,oFullResponse);if(resultsList===undefined){bError=true;}}else{bError=true;}if(!resultsList){resultsList=[];}if(!lang.isArray(resultsList)){resultsList=[resultsList];}if(!bError){if(schema.fields){var field;for(i=0,len=fields.length;i<len;i++){field=fields[i];key=field.key||field;parser=((typeof field.parser==="function")?field.parser:DS.Parser[field.parser+""])||field.converter;path=buildPath(key);if(parser){fieldParsers[fieldParsers.length]={key:key,parser:parser};}if(path){if(path.length>1){fieldPaths[fieldPaths.length]={key:key,path:path};}else{simpleFields[simpleFields.length]={key:key,path:path[0]};}}else{}}for(i=resultsList.length-1;i>=0;--i){var r=resultsList[i],rec={};for(j=simpleFields.length-1;j>=0;--j){rec[simpleFields[j].key]=(r[simpleFields[j].path]!==undefined)?r[simpleFields[j].path]:r[j];}for(j=fieldPaths.length-1;j>=0;--j){rec[fieldPaths[j].key]=walkPath(fieldPaths[j].path,r);}for(j=fieldParsers.length-1;j>=0;--j){var p=fieldParsers[j].key;rec[p]=fieldParsers[j].parser(rec[p]);if(rec[p]===undefined){rec[p]=null;}}results[i]=rec;}}else{results=resultsList;}for(key in metaFields){if(lang.hasOwnProperty(metaFields,key)){path=buildPath(metaFields[key]);if(path){v=walkPath(path,oFullResponse);oParsedResponse.meta[key]=v;}}}}else{oParsedResponse.error=true;}oParsedResponse.results=results;}else{oParsedResponse.error=true;}return oParsedResponse;},parseHTMLTableData:function(oRequest,oFullResponse){var bError=false;var elTable=oFullResponse;var fields=this.responseSchema.fields;var oParsedResponse={results:[]};for(var i=0;i<elTable.tBodies.length;i++){var elTbody=elTable.tBodies[i];for(var j=elTbody.rows.length-1;j>-1;j--){var elRow=elTbody.rows[j];var oResult={};for(var k=fields.length-1;k>-1;k--){var field=fields[k];var key=(lang.isValue(field.key))?field.key:field;var data=elRow.cells[k].innerHTML;if(!field.parser&&field.converter){field.parser=field.converter;}var parser=(typeof field.parser==="function")?field.parser:DS.Parser[field.parser+""];if(parser){data=parser.call(this,data);}if(data===undefined){data=null;}oResult[key]=data;}oParsedResponse.results[j]=oResult;}}if(bError){oParsedResponse.error=true;}else{}return oParsedResponse;}};lang.augmentProto(DS,util.EventProvider);util.LocalDataSource=function(oLiveData,oConfigs){this.dataType=DS.TYPE_LOCAL;if(oLiveData){if(YAHOO.lang.isArray(oLiveData)){this.responseType=DS.TYPE_JSARRAY;}else{if(oLiveData.nodeType&&oLiveData.nodeType==9){this.responseType=DS.TYPE_XML;}else{if(oLiveData.nodeName&&(oLiveData.nodeName.toLowerCase()=="table")){this.responseType=DS.TYPE_HTMLTABLE;oLiveData=oLiveData.cloneNode(true);}else{if(YAHOO.lang.isString(oLiveData)){this.responseType=DS.TYPE_TEXT;}else{if(YAHOO.lang.isObject(oLiveData)){this.responseType=DS.TYPE_JSON;}}}}}}else{oLiveData=[];this.responseType=DS.TYPE_JSARRAY;}this.constructor.superclass.constructor.call(this,oLiveData,oConfigs);};lang.extend(util.LocalDataSource,DS);lang.augmentObject(util.LocalDataSource,DS);util.FunctionDataSource=function(oLiveData,oConfigs){this.dataType=DS.TYPE_JSFUNCTION;oLiveData=oLiveData||function(){};this.constructor.superclass.constructor.call(this,oLiveData,oConfigs);};lang.extend(util.FunctionDataSource,DS,{makeConnection:function(oRequest,oCallback,oCaller){var tId=DS._nTransactionId++;this.fireEvent("requestEvent",{tId:tId,request:oRequest,callback:oCallback,caller:oCaller});var oRawResponse=this.liveData(oRequest);if(this.responseType===DS.TYPE_UNKNOWN){if(YAHOO.lang.isArray(oRawResponse)){this.responseType=DS.TYPE_JSARRAY;}else{if(oRawResponse&&oRawResponse.nodeType&&oRawResponse.nodeType==9){this.responseType=DS.TYPE_XML;}else{if(oRawResponse&&oRawResponse.nodeName&&(oRawResponse.nodeName.toLowerCase()=="table")){this.responseType=DS.TYPE_HTMLTABLE;}else{if(YAHOO.lang.isObject(oRawResponse)){this.responseType=DS.TYPE_JSON;}else{if(YAHOO.lang.isString(oRawResponse)){this.responseType=DS.TYPE_TEXT;}}}}}}this.handleResponse(oRequest,oRawResponse,oCallback,oCaller,tId);return tId;}});lang.augmentObject(util.FunctionDataSource,DS);util.ScriptNodeDataSource=function(oLiveData,oConfigs){this.dataType=DS.TYPE_SCRIPTNODE;oLiveData=oLiveData||"";this.constructor.superclass.constructor.call(this,oLiveData,oConfigs);};lang.extend(util.ScriptNodeDataSource,DS,{getUtility:util.Get,asyncMode:"allowAll",scriptCallbackParam:"callback",generateRequestCallback:function(id){return"&"+this.scriptCallbackParam+"=YAHOO.util.ScriptNodeDataSource.callbacks["+id+"]";},makeConnection:function(oRequest,oCallback,oCaller){var tId=DS._nTransactionId++;this.fireEvent("requestEvent",{tId:tId,request:oRequest,callback:oCallback,caller:oCaller});if(util.ScriptNodeDataSource._nPending===0){util.ScriptNodeDataSource.callbacks=[];util.ScriptNodeDataSource._nId=0;}var id=util.ScriptNodeDataSource._nId;util.ScriptNodeDataSource._nId++;var oSelf=this;util.ScriptNodeDataSource.callbacks[id]=function(oRawResponse){if((oSelf.asyncMode!=="ignoreStaleResponses")||(id===util.ScriptNodeDataSource.callbacks.length-1)){if(oSelf.responseType===DS.TYPE_UNKNOWN){if(YAHOO.lang.isArray(oRawResponse)){oSelf.responseType=DS.TYPE_JSARRAY;}else{if(oRawResponse.nodeType&&oRawResponse.nodeType==9){oSelf.responseType=DS.TYPE_XML;}else{if(oRawResponse.nodeName&&(oRawResponse.nodeName.toLowerCase()=="table")){oSelf.responseType=DS.TYPE_HTMLTABLE;}else{if(YAHOO.lang.isObject(oRawResponse)){oSelf.responseType=DS.TYPE_JSON;}else{if(YAHOO.lang.isString(oRawResponse)){oSelf.responseType=DS.TYPE_TEXT;}}}}}}oSelf.handleResponse(oRequest,oRawResponse,oCallback,oCaller,tId);}else{}delete util.ScriptNodeDataSource.callbacks[id];};util.ScriptNodeDataSource._nPending++;var sUri=this.liveData+oRequest+this.generateRequestCallback(id);this.getUtility.script(sUri,{autopurge:true,onsuccess:util.ScriptNodeDataSource._bumpPendingDown,onfail:util.ScriptNodeDataSource._bumpPendingDown});return tId;}});lang.augmentObject(util.ScriptNodeDataSource,DS);lang.augmentObject(util.ScriptNodeDataSource,{_nId:0,_nPending:0,callbacks:[]});util.XHRDataSource=function(oLiveData,oConfigs){this.dataType=DS.TYPE_XHR;this.connMgr=this.connMgr||util.Connect;oLiveData=oLiveData||"";this.constructor.superclass.constructor.call(this,oLiveData,oConfigs);};lang.extend(util.XHRDataSource,DS,{connMgr:null,connXhrMode:"allowAll",connMethodPost:false,connTimeout:0,makeConnection:function(oRequest,oCallback,oCaller){var oRawResponse=null;var tId=DS._nTransactionId++;this.fireEvent("requestEvent",{tId:tId,request:oRequest,callback:oCallback,caller:oCaller});var oSelf=this;var oConnMgr=this.connMgr;var oQueue=this._oQueue;var _xhrSuccess=function(oResponse){if(oResponse&&(this.asyncMode=="ignoreStaleResponses")&&(oResponse.tId!=oQueue.conn.tId)){return null;}else{if(!oResponse){this.fireEvent("dataErrorEvent",{request:oRequest,callback:oCallback,caller:oCaller,message:DS.ERROR_DATANULL});DS.issueCallback(oCallback,[oRequest,{error:true}],true,oCaller);return null;}else{if(this.responseType===DS.TYPE_UNKNOWN){var ctype=(oResponse.getResponseHeader)?oResponse.getResponseHeader["Content-Type"]:null;if(ctype){if(ctype.indexOf("text/xml")>-1){this.responseType=DS.TYPE_XML;}else{if(ctype.indexOf("application/json")>-1){this.responseType=DS.TYPE_JSON;}else{if(ctype.indexOf("text/plain")>-1){this.responseType=DS.TYPE_TEXT;}}}}}this.handleResponse(oRequest,oResponse,oCallback,oCaller,tId);}}};var _xhrFailure=function(oResponse){this.fireEvent("dataErrorEvent",{request:oRequest,callback:oCallback,caller:oCaller,message:DS.ERROR_DATAINVALID});if(lang.isString(this.liveData)&&lang.isString(oRequest)&&(this.liveData.lastIndexOf("?")!==this.liveData.length-1)&&(oRequest.indexOf("?")!==0)){}oResponse=oResponse||{};oResponse.error=true;DS.issueCallback(oCallback,[oRequest,oResponse],true,oCaller);return null;};var _xhrCallback={success:_xhrSuccess,failure:_xhrFailure,scope:this};if(lang.isNumber(this.connTimeout)){_xhrCallback.timeout=this.connTimeout;}if(this.connXhrMode=="cancelStaleRequests"){if(oQueue.conn){if(oConnMgr.abort){oConnMgr.abort(oQueue.conn);oQueue.conn=null;}else{}}}if(oConnMgr&&oConnMgr.asyncRequest){var sLiveData=this.liveData;var isPost=this.connMethodPost;var sMethod=(isPost)?"POST":"GET";var sUri=(isPost||!lang.isValue(oRequest))?sLiveData:sLiveData+oRequest;var sRequest=(isPost)?oRequest:null;if(this.connXhrMode!="queueRequests"){oQueue.conn=oConnMgr.asyncRequest(sMethod,sUri,_xhrCallback,sRequest);}else{if(oQueue.conn){var allRequests=oQueue.requests;allRequests.push({request:oRequest,callback:_xhrCallback});if(!oQueue.interval){oQueue.interval=setInterval(function(){if(oConnMgr.isCallInProgress(oQueue.conn)){return;}else{if(allRequests.length>0){sUri=(isPost||!lang.isValue(allRequests[0].request))?sLiveData:sLiveData+allRequests[0].request;sRequest=(isPost)?allRequests[0].request:null;oQueue.conn=oConnMgr.asyncRequest(sMethod,sUri,allRequests[0].callback,sRequest);allRequests.shift();}else{clearInterval(oQueue.interval);oQueue.interval=null;}}},50);}}else{oQueue.conn=oConnMgr.asyncRequest(sMethod,sUri,_xhrCallback,sRequest);}}}else{DS.issueCallback(oCallback,[oRequest,{error:true}],true,oCaller);}return tId;}});lang.augmentObject(util.XHRDataSource,DS);util.DataSource=function(oLiveData,oConfigs){oConfigs=oConfigs||{};var dataType=oConfigs.dataType;if(dataType){if(dataType==DS.TYPE_LOCAL){lang.augmentObject(util.DataSource,util.LocalDataSource);return new util.LocalDataSource(oLiveData,oConfigs);}else{if(dataType==DS.TYPE_XHR){lang.augmentObject(util.DataSource,util.XHRDataSource);return new util.XHRDataSource(oLiveData,oConfigs);}else{if(dataType==DS.TYPE_SCRIPTNODE){lang.augmentObject(util.DataSource,util.ScriptNodeDataSource);return new util.ScriptNodeDataSource(oLiveData,oConfigs);}else{if(dataType==DS.TYPE_JSFUNCTION){lang.augmentObject(util.DataSource,util.FunctionDataSource);return new util.FunctionDataSource(oLiveData,oConfigs);}}}}}if(YAHOO.lang.isString(oLiveData)){lang.augmentObject(util.DataSource,util.XHRDataSource);return new util.XHRDataSource(oLiveData,oConfigs);}else{if(YAHOO.lang.isFunction(oLiveData)){lang.augmentObject(util.DataSource,util.FunctionDataSource);return new util.FunctionDataSource(oLiveData,oConfigs);}else{lang.augmentObject(util.DataSource,util.LocalDataSource);return new util.LocalDataSource(oLiveData,oConfigs);}}};lang.augmentObject(util.DataSource,DS);})();YAHOO.util.Number={format:function(O,W){W=W||{};if(!YAHOO.lang.isNumber(O)){O*=1;}if(YAHOO.lang.isNumber(O)){var M=(O<0);var S=O+"";var V=(W.decimalSeparator)?W.decimalSeparator:".";var U;if(YAHOO.lang.isNumber(W.decimalPlaces)){var T=W.decimalPlaces;var N=Math.pow(10,T);S=Math.round(O*N)/N+"";U=S.lastIndexOf(".");if(T>0){if(U<0){S+=V;U=S.length-1;}else{if(V!=="."){S=S.replace(".",V);}}while((S.length-1-U)<T){S+="0";}}}if(W.thousandsSeparator){var Q=W.thousandsSeparator;U=S.lastIndexOf(V);U=(U>-1)?U:S.length;var R=S.substring(U);var P=-1;for(var X=U;X>0;X--){P++;if((P%3===0)&&(X!==U)&&(!M||(X>1))){R=Q+R;}R=S.charAt(X-1)+R;}S=R;}S=(W.prefix)?W.prefix+S:S;S=(W.suffix)?S+W.suffix:S;return S;}else{return O;}}};(function(){var C=function(F,A,B){if(typeof B==="undefined"){B=10;}for(;parseInt(F,10)<B&&B>1;B/=10){F=A.toString()+F;}return F.toString();};var D={formats:{a:function(A,B){return B.a[A.getDay()];},A:function(A,B){return B.A[A.getDay()];},b:function(A,B){return B.b[A.getMonth()];},B:function(A,B){return B.B[A.getMonth()];},C:function(A){return C(parseInt(A.getFullYear()/100,10),0);},d:["getDate","0"],e:["getDate"," "],g:function(A){return C(parseInt(D.formats.G(A)%100,10),0);},G:function(B){var A=B.getFullYear();var G=parseInt(D.formats.V(B),10);var H=parseInt(D.formats.W(B),10);if(H>G){A++;}else{if(H===0&&G>=52){A--;}}return A;},H:["getHours","0"],I:function(A){var B=A.getHours()%12;return C(B===0?12:B,0);},j:function(A){var B=new Date(""+A.getFullYear()+"/1/1 GMT");var I=new Date(""+A.getFullYear()+"/"+(A.getMonth()+1)+"/"+A.getDate()+" GMT");var J=I-B;var H=parseInt(J/60000/60/24,10)+1;return C(H,0,100);},k:["getHours"," "],l:function(A){var B=A.getHours()%12;return C(B===0?12:B," ");},m:function(A){return C(A.getMonth()+1,0);},M:["getMinutes","0"],p:function(A,B){return B.p[A.getHours()>=12?1:0];},P:function(A,B){return B.P[A.getHours()>=12?1:0];},s:function(A,B){return parseInt(A.getTime()/1000,10);},S:["getSeconds","0"],u:function(B){var A=B.getDay();return A===0?7:A;},U:function(A){var H=parseInt(D.formats.j(A),10);var B=6-A.getDay();var G=parseInt((H+B)/7,10);return C(G,0);},V:function(A){var B=parseInt(D.formats.W(A),10);var H=(new Date(""+A.getFullYear()+"/1/1")).getDay();var G=B+(H>4||H<=1?0:1);if(G===53&&(new Date(""+A.getFullYear()+"/12/31")).getDay()<4){G=1;}else{if(G===0){G=D.formats.V(new Date(""+(A.getFullYear()-1)+"/12/31"));}}return C(G,0);},w:"getDay",W:function(A){var H=parseInt(D.formats.j(A),10);var B=7-D.formats.u(A);var G=parseInt((H+B)/7,10);return C(G,0,10);},y:function(A){return C(A.getFullYear()%100,0);},Y:"getFullYear",z:function(B){var G=B.getTimezoneOffset();var H=C(parseInt(Math.abs(G/60),10),0);var A=C(Math.abs(G%60),0);return(G>0?"-":"+")+H+A;},Z:function(B){var A=B.toString().replace(/^.*:\d\d( GMT[+-]\d+)? \(?([A-Za-z ]+)\)?\d*$/,"$2").replace(/[a-z ]/g,"");if(A.length>4){A=D.formats.z(B);}return A;},"%":function(A){return"%";}},aggregates:{c:"locale",D:"%m/%d/%y",F:"%Y-%m-%d",h:"%b",n:"\n",r:"locale",R:"%H:%M",t:"\t",T:"%H:%M:%S",x:"locale",X:"locale"},format:function(L,M,O){M=M||{};if(!(L instanceof Date)){return YAHOO.lang.isValue(L)?L:"";}var K=M.format||"%m/%d/%Y";if(K==="YYYY/MM/DD"){K="%Y/%m/%d";}else{if(K==="DD/MM/YYYY"){K="%d/%m/%Y";}else{if(K==="MM/DD/YYYY"){K="%m/%d/%Y";}}}O=O||"en";if(!(O in YAHOO.util.DateLocale)){if(O.replace(/-[a-zA-Z]+$/,"")in YAHOO.util.DateLocale){O=O.replace(/-[a-zA-Z]+$/,"");}else{O="en";}}var A=YAHOO.util.DateLocale[O];var P=function(E,F){var G=D.aggregates[F];return(G==="locale"?A[F]:G);};var N=function(E,F){var G=D.formats[F];if(typeof G==="string"){return L[G]();}else{if(typeof G==="function"){return G.call(L,L,A);}else{if(typeof G==="object"&&typeof G[0]==="string"){return C(L[G[0]](),G[1]);}else{return F;}}}};while(K.match(/%[cDFhnrRtTxX]/)){K=K.replace(/%([cDFhnrRtTxX])/g,P);}var B=K.replace(/%([aAbBCdegGHIjklmMpPsSuUVwWyYzZ%])/g,N);P=N=undefined;return B;}};YAHOO.namespace("YAHOO.util");YAHOO.util.Date=D;YAHOO.util.DateLocale={a:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],A:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],B:["January","February","March","April","May","June","July","August","September","October","November","December"],c:"%a %d %b %Y %T %Z",p:["AM","PM"],P:["am","pm"],r:"%I:%M:%S %p",x:"%d/%m/%y",X:"%T"};YAHOO.util.DateLocale["en"]=YAHOO.lang.merge(YAHOO.util.DateLocale,{});YAHOO.util.DateLocale["en-US"]=YAHOO.lang.merge(YAHOO.util.DateLocale["en"],{c:"%a %d %b %Y %I:%M:%S %p %Z",x:"%m/%d/%Y",X:"%I:%M:%S %p"});YAHOO.util.DateLocale["en-GB"]=YAHOO.lang.merge(YAHOO.util.DateLocale["en"],{r:"%l:%M:%S %P %Z"});YAHOO.util.DateLocale["en-AU"]=YAHOO.lang.merge(YAHOO.util.DateLocale["en"]);})();YAHOO.register("datasource",YAHOO.util.DataSource,{version:"2.6.0",build:"1321"});YAHOO.widget.DS_JSArray=YAHOO.util.LocalDataSource;YAHOO.widget.DS_JSFunction=YAHOO.util.FunctionDataSource;YAHOO.widget.DS_XHR=function(B,A,D){var C=new YAHOO.util.XHRDataSource(B,D);C._aDeprecatedSchema=A;return C;};YAHOO.widget.DS_ScriptNode=function(B,A,D){var C=new YAHOO.util.ScriptNodeDataSource(B,D);C._aDeprecatedSchema=A;return C;};YAHOO.widget.DS_XHR.TYPE_JSON=YAHOO.util.DataSourceBase.TYPE_JSON;YAHOO.widget.DS_XHR.TYPE_XML=YAHOO.util.DataSourceBase.TYPE_XML;YAHOO.widget.DS_XHR.TYPE_FLAT=YAHOO.util.DataSourceBase.TYPE_TEXT;YAHOO.widget.AutoComplete=function(G,B,J,C){if(G&&B&&J){if(J instanceof YAHOO.util.DataSourceBase){this.dataSource=J;}else{YAHOO.log("Could not instantiate AutoComplete due to an invalid DataSource","error",this.toString());return;}this.key=0;var D=J.responseSchema;if(J._aDeprecatedSchema){var K=J._aDeprecatedSchema;if(YAHOO.lang.isArray(K)){if((J.responseType===YAHOO.util.DataSourceBase.TYPE_JSON)||(J.responseType===YAHOO.util.DataSourceBase.TYPE_UNKNOWN)){D.resultsList=K[0];this.key=K[1];D.fields=(K.length<3)?null:K.slice(1);}else{if(J.responseType===YAHOO.util.DataSourceBase.TYPE_XML){D.resultNode=K[0];this.key=K[1];D.fields=K.slice(1);}else{if(J.responseType===YAHOO.util.DataSourceBase.TYPE_TEXT){D.recordDelim=K[0];D.fieldDelim=K[1];}}}J.responseSchema=D;}}if(YAHOO.util.Dom.inDocument(G)){if(YAHOO.lang.isString(G)){this._sName="instance"+YAHOO.widget.AutoComplete._nIndex+" "+G;this._elTextbox=document.getElementById(G);}else{this._sName=(G.id)?"instance"+YAHOO.widget.AutoComplete._nIndex+" "+G.id:"instance"+YAHOO.widget.AutoComplete._nIndex;this._elTextbox=G;}YAHOO.util.Dom.addClass(this._elTextbox,"yui-ac-input");}else{YAHOO.log("Could not instantiate AutoComplete due to an invalid input element","error",this.toString());return;}if(YAHOO.util.Dom.inDocument(B)){if(YAHOO.lang.isString(B)){this._elContainer=document.getElementById(B);}else{this._elContainer=B;}if(this._elContainer.style.display=="none"){YAHOO.log('The container may not display properly if display is set to "none" in CSS',"warn",this.toString());}var E=this._elContainer.parentNode;var A=E.tagName.toLowerCase();if(A=="div"){YAHOO.util.Dom.addClass(E,"yui-ac");}else{YAHOO.log("Could not find the wrapper element for skinning","warn",this.toString());}}else{YAHOO.log("Could not instantiate AutoComplete due to an invalid container element","error",this.toString());return;}if(this.dataSource.dataType===YAHOO.util.DataSourceBase.TYPE_LOCAL){this.applyLocalFilter=true;}if(C&&(C.constructor==Object)){for(var I in C){if(I){this[I]=C[I];}}}this._initContainerEl();this._initProps();this._initListEl();this._initContainerHelperEls();var H=this;var F=this._elTextbox;YAHOO.util.Event.addListener(F,"keyup",H._onTextboxKeyUp,H);YAHOO.util.Event.addListener(F,"keydown",H._onTextboxKeyDown,H);YAHOO.util.Event.addListener(F,"focus",H._onTextboxFocus,H);YAHOO.util.Event.addListener(F,"blur",H._onTextboxBlur,H);YAHOO.util.Event.addListener(B,"mouseover",H._onContainerMouseover,H);YAHOO.util.Event.addListener(B,"mouseout",H._onContainerMouseout,H);YAHOO.util.Event.addListener(B,"click",H._onContainerClick,H);YAHOO.util.Event.addListener(B,"scroll",H._onContainerScroll,H);YAHOO.util.Event.addListener(B,"resize",H._onContainerResize,H);YAHOO.util.Event.addListener(F,"keypress",H._onTextboxKeyPress,H);YAHOO.util.Event.addListener(window,"unload",H._onWindowUnload,H);this.textboxFocusEvent=new YAHOO.util.CustomEvent("textboxFocus",this);this.textboxKeyEvent=new YAHOO.util.CustomEvent("textboxKey",this);this.dataRequestEvent=new YAHOO.util.CustomEvent("dataRequest",this);this.dataReturnEvent=new YAHOO.util.CustomEvent("dataReturn",this);this.dataErrorEvent=new YAHOO.util.CustomEvent("dataError",this);this.containerPopulateEvent=new YAHOO.util.CustomEvent("containerPopulate",this);this.containerExpandEvent=new YAHOO.util.CustomEvent("containerExpand",this);this.typeAheadEvent=new YAHOO.util.CustomEvent("typeAhead",this);this.itemMouseOverEvent=new YAHOO.util.CustomEvent("itemMouseOver",this);this.itemMouseOutEvent=new YAHOO.util.CustomEvent("itemMouseOut",this);this.itemArrowToEvent=new YAHOO.util.CustomEvent("itemArrowTo",this);this.itemArrowFromEvent=new YAHOO.util.CustomEvent("itemArrowFrom",this);this.itemSelectEvent=new YAHOO.util.CustomEvent("itemSelect",this);this.unmatchedItemSelectEvent=new YAHOO.util.CustomEvent("unmatchedItemSelect",this);this.selectionEnforceEvent=new YAHOO.util.CustomEvent("selectionEnforce",this);this.containerCollapseEvent=new YAHOO.util.CustomEvent("containerCollapse",this);this.textboxBlurEvent=new YAHOO.util.CustomEvent("textboxBlur",this);this.textboxChangeEvent=new YAHOO.util.CustomEvent("textboxChange",this);F.setAttribute("autocomplete","off");YAHOO.widget.AutoComplete._nIndex++;YAHOO.log("AutoComplete initialized","info",this.toString());}else{YAHOO.log("Could not instantiate AutoComplete due invalid arguments","error",this.toString());}};YAHOO.widget.AutoComplete.prototype.dataSource=null;YAHOO.widget.AutoComplete.prototype.applyLocalFilter=null;YAHOO.widget.AutoComplete.prototype.queryMatchCase=false;YAHOO.widget.AutoComplete.prototype.queryMatchContains=false;YAHOO.widget.AutoComplete.prototype.queryMatchSubset=false;YAHOO.widget.AutoComplete.prototype.minQueryLength=1;YAHOO.widget.AutoComplete.prototype.maxResultsDisplayed=10;YAHOO.widget.AutoComplete.prototype.queryDelay=0.2;YAHOO.widget.AutoComplete.prototype.typeAheadDelay=0.5;YAHOO.widget.AutoComplete.prototype.queryInterval=500;YAHOO.widget.AutoComplete.prototype.highlightClassName="yui-ac-highlight";YAHOO.widget.AutoComplete.prototype.prehighlightClassName=null;YAHOO.widget.AutoComplete.prototype.delimChar=null;YAHOO.widget.AutoComplete.prototype.autoHighlight=true;YAHOO.widget.AutoComplete.prototype.typeAhead=false;YAHOO.widget.AutoComplete.prototype.animHoriz=false;YAHOO.widget.AutoComplete.prototype.animVert=true;YAHOO.widget.AutoComplete.prototype.animSpeed=0.3;YAHOO.widget.AutoComplete.prototype.forceSelection=false;YAHOO.widget.AutoComplete.prototype.allowBrowserAutocomplete=true;YAHOO.widget.AutoComplete.prototype.alwaysShowContainer=false;YAHOO.widget.AutoComplete.prototype.useIFrame=false;YAHOO.widget.AutoComplete.prototype.useShadow=false;YAHOO.widget.AutoComplete.prototype.suppressInputUpdate=false;YAHOO.widget.AutoComplete.prototype.resultTypeList=true;YAHOO.widget.AutoComplete.prototype.queryQuestionMark=true;YAHOO.widget.AutoComplete.prototype.appendItems=[];YAHOO.widget.AutoComplete.prototype.toString=function(){return"AutoComplete "+this._sName;};YAHOO.widget.AutoComplete.prototype.getInputEl=function(){return this._elTextbox;};YAHOO.widget.AutoComplete.prototype.getContainerEl=function(){return this._elContainer;};YAHOO.widget.AutoComplete.prototype.isFocused=function(){return(this._bFocused===null)?false:this._bFocused;};YAHOO.widget.AutoComplete.prototype.isContainerOpen=function(){return this._bContainerOpen;};YAHOO.widget.AutoComplete.prototype.getListEl=function(){return this._elList;};YAHOO.widget.AutoComplete.prototype.getListItemMatch=function(A){if(A._sResultMatch){return A._sResultMatch;}else{return null;}};YAHOO.widget.AutoComplete.prototype.getListItemData=function(A){if(A._oResultData){return A._oResultData;}else{return null;}};YAHOO.widget.AutoComplete.prototype.getListItemIndex=function(A){if(YAHOO.lang.isNumber(A._nItemIndex)){return A._nItemIndex;}else{return null;}};YAHOO.widget.AutoComplete.prototype.setHeader=function(B){if(this._elHeader){var A=this._elHeader;if(B){A.innerHTML=B;A.style.display="block";}else{A.innerHTML="";A.style.display="none";}}};YAHOO.widget.AutoComplete.prototype.setFooter=function(B){if(this._elFooter){var A=this._elFooter;if(B){A.innerHTML=B;A.style.display="block";}else{A.innerHTML="";A.style.display="none";}}};YAHOO.widget.AutoComplete.prototype.setBody=function(A){if(this._elBody){var B=this._elBody;YAHOO.util.Event.purgeElement(B,true);if(A){B.innerHTML=A;B.style.display="block";}else{B.innerHTML="";B.style.display="none";}this._elList=null;}};YAHOO.widget.AutoComplete.prototype.generateRequest=function(B){var A=this.dataSource.dataType;if(A===YAHOO.util.DataSourceBase.TYPE_XHR){if(!this.dataSource.connMethodPost){B=(this.queryQuestionMark?"?":"")+(this.dataSource.scriptQueryParam||"query")+"="+B+(this.dataSource.scriptQueryAppend?("&"+this.dataSource.scriptQueryAppend):"");}else{B=(this.dataSource.scriptQueryParam||"query")+"="+B+(this.dataSource.scriptQueryAppend?("&"+this.dataSource.scriptQueryAppend):"");}}else{if(A===YAHOO.util.DataSourceBase.TYPE_SCRIPTNODE){B="&"+(this.dataSource.scriptQueryParam||"query")+"="+B+(this.dataSource.scriptQueryAppend?("&"+this.dataSource.scriptQueryAppend):"");}}return B;};YAHOO.widget.AutoComplete.prototype.sendQuery=function(B){this._bFocused=null;var A=(this.delimChar)?this._elTextbox.value+B:B;this._sendQuery(A);};YAHOO.widget.AutoComplete.prototype.collapseContainer=function(){this._toggleContainer(false);};YAHOO.widget.AutoComplete.prototype.getSubsetMatches=function(E){var D,C,A;for(var B=E.length;B>=this.minQueryLength;B--){A=this.generateRequest(E.substr(0,B));this.dataRequestEvent.fire(this,D,A);YAHOO.log('Searching for query subset "'+D+'" in cache',"info",this.toString());C=this.dataSource.getCachedResponse(A);if(C){YAHOO.log('Found match for query subset "'+D+'": '+YAHOO.lang.dump(C),"info",this.toString());return this.filterResults.apply(this.dataSource,[E,C,C,{scope:this}]);}}YAHOO.log('Did not find subset match for query subset "'+E+'"',"info",this.toString());return null;};YAHOO.widget.AutoComplete.prototype.preparseRawResponse=function(C,B,A){var D=((this.responseStripAfter!=="")&&(B.indexOf))?B.indexOf(this.responseStripAfter):-1;if(D!=-1){B=B.substring(0,D);}return B;};YAHOO.widget.AutoComplete.prototype.filterResults=function(J,L,P,K){if(K&&K.argument&&K.argument.query){J=K.argument.query;}if(J&&J!==""){P=YAHOO.widget.AutoComplete._cloneObject(P);var H=K.scope,O=this,B=P.results,M=[],D=false,I=(O.queryMatchCase||H.queryMatchCase),A=(O.queryMatchContains||H.queryMatchContains);for(var C=B.length-1;C>=0;C--){var F=B[C];var E=null;if(YAHOO.lang.isString(F)){E=F;}else{if(YAHOO.lang.isArray(F)){E=F[0];}else{if(this.responseSchema.fields){var N=this.responseSchema.fields[0].key||this.responseSchema.fields[0];E=F[N];}else{if(this.key){E=F[this.key];}}}}if(YAHOO.lang.isString(E)){var G=(I)?E.indexOf(decodeURIComponent(J)):E.toLowerCase().indexOf(decodeURIComponent(J).toLowerCase());if((!A&&(G===0))||(A&&(G>-1))){M.unshift(F);}}}P.results=M;YAHOO.log("Filtered "+M.length+' results against query "'+J+'": '+YAHOO.lang.dump(M),"info",this.toString());}else{YAHOO.log("Did not filter results against query","info",this.toString());}return P;};YAHOO.widget.AutoComplete.prototype.handleResponse=function(C,A,B){if((this instanceof YAHOO.widget.AutoComplete)&&this._sName){this._populateList(C,A,B);}};YAHOO.widget.AutoComplete.prototype.doBeforeLoadData=function(C,A,B){return true;};YAHOO.widget.AutoComplete.prototype.formatResult=function(B,D,A){var C=(A)?A:"";return C;};YAHOO.widget.AutoComplete.prototype.doBeforeExpandContainer=function(D,A,C,B){return true;};YAHOO.widget.AutoComplete.prototype.destroy=function(){var B=this.toString();var A=this._elTextbox;var D=this._elContainer;this.textboxFocusEvent.unsubscribeAll();this.textboxKeyEvent.unsubscribeAll();this.dataRequestEvent.unsubscribeAll();this.dataReturnEvent.unsubscribeAll();this.dataErrorEvent.unsubscribeAll();this.containerPopulateEvent.unsubscribeAll();this.containerExpandEvent.unsubscribeAll();this.typeAheadEvent.unsubscribeAll();this.itemMouseOverEvent.unsubscribeAll();this.itemMouseOutEvent.unsubscribeAll();this.itemArrowToEvent.unsubscribeAll();this.itemArrowFromEvent.unsubscribeAll();this.itemSelectEvent.unsubscribeAll();this.unmatchedItemSelectEvent.unsubscribeAll();this.selectionEnforceEvent.unsubscribeAll();this.containerCollapseEvent.unsubscribeAll();this.textboxBlurEvent.unsubscribeAll();this.textboxChangeEvent.unsubscribeAll();YAHOO.util.Event.purgeElement(A,true);YAHOO.util.Event.purgeElement(D,true);D.innerHTML="";for(var C in this){if(YAHOO.lang.hasOwnProperty(this,C)){this[C]=null;}}YAHOO.log("AutoComplete instance destroyed: "+B);};YAHOO.widget.AutoComplete.prototype.textboxFocusEvent=null;YAHOO.widget.AutoComplete.prototype.textboxKeyEvent=null;YAHOO.widget.AutoComplete.prototype.dataRequestEvent=null;YAHOO.widget.AutoComplete.prototype.dataReturnEvent=null;YAHOO.widget.AutoComplete.prototype.dataErrorEvent=null;YAHOO.widget.AutoComplete.prototype.containerPopulateEvent=null;YAHOO.widget.AutoComplete.prototype.containerExpandEvent=null;YAHOO.widget.AutoComplete.prototype.typeAheadEvent=null;YAHOO.widget.AutoComplete.prototype.itemMouseOverEvent=null;YAHOO.widget.AutoComplete.prototype.itemMouseOutEvent=null;YAHOO.widget.AutoComplete.prototype.itemArrowToEvent=null;YAHOO.widget.AutoComplete.prototype.itemArrowFromEvent=null;YAHOO.widget.AutoComplete.prototype.itemSelectEvent=null;YAHOO.widget.AutoComplete.prototype.unmatchedItemSelectEvent=null;YAHOO.widget.AutoComplete.prototype.selectionEnforceEvent=null;YAHOO.widget.AutoComplete.prototype.containerCollapseEvent=null;YAHOO.widget.AutoComplete.prototype.textboxBlurEvent=null;YAHOO.widget.AutoComplete.prototype.textboxChangeEvent=null;YAHOO.widget.AutoComplete._nIndex=0;YAHOO.widget.AutoComplete.prototype._sName=null;YAHOO.widget.AutoComplete.prototype._elTextbox=null;YAHOO.widget.AutoComplete.prototype._elContainer=null;YAHOO.widget.AutoComplete.prototype._elContent=null;YAHOO.widget.AutoComplete.prototype._elHeader=null;YAHOO.widget.AutoComplete.prototype._elBody=null;YAHOO.widget.AutoComplete.prototype._elFooter=null;YAHOO.widget.AutoComplete.prototype._elShadow=null;YAHOO.widget.AutoComplete.prototype._elIFrame=null;YAHOO.widget.AutoComplete.prototype._bFocused=null;YAHOO.widget.AutoComplete.prototype._oAnim=null;YAHOO.widget.AutoComplete.prototype._bContainerOpen=false;YAHOO.widget.AutoComplete.prototype._bOverContainer=false;YAHOO.widget.AutoComplete.prototype._elList=null;YAHOO.widget.AutoComplete.prototype._nDisplayedItems=0;YAHOO.widget.AutoComplete.prototype._sCurQuery=null;YAHOO.widget.AutoComplete.prototype._sPastSelections="";YAHOO.widget.AutoComplete.prototype._sInitInputValue=null;YAHOO.widget.AutoComplete.prototype._elCurListItem=null;YAHOO.widget.AutoComplete.prototype._bItemSelected=false;YAHOO.widget.AutoComplete.prototype._nKeyCode=null;YAHOO.widget.AutoComplete.prototype._nDelayID=-1;YAHOO.widget.AutoComplete.prototype._nTypeAheadDelayID=-1;YAHOO.widget.AutoComplete.prototype._iFrameSrc="javascript:false;";YAHOO.widget.AutoComplete.prototype._queryInterval=null;YAHOO.widget.AutoComplete.prototype._sLastTextboxValue=null;YAHOO.widget.AutoComplete.prototype._initProps=function(){var B=this.minQueryLength;if(!YAHOO.lang.isNumber(B)){this.minQueryLength=1;}var E=this.maxResultsDisplayed;if(!YAHOO.lang.isNumber(E)||(E<1)){this.maxResultsDisplayed=10;}var F=this.queryDelay;if(!YAHOO.lang.isNumber(F)||(F<0)){this.queryDelay=0.2;}var C=this.typeAheadDelay;if(!YAHOO.lang.isNumber(C)||(C<0)){this.typeAheadDelay=0.2;}var A=this.delimChar;if(YAHOO.lang.isString(A)&&(A.length>0)){this.delimChar=[A];}else{if(!YAHOO.lang.isArray(A)){this.delimChar=null;}}var D=this.animSpeed;if((this.animHoriz||this.animVert)&&YAHOO.util.Anim){if(!YAHOO.lang.isNumber(D)||(D<0)){this.animSpeed=0.3;}if(!this._oAnim){this._oAnim=new YAHOO.util.Anim(this._elContent,{},this.animSpeed);}else{this._oAnim.duration=this.animSpeed;}}if(this.forceSelection&&A){YAHOO.log("The forceSelection feature has been enabled with delimChar defined.","warn",this.toString());}};YAHOO.widget.AutoComplete.prototype._initContainerHelperEls=function(){if(this.useShadow&&!this._elShadow){var A=document.createElement("div");A.className="yui-ac-shadow";A.style.width=0;A.style.height=0;this._elShadow=this._elContainer.appendChild(A);}if(this.useIFrame&&!this._elIFrame){var B=document.createElement("iframe");B.src=this._iFrameSrc;B.frameBorder=0;B.scrolling="no";B.style.position="absolute";B.style.width=0;B.style.height=0;B.tabIndex=-1;B.style.padding=0;this._elIFrame=this._elContainer.appendChild(B);}};YAHOO.widget.AutoComplete.prototype._initContainerEl=function(){YAHOO.util.Dom.addClass(this._elContainer,"yui-ac-container");if(!this._elContent){var C=document.createElement("div");C.className="yui-ac-content";C.style.display="none";this._elContent=this._elContainer.appendChild(C);var B=document.createElement("div");B.className="yui-ac-hd";B.style.display="none";this._elHeader=this._elContent.appendChild(B);var D=document.createElement("div");D.className="yui-ac-bd";this._elBody=this._elContent.appendChild(D);var A=document.createElement("div");A.className="yui-ac-ft";A.style.display="none";this._elFooter=this._elContent.appendChild(A);}else{YAHOO.log("Could not initialize the container","warn",this.toString());}};YAHOO.widget.AutoComplete.prototype._initListEl=function(){var C=this.maxResultsDisplayed;var A=this._elList||document.createElement("ul");var B;while(A.childNodes.length<C){B=document.createElement("li");B.style.display="none";B._nItemIndex=A.childNodes.length;A.appendChild(B);}if(!this._elList){var D=this._elBody;YAHOO.util.Event.purgeElement(D,true);D.innerHTML="";this._elList=D.appendChild(A);}};YAHOO.widget.AutoComplete.prototype._focus=function(){var A=this;setTimeout(function(){try{A._elTextbox.focus();}catch(B){}},0);};YAHOO.widget.AutoComplete.prototype._enableIntervalDetection=function(){var A=this;if(!A._queryInterval&&A.queryInterval){A._queryInterval=setInterval(function(){A._onInterval();},A.queryInterval);YAHOO.log("Interval set","info",this.toString());}};YAHOO.widget.AutoComplete.prototype._onInterval=function(){var A=this._elTextbox.value;var B=this._sLastTextboxValue;if(A!=B){this._sLastTextboxValue=A;this._sendQuery(A);}};YAHOO.widget.AutoComplete.prototype._clearInterval=function(){if(this._queryInterval){clearInterval(this._queryInterval);this._queryInterval=null;YAHOO.log("Interval cleared","info",this.toString());}};YAHOO.widget.AutoComplete.prototype._isIgnoreKey=function(A){if((A==9)||(A==13)||(A==16)||(A==17)||(A>=18&&A<=20)||(A==27)||(A>=33&&A<=35)||(A>=36&&A<=40)||(A>=44&&A<=45)||(A==229)){return true;}return false;};YAHOO.widget.AutoComplete.prototype._sendQuery=function(D){if(this.minQueryLength<0){this._toggleContainer(false);YAHOO.log("Property minQueryLength is less than 0","info",this.toString());return;}if(this.delimChar){var A=this._extractQuery(D);D=A.query;this._sPastSelections=A.previous;}if((D&&(D.length<this.minQueryLength))||(!D&&this.minQueryLength>0)){if(this._nDelayID!=-1){clearTimeout(this._nDelayID);}this._toggleContainer(false);YAHOO.log('Query "'+D+'" is too short',"info",this.toString());return;}D=encodeURIComponent(D);this._nDelayID=-1;if(this.dataSource.queryMatchSubset||this.queryMatchSubset){var C=this.getSubsetMatches(D);if(C){this.handleResponse(D,C,{query:D});return;}}if(this.responseStripAfter){this.dataSource.doBeforeParseData=this.preparseRawResponse;}if(this.applyLocalFilter){this.dataSource.doBeforeCallback=this.filterResults;}var B=this.generateRequest(D);this.dataRequestEvent.fire(this,D,B);YAHOO.log('Sending query "'+B+'"',"info",this.toString());this.dataSource.sendRequest(B,{success:this.handleResponse,failure:this.handleResponse,scope:this,argument:{query:D}});};YAHOO.widget.AutoComplete.prototype._populateList=function(K,F,C){if(this._nTypeAheadDelayID!=-1){clearTimeout(this._nTypeAheadDelayID);}K=(C&&C.query)?C.query:K;var H=this.doBeforeLoadData(K,F,C);if(H&&!F.error){this.dataReturnEvent.fire(this,K,F.results);if(this._bFocused||(this._bFocused===null)){var M=decodeURIComponent(K);this._sCurQuery=M;this._bItemSelected=false;var R=F.results;if(this.getInputEl().value.length>0){R=R.slice(0,(this.maxResultsDisplayed-this.appendItems.length));R=R.concat(this.appendItems);}var A=R.length,J=(this.dataSource.responseSchema.fields)?(this.dataSource.responseSchema.fields[0].key||this.dataSource.responseSchema.fields[0]):0;if(A>0){if(!this._elList||(this._elList.childNodes.length<A)){this._initListEl();}this._initContainerHelperEls();var I=this._elList.childNodes;for(var Q=A-1;Q>=0;Q--){var P=I[Q],E=R[Q];if(this.resultTypeList){var B=[];B[0]=(YAHOO.lang.isString(E))?E:E[J]||E[this.key];var L=this.dataSource.responseSchema.fields;if(YAHOO.lang.isArray(L)&&(L.length>1)){for(var N=1,S=L.length;N<S;N++){B[B.length]=E[L[N].key||L[N]];}}else{if(YAHOO.lang.isArray(E)){B=E;}else{if(YAHOO.lang.isString(E)){B=[E];}else{B[1]=E;}}}E=B;}P._sResultMatch=(YAHOO.lang.isString(E))?E:(YAHOO.lang.isArray(E))?E[0]:(E[J]||"");P._oResultData=E;P.innerHTML=this.formatResult(E,M,P._sResultMatch);P.style.display="";}if(A<I.length){var G;for(var O=I.length-1;O>=A;O--){G=I[O];G.style.display="none";}}this._nDisplayedItems=A;this.containerPopulateEvent.fire(this,K,R);if(this.autoHighlight){var D=this._elList.firstChild;this._toggleHighlight(D,"to");this.itemArrowToEvent.fire(this,D);YAHOO.log("Arrowed to first item","info",this.toString());this._typeAhead(D,K);}else{this._toggleHighlight(this._elCurListItem,"from");}H=this.doBeforeExpandContainer(this._elTextbox,this._elContainer,K,R);this._toggleContainer(H);}else{this._toggleContainer(false);}YAHOO.log("Container populated with "+A+" list items","info",this.toString());return;}}else{this.dataErrorEvent.fire(this,K);}YAHOO.log("Could not populate list","info",this.toString());};YAHOO.widget.AutoComplete.prototype._clearSelection=function(){var A=(this.delimChar)?this._extractQuery(this._elTextbox.value):{previous:"",query:this._elTextbox.value};this._elTextbox.value=A.previous;this.selectionEnforceEvent.fire(this,A.query);YAHOO.log("Selection enforced","info",this.toString());};YAHOO.widget.AutoComplete.prototype._textMatchesOption=function(){var A=null;for(var B=0;B<this._nDisplayedItems;B++){var C=this._elList.childNodes[B];var D=(""+C._sResultMatch).toLowerCase();if(D==this._sCurQuery.toLowerCase()){A=C;break;}}return(A);};YAHOO.widget.AutoComplete.prototype._typeAhead=function(B,D){if(!this.typeAhead||(this._nKeyCode==8)){return;}var A=this,C=this._elTextbox;if(C.setSelectionRange||C.createTextRange){this._nTypeAheadDelayID=setTimeout(function(){var F=C.value.length;A._updateValue(B);var G=C.value.length;A._selectText(C,F,G);var E=C.value.substr(F,G);A.typeAheadEvent.fire(A,D,E);YAHOO.log('Typeahead occured with prefill string "'+E+'"',"info",A.toString());},(this.typeAheadDelay*1000));}};YAHOO.widget.AutoComplete.prototype._selectText=function(D,A,B){if(D.setSelectionRange){D.setSelectionRange(A,B);}else{if(D.createTextRange){var C=D.createTextRange();C.moveStart("character",A);C.moveEnd("character",B-D.value.length);C.select();}else{D.select();}}};YAHOO.widget.AutoComplete.prototype._extractQuery=function(H){var C=this.delimChar,F=-1,G,E,B=C.length-1,D;for(;B>=0;B--){G=H.lastIndexOf(C[B]);if(G>F){F=G;}}if(C[B]==" "){for(var A=C.length-1;A>=0;A--){if(H[F-1]==C[A]){F--;break;}}}if(F>-1){E=F+1;while(H.charAt(E)==" "){E+=1;}D=H.substring(0,E);H=H.substr(E);}else{D="";}return{previous:D,query:H};};YAHOO.widget.AutoComplete.prototype._toggleContainerHelpers=function(D){var E=this._elContent.offsetWidth+"px";var B=this._elContent.offsetHeight+"px";if(this.useIFrame&&this._elIFrame){var C=this._elIFrame;if(D){C.style.width=E;C.style.height=B;C.style.padding="";YAHOO.log("Iframe expanded","info",this.toString());}else{C.style.width=0;C.style.height=0;C.style.padding=0;YAHOO.log("Iframe collapsed","info",this.toString());}}if(this.useShadow&&this._elShadow){var A=this._elShadow;if(D){A.style.width=E;A.style.height=B;YAHOO.log("Shadow expanded","info",this.toString());}else{A.style.width=0;A.style.height=0;YAHOO.log("Shadow collapsed","info",this.toString());}}};YAHOO.widget.AutoComplete.prototype._toggleContainer=function(I){YAHOO.log("Toggling container "+((I)?"open":"closed"),"info",this.toString());var D=this._elContainer;if(this.alwaysShowContainer&&this._bContainerOpen){return;}if(!I){this._toggleHighlight(this._elCurListItem,"from");this._nDisplayedItems=0;this._sCurQuery=null;if(this._elContent.style.display=="none"){return;}}var A=this._oAnim;if(A&&A.getEl()&&(this.animHoriz||this.animVert)){if(A.isAnimated()){A.stop(true);}var G=this._elContent.cloneNode(true);D.appendChild(G);G.style.top="-9000px";G.style.width="";G.style.height="";G.style.display="";var F=G.offsetWidth;var C=G.offsetHeight;var B=(this.animHoriz)?0:F;var E=(this.animVert)?0:C;A.attributes=(I)?{width:{to:F},height:{to:C}}:{width:{to:B},height:{to:E}};if(I&&!this._bContainerOpen){this._elContent.style.width=B+"px";this._elContent.style.height=E+"px";}else{this._elContent.style.width=F+"px";this._elContent.style.height=C+"px";}D.removeChild(G);G=null;var H=this;var J=function(){A.onComplete.unsubscribeAll();if(I){H._toggleContainerHelpers(true);H._bContainerOpen=I;H.containerExpandEvent.fire(H);YAHOO.log("Container expanded","info",H.toString());}else{H._elContent.style.display="none";H._bContainerOpen=I;H.containerCollapseEvent.fire(H);YAHOO.log("Container collapsed","info",H.toString());}};this._toggleContainerHelpers(false);this._elContent.style.display="";A.onComplete.subscribe(J);A.animate();}else{if(I){this._elContent.style.display="";this._toggleContainerHelpers(true);this._bContainerOpen=I;this.containerExpandEvent.fire(this);YAHOO.log("Container expanded","info",this.toString());}else{this._toggleContainerHelpers(false);this._elContent.style.display="none";this._bContainerOpen=I;this.containerCollapseEvent.fire(this);YAHOO.log("Container collapsed","info",this.toString());}}};YAHOO.widget.AutoComplete.prototype._toggleHighlight=function(A,C){if(A){var B=this.highlightClassName;if(this._elCurListItem){YAHOO.util.Dom.removeClass(this._elCurListItem,B);this._elCurListItem=null;}if((C=="to")&&B){YAHOO.util.Dom.addClass(A,B);this._elCurListItem=A;}}};YAHOO.widget.AutoComplete.prototype._togglePrehighlight=function(B,C){if(B==this._elCurListItem){return;}var A=this.prehighlightClassName;if((C=="mouseover")&&A){YAHOO.util.Dom.addClass(B,A);}else{YAHOO.util.Dom.removeClass(B,A);}};YAHOO.widget.AutoComplete.prototype._updateValue=function(C){if(!this.suppressInputUpdate){var F=this._elTextbox;var E=(this.delimChar)?(this.delimChar[0]||this.delimChar):null;var B=C._sResultMatch;var D="";if(E){D=this._sPastSelections;D+=B+E;if(E!=" "){D+=" ";}}else{D=B;}F.value=D;if(F.type=="textarea"){F.scrollTop=F.scrollHeight;}var A=F.value.length;this._selectText(F,A,A);this._elCurListItem=C;}};YAHOO.widget.AutoComplete.prototype._selectItem=function(A){this._bItemSelected=true;this._updateValue(A);this._sPastSelections=this._elTextbox.value;this._clearInterval();this.itemSelectEvent.fire(this,A,A._oResultData);YAHOO.log("Item selected: "+YAHOO.lang.dump(A._oResultData),"info",this.toString());this._toggleContainer(false);};YAHOO.widget.AutoComplete.prototype._jumpSelection=function(){if(this._elCurListItem){this._selectItem(this._elCurListItem);}else{this._toggleContainer(false);}};YAHOO.widget.AutoComplete.prototype._moveSelection=function(G){if(this._bContainerOpen){var H=this._elCurListItem,D=-1;if(H){D=H._nItemIndex;}var E=(G==40)?(D+1):(D-1);if(E<-2||E>=this._nDisplayedItems){return;}if(H){this._toggleHighlight(H,"from");this.itemArrowFromEvent.fire(this,H);YAHOO.log("Item arrowed from: "+H._nItemIndex,"info",this.toString());}if(E==-1){if(this.delimChar){this._elTextbox.value=this._sPastSelections+this._sCurQuery;}else{this._elTextbox.value=this._sCurQuery;}return;}if(E==-2){this._toggleContainer(false);return;}var F=this._elList.childNodes[E],B=this._elContent,C=YAHOO.util.Dom.getStyle(B,"overflow"),I=YAHOO.util.Dom.getStyle(B,"overflowY"),A=((C=="auto")||(C=="scroll")||(I=="auto")||(I=="scroll"));if(A&&(E>-1)&&(E<this._nDisplayedItems)){if(G==40){if((F.offsetTop+F.offsetHeight)>(B.scrollTop+B.offsetHeight)){B.scrollTop=(F.offsetTop+F.offsetHeight)-B.offsetHeight;}else{if((F.offsetTop+F.offsetHeight)<B.scrollTop){B.scrollTop=F.offsetTop;}}}else{if(F.offsetTop<B.scrollTop){this._elContent.scrollTop=F.offsetTop;}else{if(F.offsetTop>(B.scrollTop+B.offsetHeight)){this._elContent.scrollTop=(F.offsetTop+F.offsetHeight)-B.offsetHeight;}}}}this._toggleHighlight(F,"to");this.itemArrowToEvent.fire(this,F);YAHOO.log("Item arrowed to "+F._nItemIndex,"info",this.toString());if(this.typeAhead){this._updateValue(F);}}};YAHOO.widget.AutoComplete.prototype._onContainerMouseover=function(A,C){var D=YAHOO.util.Event.getTarget(A);var B=D.nodeName.toLowerCase();while(D&&(B!="table")){switch(B){case"body":return;case"li":if(C.prehighlightClassName){C._togglePrehighlight(D,"mouseover");}else{C._toggleHighlight(D,"to");}C.itemMouseOverEvent.fire(C,D);YAHOO.log("Item moused over "+D._nItemIndex,"info",C.toString());break;case"div":if(YAHOO.util.Dom.hasClass(D,"yui-ac-container")){C._bOverContainer=true;return;}break;default:break;}D=D.parentNode;if(D){B=D.nodeName.toLowerCase();}}};YAHOO.widget.AutoComplete.prototype._onContainerMouseout=function(A,C){var D=YAHOO.util.Event.getTarget(A);var B=D.nodeName.toLowerCase();while(D&&(B!="table")){switch(B){case"body":return;case"li":if(C.prehighlightClassName){C._togglePrehighlight(D,"mouseout");}else{C._toggleHighlight(D,"from");}C.itemMouseOutEvent.fire(C,D);YAHOO.log("Item moused out "+D._nItemIndex,"info",C.toString());break;case"ul":C._toggleHighlight(C._elCurListItem,"to");break;case"div":if(YAHOO.util.Dom.hasClass(D,"yui-ac-container")){C._bOverContainer=false;return;}break;default:break;}D=D.parentNode;if(D){B=D.nodeName.toLowerCase();}}};YAHOO.widget.AutoComplete.prototype._onContainerClick=function(A,C){var D=YAHOO.util.Event.getTarget(A);var B=D.nodeName.toLowerCase();while(D&&(B!="table")){switch(B){case"body":return;case"li":C._toggleHighlight(D,"to");C._selectItem(D);return;default:break;}D=D.parentNode;if(D){B=D.nodeName.toLowerCase();}}};YAHOO.widget.AutoComplete.prototype._onContainerScroll=function(A,B){B._focus();};YAHOO.widget.AutoComplete.prototype._onContainerResize=function(A,B){B._toggleContainerHelpers(B._bContainerOpen);};YAHOO.widget.AutoComplete.prototype._onTextboxKeyDown=function(A,B){var C=A.keyCode;if(B._nTypeAheadDelayID!=-1){clearTimeout(B._nTypeAheadDelayID);}switch(C){case 9:if(!YAHOO.env.ua.opera&&(navigator.userAgent.toLowerCase().indexOf("mac")==-1)||(YAHOO.env.ua.webkit>420)){if(B._elCurListItem){if(B.delimChar&&(B._nKeyCode!=C)){if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);}}B._selectItem(B._elCurListItem);}else{B._toggleContainer(false);}}break;case 13:if(!YAHOO.env.ua.opera&&(navigator.userAgent.toLowerCase().indexOf("mac")==-1)||(YAHOO.env.ua.webkit>420)){if(B._elCurListItem){if(B._nKeyCode!=C){if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);}}B._selectItem(B._elCurListItem);}else{B._toggleContainer(false);}}break;case 27:B._toggleContainer(false);return;case 39:B._jumpSelection();break;case 38:if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);B._moveSelection(C);}break;case 40:if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);B._moveSelection(C);}break;default:B._bItemSelected=false;B._toggleHighlight(B._elCurListItem,"from");B.textboxKeyEvent.fire(B,C);YAHOO.log("Textbox keyed","info",B.toString());break;}if(C===18){B._enableIntervalDetection();}B._nKeyCode=C;};YAHOO.widget.AutoComplete.prototype._onTextboxKeyPress=function(A,B){var C=A.keyCode;if(YAHOO.env.ua.opera||(navigator.userAgent.toLowerCase().indexOf("mac")!=-1)&&(YAHOO.env.ua.webkit<420)){switch(C){case 9:if(B._bContainerOpen){if(B.delimChar){YAHOO.util.Event.stopEvent(A);}if(B._elCurListItem){B._selectItem(B._elCurListItem);}else{B._toggleContainer(false);}}break;case 13:if(B._bContainerOpen){YAHOO.util.Event.stopEvent(A);if(B._elCurListItem){B._selectItem(B._elCurListItem);}else{B._toggleContainer(false);}}break;default:break;}}else{if(C==229){B._enableIntervalDetection();}}};YAHOO.widget.AutoComplete.prototype._onTextboxKeyUp=function(A,C){var B=this.value;C._initProps();var D=A.keyCode;if(C._isIgnoreKey(D)){return;}if(C._nDelayID!=-1){clearTimeout(C._nDelayID);}C._nDelayID=setTimeout(function(){C._sendQuery(B);},(C.queryDelay*1000));};YAHOO.widget.AutoComplete.prototype._onTextboxFocus=function(A,B){if(!B._bFocused){B._elTextbox.setAttribute("autocomplete","off");B._bFocused=true;B._sInitInputValue=B._elTextbox.value;B.textboxFocusEvent.fire(B);YAHOO.log("Textbox focused","info",B.toString());}};YAHOO.widget.AutoComplete.prototype._onTextboxBlur=function(A,C){if(!C._bOverContainer||(C._nKeyCode==9)){if(!C._bItemSelected){var B=C._textMatchesOption();if(!C._bContainerOpen||(C._bContainerOpen&&(B===null))){if(C.forceSelection){C._clearSelection();}else{C.unmatchedItemSelectEvent.fire(C,C._sCurQuery);YAHOO.log("Unmatched item selected: "+C._sCurQuery,"info",C.toString());}}else{if(C.forceSelection){C._selectItem(B);}}}C._clearInterval();C._bFocused=false;if(C._sInitInputValue!==C._elTextbox.value){C.textboxChangeEvent.fire(C);}C.textboxBlurEvent.fire(C);YAHOO.log("Textbox blurred","info",C.toString());C._toggleContainer(false);}else{C._focus();}};YAHOO.widget.AutoComplete.prototype._onWindowUnload=function(A,B){if(B&&B._elTextbox&&B.allowBrowserAutocomplete){B._elTextbox.setAttribute("autocomplete","on");}};YAHOO.widget.AutoComplete.prototype.doBeforeSendQuery=function(A){return this.generateRequest(A);};YAHOO.widget.AutoComplete.prototype.getListItems=function(){var C=[],B=this._elList.childNodes;for(var A=B.length-1;A>=0;A--){C[A]=B[A];}return C;};YAHOO.widget.AutoComplete._cloneObject=function(D){if(!YAHOO.lang.isValue(D)){return D;}var F={};if(YAHOO.lang.isFunction(D)){F=D;}else{if(YAHOO.lang.isArray(D)){var E=[];for(var C=0,B=D.length;C<B;C++){E[C]=YAHOO.widget.AutoComplete._cloneObject(D[C]);}F=E;}else{if(YAHOO.lang.isObject(D)){for(var A in D){if(YAHOO.lang.hasOwnProperty(D,A)){if(YAHOO.lang.isValue(D[A])&&YAHOO.lang.isObject(D[A])||YAHOO.lang.isArray(D[A])){F[A]=YAHOO.widget.AutoComplete._cloneObject(D[A]);}else{F[A]=D[A];}}}}else{F=D;}}}return F;};perfUI.widgets.siteSearchType={"friend":0,"user":1,"video":2};perfUI.widgets.siteSearch=function(D,B,C){var A={"index":"friend,user,video","onItemSelect":null};this.userId=D||-1;this.container=B||null;this.searchBox=null;this.applicationCss="siteSearch";this.translations=[];this.getIndex=function(){return(C&&C.index)?C.index:A.index;};this.getOnItemSelect=function(){return(C&&C.index)?C.onItemSelect:A.onItemSelect;};};perfUI.widgets.siteSearch.prototype.appendDefaultMenuItems=function(){var D=perfUI.util.addEl;var A=YAHOO.util.Event;this.searchBox.appendItems=[];var C=this.getIndex().split(",");for(var B=0;B<C.length;B++){switch(C[B]){case"user":this.searchBox.appendItems.push({"userId":"-1","isMe":"false","displayName":"Search Users","thumbUrl":"","userCode":"","searchUrl":"http://www.perfspot.com/search.asp?q=","html":'<div><div class="PH_headerMenu_img PH_headerMenu_img_findFriend"></div><span class="searchMenu">'+this.translations[0]+"</span></div>"});break;case"video":this.searchBox.appendItems.push({"userId":"-2","isMe":"false","displayName":"Search Videos","thumbUrl":"","userCode":"","searchUrl":"http://www.perfspot.com/video2/search.asp?s=1&b=1&q=","html":'<div><div class="PH_headerMenu_img PH_headerMenu_img_videos"></div><span class="searchMenu">'+this.translations[1]+"</span></div>"});break;}}};perfUI.widgets.siteSearch.prototype.attachKeyDownEvent=function(A){var B=function(C){var D=C.keyCode;switch(D){case 13:if(!this.searchBox.hasResults()){location.href="http://www.perfspot.com/search.asp?q="+this.searchBox.getInputEl().value.trim();}break;default:return;}};YAHOO.util.Event.addListener(A,"keydown",B,this,true);};perfUI.widgets.siteSearch.prototype.loadSearchBox=function(){var D=perfUI.util.addEl;var B=D(this.container,"div",{"class":"autoSearch"});var A=D(B,"textbox",{"tabIndex":"-1"});var C=D(B,"div");this.searchBox=new perfUI.widgets.siteSearchBox(this.userId,A,C,this.getOnItemSelect());this.attachKeyDownEvent(A);};perfUI.widgets.siteSearch.prototype.load=function(){YAHOO.util.Dom.addClass(this.container,this.applicationCss);if(!this.searchBox){this.loadSearchBox();}this.appendDefaultMenuItems();};perfUI.widgets.siteSearchBox=function(J,N,L,M){var P=this;var O=YAHOO.util.Event;this.userId=J||-1;var C="/api/call.asp";var F=new YAHOO.util.XHRDataSource(C,["user","displayName","thumbUrl","userId"]);F.responseType=YAHOO.util.XHRDataSource.TYPE_XML;F.responseSchema={resultNode:"user",fields:["userId","isMe","displayName","thumbUrl","userCode"]};F.queryMatchContains=true;F.scriptQueryAppend="function=Members.GetFriendsAuto2&userid="+this.userId+"&deleted=0";var D=function(U,T,S){if(U.html!=undefined){return U.html;}else{U.searchUrl="http://www.perfspot.com/profile.asp?uid=";var R=P.formatSuggestion(U,T);var Q=['<img class="thumbnail" src="',U.thumbUrl,'"></img><span class="displayName">',R,"</span>"];return(Q.join(""));}return"";};var E={maxResultsDisplayed:6,alwaysShowContainer:false,autoHighlight:true,useShadow:true,resultTypeList:false,formatResult:D,suppressInputUpdate:true,minQueryLength:1,animVert:true,queryDelay:0};if(N.id.trim().length==0){N.id="pf_site_search_input_"+this.userId;}perfUI.widgets.siteSearchBox.superclass.constructor.call(this,N,L,F,E);var B=function(R,Q){};this.textboxBlurEvent.subscribe(B,this,true);var H=function(Q){var R=this.getInputEl().value.trim();if(R.length>0){this._sendQuery(R);}};this.textboxFocusEvent.subscribe(H,this,true);var A=function(R,Q){};this.dataRequestEvent.subscribe(A);var G=function(R,Q){};var K=function(T,S){var U=S[2];if(!U){return;}var R=this.getInputEl();var Q=R.value.trim();if(U.userCode.length>0){R.value=U.displayName;Q=U.userCode;}location.href=U.searchUrl+Q;};var I=M||K;this.itemSelectEvent.subscribe(I,this,true);};YAHOO.extend(perfUI.widgets.siteSearchBox,YAHOO.widget.AutoComplete);perfUI.widgets.siteSearchBox.prototype.containerCollapseEventCB=function(){var A=this.getInputEl();if(A.value.trim().length>0){this.showFooterOnly();}};perfUI.widgets.siteSearchBox.prototype.hasResults=function(){var D=this.getListEl();if(!D.childNodes||D.childNodes.length==0){return false;}var B=D.childNodes;for(var C=0;C<B.length;C++){var A=B[C];if(A.style.display!="none"){return true;}}return false;};perfUI.widgets.siteSearchBox.prototype.resetFooterSize=function(A){this._elContent.style.display="block";this._elContent.style.height="44px";this._elShadow.style.height="46px";if(!A){this.containerCollapseEvent.subscribe(this.containerCollapseEventCB,this,true);}};perfUI.widgets.siteSearchBox.prototype.showFooterOnly=function(){if(this._elList){YAHOO.util.Event.purgeElement(this._elList,true);this._elList.innerHTML="";}this._initListEl();if(this._elContent.style.display=="none"){this._toggleContainer(false);this.resetFooterSize(true);}else{this.containerCollapseEvent.unsubscribe(this.containerCollapseEventCB);this.containerCollapseEvent.subscribe(this.resetFooterSize,this,true);this._toggleContainer(false);}};perfUI.widgets.siteSearchBox.prototype.formatSuggestion=function(A,E){var D=[];var G=A.displayName.split(" ");var F=false;for(var C=0;C<G.length;C++){var B=G[C];if(!F){var H=B.toLowerCase().indexOf(E.toLowerCase());if(H==0){if(H>0){D.push(B.substr(0,H));}D.push(" ","<strong>",B.substr(H,E.length),"</strong>",B.substr(H+E.length));F=true;}else{D.push(" ",B);}}else{D.push(" ",B);}}return D.join("").trim();};