You are on page 1of 126

if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){v ar A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=(""+A[C]).split(".");E=Y AHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];} }return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){ret urn B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHO O.env.modules,B,H,G,F,C;if(!I[A]){I[A]={versions:[],builds:[]};}B=I[A];H=D.versi on;G=D.build;F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.pus h(H);B.builds.push(G);B.mainClass=E;for(C=0;C<F.length;C=C+1){F[C](B);}if(E){E.

V ERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn" );}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=functio n(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,ope ra:0,gecko:0,webkit:0,mobile:null,air:0,caja:0},B=navigator.userAgent,A;if((/KHT ML/).test(B)){C.webkit=1;}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webki t=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple";}else{A=B.match(/Nok iaN[^\/]*/);if(A){C.mobile=A[0];}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){C.air=A[ 0];}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFlo at(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE \s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/) ;if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]) ;}}}}}A=B.match(/Caja\/([^\s]*)/);if(A&&A[1]){C.caja=parseFloat(A[1]);}return C; }();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==type of YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B ){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})(); YAHOO.lang=YAHOO.lang||{};(function(){var B=YAHOO.lang,F="[object Array]",C="[ob ject Function]",A=Object.prototype,E=["toString","valueOf"],D={isArray:function( G){return A.toString.apply(G)===F;},isBoolean:function(G){return typeof G==="boo lean";},isFunction:function(G){return A.toString.apply(G)===C;},isNull:function( G){return G===null;},isNumber:function(G){return typeof G==="number"&&isFinite(G );},isObject:function(G){return(G&&(typeof G==="object"||B.isFunction(G)))||fals e;},isString:function(G){return typeof G==="string";},isUndefined:function(G){re turn typeof G==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(I,H){var G,K ,J;for(G=0;G<E.length;G=G+1){K=E[G];J=H[K];if(B.isFunction(J)&&J!=A[K]){I[K]=J;} }}:function(){},extend:function(J,K,I){if(!K||!J){throw new Error("extend failed , please check that "+"all dependencies are included.");}var H=function(){},G;H. prototype=K.prototype;J.prototype=new H();J.prototype.constructor=J;J.superclass =K.prototype;if(K.prototype.constructor==A.constructor){K.prototype.constructor= K;}if(I){for(G in I){if(B.hasOwnProperty(I,G)){J.prototype[G]=I[G];}}B._IEEnumFi x(J.prototype,I);}},augmentObject:function(K,J){if(!J||!K){throw new Error("Abso rb failed, verify dependencies.");}var G=arguments,I,L,H=G[2];if(H&&H!==true){fo r(I=2;I<G.length;I=I+1){K[G[I]]=J[G[I]];}}else{for(L in J){if(H||!(L in K)){K[L] =J[L];}}B._IEEnumFix(K,J);}},augmentProto:function(J,I){if(!I||!J){throw new Err or("Augment failed, verify dependencies.");}var G=[J.prototype,I.prototype],H;fo r(H=2;H<arguments.length;H=H+1){G.push(arguments[H]);}B.augmentObject.apply(this ,G);},dump:function(G,L){var I,K,N=[],O="{...}",H="f(){...}",M=", ",J=" => ";if( !B.isObject(G)){return G+"";}else{if(G instanceof Date||("nodeType"in G&&"tagNam e"in G)){return G;}else{if(B.isFunction(G)){return H;}}}L=(B.isNumber(L))?L:3;if (B.isArray(G)){N.push("[");for(I=0,K=G.length;I<K;I=I+1){if(B.isObject(G[I])){N. push((L>0)?B.dump(G[I],L-1):O);}else{N.push(G[I]);}N.push(M);}if(N.length>1){N.p op();}N.push("]");}else{N.push("{");for(I in G){if(B.hasOwnProperty(G,I)){N.push (I+J);if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O);}else{N.push(G[I]);} N.push(M);}}if(N.length>1){N.pop();}N.push("}");}return N.join("");},substitute: function(V,H,O){var L,K,J,R,S,U,Q=[],I,M="dump",P=" ",G="{",T="}",N;for(;;){L=V. lastIndexOf(G);if(L<0){break;}K=V.indexOf(T,L);if(L+1>=K){break;}I=V.substring(L +1,K);R=I;U=null;J=R.indexOf(P);if(J>-1){U=R.substring(J+1);R=R.substring(0,J);} S=H[R];if(O){S=O(R,S,U);}if(B.isObject(S)){if(B.isArray(S)){S=B.dump(S,parseInt( U,10));}else{U=U||"";N=U.indexOf(M);if(N>-1){U=U.substring(4);}if(S.toString===A .toString||N>-1){S=B.dump(S,parseInt(U,10));}else{S=S.toString();}}}else{if(!B.i sString(S)&&!B.isNumber(S)){S="~-"+Q.length+"-~";Q[Q.length]=I;}}V=V.substring(0 ,L)+S+V.substring(K+1);}for(L=Q.length-1;L>=0;L=L-1){V=V.replace(new RegExp("~-"

+L+"-~"),"{"+Q[L]+"}","g");}return V;},trim:function(G){try{return G.replace(/^\ s+|\s+$/g,"");}catch(H){return G;}},merge:function(){var J={},H=arguments,G=H.le ngth,I;for(I=0;I<G;I=I+1){B.augmentObject(J,H[I],true);}return J;},later:functio n(N,H,O,J,K){N=N||0;H=H||{};var I=O,M=J,L,G;if(B.isString(O)){I=H[O];}if(!I){thr ow new TypeError("method undefined");}if(!B.isArray(M)){M=[J];}L=function(){I.ap ply(H,M);};G=(K)?setInterval(L,N):setTimeout(L,N);return{interval:K,cancel:funct ion(){if(this.interval){clearInterval(G);}else{clearTimeout(G);}}};},isValue:fun ction(G){return(B.isObject(G)||B.isString(G)||B.isNumber(G)||B.isBoolean(G));}}; B.hasOwnProperty=(A.hasOwnProperty)?function(G,H){return G&&G.hasOwnProperty(H); }:function(G,H){return!B.isUndefined(G[H])&&G.constructor.prototype[H]!==G[H];}; D.augmentObject(B,D,true);YAHOO.util.Lang=B;B.augment=B.augmentProto;YAHOO.augme nt=B.augmentProto;YAHOO.extend=B.extend;})();YAHOO.register("yahoo",YAHOO,{versi on:"2.7.0",build:"1799"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counte r||0;var E=YAHOO.util,L=YAHOO.lang,m=YAHOO.env.ua,A=YAHOO.lang.trim,d={},h={},N= /^t(?:able|d|h)$/i,X=/color$/i,K=window.document,W=K.documentElement,e="ownerDoc ument",n="defaultView",v="documentElement",t="compatMode",b="offsetLeft",P="offs etTop",u="offsetParent",Z="parentNode",l="nodeType",C="tagName",O="scrollLeft",i ="scrollTop",Q="getBoundingClientRect",w="getComputedStyle",a="currentStyle",M=" CSS1Compat",c="BackCompat",g="class",F="className",J="",B=" ",s="(?:^|\\s)",k="( ?= |$)",U="g",p="position",f="fixed",V="relative",j="left",o="top",r="medium",q= "borderLeftWidth",R="borderTopWidth",D=m.opera,I=m.webkit,H=m.gecko,T=m.ie;E.Dom ={CUSTOM_ATTRIBUTES:(!W.hasAttribute)?{"for":"htmlFor","class":F}:{"htmlFor":"fo r","className":g},get:function(y){var AA,Y,z,x,G;if(y){if(y[l]||y.item){return y ;}if(typeof y==="string"){AA=y;y=K.getElementById(y);if(y&&y.id===AA){return y;} else{if(y&&K.all){y=null;Y=K.all[AA];for(x=0,G=Y.length;x<G;++x){if(Y[x].id===AA ){return Y[x];}}}}return y;}if(y.DOM_EVENTS){y=y.get("element");}if("length"in y ){z=[];for(x=0,G=y.length;x<G;++x){z[z.length]=E.Dom.get(y[x]);}return z;}return y;}return null;},getComputedStyle:function(G,Y){if(window[w]){return G[e][n][w] (G,null)[Y];}else{if(G[a]){return E.Dom.IE_ComputedStyle.get(G,Y);}}},getStyle:f unction(G,Y){return E.Dom.batch(G,E.Dom._getStyle,Y);},_getStyle:function(){if(w indow[w]){return function(G,y){y=(y==="float")?y="cssFloat":E.Dom._toCamel(y);va r x=G.style[y],Y;if(!x){Y=G[e][n][w](G,null);if(Y){x=Y[y];}}return x;};}else{if( W[a]){return function(G,y){var x;switch(y){case"opacity":x=100;try{x=G.filters[" DXImageTransform.Microsoft.Alpha"].opacity;}catch(z){try{x=G.filters("alpha").op acity;}catch(Y){}}return x/100;case"float":y="styleFloat";default:y=E.Dom._toCam el(y);x=G[a]?G[a][y]:null;return(G.style[y]||x);}};}}}(),setStyle:function(G,Y,x ){E.Dom.batch(G,E.Dom._setStyle,{prop:Y,val:x});},_setStyle:function(){if(T){ret urn function(Y,G){var x=E.Dom._toCamel(G.prop),y=G.val;if(Y){switch(x){case"opac ity":if(L.isString(Y.style.filter)){Y.style.filter="alpha(opacity="+y*100+")";if (!Y[a]||!Y[a].hasLayout){Y.style.zoom=1;}}break;case"float":x="styleFloat";defau lt:Y.style[x]=y;}}else{}};}else{return function(Y,G){var x=E.Dom._toCamel(G.prop ),y=G.val;if(Y){if(x=="float"){x="cssFloat";}Y.style[x]=y;}else{}};}}(),getXY:fu nction(G){return E.Dom.batch(G,E.Dom._getXY);},_canPosition:function(G){return(E .Dom._getStyle(G,"display")!=="none"&&E.Dom._inDoc(G));},_getXY:function(){if(K[ v][Q]){return function(y){var z,Y,AA,AF,AE,AD,AC,G,x,AB=Math.floor,AG=false;if(E .Dom._canPosition(y)){AA=y[Q]();AF=y[e];z=E.Dom.getDocumentScrollLeft(AF);Y=E.Do m.getDocumentScrollTop(AF);AG=[AB(AA[j]),AB(AA[o])];if(T&&m.ie<8){AE=2;AD=2;AC=A F[t];G=S(AF[v],q);x=S(AF[v],R);if(m.ie===6){if(AC!==c){AE=0;AD=0;}}if((AC==c)){i f(G!==r){AE=parseInt(G,10);}if(x!==r){AD=parseInt(x,10);}}AG[0]-=AE;AG[1]-=AD;}i f((Y||z)){AG[0]+=z;AG[1]+=Y;}AG[0]=AB(AG[0]);AG[1]=AB(AG[1]);}else{}return AG;}; }else{return function(y){var x,Y,AA,AB,AC,z=false,G=y;if(E.Dom._canPosition(y)){ z=[y[b],y[P]];x=E.Dom.getDocumentScrollLeft(y[e]);Y=E.Dom.getDocumentScrollTop(y [e]);AC=((H||m.webkit>519)?true:false);while((G=G[u])){z[0]+=G[b];z[1]+=G[P];if( AC){z=E.Dom._calcBorders(G,z);}}if(E.Dom._getStyle(y,p)!==f){G=y;while((G=G[Z])& &G[C]){AA=G[i];AB=G[O];if(H&&(E.Dom._getStyle(G,"overflow")!=="visible")){z=E.Do m._calcBorders(G,z);}if(AA||AB){z[0]-=AB;z[1]-=AA;}}z[0]+=x;z[1]+=Y;}else{if(D){ z[0]-=x;z[1]-=Y;}else{if(I||H){z[0]+=x;z[1]+=Y;}}}z[0]=Math.floor(z[0]);z[1]=Mat h.floor(z[1]);}else{}return z;};}}(),getX:function(G){var Y=function(x){return E .Dom.getXY(x)[0];};return E.Dom.batch(G,Y,E.Dom,true);},getY:function(G){var Y=f unction(x){return E.Dom.getXY(x)[1];};return E.Dom.batch(G,Y,E.Dom,true);},setXY

:function(G,x,Y){E.Dom.batch(G,E.Dom._setXY,{pos:x,noRetry:Y});},_setXY:function (G,z){var AA=E.Dom._getStyle(G,p),y=E.Dom.setStyle,AD=z.pos,Y=z.noRetry,AB=[pars eInt(E.Dom.getComputedStyle(G,j),10),parseInt(E.Dom.getComputedStyle(G,o),10)],A C,x;if(AA=="static"){AA=V;y(G,p,AA);}AC=E.Dom._getXY(G);if(!AD||AC===false){retu rn false;}if(isNaN(AB[0])){AB[0]=(AA==V)?0:G[b];}if(isNaN(AB[1])){AB[1]=(AA==V)? 0:G[P];}if(AD[0]!==null){y(G,j,AD[0]-AC[0]+AB[0]+"px");}if(AD[1]!==null){y(G,o,A D[1]-AC[1]+AB[1]+"px");}if(!Y){x=E.Dom._getXY(G);if((AD[0]!==null&&x[0]!=AD[0])| |(AD[1]!==null&&x[1]!=AD[1])){E.Dom._setXY(G,{pos:AD,noRetry:true});}}},setX:fun ction(Y,G){E.Dom.setXY(Y,[G,null]);},setY:function(G,Y){E.Dom.setXY(G,[null,Y]); },getRegion:function(G){var Y=function(x){var y=false;if(E.Dom._canPosition(x)){ y=E.Region.getRegion(x);}else{}return y;};return E.Dom.batch(G,Y,E.Dom,true);},g etClientWidth:function(){return E.Dom.getViewportWidth();},getClientHeight:funct ion(){return E.Dom.getViewportHeight();},getElementsByClassName:function(AB,AF,A C,AE,x,AD){AB=L.trim(AB);AF=AF||"*";AC=(AC)?E.Dom.get(AC):null||K;if(!AC){return [];}var Y=[],G=AC.getElementsByTagName(AF),z=E.Dom.hasClass;for(var y=0,AA=G.len gth;y<AA;++y){if(z(G[y],AB)){Y[Y.length]=G[y];}}if(AE){E.Dom.batch(Y,AE,x,AD);}r eturn Y;},hasClass:function(Y,G){return E.Dom.batch(Y,E.Dom._hasClass,G);},_hasC lass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom.getAttribute(x,F)||J;if(Y.exec ){G=Y.test(y);}else{G=Y&&(B+y+B).indexOf(B+Y+B)>-1;}}else{}return G;},addClass:f unction(Y,G){return E.Dom.batch(Y,E.Dom._addClass,G);},_addClass:function(x,Y){v ar G=false,y;if(x&&Y){y=E.Dom.getAttribute(x,F)||J;if(!E.Dom._hasClass(x,Y)){E.D om.setAttribute(x,F,A(y+B+Y));G=true;}}else{}return G;},removeClass:function(Y,G ){return E.Dom.batch(Y,E.Dom._removeClass,G);},_removeClass:function(y,x){var Y= false,AA,z,G;if(y&&x){AA=E.Dom.getAttribute(y,F)||J;E.Dom.setAttribute(y,F,AA.re place(E.Dom._getClassRegex(x),J));z=E.Dom.getAttribute(y,F);if(AA!==z){E.Dom.set Attribute(y,F,A(z));Y=true;if(E.Dom.getAttribute(y,F)===""){G=(y.hasAttribute&&y .hasAttribute(g))?g:F;y.removeAttribute(G);}}}else{}return Y;},replaceClass:func tion(x,Y,G){return E.Dom.batch(x,E.Dom._replaceClass,{from:Y,to:G});},_replaceCl ass:function(y,x){var Y,AB,AA,G=false,z;if(y&&x){AB=x.from;AA=x.to;if(!AA){G=fal se;}else{if(!AB){G=E.Dom._addClass(y,x.to);}else{if(AB!==AA){z=E.Dom.getAttribut e(y,F)||J;Y=(B+z.replace(E.Dom._getClassRegex(AB),B+AA)).split(E.Dom._getClassRe gex(AA));Y.splice(1,0,B+AA);E.Dom.setAttribute(y,F,A(Y.join(J)));G=true;}}}}else {}return G;},generateId:function(G,x){x=x||"yui-gen";var Y=function(y){if(y&&y.i d){return y.id;}var z=x+YAHOO.env._id_counter++;if(y){if(y[e].getElementById(z)) {return E.Dom.generateId(y,z+x);}y.id=z;}return z;};return E.Dom.batch(G,Y,E.Dom ,true)||Y.apply(E.Dom,arguments);},isAncestor:function(Y,x){Y=E.Dom.get(Y);x=E.D om.get(x);var G=false;if((Y&&x)&&(Y[l]&&x[l])){if(Y.contains&&Y!==x){G=Y.contain s(x);}else{if(Y.compareDocumentPosition){G=!!(Y.compareDocumentPosition(x)&16);} }}else{}return G;},inDocument:function(G,Y){return E.Dom._inDoc(E.Dom.get(G),Y); },_inDoc:function(Y,x){var G=false;if(Y&&Y[C]){x=x||Y[e];G=E.Dom.isAncestor(x[v] ,Y);}else{}return G;},getElementsBy:function(Y,AF,AB,AD,y,AC,AE){AF=AF||"*";AB=( AB)?E.Dom.get(AB):null||K;if(!AB){return[];}var x=[],G=AB.getElementsByTagName(A F);for(var z=0,AA=G.length;z<AA;++z){if(Y(G[z])){if(AE){x=G[z];break;}else{x[x.l ength]=G[z];}}}if(AD){E.Dom.batch(x,AD,y,AC);}return x;},getElementBy:function(x ,G,Y){return E.Dom.getElementsBy(x,G,Y,null,null,null,true);},batch:function(x,A B,AA,z){var y=[],Y=(z)?AA:window;x=(x&&(x[C]||x.item))?x:E.Dom.get(x);if(x&&AB){ if(x[C]||x.length===undefined){return AB.call(Y,x,AA);}for(var G=0;G<x.length;++ G){y[y.length]=AB.call(Y,x[G],AA);}}else{return false;}return y;},getDocumentHei ght:function(){var Y=(K[t]!=M||I)?K.body.scrollHeight:W.scrollHeight,G=Math.max( Y,E.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var Y=(K[t]! =M||I)?K.body.scrollWidth:W.scrollWidth,G=Math.max(Y,E.Dom.getViewportWidth());r eturn G;},getViewportHeight:function(){var G=self.innerHeight,Y=K[t];if((Y||T)&& !D){G=(Y==M)?W.clientHeight:K.body.clientHeight;}return G;},getViewportWidth:fun ction(){var G=self.innerWidth,Y=K[t];if(Y||T){G=(Y==M)?W.clientWidth:K.body.clie ntWidth;}return G;},getAncestorBy:function(G,Y){while((G=G[Z])){if(E.Dom._testEl ement(G,Y)){return G;}}return null;},getAncestorByClassName:function(Y,G){Y=E.Do m.get(Y);if(!Y){return null;}var x=function(y){return E.Dom.hasClass(y,G);};retu rn E.Dom.getAncestorBy(Y,x);},getAncestorByTagName:function(Y,G){Y=E.Dom.get(Y); if(!Y){return null;}var x=function(y){return y[C]&&y[C].toUpperCase()==G.toUpper Case();};return E.Dom.getAncestorBy(Y,x);},getPreviousSiblingBy:function(G,Y){wh

ile(G){G=G.previousSibling;if(E.Dom._testElement(G,Y)){return G;}}return null;}, getPreviousSibling:function(G){G=E.Dom.get(G);if(!G){return null;}return E.Dom.g etPreviousSiblingBy(G);},getNextSiblingBy:function(G,Y){while(G){G=G.nextSibling ;if(E.Dom._testElement(G,Y)){return G;}}return null;},getNextSibling:function(G) {G=E.Dom.get(G);if(!G){return null;}return E.Dom.getNextSiblingBy(G);},getFirstC hildBy:function(G,x){var Y=(E.Dom._testElement(G.firstChild,x))?G.firstChild:nul l;return Y||E.Dom.getNextSiblingBy(G.firstChild,x);},getFirstChild:function(G,Y) {G=E.Dom.get(G);if(!G){return null;}return E.Dom.getFirstChildBy(G);},getLastChi ldBy:function(G,x){if(!G){return null;}var Y=(E.Dom._testElement(G.lastChild,x)) ?G.lastChild:null;return Y||E.Dom.getPreviousSiblingBy(G.lastChild,x);},getLastC hild:function(G){G=E.Dom.get(G);return E.Dom.getLastChildBy(G);},getChildrenBy:f unction(Y,y){var x=E.Dom.getFirstChildBy(Y,y),G=x?[x]:[];E.Dom.getNextSiblingBy( x,function(z){if(!y||y(z)){G[G.length]=z;}return false;});return G;},getChildren :function(G){G=E.Dom.get(G);if(!G){}return E.Dom.getChildrenBy(G);},getDocumentS crollLeft:function(G){G=G||K;return Math.max(G[v].scrollLeft,G.body.scrollLeft); },getDocumentScrollTop:function(G){G=G||K;return Math.max(G[v].scrollTop,G.body. scrollTop);},insertBefore:function(Y,G){Y=E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G| |!G[Z]){return null;}return G[Z].insertBefore(Y,G);},insertAfter:function(Y,G){Y =E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){return null;}if(G.nextSibling){re turn G[Z].insertBefore(Y,G.nextSibling);}else{return G[Z].appendChild(Y);}},getC lientRegion:function(){var x=E.Dom.getDocumentScrollTop(),Y=E.Dom.getDocumentScr ollLeft(),y=E.Dom.getViewportWidth()+Y,G=E.Dom.getViewportHeight()+x;return new E.Region(x,y,G,Y);},setAttribute:function(Y,G,x){G=E.Dom.CUSTOM_ATTRIBUTES[G]||G ;Y.setAttribute(G,x);},getAttribute:function(Y,G){G=E.Dom.CUSTOM_ATTRIBUTES[G]|| G;return Y.getAttribute(G);},_toCamel:function(Y){var x=d;function G(y,z){return z.toUpperCase();}return x[Y]||(x[Y]=Y.indexOf("-")===-1?Y:Y.replace(/-([a-z])/g i,G));},_getClassRegex:function(Y){var G;if(Y!==undefined){if(Y.exec){G=Y;}else{ G=h[Y];if(!G){Y=Y.replace(E.Dom._patterns.CLASS_RE_TOKENS,"\\$1");G=h[Y]=new Reg Exp(s+Y+k,U);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/( [\.\(\)\^\$\*\+\?\|\[\]\{\}])/g},_testElement:function(G,Y){return G&&G[l]==1&&( !Y||Y(G));},_calcBorders:function(x,y){var Y=parseInt(E.Dom[w](x,R),10)||0,G=par seInt(E.Dom[w](x,q),10)||0;if(H){if(N.test(x[C])){Y=0;G=0;}}y[0]+=G;y[1]+=Y;retu rn y;}};var S=E.Dom[w];if(m.opera){E.Dom[w]=function(Y,G){var x=S(Y,G);if(X.test (G)){x=E.Dom.Color.toRGB(x);}return x;};}if(m.webkit){E.Dom[w]=function(Y,G){var x=S(Y,G);if(x==="rgba(0, 0, 0, 0)"){x="transparent";}return x;};}})();YAHOO.uti l.Region=function(C,D,A,B){this.top=C;this.y=C;this[1]=C;this.right=D;this.botto m=A;this.left=B;this.x=B;this[0]=B;this.width=this.right-this.left;this.height=t his.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(A){return(A. left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);}; YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(th is.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=M ath.max(this.top,E.top),D=Math.min(this.right,E.right),A=Math.min(this.bottom,E. bottom),B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region (C,D,A,B);}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top),D=Math.max(this.right,E.right),A=Math.max(this.botto m,E.bottom),B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);} ;YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this. top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", heig ht: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=func tion(D){var F=YAHOO.util.Dom.getXY(D),C=F[1],E=F[0]+D.offsetWidth,A=F[1]+D.offse tHeight,B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function (A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}YAHOO.util.Point.superclass.const ructor.call(this,B,A,B,A);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(fu nction(){var B=YAHOO.util,A="clientTop",F="clientLeft",J="parentNode",K="right", W="hasLayout",I="px",U="opacity",L="auto",D="borderLeftWidth",G="borderTopWidth" ,P="borderRightWidth",V="borderBottomWidth",S="visible",Q="transparent",N="heigh t",E="width",H="style",T="currentStyle",R=/^width|height$/,O=/^(\d[.\d]*)+(em|ex |px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,M={get:functi on(X,Z){var Y="",a=X[T][Z];if(Z===U){Y=B.Dom.getStyle(X,U);}else{if(!a||(a.index Of&&a.indexOf(I)>-1)){Y=a;}else{if(B.Dom.IE_COMPUTED[Z]){Y=B.Dom.IE_COMPUTED[Z](

X,Z);}else{if(O.test(a)){Y=B.Dom.IE.ComputedStyle.getPixel(X,Z);}else{Y=a;}}}}re turn Y;},getOffset:function(Z,e){var b=Z[T][e],X=e.charAt(0).toUpperCase()+e.sub str(1),c="offset"+X,Y="pixel"+X,a="",d;if(b==L){d=Z[c];if(d===undefined){a=0;}a= d;if(R.test(e)){Z[H][e]=d;if(Z[c]>d){a=d-(Z[c]-d);}Z[H][e]=L;}}else{if(!Z[H][Y]& &!Z[H][e]){Z[H][e]=b;}a=Z[H][Y];}return a+I;},getBorderWidth:function(X,Z){var Y =null;if(!X[T][W]){X[H].zoom=1;}switch(Z){case G:Y=X[A];break;case V:Y=X.offsetH eight-X.clientHeight-X[A];break;case D:Y=X[F];break;case P:Y=X.offsetWidth-X.cli entWidth-X[F];break;}return Y+I;},getPixel:function(Y,X){var a=null,b=Y[T][K],Z= Y[T][X];Y[H][K]=Z;a=Y[H].pixelRight;Y[H][K]=b;return a+I;},getMargin:function(Y, X){var Z;if(Y[T][X]==L){Z=0+I;}else{Z=B.Dom.IE.ComputedStyle.getPixel(Y,X);}retu rn Z;},getVisibility:function(Y,X){var Z;while((Z=Y[T])&&Z[X]=="inherit"){Y=Y[J] ;}return(Z)?Z[X]:S;},getColor:function(Y,X){return B.Dom.Color.toRGB(Y[T][X])||Q ;},getBorderColor:function(Y,X){var Z=Y[T],a=Z[X]||Z.color;return B.Dom.Color.to RGB(B.Dom.Color.toHex(a));}},C={};C.top=C.right=C.bottom=C.left=C[E]=C[N]=M.getO ffset;C.color=M.getColor;C[G]=C[P]=C[V]=C[D]=M.getBorderWidth;C.marginTop=C.marg inRight=C.marginBottom=C.marginLeft=M.getMargin;C.visibility=M.getVisibility;C.b orderColor=C.borderTopColor=C.borderRightColor=C.borderBottomColor=C.borderLeftC olor=M.getBorderColor;B.Dom.IE_COMPUTED=C;B.Dom.IE_ComputedStyle=M;})();(functio n(){var C="toString",A=parseInt,B=RegExp,D=YAHOO.util;D.Dom.Color={KEYWORDS:{bla ck:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",pur ple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0" ,navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s *([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2}) $/i,re_hex3:/([0-9A-F])/gi,toRGB:function(E){if(!D.Dom.Color.re_RGB.test(E)){E=D .Dom.Color.toHex(E);}if(D.Dom.Color.re_hex.exec(E)){E="rgb("+[A(B.$1,16),A(B.$2, 16),A(B.$3,16)].join(", ")+")";}return E;},toHex:function(H){H=D.Dom.Color.KEYWO RDS[H]||H;if(D.Dom.Color.re_RGB.exec(H)){var G=(B.$1.length===1)?"0"+B.$1:Number (B.$1),F=(B.$2.length===1)?"0"+B.$2:Number(B.$2),E=(B.$3.length===1)?"0"+B.$3:Nu mber(B.$3);H=[G[C](16),F[C](16),E[C](16)].join("");}if(H.length<6){H=H.replace(D .Dom.Color.re_hex3,"$1$1");}if(H!=="transparent"&&H.indexOf("#")<0){H="#"+H;}ret urn H.toLowerCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.7.0" ,build:"1799"});YAHOO.util.CustomEvent=function(D,C,B,A){this.type=D;this.scope= C||window;this.silent=B;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subsc ribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEv ent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.Cu stomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype= {subscribe:function(A,B,C){if(!A){throw new Error("Invalid callback for subscrib er to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(A,B,C) ;}this.subscribers.push(new YAHOO.util.Subscriber(A,B,C));},unsubscribe:function (D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscr ibers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._del ete(B);E=true;}}return E;},fire:function(){this.lastError=null;var K=[],E=this.s ubscribers.length;if(!E&&this.silent){return true;}var I=[].slice.call(arguments ,0),G=true,D,J=false;if(!this.silent){}var C=this.subscribers.slice(),A=YAHOO.ut il.Event.throwErrors;for(D=0;D<E;++D){var M=C[D];if(!M){J=true;}else{if(!this.si lent){}var L=M.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FL AT){var B=null;if(I.length>0){B=I[0];}try{G=M.fn.call(L,B,M.obj);}catch(F){this. lastError=F;if(A){throw F;}}}else{try{G=M.fn.call(L,this.type,I,M.obj);}catch(H) {this.lastError=H;if(A){throw H;}}}if(false===G){if(!this.silent){}break;}}}retu rn(G!==false);},unsubscribeAll:function(){var A=this.subscribers.length,B;for(B= A-1;B>-1;B--){this._delete(B);}this.subscribers=[];return A;},_delete:function(A ){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers.spl ice(A,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"contex t: "+this.scope;}};YAHOO.util.Subscriber=function(A,B,C){this.fn=A;this.obj=YAHO O.lang.isUndefined(B)?null:B;this.overrideContext=C;};YAHOO.util.Subscriber.prot otype.getScope=function(A){if(this.overrideContext){if(this.overrideContext===tr ue){return this.obj;}else{return this.overrideContext;}}return A;};YAHOO.util.Su bscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B); }else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){ return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext|

|"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:3 8,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};var K=YAHOO.env.ua.ie?"focu sin":"focus";var L=YAHOO.env.ua.ie?"focusout":"blur";return{POLL_RETRYS:2000,POL L_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,l astError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO .env.ua.ie,_interval:null,_dri:null,DOMReady:false,throwErrors:false,startInterv al:function(){if(!this._interval){var M=this;var N=function(){M._tryPreloadAttac h();};this._interval=setInterval(N,this.POLL_INTERVAL);}},onAvailable:function(S ,O,Q,R,P){var M=(YAHOO.lang.isString(S))?[S]:S;for(var N=0;N<M.length;N=N+1){F.p ush({id:M[N],fn:O,obj:Q,overrideContext:R,checkReady:P});}C=this.POLL_RETRYS;thi s.startInterval();},onContentReady:function(P,M,N,O){this.onAvailable(P,M,N,O,tr ue);},onDOMReady:function(M,N,O){if(this.DOMReady){setTimeout(function(){var P=w indow;if(O){if(O===true){P=N;}else{P=O;}}M.call(P,"DOMReady",[],N);},0);}else{th is.DOMReadyEvent.subscribe(M,N,O);}},_addListener:function(O,M,Y,S,W,b){if(!Y||! Y.call){return false;}if(this._isValidCollection(O)){var Z=true;for(var T=0,V=O. length;T<V;++T){Z=this.on(O[T],M,Y,S,W)&&Z;}return Z;}else{if(YAHOO.lang.isStrin g(O)){var R=this.getEl(O);if(R){O=R;}else{this.onAvailable(O,function(){YAHOO.ut il.Event.on(O,M,Y,S,W);});return true;}}}if(!O){return false;}if("unload"==M&&S! ==this){J[J.length]=[O,M,Y,S,W];return true;}var N=O;if(W){if(W===true){N=S;}els e{N=W;}}var P=function(c){return Y.call(N,YAHOO.util.Event.getEvent(c,O),S);};va r a=[O,M,Y,P,N,S,W];var U=I.length;I[U]=a;if(this.useLegacyEvent(O,M)){var Q=thi s.getLegacyIndex(O,M);if(Q==-1||O!=G[Q][0]){Q=G.length;B[O.id+M]=Q;G[Q]=[O,M,O[" on"+M]];E[Q]=[];O["on"+M]=function(c){YAHOO.util.Event.fireLegacyEvent(YAHOO.uti l.Event.getEvent(c),Q);};}E[Q].push(a);}else{try{this._simpleAdd(O,M,P,b);}catch (X){this.lastError=X;this.removeListener(O,M,Y);return false;}}return true;},add Listener:function(N,Q,M,O,P){return this._addListener(N,Q,M,O,P,false);},addFocu sListener:function(N,M,O,P){return this._addListener(N,K,M,O,P,true);},removeFoc usListener:function(N,M){return this.removeListener(N,K,M);},addBlurListener:fun ction(N,M,O,P){return this._addListener(N,L,M,O,P,true);},removeBlurListener:fun ction(N,M){return this.removeListener(N,L,M);},fireLegacyEvent:function(R,P){var T=true,M,V,U,N,S;V=E[P].slice();for(var O=0,Q=V.length;O<Q;++O){U=V[O];if(U&&U[ this.WFN]){N=U[this.ADJ_SCOPE];S=U[this.WFN].call(N,R);T=(T&&S);}}M=G[P];if(M&&M [2]){M[2](R);}return T;},getLegacyIndex:function(N,O){var M=this.generateId(N)+O ;if(typeof B[M]=="undefined"){return-1;}else{return B[M];}},useLegacyEvent:funct ion(M,N){return(this.webkit&&this.webkit<419&&("click"==N||"dblclick"==N));},rem oveListener:function(N,M,V){var Q,T,X;if(typeof N=="string"){N=this.getEl(N);}el se{if(this._isValidCollection(N)){var W=true;for(Q=N.length-1;Q>-1;Q--){W=(this. removeListener(N[Q],M,V)&&W);}return W;}}if(!V||!V.call){return this.purgeElemen t(N,false,M);}if("unload"==M){for(Q=J.length-1;Q>-1;Q--){X=J[Q];if(X&&X[0]==N&&X [1]==M&&X[2]==V){J.splice(Q,1);return true;}}return false;}var R=null;var S=argu ments[3];if("undefined"===typeof S){S=this._getCacheIndex(N,M,V);}if(S>=0){R=I[S ];}if(!N||!R){return false;}if(this.useLegacyEvent(N,M)){var P=this.getLegacyInd ex(N,M);var O=E[P];if(O){for(Q=0,T=O.length;Q<T;++Q){X=O[Q];if(X&&X[this.EL]==N& &X[this.TYPE]==M&&X[this.FN]==V){O.splice(Q,1);break;}}}}else{try{this._simpleRe move(N,M,R[this.WFN],false);}catch(U){this.lastError=U;return false;}}delete I[S ][this.WFN];delete I[S][this.FN];I.splice(S,1);return true;},getTarget:function( O,N){var M=O.target||O.srcElement;return this.resolveTextNode(M);},resolveTextNo de:function(N){try{if(N&&3==N.nodeType){return N.parentNode;}}catch(M){}return N ;},getPageX:function(N){var M=N.pageX;if(!M&&0!==M){M=N.clientX||0;if(this.isIE) {M+=this._getScrollLeft();}}return M;},getPageY:function(M){var N=M.pageY;if(!N& &0!==N){N=M.clientY||0;if(this.isIE){N+=this._getScrollTop();}}return N;},getXY: function(M){return[this.getPageX(M),this.getPageY(M)];},getRelatedTarget:functio n(N){var M=N.relatedTarget;if(!M){if(N.type=="mouseout"){M=N.toElement;}else{if( N.type=="mouseover"){M=N.fromElement;}}}return this.resolveTextNode(M);},getTime :function(O){if(!O.time){var N=new Date().getTime();try{O.time=N;}catch(M){this. lastError=M;return N;}}return O.time;},stopEvent:function(M){this.stopPropagatio n(M);this.preventDefault(M);},stopPropagation:function(M){if(M.stopPropagation){ M.stopPropagation();}else{M.cancelBubble=true;}},preventDefault:function(M){if(M .preventDefault){M.preventDefault();}else{M.returnValue=false;}},getEvent:functi

on(O,M){var N=O||window.event;if(!N){var P=this.getEvent.caller;while(P){N=P.arg uments[0];if(N&&Event==N.constructor){break;}P=P.caller;}}return N;},getCharCode :function(N){var M=N.keyCode||N.charCode||0;if(YAHOO.env.ua.webkit&&(M in D)){M= D[M];}return M;},_getCacheIndex:function(Q,R,P){for(var O=0,N=I.length;O<N;O=O+1 ){var M=I[O];if(M&&M[this.FN]==P&&M[this.EL]==Q&&M[this.TYPE]==R){return O;}}ret urn-1;},generateId:function(M){var N=M.id;if(!N){N="yuievtautoid-"+A;++A;M.id=N; }return N;},_isValidCollection:function(N){try{return(N&&typeof N!=="string"&&N. length&&!N.tagName&&!N.alert&&typeof N[0]!=="undefined");}catch(M){return false; }},elCache:{},getEl:function(M){return(typeof M==="string")?document.getElementB yId(M):M;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOM Ready",this),_load:function(N){if(!H){H=true;var M=YAHOO.util.Event;M._ready();M ._tryPreloadAttach();}},_ready:function(N){var M=YAHOO.util.Event;if(!M.DOMReady ){M.DOMReady=true;M.DOMReadyEvent.fire();M._simpleRemove(document,"DOMContentLoa ded",M._ready);}},_tryPreloadAttach:function(){if(F.length===0){C=0;if(this._int erval){clearInterval(this._interval);this._interval=null;}return;}if(this.locked ){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.lo cked=true;var S=!H;if(!S){S=(C>0&&F.length>0);}var R=[];var T=function(V,W){var U=V;if(W.overrideContext){if(W.overrideContext===true){U=W.obj;}else{U=W.overrid eContext;}}W.fn.call(U,W.obj);};var N,M,Q,P,O=[];for(N=0,M=F.length;N<M;N=N+1){Q =F[N];if(Q){P=this.getEl(Q.id);if(P){if(Q.checkReady){if(H||P.nextSibling||!S){O .push(Q);F[N]=null;}}else{T(P,Q);F[N]=null;}}else{R.push(Q);}}}for(N=0,M=O.lengt h;N<M;N=N+1){Q=O[N];T(this.getEl(Q.id),Q);}C--;if(S){for(N=F.length-1;N>-1;N--){ Q=F[N];if(!Q||!Q.id){F.splice(N,1);}}this.startInterval();}else{if(this._interva l){clearInterval(this._interval);this._interval=null;}}this.locked=false;},purge Element:function(Q,R,T){var O=(YAHOO.lang.isString(Q))?this.getEl(Q):Q;var S=thi s.getListeners(O,T),P,M;if(S){for(P=S.length-1;P>-1;P--){var N=S[P];this.removeL istener(O,N.type,N.fn);}}if(R&&O&&O.childNodes){for(P=0,M=O.childNodes.length;P< M;++P){this.purgeElement(O.childNodes[P],R,T);}}},getListeners:function(O,M){var R=[],N;if(!M){N=[I,J];}else{if(M==="unload"){N=[J];}else{N=[I];}}var T=(YAHOO.l ang.isString(O))?this.getEl(O):O;for(var Q=0;Q<N.length;Q=Q+1){var V=N[Q];if(V){ for(var S=0,U=V.length;S<U;++S){var P=V[S];if(P&&P[this.EL]===T&&(!M||M===P[this .TYPE])){R.push({type:P[this.TYPE],fn:P[this.FN],obj:P[this.OBJ],adjust:P[this.O VERRIDE],scope:P[this.ADJ_SCOPE],index:S});}}}}return(R.length)?R:null;},_unload :function(T){var N=YAHOO.util.Event,Q,P,O,S,R,U=J.slice(),M;for(Q=0,S=J.length;Q <S;++Q){O=U[Q];if(O){M=window;if(O[N.ADJ_SCOPE]){if(O[N.ADJ_SCOPE]===true){M=O[N .UNLOAD_OBJ];}else{M=O[N.ADJ_SCOPE];}}O[N.FN].call(M,N.getEvent(T,O[N.EL]),O[N.U NLOAD_OBJ]);U[Q]=null;}}O=null;M=null;J=null;if(I){for(P=I.length-1;P>-1;P--){O= I[P];if(O){N.removeListener(O[N.EL],O[N.TYPE],O[N.FN],P);}}O=null;}G=null;N._sim pleRemove(window,"unload",N._unload);},_getScrollLeft:function(){return this._ge tScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll :function(){var M=document.documentElement,N=document.body;if(M&&(M.scrollTop||M .scrollLeft)){return[M.scrollTop,M.scrollLeft];}else{if(N){return[N.scrollTop,N. scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(wi ndow.addEventListener){return function(O,P,N,M){O.addEventListener(P,N,(M));};}e lse{if(window.attachEvent){return function(O,P,N,M){O.attachEvent("on"+P,N);};}e lse{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventList ener){return function(O,P,N,M){O.removeEventListener(P,N,(M));};}else{if(window. detachEvent){return function(N,O,M){N.detachEvent("on"+O,M);};}else{return funct ion(){};}}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;EU.o nFocus=EU.addFocusListener;EU.onBlur=EU.addBlurListener;if(EU.isIE){YAHOO.util.E vent.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var n= document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll("left" );clearInterval(EU._dri);EU._dri=null;EU._ready();n=null;}catch(ex){}},EU.POLL_I NTERVAL);}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){var r s=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU ._dri=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMCon tentLoaded",EU._ready);}}EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(win dow,"unload",EU._unload);EU._tryPreloadAttach();})();}YAHOO.util.EventProvider=f unction(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscrib ers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var

D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui_subscribers=th is.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].pu sh({fn:C,obj:F,overrideContext:E});}},unsubscribe:function(C,E,G){this.__yui_eve nts=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnPropert y(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:fun ction(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_event s=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H =A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.uti l.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe( A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var F= this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn, F[C].obj,F[C].overrideContext);}}}return I[G];},fireEvent:function(E,D,A,C){this .__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return nul l;}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F]);}return G.f ire.apply(G,B);},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events [A]){return true;}}return false;}};(function(){var A=YAHOO.util.Event,C=YAHOO.la ng;YAHOO.util.KeyListener=function(D,I,E,F){if(!D){}else{if(!I){}else{if(!E){}}} if(!F){F=YAHOO.util.KeyListener.KEYDOWN;}var G=new YAHOO.util.CustomEvent("keyPr essed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEve nt=new YAHOO.util.CustomEvent("disabled");if(C.isString(D)){D=document.getElemen tById(D);}if(C.isFunction(E)){G.subscribe(E);}else{G.subscribe(E.fn,E.scope,E.co rrectScope);}function H(O,N){if(!I.shift){I.shift=false;}if(!I.alt){I.alt=false; }if(!I.ctrl){I.ctrl=false;}if(O.shiftKey==I.shift&&O.altKey==I.alt&&O.ctrlKey==I .ctrl){var J,M=I.keys,L;if(YAHOO.lang.isArray(M)){for(var K=0;K<M.length;K++){J= M[K];L=A.getCharCode(O);if(J==L){G.fire(L,O);break;}}}else{L=A.getCharCode(O);if (M==L){G.fire(L,O);}}}}this.enable=function(){if(!this.enabled){A.on(D,F,H);this .enabledEvent.fire(I);}this.enabled=true;};this.disable=function(){if(this.enabl ed){A.removeListener(D,F,H);this.disabledEvent.fire(I);}this.enabled=false;};thi s.toString=function(){return"KeyListener ["+I.keys+"] "+D.tagName+(D.id?"["+D.id +"]":"");};};var B=YAHOO.util.KeyListener;B.KEYDOWN="keydown";B.KEYUP="keyup";B. 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.7.0",build:"1799"});YAHOO.re gister("yahoo-dom-event",YAHOO,{version:"2.7.0",build:"1799"});YAHOO.util.Histor y=(function(){var C=null;var K=null;var F=false;var D=[];var B=[];function I(){v ar M,L;L=top.location.href;M=L.indexOf("#");return M>=0?L.substr(M+1):null;}func tion 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));}}ret urn;}P=[];T=L.split("&");for(Q=0,R=T.length;Q<R;Q++){S=T[Q].split("=");if(S.leng th===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.onStat eChange(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.co ntentWindow.document;L=O.getElementById("state");N=L?L.innerText:null;M=I();setI nterval(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.joi n("&");}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.initialS tate=P;}}}T=Q[1].split("&");for(S=0,U=T.length;S<U;S++){W=T[S].split("=");if(W.l ength>=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"||d ocument.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=hi story.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:n ew YAHOO.util.CustomEvent("onLoad"),onReady:function(M,N,L){if(F){setTimeout(fun ction(){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 ca lling YAHOO.util.History.initialize");}O=escape(O);L=escape(L);P=null;if(N===tru e){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(Y AHOO.env.ua.opera&&typeof history.navigationMode!=="undefined"){history.navigati onMode="compatible";}if(typeof L==="string"){L=document.getElementById(L);}if(!L ||L.tagName.toUpperCase()!=="TEXTAREA"&&(L.tagName.toUpperCase()!=="INPUT"||L.ty pe!=="hidden"&&L.type!=="text")){throw new Error("Missing or invalid argument"); }K=L;if(YAHOO.env.ua.ie&&(typeof document.documentMode==="undefined"||document.d ocumentMode<8)){if(typeof M==="string"){M=document.getElementById(M);}if(!M||M.t agName.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 ar gument");}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 reg istered: "+N);}}L=[];for(N in D){if(YAHOO.lang.hasOwnProperty(D,N)){P=D[N];if(YA HOO.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&&(ty peof document.documentMode==="undefined"||document.documentMode<8)){return J(Q); }else{top.location.hash=Q;if(YAHOO.env.ua.webkit){B[history.length]=Q;A();}retur n true;}},getCurrentState:function(L){var M;if(typeof L!=="string"){throw new Er ror("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){v ar P,M,L,S,N,R,O;if(typeof Q!=="string"){throw new Error("Missing or invalid arg ument");}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;},getQueryStringParamete r: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 unes cape(P[1]);}}}return null;}};})();YAHOO.register("history",YAHOO.util.History,{v ersion:"2.7.0",build:"1799"});YAHOO.util.Connect={_msxml_progid:["Microsoft.XMLH TTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],_http_headers:{},_has_http_headers:f alse,_use_default_post_header:true,_default_post_header:"application/x-www-formurlencoded; charset=UTF-8",_default_form_header:"application/x-www-form-urlencod ed",_use_default_xhr_header:true,_default_xhr_header:"XMLHttpRequest",_has_defau lt_headers:true,_default_headers:{},_isFormSubmit:false,_isFileUpload:false,_for mNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transactio n_id:0,_submitElementValue:null,_hasSubmitListener:(function(){if(YAHOO.util.Eve nt){YAHOO.util.Event.addListener(document,"click",function(C){var B=YAHOO.util.E vent.getTarget(C),A=B.nodeName.toLowerCase();if((A==="input"||A==="button")&&(B. type&&B.type.toLowerCase()=="submit")){YAHOO.util.Connect._submitElementValue=en codeURIComponent(B.name)+"="+encodeURIComponent(B.value);}});return true;}return false;})(),startEvent:new YAHOO.util.CustomEvent("start"),completeEvent:new YAH OO.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"),_customEve nts:{onStart:["startEvent","start"],onComplete:["completeEvent","complete"],onSu ccess:["successEvent","success"],onFailure:["failureEvent","failure"],onUpload:[ "uploadEvent","upload"],onAbort:["abortEvent","abort"]},setProgId:function(A){th is._msxml_progid.unshift(A);},setDefaultPostHeader:function(A){if(typeof A=="str ing"){this._default_post_header=A;}else{if(typeof A=="boolean"){this._use_defaul t_post_header=A;}}},setDefaultXhrHeader:function(A){if(typeof A=="string"){this. _default_xhr_header=A;}else{this._use_default_xhr_header=A;}},setPollingInterval :function(A){if(typeof A=="number"&&isFinite(A)){this._polling_interval=A;}},cre ateXhrObject:function(F){var E,A;try{A=new XMLHttpRequest();E={conn:A,tId:F};}ca tch(D){for(var B=0;B<this._msxml_progid.length;++B){try{A=new ActiveXObject(this ._msxml_progid[B]);E={conn:A,tId:F};break;}catch(C){}}}finally{return E;}},getCo nnectionObject:function(A){var C;var D=this._transaction_id;try{if(!A){C=this.cr eateXhrObject(D);}else{C={};C.tId=D;C.isUpload=true;}if(C){this._transaction_id+ +;}}catch(B){}finally{return C;}},asyncRequest:function(F,C,E,A){var D=(this._is FileUpload)?this.getConnectionObject(true):this.getConnectionObject();var B=(E&& E.argument)?E.argument:null;if(!D){return null;}else{if(E&&E.customevents){this. initCustomEvents(D,E);}if(this._isFormSubmit){if(this._isFileUpload){this.upload File(D,E,C,A);return D;}if(F.toUpperCase()=="GET"){if(this._sFormData.length!==0 ){C+=((C.indexOf("?")==-1)?"?":"&")+this._sFormData;}}else{if(F.toUpperCase()==" POST"){A=A?this._sFormData+"&"+A:this._sFormData;}}}if(F.toUpperCase()=="GET"&&( E&&E.cache===false)){C+=((C.indexOf("?")==-1)?"?":"&")+"rnd="+new Date().valueOf ().toString();}D.conn.open(F,C,true);if(this._use_default_xhr_header){if(!this._ default_headers["X-Requested-With"]){this.initHeader("X-Requested-With",this._de fault_xhr_header,true);}}if((F.toUpperCase()==="POST"&&this._use_default_post_he ader)&&this._isFormSubmit===false){this.initHeader("Content-Type",this._default_ post_header);}if(this._has_default_headers||this._has_http_headers){this.setHead er(D);}this.handleReadyState(D,E);D.conn.send(A||"");if(this._isFormSubmit===tru e){this.resetFormState();}this.startEvent.fire(D,B);if(D.startEvent){D.startEven t.fire(D,B);}return D;}},initCustomEvents:function(A,C){var B;for(B in C.custome vents){if(this._customEvents[B][0]){A[this._customEvents[B][0]]=new YAHOO.util.C ustomEvent(this._customEvents[B][1],(C.scope)?C.scope:null);A[this._customEvents [B][0]].subscribe(C.customevents[B]);}}},handleReadyState:function(C,D){var B=th is;var A=(D&&D.argument)?D.argument:null;if(D&&D.timeout){this._timeOut[C.tId]=w indow.setTimeout(function(){B.abort(C,D,true);},D.timeout);}this._poll[C.tId]=wi ndow.setInterval(function(){if(C.conn&&C.conn.readyState===4){window.clearInterv al(B._poll[C.tId]);delete B._poll[C.tId];if(D&&D.timeout){window.clearTimeout(B. _timeOut[C.tId]);delete B._timeOut[C.tId];}B.completeEvent.fire(C,A);if(C.comple teEvent){C.completeEvent.fire(C,A);}B.handleTransactionResponse(C,D);}},this._po lling_interval);},handleTransactionResponse:function(F,G,A){var D,C;var B=(G&&G. argument)?G.argument:null;try{if(F.conn.status!==undefined&&F.conn.status!==0){D =F.conn.status;}else{D=13030;}}catch(E){D=13030;}if(D>=200&&D<300||D===1223){C=t his.createResponseObject(F,B);if(G&&G.success){if(!G.scope){G.success(C);}else{G .success.apply(G.scope,[C]);}}this.successEvent.fire(C);if(F.successEvent){F.suc cessEvent.fire(C);}}else{switch(D){case 12002:case 12029:case 12030:case 12031:c ase 12152:case 13030:C=this.createExceptionObject(F.tId,B,(A?A:false));if(G&&G.f ailure){if(!G.scope){G.failure(C);}else{G.failure.apply(G.scope,[C]);}}break;def ault:C=this.createResponseObject(F,B);if(G&&G.failure){if(!G.scope){G.failure(C) ;}else{G.failure.apply(G.scope,[C]);}}}this.failureEvent.fire(C);if(F.failureEve nt){F.failureEvent.fire(C);}}this.releaseObject(F);C=null;},createResponseObject :function(A,G){var D={};var I={};try{var C=A.conn.getAllResponseHeaders();var F= C.split("\n");for(var E=0;E<F.length;E++){var B=F[E].indexOf(":");if(B!=-1){I[F[ E].substring(0,B)]=F[E].substring(B+2);}}}catch(H){}D.tId=A.tId;D.status=(A.conn .status==1223)?204:A.conn.status;D.statusText=(A.conn.status==1223)?"No Content" :A.conn.statusText;D.getResponseHeader=I;D.getAllResponseHeaders=C;D.responseTex t=A.conn.responseText;D.responseXML=A.conn.responseXML;if(G){D.argument=G;}retur n D;},createExceptionObject:function(H,D,A){var F=0;var G="communication failure ";var C=-1;var B="transaction aborted";var E={};E.tId=H;if(A){E.status=C;E.statu sText=B;}else{E.status=F;E.statusText=G;}if(D){E.argument=D;}return E;},initHead er:function(A,D,C){var B=(C)?this._default_headers:this._http_headers;B[A]=D;if(

C){this._has_default_headers=true;}else{this._has_http_headers=true;}},setHeader :function(A){var B;if(this._has_default_headers){for(B in this._default_headers) {if(YAHOO.lang.hasOwnProperty(this._default_headers,B)){A.conn.setRequestHeader( B,this._default_headers[B]);}}}if(this._has_http_headers){for(B in this._http_he aders){if(YAHOO.lang.hasOwnProperty(this._http_headers,B)){A.conn.setRequestHead er(B,this._http_headers[B]);}}delete this._http_headers;this._http_headers={};th is._has_http_headers=false;}},resetDefaultHeaders:function(){delete this._defaul t_headers;this._default_headers={};this._has_default_headers=false;},setForm:fun ction(M,H,C){var L,B,K,I,P,J=false,F=[],O=0,E,G,D,N,A;this.resetFormState();if(t ypeof M=="string"){L=(document.getElementById(M)||document.forms[M]);}else{if(ty peof M=="object"){L=M;}else{return;}}if(H){this.createFrame(C?C:null);this._isFo rmSubmit=true;this._isFileUpload=true;this._formNode=L;return;}for(E=0,G=L.eleme nts.length;E<G;++E){B=L.elements[E];P=B.disabled;K=B.name;if(!P&&K){K=encodeURIC omponent(K)+"=";I=encodeURIComponent(B.value);switch(B.type){case"select-one":if (B.selectedIndex>-1){A=B.options[B.selectedIndex];F[O++]=K+encodeURIComponent((A .attributes.value&&A.attributes.value.specified)?A.value:A.text);}break;case"sel ect-multiple":if(B.selectedIndex>-1){for(D=B.selectedIndex,N=B.options.length;D< N;++D){A=B.options[D];if(A.selected){F[O++]=K+encodeURIComponent((A.attributes.v alue&&A.attributes.value.specified)?A.value:A.text);}}}break;case"radio":case"ch eckbox":if(B.checked){F[O++]=K+I;}break;case"file":case undefined:case"reset":ca se"button":break;case"submit":if(J===false){if(this._hasSubmitListener&&this._su bmitElementValue){F[O++]=this._submitElementValue;}J=true;}break;default:F[O++]= K+I;}}}this._isFormSubmit=true;this._sFormData=F.join("&");this.initHeader("Cont ent-Type",this._default_form_header);return this._sFormData;},resetFormState:fun ction(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;th is._sFormData="";},createFrame:function(A){var B="yuiIO"+this._transaction_id;va r C;if(YAHOO.env.ua.ie){C=document.createElement('<iframe id="'+B+'" name="'+B+' " />');if(typeof A=="boolean"){C.src="javascript:false";}}else{C=document.create Element("iframe");C.id=B;C.name=B;}C.style.position="absolute";C.style.top="-100 0px";C.style.left="-1000px";document.body.appendChild(C);},appendPostData:functi on(A){var D=[],B=A.split("&"),C,E;for(C=0;C<B.length;C++){E=B[C].indexOf("=");if (E!=-1){D[C]=document.createElement("input");D[C].type="hidden";D[C].name=decode URIComponent(B[C].substring(0,E));D[C].value=decodeURIComponent(B[C].substring(E +1));this._formNode.appendChild(D[C]);}}return D;},uploadFile:function(D,N,E,C){ var I="yuiIO"+D.tId,J="multipart/form-data",L=document.getElementById(I),O=this, K=(N&&N.argument)?N.argument:null,M,H,B,G;var A={action:this._formNode.getAttrib ute("action"),method:this._formNode.getAttribute("method"),target:this._formNode .getAttribute("target")};this._formNode.setAttribute("action",E);this._formNode. setAttribute("method","POST");this._formNode.setAttribute("target",I);if(YAHOO.e nv.ua.ie){this._formNode.setAttribute("encoding",J);}else{this._formNode.setAttr ibute("enctype",J);}if(C){M=this.appendPostData(C);}this._formNode.submit();this .startEvent.fire(D,K);if(D.startEvent){D.startEvent.fire(D,K);}if(N&&N.timeout){ this._timeOut[D.tId]=window.setTimeout(function(){O.abort(D,N,true);},N.timeout) ;}if(M&&M.length>0){for(H=0;H<M.length;H++){this._formNode.removeChild(M[H]);}}f or(B in A){if(YAHOO.lang.hasOwnProperty(A,B)){if(A[B]){this._formNode.setAttribu te(B,A[B]);}else{this._formNode.removeAttribute(B);}}}this.resetFormState();var F=function(){if(N&&N.timeout){window.clearTimeout(O._timeOut[D.tId]);delete O._t imeOut[D.tId];}O.completeEvent.fire(D,K);if(D.completeEvent){D.completeEvent.fir e(D,K);}G={tId:D.tId,argument:N.argument};try{G.responseText=L.contentWindow.doc ument.body?L.contentWindow.document.body.innerHTML:L.contentWindow.document.docu mentElement.textContent;G.responseXML=L.contentWindow.document.XMLDocument?L.con tentWindow.document.XMLDocument:L.contentWindow.document;}catch(P){}if(N&&N.uplo ad){if(!N.scope){N.upload(G);}else{N.upload.apply(N.scope,[G]);}}O.uploadEvent.f ire(G);if(D.uploadEvent){D.uploadEvent.fire(G);}YAHOO.util.Event.removeListener( L,"load",F);setTimeout(function(){document.body.removeChild(L);O.releaseObject(D );},100);};YAHOO.util.Event.addListener(L,"load",F);},abort:function(E,G,A){var D;var B=(G&&G.argument)?G.argument:null;if(E&&E.conn){if(this.isCallInProgress(E )){E.conn.abort();window.clearInterval(this._poll[E.tId]);delete this._poll[E.tI d];if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId];} D=true;}}else{if(E&&E.isUpload===true){var C="yuiIO"+E.tId;var F=document.getEle

mentById(C);if(F){YAHOO.util.Event.removeListener(F,"load");document.body.remove Child(F);if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E. tId];}D=true;}}else{D=false;}}if(D===true){this.abortEvent.fire(E,B);if(E.abortE vent){E.abortEvent.fire(E,B);}this.handleTransactionResponse(E,G,true);}return D ;},isCallInProgress:function(B){if(B&&B.conn){return B.conn.readyState!==4&&B.co nn.readyState!==0;}else{if(B&&B.isUpload===true){var A="yuiIO"+B.tId;return docu ment.getElementById(A)?true:false;}else{return false;}}},releaseObject:function( A){if(A&&A.conn){A.conn=null;A=null;}}};YAHOO.register("connection",YAHOO.util.C onnect,{version:"2.7.0",build:"1799"});(function(){var B=YAHOO.util;var A=functi on(D,C,E,F){if(!D){}this.init(D,C,E,F);};A.NAME="Anim";A.prototype={toString:fun ction(){var C=this.getEl()||{};var D=C.id||C.tagName;return(this.constructor.NAM E+": "+D);},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribut e:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|r ight$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(C,E,D){ return this.method(this.currentFrame,E,D-E,this.totalFrames);},setAttribute:func tion(C,F,E){var D=this.getEl();if(this.patterns.noNegatives.test(C)){F=(F>0)?F:0 ;}if("style"in D){B.Dom.setStyle(D,C,F+E);}else{if(C in D){D[C]=F;}}},getAttribu te:function(C){var E=this.getEl();var G=B.Dom.getStyle(E,C);if(G!=="auto"&&!this .patterns.offsetUnit.test(G)){return parseFloat(G);}var D=this.patterns.offsetAt tribute.exec(C)||[];var H=!!(D[3]);var F=!!(D[2]);if("style"in E){if(F||(B.Dom.g etStyle(E,"position")=="absolute"&&H)){G=E["offset"+D[0].charAt(0).toUpperCase() +D[0].substr(1)];}else{G=0;}}else{if(C in E){G=E[C];}}return G;},getDefaultUnit: function(C){if(this.patterns.defaultUnit.test(C)){return"px";}return"";},setRunt imeAttribute:function(D){var I;var E;var F=this.attributes;this.runtimeAttribute s[D]={};var H=function(J){return(typeof J!=="undefined");};if(!H(F[D]["to"])&&!H (F[D]["by"])){return false;}I=(H(F[D]["from"]))?F[D]["from"]:this.getAttribute(D );if(H(F[D]["to"])){E=F[D]["to"];}else{if(H(F[D]["by"])){if(I.constructor==Array ){E=[];for(var G=0,C=I.length;G<C;++G){E[G]=I[G]+F[D]["by"][G]*1;}}else{E=I+F[D] ["by"]*1;}}}this.runtimeAttributes[D].start=I;this.runtimeAttributes[D].end=E;th is.runtimeAttributes[D].unit=(H(F[D].unit))?F[D]["unit"]:this.getDefaultUnit(D); return true;},init:function(E,J,I,C){var D=false;var F=null;var H=0;E=B.Dom.get( E);this.attributes=J||{};this.duration=!YAHOO.lang.isUndefined(I)?I:1;this.metho d=C||B.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames =B.AnimMgr.fps;this.setEl=function(M){E=B.Dom.get(M);};this.getEl=function(){ret urn E;};this.isAnimated=function(){return D;};this.getStartTime=function(){retur n F;};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){re turn false;}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(B.A nimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){t his.totalFrames=1;}B.AnimMgr.registerElement(this);return true;};this.stop=funct ion(M){if(!this.isAnimated()){return false;}if(M){this.currentFrame=this.totalFr ames;this._onTween.fire();}B.AnimMgr.stop(this);};var L=function(){this.onStart. fire();this.runtimeAttributes={};for(var M in this.attributes){this.setRuntimeAt tribute(M);}D=true;H=0;F=new Date();};var K=function(){var O={duration:new Date( )-this.getStartTime(),currentFrame:this.currentFrame};O.toString=function(){retu rn("duration: "+O.duration+", currentFrame: "+O.currentFrame);};this.onTween.fir e(O);var N=this.runtimeAttributes;for(var M in N){this.setAttribute(M,this.doMet hod(M,N[M].start,N[M].end),N[M].unit);}H+=1;};var G=function(){var M=(new Date() -F)/1000;var N={duration:M,frames:H,fps:H/M};N.toString=function(){return("durat ion: "+N.duration+", frames: "+N.frames+", fps: "+N.fps);};D=false;H=0;this.onCo mplete.fire(N);};this._onStart=new B.CustomEvent("_start",this,true);this.onStar t=new B.CustomEvent("start",this);this.onTween=new B.CustomEvent("tween",this);t his._onTween=new B.CustomEvent("_tween",this,true);this.onComplete=new B.CustomE vent("complete",this);this._onComplete=new B.CustomEvent("_complete",this,true); this._onStart.subscribe(L);this._onTween.subscribe(K);this._onComplete.subscribe (G);}};B.Anim=A;})();YAHOO.util.AnimMgr=new function(){var C=null;var B=[];var A =0;this.fps=1000;this.delay=1;this.registerElement=function(F){B[B.length]=F;A+= 1;F._onStart.fire();this.start();};this.unRegister=function(G,F){F=F||E(G);if(!G .isAnimated()||F==-1){return false;}G._onComplete.fire();B.splice(F,1);A-=1;if(A <=0){this.stop();}return true;};this.start=function(){if(C===null){C=setInterval (this.run,this.delay);}};this.stop=function(H){if(!H){clearInterval(C);for(var G

=0,F=B.length;G<F;++G){this.unRegister(B[0],0);}B=[];C=null;A=0;}else{this.unReg ister(H);}};this.run=function(){for(var H=0,F=B.length;H<F;++H){var G=B[H];if(!G ||!G.isAnimated()){continue;}if(G.currentFrame<G.totalFrames||G.totalFrames===nu ll){G.currentFrame+=1;if(G.useSeconds){D(G);}G._onTween.fire();}else{YAHOO.util. AnimMgr.stop(G,H);}}};var E=function(H){for(var G=0,F=B.length;G<F;++G){if(B[G]= =H){return G;}}return-1;};var D=function(G){var J=G.totalFrames;var I=G.currentF rame;var H=(G.currentFrame*G.duration*1000/G.totalFrames);var F=(new Date()-G.ge tStartTime());var K=0;if(F<G.duration*1000){K=Math.round((F/H-1)*G.currentFrame) ;}else{K=J-(I+1);}if(K>0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1);}G.curr entFrame+=K;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D) {var F=E.length;var C=[];for(var B=0;B<F;++B){C[B]=[E[B][0],E[B][1]];}for(var A= 1;A<F;++A){for(B=0;B<F-A;++B){C[B][0]=(1-D)*C[B][0]+D*C[parseInt(B+1,10)][0];C[B ][1]=(1-D)*C[B][1]+D*C[parseInt(B+1,10)][1];}}return[C[0][0],C[0][1]];};};(funct ion(){var A=function(F,E,G,H){A.superclass.constructor.call(this,F,E,G,H);};A.NA ME="ColorAnim";A.DEFAULT_BGCOLOR="#fff";var C=YAHOO.util;YAHOO.extend(A,C.Anim); var D=A.superclass;var B=A.prototype;B.patterns.color=/color$/i;B.patterns.rgb=/ ^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;B.patterns.hex=/^#?([0-9A-F]{2 })([0-9A-F]{2})([0-9A-F]{2})$/i;B.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([ 0-9A-F]{1})$/i;B.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;B.parse Color=function(E){if(E.length==3){return E;}var F=this.patterns.hex.exec(E);if(F &&F.length==4){return[parseInt(F[1],16),parseInt(F[2],16),parseInt(F[3],16)];}F= this.patterns.rgb.exec(E);if(F&&F.length==4){return[parseInt(F[1],10),parseInt(F [2],10),parseInt(F[3],10)];}F=this.patterns.hex3.exec(E);if(F&&F.length==4){retu rn[parseInt(F[1]+F[1],16),parseInt(F[2]+F[2],16),parseInt(F[3]+F[3],16)];}return null;};B.getAttribute=function(E){var G=this.getEl();if(this.patterns.color.tes t(E)){var I=YAHOO.util.Dom.getStyle(G,E);var H=this;if(this.patterns.transparent .test(I)){var F=YAHOO.util.Dom.getAncestorBy(G,function(J){return!H.patterns.tra nsparent.test(I);});if(F){I=C.Dom.getStyle(F,E);}else{I=A.DEFAULT_BGCOLOR;}}}els e{I=D.getAttribute.call(this,E);}return I;};B.doMethod=function(F,J,G){var I;if( this.patterns.color.test(F)){I=[];for(var H=0,E=J.length;H<E;++H){I[H]=D.doMetho d.call(this,F,J[H],G[H]);}I="rgb("+Math.floor(I[0])+","+Math.floor(I[1])+","+Mat h.floor(I[2])+")";}else{I=D.doMethod.call(this,F,J,G);}return I;};B.setRuntimeAt tribute=function(F){D.setRuntimeAttribute.call(this,F);if(this.patterns.color.te st(F)){var H=this.attributes;var J=this.parseColor(this.runtimeAttributes[F].sta rt);var G=this.parseColor(this.runtimeAttributes[F].end);if(typeof H[F]["to"]=== "undefined"&&typeof H[F]["by"]!=="undefined"){G=this.parseColor(H[F].by);for(var I=0,E=J.length;I<E;++I){G[I]=J[I]+G[I];}}this.runtimeAttributes[F].start=J;this .runtimeAttributes[F].end=G;}};C.ColorAnim=A;})();YAHOO.util.Easing={easeNone:fu nction(B,A,D,C){return D*B/C+A;},easeIn:function(B,A,D,C){return D*(B/=C)*B+A;}, easeOut:function(B,A,D,C){return-D*(B/=C)*(B-2)+A;},easeBoth:function(B,A,D,C){i f((B/=C/2)<1){return D/2*B*B+A;}return-D/2*((--B)*(B-2)-1)+A;},easeInStrong:func tion(B,A,D,C){return D*(B/=C)*B*B*B+A;},easeOutStrong:function(B,A,D,C){return-D *((B=B/C-1)*B*B*B-1)+A;},easeBothStrong:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B*B*B+A;}return-D/2*((B-=2)*B*B*B-2)+A;},elasticIn:function(C,A,G,F,B,E){i f(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G) ){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return-(B*Math.pow(2,1 0*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;},elasticOut:function(C,A,G,F,B,E){ if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G )){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return B*Math.pow(2,10*C)*Math.sin((C*F-D)*(2*Math.PI)/E)+G+A;},elasticBoth:function(C,A,G,F,B,E){if (C==0){return A;}if((C/=F/2)==2){return A+G;}if(!E){E=F*(0.3*1.5);}if(!B||B<Math .abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}if(C<1){return0.5*(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;}return B*Math.p ow(2,-10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E)*0.5+G+A;},backIn:function(B,A,E ,D,C){if(typeof C=="undefined"){C=1.70158;}return E*(B/=D)*B*((C+1)*B-C)+A;},bac kOut:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*((B=B/D-1 )*B*((C+1)*B+C)+1)+A;},backBoth:function(B,A,E,D,C){if(typeof C=="undefined"){C= 1.70158;}if((B/=D/2)<1){return E/2*(B*B*(((C*=(1.525))+1)*B-C))+A;}return E/2*(( B-=2)*B*(((C*=(1.525))+1)*B+C)+2)+A;},bounceIn:function(B,A,D,C){return D-YAHOO. util.Easing.bounceOut(C-B,0,D,C)+A;},bounceOut:function(B,A,D,C){if((B/=C)<(1/2.

75)){return D*(7.5625*B*B)+A;}else{if(B<(2/2.75)){return D*(7.5625*(B-=(1.5/2.75 ))*B+0.75)+A;}else{if(B<(2.5/2.75)){return D*(7.5625*(B-=(2.25/2.75))*B+0.9375)+ A;}}}return D*(7.5625*(B-=(2.625/2.75))*B+0.984375)+A;},bounceBoth:function(B,A, D,C){if(B<C/2){return YAHOO.util.Easing.bounceIn(B*2,0,D,C)*0.5+A;}return YAHOO. util.Easing.bounceOut(B*2-C,0,D,C)*0.5+D*0.5+A;}};(function(){var A=function(H,G ,I,J){if(H){A.superclass.constructor.call(this,H,G,I,J);}};A.NAME="Motion";var E =YAHOO.util;YAHOO.extend(A,E.ColorAnim);var F=A.superclass;var C=A.prototype;C.p atterns.points=/^points$/i;C.setAttribute=function(G,I,H){if(this.patterns.point s.test(G)){H=H||"px";F.setAttribute.call(this,"left",I[0],H);F.setAttribute.call (this,"top",I[1],H);}else{F.setAttribute.call(this,G,I,H);}};C.getAttribute=func tion(G){if(this.patterns.points.test(G)){var H=[F.getAttribute.call(this,"left") ,F.getAttribute.call(this,"top")];}else{H=F.getAttribute.call(this,G);}return H; };C.doMethod=function(G,K,H){var J=null;if(this.patterns.points.test(G)){var I=t his.method(this.currentFrame,0,100,this.totalFrames)/100;J=E.Bezier.getPosition( this.runtimeAttributes[G],I);}else{J=F.doMethod.call(this,G,K,H);}return J;};C.s etRuntimeAttribute=function(P){if(this.patterns.points.test(P)){var H=this.getEl ();var J=this.attributes;var G;var L=J["points"]["control"]||[];var I;var M,O;if (L.length>0&&!(L[0]instanceof Array)){L=[L];}else{var K=[];for(M=0,O=L.length;M< O;++M){K[M]=L[M];}L=K;}if(E.Dom.getStyle(H,"position")=="static"){E.Dom.setStyle (H,"position","relative");}if(D(J["points"]["from"])){E.Dom.setXY(H,J["points"][ "from"]);}else{E.Dom.setXY(H,E.Dom.getXY(H));}G=this.getAttribute("points");if(D (J["points"]["to"])){I=B.call(this,J["points"]["to"],G);var N=E.Dom.getXY(this.g etEl());for(M=0,O=L.length;M<O;++M){L[M]=B.call(this,L[M],G);}}else{if(D(J["poin ts"]["by"])){I=[G[0]+J["points"]["by"][0],G[1]+J["points"]["by"][1]];for(M=0,O=L .length;M<O;++M){L[M]=[G[0]+L[M][0],G[1]+L[M][1]];}}}this.runtimeAttributes[P]=[ G];if(L.length>0){this.runtimeAttributes[P]=this.runtimeAttributes[P].concat(L); }this.runtimeAttributes[P][this.runtimeAttributes[P].length]=I;}else{F.setRuntim eAttribute.call(this,P);}};var B=function(G,I){var H=E.Dom.getXY(this.getEl());G =[G[0]-H[0]+I[0],G[1]-H[1]+I[1]];return G;};var D=function(G){return(typeof G!== "undefined");};E.Motion=A;})();(function(){var D=function(F,E,G,H){if(F){D.super class.constructor.call(this,F,E,G,H);}};D.NAME="Scroll";var B=YAHOO.util;YAHOO.e xtend(D,B.ColorAnim);var C=D.superclass;var A=D.prototype;A.doMethod=function(E, H,F){var G=null;if(E=="scroll"){G=[this.method(this.currentFrame,H[0],F[0]-H[0], this.totalFrames),this.method(this.currentFrame,H[1],F[1]-H[1],this.totalFrames) ];}else{G=C.doMethod.call(this,E,H,F);}return G;};A.getAttribute=function(E){var G=null;var F=this.getEl();if(E=="scroll"){G=[F.scrollLeft,F.scrollTop];}else{G= C.getAttribute.call(this,E);}return G;};A.setAttribute=function(E,H,G){var F=thi s.getEl();if(E=="scroll"){F.scrollLeft=H[0];F.scrollTop=H[1];}else{C.setAttribut e.call(this,E,H,G);}};B.Scroll=D;})();YAHOO.register("animation",YAHOO.util.Anim ,{version:"2.7.0",build:"1799"});(function(){YAHOO.util.Config=function(D){if(D) {this.init(D);}};var B=YAHOO.lang,C=YAHOO.util.CustomEvent,A=YAHOO.util.Config;A .CONFIG_CHANGED_EVENT="configChanged";A.BOOLEAN_TYPE="boolean";A.prototype={owne r:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,conf igChangedEvent:null,init:function(D){this.owner=D;this.configChangedEvent=this.c reateEvent(A.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=C.LIST;this .queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[];} ,checkBoolean:function(D){return(typeof D==A.BOOLEAN_TYPE);},checkNumber:functio n(D){return(!isNaN(D));},fireEvent:function(D,F){var E=this.config[D];if(E&&E.ev ent){E.event.fire(F);}},addProperty:function(E,D){E=E.toLowerCase();this.config[ E]=D;D.event=this.createEvent(E,{scope:this.owner});D.event.signature=C.LIST;D.k ey=E;if(D.handler){D.event.subscribe(D.handler,this.owner);}this.setProperty(E,D .value,true);if(!D.suppressEvent){this.queueProperty(E,D.value);}},getConfig:fun ction(){var D={},F=this.config,G,E;for(G in F){if(B.hasOwnProperty(F,G)){E=F[G]; if(E&&E.event){D[G]=E.value;}}}return D;},getProperty:function(D){var E=this.con fig[D.toLowerCase()];if(E&&E.event){return E.value;}else{return undefined;}},res etProperty:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event){if( this.initialConfig[D]&&!B.isUndefined(this.initialConfig[D])){this.setProperty(D ,this.initialConfig[D]);return true;}}else{return false;}},setProperty:function( E,G,D){var F;E=E.toLowerCase();if(this.queueInProgress&&!D){this.queueProperty(E ,G);return true;}else{F=this.config[E];if(F&&F.event){if(F.validator&&!F.validat

or(G)){return false;}else{F.value=G;if(!D){this.fireEvent(E,G);this.configChange dEvent.fire([E,G]);}return true;}}else{return false;}}},queueProperty:function(S ,P){S=S.toLowerCase();var R=this.config[S],K=false,J,G,H,I,O,Q,F,M,N,D,L,T,E;if( R&&R.event){if(!B.isUndefined(P)&&R.validator&&!R.validator(P)){return false;}el se{if(!B.isUndefined(P)){R.value=P;}else{P=R.value;}K=false;J=this.eventQueue.le ngth;for(L=0;L<J;L++){G=this.eventQueue[L];if(G){H=G[0];I=G[1];if(H==S){this.eve ntQueue[L]=null;this.eventQueue.push([S,(!B.isUndefined(P)?P:I)]);K=true;break;} }}if(!K&&!B.isUndefined(P)){this.eventQueue.push([S,P]);}}if(R.supercedes){O=R.s upercedes.length;for(T=0;T<O;T++){Q=R.supercedes[T];F=this.eventQueue.length;for (E=0;E<F;E++){M=this.eventQueue[E];if(M){N=M[0];D=M[1];if(N==Q.toLowerCase()){th is.eventQueue.push([N,D]);this.eventQueue[E]=null;break;}}}}}return true;}else{r eturn false;}},refireEvent:function(D){D=D.toLowerCase();var E=this.config[D];if (E&&E.event&&!B.isUndefined(E.value)){if(this.queueInProgress){this.queuePropert y(D);}else{this.fireEvent(D,E.value);}}},applyConfig:function(D,G){var F,E;if(G) {E={};for(F in D){if(B.hasOwnProperty(D,F)){E[F.toLowerCase()]=D[F];}}this.initi alConfig=E;}for(F in D){if(B.hasOwnProperty(D,F)){this.queueProperty(F,D[F]);}}} ,refresh:function(){var D;for(D in this.config){if(B.hasOwnProperty(this.config, D)){this.refireEvent(D);}}},fireQueue:function(){var E,H,D,G,F;this.queueInProgr ess=true;for(E=0;E<this.eventQueue.length;E++){H=this.eventQueue[E];if(H){D=H[0] ;G=H[1];F=this.config[D];F.value=G;this.eventQueue[E]=null;this.fireEvent(D,G);} }this.queueInProgress=false;this.eventQueue=[];},subscribeToConfigEvent:function (E,F,H,D){var G=this.config[E.toLowerCase()];if(G&&G.event){if(!A.alreadySubscri bed(G.event,F,H)){G.event.subscribe(F,H,D);}return true;}else{return false;}},un subscribeFromConfigEvent:function(D,E,G){var F=this.config[D.toLowerCase()];if(F &&F.event){return F.event.unsubscribe(E,G);}else{return false;}},toString:functi on(){var D="Config";if(this.owner){D+=" ["+this.owner.toString()+"]";}return D;} ,outputEventQueue:function(){var D="",G,E,F=this.eventQueue.length;for(E=0;E<F;E ++){G=this.eventQueue[E];if(G){D+=G[0]+"="+G[1]+", ";}}return D;},destroy:functi on(){var E=this.config,D,F;for(D in E){if(B.hasOwnProperty(E,D)){F=E[D];F.event. unsubscribeAll();F.event=null;}}this.configChangedEvent.unsubscribeAll();this.co nfigChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;t his.eventQueue=null;}};A.alreadySubscribed=function(E,H,I){var F=E.subscribers.l ength,D,G;if(F>0){G=F-1;do{D=E.subscribers[G];if(D&&D.obj==I&&D.fn==H){return tr ue;}}while(G--);}return false;};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvid er);}());(function(){YAHOO.widget.Module=function(R,Q){if(R){this.init(R,Q);}els e{}};var F=YAHOO.util.Dom,D=YAHOO.util.Config,N=YAHOO.util.Event,M=YAHOO.util.Cu stomEvent,G=YAHOO.widget.Module,I=YAHOO.env.ua,H,P,O,E,A={"BEFORE_INIT":"beforeI nit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"re nder","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER": "changeFooter","CHANGE_CONTENT":"changeContent","DESTORY":"destroy","BEFORE_SHOW ":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},J={"VISIB LE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"eff ect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorre size",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:fa lse}};G.IMG_ROOT=null;G.IMG_ROOT_SSL=null;G.CSS_MODULE="yui-module";G.CSS_HEADER ="hd";G.CSS_BODY="bd";G.CSS_FOOTER="ft";G.RESIZE_MONITOR_SECURE_URL="javascript: false;";G.RESIZE_MONITOR_BUFFER=1;G.textResizeEvent=new M("textResize");G.forceD ocumentRedraw=function(){var Q=document.documentElement;if(Q){Q.className+=" ";Q .className=YAHOO.lang.trim(Q.className);}};function L(){if(!H){H=document.create Element("div");H.innerHTML=('<div class="'+G.CSS_HEADER+'"></div>'+'<div class=" '+G.CSS_BODY+'"></div><div class="'+G.CSS_FOOTER+'"></div>');P=H.firstChild;O=P. nextSibling;E=O.nextSibling;}return H;}function K(){if(!P){L();}return(P.cloneNo de(false));}function B(){if(!O){L();}return(O.cloneNode(false));}function C(){if (!E){L();}return(E.cloneNode(false));}G.prototype={constructor:G,element:null,he ader:null,body:null,footer:null,id:null,imageRoot:G.IMG_ROOT,initEvents:function (){var Q=M.LIST;this.beforeInitEvent=this.createEvent(A.BEFORE_INIT);this.before InitEvent.signature=Q;this.initEvent=this.createEvent(A.INIT);this.initEvent.sig nature=Q;this.appendEvent=this.createEvent(A.APPEND);this.appendEvent.signature= Q;this.beforeRenderEvent=this.createEvent(A.BEFORE_RENDER);this.beforeRenderEven t.signature=Q;this.renderEvent=this.createEvent(A.RENDER);this.renderEvent.signa

ture=Q;this.changeHeaderEvent=this.createEvent(A.CHANGE_HEADER);this.changeHeade rEvent.signature=Q;this.changeBodyEvent=this.createEvent(A.CHANGE_BODY);this.cha ngeBodyEvent.signature=Q;this.changeFooterEvent=this.createEvent(A.CHANGE_FOOTER );this.changeFooterEvent.signature=Q;this.changeContentEvent=this.createEvent(A. CHANGE_CONTENT);this.changeContentEvent.signature=Q;this.destroyEvent=this.creat eEvent(A.DESTORY);this.destroyEvent.signature=Q;this.beforeShowEvent=this.create Event(A.BEFORE_SHOW);this.beforeShowEvent.signature=Q;this.showEvent=this.create Event(A.SHOW);this.showEvent.signature=Q;this.beforeHideEvent=this.createEvent(A .BEFORE_HIDE);this.beforeHideEvent.signature=Q;this.hideEvent=this.createEvent(A .HIDE);this.hideEvent.signature=Q;},platform:function(){var Q=navigator.userAgen t.toLowerCase();if(Q.indexOf("windows")!=-1||Q.indexOf("win32")!=-1){return"wind ows";}else{if(Q.indexOf("macintosh")!=-1){return"mac";}else{return false;}}}(),b rowser:function(){var Q=navigator.userAgent.toLowerCase();if(Q.indexOf("opera")! =-1){return"opera";}else{if(Q.indexOf("msie 7")!=-1){return"ie7";}else{if(Q.inde xOf("msie")!=-1){return"ie";}else{if(Q.indexOf("safari")!=-1){return"safari";}el se{if(Q.indexOf("gecko")!=-1){return"gecko";}else{return false;}}}}}}(),isSecure :function(){if(window.location.href.toLowerCase().indexOf("https")===0){return t rue;}else{return false;}}(),initDefaultConfig:function(){this.cfg.addProperty(J. VISIBLE.key,{handler:this.configVisible,value:J.VISIBLE.value,validator:J.VISIBL E.validator});this.cfg.addProperty(J.EFFECT.key,{suppressEvent:J.EFFECT.suppress Event,supercedes:J.EFFECT.supercedes});this.cfg.addProperty(J.MONITOR_RESIZE.key ,{handler:this.configMonitorResize,value:J.MONITOR_RESIZE.value});this.cfg.addPr operty(J.APPEND_TO_DOCUMENT_BODY.key,{value:J.APPEND_TO_DOCUMENT_BODY.value});}, init:function(V,U){var S,W;this.initEvents();this.beforeInitEvent.fire(G);this.c fg=new D(this);if(this.isSecure){this.imageRoot=G.IMG_ROOT_SSL;}if(typeof V=="st ring"){S=V;V=document.getElementById(V);if(!V){V=(L()).cloneNode(false);V.id=S;} }this.id=F.generateId(V);this.element=V;W=this.element.firstChild;if(W){var R=fa lse,Q=false,T=false;do{if(1==W.nodeType){if(!R&&F.hasClass(W,G.CSS_HEADER)){this .header=W;R=true;}else{if(!Q&&F.hasClass(W,G.CSS_BODY)){this.body=W;Q=true;}else {if(!T&&F.hasClass(W,G.CSS_FOOTER)){this.footer=W;T=true;}}}}}while((W=W.nextSib ling));}this.initDefaultConfig();F.addClass(this.element,G.CSS_MODULE);if(U){thi s.cfg.applyConfig(U,true);}if(!D.alreadySubscribed(this.renderEvent,this.cfg.fir eQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true);} this.initEvent.fire(G);},initResizeMonitor:function(){var R=(I.gecko&&this.platf orm=="windows");if(R){var Q=this;setTimeout(function(){Q._initResizeMonitor();}, 0);}else{this._initResizeMonitor();}},_initResizeMonitor:function(){var Q,S,U;fu nction W(){G.textResizeEvent.fire();}if(!I.opera){S=F.get("_yuiResizeMonitor");v ar V=this._supportsCWResize();if(!S){S=document.createElement("iframe");if(this. isSecure&&G.RESIZE_MONITOR_SECURE_URL&&I.ie){S.src=G.RESIZE_MONITOR_SECURE_URL;} if(!V){U=["<html><head><script ",'type="text/javascript">',"window.onresize=func tion(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();};<","/scr ipt></head>","<body></body></html>"].join("");S.src="data:text/html;charset=utf8,"+encodeURIComponent(U);}S.id="_yuiResizeMonitor";S.title="Text Resize Monitor ";S.style.position="absolute";S.style.visibility="hidden";var R=document.body,T= R.firstChild;if(T){R.insertBefore(S,T);}else{R.appendChild(S);}S.style.width="2e m";S.style.height="2em";S.style.top=(-1*(S.offsetHeight+G.RESIZE_MONITOR_BUFFER) )+"px";S.style.left="0";S.style.borderWidth="0";S.style.visibility="visible";if( I.webkit){Q=S.contentWindow.document;Q.open();Q.close();}}if(S&&S.contentWindow) {G.textResizeEvent.subscribe(this.onDomResize,this,true);if(!G.textResizeInitial ized){if(V){if(!N.on(S.contentWindow,"resize",W)){N.on(S,"resize",W);}}G.textRes izeInitialized=true;}this.resizeMonitor=S;}}},_supportsCWResize:function(){var Q =true;if(I.gecko&&I.gecko<=1.8){Q=false;}return Q;},onDomResize:function(S,R){va r Q=-1*(this.resizeMonitor.offsetHeight+G.RESIZE_MONITOR_BUFFER);this.resizeMoni tor.style.top=Q+"px";this.resizeMonitor.style.left="0";},setHeader:function(R){v ar Q=this.header||(this.header=K());if(R.nodeName){Q.innerHTML="";Q.appendChild( R);}else{Q.innerHTML=R;}this.changeHeaderEvent.fire(R);this.changeContentEvent.f ire();},appendToHeader:function(R){var Q=this.header||(this.header=K());Q.append Child(R);this.changeHeaderEvent.fire(R);this.changeContentEvent.fire();},setBody :function(R){var Q=this.body||(this.body=B());if(R.nodeName){Q.innerHTML="";Q.ap pendChild(R);}else{Q.innerHTML=R;}this.changeBodyEvent.fire(R);this.changeConten

tEvent.fire();},appendToBody:function(R){var Q=this.body||(this.body=B());Q.appe ndChild(R);this.changeBodyEvent.fire(R);this.changeContentEvent.fire();},setFoot er:function(R){var Q=this.footer||(this.footer=C());if(R.nodeName){Q.innerHTML=" ";Q.appendChild(R);}else{Q.innerHTML=R;}this.changeFooterEvent.fire(R);this.chan geContentEvent.fire();},appendToFooter:function(R){var Q=this.footer||(this.foot er=C());Q.appendChild(R);this.changeFooterEvent.fire(R);this.changeContentEvent. fire();},render:function(S,Q){var T=this,U;function R(V){if(typeof V=="string"){ V=document.getElementById(V);}if(V){T._addToParent(V,T.element);T.appendEvent.fi re();}}this.beforeRenderEvent.fire();if(!Q){Q=this.element;}if(S){R(S);}else{if( !F.inDocument(this.element)){return false;}}if(this.header&&!F.inDocument(this.h eader)){U=Q.firstChild;if(U){Q.insertBefore(this.header,U);}else{Q.appendChild(t his.header);}}if(this.body&&!F.inDocument(this.body)){if(this.footer&&F.isAncest or(this.moduleElement,this.footer)){Q.insertBefore(this.body,this.footer);}else{ Q.appendChild(this.body);}}if(this.footer&&!F.inDocument(this.footer)){Q.appendC hild(this.footer);}this.renderEvent.fire();return true;},destroy:function(){var Q;if(this.element){N.purgeElement(this.element,true);Q=this.element.parentNode;} if(Q){Q.removeChild(this.element);}this.element=null;this.header=null;this.body= null;this.footer=null;G.textResizeEvent.unsubscribe(this.onDomResize,this);this. cfg.destroy();this.cfg=null;this.destroyEvent.fire();},show:function(){this.cfg. setProperty("visible",true);},hide:function(){this.cfg.setProperty("visible",fal se);},configVisible:function(R,Q,S){var T=Q[0];if(T){this.beforeShowEvent.fire() ;F.setStyle(this.element,"display","block");this.showEvent.fire();}else{this.bef oreHideEvent.fire();F.setStyle(this.element,"display","none");this.hideEvent.fir e();}},configMonitorResize:function(S,R,T){var Q=R[0];if(Q){this.initResizeMonit or();}else{G.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resize Monitor=null;}},_addToParent:function(Q,R){if(!this.cfg.getProperty("appendtodoc umentbody")&&Q===document.body&&Q.firstChild){Q.insertBefore(R,Q.firstChild);}el se{Q.appendChild(R);}},toString:function(){return"Module "+this.id;}};YAHOO.lang .augmentProto(G,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Overlay= function(P,O){YAHOO.widget.Overlay.superclass.constructor.call(this,P,O);};var I =YAHOO.lang,M=YAHOO.util.CustomEvent,G=YAHOO.widget.Module,N=YAHOO.util.Event,F= YAHOO.util.Dom,D=YAHOO.util.Config,K=YAHOO.env.ua,B=YAHOO.widget.Overlay,H="subs cribe",E="unsubscribe",C="contained",J,A={"BEFORE_MOVE":"beforeMove","MOVE":"mov e"},L={"X":{key:"x",validator:I.isNumber,suppressEvent:true,supercedes:["iframe" ]},"Y":{key:"y",validator:I.isNumber,suppressEvent:true,supercedes:["iframe"]}," XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context" ,suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",val ue:false,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:tru e,supercedes:["context","fixedcenter","iframe"]},"HEIGHT":{key:"height",suppress Event:true,supercedes:["context","fixedcenter","iframe"]},"AUTO_FILL_HEIGHT":{ke y:"autofillheight",supercedes:["height"],value:"body"},"ZINDEX":{key:"zindex",va lue:null},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:false,validat or:I.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value: (K.ie==6?true:false),validator:I.isBoolean,supercedes:["zindex"]},"PREVENT_CONTE XT_OVERLAP":{key:"preventcontextoverlap",value:false,validator:I.isBoolean,super cedes:["constraintoviewport"]}};B.IFRAME_SRC="javascript:false;";B.IFRAME_OFFSET =3;B.VIEWPORT_OFFSET=10;B.TOP_LEFT="tl";B.TOP_RIGHT="tr";B.BOTTOM_LEFT="bl";B.BO TTOM_RIGHT="br";B.CSS_OVERLAY="yui-overlay";B.STD_MOD_RE=/^\s*?(body|footer|head er)\s*?$/i;B.windowScrollEvent=new M("windowScroll");B.windowResizeEvent=new M(" windowResize");B.windowScrollHandler=function(P){var O=N.getTarget(P);if(!O||O== =window||O===window.document){if(K.ie){if(!window.scrollEnd){window.scrollEnd=-1 ;}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){B.window ScrollEvent.fire();},1);}else{B.windowScrollEvent.fire();}}};B.windowResizeHandl er=function(O){if(K.ie){if(!window.resizeEnd){window.resizeEnd=-1;}clearTimeout( window.resizeEnd);window.resizeEnd=setTimeout(function(){B.windowResizeEvent.fir e();},100);}else{B.windowResizeEvent.fire();}};B._initialized=null;if(B._initial ized===null){N.on(window,"scroll",B.windowScrollHandler);N.on(window,"resize",B. windowResizeHandler);B._initialized=true;}B._TRIGGER_MAP={"windowScroll":B.windo wScrollEvent,"windowResize":B.windowResizeEvent,"textResize":G.textResizeEvent}; YAHOO.extend(B,G,{CONTEXT_TRIGGERS:[],init:function(P,O){B.superclass.init.call(

this,P);this.beforeInitEvent.fire(B);F.addClass(this.element,B.CSS_OVERLAY);if(O ){this.cfg.applyConfig(O,true);}if(this.platform=="mac"&&K.gecko){if(!D.alreadyS ubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subsc ribe(this.showMacGeckoScrollbars,this,true);}if(!D.alreadySubscribed(this.hideEv ent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeck oScrollbars,this,true);}}this.initEvent.fire(B);},initEvents:function(){B.superc lass.initEvents.call(this);var O=M.LIST;this.beforeMoveEvent=this.createEvent(A. BEFORE_MOVE);this.beforeMoveEvent.signature=O;this.moveEvent=this.createEvent(A. MOVE);this.moveEvent.signature=O;},initDefaultConfig:function(){B.superclass.ini tDefaultConfig.call(this);var O=this.cfg;O.addProperty(L.X.key,{handler:this.con figX,validator:L.X.validator,suppressEvent:L.X.suppressEvent,supercedes:L.X.supe rcedes});O.addProperty(L.Y.key,{handler:this.configY,validator:L.Y.validator,sup pressEvent:L.Y.suppressEvent,supercedes:L.Y.supercedes});O.addProperty(L.XY.key, {handler:this.configXY,suppressEvent:L.XY.suppressEvent,supercedes:L.XY.superced es});O.addProperty(L.CONTEXT.key,{handler:this.configContext,suppressEvent:L.CON TEXT.suppressEvent,supercedes:L.CONTEXT.supercedes});O.addProperty(L.FIXED_CENTE R.key,{handler:this.configFixedCenter,value:L.FIXED_CENTER.value,validator:L.FIX ED_CENTER.validator,supercedes:L.FIXED_CENTER.supercedes});O.addProperty(L.WIDTH .key,{handler:this.configWidth,suppressEvent:L.WIDTH.suppressEvent,supercedes:L. WIDTH.supercedes});O.addProperty(L.HEIGHT.key,{handler:this.configHeight,suppres sEvent:L.HEIGHT.suppressEvent,supercedes:L.HEIGHT.supercedes});O.addProperty(L.A UTO_FILL_HEIGHT.key,{handler:this.configAutoFillHeight,value:L.AUTO_FILL_HEIGHT. value,validator:this._validateAutoFill,supercedes:L.AUTO_FILL_HEIGHT.supercedes} );O.addProperty(L.ZINDEX.key,{handler:this.configzIndex,value:L.ZINDEX.value});O .addProperty(L.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport ,value:L.CONSTRAIN_TO_VIEWPORT.value,validator:L.CONSTRAIN_TO_VIEWPORT.validator ,supercedes:L.CONSTRAIN_TO_VIEWPORT.supercedes});O.addProperty(L.IFRAME.key,{han dler:this.configIframe,value:L.IFRAME.value,validator:L.IFRAME.validator,superce des:L.IFRAME.supercedes});O.addProperty(L.PREVENT_CONTEXT_OVERLAP.key,{value:L.P REVENT_CONTEXT_OVERLAP.value,validator:L.PREVENT_CONTEXT_OVERLAP.validator,super cedes:L.PREVENT_CONTEXT_OVERLAP.supercedes});},moveTo:function(O,P){this.cfg.set Property("xy",[O,P]);},hideMacGeckoScrollbars:function(){F.replaceClass(this.ele ment,"show-scrollbars","hide-scrollbars");},showMacGeckoScrollbars:function(){F. replaceClass(this.element,"hide-scrollbars","show-scrollbars");},_setDomVisibili ty:function(O){F.setStyle(this.element,"visibility",(O)?"visible":"hidden");if(O ){F.removeClass(this.element,"yui-overlay-hidden");}else{F.addClass(this.element ,"yui-overlay-hidden");}},configVisible:function(R,O,X){var Q=O[0],S=F.getStyle( this.element,"visibility"),Y=this.cfg.getProperty("effect"),V=[],U=(this.platfor m=="mac"&&K.gecko),g=D.alreadySubscribed,W,P,f,c,b,a,d,Z,T;if(S=="inherit"){f=th is.element.parentNode;while(f.nodeType!=9&&f.nodeType!=11){S=F.getStyle(f,"visib ility");if(S!="inherit"){break;}f=f.parentNode;}if(S=="inherit"){S="visible";}}i f(Y){if(Y instanceof Array){Z=Y.length;for(c=0;c<Z;c++){W=Y[c];V[V.length]=W.eff ect(this,W.duration);}}else{V[V.length]=Y.effect(this,Y.duration);}}if(Q){if(U){ this.showMacGeckoScrollbars();}if(Y){if(Q){if(S!="visible"||S===""){this.beforeS howEvent.fire();T=V.length;for(b=0;b<T;b++){P=V[b];if(b===0&&!g(P.animateInCompl eteEvent,this.showEvent.fire,this.showEvent)){P.animateInCompleteEvent.subscribe (this.showEvent.fire,this.showEvent,true);}P.animateIn();}}}}else{if(S!="visible "||S===""){this.beforeShowEvent.fire();this._setDomVisibility(true);this.cfg.ref ireEvent("iframe");this.showEvent.fire();}else{this._setDomVisibility(true);}}}e lse{if(U){this.hideMacGeckoScrollbars();}if(Y){if(S=="visible"){this.beforeHideE vent.fire();T=V.length;for(a=0;a<T;a++){d=V[a];if(a===0&&!g(d.animateOutComplete Event,this.hideEvent.fire,this.hideEvent)){d.animateOutCompleteEvent.subscribe(t his.hideEvent.fire,this.hideEvent,true);}d.animateOut();}}else{if(S===""){this._ setDomVisibility(false);}}}else{if(S=="visible"||S===""){this.beforeHideEvent.fi re();this._setDomVisibility(false);this.hideEvent.fire();}else{this._setDomVisib ility(false);}}}},doCenterOnDOMEvent:function(){var O=this.cfg,P=O.getProperty(" fixedcenter");if(O.getProperty("visible")){if(P&&(P!==C||this.fitsInViewport())) {this.center();}}},fitsInViewport:function(){var S=B.VIEWPORT_OFFSET,Q=this.elem ent,T=Q.offsetWidth,R=Q.offsetHeight,O=F.getViewportWidth(),P=F.getViewportHeigh t();return((T+S<O)&&(R+S<P));},configFixedCenter:function(S,Q,T){var U=Q[0],P=D.

alreadySubscribed,R=B.windowResizeEvent,O=B.windowScrollEvent;if(U){this.center( );if(!P(this.beforeShowEvent,this.center)){this.beforeShowEvent.subscribe(this.c enter);}if(!P(R,this.doCenterOnDOMEvent,this)){R.subscribe(this.doCenterOnDOMEve nt,this,true);}if(!P(O,this.doCenterOnDOMEvent,this)){O.subscribe(this.doCenterO nDOMEvent,this,true);}}else{this.beforeShowEvent.unsubscribe(this.center);R.unsu bscribe(this.doCenterOnDOMEvent,this);O.unsubscribe(this.doCenterOnDOMEvent,this );}},configHeight:function(R,P,S){var O=P[0],Q=this.element;F.setStyle(Q,"height ",O);this.cfg.refireEvent("iframe");},configAutoFillHeight:function(T,S,P){var V =S[0],Q=this.cfg,U="autofillheight",W="height",R=Q.getProperty(U),O=this._autoFi llOnHeightChange;Q.unsubscribeFromConfigEvent(W,O);G.textResizeEvent.unsubscribe (O);this.changeContentEvent.unsubscribe(O);if(R&&V!==R&&this[R]){F.setStyle(this [R],W,"");}if(V){V=I.trim(V.toLowerCase());Q.subscribeToConfigEvent(W,O,this[V], this);G.textResizeEvent.subscribe(O,this[V],this);this.changeContentEvent.subscr ibe(O,this[V],this);Q.setProperty(U,V,true);}},configWidth:function(R,O,S){var Q =O[0],P=this.element;F.setStyle(P,"width",Q);this.cfg.refireEvent("iframe");},co nfigzIndex:function(Q,O,R){var S=O[0],P=this.element;if(!S){S=F.getStyle(P,"zInd ex");if(!S||isNaN(S)){S=0;}}if(this.iframe||this.cfg.getProperty("iframe")===tru e){if(S<=0){S=1;}}F.setStyle(P,"zIndex",S);this.cfg.setProperty("zIndex",S,true) ;if(this.iframe){this.stackIframe();}},configXY:function(Q,P,R){var T=P[0],O=T[0 ],S=T[1];this.cfg.setProperty("x",O);this.cfg.setProperty("y",S);this.beforeMove Event.fire([O,S]);O=this.cfg.getProperty("x");S=this.cfg.getProperty("y");this.c fg.refireEvent("iframe");this.moveEvent.fire([O,S]);},configX:function(Q,P,R){va r O=P[0],S=this.cfg.getProperty("y");this.cfg.setProperty("x",O,true);this.cfg.s etProperty("y",S,true);this.beforeMoveEvent.fire([O,S]);O=this.cfg.getProperty(" x");S=this.cfg.getProperty("y");F.setX(this.element,O,true);this.cfg.setProperty ("xy",[O,S],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([O,S]);},co nfigY:function(Q,P,R){var O=this.cfg.getProperty("x"),S=P[0];this.cfg.setPropert y("x",O,true);this.cfg.setProperty("y",S,true);this.beforeMoveEvent.fire([O,S]); O=this.cfg.getProperty("x");S=this.cfg.getProperty("y");F.setY(this.element,S,tr ue);this.cfg.setProperty("xy",[O,S],true);this.cfg.refireEvent("iframe");this.mo veEvent.fire([O,S]);},showIframe:function(){var P=this.iframe,O;if(P){O=this.ele ment.parentNode;if(O!=P.parentNode){this._addToParent(O,P);}P.style.display="blo ck";}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none";}} ,syncIframe:function(){var O=this.iframe,Q=this.element,S=B.IFRAME_OFFSET,P=(S*2 ),R;if(O){O.style.width=(Q.offsetWidth+P+"px");O.style.height=(Q.offsetHeight+P+ "px");R=this.cfg.getProperty("xy");if(!I.isArray(R)||(isNaN(R[0])||isNaN(R[1]))) {this.syncPosition();R=this.cfg.getProperty("xy");}F.setXY(O,[(R[0]-S),(R[1]-S)] );}},stackIframe:function(){if(this.iframe){var O=F.getStyle(this.element,"zInde x");if(!YAHOO.lang.isUndefined(O)&&!isNaN(O)){F.setStyle(this.iframe,"zIndex",(O -1));}}},configIframe:function(R,Q,S){var O=Q[0];function T(){var V=this.iframe, W=this.element,X;if(!V){if(!J){J=document.createElement("iframe");if(this.isSecu re){J.src=B.IFRAME_SRC;}if(K.ie){J.style.filter="alpha(opacity=0)";J.frameBorder =0;}else{J.style.opacity="0";}J.style.position="absolute";J.style.border="none"; J.style.margin="0";J.style.padding="0";J.style.display="none";J.tabIndex=-1;}V=J .cloneNode(false);X=W.parentNode;var U=X||document.body;this._addToParent(U,V);t his.iframe=V;}this.showIframe();this.syncIframe();this.stackIframe();if(!this._h asIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent .subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);t his._hasIframeEventListeners=true;}}function P(){T.call(this);this.beforeShowEve nt.unsubscribe(P);this._iframeDeferred=false;}if(O){if(this.cfg.getProperty("vis ible")){T.call(this);}else{if(!this._iframeDeferred){this.beforeShowEvent.subscr ibe(P);this._iframeDeferred=true;}}}else{this.hideIframe();if(this._hasIframeEve ntListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscr ibe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._ hasIframeEventListeners=false;}}},_primeXYFromDOM:function(){if(YAHOO.lang.isUnd efined(this.cfg.getProperty("xy"))){this.syncPosition();this.cfg.refireEvent("xy ");this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);}},configConstrainToVi ewport:function(P,O,Q){var R=O[0];if(R){if(!D.alreadySubscribed(this.beforeMoveE vent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceC onstraints,this,true);}if(!D.alreadySubscribed(this.beforeShowEvent,this._primeX

YFromDOM)){this.beforeShowEvent.subscribe(this._primeXYFromDOM);}}else{this.befo reShowEvent.unsubscribe(this._primeXYFromDOM);this.beforeMoveEvent.unsubscribe(t his.enforceConstraints,this);}},configContext:function(T,S,P){var W=S[0],Q,O,U,R ,V=this.CONTEXT_TRIGGERS;if(W){Q=W[0];O=W[1];U=W[2];R=W[3];if(V&&V.length>0){R=( R||[]).concat(V);}if(Q){if(typeof Q=="string"){this.cfg.setProperty("context",[d ocument.getElementById(Q),O,U,R],true);}if(O&&U){this.align(O,U);}if(this._conte xtTriggers){this._processTriggers(this._contextTriggers,E,this._alignOnTrigger); }if(R){this._processTriggers(R,H,this._alignOnTrigger);this._contextTriggers=R;} }}},_alignOnTrigger:function(P,O){this.align();},_findTriggerCE:function(O){var P=null;if(O instanceof M){P=O;}else{if(B._TRIGGER_MAP[O]){P=B._TRIGGER_MAP[O];}} return P;},_processTriggers:function(S,U,R){var Q,T;for(var P=0,O=S.length;P<O;+ +P){Q=S[P];T=this._findTriggerCE(Q);if(T){T[U](R,this,true);}else{this[U](Q,R);} }},align:function(P,O){var U=this.cfg.getProperty("context"),T=this,S,R,V;functi on Q(W,X){switch(P){case B.TOP_LEFT:T.moveTo(X,W);break;case B.TOP_RIGHT:T.moveT o((X-R.offsetWidth),W);break;case B.BOTTOM_LEFT:T.moveTo(X,(W-R.offsetHeight));b reak;case B.BOTTOM_RIGHT:T.moveTo((X-R.offsetWidth),(W-R.offsetHeight));break;}} if(U){S=U[0];R=this.element;T=this;if(!P){P=U[1];}if(!O){O=U[2];}if(R&&S){V=F.ge tRegion(S);switch(O){case B.TOP_LEFT:Q(V.top,V.left);break;case B.TOP_RIGHT:Q(V. top,V.right);break;case B.BOTTOM_LEFT:Q(V.bottom,V.left);break;case B.BOTTOM_RIG HT:Q(V.bottom,V.right);break;}}}},enforceConstraints:function(P,O,Q){var S=O[0]; var R=this.getConstrainedXY(S[0],S[1]);this.cfg.setProperty("x",R[0],true);this. cfg.setProperty("y",R[1],true);this.cfg.setProperty("xy",R,true);},getConstraine dX:function(V){var S=this,O=S.element,e=O.offsetWidth,c=B.VIEWPORT_OFFSET,h=F.ge tViewportWidth(),d=F.getDocumentScrollLeft(),Y=(e+c<h),b=this.cfg.getProperty("c ontext"),Q,X,j,T=false,f,W,g=d+c,P=d+h-e-c,i=V,U={"tltr":true,"blbr":true,"brbl" :true,"trtl":true};var Z=function(){var k;if((S.cfg.getProperty("x")-d)>X){k=(Xe);}else{k=(X+j);}S.cfg.setProperty("x",(k+d),true);return k;};var R=function(){ if((S.cfg.getProperty("x")-d)>X){return(W-c);}else{return(f-c);}};var a=function (){var k=R(),l;if(e>k){if(T){Z();}else{Z();T=true;l=a();}}return l;};if(V<g||V>P ){if(Y){if(this.cfg.getProperty("preventcontextoverlap")&&b&&U[(b[1]+b[2])]){Q=b [0];X=F.getX(Q)-d;j=Q.offsetWidth;f=X;W=(h-(X+j));a();i=this.cfg.getProperty("x" );}else{if(V<g){i=g;}else{if(V>P){i=P;}}}}else{i=c+d;}}return i;},getConstrained Y:function(Z){var W=this,P=W.element,i=P.offsetHeight,h=B.VIEWPORT_OFFSET,d=F.ge tViewportHeight(),g=F.getDocumentScrollTop(),e=(i+h<d),f=this.cfg.getProperty("c ontext"),U,a,b,X=false,V,Q,c=g+h,S=g+d-i-h,O=Z,Y={"trbr":true,"tlbl":true,"bltl" :true,"brtr":true};var T=function(){var k;if((W.cfg.getProperty("y")-g)>a){k=(ai);}else{k=(a+b);}W.cfg.setProperty("y",(k+g),true);return k;};var R=function(){ if((W.cfg.getProperty("y")-g)>a){return(Q-h);}else{return(V-h);}};var j=function (){var l=R(),k;if(i>l){if(X){T();}else{T();X=true;k=j();}}return k;};if(Z<c||Z>S ){if(e){if(this.cfg.getProperty("preventcontextoverlap")&&f&&Y[(f[1]+f[2])]){U=f [0];b=U.offsetHeight;a=(F.getY(U)-g);V=a;Q=(d-(a+b));j();O=W.cfg.getProperty("y" );}else{if(Z<c){O=c;}else{if(Z>S){O=S;}}}}else{O=h+g;}}return O;},getConstrained XY:function(O,P){return[this.getConstrainedX(O),this.getConstrainedY(P)];},cente r:function(){var R=B.VIEWPORT_OFFSET,S=this.element.offsetWidth,Q=this.element.o ffsetHeight,P=F.getViewportWidth(),T=F.getViewportHeight(),O,U;if(S<P){O=(P/2)-( S/2)+F.getDocumentScrollLeft();}else{O=R+F.getDocumentScrollLeft();}if(Q<T){U=(T /2)-(Q/2)+F.getDocumentScrollTop();}else{U=R+F.getDocumentScrollTop();}this.cfg. setProperty("xy",[parseInt(O,10),parseInt(U,10)]);this.cfg.refireEvent("iframe") ;if(K.webkit){this.forceContainerRedraw();}},syncPosition:function(){var O=F.get XY(this.element);this.cfg.setProperty("x",O[0],true);this.cfg.setProperty("y",O[ 1],true);this.cfg.setProperty("xy",O,true);},onDomResize:function(Q,P){var O=thi s;B.superclass.onDomResize.call(this,Q,P);setTimeout(function(){O.syncPosition() ;O.cfg.refireEvent("iframe");O.cfg.refireEvent("context");},0);},_getComputedHei ght:(function(){if(document.defaultView&&document.defaultView.getComputedStyle){ return function(P){var O=null;if(P.ownerDocument&&P.ownerDocument.defaultView){v ar Q=P.ownerDocument.defaultView.getComputedStyle(P,"");if(Q){O=parseInt(Q.heigh t,10);}}return(I.isNumber(O))?O:null;};}else{return function(P){var O=null;if(P. style.pixelHeight){O=P.style.pixelHeight;}return(I.isNumber(O))?O:null;};}})(),_ validateAutoFillHeight:function(O){return(!O)||(I.isString(O)&&B.STD_MOD_RE.test (O));},_autoFillOnHeightChange:function(R,P,Q){var O=this.cfg.getProperty("heigh

t");if((O&&O!=="auto")||(O===0)){this.fillHeight(Q);}},_getPreciseHeight:functio n(P){var O=P.offsetHeight;if(P.getBoundingClientRect){var Q=P.getBoundingClientR ect();O=Q.bottom-Q.top;}return O;},fillHeight:function(R){if(R){var P=this.inner Element||this.element,O=[this.header,this.body,this.footer],V,W=0,X=0,T=0,Q=fals e;for(var U=0,S=O.length;U<S;U++){V=O[U];if(V){if(R!==V){X+=this._getPreciseHeig ht(V);}else{Q=true;}}}if(Q){if(K.ie||K.opera){F.setStyle(R,"height",0+"px");}W=t his._getComputedHeight(P);if(W===null){F.addClass(P,"yui-override-padding");W=P. clientHeight;F.removeClass(P,"yui-override-padding");}T=Math.max(W-X,0);F.setSty le(R,"height",T+"px");if(R.offsetHeight!=T){T=Math.max(T-(R.offsetHeight-T),0);} F.setStyle(R,"height",T+"px");}}},bringToTop:function(){var S=[],R=this.element; function V(Z,Y){var b=F.getStyle(Z,"zIndex"),a=F.getStyle(Y,"zIndex"),X=(!b||isN aN(b))?0:parseInt(b,10),W=(!a||isNaN(a))?0:parseInt(a,10);if(X>W){return-1;}else {if(X<W){return 1;}else{return 0;}}}function Q(Y){var X=F.hasClass(Y,B.CSS_OVERL AY),W=YAHOO.widget.Panel;if(X&&!F.isAncestor(R,Y)){if(W&&F.hasClass(Y,W.CSS_PANE L)){S[S.length]=Y.parentNode;}else{S[S.length]=Y;}}}F.getElementsBy(Q,"DIV",docu ment.body);S.sort(V);var O=S[0],U;if(O){U=F.getStyle(O,"zIndex");if(!isNaN(U)){v ar T=false;if(O!=R){T=true;}else{if(S.length>1){var P=F.getStyle(S[1],"zIndex"); if(!isNaN(P)&&(U==P)){T=true;}}}if(T){this.cfg.setProperty("zindex",(parseInt(U, 10)+2));}}}},destroy:function(){if(this.iframe){this.iframe.parentNode.removeChi ld(this.iframe);}this.iframe=null;B.windowResizeEvent.unsubscribe(this.doCenterO nDOMEvent,this);B.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);G. textResizeEvent.unsubscribe(this._autoFillOnHeightChange);B.superclass.destroy.c all(this);},forceContainerRedraw:function(){var O=this;F.addClass(O.element,"yui -force-redraw");setTimeout(function(){F.removeClass(O.element,"yui-force-redraw" );},0);},toString:function(){return"Overlay "+this.id;}});}());(function(){YAHOO .widget.OverlayManager=function(G){this.init(G);};var D=YAHOO.widget.Overlay,C=Y AHOO.util.Event,E=YAHOO.util.Dom,B=YAHOO.util.Config,F=YAHOO.util.CustomEvent,A= YAHOO.widget.OverlayManager;A.CSS_FOCUSED="focused";A.prototype={constructor:A,o verlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppr essEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"});},init:fu nction(I){this.cfg=new B(this);this.initDefaultConfig();if(I){this.cfg.applyConf ig(I,true);}this.cfg.fireQueue();var H=null;this.getActive=function(){return H;} ;this.focus=function(J){var K=this.find(J);if(K){K.focus();}};this.remove=functi on(K){var M=this.find(K),J;if(M){if(H==M){H=null;}var L=(M.element===null&&M.cfg ===null)?true:false;if(!L){J=E.getStyle(M.element,"zIndex");M.cfg.setProperty("z Index",-1000,true);}this.overlays.sort(this.compareZIndexDesc);this.overlays=thi s.overlays.slice(0,(this.overlays.length-1));M.hideEvent.unsubscribe(M.blur);M.d estroyEvent.unsubscribe(this._onOverlayDestroy,M);M.focusEvent.unsubscribe(this. _onOverlayFocusHandler,M);M.blurEvent.unsubscribe(this._onOverlayBlurHandler,M); if(!L){C.removeListener(M.element,this.cfg.getProperty("focusevent"),this._onOve rlayElementFocus);M.cfg.setProperty("zIndex",J,true);M.cfg.setProperty("manager" ,null);}if(M.focusEvent._managed){M.focusEvent=null;}if(M.blurEvent._managed){M. blurEvent=null;}if(M.focus._managed){M.focus=null;}if(M.blur._managed){M.blur=nu ll;}}};this.blurAll=function(){var K=this.overlays.length,J;if(K>0){J=K-1;do{thi s.overlays[J].blur();}while(J--);}};this._manageBlur=function(J){var K=false;if( H==J){E.removeClass(H.element,A.CSS_FOCUSED);H=null;K=true;}return K;};this._man ageFocus=function(J){var K=false;if(H!=J){if(H){H.blur();}H=J;this.bringToTop(H) ;E.addClass(H.element,A.CSS_FOCUSED);K=true;}return K;};var G=this.cfg.getProper ty("overlays");if(!this.overlays){this.overlays=[];}if(G){this.register(G);this. overlays.sort(this.compareZIndexDesc);}},_onOverlayElementFocus:function(I){var G=C.getTarget(I),H=this.close;if(H&&(G==H||E.isAncestor(H,G))){this.blur();}else {this.focus();}},_onOverlayDestroy:function(H,G,I){this.remove(I);},_onOverlayFo cusHandler:function(H,G,I){this._manageFocus(I);},_onOverlayBlurHandler:function (H,G,I){this._manageBlur(I);},_bindFocus:function(G){var H=this;if(!G.focusEvent ){G.focusEvent=G.createEvent("focus");G.focusEvent.signature=F.LIST;G.focusEvent ._managed=true;}else{G.focusEvent.subscribe(H._onOverlayFocusHandler,G,H);}if(!G .focus){C.on(G.element,H.cfg.getProperty("focusevent"),H._onOverlayElementFocus, null,G);G.focus=function(){if(H._manageFocus(this)){if(this.cfg.getProperty("vis ible")&&this.focusFirst){this.focusFirst();}this.focusEvent.fire();}};G.focus._m anaged=true;}},_bindBlur:function(G){var H=this;if(!G.blurEvent){G.blurEvent=G.c

reateEvent("blur");G.blurEvent.signature=F.LIST;G.focusEvent._managed=true;}else {G.blurEvent.subscribe(H._onOverlayBlurHandler,G,H);}if(!G.blur){G.blur=function (){if(H._manageBlur(this)){this.blurEvent.fire();}};G.blur._managed=true;}G.hide Event.subscribe(G.blur);},_bindDestroy:function(G){var H=this;G.destroyEvent.sub scribe(H._onOverlayDestroy,G,H);},_syncZIndex:function(G){var H=E.getStyle(G.ele ment,"zIndex");if(!isNaN(H)){G.cfg.setProperty("zIndex",parseInt(H,10));}else{G. cfg.setProperty("zIndex",0);}},register:function(G){var J=false,H,I;if(G instanc eof D){G.cfg.addProperty("manager",{value:this});this._bindFocus(G);this._bindBl ur(G);this._bindDestroy(G);this._syncZIndex(G);this.overlays.push(G);this.bringT oTop(G);J=true;}else{if(G instanceof Array){for(H=0,I=G.length;H<I;H++){J=this.r egister(G[H])||J;}}}return J;},bringToTop:function(M){var I=this.find(M),L,G,J;i f(I){J=this.overlays;J.sort(this.compareZIndexDesc);G=J[0];if(G){L=E.getStyle(G. element,"zIndex");if(!isNaN(L)){var K=false;if(G!==I){K=true;}else{if(J.length>1 ){var H=E.getStyle(J[1].element,"zIndex");if(!isNaN(H)&&(L==H)){K=true;}}}if(K){ I.cfg.setProperty("zindex",(parseInt(L,10)+2));}}J.sort(this.compareZIndexDesc); }}},find:function(G){var K=G instanceof D,I=this.overlays,M=I.length,J=null,L,H; if(K||typeof G=="string"){for(H=M-1;H>=0;H--){L=I[H];if((K&&(L===G))||(L.id==G)) {J=L;break;}}}return J;},compareZIndexDesc:function(J,I){var H=(J.cfg)?J.cfg.get Property("zIndex"):null,G=(I.cfg)?I.cfg.getProperty("zIndex"):null;if(H===null&& G===null){return 0;}else{if(H===null){return 1;}else{if(G===null){return-1;}else {if(H>G){return-1;}else{if(H<G){return 1;}else{return 0;}}}}}},showAll:function( ){var H=this.overlays,I=H.length,G;for(G=I-1;G>=0;G--){H[G].show();}},hideAll:fu nction(){var H=this.overlays,I=H.length,G;for(G=I-1;G>=0;G--){H[G].hide();}},toS tring:function(){return"OverlayManager";}};}());(function(){YAHOO.widget.Tooltip =function(P,O){YAHOO.widget.Tooltip.superclass.constructor.call(this,P,O);};var E=YAHOO.lang,N=YAHOO.util.Event,M=YAHOO.util.CustomEvent,C=YAHOO.util.Dom,J=YAHO O.widget.Tooltip,H=YAHOO.env.ua,G=(H.ie&&(H.ie<=6||document.compatMode=="BackCom pat")),F,I={"PREVENT_OVERLAP":{key:"preventoverlap",value:true,validator:E.isBoo lean,supercedes:["x","y","xy"]},"SHOW_DELAY":{key:"showdelay",value:200,validato r:E.isNumber},"AUTO_DISMISS_DELAY":{key:"autodismissdelay",value:5000,validator: E.isNumber},"HIDE_DELAY":{key:"hidedelay",value:250,validator:E.isNumber},"TEXT" :{key:"text",suppressEvent:true},"CONTAINER":{key:"container"},"DISABLED":{key:" disabled",value:false,suppressEvent:true}},A={"CONTEXT_MOUSE_OVER":"contextMouse Over","CONTEXT_MOUSE_OUT":"contextMouseOut","CONTEXT_TRIGGER":"contextTrigger"}; J.CSS_TOOLTIP="yui-tt";function K(Q,O){var P=this.cfg,R=P.getProperty("width");i f(R==O){P.setProperty("width",Q);}}function D(P,O){if("_originalWidth"in this){K .call(this,this._originalWidth,this._forcedWidth);}var Q=document.body,U=this.cf g,T=U.getProperty("width"),R,S;if((!T||T=="auto")&&(U.getProperty("container")!= Q||U.getProperty("x")>=C.getViewportWidth()||U.getProperty("y")>=C.getViewportHe ight())){S=this.element.cloneNode(true);S.style.visibility="hidden";S.style.top= "0px";S.style.left="0px";Q.appendChild(S);R=(S.offsetWidth+"px");Q.removeChild(S );S=null;U.setProperty("width",R);U.refireEvent("xy");this._originalWidth=T||""; this._forcedWidth=R;}}function B(P,O,Q){this.render(Q);}function L(){N.onDOMRead y(B,this.cfg.getProperty("container"),this);}YAHOO.extend(J,YAHOO.widget.Overlay ,{init:function(P,O){J.superclass.init.call(this,P);this.beforeInitEvent.fire(J) ;C.addClass(this.element,J.CSS_TOOLTIP);if(O){this.cfg.applyConfig(O,true);}this .cfg.queueProperty("visible",false);this.cfg.queueProperty("constraintoviewport" ,true);this.setBody("");this.subscribe("changeContent",D);this.subscribe("init", L);this.subscribe("render",this.onRender);this.initEvent.fire(J);},initEvents:fu nction(){J.superclass.initEvents.call(this);var O=M.LIST;this.contextMouseOverEv ent=this.createEvent(A.CONTEXT_MOUSE_OVER);this.contextMouseOverEvent.signature= O;this.contextMouseOutEvent=this.createEvent(A.CONTEXT_MOUSE_OUT);this.contextMo useOutEvent.signature=O;this.contextTriggerEvent=this.createEvent(A.CONTEXT_TRIG GER);this.contextTriggerEvent.signature=O;},initDefaultConfig:function(){J.super class.initDefaultConfig.call(this);this.cfg.addProperty(I.PREVENT_OVERLAP.key,{v alue:I.PREVENT_OVERLAP.value,validator:I.PREVENT_OVERLAP.validator,supercedes:I. PREVENT_OVERLAP.supercedes});this.cfg.addProperty(I.SHOW_DELAY.key,{handler:this .configShowDelay,value:200,validator:I.SHOW_DELAY.validator});this.cfg.addProper ty(I.AUTO_DISMISS_DELAY.key,{handler:this.configAutoDismissDelay,value:I.AUTO_DI SMISS_DELAY.value,validator:I.AUTO_DISMISS_DELAY.validator});this.cfg.addPropert

y(I.HIDE_DELAY.key,{handler:this.configHideDelay,value:I.HIDE_DELAY.value,valida tor:I.HIDE_DELAY.validator});this.cfg.addProperty(I.TEXT.key,{handler:this.confi gText,suppressEvent:I.TEXT.suppressEvent});this.cfg.addProperty(I.CONTAINER.key, {handler:this.configContainer,value:document.body});this.cfg.addProperty(I.DISAB LED.key,{handler:this.configContainer,value:I.DISABLED.value,supressEvent:I.DISA BLED.suppressEvent});},configText:function(P,O,Q){var R=O[0];if(R){this.setBody( R);}},configContainer:function(Q,P,R){var O=P[0];if(typeof O=="string"){this.cfg .setProperty("container",document.getElementById(O),true);}},_removeEventListene rs:function(){var R=this._context,O,Q,P;if(R){O=R.length;if(O>0){P=O-1;do{Q=R[P] ;N.removeListener(Q,"mouseover",this.onContextMouseOver);N.removeListener(Q,"mou semove",this.onContextMouseMove);N.removeListener(Q,"mouseout",this.onContextMou seOut);}while(P--);}}},configContext:function(T,P,U){var S=P[0],V,O,R,Q;if(S){if (!(S instanceof Array)){if(typeof S=="string"){this.cfg.setProperty("context",[d ocument.getElementById(S)],true);}else{this.cfg.setProperty("context",[S],true); }S=this.cfg.getProperty("context");}this._removeEventListeners();this._context=S ;V=this._context;if(V){O=V.length;if(O>0){Q=O-1;do{R=V[Q];N.on(R,"mouseover",thi s.onContextMouseOver,this);N.on(R,"mousemove",this.onContextMouseMove,this);N.on (R,"mouseout",this.onContextMouseOut,this);}while(Q--);}}}},onContextMouseMove:f unction(P,O){O.pageX=N.getPageX(P);O.pageY=N.getPageY(P);},onContextMouseOver:fu nction(Q,P){var O=this;if(O.title){P._tempTitle=O.title;O.title="";}if(P.fireEve nt("contextMouseOver",O,Q)!==false&&!P.cfg.getProperty("disabled")){if(P.hidePro cId){clearTimeout(P.hideProcId);P.hideProcId=null;}N.on(O,"mousemove",P.onContex tMouseMove,P);P.showProcId=P.doShow(Q,O);}},onContextMouseOut:function(Q,P){var O=this;if(P._tempTitle){O.title=P._tempTitle;P._tempTitle=null;}if(P.showProcId) {clearTimeout(P.showProcId);P.showProcId=null;}if(P.hideProcId){clearTimeout(P.h ideProcId);P.hideProcId=null;}P.fireEvent("contextMouseOut",O,Q);P.hideProcId=se tTimeout(function(){P.hide();},P.cfg.getProperty("hidedelay"));},doShow:function (Q,O){var R=25,P=this;if(H.opera&&O.tagName&&O.tagName.toUpperCase()=="A"){R+=12 ;}return setTimeout(function(){var S=P.cfg.getProperty("text");if(P._tempTitle&& (S===""||YAHOO.lang.isUndefined(S)||YAHOO.lang.isNull(S))){P.setBody(P._tempTitl e);}else{P.cfg.refireEvent("text");}P.moveTo(P.pageX,P.pageY+R);if(P.cfg.getProp erty("preventoverlap")){P.preventOverlap(P.pageX,P.pageY);}N.removeListener(O,"m ousemove",P.onContextMouseMove);P.contextTriggerEvent.fire(O);P.show();P.hidePro cId=P.doHide();},this.cfg.getProperty("showdelay"));},doHide:function(){var O=th is;return setTimeout(function(){O.hide();},this.cfg.getProperty("autodismissdela y"));},preventOverlap:function(S,R){var O=this.element.offsetHeight,Q=new YAHOO. util.Point(S,R),P=C.getRegion(this.element);P.top-=5;P.left-=5;P.right+=5;P.bott om+=5;if(P.contains(Q)){this.cfg.setProperty("y",(R-O-5));}},onRender:function(S ,R){function T(){var W=this.element,V=this.underlay;if(V){V.style.width=(W.offse tWidth+6)+"px";V.style.height=(W.offsetHeight+1)+"px";}}function P(){C.addClass( this.underlay,"yui-tt-shadow-visible");if(H.ie){this.forceUnderlayRedraw();}}fun ction O(){C.removeClass(this.underlay,"yui-tt-shadow-visible");}function U(){var X=this.underlay,W,V,Z,Y;if(!X){W=this.element;V=YAHOO.widget.Module;Z=H.ie;Y=th is;if(!F){F=document.createElement("div");F.className="yui-tt-shadow";}X=F.clone Node(false);W.appendChild(X);this.underlay=X;this._shadow=this.underlay;P.call(t his);this.subscribe("beforeShow",P);this.subscribe("hide",O);if(G){window.setTim eout(function(){T.call(Y);},0);this.cfg.subscribeToConfigEvent("width",T);this.c fg.subscribeToConfigEvent("height",T);this.subscribe("changeContent",T);V.textRe sizeEvent.subscribe(T,this,true);this.subscribe("destroy",function(){V.textResiz eEvent.unsubscribe(T,this);});}}}function Q(){U.call(this);this.unsubscribe("bef oreShow",Q);}if(this.cfg.getProperty("visible")){U.call(this);}else{this.subscri be("beforeShow",Q);}},forceUnderlayRedraw:function(){var O=this;C.addClass(O.und erlay,"yui-force-redraw");setTimeout(function(){C.removeClass(O.underlay,"yui-fo rce-redraw");},0);},destroy:function(){this._removeEventListeners();J.superclass .destroy.call(this);},toString:function(){return"Tooltip "+this.id;}});}());(fun ction(){YAHOO.widget.Panel=function(V,U){YAHOO.widget.Panel.superclass.construct or.call(this,V,U);};var S=null;var E=YAHOO.lang,F=YAHOO.util,A=F.Dom,T=F.Event,M =F.CustomEvent,K=YAHOO.util.KeyListener,I=F.Config,H=YAHOO.widget.Overlay,O=YAHO O.widget.Panel,L=YAHOO.env.ua,P=(L.ie&&(L.ie<=6||document.compatMode=="BackCompa t")),G,Q,C,D={"SHOW_MASK":"showMask","HIDE_MASK":"hideMask","DRAG":"drag"},N={"C

LOSE":{key:"close",value:true,validator:E.isBoolean,supercedes:["visible"]},"DRA GGABLE":{key:"draggable",value:(F.DD?true:false),validator:E.isBoolean,supercede s:["visible"]},"DRAG_ONLY":{key:"dragonly",value:false,validator:E.isBoolean,sup ercedes:["draggable"]},"UNDERLAY":{key:"underlay",value:"shadow",supercedes:["vi sible"]},"MODAL":{key:"modal",value:false,validator:E.isBoolean,supercedes:["vis ible","zindex"]},"KEY_LISTENERS":{key:"keylisteners",suppressEvent:true,superced es:["visible"]},"STRINGS":{key:"strings",supercedes:["close"],validator:E.isObje ct,value:{close:"Close"}}};O.CSS_PANEL="yui-panel";O.CSS_PANEL_CONTAINER="yui-pa nel-container";O.FOCUSABLE=["a","button","select","textarea","input","iframe"];f unction J(V,U){if(!this.header&&this.cfg.getProperty("draggable")){this.setHeade r("&#160;");}}function R(V,U,W){var Z=W[0],X=W[1],Y=this.cfg,a=Y.getProperty("wi dth");if(a==X){Y.setProperty("width",Z);}this.unsubscribe("hide",R,W);}function B(V,U){var Y,X,W;if(P){Y=this.cfg;X=Y.getProperty("width");if(!X||X=="auto"){W=( this.element.offsetWidth+"px");Y.setProperty("width",W);this.subscribe("hide",R, [(X||""),W]);}}}YAHOO.extend(O,H,{init:function(V,U){O.superclass.init.call(this ,V);this.beforeInitEvent.fire(O);A.addClass(this.element,O.CSS_PANEL);this.build Wrapper();if(U){this.cfg.applyConfig(U,true);}this.subscribe("showMask",this._ad dFocusHandlers);this.subscribe("hideMask",this._removeFocusHandlers);this.subscr ibe("beforeRender",J);this.subscribe("render",function(){this.setFirstLastFocusa ble();this.subscribe("changeContent",this.setFirstLastFocusable);});this.subscri be("show",this.focusFirst);this.initEvent.fire(O);},_onElementFocus:function(Z){ if(S===this){var Y=T.getTarget(Z),X=document.documentElement,V=(Y!==X&&Y!==windo w);if(V&&Y!==this.element&&Y!==this.mask&&!A.isAncestor(this.element,Y)){try{if( this.firstElement){this.firstElement.focus();}else{if(this._modalFocus){this._mo dalFocus.focus();}else{this.innerElement.focus();}}}catch(W){try{if(V&&Y!==docum ent.body){Y.blur();}}catch(U){}}}}},_addFocusHandlers:function(V,U){if(!this.fir stElement){if(L.webkit||L.opera){if(!this._modalFocus){this._createHiddenFocusEl ement();}}else{this.innerElement.tabIndex=0;}}this.setTabLoop(this.firstElement, this.lastElement);T.onFocus(document.documentElement,this._onElementFocus,this,t rue);S=this;},_createHiddenFocusElement:function(){var U=document.createElement( "button");U.style.height="1px";U.style.width="1px";U.style.position="absolute";U .style.left="-10000em";U.style.opacity=0;U.tabIndex=-1;this.innerElement.appendC hild(U);this._modalFocus=U;},_removeFocusHandlers:function(V,U){T.removeFocusLis tener(document.documentElement,this._onElementFocus,this);if(S==this){S=null;}}, focusFirst:function(W,U,Y){var V=this.firstElement;if(U&&U[1]){T.stopEvent(U[1]) ;}if(V){try{V.focus();}catch(X){}}},focusLast:function(W,U,Y){var V=this.lastEle ment;if(U&&U[1]){T.stopEvent(U[1]);}if(V){try{V.focus();}catch(X){}}},setTabLoop :function(X,Z){var V=this.preventBackTab,W=this.preventTabOut,U=this.showEvent,Y =this.hideEvent;if(V){V.disable();U.unsubscribe(V.enable,V);Y.unsubscribe(V.disa ble,V);V=this.preventBackTab=null;}if(W){W.disable();U.unsubscribe(W.enable,W);Y .unsubscribe(W.disable,W);W=this.preventTabOut=null;}if(X){this.preventBackTab=n ew K(X,{shift:true,keys:9},{fn:this.focusLast,scope:this,correctScope:true});V=t his.preventBackTab;U.subscribe(V.enable,V,true);Y.subscribe(V.disable,V,true);}i f(Z){this.preventTabOut=new K(Z,{shift:false,keys:9},{fn:this.focusFirst,scope:t his,correctScope:true});W=this.preventTabOut;U.subscribe(W.enable,W,true);Y.subs cribe(W.disable,W,true);}},getFocusableElements:function(U){U=U||this.innerEleme nt;var X={};for(var W=0;W<O.FOCUSABLE.length;W++){X[O.FOCUSABLE[W]]=true;}functi on V(Y){if(Y.focus&&Y.type!=="hidden"&&!Y.disabled&&X[Y.tagName.toLowerCase()]){ return true;}return false;}return A.getElementsBy(V,null,U);},setFirstLastFocusa ble:function(){this.firstElement=null;this.lastElement=null;var U=this.getFocusa bleElements();this.focusableElements=U;if(U.length>0){this.firstElement=U[0];thi s.lastElement=U[U.length-1];}if(this.cfg.getProperty("modal")){this.setTabLoop(t his.firstElement,this.lastElement);}},initEvents:function(){O.superclass.initEve nts.call(this);var U=M.LIST;this.showMaskEvent=this.createEvent(D.SHOW_MASK);thi s.showMaskEvent.signature=U;this.hideMaskEvent=this.createEvent(D.HIDE_MASK);thi s.hideMaskEvent.signature=U;this.dragEvent=this.createEvent(D.DRAG);this.dragEve nt.signature=U;},initDefaultConfig:function(){O.superclass.initDefaultConfig.cal l(this);this.cfg.addProperty(N.CLOSE.key,{handler:this.configClose,value:N.CLOSE .value,validator:N.CLOSE.validator,supercedes:N.CLOSE.supercedes});this.cfg.addP roperty(N.DRAGGABLE.key,{handler:this.configDraggable,value:(F.DD)?true:false,va

lidator:N.DRAGGABLE.validator,supercedes:N.DRAGGABLE.supercedes});this.cfg.addPr operty(N.DRAG_ONLY.key,{value:N.DRAG_ONLY.value,validator:N.DRAG_ONLY.validator, supercedes:N.DRAG_ONLY.supercedes});this.cfg.addProperty(N.UNDERLAY.key,{handler :this.configUnderlay,value:N.UNDERLAY.value,supercedes:N.UNDERLAY.supercedes});t his.cfg.addProperty(N.MODAL.key,{handler:this.configModal,value:N.MODAL.value,va lidator:N.MODAL.validator,supercedes:N.MODAL.supercedes});this.cfg.addProperty(N .KEY_LISTENERS.key,{handler:this.configKeyListeners,suppressEvent:N.KEY_LISTENER S.suppressEvent,supercedes:N.KEY_LISTENERS.supercedes});this.cfg.addProperty(N.S TRINGS.key,{value:N.STRINGS.value,handler:this.configStrings,validator:N.STRINGS .validator,supercedes:N.STRINGS.supercedes});},configClose:function(X,V,Y){var Z =V[0],W=this.close,U=this.cfg.getProperty("strings");if(Z){if(!W){if(!C){C=docum ent.createElement("a");C.className="container-close";C.href="#";}W=C.cloneNode(t rue);this.innerElement.appendChild(W);W.innerHTML=(U&&U.close)?U.close:"&#160;"; T.on(W,"click",this._doClose,this,true);this.close=W;}else{W.style.display="bloc k";}}else{if(W){W.style.display="none";}}},_doClose:function(U){T.preventDefault (U);this.hide();},configDraggable:function(V,U,W){var X=U[0];if(X){if(!F.DD){thi s.cfg.setProperty("draggable",false);return;}if(this.header){A.setStyle(this.hea der,"cursor","move");this.registerDragDrop();}this.subscribe("beforeShow",B);}el se{if(this.dd){this.dd.unreg();}if(this.header){A.setStyle(this.header,"cursor", "auto");}this.unsubscribe("beforeShow",B);}},configUnderlay:function(d,c,Z){var b=(this.platform=="mac"&&L.gecko),e=c[0].toLowerCase(),V=this.underlay,W=this.el ement;function X(){var f=false;if(!V){if(!Q){Q=document.createElement("div");Q.c lassName="underlay";}V=Q.cloneNode(false);this.element.appendChild(V);this.under lay=V;if(P){this.sizeUnderlay();this.cfg.subscribeToConfigEvent("width",this.siz eUnderlay);this.cfg.subscribeToConfigEvent("height",this.sizeUnderlay);this.chan geContentEvent.subscribe(this.sizeUnderlay);YAHOO.widget.Module.textResizeEvent. subscribe(this.sizeUnderlay,this,true);}if(L.webkit&&L.webkit<420){this.changeCo ntentEvent.subscribe(this.forceUnderlayRedraw);}f=true;}}function a(){var f=X.ca ll(this);if(!f&&P){this.sizeUnderlay();}this._underlayDeferred=false;this.before ShowEvent.unsubscribe(a);}function Y(){if(this._underlayDeferred){this.beforeSho wEvent.unsubscribe(a);this._underlayDeferred=false;}if(V){this.cfg.unsubscribeFr omConfigEvent("width",this.sizeUnderlay);this.cfg.unsubscribeFromConfigEvent("he ight",this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.sizeUnderlay); this.changeContentEvent.unsubscribe(this.forceUnderlayRedraw);YAHOO.widget.Modul e.textResizeEvent.unsubscribe(this.sizeUnderlay,this,true);this.element.removeCh ild(V);this.underlay=null;}}switch(e){case"shadow":A.removeClass(W,"matte");A.ad dClass(W,"shadow");break;case"matte":if(!b){Y.call(this);}A.removeClass(W,"shado w");A.addClass(W,"matte");break;default:if(!b){Y.call(this);}A.removeClass(W,"sh adow");A.removeClass(W,"matte");break;}if((e=="shadow")||(b&&!V)){if(this.cfg.ge tProperty("visible")){var U=X.call(this);if(!U&&P){this.sizeUnderlay();}}else{if (!this._underlayDeferred){this.beforeShowEvent.subscribe(a);this._underlayDeferr ed=true;}}}},configModal:function(V,U,X){var W=U[0];if(W){if(!this._hasModalityE ventListeners){this.subscribe("beforeShow",this.buildMask);this.subscribe("befor eShow",this.bringToTop);this.subscribe("beforeShow",this.showMask);this.subscrib e("hide",this.hideMask);H.windowResizeEvent.subscribe(this.sizeMask,this,true);t his._hasModalityEventListeners=true;}}else{if(this._hasModalityEventListeners){i f(this.cfg.getProperty("visible")){this.hideMask();this.removeMask();}this.unsub scribe("beforeShow",this.buildMask);this.unsubscribe("beforeShow",this.bringToTo p);this.unsubscribe("beforeShow",this.showMask);this.unsubscribe("hide",this.hid eMask);H.windowResizeEvent.unsubscribe(this.sizeMask,this);this._hasModalityEven tListeners=false;}}},removeMask:function(){var V=this.mask,U;if(V){this.hideMask ();U=V.parentNode;if(U){U.removeChild(V);}this.mask=null;}},configKeyListeners:f unction(X,U,a){var W=U[0],Z,Y,V;if(W){if(W instanceof Array){Y=W.length;for(V=0; V<Y;V++){Z=W[V];if(!I.alreadySubscribed(this.showEvent,Z.enable,Z)){this.showEve nt.subscribe(Z.enable,Z,true);}if(!I.alreadySubscribed(this.hideEvent,Z.disable, Z)){this.hideEvent.subscribe(Z.disable,Z,true);this.destroyEvent.subscribe(Z.dis able,Z,true);}}}else{if(!I.alreadySubscribed(this.showEvent,W.enable,W)){this.sh owEvent.subscribe(W.enable,W,true);}if(!I.alreadySubscribed(this.hideEvent,W.dis able,W)){this.hideEvent.subscribe(W.disable,W,true);this.destroyEvent.subscribe( W.disable,W,true);}}}},configStrings:function(V,U,W){var X=E.merge(N.STRINGS.val

ue,U[0]);this.cfg.setProperty(N.STRINGS.key,X,true);},configHeight:function(X,V, Y){var U=V[0],W=this.innerElement;A.setStyle(W,"height",U);this.cfg.refireEvent( "iframe");},_autoFillOnHeightChange:function(X,V,W){O.superclass._autoFillOnHeig htChange.apply(this,arguments);if(P){var U=this;setTimeout(function(){U.sizeUnde rlay();},0);}},configWidth:function(X,U,Y){var W=U[0],V=this.innerElement;A.setS tyle(V,"width",W);this.cfg.refireEvent("iframe");},configzIndex:function(V,U,X){ O.superclass.configzIndex.call(this,V,U,X);if(this.mask||this.cfg.getProperty("m odal")===true){var W=A.getStyle(this.element,"zIndex");if(!W||isNaN(W)){W=0;}if( W===0){this.cfg.setProperty("zIndex",1);}else{this.stackMask();}}},buildWrapper: function(){var W=this.element.parentNode,U=this.element,V=document.createElement ("div");V.className=O.CSS_PANEL_CONTAINER;V.id=U.id+"_c";if(W){W.insertBefore(V, U);}V.appendChild(U);this.element=V;this.innerElement=U;A.setStyle(this.innerEle ment,"visibility","inherit");},sizeUnderlay:function(){var V=this.underlay,U;if( V){U=this.element;V.style.width=U.offsetWidth+"px";V.style.height=U.offsetHeight +"px";}},registerDragDrop:function(){var V=this;if(this.header){if(!F.DD){return ;}var U=(this.cfg.getProperty("dragonly")===true);this.dd=new F.DD(this.element. id,this.id,{dragOnly:U});if(!this.header.id){this.header.id=this.id+"_h";}this.d d.startDrag=function(){var X,Z,W,c,b,a;if(YAHOO.env.ua.ie==6){A.addClass(V.eleme nt,"drag");}if(V.cfg.getProperty("constraintoviewport")){var Y=H.VIEWPORT_OFFSET ;X=V.element.offsetHeight;Z=V.element.offsetWidth;W=A.getViewportWidth();c=A.get ViewportHeight();b=A.getDocumentScrollLeft();a=A.getDocumentScrollTop();if(X+Y<c ){this.minY=a+Y;this.maxY=a+c-X-Y;}else{this.minY=a+Y;this.maxY=a+Y;}if(Z+Y<W){t his.minX=b+Y;this.maxX=b+W-Z-Y;}else{this.minX=b+Y;this.maxX=b+Y;}this.constrain X=true;this.constrainY=true;}else{this.constrainX=false;this.constrainY=false;}V .dragEvent.fire("startDrag",arguments);};this.dd.onDrag=function(){V.syncPositio n();V.cfg.refireEvent("iframe");if(this.platform=="mac"&&YAHOO.env.ua.gecko){thi s.showMacGeckoScrollbars();}V.dragEvent.fire("onDrag",arguments);};this.dd.endDr ag=function(){if(YAHOO.env.ua.ie==6){A.removeClass(V.element,"drag");}V.dragEven t.fire("endDrag",arguments);V.moveEvent.fire(V.cfg.getProperty("xy"));};this.dd. setHandleElId(this.header.id);this.dd.addInvalidHandleType("INPUT");this.dd.addI nvalidHandleType("SELECT");this.dd.addInvalidHandleType("TEXTAREA");}},buildMask :function(){var U=this.mask;if(!U){if(!G){G=document.createElement("div");G.clas sName="mask";G.innerHTML="&#160;";}U=G.cloneNode(true);U.id=this.id+"_mask";docu ment.body.insertBefore(U,document.body.firstChild);this.mask=U;if(YAHOO.env.ua.g ecko&&this.platform=="mac"){A.addClass(this.mask,"block-scrollbars");}this.stack Mask();}},hideMask:function(){if(this.cfg.getProperty("modal")&&this.mask){this. mask.style.display="none";A.removeClass(document.body,"masked");this.hideMaskEve nt.fire();}},showMask:function(){if(this.cfg.getProperty("modal")&&this.mask){A. addClass(document.body,"masked");this.sizeMask();this.mask.style.display="block" ;this.showMaskEvent.fire();}},sizeMask:function(){if(this.mask){var V=this.mask, W=A.getViewportWidth(),U=A.getViewportHeight();if(V.offsetHeight>U){V.style.heig ht=U+"px";}if(V.offsetWidth>W){V.style.width=W+"px";}V.style.height=A.getDocumen tHeight()+"px";V.style.width=A.getDocumentWidth()+"px";}},stackMask:function(){i f(this.mask){var U=A.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined( U)&&!isNaN(U)){A.setStyle(this.mask,"zIndex",U-1);}}},render:function(U){return O.superclass.render.call(this,U,this.innerElement);},destroy:function(){H.window ResizeEvent.unsubscribe(this.sizeMask,this);this.removeMask();if(this.close){T.p urgeElement(this.close);}O.superclass.destroy.call(this);},forceUnderlayRedraw:f unction(){var U=this.underlay;A.addClass(U,"yui-force-redraw");setTimeout(functi on(){A.removeClass(U,"yui-force-redraw");},0);},toString:function(){return"Panel "+this.id;}});}());(function(){YAHOO.widget.Dialog=function(J,I){YAHOO.widget.D ialog.superclass.constructor.call(this,J,I);};var B=YAHOO.util.Event,G=YAHOO.uti l.CustomEvent,E=YAHOO.util.Dom,A=YAHOO.widget.Dialog,F=YAHOO.lang,H={"BEFORE_SUB MIT":"beforeSubmit","SUBMIT":"submit","MANUAL_SUBMIT":"manualSubmit","ASYNC_SUBM IT":"asyncSubmit","FORM_SUBMIT":"formSubmit","CANCEL":"cancel"},C={"POST_METHOD" :{key:"postmethod",value:"async"},"POST_DATA":{key:"postdata",value:null},"BUTTO NS":{key:"buttons",value:"none",supercedes:["visible"]},"HIDEAFTERSUBMIT":{key:" hideaftersubmit",value:true}};A.CSS_DIALOG="yui-dialog";function D(){var L=this. _aButtons,J,K,I;if(F.isArray(L)){J=L.length;if(J>0){I=J-1;do{K=L[I];if(YAHOO.wid get.Button&&K instanceof YAHOO.widget.Button){K.destroy();}else{if(K.tagName.toU

pperCase()=="BUTTON"){B.purgeElement(K);B.purgeElement(K,false);}}}while(I--);}} }YAHOO.extend(A,YAHOO.widget.Panel,{form:null,initDefaultConfig:function(){A.sup erclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,ar gument:null};this.cfg.addProperty(C.POST_METHOD.key,{handler:this.configPostMeth od,value:C.POST_METHOD.value,validator:function(I){if(I!="form"&&I!="async"&&I!= "none"&&I!="manual"){return false;}else{return true;}}});this.cfg.addProperty(C. POST_DATA.key,{value:C.POST_DATA.value});this.cfg.addProperty(C.HIDEAFTERSUBMIT. key,{value:C.HIDEAFTERSUBMIT.value});this.cfg.addProperty(C.BUTTONS.key,{handler :this.configButtons,value:C.BUTTONS.value,supercedes:C.BUTTONS.supercedes});},in itEvents:function(){A.superclass.initEvents.call(this);var I=G.LIST;this.beforeS ubmitEvent=this.createEvent(H.BEFORE_SUBMIT);this.beforeSubmitEvent.signature=I; this.submitEvent=this.createEvent(H.SUBMIT);this.submitEvent.signature=I;this.ma nualSubmitEvent=this.createEvent(H.MANUAL_SUBMIT);this.manualSubmitEvent.signatu re=I;this.asyncSubmitEvent=this.createEvent(H.ASYNC_SUBMIT);this.asyncSubmitEven t.signature=I;this.formSubmitEvent=this.createEvent(H.FORM_SUBMIT);this.formSubm itEvent.signature=I;this.cancelEvent=this.createEvent(H.CANCEL);this.cancelEvent .signature=I;},init:function(J,I){A.superclass.init.call(this,J);this.beforeInit Event.fire(A);E.addClass(this.element,A.CSS_DIALOG);this.cfg.setProperty("visibl e",false);if(I){this.cfg.applyConfig(I,true);}this.showEvent.subscribe(this.focu sFirst,this,true);this.beforeHideEvent.subscribe(this.blurButtons,this,true);thi s.subscribe("changeBody",this.registerForm);this.initEvent.fire(A);},doSubmit:fu nction(){var P=YAHOO.util.Connect,Q=this.form,K=false,N=false,R,M,L,I;switch(thi s.cfg.getProperty("postmethod")){case"async":R=Q.elements;M=R.length;if(M>0){L=M -1;do{if(R[L].type=="file"){K=true;break;}}while(L--);}if(K&&YAHOO.env.ua.ie&&th is.isSecure){N=true;}I=this._getFormAttributes(Q);P.setForm(Q,K,N);var J=this.cf g.getProperty("postdata");var O=P.asyncRequest(I.method,I.action,this.callback,J );this.asyncSubmitEvent.fire(O);break;case"form":Q.submit();this.formSubmitEvent .fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break;}},_ge tFormAttributes:function(K){var I={method:null,action:null};if(K){if(K.getAttrib uteNode){var J=K.getAttributeNode("action");var L=K.getAttributeNode("method");i f(J){I.action=J.value;}if(L){I.method=L.value;}}else{I.action=K.getAttribute("ac tion");I.method=K.getAttribute("method");}}I.method=(F.isString(I.method)?I.meth od:"POST").toUpperCase();I.action=F.isString(I.action)?I.action:"";return I;},re gisterForm:function(){var I=this.element.getElementsByTagName("form")[0];if(this .form){if(this.form==I&&E.isAncestor(this.element,this.form)){return;}else{B.pur geElement(this.form);this.form=null;}}if(!I){I=document.createElement("form");I. name="frm_"+this.id;this.body.appendChild(I);}if(I){this.form=I;B.on(I,"submit", this._submitHandler,this,true);}},_submitHandler:function(I){B.stopEvent(I);this .submit();this.form.blur();},setTabLoop:function(I,J){I=I||this.firstButton;J=th is.lastButton||J;A.superclass.setTabLoop.call(this,I,J);},setFirstLastFocusable: function(){A.superclass.setFirstLastFocusable.call(this);var J,I,K,L=this.focusa bleElements;this.firstFormElement=null;this.lastFormElement=null;if(this.form&&L &&L.length>0){I=L.length;for(J=0;J<I;++J){K=L[J];if(this.form===K.form){this.fir stFormElement=K;break;}}for(J=I-1;J>=0;--J){K=L[J];if(this.form===K.form){this.l astFormElement=K;break;}}}},configClose:function(J,I,K){A.superclass.configClose .apply(this,arguments);},_doClose:function(I){B.preventDefault(I);this.cancel(); },configButtons:function(S,R,M){var N=YAHOO.widget.Button,U=R[0],K=this.innerEle ment,T,P,J,Q,O,I,L;D.call(this);this._aButtons=null;if(F.isArray(U)){O=document. createElement("span");O.className="button-group";Q=U.length;this._aButtons=[];th is.defaultHtmlButton=null;for(L=0;L<Q;L++){T=U[L];if(N){J=new N({label:T.text}); J.appendTo(O);P=J.get("element");if(T.isDefault){J.addClass("default");this.defa ultHtmlButton=P;}if(F.isFunction(T.handler)){J.set("onclick",{fn:T.handler,obj:t his,scope:this});}else{if(F.isObject(T.handler)&&F.isFunction(T.handler.fn)){J.s et("onclick",{fn:T.handler.fn,obj:((!F.isUndefined(T.handler.obj))?T.handler.obj :this),scope:(T.handler.scope||this)});}}this._aButtons[this._aButtons.length]=J ;}else{P=document.createElement("button");P.setAttribute("type","button");if(T.i sDefault){P.className="default";this.defaultHtmlButton=P;}P.innerHTML=T.text;if( F.isFunction(T.handler)){B.on(P,"click",T.handler,this,true);}else{if(F.isObject (T.handler)&&F.isFunction(T.handler.fn)){B.on(P,"click",T.handler.fn,((!F.isUnde fined(T.handler.obj))?T.handler.obj:this),(T.handler.scope||this));}}O.appendChi

ld(P);this._aButtons[this._aButtons.length]=P;}T.htmlButton=P;if(L===0){this.fir stButton=P;}if(L==(Q-1)){this.lastButton=P;}}this.setFooter(O);I=this.footer;if( E.inDocument(this.element)&&!E.isAncestor(K,I)){K.appendChild(I);}this.buttonSpa n=O;}else{O=this.buttonSpan;I=this.footer;if(O&&I){I.removeChild(O);this.buttonS pan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null; }}this.changeContentEvent.fire();},getButtons:function(){return this._aButtons|| null;},focusFirst:function(K,I,M){var J=this.firstFormElement;if(I&&I[1]){B.stop Event(I[1]);}if(J){try{J.focus();}catch(L){}}else{if(this.defaultHtmlButton){thi s.focusDefaultButton();}else{this.focusFirstButton();}}},focusLast:function(K,I, M){var N=this.cfg.getProperty("buttons"),J=this.lastFormElement;if(I&&I[1]){B.st opEvent(I[1]);}if(N&&F.isArray(N)){this.focusLastButton();}else{if(J){try{J.focu s();}catch(L){}}}},_getButton:function(J){var I=YAHOO.widget.Button;if(I&&J&&J.n odeName&&J.id){J=I.getButton(J.id)||J;}return J;},focusDefaultButton:function(){ var I=this._getButton(this.defaultHtmlButton);if(I){try{I.focus();}catch(J){}}}, blurButtons:function(){var N=this.cfg.getProperty("buttons"),K,M,J,I;if(N&&F.isA rray(N)){K=N.length;if(K>0){I=(K-1);do{M=N[I];if(M){J=this._getButton(M.htmlButt on);if(J){try{J.blur();}catch(L){}}}}while(I--);}}},focusFirstButton:function(){ var L=this.cfg.getProperty("buttons"),K,I;if(L&&F.isArray(L)){K=L[0];if(K){I=thi s._getButton(K.htmlButton);if(I){try{I.focus();}catch(J){}}}}},focusLastButton:f unction(){var M=this.cfg.getProperty("buttons"),J,L,I;if(M&&F.isArray(M)){J=M.le ngth;if(J>0){L=M[(J-1)];if(L){I=this._getButton(L.htmlButton);if(I){try{I.focus( );}catch(K){}}}}}},configPostMethod:function(J,I,K){this.registerForm();},valida te:function(){return true;},submit:function(){if(this.validate()){this.beforeSub mitEvent.fire();this.doSubmit();this.submitEvent.fire();if(this.cfg.getProperty( "hideaftersubmit")){this.hide();}return true;}else{return false;}},cancel:functi on(){this.cancelEvent.fire();this.hide();},getData:function(){var Y=this.form,K, R,U,M,S,P,O,J,V,L,W,Z,I,N,a,X,T;function Q(c){var b=c.tagName.toUpperCase();retu rn((b=="INPUT"||b=="TEXTAREA"||b=="SELECT")&&c.name==M);}if(Y){K=Y.elements;R=K. length;U={};for(X=0;X<R;X++){M=K[X].name;S=E.getElementsBy(Q,"*",Y);P=S.length;i f(P>0){if(P==1){S=S[0];O=S.type;J=S.tagName.toUpperCase();switch(J){case"INPUT": if(O=="checkbox"){U[M]=S.checked;}else{if(O!="radio"){U[M]=S.value;}}break;case" TEXTAREA":U[M]=S.value;break;case"SELECT":V=S.options;L=V.length;W=[];for(T=0;T< L;T++){Z=V[T];if(Z.selected){I=Z.value;if(!I||I===""){I=Z.text;}W[W.length]=I;}} U[M]=W;break;}}else{O=S[0].type;switch(O){case"radio":for(T=0;T<P;T++){N=S[T];if (N.checked){U[M]=N.value;break;}}break;case"checkbox":W=[];for(T=0;T<P;T++){a=S[ T];if(a.checked){W[W.length]=a.value;}}U[M]=W;break;}}}}}return U;},destroy:func tion(){D.call(this);this._aButtons=null;var I=this.element.getElementsByTagName( "form"),J;if(I.length>0){J=I[0];if(J){B.purgeElement(J);if(J.parentNode){J.paren tNode.removeChild(J);}this.form=null;}}A.superclass.destroy.call(this);},toStrin g:function(){return"Dialog "+this.id;}});}());(function(){YAHOO.widget.SimpleDia log=function(E,D){YAHOO.widget.SimpleDialog.superclass.constructor.call(this,E,D );};var C=YAHOO.util.Dom,B=YAHOO.widget.SimpleDialog,A={"ICON":{key:"icon",value :"none",suppressEvent:true},"TEXT":{key:"text",value:"",suppressEvent:true,super cedes:["icon"]}};B.ICON_BLOCK="blckicon";B.ICON_ALARM="alrticon";B.ICON_HELP="hl picon";B.ICON_INFO="infoicon";B.ICON_WARN="warnicon";B.ICON_TIP="tipicon";B.ICON _CSS_CLASSNAME="yui-icon";B.CSS_SIMPLEDIALOG="yui-simple-dialog";YAHOO.extend(B, YAHOO.widget.Dialog,{initDefaultConfig:function(){B.superclass.initDefaultConfig .call(this);this.cfg.addProperty(A.ICON.key,{handler:this.configIcon,value:A.ICO N.value,suppressEvent:A.ICON.suppressEvent});this.cfg.addProperty(A.TEXT.key,{ha ndler:this.configText,value:A.TEXT.value,suppressEvent:A.TEXT.suppressEvent,supe rcedes:A.TEXT.supercedes});},init:function(E,D){B.superclass.init.call(this,E);t his.beforeInitEvent.fire(B);C.addClass(this.element,B.CSS_SIMPLEDIALOG);this.cfg .queueProperty("postmethod","manual");if(D){this.cfg.applyConfig(D,true);}this.b eforeRenderEvent.subscribe(function(){if(!this.body){this.setBody("");}},this,tr ue);this.initEvent.fire(B);},registerForm:function(){B.superclass.registerForm.c all(this);this.form.innerHTML+='<input type="hidden" name="'+this.id+'" value="" />';},configIcon:function(F,E,J){var K=E[0],D=this.body,I=B.ICON_CSS_CLASSNAME,H ,G;if(K&&K!="none"){H=C.getElementsByClassName(I,"*",D);if(H){G=H.parentNode;if( G){G.removeChild(H);H=null;}}if(K.indexOf(".")==-1){H=document.createElement("sp an");H.className=(I+" "+K);H.innerHTML="&#160;";}else{H=document.createElement("

img");H.src=(this.imageRoot+K);H.className=I;}if(H){D.insertBefore(H,D.firstChil d);}}},configText:function(E,D,F){var G=D[0];if(G){this.setBody(G);this.cfg.refi reEvent("icon");}},toString:function(){return"SimpleDialog "+this.id;}});}());(f unction(){YAHOO.widget.ContainerEffect=function(E,H,G,D,F){if(!F){F=YAHOO.util.A nim;}this.overlay=E;this.attrIn=H;this.attrOut=G;this.targetElement=D||E.element ;this.animClass=F;};var B=YAHOO.util.Dom,C=YAHOO.util.CustomEvent,A=YAHOO.widget .ContainerEffect;A.FADE=function(D,F){var G=YAHOO.util.Easing,I={attributes:{opa city:{from:0,to:1}},duration:F,method:G.easeIn},E={attributes:{opacity:{to:0}},d uration:F,method:G.easeOut},H=new A(D,I,E,D.element);H.handleUnderlayStart=funct ion(){var K=this.overlay.underlay;if(K&&YAHOO.env.ua.ie){var J=(K.filters&&K.fil ters.length>0);if(J){B.addClass(D.element,"yui-effect-fade");}}};H.handleUnderla yComplete=function(){var J=this.overlay.underlay;if(J&&YAHOO.env.ua.ie){B.remove Class(D.element,"yui-effect-fade");}};H.handleStartAnimateIn=function(K,J,L){B.a ddClass(L.overlay.element,"hide-select");if(!L.overlay.underlay){L.overlay.cfg.r efireEvent("underlay");}L.handleUnderlayStart();L.overlay._setDomVisibility(true );B.setStyle(L.overlay.element,"opacity",0);};H.handleCompleteAnimateIn=function (K,J,L){B.removeClass(L.overlay.element,"hide-select");if(L.overlay.element.styl e.filter){L.overlay.element.style.filter=null;}L.handleUnderlayComplete();L.over lay.cfg.refireEvent("iframe");L.animateInCompleteEvent.fire();};H.handleStartAni mateOut=function(K,J,L){B.addClass(L.overlay.element,"hide-select");L.handleUnde rlayStart();};H.handleCompleteAnimateOut=function(K,J,L){B.removeClass(L.overlay .element,"hide-select");if(L.overlay.element.style.filter){L.overlay.element.sty le.filter=null;}L.overlay._setDomVisibility(false);B.setStyle(L.overlay.element, "opacity",1);L.handleUnderlayComplete();L.overlay.cfg.refireEvent("iframe");L.an imateOutCompleteEvent.fire();};H.init();return H;};A.SLIDE=function(F,D){var I=Y AHOO.util.Easing,L=F.cfg.getProperty("x")||B.getX(F.element),K=F.cfg.getProperty ("y")||B.getY(F.element),M=B.getClientWidth(),H=F.element.offsetWidth,J={attribu tes:{points:{to:[L,K]}},duration:D,method:I.easeIn},E={attributes:{points:{to:[( M+25),K]}},duration:D,method:I.easeOut},G=new A(F,J,E,F.element,YAHOO.util.Motio n);G.handleStartAnimateIn=function(O,N,P){P.overlay.element.style.left=((-25)-H) +"px";P.overlay.element.style.top=K+"px";};G.handleTweenAnimateIn=function(Q,P,R ){var S=B.getXY(R.overlay.element),O=S[0],N=S[1];if(B.getStyle(R.overlay.element ,"visibility")=="hidden"&&O<L){R.overlay._setDomVisibility(true);}R.overlay.cfg. setProperty("xy",[O,N],true);R.overlay.cfg.refireEvent("iframe");};G.handleCompl eteAnimateIn=function(O,N,P){P.overlay.cfg.setProperty("xy",[L,K],true);P.startX =L;P.startY=K;P.overlay.cfg.refireEvent("iframe");P.animateInCompleteEvent.fire( );};G.handleStartAnimateOut=function(O,N,R){var P=B.getViewportWidth(),S=B.getXY (R.overlay.element),Q=S[1];R.animOut.attributes.points.to=[(P+25),Q];};G.handleT weenAnimateOut=function(P,O,Q){var S=B.getXY(Q.overlay.element),N=S[0],R=S[1];Q. overlay.cfg.setProperty("xy",[N,R],true);Q.overlay.cfg.refireEvent("iframe");};G .handleCompleteAnimateOut=function(O,N,P){P.overlay._setDomVisibility(false);P.o verlay.cfg.setProperty("xy",[L,K]);P.animateOutCompleteEvent.fire();};G.init();r eturn G;};A.prototype={init:function(){this.beforeAnimateInEvent=this.createEven t("beforeAnimateIn");this.beforeAnimateInEvent.signature=C.LIST;this.beforeAnima teOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signa ture=C.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");th is.animateInCompleteEvent.signature=C.LIST;this.animateOutCompleteEvent=this.cre ateEvent("animateOutComplete");this.animateOutCompleteEvent.signature=C.LIST;thi s.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrI n.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAni mateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this. animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration, this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,t his);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOu t.onComplete.subscribe(this.handleCompleteAnimateOut,this);},animateIn:function( ){this.beforeAnimateInEvent.fire();this.animIn.animate();},animateOut:function() {this.beforeAnimateOutEvent.fire();this.animOut.animate();},handleStartAnimateIn :function(E,D,F){},handleTweenAnimateIn:function(E,D,F){},handleCompleteAnimateI n:function(E,D,F){},handleStartAnimateOut:function(E,D,F){},handleTweenAnimateOu

t:function(E,D,F){},handleCompleteAnimateOut:function(E,D,F){},toString:function (){var D="ContainerEffect";if(this.overlay){D+=" ["+this.overlay.toString()+"]"; }return D;}};YAHOO.lang.augmentProto(A,YAHOO.util.EventProvider);})();YAHOO.regi ster("container",YAHOO.widget.Module,{version:"2.7.0",build:"1799"});(function() {YAHOO.util.Config=function(D){if(D){this.init(D);}};var B=YAHOO.lang,C=YAHOO.ut il.CustomEvent,A=YAHOO.util.Config;A.CONFIG_CHANGED_EVENT="configChanged";A.BOOL EAN_TYPE="boolean";A.prototype={owner:null,queueInProgress:false,config:null,ini tialConfig:null,eventQueue:null,configChangedEvent:null,init:function(D){this.ow ner=D;this.configChangedEvent=this.createEvent(A.CONFIG_CHANGED_EVENT);this.conf igChangedEvent.signature=C.LIST;this.queueInProgress=false;this.config={};this.i nitialConfig={};this.eventQueue=[];},checkBoolean:function(D){return(typeof D==A .BOOLEAN_TYPE);},checkNumber:function(D){return(!isNaN(D));},fireEvent:function( D,F){var E=this.config[D];if(E&&E.event){E.event.fire(F);}},addProperty:function (E,D){E=E.toLowerCase();this.config[E]=D;D.event=this.createEvent(E,{scope:this. owner});D.event.signature=C.LIST;D.key=E;if(D.handler){D.event.subscribe(D.handl er,this.owner);}this.setProperty(E,D.value,true);if(!D.suppressEvent){this.queue Property(E,D.value);}},getConfig:function(){var D={},F=this.config,G,E;for(G in F){if(B.hasOwnProperty(F,G)){E=F[G];if(E&&E.event){D[G]=E.value;}}}return D;},ge tProperty:function(D){var E=this.config[D.toLowerCase()];if(E&&E.event){return E .value;}else{return undefined;}},resetProperty:function(D){D=D.toLowerCase();var E=this.config[D];if(E&&E.event){if(this.initialConfig[D]&&!B.isUndefined(this.i nitialConfig[D])){this.setProperty(D,this.initialConfig[D]);return true;}}else{r eturn false;}},setProperty:function(E,G,D){var F;E=E.toLowerCase();if(this.queue InProgress&&!D){this.queueProperty(E,G);return true;}else{F=this.config[E];if(F& &F.event){if(F.validator&&!F.validator(G)){return false;}else{F.value=G;if(!D){t his.fireEvent(E,G);this.configChangedEvent.fire([E,G]);}return true;}}else{retur n false;}}},queueProperty:function(S,P){S=S.toLowerCase();var R=this.config[S],K =false,J,G,H,I,O,Q,F,M,N,D,L,T,E;if(R&&R.event){if(!B.isUndefined(P)&&R.validato r&&!R.validator(P)){return false;}else{if(!B.isUndefined(P)){R.value=P;}else{P=R .value;}K=false;J=this.eventQueue.length;for(L=0;L<J;L++){G=this.eventQueue[L];i f(G){H=G[0];I=G[1];if(H==S){this.eventQueue[L]=null;this.eventQueue.push([S,(!B. isUndefined(P)?P:I)]);K=true;break;}}}if(!K&&!B.isUndefined(P)){this.eventQueue. push([S,P]);}}if(R.supercedes){O=R.supercedes.length;for(T=0;T<O;T++){Q=R.superc edes[T];F=this.eventQueue.length;for(E=0;E<F;E++){M=this.eventQueue[E];if(M){N=M [0];D=M[1];if(N==Q.toLowerCase()){this.eventQueue.push([N,D]);this.eventQueue[E] =null;break;}}}}}return true;}else{return false;}},refireEvent:function(D){D=D.t oLowerCase();var E=this.config[D];if(E&&E.event&&!B.isUndefined(E.value)){if(thi s.queueInProgress){this.queueProperty(D);}else{this.fireEvent(D,E.value);}}},app lyConfig:function(D,G){var F,E;if(G){E={};for(F in D){if(B.hasOwnProperty(D,F)){ E[F.toLowerCase()]=D[F];}}this.initialConfig=E;}for(F in D){if(B.hasOwnProperty( D,F)){this.queueProperty(F,D[F]);}}},refresh:function(){var D;for(D in this.conf ig){if(B.hasOwnProperty(this.config,D)){this.refireEvent(D);}}},fireQueue:functi on(){var E,H,D,G,F;this.queueInProgress=true;for(E=0;E<this.eventQueue.length;E+ +){H=this.eventQueue[E];if(H){D=H[0];G=H[1];F=this.config[D];F.value=G;this.even tQueue[E]=null;this.fireEvent(D,G);}}this.queueInProgress=false;this.eventQueue= [];},subscribeToConfigEvent:function(E,F,H,D){var G=this.config[E.toLowerCase()] ;if(G&&G.event){if(!A.alreadySubscribed(G.event,F,H)){G.event.subscribe(F,H,D);} return true;}else{return false;}},unsubscribeFromConfigEvent:function(D,E,G){var F=this.config[D.toLowerCase()];if(F&&F.event){return F.event.unsubscribe(E,G);} else{return false;}},toString:function(){var D="Config";if(this.owner){D+=" ["+t his.owner.toString()+"]";}return D;},outputEventQueue:function(){var D="",G,E,F= this.eventQueue.length;for(E=0;E<F;E++){G=this.eventQueue[E];if(G){D+=G[0]+"="+G [1]+", ";}}return D;},destroy:function(){var E=this.config,D,F;for(D in E){if(B. hasOwnProperty(E,D)){F=E[D];F.event.unsubscribeAll();F.event=null;}}this.configC hangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.c onfig=null;this.initialConfig=null;this.eventQueue=null;}};A.alreadySubscribed=f unction(E,H,I){var F=E.subscribers.length,D,G;if(F>0){G=F-1;do{D=E.subscribers[G ];if(D&&D.obj==I&&D.fn==H){return true;}}while(G--);}return false;};YAHOO.lang.a ugmentProto(A,YAHOO.util.EventProvider);}());YAHOO.widget.DateMath={DAY:"D",WEEK :"W",YEAR:"Y",MONTH:"M",ONE_DAY_MS:1000*60*60*24,WEEK_ONE_JAN_DATE:1,add:functio

n(A,D,C){var F=new Date(A.getTime());switch(D){case this.MONTH:var E=A.getMonth( )+C;var B=0;if(E<0){while(E<0){E+=12;B-=1;}}else{if(E>11){while(E>11){E-=12;B+=1 ;}}}F.setMonth(E);F.setFullYear(A.getFullYear()+B);break;case this.DAY:this._add Days(F,C);break;case this.YEAR:F.setFullYear(A.getFullYear()+C);break;case this. WEEK:this._addDays(F,(C*7));break;}return F;},_addDays:function(D,C){if(YAHOO.en v.ua.webkit&&YAHOO.env.ua.webkit<420){if(C<0){for(var B=-128;C<B;C-=B){D.setDate (D.getDate()+B);}}else{for(var A=96;C>A;C-=A){D.setDate(D.getDate()+A);}}}D.setD ate(D.getDate()+C);},subtract:function(A,C,B){return this.add(A,C,(B*-1));},befo re:function(C,B){var A=B.getTime();if(C.getTime()<A){return true;}else{return fa lse;}},after:function(C,B){var A=B.getTime();if(C.getTime()>A){return true;}else {return false;}},between:function(B,A,C){if(this.after(B,A)&&this.before(B,C)){r eturn true;}else{return false;}},getJan1:function(A){return this.getDate(A,0,1); },getDayOffset:function(B,D){var C=this.getJan1(D);var A=Math.ceil((B.getTime()C.getTime())/this.ONE_DAY_MS);return A;},getWeekNumber:function(E,B,H){B=B||0;H= H||this.WEEK_ONE_JAN_DATE;var I=this.clearTime(E),M,N;if(I.getDay()===B){M=I;}el se{M=this.getFirstDayOfWeek(I,B);}var J=M.getFullYear(),C=M.getTime();N=new Date (M.getTime()+6*this.ONE_DAY_MS);var G;if(J!==N.getFullYear()&&N.getDate()>=H){G= 1;}else{var F=this.clearTime(this.getDate(J,0,H)),A=this.getFirstDayOfWeek(F,B); var K=Math.round((I.getTime()-A.getTime())/this.ONE_DAY_MS);var L=K%7;var D=(K-L )/7;G=D+1;}return G;},getFirstDayOfWeek:function(D,A){A=A||0;var B=D.getDay(),C= (B-A+7)%7;return this.subtract(D,this.DAY,C);},isYearOverlapWeek:function(A){var C=false;var B=this.add(A,this.DAY,6);if(B.getFullYear()!=A.getFullYear()){C=tru e;}return C;},isMonthOverlapWeek:function(A){var C=false;var B=this.add(A,this.D AY,6);if(B.getMonth()!=A.getMonth()){C=true;}return C;},findMonthStart:function( A){var B=this.getDate(A.getFullYear(),A.getMonth(),1);return B;},findMonthEnd:fu nction(B){var D=this.findMonthStart(B);var C=this.add(D,this.MONTH,1);var A=this .subtract(C,this.DAY,1);return A;},clearTime:function(A){A.setHours(12,0,0,0);re turn A;},getDate:function(D,A,C){var B=null;if(YAHOO.lang.isUndefined(C)){C=1;}i f(D>=100){B=new Date(D,A,C);}else{B=new Date();B.setFullYear(D);B.setMonth(A);B. setDate(C);B.setHours(0,0,0,0);}return B;}};(function(){var C=YAHOO.util.Dom,A=Y AHOO.util.Event,E=YAHOO.lang,D=YAHOO.widget.DateMath;function F(I,G,H){this.init .apply(this,arguments);}F.IMG_ROOT=null;F.DATE="D";F.MONTH_DAY="MD";F.WEEKDAY="W D";F.RANGE="R";F.MONTH="M";F.DISPLAY_DAYS=42;F.STOP_RENDER="S";F.SHORT="short";F .LONG="long";F.MEDIUM="medium";F.ONE_CHAR="1char";F._DEFAULT_CONFIG={PAGEDATE:{k ey:"pagedate",value:null},SELECTED:{key:"selected",value:null},TITLE:{key:"title ",value:""},CLOSE:{key:"close",value:false},IFRAME:{key:"iframe",value:(YAHOO.en v.ua.ie&&YAHOO.env.ua.ie<=6)?true:false},MINDATE:{key:"mindate",value:null},MAXD ATE:{key:"maxdate",value:null},MULTI_SELECT:{key:"multi_select",value:false},STA RT_WEEKDAY:{key:"start_weekday",value:0},SHOW_WEEKDAYS:{key:"show_weekdays",valu e:true},SHOW_WEEK_HEADER:{key:"show_week_header",value:false},SHOW_WEEK_FOOTER:{ key:"show_week_footer",value:false},HIDE_BLANK_WEEKS:{key:"hide_blank_weeks",val ue:false},NAV_ARROW_LEFT:{key:"nav_arrow_left",value:null},NAV_ARROW_RIGHT:{key: "nav_arrow_right",value:null},MONTHS_SHORT:{key:"months_short",value:["Jan","Feb ","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},MONTHS_LONG:{key :"months_long",value:["January","February","March","April","May","June","July"," August","September","October","November","December"]},WEEKDAYS_1CHAR:{key:"weekd ays_1char",value:["S","M","T","W","T","F","S"]},WEEKDAYS_SHORT:{key:"weekdays_sh ort",value:["Su","Mo","Tu","We","Th","Fr","Sa"]},WEEKDAYS_MEDIUM:{key:"weekdays_ medium",value:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},WEEKDAYS_LONG:{key:"w eekdays_long",value:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday" ,"Saturday"]},LOCALE_MONTHS:{key:"locale_months",value:"long"},LOCALE_WEEKDAYS:{ key:"locale_weekdays",value:"short"},DATE_DELIMITER:{key:"date_delimiter",value: ","},DATE_FIELD_DELIMITER:{key:"date_field_delimiter",value:"/"},DATE_RANGE_DELI MITER:{key:"date_range_delimiter",value:"-"},MY_MONTH_POSITION:{key:"my_month_po sition",value:1},MY_YEAR_POSITION:{key:"my_year_position",value:2},MD_MONTH_POSI TION:{key:"md_month_position",value:1},MD_DAY_POSITION:{key:"md_day_position",va lue:2},MDY_MONTH_POSITION:{key:"mdy_month_position",value:1},MDY_DAY_POSITION:{k ey:"mdy_day_position",value:2},MDY_YEAR_POSITION:{key:"mdy_year_position",value: 3},MY_LABEL_MONTH_POSITION:{key:"my_label_month_position",value:1},MY_LABEL_YEAR _POSITION:{key:"my_label_year_position",value:2},MY_LABEL_MONTH_SUFFIX:{key:"my_

label_month_suffix",value:" "},MY_LABEL_YEAR_SUFFIX:{key:"my_label_year_suffix", value:""},NAV:{key:"navigator",value:null},STRINGS:{key:"strings",value:{previou sMonth:"Previous Month",nextMonth:"Next Month",close:"Close"},supercedes:["close ","title"]}};var B=F._DEFAULT_CONFIG;F._EVENT_TYPES={BEFORE_SELECT:"beforeSelect ",SELECT:"select",BEFORE_DESELECT:"beforeDeselect",DESELECT:"deselect",CHANGE_PA GE:"changePage",BEFORE_RENDER:"beforeRender",RENDER:"render",BEFORE_DESTROY:"bef oreDestroy",DESTROY:"destroy",RESET:"reset",CLEAR:"clear",BEFORE_HIDE:"beforeHid e",HIDE:"hide",BEFORE_SHOW:"beforeShow",SHOW:"show",BEFORE_HIDE_NAV:"beforeHideN av",HIDE_NAV:"hideNav",BEFORE_SHOW_NAV:"beforeShowNav",SHOW_NAV:"showNav",BEFORE _RENDER_NAV:"beforeRenderNav",RENDER_NAV:"renderNav"};F._STYLES={CSS_ROW_HEADER: "calrowhead",CSS_ROW_FOOTER:"calrowfoot",CSS_CELL:"calcell",CSS_CELL_SELECTOR:"s elector",CSS_CELL_SELECTED:"selected",CSS_CELL_SELECTABLE:"selectable",CSS_CELL_ RESTRICTED:"restricted",CSS_CELL_TODAY:"today",CSS_CELL_OOM:"oom",CSS_CELL_OOB:" previous",CSS_HEADER:"calheader",CSS_HEADER_TEXT:"calhead",CSS_BODY:"calbody",CS S_WEEKDAY_CELL:"calweekdaycell",CSS_WEEKDAY_ROW:"calweekdayrow",CSS_FOOTER:"calf oot",CSS_CALENDAR:"yui-calendar",CSS_SINGLE:"single",CSS_CONTAINER:"yui-calconta iner",CSS_NAV_LEFT:"calnavleft",CSS_NAV_RIGHT:"calnavright",CSS_NAV:"calnav",CSS _CLOSE:"calclose",CSS_CELL_TOP:"calcelltop",CSS_CELL_LEFT:"calcellleft",CSS_CELL _RIGHT:"calcellright",CSS_CELL_BOTTOM:"calcellbottom",CSS_CELL_HOVER:"calcellhov er",CSS_CELL_HIGHLIGHT1:"highlight1",CSS_CELL_HIGHLIGHT2:"highlight2",CSS_CELL_H IGHLIGHT3:"highlight3",CSS_CELL_HIGHLIGHT4:"highlight4"};F.prototype={Config:nul l,parent:null,index:-1,cells:null,cellDates:null,id:null,containerId:null,oDomCo ntainer:null,today:null,renderStack:null,_renderStack:null,oNavigator:null,_sele ctedDates:null,domEventMap:null,_parseArgs:function(H){var G={id:null,container: null,config:null};if(H&&H.length&&H.length>0){switch(H.length){case 1:G.id=null; G.container=H[0];G.config=null;break;case 2:if(E.isObject(H[1])&&!H[1].tagName&& !(H[1]instanceof String)){G.id=null;G.container=H[0];G.config=H[1];}else{G.id=H[ 0];G.container=H[1];G.config=null;}break;default:G.id=H[0];G.container=H[1];G.co nfig=H[2];break;}}else{}return G;},init:function(J,H,I){var G=this._parseArgs(ar guments);J=G.id;H=G.container;I=G.config;this.oDomContainer=C.get(H);if(!this.oD omContainer.id){this.oDomContainer.id=C.generateId();}if(!J){J=this.oDomContaine r.id+"_t";}this.id=J;this.containerId=this.oDomContainer.id;this.initEvents();th is.today=new Date();D.clearTime(this.today);this.cfg=new YAHOO.util.Config(this) ;this.Options={};this.Locale={};this.initStyles();C.addClass(this.oDomContainer, this.Style.CSS_CONTAINER);C.addClass(this.oDomContainer,this.Style.CSS_SINGLE);t his.cellDates=[];this.cells=[];this.renderStack=[];this._renderStack=[];this.set upConfig();if(I){this.cfg.applyConfig(I,true);}this.cfg.fireQueue();},configIfra me:function(I,H,J){var G=H[0];if(!this.parent){if(C.inDocument(this.oDomContaine r)){if(G){var K=C.getStyle(this.oDomContainer,"position");if(K=="absolute"||K==" relative"){if(!C.inDocument(this.iframe)){this.iframe=document.createElement("if rame");this.iframe.src="javascript:false;";C.setStyle(this.iframe,"opacity","0") ;if(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6){C.addClass(this.iframe,"fixedsize");}th is.oDomContainer.insertBefore(this.iframe,this.oDomContainer.firstChild);}}}else {if(this.iframe){if(this.iframe.parentNode){this.iframe.parentNode.removeChild(t his.iframe);}this.iframe=null;}}}}},configTitle:function(H,G,I){var K=G[0];if(K) {this.createTitleBar(K);}else{var J=this.cfg.getProperty(B.CLOSE.key);if(!J){thi s.removeTitleBar();}else{this.createTitleBar("&#160;");}}},configClose:function( H,G,I){var K=G[0],J=this.cfg.getProperty(B.TITLE.key);if(K){if(!J){this.createTi tleBar("&#160;");}this.createCloseButton();}else{this.removeCloseButton();if(!J) {this.removeTitleBar();}}},initEvents:function(){var G=F._EVENT_TYPES,I=YAHOO.ut il.CustomEvent,H=this;H.beforeSelectEvent=new I(G.BEFORE_SELECT);H.selectEvent=n ew I(G.SELECT);H.beforeDeselectEvent=new I(G.BEFORE_DESELECT);H.deselectEvent=ne w I(G.DESELECT);H.changePageEvent=new I(G.CHANGE_PAGE);H.beforeRenderEvent=new I (G.BEFORE_RENDER);H.renderEvent=new I(G.RENDER);H.beforeDestroyEvent=new I(G.BEF ORE_DESTROY);H.destroyEvent=new I(G.DESTROY);H.resetEvent=new I(G.RESET);H.clear Event=new I(G.CLEAR);H.beforeShowEvent=new I(G.BEFORE_SHOW);H.showEvent=new I(G. SHOW);H.beforeHideEvent=new I(G.BEFORE_HIDE);H.hideEvent=new I(G.HIDE);H.beforeS howNavEvent=new I(G.BEFORE_SHOW_NAV);H.showNavEvent=new I(G.SHOW_NAV);H.beforeHi deNavEvent=new I(G.BEFORE_HIDE_NAV);H.hideNavEvent=new I(G.HIDE_NAV);H.beforeRen derNavEvent=new I(G.BEFORE_RENDER_NAV);H.renderNavEvent=new I(G.RENDER_NAV);H.be

foreSelectEvent.subscribe(H.onBeforeSelect,this,true);H.selectEvent.subscribe(H. onSelect,this,true);H.beforeDeselectEvent.subscribe(H.onBeforeDeselect,this,true );H.deselectEvent.subscribe(H.onDeselect,this,true);H.changePageEvent.subscribe( H.onChangePage,this,true);H.renderEvent.subscribe(H.onRender,this,true);H.resetE vent.subscribe(H.onReset,this,true);H.clearEvent.subscribe(H.onClear,this,true); },doPreviousMonthNav:function(H,G){A.preventDefault(H);setTimeout(function(){G.p reviousMonth();var I=C.getElementsByClassName(G.Style.CSS_NAV_LEFT,"a",G.oDomCon tainer);if(I&&I[0]){try{I[0].focus();}catch(J){}}},0);},doNextMonthNav:function( H,G){A.preventDefault(H);setTimeout(function(){G.nextMonth();var I=C.getElements ByClassName(G.Style.CSS_NAV_RIGHT,"a",G.oDomContainer);if(I&&I[0]){try{I[0].focu s();}catch(J){}}},0);},doSelectCell:function(M,G){var R,O,I,L;var N=A.getTarget( M),H=N.tagName.toLowerCase(),K=false;while(H!="td"&&!C.hasClass(N,G.Style.CSS_CE LL_SELECTABLE)){if(!K&&H=="a"&&C.hasClass(N,G.Style.CSS_CELL_SELECTOR)){K=true;} N=N.parentNode;H=N.tagName.toLowerCase();if(N==this.oDomContainer||H=="html"){re turn;}}if(K){A.preventDefault(M);}R=N;if(C.hasClass(R,G.Style.CSS_CELL_SELECTABL E)){L=G.getIndexFromId(R.id);if(L>-1){O=G.cellDates[L];if(O){I=D.getDate(O[0],O[ 1]-1,O[2]);var Q;if(G.Options.MULTI_SELECT){Q=R.getElementsByTagName("a")[0];if( Q){Q.blur();}var J=G.cellDates[L];var P=G._indexOfSelectedFieldArray(J);if(P>-1) {G.deselectCell(L);}else{G.selectCell(L);}}else{Q=R.getElementsByTagName("a")[0] ;if(Q){Q.blur();}G.selectCell(L);}}}}},doCellMouseOver:function(I,H){var G;if(I) {G=A.getTarget(I);}else{G=this;}while(G.tagName&&G.tagName.toLowerCase()!="td"){ G=G.parentNode;if(!G.tagName||G.tagName.toLowerCase()=="html"){return;}}if(C.has Class(G,H.Style.CSS_CELL_SELECTABLE)){C.addClass(G,H.Style.CSS_CELL_HOVER);}},do CellMouseOut:function(I,H){var G;if(I){G=A.getTarget(I);}else{G=this;}while(G.ta gName&&G.tagName.toLowerCase()!="td"){G=G.parentNode;if(!G.tagName||G.tagName.to LowerCase()=="html"){return;}}if(C.hasClass(G,H.Style.CSS_CELL_SELECTABLE)){C.re moveClass(G,H.Style.CSS_CELL_HOVER);}},setupConfig:function(){var G=this.cfg;G.a ddProperty(B.PAGEDATE.key,{value:new Date(),handler:this.configPageDate});G.addP roperty(B.SELECTED.key,{value:[],handler:this.configSelected});G.addProperty(B.T ITLE.key,{value:B.TITLE.value,handler:this.configTitle});G.addProperty(B.CLOSE.k ey,{value:B.CLOSE.value,handler:this.configClose});G.addProperty(B.IFRAME.key,{v alue:B.IFRAME.value,handler:this.configIframe,validator:G.checkBoolean});G.addPr operty(B.MINDATE.key,{value:B.MINDATE.value,handler:this.configMinDate});G.addPr operty(B.MAXDATE.key,{value:B.MAXDATE.value,handler:this.configMaxDate});G.addPr operty(B.MULTI_SELECT.key,{value:B.MULTI_SELECT.value,handler:this.configOptions ,validator:G.checkBoolean});G.addProperty(B.START_WEEKDAY.key,{value:B.START_WEE KDAY.value,handler:this.configOptions,validator:G.checkNumber});G.addProperty(B. SHOW_WEEKDAYS.key,{value:B.SHOW_WEEKDAYS.value,handler:this.configOptions,valida tor:G.checkBoolean});G.addProperty(B.SHOW_WEEK_HEADER.key,{value:B.SHOW_WEEK_HEA DER.value,handler:this.configOptions,validator:G.checkBoolean});G.addProperty(B. SHOW_WEEK_FOOTER.key,{value:B.SHOW_WEEK_FOOTER.value,handler:this.configOptions, validator:G.checkBoolean});G.addProperty(B.HIDE_BLANK_WEEKS.key,{value:B.HIDE_BL ANK_WEEKS.value,handler:this.configOptions,validator:G.checkBoolean});G.addPrope rty(B.NAV_ARROW_LEFT.key,{value:B.NAV_ARROW_LEFT.value,handler:this.configOption s});G.addProperty(B.NAV_ARROW_RIGHT.key,{value:B.NAV_ARROW_RIGHT.value,handler:t his.configOptions});G.addProperty(B.MONTHS_SHORT.key,{value:B.MONTHS_SHORT.value ,handler:this.configLocale});G.addProperty(B.MONTHS_LONG.key,{value:B.MONTHS_LON G.value,handler:this.configLocale});G.addProperty(B.WEEKDAYS_1CHAR.key,{value:B. WEEKDAYS_1CHAR.value,handler:this.configLocale});G.addProperty(B.WEEKDAYS_SHORT. key,{value:B.WEEKDAYS_SHORT.value,handler:this.configLocale});G.addProperty(B.WE EKDAYS_MEDIUM.key,{value:B.WEEKDAYS_MEDIUM.value,handler:this.configLocale});G.a ddProperty(B.WEEKDAYS_LONG.key,{value:B.WEEKDAYS_LONG.value,handler:this.configL ocale});var H=function(){G.refireEvent(B.LOCALE_MONTHS.key);G.refireEvent(B.LOCA LE_WEEKDAYS.key);};G.subscribeToConfigEvent(B.START_WEEKDAY.key,H,this,true);G.s ubscribeToConfigEvent(B.MONTHS_SHORT.key,H,this,true);G.subscribeToConfigEvent(B .MONTHS_LONG.key,H,this,true);G.subscribeToConfigEvent(B.WEEKDAYS_1CHAR.key,H,th is,true);G.subscribeToConfigEvent(B.WEEKDAYS_SHORT.key,H,this,true);G.subscribeT oConfigEvent(B.WEEKDAYS_MEDIUM.key,H,this,true);G.subscribeToConfigEvent(B.WEEKD AYS_LONG.key,H,this,true);G.addProperty(B.LOCALE_MONTHS.key,{value:B.LOCALE_MONT HS.value,handler:this.configLocaleValues});G.addProperty(B.LOCALE_WEEKDAYS.key,{

value:B.LOCALE_WEEKDAYS.value,handler:this.configLocaleValues});G.addProperty(B. DATE_DELIMITER.key,{value:B.DATE_DELIMITER.value,handler:this.configLocale});G.a ddProperty(B.DATE_FIELD_DELIMITER.key,{value:B.DATE_FIELD_DELIMITER.value,handle r:this.configLocale});G.addProperty(B.DATE_RANGE_DELIMITER.key,{value:B.DATE_RAN GE_DELIMITER.value,handler:this.configLocale});G.addProperty(B.MY_MONTH_POSITION .key,{value:B.MY_MONTH_POSITION.value,handler:this.configLocale,validator:G.chec kNumber});G.addProperty(B.MY_YEAR_POSITION.key,{value:B.MY_YEAR_POSITION.value,h andler:this.configLocale,validator:G.checkNumber});G.addProperty(B.MD_MONTH_POSI TION.key,{value:B.MD_MONTH_POSITION.value,handler:this.configLocale,validator:G. checkNumber});G.addProperty(B.MD_DAY_POSITION.key,{value:B.MD_DAY_POSITION.value ,handler:this.configLocale,validator:G.checkNumber});G.addProperty(B.MDY_MONTH_P OSITION.key,{value:B.MDY_MONTH_POSITION.value,handler:this.configLocale,validato r:G.checkNumber});G.addProperty(B.MDY_DAY_POSITION.key,{value:B.MDY_DAY_POSITION .value,handler:this.configLocale,validator:G.checkNumber});G.addProperty(B.MDY_Y EAR_POSITION.key,{value:B.MDY_YEAR_POSITION.value,handler:this.configLocale,vali dator:G.checkNumber});G.addProperty(B.MY_LABEL_MONTH_POSITION.key,{value:B.MY_LA BEL_MONTH_POSITION.value,handler:this.configLocale,validator:G.checkNumber});G.a ddProperty(B.MY_LABEL_YEAR_POSITION.key,{value:B.MY_LABEL_YEAR_POSITION.value,ha ndler:this.configLocale,validator:G.checkNumber});G.addProperty(B.MY_LABEL_MONTH _SUFFIX.key,{value:B.MY_LABEL_MONTH_SUFFIX.value,handler:this.configLocale});G.a ddProperty(B.MY_LABEL_YEAR_SUFFIX.key,{value:B.MY_LABEL_YEAR_SUFFIX.value,handle r:this.configLocale});G.addProperty(B.NAV.key,{value:B.NAV.value,handler:this.co nfigNavigator});G.addProperty(B.STRINGS.key,{value:B.STRINGS.value,handler:this. configStrings,validator:function(I){return E.isObject(I);},supercedes:B.STRINGS. supercedes});},configStrings:function(H,G,I){var J=E.merge(B.STRINGS.value,G[0]) ;this.cfg.setProperty(B.STRINGS.key,J,true);},configPageDate:function(H,G,I){thi s.cfg.setProperty(B.PAGEDATE.key,this._parsePageDate(G[0]),true);},configMinDate :function(H,G,I){var J=G[0];if(E.isString(J)){J=this._parseDate(J);this.cfg.setP roperty(B.MINDATE.key,D.getDate(J[0],(J[1]-1),J[2]));}},configMaxDate:function(H ,G,I){var J=G[0];if(E.isString(J)){J=this._parseDate(J);this.cfg.setProperty(B.M AXDATE.key,D.getDate(J[0],(J[1]-1),J[2]));}},configSelected:function(I,G,K){var H=G[0],J=B.SELECTED.key;if(H){if(E.isString(H)){this.cfg.setProperty(J,this._par seDates(H),true);}}if(!this._selectedDates){this._selectedDates=this.cfg.getProp erty(J);}},configOptions:function(H,G,I){this.Options[H.toUpperCase()]=G[0];},co nfigLocale:function(H,G,I){this.Locale[H.toUpperCase()]=G[0];this.cfg.refireEven t(B.LOCALE_MONTHS.key);this.cfg.refireEvent(B.LOCALE_WEEKDAYS.key);},configLocal eValues:function(J,I,K){J=J.toLowerCase();var M=I[0],H=this.cfg,N=this.Locale;sw itch(J){case B.LOCALE_MONTHS.key:switch(M){case F.SHORT:N.LOCALE_MONTHS=H.getPro perty(B.MONTHS_SHORT.key).concat();break;case F.LONG:N.LOCALE_MONTHS=H.getProper ty(B.MONTHS_LONG.key).concat();break;}break;case B.LOCALE_WEEKDAYS.key:switch(M) {case F.ONE_CHAR:N.LOCALE_WEEKDAYS=H.getProperty(B.WEEKDAYS_1CHAR.key).concat(); break;case F.SHORT:N.LOCALE_WEEKDAYS=H.getProperty(B.WEEKDAYS_SHORT.key).concat( );break;case F.MEDIUM:N.LOCALE_WEEKDAYS=H.getProperty(B.WEEKDAYS_MEDIUM.key).con cat();break;case F.LONG:N.LOCALE_WEEKDAYS=H.getProperty(B.WEEKDAYS_LONG.key).con cat();break;}var L=H.getProperty(B.START_WEEKDAY.key);if(L>0){for(var G=0;G<L;++ G){N.LOCALE_WEEKDAYS.push(N.LOCALE_WEEKDAYS.shift());}}break;}},configNavigator: function(H,G,I){var J=G[0];if(YAHOO.widget.CalendarNavigator&&(J===true||E.isObj ect(J))){if(!this.oNavigator){this.oNavigator=new YAHOO.widget.CalendarNavigator (this);this.beforeRenderEvent.subscribe(function(){if(!this.pages){this.oNavigat or.erase();}},this,true);}}else{if(this.oNavigator){this.oNavigator.destroy();th is.oNavigator=null;}}},initStyles:function(){var G=F._STYLES;this.Style={CSS_ROW _HEADER:G.CSS_ROW_HEADER,CSS_ROW_FOOTER:G.CSS_ROW_FOOTER,CSS_CELL:G.CSS_CELL,CSS _CELL_SELECTOR:G.CSS_CELL_SELECTOR,CSS_CELL_SELECTED:G.CSS_CELL_SELECTED,CSS_CEL L_SELECTABLE:G.CSS_CELL_SELECTABLE,CSS_CELL_RESTRICTED:G.CSS_CELL_RESTRICTED,CSS _CELL_TODAY:G.CSS_CELL_TODAY,CSS_CELL_OOM:G.CSS_CELL_OOM,CSS_CELL_OOB:G.CSS_CELL _OOB,CSS_HEADER:G.CSS_HEADER,CSS_HEADER_TEXT:G.CSS_HEADER_TEXT,CSS_BODY:G.CSS_BO DY,CSS_WEEKDAY_CELL:G.CSS_WEEKDAY_CELL,CSS_WEEKDAY_ROW:G.CSS_WEEKDAY_ROW,CSS_FOO TER:G.CSS_FOOTER,CSS_CALENDAR:G.CSS_CALENDAR,CSS_SINGLE:G.CSS_SINGLE,CSS_CONTAIN ER:G.CSS_CONTAINER,CSS_NAV_LEFT:G.CSS_NAV_LEFT,CSS_NAV_RIGHT:G.CSS_NAV_RIGHT,CSS _NAV:G.CSS_NAV,CSS_CLOSE:G.CSS_CLOSE,CSS_CELL_TOP:G.CSS_CELL_TOP,CSS_CELL_LEFT:G

.CSS_CELL_LEFT,CSS_CELL_RIGHT:G.CSS_CELL_RIGHT,CSS_CELL_BOTTOM:G.CSS_CELL_BOTTOM ,CSS_CELL_HOVER:G.CSS_CELL_HOVER,CSS_CELL_HIGHLIGHT1:G.CSS_CELL_HIGHLIGHT1,CSS_C ELL_HIGHLIGHT2:G.CSS_CELL_HIGHLIGHT2,CSS_CELL_HIGHLIGHT3:G.CSS_CELL_HIGHLIGHT3,C SS_CELL_HIGHLIGHT4:G.CSS_CELL_HIGHLIGHT4};},buildMonthLabel:function(){return th is._buildMonthLabel(this.cfg.getProperty(B.PAGEDATE.key));},_buildMonthLabel:fun ction(G){var I=this.Locale.LOCALE_MONTHS[G.getMonth()]+this.Locale.MY_LABEL_MONT H_SUFFIX,H=G.getFullYear()+this.Locale.MY_LABEL_YEAR_SUFFIX;if(this.Locale.MY_LA BEL_MONTH_POSITION==2||this.Locale.MY_LABEL_YEAR_POSITION==1){return H+I;}else{r eturn I+H;}},buildDayLabel:function(G){return G.getDate();},createTitleBar:funct ion(G){var H=C.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE,"d iv",this.oDomContainer)[0]||document.createElement("div");H.className=YAHOO.widg et.CalendarGroup.CSS_2UPTITLE;H.innerHTML=G;this.oDomContainer.insertBefore(H,th is.oDomContainer.firstChild);C.addClass(this.oDomContainer,"withtitle");return H ;},removeTitleBar:function(){var G=C.getElementsByClassName(YAHOO.widget.Calenda rGroup.CSS_2UPTITLE,"div",this.oDomContainer)[0]||null;if(G){A.purgeElement(G);t his.oDomContainer.removeChild(G);}C.removeClass(this.oDomContainer,"withtitle"); },createCloseButton:function(){var J=YAHOO.widget.CalendarGroup.CSS_2UPCLOSE,L=" us/my/bn/x_d.gif",K=C.getElementsByClassName("link-close","a",this.oDomContainer )[0],G=this.cfg.getProperty(B.STRINGS.key),H=(G&&G.close)?G.close:"";if(!K){K=do cument.createElement("a");A.addListener(K,"click",function(N,M){M.hide();A.preve ntDefault(N);},this);}K.href="#";K.className="link-close";if(F.IMG_ROOT!==null){ var I=C.getElementsByClassName(J,"img",K)[0]||document.createElement("img");I.sr c=F.IMG_ROOT+L;I.className=J;K.appendChild(I);}else{K.innerHTML='<span class="'+ J+" "+this.Style.CSS_CLOSE+'">'+H+"</span>";}this.oDomContainer.appendChild(K);r eturn K;},removeCloseButton:function(){var G=C.getElementsByClassName("link-clos e","a",this.oDomContainer)[0]||null;if(G){A.purgeElement(G);this.oDomContainer.r emoveChild(G);}},renderHeader:function(Q){var P=7,O="us/tr/callt.gif",G="us/tr/c alrt.gif",N=this.cfg,K=N.getProperty(B.PAGEDATE.key),L=N.getProperty(B.STRINGS.k ey),V=(L&&L.previousMonth)?L.previousMonth:"",H=(L&&L.nextMonth)?L.nextMonth:"", M;if(N.getProperty(B.SHOW_WEEK_HEADER.key)){P+=1;}if(N.getProperty(B.SHOW_WEEK_F OOTER.key)){P+=1;}Q[Q.length]="<thead>";Q[Q.length]="<tr>";Q[Q.length]='<th cols pan="'+P+'" class="'+this.Style.CSS_HEADER_TEXT+'">';Q[Q.length]='<div class="'+ this.Style.CSS_HEADER+'">';var X,U=false;if(this.parent){if(this.index===0){X=tr ue;}if(this.index==(this.parent.cfg.getProperty("pages")-1)){U=true;}}else{X=tru e;U=true;}if(X){M=this._buildMonthLabel(D.subtract(K,D.MONTH,1));var R=N.getProp erty(B.NAV_ARROW_LEFT.key);if(R===null&&F.IMG_ROOT!==null){R=F.IMG_ROOT+O;}var I =(R===null)?"":' style="background-image:url('+R+')"';Q[Q.length]='<a class="'+t his.Style.CSS_NAV_LEFT+'"'+I+' href="#">'+V+" ("+M+")"+"</a>";}var W=this.buildM onthLabel();var S=this.parent||this;if(S.cfg.getProperty("navigator")){W='<a cla ss="'+this.Style.CSS_NAV+'" href="#">'+W+"</a>";}Q[Q.length]=W;if(U){M=this._bui ldMonthLabel(D.add(K,D.MONTH,1));var T=N.getProperty(B.NAV_ARROW_RIGHT.key);if(T ===null&&F.IMG_ROOT!==null){T=F.IMG_ROOT+G;}var J=(T===null)?"":' style="backgro und-image:url('+T+')"';Q[Q.length]='<a class="'+this.Style.CSS_NAV_RIGHT+'"'+J+' href="#">'+H+" ("+M+")"+"</a>";}Q[Q.length]="</div>\n</th>\n</tr>";if(N.getProp erty(B.SHOW_WEEKDAYS.key)){Q=this.buildWeekdays(Q);}Q[Q.length]="</thead>";retur n Q;},buildWeekdays:function(H){H[H.length]='<tr class="'+this.Style.CSS_WEEKDAY _ROW+'">';if(this.cfg.getProperty(B.SHOW_WEEK_HEADER.key)){H[H.length]="<th>&#16 0;</th>";}for(var G=0;G<this.Locale.LOCALE_WEEKDAYS.length;++G){H[H.length]='<th class="calweekdaycell">'+this.Locale.LOCALE_WEEKDAYS[G]+"</th>";}if(this.cfg.ge tProperty(B.SHOW_WEEK_FOOTER.key)){H[H.length]="<th>&#160;</th>";}H[H.length]="< /tr>";return H;},renderBody:function(l,j){var AJ=this.cfg.getProperty(B.START_WE EKDAY.key);this.preMonthDays=l.getDay();if(AJ>0){this.preMonthDays-=AJ;}if(this. preMonthDays<0){this.preMonthDays+=7;}this.monthDays=D.findMonthEnd(l).getDate() ;this.postMonthDays=F.DISPLAY_DAYS-this.preMonthDays-this.monthDays;l=D.subtract (l,D.DAY,this.preMonthDays);var X,N,M="w",e="_cell",b="wd",v="d",P,q,AB=this.tod ay,O=this.cfg,V=AB.getFullYear(),u=AB.getMonth(),J=AB.getDate(),AA=O.getProperty (B.PAGEDATE.key),I=O.getProperty(B.HIDE_BLANK_WEEKS.key),h=O.getProperty(B.SHOW_ WEEK_FOOTER.key),a=O.getProperty(B.SHOW_WEEK_HEADER.key),T=O.getProperty(B.MINDA TE.key),Z=O.getProperty(B.MAXDATE.key);if(T){T=D.clearTime(T);}if(Z){Z=D.clearTi me(Z);}j[j.length]='<tbody class="m'+(AA.getMonth()+1)+" "+this.Style.CSS_BODY+'

">';var AH=0,Q=document.createElement("div"),k=document.createElement("td");Q.ap pendChild(k);var z=this.parent||this;for(var AD=0;AD<6;AD++){X=D.getWeekNumber(l ,AJ);N=M+X;if(AD!==0&&I===true&&l.getMonth()!=AA.getMonth()){break;}else{j[j.len gth]='<tr class="'+N+'">';if(a){j=this.renderRowHeader(X,j);}for(var AI=0;AI<7;A I++){P=[];this.clearElement(k);k.className=this.Style.CSS_CELL;k.id=this.id+e+AH ;if(l.getDate()==J&&l.getMonth()==u&&l.getFullYear()==V){P[P.length]=z.renderCel lStyleToday;}var Y=[l.getFullYear(),l.getMonth()+1,l.getDate()];this.cellDates[t his.cellDates.length]=Y;if(l.getMonth()!=AA.getMonth()){P[P.length]=z.renderCell NotThisMonth;}else{C.addClass(k,b+l.getDay());C.addClass(k,v+l.getDate());for(va r AC=0;AC<this.renderStack.length;++AC){q=null;var w=this.renderStack[AC],AK=w[0 ],H,c,L;switch(AK){case F.DATE:H=w[1][1];c=w[1][2];L=w[1][0];if(l.getMonth()+1== H&&l.getDate()==c&&l.getFullYear()==L){q=w[2];this.renderStack.splice(AC,1);}bre ak;case F.MONTH_DAY:H=w[1][0];c=w[1][1];if(l.getMonth()+1==H&&l.getDate()==c){q= w[2];this.renderStack.splice(AC,1);}break;case F.RANGE:var g=w[1][0],f=w[1][1],m =g[1],S=g[2],W=g[0],AG=D.getDate(W,m-1,S),K=f[1],o=f[2],G=f[0],AF=D.getDate(G,K1,o);if(l.getTime()>=AG.getTime()&&l.getTime()<=AF.getTime()){q=w[2];if(l.getTim e()==AF.getTime()){this.renderStack.splice(AC,1);}}break;case F.WEEKDAY:var R=w[ 1][0];if(l.getDay()+1==R){q=w[2];}break;case F.MONTH:H=w[1][0];if(l.getMonth()+1 ==H){q=w[2];}break;}if(q){P[P.length]=q;}}}if(this._indexOfSelectedFieldArray(Y) >-1){P[P.length]=z.renderCellStyleSelected;}if((T&&(l.getTime()<T.getTime()))||( Z&&(l.getTime()>Z.getTime()))){P[P.length]=z.renderOutOfBoundsDate;}else{P[P.len gth]=z.styleCellDefault;P[P.length]=z.renderCellDefault;}for(var y=0;y<P.length; ++y){if(P[y].call(z,l,k)==F.STOP_RENDER){break;}}l.setTime(l.getTime()+D.ONE_DAY _MS);l=D.clearTime(l);if(AH>=0&&AH<=6){C.addClass(k,this.Style.CSS_CELL_TOP);}if ((AH%7)===0){C.addClass(k,this.Style.CSS_CELL_LEFT);}if(((AH+1)%7)===0){C.addCla ss(k,this.Style.CSS_CELL_RIGHT);}var n=this.postMonthDays;if(I&&n>=7){var U=Math .floor(n/7);for(var AE=0;AE<U;++AE){n-=7;}}if(AH>=((this.preMonthDays+n+this.mon thDays)-7)){C.addClass(k,this.Style.CSS_CELL_BOTTOM);}j[j.length]=Q.innerHTML;AH ++;}if(h){j=this.renderRowFooter(X,j);}j[j.length]="</tr>";}}j[j.length]="</tbod y>";return j;},renderFooter:function(G){return G;},render:function(){this.before RenderEvent.fire();var H=D.findMonthStart(this.cfg.getProperty(B.PAGEDATE.key)); this.resetRenderers();this.cellDates.length=0;A.purgeElement(this.oDomContainer, true);var G=[];G[G.length]='<table cellSpacing="0" class="'+this.Style.CSS_CALEN DAR+" y"+H.getFullYear()+'" id="'+this.id+'">';G=this.renderHeader(G);G=this.ren derBody(H,G);G=this.renderFooter(G);G[G.length]="</table>";this.oDomContainer.in nerHTML=G.join("\n");this.applyListeners();this.cells=this.oDomContainer.getElem entsByTagName("td");this.cfg.refireEvent(B.TITLE.key);this.cfg.refireEvent(B.CLO SE.key);this.cfg.refireEvent(B.IFRAME.key);this.renderEvent.fire();},applyListen ers:function(){var P=this.oDomContainer,H=this.parent||this,L="a",S="click";var M=C.getElementsByClassName(this.Style.CSS_NAV_LEFT,L,P),I=C.getElementsByClassNa me(this.Style.CSS_NAV_RIGHT,L,P);if(M&&M.length>0){this.linkLeft=M[0];A.addListe ner(this.linkLeft,S,this.doPreviousMonthNav,H,true);}if(I&&I.length>0){this.link Right=I[0];A.addListener(this.linkRight,S,this.doNextMonthNav,H,true);}if(H.cfg. getProperty("navigator")!==null){this.applyNavListeners();}if(this.domEventMap){ var J,G;for(var R in this.domEventMap){if(E.hasOwnProperty(this.domEventMap,R)){ var N=this.domEventMap[R];if(!(N instanceof Array)){N=[N];}for(var K=0;K<N.lengt h;K++){var Q=N[K];G=C.getElementsByClassName(R,Q.tag,this.oDomContainer);for(var O=0;O<G.length;O++){J=G[O];A.addListener(J,Q.event,Q.handler,Q.scope,Q.correct) ;}}}}}A.addListener(this.oDomContainer,"click",this.doSelectCell,this);A.addList ener(this.oDomContainer,"mouseover",this.doCellMouseOver,this);A.addListener(thi s.oDomContainer,"mouseout",this.doCellMouseOut,this);},applyNavListeners:functio n(){var H=this.parent||this,I=this,G=C.getElementsByClassName(this.Style.CSS_NAV ,"a",this.oDomContainer);if(G.length>0){A.addListener(G,"click",function(N,M){va r L=A.getTarget(N);if(this===L||C.isAncestor(this,L)){A.preventDefault(N);}var J =H.oNavigator;if(J){var K=I.cfg.getProperty("pagedate");J.setYear(K.getFullYear( ));J.setMonth(K.getMonth());J.show();}});}},getDateByCellId:function(H){var G=th is.getDateFieldsByCellId(H);return(G)?D.getDate(G[0],G[1]-1,G[2]):null;},getDate FieldsByCellId:function(G){G=this.getIndexFromId(G);return(G>-1)?this.cellDates[ G]:null;},getCellIndex:function(I){var H=-1;if(I){var G=I.getMonth(),N=I.getFull Year(),M=I.getDate(),K=this.cellDates;for(var J=0;J<K.length;++J){var L=K[J];if(

L[0]===N&&L[1]===G+1&&L[2]===M){H=J;break;}}}return H;},getIndexFromId:function( I){var H=-1,G=I.lastIndexOf("_cell");if(G>-1){H=parseInt(I.substring(G+5),10);}r eturn H;},renderOutOfBoundsDate:function(H,G){C.addClass(G,this.Style.CSS_CELL_O OB);G.innerHTML=H.getDate();return F.STOP_RENDER;},renderRowHeader:function(H,G) {G[G.length]='<th class="calrowhead">'+H+"</th>";return G;},renderRowFooter:func tion(H,G){G[G.length]='<th class="calrowfoot">'+H+"</th>";return G;},renderCellD efault:function(H,G){G.innerHTML='<a href="#" class="'+this.Style.CSS_CELL_SELEC TOR+'">'+this.buildDayLabel(H)+"</a>";},styleCellDefault:function(H,G){C.addClas s(G,this.Style.CSS_CELL_SELECTABLE);},renderCellStyleHighlight1:function(H,G){C. addClass(G,this.Style.CSS_CELL_HIGHLIGHT1);},renderCellStyleHighlight2:function( H,G){C.addClass(G,this.Style.CSS_CELL_HIGHLIGHT2);},renderCellStyleHighlight3:fu nction(H,G){C.addClass(G,this.Style.CSS_CELL_HIGHLIGHT3);},renderCellStyleHighli ght4:function(H,G){C.addClass(G,this.Style.CSS_CELL_HIGHLIGHT4);},renderCellStyl eToday:function(H,G){C.addClass(G,this.Style.CSS_CELL_TODAY);},renderCellStyleSe lected:function(H,G){C.addClass(G,this.Style.CSS_CELL_SELECTED);},renderCellNotT hisMonth:function(H,G){C.addClass(G,this.Style.CSS_CELL_OOM);G.innerHTML=H.getDa te();return F.STOP_RENDER;},renderBodyCellRestricted:function(H,G){C.addClass(G, this.Style.CSS_CELL);C.addClass(G,this.Style.CSS_CELL_RESTRICTED);G.innerHTML=H. getDate();return F.STOP_RENDER;},addMonths:function(H){var G=B.PAGEDATE.key;this .cfg.setProperty(G,D.add(this.cfg.getProperty(G),D.MONTH,H));this.resetRenderers ();this.changePageEvent.fire();},subtractMonths:function(H){var G=B.PAGEDATE.key ;this.cfg.setProperty(G,D.subtract(this.cfg.getProperty(G),D.MONTH,H));this.rese tRenderers();this.changePageEvent.fire();},addYears:function(H){var G=B.PAGEDATE .key;this.cfg.setProperty(G,D.add(this.cfg.getProperty(G),D.YEAR,H));this.resetR enderers();this.changePageEvent.fire();},subtractYears:function(H){var G=B.PAGED ATE.key;this.cfg.setProperty(G,D.subtract(this.cfg.getProperty(G),D.YEAR,H));thi s.resetRenderers();this.changePageEvent.fire();},nextMonth:function(){this.addMo nths(1);},previousMonth:function(){this.subtractMonths(1);},nextYear:function(){ this.addYears(1);},previousYear:function(){this.subtractYears(1);},reset:functio n(){this.cfg.resetProperty(B.SELECTED.key);this.cfg.resetProperty(B.PAGEDATE.key );this.resetEvent.fire();},clear:function(){this.cfg.setProperty(B.SELECTED.key, []);this.cfg.setProperty(B.PAGEDATE.key,new Date(this.today.getTime()));this.cle arEvent.fire();},select:function(I){var L=this._toFieldArray(I),H=[],K=[],M=B.SE LECTED.key;for(var G=0;G<L.length;++G){var J=L[G];if(!this.isDateOOB(this._toDat e(J))){if(H.length===0){this.beforeSelectEvent.fire();K=this.cfg.getProperty(M); }H.push(J);if(this._indexOfSelectedFieldArray(J)==-1){K[K.length]=J;}}}if(H.leng th>0){if(this.parent){this.parent.cfg.setProperty(M,K);}else{this.cfg.setPropert y(M,K);}this.selectEvent.fire(H);}return this.getSelectedDates();},selectCell:fu nction(J){var H=this.cells[J],N=this.cellDates[J],M=this._toDate(N),I=C.hasClass (H,this.Style.CSS_CELL_SELECTABLE);if(I){this.beforeSelectEvent.fire();var L=B.S ELECTED.key;var K=this.cfg.getProperty(L);var G=N.concat();if(this._indexOfSelec tedFieldArray(G)==-1){K[K.length]=G;}if(this.parent){this.parent.cfg.setProperty (L,K);}else{this.cfg.setProperty(L,K);}this.renderCellStyleSelected(M,H);this.se lectEvent.fire([G]);this.doCellMouseOut.call(H,null,this);}return this.getSelect edDates();},deselect:function(K){var G=this._toFieldArray(K),J=[],M=[],N=B.SELEC TED.key;for(var H=0;H<G.length;++H){var L=G[H];if(!this.isDateOOB(this._toDate(L ))){if(J.length===0){this.beforeDeselectEvent.fire();M=this.cfg.getProperty(N);} J.push(L);var I=this._indexOfSelectedFieldArray(L);if(I!=-1){M.splice(I,1);}}}if (J.length>0){if(this.parent){this.parent.cfg.setProperty(N,M);}else{this.cfg.set Property(N,M);}this.deselectEvent.fire(J);}return this.getSelectedDates();},dese lectCell:function(K){var H=this.cells[K],N=this.cellDates[K],I=this._indexOfSele ctedFieldArray(N);var J=C.hasClass(H,this.Style.CSS_CELL_SELECTABLE);if(J){this. beforeDeselectEvent.fire();var L=this.cfg.getProperty(B.SELECTED.key),M=this._to Date(N),G=N.concat();if(I>-1){if(this.cfg.getProperty(B.PAGEDATE.key).getMonth() ==M.getMonth()&&this.cfg.getProperty(B.PAGEDATE.key).getFullYear()==M.getFullYea r()){C.removeClass(H,this.Style.CSS_CELL_SELECTED);}L.splice(I,1);}if(this.paren t){this.parent.cfg.setProperty(B.SELECTED.key,L);}else{this.cfg.setProperty(B.SE LECTED.key,L);}this.deselectEvent.fire([G]);}return this.getSelectedDates();},de selectAll:function(){this.beforeDeselectEvent.fire();var J=B.SELECTED.key,G=this .cfg.getProperty(J),H=G.length,I=G.concat();if(this.parent){this.parent.cfg.setP

roperty(J,[]);}else{this.cfg.setProperty(J,[]);}if(H>0){this.deselectEvent.fire( I);}return this.getSelectedDates();},_toFieldArray:function(H){var G=[];if(H ins tanceof Date){G=[[H.getFullYear(),H.getMonth()+1,H.getDate()]];}else{if(E.isStri ng(H)){G=this._parseDates(H);}else{if(E.isArray(H)){for(var I=0;I<H.length;++I){ var J=H[I];G[G.length]=[J.getFullYear(),J.getMonth()+1,J.getDate()];}}}}return G ;},toDate:function(G){return this._toDate(G);},_toDate:function(G){if(G instance of Date){return G;}else{return D.getDate(G[0],G[1]-1,G[2]);}},_fieldArraysAreEqu al:function(I,H){var G=false;if(I[0]==H[0]&&I[1]==H[1]&&I[2]==H[2]){G=true;}retu rn G;},_indexOfSelectedFieldArray:function(K){var J=-1,G=this.cfg.getProperty(B. SELECTED.key);for(var I=0;I<G.length;++I){var H=G[I];if(K[0]==H[0]&&K[1]==H[1]&& K[2]==H[2]){J=I;break;}}return J;},isDateOOM:function(G){return(G.getMonth()!=th is.cfg.getProperty(B.PAGEDATE.key).getMonth());},isDateOOB:function(I){var J=thi s.cfg.getProperty(B.MINDATE.key),K=this.cfg.getProperty(B.MAXDATE.key),H=D;if(J) {J=H.clearTime(J);}if(K){K=H.clearTime(K);}var G=new Date(I.getTime());G=H.clear Time(G);return((J&&G.getTime()<J.getTime())||(K&&G.getTime()>K.getTime()));},_pa rsePageDate:function(G){var J;if(G){if(G instanceof Date){J=D.findMonthStart(G); }else{var K,I,H;H=G.split(this.cfg.getProperty(B.DATE_FIELD_DELIMITER.key));K=pa rseInt(H[this.cfg.getProperty(B.MY_MONTH_POSITION.key)-1],10)-1;I=parseInt(H[thi s.cfg.getProperty(B.MY_YEAR_POSITION.key)-1],10);J=D.getDate(I,K,1);}}else{J=D.g etDate(this.today.getFullYear(),this.today.getMonth(),1);}return J;},onBeforeSel ect:function(){if(this.cfg.getProperty(B.MULTI_SELECT.key)===false){if(this.pare nt){this.parent.callChildFunction("clearAllBodyCellStyles",this.Style.CSS_CELL_S ELECTED);this.parent.deselectAll();}else{this.clearAllBodyCellStyles(this.Style. CSS_CELL_SELECTED);this.deselectAll();}}},onSelect:function(G){},onBeforeDeselec t:function(){},onDeselect:function(G){},onChangePage:function(){this.render();}, onRender:function(){},onReset:function(){this.render();},onClear:function(){this .render();},validate:function(){return true;},_parseDate:function(I){var J=I.spl it(this.Locale.DATE_FIELD_DELIMITER),G;if(J.length==2){G=[J[this.Locale.MD_MONTH _POSITION-1],J[this.Locale.MD_DAY_POSITION-1]];G.type=F.MONTH_DAY;}else{G=[J[thi s.Locale.MDY_YEAR_POSITION-1],J[this.Locale.MDY_MONTH_POSITION-1],J[this.Locale. MDY_DAY_POSITION-1]];G.type=F.DATE;}for(var H=0;H<G.length;H++){G[H]=parseInt(G[ H],10);}return G;},_parseDates:function(H){var O=[],N=H.split(this.Locale.DATE_D ELIMITER);for(var M=0;M<N.length;++M){var L=N[M];if(L.indexOf(this.Locale.DATE_R ANGE_DELIMITER)!=-1){var G=L.split(this.Locale.DATE_RANGE_DELIMITER),K=this._par seDate(G[0]),P=this._parseDate(G[1]),J=this._parseRange(K,P);O=O.concat(J);}else {var I=this._parseDate(L);O.push(I);}}return O;},_parseRange:function(G,K){var H =D.add(D.getDate(G[0],G[1]-1,G[2]),D.DAY,1),J=D.getDate(K[0],K[1]-1,K[2]),I=[];I .push(G);while(H.getTime()<=J.getTime()){I.push([H.getFullYear(),H.getMonth()+1, H.getDate()]);H=D.add(H,D.DAY,1);}return I;},resetRenderers:function(){this.rend erStack=this._renderStack.concat();},removeRenderers:function(){this._renderStac k=[];this.renderStack=[];},clearElement:function(G){G.innerHTML="&#160;";G.class Name="";},addRenderer:function(G,H){var J=this._parseDates(G);for(var I=0;I<J.le ngth;++I){var K=J[I];if(K.length==2){if(K[0]instanceof Array){this._addRenderer( F.RANGE,K,H);}else{this._addRenderer(F.MONTH_DAY,K,H);}}else{if(K.length==3){thi s._addRenderer(F.DATE,K,H);}}}},_addRenderer:function(H,I,G){var J=[H,I,G];this. renderStack.unshift(J);this._renderStack=this.renderStack.concat();},addMonthRen derer:function(H,G){this._addRenderer(F.MONTH,[H],G);},addWeekdayRenderer:functi on(H,G){this._addRenderer(F.WEEKDAY,[H],G);},clearAllBodyCellStyles:function(G){ for(var H=0;H<this.cells.length;++H){C.removeClass(this.cells[H],G);}},setMonth: function(I){var G=B.PAGEDATE.key,H=this.cfg.getProperty(G);H.setMonth(parseInt(I ,10));this.cfg.setProperty(G,H);},setYear:function(H){var G=B.PAGEDATE.key,I=thi s.cfg.getProperty(G);I.setFullYear(parseInt(H,10));this.cfg.setProperty(G,I);},g etSelectedDates:function(){var I=[],H=this.cfg.getProperty(B.SELECTED.key);for(v ar K=0;K<H.length;++K){var J=H[K];var G=D.getDate(J[0],J[1]-1,J[2]);I.push(G);}I .sort(function(M,L){return M-L;});return I;},hide:function(){if(this.beforeHideE vent.fire()){this.oDomContainer.style.display="none";this.hideEvent.fire();}},sh ow:function(){if(this.beforeShowEvent.fire()){this.oDomContainer.style.display=" block";this.showEvent.fire();}},browser:(function(){var G=navigator.userAgent.to LowerCase();if(G.indexOf("opera")!=-1){return"opera";}else{if(G.indexOf("msie 7" )!=-1){return"ie7";}else{if(G.indexOf("msie")!=-1){return"ie";}else{if(G.indexOf

("safari")!=-1){return"safari";}else{if(G.indexOf("gecko")!=-1){return"gecko";}e lse{return false;}}}}}})(),toString:function(){return"Calendar "+this.id;},destr oy:function(){if(this.beforeDestroyEvent.fire()){var G=this;if(G.navigator){G.na vigator.destroy();}if(G.cfg){G.cfg.destroy();}A.purgeElement(G.oDomContainer,tru e);C.removeClass(G.oDomContainer,"withtitle");C.removeClass(G.oDomContainer,G.St yle.CSS_CONTAINER);C.removeClass(G.oDomContainer,G.Style.CSS_SINGLE);G.oDomConta iner.innerHTML="";G.oDomContainer=null;G.cells=null;this.destroyEvent.fire();}}} ;YAHOO.widget.Calendar=F;YAHOO.widget.Calendar_Core=YAHOO.widget.Calendar;YAHOO. widget.Cal_Core=YAHOO.widget.Calendar;})();(function(){var D=YAHOO.util.Dom,F=YA HOO.widget.DateMath,A=YAHOO.util.Event,E=YAHOO.lang,G=YAHOO.widget.Calendar;func tion B(J,H,I){if(arguments.length>0){this.init.apply(this,arguments);}}B._DEFAUL T_CONFIG=G._DEFAULT_CONFIG;B._DEFAULT_CONFIG.PAGES={key:"pages",value:2};var C=B ._DEFAULT_CONFIG;B.prototype={init:function(K,I,J){var H=this._parseArgs(argumen ts);K=H.id;I=H.container;J=H.config;this.oDomContainer=D.get(I);if(!this.oDomCon tainer.id){this.oDomContainer.id=D.generateId();}if(!K){K=this.oDomContainer.id+ "_t";}this.id=K;this.containerId=this.oDomContainer.id;this.initEvents();this.in itStyles();this.pages=[];D.addClass(this.oDomContainer,B.CSS_CONTAINER);D.addCla ss(this.oDomContainer,B.CSS_MULTI_UP);this.cfg=new YAHOO.util.Config(this);this. Options={};this.Locale={};this.setupConfig();if(J){this.cfg.applyConfig(J,true); }this.cfg.fireQueue();if(YAHOO.env.ua.opera){this.renderEvent.subscribe(this._fi xWidth,this,true);this.showEvent.subscribe(this._fixWidth,this,true);}},setupCon fig:function(){var H=this.cfg;H.addProperty(C.PAGES.key,{value:C.PAGES.value,val idator:H.checkNumber,handler:this.configPages});H.addProperty(C.PAGEDATE.key,{va lue:new Date(),handler:this.configPageDate});H.addProperty(C.SELECTED.key,{value :[],handler:this.configSelected});H.addProperty(C.TITLE.key,{value:C.TITLE.value ,handler:this.configTitle});H.addProperty(C.CLOSE.key,{value:C.CLOSE.value,handl er:this.configClose});H.addProperty(C.IFRAME.key,{value:C.IFRAME.value,handler:t his.configIframe,validator:H.checkBoolean});H.addProperty(C.MINDATE.key,{value:C .MINDATE.value,handler:this.delegateConfig});H.addProperty(C.MAXDATE.key,{value: C.MAXDATE.value,handler:this.delegateConfig});H.addProperty(C.MULTI_SELECT.key,{ value:C.MULTI_SELECT.value,handler:this.delegateConfig,validator:H.checkBoolean} );H.addProperty(C.START_WEEKDAY.key,{value:C.START_WEEKDAY.value,handler:this.de legateConfig,validator:H.checkNumber});H.addProperty(C.SHOW_WEEKDAYS.key,{value: C.SHOW_WEEKDAYS.value,handler:this.delegateConfig,validator:H.checkBoolean});H.a ddProperty(C.SHOW_WEEK_HEADER.key,{value:C.SHOW_WEEK_HEADER.value,handler:this.d elegateConfig,validator:H.checkBoolean});H.addProperty(C.SHOW_WEEK_FOOTER.key,{v alue:C.SHOW_WEEK_FOOTER.value,handler:this.delegateConfig,validator:H.checkBoole an});H.addProperty(C.HIDE_BLANK_WEEKS.key,{value:C.HIDE_BLANK_WEEKS.value,handle r:this.delegateConfig,validator:H.checkBoolean});H.addProperty(C.NAV_ARROW_LEFT. key,{value:C.NAV_ARROW_LEFT.value,handler:this.delegateConfig});H.addProperty(C. NAV_ARROW_RIGHT.key,{value:C.NAV_ARROW_RIGHT.value,handler:this.delegateConfig}) ;H.addProperty(C.MONTHS_SHORT.key,{value:C.MONTHS_SHORT.value,handler:this.deleg ateConfig});H.addProperty(C.MONTHS_LONG.key,{value:C.MONTHS_LONG.value,handler:t his.delegateConfig});H.addProperty(C.WEEKDAYS_1CHAR.key,{value:C.WEEKDAYS_1CHAR. value,handler:this.delegateConfig});H.addProperty(C.WEEKDAYS_SHORT.key,{value:C. WEEKDAYS_SHORT.value,handler:this.delegateConfig});H.addProperty(C.WEEKDAYS_MEDI UM.key,{value:C.WEEKDAYS_MEDIUM.value,handler:this.delegateConfig});H.addPropert y(C.WEEKDAYS_LONG.key,{value:C.WEEKDAYS_LONG.value,handler:this.delegateConfig}) ;H.addProperty(C.LOCALE_MONTHS.key,{value:C.LOCALE_MONTHS.value,handler:this.del egateConfig});H.addProperty(C.LOCALE_WEEKDAYS.key,{value:C.LOCALE_WEEKDAYS.value ,handler:this.delegateConfig});H.addProperty(C.DATE_DELIMITER.key,{value:C.DATE_ DELIMITER.value,handler:this.delegateConfig});H.addProperty(C.DATE_FIELD_DELIMIT ER.key,{value:C.DATE_FIELD_DELIMITER.value,handler:this.delegateConfig});H.addPr operty(C.DATE_RANGE_DELIMITER.key,{value:C.DATE_RANGE_DELIMITER.value,handler:th is.delegateConfig});H.addProperty(C.MY_MONTH_POSITION.key,{value:C.MY_MONTH_POSI TION.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty(C .MY_YEAR_POSITION.key,{value:C.MY_YEAR_POSITION.value,handler:this.delegateConfi g,validator:H.checkNumber});H.addProperty(C.MD_MONTH_POSITION.key,{value:C.MD_MO NTH_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber});H.addPr operty(C.MD_DAY_POSITION.key,{value:C.MD_DAY_POSITION.value,handler:this.delegat

eConfig,validator:H.checkNumber});H.addProperty(C.MDY_MONTH_POSITION.key,{value: C.MDY_MONTH_POSITION.value,handler:this.delegateConfig,validator:H.checkNumber}) ;H.addProperty(C.MDY_DAY_POSITION.key,{value:C.MDY_DAY_POSITION.value,handler:th is.delegateConfig,validator:H.checkNumber});H.addProperty(C.MDY_YEAR_POSITION.ke y,{value:C.MDY_YEAR_POSITION.value,handler:this.delegateConfig,validator:H.check Number});H.addProperty(C.MY_LABEL_MONTH_POSITION.key,{value:C.MY_LABEL_MONTH_POS ITION.value,handler:this.delegateConfig,validator:H.checkNumber});H.addProperty( C.MY_LABEL_YEAR_POSITION.key,{value:C.MY_LABEL_YEAR_POSITION.value,handler:this. delegateConfig,validator:H.checkNumber});H.addProperty(C.MY_LABEL_MONTH_SUFFIX.k ey,{value:C.MY_LABEL_MONTH_SUFFIX.value,handler:this.delegateConfig});H.addPrope rty(C.MY_LABEL_YEAR_SUFFIX.key,{value:C.MY_LABEL_YEAR_SUFFIX.value,handler:this. delegateConfig});H.addProperty(C.NAV.key,{value:C.NAV.value,handler:this.configN avigator});H.addProperty(C.STRINGS.key,{value:C.STRINGS.value,handler:this.confi gStrings,validator:function(I){return E.isObject(I);},supercedes:C.STRINGS.super cedes});},initEvents:function(){var J=this,L="Event",M=YAHOO.util.CustomEvent;va r I=function(O,R,N){for(var Q=0;Q<J.pages.length;++Q){var P=J.pages[Q];P[this.ty pe+L].subscribe(O,R,N);}};var H=function(N,Q){for(var P=0;P<J.pages.length;++P){ var O=J.pages[P];O[this.type+L].unsubscribe(N,Q);}};var K=G._EVENT_TYPES;J.befor eSelectEvent=new M(K.BEFORE_SELECT);J.beforeSelectEvent.subscribe=I;J.beforeSele ctEvent.unsubscribe=H;J.selectEvent=new M(K.SELECT);J.selectEvent.subscribe=I;J. selectEvent.unsubscribe=H;J.beforeDeselectEvent=new M(K.BEFORE_DESELECT);J.befor eDeselectEvent.subscribe=I;J.beforeDeselectEvent.unsubscribe=H;J.deselectEvent=n ew M(K.DESELECT);J.deselectEvent.subscribe=I;J.deselectEvent.unsubscribe=H;J.cha ngePageEvent=new M(K.CHANGE_PAGE);J.changePageEvent.subscribe=I;J.changePageEven t.unsubscribe=H;J.beforeRenderEvent=new M(K.BEFORE_RENDER);J.beforeRenderEvent.s ubscribe=I;J.beforeRenderEvent.unsubscribe=H;J.renderEvent=new M(K.RENDER);J.ren derEvent.subscribe=I;J.renderEvent.unsubscribe=H;J.resetEvent=new M(K.RESET);J.r esetEvent.subscribe=I;J.resetEvent.unsubscribe=H;J.clearEvent=new M(K.CLEAR);J.c learEvent.subscribe=I;J.clearEvent.unsubscribe=H;J.beforeShowEvent=new M(K.BEFOR E_SHOW);J.showEvent=new M(K.SHOW);J.beforeHideEvent=new M(K.BEFORE_HIDE);J.hideE vent=new M(K.HIDE);J.beforeShowNavEvent=new M(K.BEFORE_SHOW_NAV);J.showNavEvent= new M(K.SHOW_NAV);J.beforeHideNavEvent=new M(K.BEFORE_HIDE_NAV);J.hideNavEvent=n ew M(K.HIDE_NAV);J.beforeRenderNavEvent=new M(K.BEFORE_RENDER_NAV);J.renderNavEv ent=new M(K.RENDER_NAV);J.beforeDestroyEvent=new M(K.BEFORE_DESTROY);J.destroyEv ent=new M(K.DESTROY);},configPages:function(T,R,N){var L=R[0],J=C.PAGEDATE.key,W ="_",M,O=null,S="groupcal",V="first-of-type",K="last-of-type";for(var I=0;I<L;++ I){var U=this.id+W+I,Q=this.containerId+W+I,P=this.cfg.getConfig();P.close=false ;P.title=false;P.navigator=null;if(I>0){M=new Date(O);this._setMonthOnDate(M,M.g etMonth()+I);P.pageDate=M;}var H=this.constructChild(U,Q,P);D.removeClass(H.oDom Container,this.Style.CSS_SINGLE);D.addClass(H.oDomContainer,S);if(I===0){O=H.cfg .getProperty(J);D.addClass(H.oDomContainer,V);}if(I==(L-1)){D.addClass(H.oDomCon tainer,K);}H.parent=this;H.index=I;this.pages[this.pages.length]=H;}},configPage Date:function(O,N,L){var J=N[0],M;var K=C.PAGEDATE.key;for(var I=0;I<this.pages. length;++I){var H=this.pages[I];if(I===0){M=H._parsePageDate(J);H.cfg.setPropert y(K,M);}else{var P=new Date(M);this._setMonthOnDate(P,P.getMonth()+I);H.cfg.setP roperty(K,P);}}},configSelected:function(J,H,L){var K=C.SELECTED.key;this.delega teConfig(J,H,L);var I=(this.pages.length>0)?this.pages[0].cfg.getProperty(K):[]; this.cfg.setProperty(K,I,true);},delegateConfig:function(I,H,L){var M=H[0];var K ;for(var J=0;J<this.pages.length;J++){K=this.pages[J];K.cfg.setProperty(I,M);}}, setChildFunction:function(K,I){var H=this.cfg.getProperty(C.PAGES.key);for(var J =0;J<H;++J){this.pages[J][K]=I;}},callChildFunction:function(M,I){var H=this.cfg .getProperty(C.PAGES.key);for(var L=0;L<H;++L){var K=this.pages[L];if(K[M]){var J=K[M];J.call(K,I);}}},constructChild:function(K,I,J){var H=document.getElementB yId(I);if(!H){H=document.createElement("div");H.id=I;this.oDomContainer.appendCh ild(H);}return new G(K,I,J);},setMonth:function(L){L=parseInt(L,10);var M;var I= C.PAGEDATE.key;for(var K=0;K<this.pages.length;++K){var J=this.pages[K];var H=J. cfg.getProperty(I);if(K===0){M=H.getFullYear();}else{H.setFullYear(M);}this._set MonthOnDate(H,L+K);J.cfg.setProperty(I,H);}},setYear:function(J){var I=C.PAGEDAT E.key;J=parseInt(J,10);for(var L=0;L<this.pages.length;++L){var K=this.pages[L]; var H=K.cfg.getProperty(I);if((H.getMonth()+1)==1&&L>0){J+=1;}K.setYear(J);}},re

nder:function(){this.renderHeader();for(var I=0;I<this.pages.length;++I){var H=t his.pages[I];H.render();}this.renderFooter();},select:function(H){for(var J=0;J< this.pages.length;++J){var I=this.pages[J];I.select(H);}return this.getSelectedD ates();},selectCell:function(H){for(var J=0;J<this.pages.length;++J){var I=this. pages[J];I.selectCell(H);}return this.getSelectedDates();},deselect:function(H){ for(var J=0;J<this.pages.length;++J){var I=this.pages[J];I.deselect(H);}return t his.getSelectedDates();},deselectAll:function(){for(var I=0;I<this.pages.length; ++I){var H=this.pages[I];H.deselectAll();}return this.getSelectedDates();},desel ectCell:function(H){for(var J=0;J<this.pages.length;++J){var I=this.pages[J];I.d eselectCell(H);}return this.getSelectedDates();},reset:function(){for(var I=0;I< this.pages.length;++I){var H=this.pages[I];H.reset();}},clear:function(){for(var I=0;I<this.pages.length;++I){var H=this.pages[I];H.clear();}this.cfg.setPropert y(C.SELECTED.key,[]);this.cfg.setProperty(C.PAGEDATE.key,new Date(this.pages[0]. today.getTime()));this.render();},nextMonth:function(){for(var I=0;I<this.pages. length;++I){var H=this.pages[I];H.nextMonth();}},previousMonth:function(){for(va r I=this.pages.length-1;I>=0;--I){var H=this.pages[I];H.previousMonth();}},nextY ear:function(){for(var I=0;I<this.pages.length;++I){var H=this.pages[I];H.nextYe ar();}},previousYear:function(){for(var I=0;I<this.pages.length;++I){var H=this. pages[I];H.previousYear();}},getSelectedDates:function(){var J=[];var I=this.cfg .getProperty(C.SELECTED.key);for(var L=0;L<I.length;++L){var K=I[L];var H=F.getD ate(K[0],K[1]-1,K[2]);J.push(H);}J.sort(function(N,M){return N-M;});return J;},a ddRenderer:function(H,I){for(var K=0;K<this.pages.length;++K){var J=this.pages[K ];J.addRenderer(H,I);}},addMonthRenderer:function(K,H){for(var J=0;J<this.pages. length;++J){var I=this.pages[J];I.addMonthRenderer(K,H);}},addWeekdayRenderer:fu nction(I,H){for(var K=0;K<this.pages.length;++K){var J=this.pages[K];J.addWeekda yRenderer(I,H);}},removeRenderers:function(){this.callChildFunction("removeRende rers");},renderHeader:function(){},renderFooter:function(){},addMonths:function( H){this.callChildFunction("addMonths",H);},subtractMonths:function(H){this.callC hildFunction("subtractMonths",H);},addYears:function(H){this.callChildFunction(" addYears",H);},subtractYears:function(H){this.callChildFunction("subtractYears", H);},getCalendarPage:function(K){var M=null;if(K){var N=K.getFullYear(),J=K.getM onth();var I=this.pages;for(var L=0;L<I.length;++L){var H=I[L].cfg.getProperty(" pagedate");if(H.getFullYear()===N&&H.getMonth()===J){M=I[L];break;}}}return M;}, _setMonthOnDate:function(I,J){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420&&( J<0||J>11)){var H=F.add(I,F.MONTH,J-I.getMonth());I.setTime(H.getTime());}else{I .setMonth(J);}},_fixWidth:function(){var H=0;for(var J=0;J<this.pages.length;++J ){var I=this.pages[J];H+=I.oDomContainer.offsetWidth;}if(H>0){this.oDomContainer .style.width=H+"px";}},toString:function(){return"CalendarGroup "+this.id;},dest roy:function(){if(this.beforeDestroyEvent.fire()){var J=this;if(J.navigator){J.n avigator.destroy();}if(J.cfg){J.cfg.destroy();}A.purgeElement(J.oDomContainer,tr ue);D.removeClass(J.oDomContainer,B.CSS_CONTAINER);D.removeClass(J.oDomContainer ,B.CSS_MULTI_UP);for(var I=0,H=J.pages.length;I<H;I++){J.pages[I].destroy();J.pa ges[I]=null;}J.oDomContainer.innerHTML="";J.oDomContainer=null;this.destroyEvent .fire();}}};B.CSS_CONTAINER="yui-calcontainer";B.CSS_MULTI_UP="multi";B.CSS_2UPT ITLE="title";B.CSS_2UPCLOSE="close-icon";YAHOO.lang.augmentProto(B,G,"buildDayLa bel","buildMonthLabel","renderOutOfBoundsDate","renderRowHeader","renderRowFoote r","renderCellDefault","styleCellDefault","renderCellStyleHighlight1","renderCel lStyleHighlight2","renderCellStyleHighlight3","renderCellStyleHighlight4","rende rCellStyleToday","renderCellStyleSelected","renderCellNotThisMonth","renderBodyC ellRestricted","initStyles","configTitle","configClose","configIframe","configSt rings","configNavigator","createTitleBar","createCloseButton","removeTitleBar"," removeCloseButton","hide","show","toDate","_toDate","_parseArgs","browser");YAHO O.widget.CalGrp=B;YAHOO.widget.CalendarGroup=B;YAHOO.widget.Calendar2up=function (J,H,I){this.init(J,H,I);};YAHOO.extend(YAHOO.widget.Calendar2up,B);YAHOO.widget .Cal2up=YAHOO.widget.Calendar2up;})();YAHOO.widget.CalendarNavigator=function(A) {this.init(A);};(function(){var A=YAHOO.widget.CalendarNavigator;A.CLASSES={NAV: "yui-cal-nav",NAV_VISIBLE:"yui-cal-nav-visible",MASK:"yui-cal-nav-mask",YEAR:"yu i-cal-nav-y",MONTH:"yui-cal-nav-m",BUTTONS:"yui-cal-nav-b",BUTTON:"yui-cal-nav-b tn",ERROR:"yui-cal-nav-e",YEAR_CTRL:"yui-cal-nav-yc",MONTH_CTRL:"yui-cal-nav-mc" ,INVALID:"yui-invalid",DEFAULT:"yui-default"};A._DEFAULT_CFG={strings:{month:"Mo

nth",year:"Year",submit:"Okay",cancel:"Cancel",invalidYear:"Year needs to be a n umber"},monthFormat:YAHOO.widget.Calendar.LONG,initialFocus:"year"};A.ID_SUFFIX= "_nav";A.MONTH_SUFFIX="_month";A.YEAR_SUFFIX="_year";A.ERROR_SUFFIX="_error";A.C ANCEL_SUFFIX="_cancel";A.SUBMIT_SUFFIX="_submit";A.YR_MAX_DIGITS=4;A.YR_MINOR_IN C=1;A.YR_MAJOR_INC=10;A.UPDATE_DELAY=50;A.YR_PATTERN=/^\d+$/;A.TRIM=/^\s*(.*?)\s *$/;})();YAHOO.widget.CalendarNavigator.prototype={id:null,cal:null,navEl:null,m askEl:null,yearEl:null,monthEl:null,errorEl:null,submitEl:null,cancelEl:null,fir stCtrl:null,lastCtrl:null,_doc:null,_year:null,_month:0,__rendered:false,init:fu nction(A){var C=A.oDomContainer;this.cal=A;this.id=C.id+YAHOO.widget.CalendarNav igator.ID_SUFFIX;this._doc=C.ownerDocument;var B=YAHOO.env.ua.ie;this.__isIEQuir ks=(B&&((B<=6)||(this._doc.compatMode=="BackCompat")));},show:function(){var A=Y AHOO.widget.CalendarNavigator.CLASSES;if(this.cal.beforeShowNavEvent.fire()){if( !this.__rendered){this.render();}this.clearErrors();this._updateMonthUI();this._ updateYearUI();this._show(this.navEl,true);this.setInitialFocus();this.showMask( );YAHOO.util.Dom.addClass(this.cal.oDomContainer,A.NAV_VISIBLE);this.cal.showNav Event.fire();}},hide:function(){var A=YAHOO.widget.CalendarNavigator.CLASSES;if( this.cal.beforeHideNavEvent.fire()){this._show(this.navEl,false);this.hideMask() ;YAHOO.util.Dom.removeClass(this.cal.oDomContainer,A.NAV_VISIBLE);this.cal.hideN avEvent.fire();}},showMask:function(){this._show(this.maskEl,true);if(this.__isI EQuirks){this._syncMask();}},hideMask:function(){this._show(this.maskEl,false);} ,getMonth:function(){return this._month;},getYear:function(){return this._year;} ,setMonth:function(A){if(A>=0&&A<12){this._month=A;}this._updateMonthUI();},setY ear:function(B){var A=YAHOO.widget.CalendarNavigator.YR_PATTERN;if(YAHOO.lang.is Number(B)&&A.test(B+"")){this._year=B;}this._updateYearUI();},render:function(){ this.cal.beforeRenderNavEvent.fire();if(!this.__rendered){this.createNav();this. createMask();this.applyListeners();this.__rendered=true;}this.cal.renderNavEvent .fire();},createNav:function(){var B=YAHOO.widget.CalendarNavigator;var C=this._ doc;var D=C.createElement("div");D.className=B.CLASSES.NAV;var A=this.renderNavC ontents([]);D.innerHTML=A.join("");this.cal.oDomContainer.appendChild(D);this.na vEl=D;this.yearEl=C.getElementById(this.id+B.YEAR_SUFFIX);this.monthEl=C.getElem entById(this.id+B.MONTH_SUFFIX);this.errorEl=C.getElementById(this.id+B.ERROR_SU FFIX);this.submitEl=C.getElementById(this.id+B.SUBMIT_SUFFIX);this.cancelEl=C.ge tElementById(this.id+B.CANCEL_SUFFIX);if(YAHOO.env.ua.gecko&&this.yearEl&&this.y earEl.type=="text"){this.yearEl.setAttribute("autocomplete","off");}this._setFir stLastElements();},createMask:function(){var B=YAHOO.widget.CalendarNavigator.CL ASSES;var A=this._doc.createElement("div");A.className=B.MASK;this.cal.oDomConta iner.appendChild(A);this.maskEl=A;},_syncMask:function(){var B=this.cal.oDomCont ainer;if(B&&this.maskEl){var A=YAHOO.util.Dom.getRegion(B);YAHOO.util.Dom.setSty le(this.maskEl,"width",A.right-A.left+"px");YAHOO.util.Dom.setStyle(this.maskEl, "height",A.bottom-A.top+"px");}},renderNavContents:function(A){var D=YAHOO.widge t.CalendarNavigator,E=D.CLASSES,B=A;B[B.length]='<div class="'+E.MONTH+'">';this .renderMonth(B);B[B.length]="</div>";B[B.length]='<div class="'+E.YEAR+'">';this .renderYear(B);B[B.length]="</div>";B[B.length]='<div class="'+E.BUTTONS+'">';th is.renderButtons(B);B[B.length]="</div>";B[B.length]='<div class="'+E.ERROR+'" i d="'+this.id+D.ERROR_SUFFIX+'"></div>';return B;},renderMonth:function(D){var G= YAHOO.widget.CalendarNavigator,H=G.CLASSES;var I=this.id+G.MONTH_SUFFIX,F=this._ _getCfg("monthFormat"),A=this.cal.cfg.getProperty((F==YAHOO.widget.Calendar.SHOR T)?"MONTHS_SHORT":"MONTHS_LONG"),E=D;if(A&&A.length>0){E[E.length]='<label for=" '+I+'">';E[E.length]=this.__getCfg("month",true);E[E.length]="</label>";E[E.leng th]='<select name="'+I+'" id="'+I+'" class="'+H.MONTH_CTRL+'">';for(var B=0;B<A. length;B++){E[E.length]='<option value="'+B+'">';E[E.length]=A[B];E[E.length]="< /option>";}E[E.length]="</select>";}return E;},renderYear:function(B){var E=YAHO O.widget.CalendarNavigator,F=E.CLASSES;var G=this.id+E.YEAR_SUFFIX,A=E.YR_MAX_DI GITS,D=B;D[D.length]='<label for="'+G+'">';D[D.length]=this.__getCfg("year",true );D[D.length]="</label>";D[D.length]='<input type="text" name="'+G+'" id="'+G+'" class="'+F.YEAR_CTRL+'" maxlength="'+A+'"/>';return D;},renderButtons:function( A){var D=YAHOO.widget.CalendarNavigator.CLASSES;var B=A;B[B.length]='<span class ="'+D.BUTTON+" "+D.DEFAULT+'">';B[B.length]='<button type="button" id="'+this.id +"_submit"+'">';B[B.length]=this.__getCfg("submit",true);B[B.length]="</button>" ;B[B.length]="</span>";B[B.length]='<span class="'+D.BUTTON+'">';B[B.length]='<b

utton type="button" id="'+this.id+"_cancel"+'">';B[B.length]=this.__getCfg("canc el",true);B[B.length]="</button>";B[B.length]="</span>";return B;},applyListener s:function(){var B=YAHOO.util.Event;function A(){if(this.validate()){this.setYea r(this._getYearFromUI());}}function C(){this.setMonth(this._getMonthFromUI());}B .on(this.submitEl,"click",this.submit,this,true);B.on(this.cancelEl,"click",this .cancel,this,true);B.on(this.yearEl,"blur",A,this,true);B.on(this.monthEl,"chang e",C,this,true);if(this.__isIEQuirks){YAHOO.util.Event.on(this.cal.oDomContainer ,"resize",this._syncMask,this,true);}this.applyKeyListeners();},purgeListeners:f unction(){var A=YAHOO.util.Event;A.removeListener(this.submitEl,"click",this.sub mit);A.removeListener(this.cancelEl,"click",this.cancel);A.removeListener(this.y earEl,"blur");A.removeListener(this.monthEl,"change");if(this.__isIEQuirks){A.re moveListener(this.cal.oDomContainer,"resize",this._syncMask);}this.purgeKeyListe ners();},applyKeyListeners:function(){var D=YAHOO.util.Event,A=YAHOO.env.ua;var C=(A.ie||A.webkit)?"keydown":"keypress";var B=(A.ie||A.opera||A.webkit)?"keydown ":"keypress";D.on(this.yearEl,"keypress",this._handleEnterKey,this,true);D.on(th is.yearEl,C,this._handleDirectionKeys,this,true);D.on(this.lastCtrl,B,this._hand leTabKey,this,true);D.on(this.firstCtrl,B,this._handleShiftTabKey,this,true);},p urgeKeyListeners:function(){var D=YAHOO.util.Event,A=YAHOO.env.ua;var C=(A.ie||A .webkit)?"keydown":"keypress";var B=(A.ie||A.opera||A.webkit)?"keydown":"keypres s";D.removeListener(this.yearEl,"keypress",this._handleEnterKey);D.removeListene r(this.yearEl,C,this._handleDirectionKeys);D.removeListener(this.lastCtrl,B,this ._handleTabKey);D.removeListener(this.firstCtrl,B,this._handleShiftTabKey);},sub mit:function(){if(this.validate()){this.hide();this.setMonth(this._getMonthFromU I());this.setYear(this._getYearFromUI());var B=this.cal;var A=YAHOO.widget.Calen darNavigator.UPDATE_DELAY;if(A>0){var C=this;window.setTimeout(function(){C._upd ate(B);},A);}else{this._update(B);}}},_update:function(A){A.setYear(this.getYear ());A.setMonth(this.getMonth());A.render();},cancel:function(){this.hide();},val idate:function(){if(this._getYearFromUI()!==null){this.clearErrors();return true ;}else{this.setYearError();this.setError(this.__getCfg("invalidYear",true));retu rn false;}},setError:function(A){if(this.errorEl){this.errorEl.innerHTML=A;this. _show(this.errorEl,true);}},clearError:function(){if(this.errorEl){this.errorEl. innerHTML="";this._show(this.errorEl,false);}},setYearError:function(){YAHOO.uti l.Dom.addClass(this.yearEl,YAHOO.widget.CalendarNavigator.CLASSES.INVALID);},cle arYearError:function(){YAHOO.util.Dom.removeClass(this.yearEl,YAHOO.widget.Calen darNavigator.CLASSES.INVALID);},clearErrors:function(){this.clearError();this.cl earYearError();},setInitialFocus:function(){var A=this.submitEl,C=this.__getCfg( "initialFocus");if(C&&C.toLowerCase){C=C.toLowerCase();if(C=="year"){A=this.year El;try{this.yearEl.select();}catch(B){}}else{if(C=="month"){A=this.monthEl;}}}if (A&&YAHOO.lang.isFunction(A.focus)){try{A.focus();}catch(D){}}},erase:function() {if(this.__rendered){this.purgeListeners();this.yearEl=null;this.monthEl=null;th is.errorEl=null;this.submitEl=null;this.cancelEl=null;this.firstCtrl=null;this.l astCtrl=null;if(this.navEl){this.navEl.innerHTML="";}var B=this.navEl.parentNode ;if(B){B.removeChild(this.navEl);}this.navEl=null;var A=this.maskEl.parentNode;i f(A){A.removeChild(this.maskEl);}this.maskEl=null;this.__rendered=false;}},destr oy:function(){this.erase();this._doc=null;this.cal=null;this.id=null;},_show:fun ction(B,A){if(B){YAHOO.util.Dom.setStyle(B,"display",(A)?"block":"none");}},_get MonthFromUI:function(){if(this.monthEl){return this.monthEl.selectedIndex;}else{ return 0;}},_getYearFromUI:function(){var B=YAHOO.widget.CalendarNavigator;var A =null;if(this.yearEl){var C=this.yearEl.value;C=C.replace(B.TRIM,"$1");if(B.YR_P ATTERN.test(C)){A=parseInt(C,10);}}return A;},_updateYearUI:function(){if(this.y earEl&&this._year!==null){this.yearEl.value=this._year;}},_updateMonthUI:functio n(){if(this.monthEl){this.monthEl.selectedIndex=this._month;}},_setFirstLastElem ents:function(){this.firstCtrl=this.monthEl;this.lastCtrl=this.cancelEl;if(this. __isMac){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420){this.firstCtrl=this.mo nthEl;this.lastCtrl=this.yearEl;}if(YAHOO.env.ua.gecko){this.firstCtrl=this.year El;this.lastCtrl=this.yearEl;}}},_handleEnterKey:function(B){var A=YAHOO.util.Ke yListener.KEY;if(YAHOO.util.Event.getCharCode(B)==A.ENTER){YAHOO.util.Event.prev entDefault(B);this.submit();}},_handleDirectionKeys:function(H){var G=YAHOO.util .Event,A=YAHOO.util.KeyListener.KEY,D=YAHOO.widget.CalendarNavigator;var F=(this .yearEl.value)?parseInt(this.yearEl.value,10):null;if(isFinite(F)){var B=false;s

witch(G.getCharCode(H)){case A.UP:this.yearEl.value=F+D.YR_MINOR_INC;B=true;brea k;case A.DOWN:this.yearEl.value=Math.max(F-D.YR_MINOR_INC,0);B=true;break;case A .PAGE_UP:this.yearEl.value=F+D.YR_MAJOR_INC;B=true;break;case A.PAGE_DOWN:this.y earEl.value=Math.max(F-D.YR_MAJOR_INC,0);B=true;break;default:break;}if(B){G.pre ventDefault(H);try{this.yearEl.select();}catch(C){}}}},_handleTabKey:function(D) {var C=YAHOO.util.Event,A=YAHOO.util.KeyListener.KEY;if(C.getCharCode(D)==A.TAB& &!D.shiftKey){try{C.preventDefault(D);this.firstCtrl.focus();}catch(B){}}},_hand leShiftTabKey:function(D){var C=YAHOO.util.Event,A=YAHOO.util.KeyListener.KEY;if (D.shiftKey&&C.getCharCode(D)==A.TAB){try{C.preventDefault(D);this.lastCtrl.focu s();}catch(B){}}},__getCfg:function(D,B){var C=YAHOO.widget.CalendarNavigator._D EFAULT_CFG;var A=this.cal.cfg.getProperty("navigator");if(B){return(A!==true&&A. strings&&A.strings[D])?A.strings[D]:C.strings[D];}else{return(A!==true&&A[D])?A[ D]:C[D];}},__isMac:(navigator.userAgent.toLowerCase().indexOf("macintosh")!=-1)} ;YAHOO.register("calendar",YAHOO.widget.Calendar,{version:"2.7.0",build:"1799"}) ;YAHOO.lang.JSON=(function(){var l=YAHOO.lang,_UNICODE_EXCEPTIONS=/[\u0000\u00ad \u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\uff f0-\uffff]/g,_ESCAPES=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,_VALUES=/"[^"\\\n\r] *"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,_BRACKETS=/(?:^|:|,)(?:\s *\[)+/g,_INVALID=/^[\],:{}\s]*$/,_SPECIAL_CHARS=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u 0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0 -\uffff]/g,_CHARS={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\ \"',"\\":"\\\\"};function _revive(data,reviver){var walk=function(o,key){var k,v ,value=o[key];if(value&&typeof value==="object"){for(k in value){if(l.hasOwnProp erty(value,k)){v=walk(value,k);if(v===undefined){delete value[k];}else{value[k]= v;}}}}return reviver.call(o,key,value);};return typeof reviver==="function"?walk ({"":data},""):data;}function _char(c){if(!_CHARS[c]){_CHARS[c]="\\u"+("0000"+(+ (c.charCodeAt(0))).toString(16)).slice(-4);}return _CHARS[c];}function _prepare( s){return s.replace(_UNICODE_EXCEPTIONS,_char);}function _isValid(str){return l. isString(str)&&_INVALID.test(str.replace(_ESCAPES,"@").replace(_VALUES,"]").repl ace(_BRACKETS,""));}function _string(s){return'"'+s.replace(_SPECIAL_CHARS,_char )+'"';}function _stringify(h,key,d,w,pstack){var o=typeof w==="function"?w.call( h,key,h[key]):h[key],i,len,j,k,v,isArray,a;if(o instanceof Date){o=l.JSON.dateTo String(o);}else{if(o instanceof String||o instanceof Boolean||o instanceof Numbe r){o=o.valueOf();}}switch(typeof o){case"string":return _string(o);case"number": return isFinite(o)?String(o):"null";case"boolean":return String(o);case"object": if(o===null){return"null";}for(i=pstack.length-1;i>=0;--i){if(pstack[i]===o){ret urn"null";}}pstack[pstack.length]=o;a=[];isArray=l.isArray(o);if(d>0){if(isArray ){for(i=o.length-1;i>=0;--i){a[i]=_stringify(o,i,d-1,w,pstack)||"null";}}else{j= 0;if(l.isArray(w)){for(i=0,len=w.length;i<len;++i){k=w[i];v=_stringify(o,k,d-1,w ,pstack);if(v){a[j++]=_string(k)+":"+v;}}}else{for(k in o){if(typeof k==="string "&&l.hasOwnProperty(o,k)){v=_stringify(o,k,d-1,w,pstack);if(v){a[j++]=_string(k) +":"+v;}}}}a.sort();}}pstack.pop();return isArray?"["+a.join(",")+"]":"{"+a.join (",")+"}";}return undefined;}return{isValid:function(s){return _isValid(_prepare (s));},parse:function(s,reviver){s=_prepare(s);if(_isValid(s)){return _revive(ev al("("+s+")"),reviver);}throw new SyntaxError("parseJSON");},stringify:function( o,w,d){if(o!==undefined){if(l.isArray(w)){w=(function(a){var uniq=[],map={},v,i, j,len;for(i=0,j=0,len=a.length;i<len;++i){v=a[i];if(typeof v==="string"&&map[v]= ==undefined){uniq[(map[v]=j++)]=v;}}return uniq;})(w);}d=d>=0?d:1/0;return _stri ngify({"":o},"",d,w,[]);}return undefined;},dateToString:function(d){function _z eroPad(v){return v<10?"0"+v:v;}return d.getUTCFullYear()+"-"+_zeroPad(d.getUTCMo nth()+1)+"-"+_zeroPad(d.getUTCDate())+"T"+_zeroPad(d.getUTCHours())+":"+_zeroPad (d.getUTCMinutes())+":"+_zeroPad(d.getUTCSeconds())+"Z";},stringToDate:function( str){if(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z$/.test(str)){var d=ne w Date();d.setUTCFullYear(RegExp.$1,(RegExp.$2|0)-1,RegExp.$3);d.setUTCHours(Reg Exp.$4,RegExp.$5,RegExp.$6);return d;}return str;}};})();YAHOO.register("json",Y AHOO.lang.JSON,{version:"2.7.0",build:"1799"});YAHOO.util.Attribute=function(B,A ){if(A){this.owner=A;this.configure(B,true);}};YAHOO.util.Attribute.prototype={n ame:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfi g:null,_written:false,method:null,setter:null,getter:null,validator:null,getValu e:function(){var A=this.value;if(this.getter){A=this.getter.call(this.owner,this

.name);}return A;},setValue:function(F,B){var E,A=this.owner,C=this.name;var D={ type:C,prevValue:this.getValue(),newValue:F};if(this.readOnly||(this.writeOnce&& this._written)){return false;}if(this.validator&&!this.validator.call(A,F)){retu rn false;}if(!B){E=A.fireBeforeChangeEvent(D);if(E===false){return false;}}if(th is.setter){F=this.setter.call(A,F,this.name);if(F===undefined){}}if(this.method) {this.method.call(A,F,this.name);}this.value=F;this._written=true;D.type=C;if(!B ){this.owner.fireChangeEvent(D);}return true;},configure:function(B,C){B=B||{};i f(C){this._written=false;}this._initialConfig=this._initialConfig||{};for(var A in B){if(B.hasOwnProperty(A)){this[A]=B[A];if(C){this._initialConfig[A]=B[A];}}} },resetValue:function(){return this.setValue(this._initialConfig.value);},resetC onfig:function(){this.configure(this._initialConfig,true);},refresh:function(A){ this.setValue(this.value,A);}};(function(){var A=YAHOO.util.Lang;YAHOO.util.Attr ibuteProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null ,get:function(C){this._configs=this._configs||{};var B=this._configs[C];if(!B||! this._configs.hasOwnProperty(C)){return null;}return B.getValue();},set:function (D,E,B){this._configs=this._configs||{};var C=this._configs[D];if(!C){return fal se;}return C.setValue(E,B);},getAttributeKeys:function(){this._configs=this._con figs;var C=[],B;for(B in this._configs){if(A.hasOwnProperty(this._configs,B)&&!A .isUndefined(this._configs[B])){C[C.length]=B;}}return C;},setAttributes:functio n(D,B){for(var C in D){if(A.hasOwnProperty(D,C)){this.set(C,D[C],B);}}},resetVal ue:function(C,B){this._configs=this._configs||{};if(this._configs[C]){this.set(C ,this._configs[C]._initialConfig.value,B);return true;}return false;},refresh:fu nction(E,C){this._configs=this._configs||{};var F=this._configs;E=((A.isString(E ))?[E]:E)||this.getAttributeKeys();for(var D=0,B=E.length;D<B;++D){if(F.hasOwnPr operty(E[D])){this._configs[E[D]].refresh(C);}}},register:function(B,C){this.set AttributeConfig(B,C);},getAttributeConfig:function(C){this._configs=this._config s||{};var B=this._configs[C]||{};var D={};for(C in B){if(A.hasOwnProperty(B,C)){ D[C]=B[C];}}return D;},setAttributeConfig:function(B,C,D){this._configs=this._co nfigs||{};C=C||{};if(!this._configs[B]){C.name=B;this._configs[B]=this.createAtt ribute(C);}else{this._configs[B].configure(C,D);}},configureAttribute:function(B ,C,D){this.setAttributeConfig(B,C,D);},resetAttributeConfig:function(B){this._co nfigs=this._configs||{};this._configs[B].resetConfig();},subscribe:function(B,C) {this._events=this._events||{};if(!(B in this._events)){this._events[B]=this.cre ateEvent(B);}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments); },on:function(){this.subscribe.apply(this,arguments);},addListener:function(){th is.subscribe.apply(this,arguments);},fireBeforeChangeEvent:function(C){var B="be fore";B+=C.type.charAt(0).toUpperCase()+C.type.substr(1)+"Change";C.type=B;retur n this.fireEvent(C.type,C);},fireChangeEvent:function(B){B.type+="Change";return this.fireEvent(B.type,B);},createAttribute:function(B){return new YAHOO.util.At tribute(B,this);}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventPr ovider);})();(function(){var B=YAHOO.util.Dom,C=YAHOO.util.AttributeProvider;var A=function(D,E){this.init.apply(this,arguments);};A.DOM_EVENTS={"click":true,"d blclick":true,"keydown":true,"keypress":true,"keyup":true,"mousedown":true,"mous emove":true,"mouseout":true,"mouseover":true,"mouseup":true,"focus":true,"blur": true,"submit":true,"change":true};A.prototype={DOM_EVENTS:null,DEFAULT_HTML_SETT ER:function(F,D){var E=this.get("element");if(E){E[D]=F;}},DEFAULT_HTML_GETTER:f unction(D){var E=this.get("element"),F;if(E){F=E[D];}return F;},appendChild:func tion(D){D=D.get?D.get("element"):D;return this.get("element").appendChild(D);},g etElementsByTagName:function(D){return this.get("element").getElementsByTagName( D);},hasChildNodes:function(){return this.get("element").hasChildNodes();},inser tBefore:function(D,E){D=D.get?D.get("element"):D;E=(E&&E.get)?E.get("element"):E ;return this.get("element").insertBefore(D,E);},removeChild:function(D){D=D.get? D.get("element"):D;return this.get("element").removeChild(D);},replaceChild:func tion(D,E){D=D.get?D.get("element"):D;E=E.get?E.get("element"):E;return this.get( "element").replaceChild(D,E);},initAttributes:function(D){},addListener:function (H,G,I,F){var E=this.get("element")||this.get("id");F=F||this;var D=this;if(!thi s._events[H]){if(E&&this.DOM_EVENTS[H]){YAHOO.util.Event.addListener(E,H,functio n(J){if(J.srcElement&&!J.target){J.target=J.srcElement;}D.fireEvent(H,J);},I,F); }this.createEvent(H,this);}return YAHOO.util.EventProvider.prototype.subscribe.a pply(this,arguments);},on:function(){return this.addListener.apply(this,argument

s);},subscribe:function(){return this.addListener.apply(this,arguments);},remove Listener:function(E,D){return this.unsubscribe.apply(this,arguments);},addClass: function(D){B.addClass(this.get("element"),D);},getElementsByClassName:function( E,D){return B.getElementsByClassName(E,D,this.get("element"));},hasClass:functio n(D){return B.hasClass(this.get("element"),D);},removeClass:function(D){return B .removeClass(this.get("element"),D);},replaceClass:function(E,D){return B.replac eClass(this.get("element"),E,D);},setStyle:function(E,D){return B.setStyle(this. get("element"),E,D);},getStyle:function(D){return B.getStyle(this.get("element") ,D);},fireQueue:function(){var E=this._queue;for(var F=0,D=E.length;F<D;++F){thi s[E[F][0]].apply(this,E[F][1]);}},appendTo:function(E,F){E=(E.get)?E.get("elemen t"):B.get(E);this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:E});F =(F&&F.get)?F.get("element"):B.get(F);var D=this.get("element");if(!D){return fa lse;}if(!E){return false;}if(D.parent!=E){if(F){E.insertBefore(D,F);}else{E.appe ndChild(D);}}this.fireEvent("appendTo",{type:"appendTo",target:E});return D;},ge t:function(D){var F=this._configs||{},E=F.element;if(E&&!F[D]&&!YAHOO.lang.isUnd efined(E.value[D])){this._setHTMLAttrConfig(D);}return C.prototype.get.call(this ,D);},setAttributes:function(J,G){var E={},H=this._configOrder;for(var I=0,D=H.l ength;I<D;++I){if(J[H[I]]!==undefined){E[H[I]]=true;this.set(H[I],J[H[I]],G);}}f or(var F in J){if(J.hasOwnProperty(F)&&!E[F]){this.set(F,J[F],G);}}},set:functio n(E,G,D){var F=this.get("element");if(!F){this._queue[this._queue.length]=["set" ,arguments];if(this._configs[E]){this._configs[E].value=G;}return;}if(!this._con figs[E]&&!YAHOO.lang.isUndefined(F[E])){this._setHTMLAttrConfig(E);}return C.pro totype.set.apply(this,arguments);},setAttributeConfig:function(D,E,F){this._conf igOrder.push(D);C.prototype.setAttributeConfig.apply(this,arguments);},createEve nt:function(E,D){this._events[E]=true;return C.prototype.createEvent.apply(this, arguments);},init:function(E,D){this._initElement(E,D);},destroy:function(){var D=this.get("element");YAHOO.util.Event.purgeElement(D,true);this.unsubscribeAll( );if(D&&D.parentNode){D.parentNode.removeChild(D);}this._queue=[];this._events={ };this._configs={};this._configOrder=[];},_initElement:function(F,E){this._queue =this._queue||[];this._events=this._events||{};this._configs=this._configs||{};t his._configOrder=[];E=E||{};E.element=E.element||F||null;var H=false;var D=A.DOM _EVENTS;this.DOM_EVENTS=this.DOM_EVENTS||{};for(var G in D){if(D.hasOwnProperty( G)){this.DOM_EVENTS[G]=D[G];}}if(typeof E.element==="string"){this._setHTMLAttrC onfig("id",{value:E.element});}if(B.get(E.element)){H=true;this._initHTMLElement (E);this._initContent(E);}YAHOO.util.Event.onAvailable(E.element,function(){if(! H){this._initHTMLElement(E);}this.fireEvent("available",{type:"available",target :B.get(E.element)});},this,true);YAHOO.util.Event.onContentReady(E.element,funct ion(){if(!H){this._initContent(E);}this.fireEvent("contentReady",{type:"contentR eady",target:B.get(E.element)});},this,true);},_initHTMLElement:function(D){this .setAttributeConfig("element",{value:B.get(D.element),readOnly:true});},_initCon tent:function(D){this.initAttributes(D);this.setAttributes(D,true);this.fireQueu e();},_setHTMLAttrConfig:function(D,F){var E=this.get("element");F=F||{};F.name= D;F.setter=F.setter||this.DEFAULT_HTML_SETTER;F.getter=F.getter||this.DEFAULT_HT ML_GETTER;F.value=F.value||E[D];this._configs[D]=new YAHOO.util.Attribute(F,this );}};YAHOO.augment(A,C);YAHOO.util.Element=A;})();YAHOO.register("element",YAHOO .util.Element,{version:"2.7.0",build:"1799"});(function(){var lang=YAHOO.lang,ut il=YAHOO.util,Ev=util.Event;util.DataSourceBase=function(oLiveData,oConfigs){if( oLiveData===null||oLiveData===undefined){return;}this.liveData=oLiveData;this._o Queue={interval:null,conn:null,requests:[]};this.responseSchema={};if(oConfigs&& (oConfigs.constructor==Object)){for(var sConfig in oConfigs){if(sConfig){this[sC onfig]=oConfigs[sConfig];}}}var maxCacheEntries=this.maxCacheEntries;if(!lang.is Number(maxCacheEntries)||(maxCacheEntries<0)){maxCacheEntries=0;}this._aInterval s=[];this.createEvent("cacheRequestEvent");this.createEvent("cacheResponseEvent" );this.createEvent("requestEvent");this.createEvent("responseEvent");this.create Event("responseParseEvent");this.createEvent("responseCacheEvent");this.createEv ent("dataErrorEvent");this.createEvent("cacheFlushEvent");var DS=util.DataSource Base;this._sName="DataSource instance"+DS._nIndex;DS._nIndex++;};var DS=util.Dat aSourceBase;lang.augmentObject(DS,{TYPE_UNKNOWN:-1,TYPE_JSARRAY:0,TYPE_JSFUNCTIO N:1,TYPE_XHR:2,TYPE_JSON:3,TYPE_XML:4,TYPE_TEXT:5,TYPE_HTMLTABLE:6,TYPE_SCRIPTNO DE:7,TYPE_LOCAL:8,ERROR_DATAINVALID:"Invalid data",ERROR_DATANULL:"Null data",_n

Index: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(sc ope,params.concat([callback.argument]));}}}},parseString:function(oData){if(!lan g.isValue(oData)){return null;}var string=oData+"";if(lang.isString(string)){ret urn string;}else{return null;}},parseNumber:function(oData){if(!lang.isValue(oDa ta)||(oData==="")){return null;}var number=oData*1;if(lang.isNumber(number)){ret urn number;}else{return null;}},convertNumber:function(oData){return DS.parseNum ber(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.pro totype={_sName:null,_aCache:null,_oQueue:null,_aIntervals:null,maxCacheEntries:0 ,liveData:null,dataType:DS.TYPE_UNKNOWN,responseType:DS.TYPE_UNKNOWN,responseSch ema:null,toString:function(){return this._sName;},getCachedResponse:function(oRe quest,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=aC ache[i];if(this.isCacheHit(oRequest,oCacheElem.request)){oResponse=oCacheElem.re sponse;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(oReques t,oCachedRequest){return(oRequest===oCachedRequest);},addToCache:function(oReque st,oResponse){var aCache=this._aCache;if(!aCache){return;}while(aCache.length>=t his.maxCacheEntries){aCache.shift();}var oCacheElem={request:oRequest,response:o Response};aCache[aCache.length]=oCacheElem;this.fireEvent("responseCacheEvent",{ request:oRequest,response:oResponse});},flushCache:function(){if(this._aCache){t his._aCache=[];this.fireEvent("cacheFlushEvent");}},setInterval:function(nMsec,o Request,oCallback,oCaller){if(lang.isNumber(nMsec)&&(nMsec>=0)){var oSelf=this;v ar nId=setInterval(function(){oSelf.makeConnection(oRequest,oCallback,oCaller);} ,nMsec);this._aIntervals.push(nId);return nId;}else{}},clearInterval:function(nI d){var tracker=this._aIntervals||[];for(var i=tracker.length-1;i>-1;i--){if(trac ker[i]===nId){tracker.splice(i,1);clearInterval(nId);}}},clearAllIntervals:funct ion(){var tracker=this._aIntervals||[];for(var i=tracker.length-1;i>-1;i--){clea rInterval(tracker[i]);}tracker=[];},sendRequest:function(oRequest,oCallback,oCal ler){var oCachedResponse=this.getCachedResponse(oRequest,oCallback,oCaller);if(o CachedResponse){DS.issueCallback(oCallback,[oRequest,oCachedResponse],false,oCal ler);return null;}return this.makeConnection(oRequest,oCallback,oCaller);},makeC onnection:function(oRequest,oCallback,oCaller){var tId=DS._nTransactionId++;this .fireEvent("requestEvent",{tId:tId,request:oRequest,callback:oCallback,caller:oC aller});var oRawResponse=this.liveData;this.handleResponse(oRequest,oRawResponse ,oCallback,oCaller,tId);return tId;},handleResponse:function(oRequest,oRawRespon se,oCallback,oCaller,tId){this.fireEvent("responseEvent",{tId:tId,request:oReque st,response:oRawResponse,callback:oCallback,caller:oCaller});var xhr=(this.dataT ype==DS.TYPE_XHR)?true:false;var oParsedResponse=null;var oFullResponse=oRawResp onse;if(this.responseType===DS.TYPE_UNKNOWN){var ctype=(oRawResponse&&oRawRespon se.getResponseHeader)?oRawResponse.getResponseHeader["Content-Type"]:null;if(cty pe){if(ctype.indexOf("text/xml")>-1){this.responseType=DS.TYPE_XML;}else{if(ctyp e.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(oR awResponse)){this.responseType=DS.TYPE_JSON;}else{if(YAHOO.lang.isString(oRawRes ponse)){this.responseType=DS.TYPE_TEXT;}}}}}}}switch(this.responseType){case DS. TYPE_JSARRAY:if(xhr&&oRawResponse&&oRawResponse.responseText){oFullResponse=oRaw

Response.responseText;}try{if(lang.isString(oFullResponse)){var parseArgs=[oFull Response].concat(this.parseJSONArgs);if(lang.JSON){oFullResponse=lang.JSON.parse .apply(lang.JSON,parseArgs);}else{if(window.JSON&&JSON.parse){oFullResponse=JSON .parse.apply(JSON,parseArgs);}else{if(oFullResponse.parseJSON){oFullResponse=oFu llResponse.parseJSON.apply(oFullResponse,parseArgs.slice(1));}else{while(oFullRe sponse.length>0&&(oFullResponse.charAt(0)!="{")&&(oFullResponse.charAt(0)!="[")) {oFullResponse=oFullResponse.substring(1,oFullResponse.length);}if(oFullResponse .length>0){var arrayEnd=Math.max(oFullResponse.lastIndexOf("]"),oFullResponse.la stIndexOf("}"));oFullResponse=oFullResponse.substring(0,arrayEnd+1);oFullRespons e=eval("("+oFullResponse+")");}}}}}}catch(e1){}oFullResponse=this.doBeforeParseD ata(oRequest,oFullResponse,oCallback);oParsedResponse=this.parseArrayData(oReque st,oFullResponse);break;case DS.TYPE_JSON:if(xhr&&oRawResponse&&oRawResponse.res ponseText){oFullResponse=oRawResponse.responseText;}try{if(lang.isString(oFullRe sponse)){var parseArgs=[oFullResponse].concat(this.parseJSONArgs);if(lang.JSON){ oFullResponse=lang.JSON.parse.apply(lang.JSON,parseArgs);}else{if(window.JSON&&J SON.parse){oFullResponse=JSON.parse.apply(JSON,parseArgs);}else{if(oFullResponse .parseJSON){oFullResponse=oFullResponse.parseJSON.apply(oFullResponse,parseArgs. slice(1));}else{while(oFullResponse.length>0&&(oFullResponse.charAt(0)!="{")&&(o FullResponse.charAt(0)!="[")){oFullResponse=oFullResponse.substring(1,oFullRespo nse.length);}if(oFullResponse.length>0){var objEnd=Math.max(oFullResponse.lastIn dexOf("]"),oFullResponse.lastIndexOf("}"));oFullResponse=oFullResponse.substring (0,objEnd+1);oFullResponse=eval("("+oFullResponse+")");}}}}}}catch(e){}oFullResp onse=this.doBeforeParseData(oRequest,oFullResponse,oCallback);oParsedResponse=th is.parseJSONData(oRequest,oFullResponse);break;case DS.TYPE_HTMLTABLE:if(xhr&&oR awResponse.responseText){var el=document.createElement("div");el.innerHTML=oRawR esponse.responseText;oFullResponse=el.getElementsByTagName("table")[0];}oFullRes ponse=this.doBeforeParseData(oRequest,oFullResponse,oCallback);oParsedResponse=t his.parseHTMLTableData(oRequest,oFullResponse);break;case DS.TYPE_XML:if(xhr&&oR awResponse.responseXML){oFullResponse=oRawResponse.responseXML;}oFullResponse=th is.doBeforeParseData(oRequest,oFullResponse,oCallback);oParsedResponse=this.pars eXMLData(oRequest,oFullResponse);break;case DS.TYPE_TEXT:if(xhr&&lang.isString(o RawResponse.responseText)){oFullResponse=oRawResponse.responseText;}oFullRespons e=this.doBeforeParseData(oRequest,oFullResponse,oCallback);oParsedResponse=this. parseTextData(oRequest,oFullResponse);break;default:oFullResponse=this.doBeforeP arseData(oRequest,oFullResponse,oCallback);oParsedResponse=this.parseData(oReque st,oFullResponse);break;}oParsedResponse=oParsedResponse||{};if(!oParsedResponse .results){oParsedResponse.results=[];}if(!oParsedResponse.meta){oParsedResponse. meta={};}if(oParsedResponse&&!oParsedResponse.error){oParsedResponse=this.doBefo reCallback(oRequest,oFullResponse,oParsedResponse,oCallback);this.fireEvent("res ponseParseEvent",{request:oRequest,response:oParsedResponse,callback:oCallback,c aller:oCaller});this.addToCache(oRequest,oParsedResponse);}else{oParsedResponse. error=true;this.fireEvent("dataErrorEvent",{request:oRequest,response:oRawRespon se,callback:oCallback,caller:oCaller,message:DS.ERROR_DATANULL});}oParsedRespons e.tId=tId;DS.issueCallback(oCallback,[oRequest,oParsedResponse],oParsedResponse. error,oCaller);},doBeforeParseData:function(oRequest,oFullResponse,oCallback){re turn oFullResponse;},doBeforeCallback:function(oRequest,oFullResponse,oParsedRes ponse,oCallback){return oParsedResponse;},parseData:function(oRequest,oFullRespo nse){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.fie lds;for(i=fields.length-1;i>=0;--i){if(typeof fields[i]!=="object"){fields[i]={k ey:fields[i]};}}var parsers={},p;for(i=fields.length-1;i>=0;--i){p=(typeof field s[i].parser==="function"?fields[i].parser:DS.Parser[fields[i].parser+""])||field s[i].converter;if(p){parsers[fields[i].key]=p;}}var arrType=lang.isArray(oFullRe sponse[0]);for(i=oFullResponse.length-1;i>-1;i--){var oResult={};rec=oFullRespon se[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;}}els e{if(lang.isString(rec)){for(j=fields.length-1;j>-1;j--){field=fields[j];data=re

c;if(parsers[field.key]){data=parsers[field.key].call(this,data);}if(data===unde fined){data=null;}oResult[field.key]=data;}}}results[i]=oResult;}}else{results=o FullResponse;}var oParsedResponse={results:results};return oParsedResponse;}retu rn null;},parseTextData:function(oRequest,oFullResponse){if(lang.isString(oFullR esponse)){if(lang.isString(this.responseSchema.recordDelim)&&lang.isString(this. responseSchema.fieldDelim)){var oParsedResponse={results:[]};var recDelim=this.r esponseSchema.recordDelim;var fieldDelim=this.responseSchema.fieldDelim;if(oFull Response.length>0){var newLength=oFullResponse.length-recDelim.length;if(oFullRe sponse.substr(newLength)==recDelim){oFullResponse=oFullResponse.substr(0,newLeng th);}if(oFullResponse.length>0){var recordsarray=oFullResponse.split(recDelim);f or(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 fielddataarra y=recordsarray[i].split(fieldDelim);var oResult={};if(lang.isArray(this.response Schema.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.subs tr(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;}oResul t[key]=data;}else{bError=true;}}catch(e){bError=true;}}}else{oResult=fielddataar ray;}if(!bError){oParsedResponse.results[recIdx++]=oResult;}}}}}return oParsedRe sponse;}}return null;},parseXMLResult:function(result){var oResult={},schema=thi s.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 x mlAttr=result.attributes.getNamedItem(key);if(xmlAttr){data=xmlAttr.value;}else{ var xmlNode=result.getElementsByTagName(key);if(xmlNode&&xmlNode.item(0)){var it em=xmlNode.item(0);data=(item)?((item.text)?item.text:(item.textContent)?item.te xtContent:null):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=f ield.converter;}var parser=(typeof field.parser==="function")?field.parser:DS.Pa rser[field.parser+""];if(parser){data=parser.call(this,data);}if(data===undefine d){data=null;}oResult[key]=data;}}catch(e){}return oResult;},parseXMLData:functi on(oRequest,oFullResponse){var bError=false,schema=this.responseSchema,oParsedRe sponse={meta:{}},xmlList=null,metaNode=schema.metaNode,metaLocators=schema.metaF ields||{},i,k,loc,v;try{xmlList=(schema.resultNode)?oFullResponse.getElementsByT agName(schema.resultNode):null;metaNode=metaNode?oFullResponse.getElementsByTagN ame(metaNode)[0]:oFullResponse;if(metaNode){for(k in metaLocators){if(lang.hasOw nProperty(metaLocators,k)){loc=metaLocators[k];v=metaNode.getElementsByTagName(l oc)[0];if(v){v=v.firstChild.nodeValue;}else{v=metaNode.attributes.getNamedItem(l oc);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(xmlL ist.item(i));oParsedResponse.results[i]=oResult;}}if(bError){oParsedResponse.err or=true;}else{}return oParsedResponse;},parseJSONData:function(oRequest,oFullRes ponse){var oParsedResponse={results:[],meta:{}};if(lang.isObject(oFullResponse)& &this.responseSchema.resultsList){var schema=this.responseSchema,fields=schema.f ields,resultsList=oFullResponse,results=[],metaFields=schema.metaFields||{},fiel dParsers=[],fieldPaths=[],simpleFields=[],bError=false,i,len,j,v,key,parser,path ;var buildPath=function(needle){var path=null,keys=[],i=0;if(needle){needle=need le.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=b uildPath(schema.resultsList);if(path){resultsList=walkPath(path,oFullResponse);i f(resultsList===undefined){bError=true;}}else{bError=true;}if(!resultsList){resu

ltsList=[];}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){fiel dParsers[fieldParsers.length]={key:key,parser:parser};}if(path){if(path.length>1 ){fieldPaths[fieldPaths.length]={key:key,path:path};}else{simpleFields[simpleFie lds.length]={key:key,path:path[0]};}}else{}}for(i=resultsList.length-1;i>=0;--i) {var r=resultsList[i],rec={};if(r){for(j=simpleFields.length-1;j>=0;--j){rec[sim pleFields[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(fieldP aths[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;}}}res ults[i]=rec;}}else{results=resultsList;}for(key in metaFields){if(lang.hasOwnPro perty(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 oParsed Response;},parseHTMLTableData:function(oRequest,oFullResponse){var bError=false; var elTable=oFullResponse;var fields=this.responseSchema.fields;var oParsedRespo nse={results:[]};if(lang.isArray(fields)){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 fi eld=fields[k];var key=(lang.isValue(field.key))?field.key:field;var data=elRow.c ells[k].innerHTML;if(!field.parser&&field.converter){field.parser=field.converte r;}var parser=(typeof field.parser==="function")?field.parser:DS.Parser[field.pa rser+""];if(parser){data=parser.call(this,data);}if(data===undefined){data=null; }oResult[key]=data;}oParsedResponse.results[j]=oResult;}}}else{bError=true;}if(b Error){oParsedResponse.error=true;}else{}return oParsedResponse;}};lang.augmentP roto(DS,util.EventProvider);util.LocalDataSource=function(oLiveData,oConfigs){th is.dataType=DS.TYPE_LOCAL;if(oLiveData){if(YAHOO.lang.isArray(oLiveData)){this.r esponseType=DS.TYPE_JSARRAY;}else{if(oLiveData.nodeType&&oLiveData.nodeType==9){ this.responseType=DS.TYPE_XML;}else{if(oLiveData.nodeName&&(oLiveData.nodeName.t oLowerCase()=="table")){this.responseType=DS.TYPE_HTMLTABLE;oLiveData=oLiveData. cloneNode(true);}else{if(YAHOO.lang.isString(oLiveData)){this.responseType=DS.TY PE_TEXT;}else{if(YAHOO.lang.isObject(oLiveData)){this.responseType=DS.TYPE_JSON; }}}}}}else{oLiveData=[];this.responseType=DS.TYPE_JSARRAY;}util.LocalDataSource. superclass.constructor.call(this,oLiveData,oConfigs);};lang.extend(util.LocalDat aSource,DS);lang.augmentObject(util.LocalDataSource,DS);util.FunctionDataSource= function(oLiveData,oConfigs){this.dataType=DS.TYPE_JSFUNCTION;oLiveData=oLiveDat a||function(){};util.FunctionDataSource.superclass.constructor.call(this,oLiveDa ta,oConfigs);};lang.extend(util.FunctionDataSource,DS,{scope:null,makeConnection :function(oRequest,oCallback,oCaller){var tId=DS._nTransactionId++;this.fireEven t("requestEvent",{tId:tId,request:oRequest,callback:oCallback,caller:oCaller});v ar oRawResponse=(this.scope)?this.liveData.call(this.scope,oRequest,this):this.l iveData(oRequest);if(this.responseType===DS.TYPE_UNKNOWN){if(YAHOO.lang.isArray( oRawResponse)){this.responseType=DS.TYPE_JSARRAY;}else{if(oRawResponse&&oRawResp onse.nodeType&&oRawResponse.nodeType==9){this.responseType=DS.TYPE_XML;}else{if( oRawResponse&&oRawResponse.nodeName&&(oRawResponse.nodeName.toLowerCase()=="tabl e")){this.responseType=DS.TYPE_HTMLTABLE;}else{if(YAHOO.lang.isObject(oRawRespon se)){this.responseType=DS.TYPE_JSON;}else{if(YAHOO.lang.isString(oRawResponse)){ this.responseType=DS.TYPE_TEXT;}}}}}}this.handleResponse(oRequest,oRawResponse,o Callback,oCaller,tId);return tId;}});lang.augmentObject(util.FunctionDataSource, DS);util.ScriptNodeDataSource=function(oLiveData,oConfigs){this.dataType=DS.TYPE _SCRIPTNODE;oLiveData=oLiveData||"";util.ScriptNodeDataSource.superclass.constru ctor.call(this,oLiveData,oConfigs);};lang.extend(util.ScriptNodeDataSource,DS,{g etUtility:util.Get,asyncMode:"allowAll",scriptCallbackParam:"callback",generateR equestCallback:function(id){return"&"+this.scriptCallbackParam+"=YAHOO.util.Scri ptNodeDataSource.callbacks["+id+"]";},doBeforeGetScriptNode:function(sUri){retur n sUri;},makeConnection:function(oRequest,oCallback,oCaller){var tId=DS._nTransa ctionId++;this.fireEvent("requestEvent",{tId:tId,request:oRequest,callback:oCall back,caller:oCaller});if(util.ScriptNodeDataSource._nPending===0){util.ScriptNod

eDataSource.callbacks=[];util.ScriptNodeDataSource._nId=0;}var id=util.ScriptNod eDataSource._nId;util.ScriptNodeDataSource._nId++;var oSelf=this;util.ScriptNode DataSource.callbacks[id]=function(oRawResponse){if((oSelf.asyncMode!=="ignoreSta leResponses")||(id===util.ScriptNodeDataSource.callbacks.length-1)){if(oSelf.res ponseType===DS.TYPE_UNKNOWN){if(YAHOO.lang.isArray(oRawResponse)){oSelf.response Type=DS.TYPE_JSARRAY;}else{if(oRawResponse.nodeType&&oRawResponse.nodeType==9){o Self.responseType=DS.TYPE_XML;}else{if(oRawResponse.nodeName&&(oRawResponse.node Name.toLowerCase()=="table")){oSelf.responseType=DS.TYPE_HTMLTABLE;}else{if(YAHO O.lang.isObject(oRawResponse)){oSelf.responseType=DS.TYPE_JSON;}else{if(YAHOO.la ng.isString(oRawResponse)){oSelf.responseType=DS.TYPE_TEXT;}}}}}}oSelf.handleRes ponse(oRequest,oRawResponse,oCallback,oCaller,tId);}else{}delete util.ScriptNode DataSource.callbacks[id];};util.ScriptNodeDataSource._nPending++;var sUri=this.l iveData+oRequest+this.generateRequestCallback(id);sUri=this.doBeforeGetScriptNod e(sUri);this.getUtility.script(sUri,{autopurge:true,onsuccess:util.ScriptNodeDat aSource._bumpPendingDown,onfail:util.ScriptNodeDataSource._bumpPendingDown});ret urn 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||"";util.XHRDataSource.superclass.constructor .call(this,oLiveData,oConfigs);};lang.extend(util.XHRDataSource,DS,{connMgr:null ,connXhrMode:"allowAll",connMethodPost:false,connTimeout:0,makeConnection:functi on(oRequest,oCallback,oCaller){var oRawResponse=null;var tId=DS._nTransactionId+ +;this.fireEvent("requestEvent",{tId:tId,request:oRequest,callback:oCallback,cal ler:oCaller});var oSelf=this;var oConnMgr=this.connMgr;var oQueue=this._oQueue;v ar _xhrSuccess=function(oResponse){if(oResponse&&(this.connXhrMode=="ignoreStale Responses")&&(oResponse.tId!=oQueue.conn.tId)){return null;}else{if(!oResponse){ this.fireEvent("dataErrorEvent",{request:oRequest,callback:oCallback,caller:oCal ler,message:DS.ERROR_DATANULL});DS.issueCallback(oCallback,[oRequest,{error:true }],true,oCaller);return null;}else{if(this.responseType===DS.TYPE_UNKNOWN){var c type=(oResponse.getResponseHeader)?oResponse.getResponseHeader["Content-Type"]:n ull;if(ctype){if(ctype.indexOf("text/xml")>-1){this.responseType=DS.TYPE_XML;}el se{if(ctype.indexOf("application/json")>-1){this.responseType=DS.TYPE_JSON;}else {if(ctype.indexOf("text/plain")>-1){this.responseType=DS.TYPE_TEXT;}}}}}this.han dleResponse(oRequest,oResponse,oCallback,oCaller,tId);}}};var _xhrFailure=functi on(oResponse){this.fireEvent("dataErrorEvent",{request:oRequest,callback:oCallba ck,caller:oCaller,message:DS.ERROR_DATAINVALID});if(lang.isString(this.liveData) &&lang.isString(oRequest)&&(this.liveData.lastIndexOf("?")!==this.liveData.lengt h-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.isNum ber(this.connTimeout)){_xhrCallback.timeout=this.connTimeout;}if(this.connXhrMod e=="cancelStaleRequests"){if(oQueue.conn){if(oConnMgr.abort){oConnMgr.abort(oQue ue.conn);oQueue.conn=null;}else{}}}if(oConnMgr&&oConnMgr.asyncRequest){var sLive Data=this.liveData;var isPost=this.connMethodPost;var sMethod=(isPost)?"POST":"G ET";var sUri=(isPost||!lang.isValue(oRequest))?sLiveData:sLiveData+oRequest;var sRequest=(isPost)?oRequest:null;if(this.connXhrMode!="queueRequests"){oQueue.con n=oConnMgr.asyncRequest(sMethod,sUri,_xhrCallback,sRequest);}else{if(oQueue.conn ){var allRequests=oQueue.requests;allRequests.push({request:oRequest,callback:_x hrCallback});if(!oQueue.interval){oQueue.interval=setInterval(function(){if(oCon nMgr.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.asy ncRequest(sMethod,sUri,allRequests[0].callback,sRequest);allRequests.shift();}el se{clearInterval(oQueue.interval);oQueue.interval=null;}}},50);}}else{oQueue.con n=oConnMgr.asyncRequest(sMethod,sUri,_xhrCallback,sRequest);}}}else{DS.issueCall back(oCallback,[oRequest,{error:true}],true,oCaller);}return tId;}});lang.augmen tObject(util.XHRDataSource,DS);util.DataSource=function(oLiveData,oConfigs){oCon figs=oConfigs||{};var dataType=oConfigs.dataType;if(dataType){if(dataType==DS.TY PE_LOCAL){lang.augmentObject(util.DataSource,util.LocalDataSource);return new ut il.LocalDataSource(oLiveData,oConfigs);}else{if(dataType==DS.TYPE_XHR){lang.augm

entObject(util.DataSource,util.XHRDataSource);return new util.XHRDataSource(oLiv eData,oConfigs);}else{if(dataType==DS.TYPE_SCRIPTNODE){lang.augmentObject(util.D ataSource,util.ScriptNodeDataSource);return new util.ScriptNodeDataSource(oLiveD ata,oConfigs);}else{if(dataType==DS.TYPE_JSFUNCTION){lang.augmentObject(util.Dat aSource,util.FunctionDataSource);return new util.FunctionDataSource(oLiveData,oC onfigs);}}}}}if(YAHOO.lang.isString(oLiveData)){lang.augmentObject(util.DataSour ce,util.XHRDataSource);return new util.XHRDataSource(oLiveData,oConfigs);}else{i f(YAHOO.lang.isFunction(oLiveData)){lang.augmentObject(util.DataSource,util.Func tionDataSource);return new util.FunctionDataSource(oLiveData,oConfigs);}else{lan g.augmentObject(util.DataSource,util.LocalDataSource);return new util.LocalDataS ource(oLiveData,oConfigs);}}};lang.augmentObject(util.DataSource,DS);})();YAHOO. util.Number={format:function(C,G){var B=YAHOO.lang;if(!B.isValue(C)||(C==="")){r eturn"";}G=G||{};if(!B.isNumber(C)){C*=1;}if(B.isNumber(C)){var E=(C<0);var K=C+ "";var H=(G.decimalSeparator)?G.decimalSeparator:".";var I;if(B.isNumber(G.decim alPlaces)){var J=G.decimalPlaces;var D=Math.pow(10,J);K=Math.round(C*D)/D+"";I=K .lastIndexOf(".");if(J>0){if(I<0){K+=H;I=K.length-1;}else{if(H!=="."){K=K.replac e(".",H);}}while((K.length-1-I)<J){K+="0";}}}if(G.thousandsSeparator){var M=G.th ousandsSeparator;I=K.lastIndexOf(H);I=(I>-1)?I:K.length;var L=K.substring(I);var A=-1;for(var F=I;F>0;F--){A++;if((A%3===0)&&(F!==I)&&(!E||(F>1))){L=M+L;}L=K.ch arAt(F-1)+L;}K=L;}K=(G.prefix)?G.prefix+K:K;K=(G.suffix)?K+G.suffix:K;return K;} else{return C;}}};(function(){var A=function(C,E,D){if(typeof D==="undefined"){D =10;}for(;parseInt(C,10)<D&&D>1;D/=10){C=E.toString()+C;}return C.toString();};v ar B={formats:{a:function(D,C){return C.a[D.getDay()];},A:function(D,C){return C .A[D.getDay()];},b:function(D,C){return C.b[D.getMonth()];},B:function(D,C){retu rn C.B[D.getMonth()];},C:function(C){return A(parseInt(C.getFullYear()/100,10),0 );},d:["getDate","0"],e:["getDate"," "],g:function(C){return A(parseInt(B.format s.G(C)%100,10),0);},G:function(E){var F=E.getFullYear();var D=parseInt(B.formats .V(E),10);var C=parseInt(B.formats.W(E),10);if(C>D){F++;}else{if(C===0&&D>=52){F --;}}return F;},H:["getHours","0"],I:function(D){var C=D.getHours()%12;return A( C===0?12:C,0);},j:function(G){var F=new Date(""+G.getFullYear()+"/1/1 GMT");var D=new Date(""+G.getFullYear()+"/"+(G.getMonth()+1)+"/"+G.getDate()+" GMT");var C =D-F;var E=parseInt(C/60000/60/24,10)+1;return A(E,0,100);},k:["getHours"," "],l :function(D){var C=D.getHours()%12;return A(C===0?12:C," ");},m:function(C){retu rn A(C.getMonth()+1,0);},M:["getMinutes","0"],p:function(D,C){return C.p[D.getHo urs()>=12?1:0];},P:function(D,C){return C.P[D.getHours()>=12?1:0];},s:function(D ,C){return parseInt(D.getTime()/1000,10);},S:["getSeconds","0"],u:function(C){va r D=C.getDay();return D===0?7:D;},U:function(F){var C=parseInt(B.formats.j(F),10 );var E=6-F.getDay();var D=parseInt((C+E)/7,10);return A(D,0);},V:function(F){va r E=parseInt(B.formats.W(F),10);var C=(new Date(""+F.getFullYear()+"/1/1")).getD ay();var D=E+(C>4||C<=1?0:1);if(D===53&&(new Date(""+F.getFullYear()+"/12/31")). getDay()<4){D=1;}else{if(D===0){D=B.formats.V(new Date(""+(F.getFullYear()-1)+"/ 12/31"));}}return A(D,0);},w:"getDay",W:function(F){var C=parseInt(B.formats.j(F ),10);var E=7-B.formats.u(F);var D=parseInt((C+E)/7,10);return A(D,0,10);},y:fun ction(C){return A(C.getFullYear()%100,0);},Y:"getFullYear",z:function(E){var D=E .getTimezoneOffset();var C=A(parseInt(Math.abs(D/60),10),0);var F=A(Math.abs(D%6 0),0);return(D>0?"-":"+")+C+F;},Z:function(C){var D=C.toString().replace(/^.*:\d \d( GMT[+-]\d+)? \(?([A-Za-z ]+)\)?\d*$/,"$2").replace(/[a-z ]/g,"");if(D.length >4){D=B.formats.z(C);}return D;},"%":function(C){return"%";}},aggregates:{c:"loc ale",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(G,F,D){F=F||{};if(!(G instanceof Da te)){return YAHOO.lang.isValue(G)?G:"";}var H=F.format||"%m/%d/%Y";if(H==="YYYY/ MM/DD"){H="%Y/%m/%d";}else{if(H==="DD/MM/YYYY"){H="%d/%m/%Y";}else{if(H==="MM/DD /YYYY"){H="%m/%d/%Y";}}}D=D||"en";if(!(D in YAHOO.util.DateLocale)){if(D.replace (/-[a-zA-Z]+$/,"")in YAHOO.util.DateLocale){D=D.replace(/-[a-zA-Z]+$/,"");}else{ D="en";}}var J=YAHOO.util.DateLocale[D];var C=function(L,K){var M=B.aggregates[K ];return(M==="locale"?J[K]:M);};var E=function(L,K){var M=B.formats[K];if(typeof M==="string"){return G[M]();}else{if(typeof M==="function"){return M.call(G,G,J );}else{if(typeof M==="object"&&typeof M[0]==="string"){return A(G[M[0]](),M[1]) ;}else{return K;}}}};while(H.match(/%[cDFhnrRtTxX]/)){H=H.replace(/%([cDFhnrRtTx X])/g,C);}var I=H.replace(/%([aAbBCdegGHIjklmMpPsSuUVwWyYzZ%])/g,E);C=E=undefine

d;return I;}};YAHOO.namespace("YAHOO.util");YAHOO.util.Date=B;YAHOO.util.DateLoc ale={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-G B"]=YAHOO.lang.merge(YAHOO.util.DateLocale["en"],{r:"%l:%M:%S %P %Z"});YAHOO.uti l.DateLocale["en-AU"]=YAHOO.lang.merge(YAHOO.util.DateLocale["en"]);})();YAHOO.r egister("datasource",YAHOO.util.DataSource,{version:"2.7.0",build:"1799"});YAHOO .namespace("deconcept");YAHOO.deconcept=YAHOO.deconcept||{};if(typeof YAHOO.deco ncept.util=="undefined"||!YAHOO.deconcept.util){YAHOO.deconcept.util={};}if(type of YAHOO.deconcept.SWFObjectUtil=="undefined"||!YAHOO.deconcept.SWFObjectUtil){Y AHOO.deconcept.SWFObjectUtil={};}YAHOO.deconcept.SWFObject=function(E,C,K,F,H,J, L,G,A,D){if(!document.getElementById){return;}this.DETECT_KEY=D?D:"detectflash"; this.skipDetect=YAHOO.deconcept.util.getRequestParameter(this.DETECT_KEY);this.p arams={};this.variables={};this.attributes=[];if(E){this.setAttribute("swf",E);} if(C){this.setAttribute("id",C);}if(K){this.setAttribute("width",K);}if(F){this. setAttribute("height",F);}if(H){this.setAttribute("version",new YAHOO.deconcept. PlayerVersion(H.toString().split(".")));}this.installedVer=YAHOO.deconcept.SWFOb jectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.ma jor>7){YAHOO.deconcept.SWFObject.doPrepUnload=true;}if(J){this.addParam("bgcolor ",J);}var B=L?L:"high";this.addParam("quality",B);this.setAttribute("useExpressI nstall",false);this.setAttribute("doExpressInstall",false);var I=(G)?G:window.lo cation;this.setAttribute("xiRedirectUrl",I);this.setAttribute("redirectUrl",""); if(A){this.setAttribute("redirectUrl",A);}};YAHOO.deconcept.SWFObject.prototype= {useExpressInstall:function(A){this.xiSWFPath=!A?"expressinstall.swf":A;this.set Attribute("useExpressInstall",true);},setAttribute:function(A,B){this.attributes [A]=B;},getAttribute:function(A){return this.attributes[A];},addParam:function(A ,B){this.params[A]=B;},getParams:function(){return this.params;},addVariable:fun ction(A,B){this.variables[A]=B;},getVariable:function(A){return this.variables[A ];},getVariables:function(){return this.variables;},getVariablePairs:function(){ var A=[];var B;var C=this.getVariables();for(B in C){if(C.hasOwnProperty(B)){A[A .length]=B+"="+C[B];}}return A;},getSWFHTML:function(){var D="";var C={};var A=" ";var B="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length ){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","Plu gIn");this.setAttribute("swf",this.xiSWFPath);}D='<embed type="application/x-sho ckwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("wid th")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("sty le")+'"';D+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+' " ';C=this.getParams();for(A in C){if(C.hasOwnProperty(A)){D+=[A]+'="'+C[A]+'" ' ;}}B=this.getVariablePairs().join("&");if(B.length>0){D+='flashvars="'+B+'"';}D+ ="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayer Type","ActiveX");this.setAttribute("swf",this.xiSWFPath);}D='<object id="'+this. getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width ="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style ="'+this.getAttribute("style")+'">';D+='<param name="movie" value="'+this.getAtt ribute("swf")+'" />';C=this.getParams();for(A in C){if(C.hasOwnProperty(A)){D+=' <param name="'+A+'" value="'+C[A]+'" />';}}B=this.getVariablePairs().join("&");i f(B.length>0){D+='<param name="flashvars" value="'+B+'" />';}D+="</object>";}ret urn D;},write:function(A){if(this.getAttribute("useExpressInstall")){var B=new Y AHOO.deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(B)&&! this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribut e("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttri bute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Play er Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDet ect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(thi s.getAttribute("version"))){var C=(typeof A=="string")?document.getElementById(A

):A;C.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redire ctUrl")!==""){document.location.replace(this.getAttribute("redirectUrl"));}}retu rn false;}};YAHOO.deconcept.SWFObjectUtil.getPlayerVersion=function(){var D=null ;var C=new YAHOO.deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigato r.mimeTypes.length){var A=navigator.plugins["Shockwave Flash"];if(A&&A.descripti on){C=new YAHOO.deconcept.PlayerVersion(A.description.replace(/([a-zA-Z]|\s)+/," ").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&n avigator.userAgent.indexOf("Windows CE")>=0){var B=3;while(D){try{B++;D=new Acti veXObject("ShockwaveFlash.ShockwaveFlash."+B);C=new YAHOO.deconcept.PlayerVersio n([B,0,0]);}catch(E){D=null;}}}else{try{D=new ActiveXObject("ShockwaveFlash.Shoc kwaveFlash.7");}catch(E){try{D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash. 6");C=new YAHOO.deconcept.PlayerVersion([6,0,21]);D.AllowScriptAccess="always";} catch(E){if(C.major==6){return C;}}try{D=new ActiveXObject("ShockwaveFlash.Shock waveFlash");}catch(E){}}if(D!==null){C=new YAHOO.deconcept.PlayerVersion(D.GetVa riable("$version").split(" ")[1].split(","));}}}return C;};YAHOO.deconcept.Playe rVersion=function(A){this.major=A[0]!==null?parseInt(A[0],0):0;this.minor=A[1]!= =null?parseInt(A[1],0):0;this.rev=A[2]!==null?parseInt(A[2],0):0;};YAHOO.deconce pt.PlayerVersion.prototype.versionIsValid=function(A){if(this.major<A.major){ret urn false;}if(this.major>A.major){return true;}if(this.minor<A.minor){return fal se;}if(this.minor>A.minor){return true;}if(this.rev<A.rev){return false;}return true;};YAHOO.deconcept.util={getRequestParameter:function(D){var C=document.loca tion.search||document.location.hash;if(D===null){return C;}if(C){var B=C.substri ng(1).split("&");for(var A=0;A<B.length;A++){if(B[A].substring(0,B[A].indexOf("= "))==D){return B[A].substring((B[A].indexOf("=")+1));}}}return"";}};YAHOO.deconc ept.SWFObjectUtil.cleanupSWFs=function(){var C=document.getElementsByTagName("OB JECT");for(var B=C.length-1;B>=0;B--){C[B].style.display="none";for(var A in C[B ]){if(typeof C[B][A]=="function"){C[B][A]=function(){};}}}};if(YAHOO.deconcept.S WFObject.doPrepUnload){if(!YAHOO.deconcept.unloadSet){YAHOO.deconcept.SWFObjectU til.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnload Handler=function(){};window.attachEvent("onunload",YAHOO.deconcept.SWFObjectUtil .cleanupSWFs);};window.attachEvent("onbeforeunload",YAHOO.deconcept.SWFObjectUti l.prepUnload);YAHOO.deconcept.unloadSet=true;}}if(!document.getElementById&&docu ment.all){document.getElementById=function(A){return document.all[A];};}YAHOO.wi dget.FlashAdapter=function(D,A,B){this._queue=this._queue||[];this._events=this. _events||{};this._configs=this._configs||{};B=B||{};this._id=B.id=B.id||YAHOO.ut il.Dom.generateId(null,"yuigen");B.version=B.version||"9.0.45";B.backgroundColor =B.backgroundColor||"#ffffff";this._attributes=B;this._swfURL=D;this._containerI D=A;this._embedSWF(this._swfURL,this._containerID,B.id,B.version,B.backgroundCol or,B.expressInstall,B.wmode);try{this.createEvent("contentReady");}catch(C){}};Y AHOO.extend(YAHOO.widget.FlashAdapter,YAHOO.util.AttributeProvider,{_swfURL:null ,_containerID:null,_swf:null,_id:null,_initialized:false,_attributes:null,toStri ng:function(){return"FlashAdapter "+this._id;},destroy:function(){if(this._swf){ var B=YAHOO.util.Dom.get(this._containerID);B.removeChild(this._swf);}var A=this ._id;for(var C in this){if(YAHOO.lang.hasOwnProperty(this,C)){this[C]=null;}}},_ embedSWF:function(I,H,D,C,F,G,B){var E=new YAHOO.deconcept.SWFObject(I,D,"100%", "100%",C,F);if(G){E.useExpressInstall(G);}E.addParam("allowScriptAccess","always ");if(B){E.addParam("wmode",B);}E.addVariable("allowedDomain",document.location. hostname);E.addVariable("elementID",D);E.addVariable("eventHandler","YAHOO.widge t.FlashAdapter.eventHandler");var A=YAHOO.util.Dom.get(H);var J=E.write(A);if(J) {this._swf=YAHOO.util.Dom.get(D);this._swf.owner=this;}else{}},_eventHandler:fun ction(B){var A=B.type;switch(A){case"swfReady":this._loadHandler();this.fireEven t("contentReady");return;case"log":return;}this.fireEvent(A,B);},_loadHandler:fu nction(){this._initialized=false;this._initAttributes(this._attributes);this.set Attributes(this._attributes,true);this._initialized=true;},set:function(A,B){thi s._attributes[A]=B;YAHOO.widget.FlashAdapter.superclass.set.call(this,A,B);},_in itAttributes:function(A){this.getAttributeConfig("altText",{method:this._getAltT ext});this.setAttributeConfig("altText",{method:this._setAltText});this.getAttri buteConfig("swfURL",{method:this._getSWFURL});},_getSWFURL:function(){return thi s._swfURL;},_getAltText:function(){return this._swf.getAltText();},_setAltText:f unction(A){return this._swf.setAltText(A);}});YAHOO.widget.FlashAdapter.eventHan

dler=function(A,C){var B=YAHOO.util.Dom.get(A);if(!B.owner){setTimeout(function( ){YAHOO.widget.FlashAdapter.eventHandler(A,C);},0);}else{B.owner._eventHandler(C );}};YAHOO.widget.FlashAdapter.proxyFunctionCount=0;YAHOO.widget.FlashAdapter.cr eateProxyFunction=function(B){var A=YAHOO.widget.FlashAdapter.proxyFunctionCount ;YAHOO.widget.FlashAdapter["proxyFunction"+A]=function(){return B.apply(null,arg uments);};YAHOO.widget.FlashAdapter.proxyFunctionCount++;return"YAHOO.widget.Fla shAdapter.proxyFunction"+A.toString();};YAHOO.widget.FlashAdapter.removeProxyFun ction=function(A){if(!A||A.indexOf("YAHOO.widget.FlashAdapter.proxyFunction")<0) {return;}A=A.substr(26);YAHOO.widget.FlashAdapter[A]=null;};YAHOO.widget.Chart=f unction(C,A,D,B){YAHOO.widget.Chart.superclass.constructor.call(this,YAHOO.widge t.Chart.SWFURL,A,B);this._type=C;this._dataSource=D;this.createEvent("itemMouseO verEvent");this.createEvent("itemMouseOutEvent");this.createEvent("itemClickEven t");this.createEvent("itemDoubleClickEvent");this.createEvent("itemDragStartEven t");this.createEvent("itemDragEvent");this.createEvent("itemDragEndEvent");};YAH OO.extend(YAHOO.widget.Chart,YAHOO.widget.FlashAdapter,{_type:null,_pollingID:nu ll,_pollingInterval:null,_dataTipFunction:null,_seriesLabelFunctions:null,toStri ng:function(){return"Chart "+this._id;},setStyle:function(A,B){B=YAHOO.lang.JSON .stringify(B);this._swf.setStyle(A,B);},setStyles:function(A){A=YAHOO.lang.JSON. stringify(A);this._swf.setStyles(A);},setSeriesStyles:function(B){for(var A=0;A< B.length;A++){B[A]=YAHOO.lang.JSON.stringify(B[A]);}this._swf.setSeriesStyles(B) ;},destroy:function(){if(this._dataSource!==null){if(this._pollingID!==null){thi s._dataSource.clearInterval(this._pollingID);this._pollingID=null;}}if(this._dat aTipFunction){YAHOO.widget.FlashAdapter.removeProxyFunction(this._dataTipFunctio n);}YAHOO.widget.Chart.superclass.destroy.call(this);},_initAttributes:function( A){YAHOO.widget.Chart.superclass._initAttributes.call(this,A);this.getAttributeC onfig("request",{method:this._getRequest});this.setAttributeConfig("request",{me thod:this._setRequest});this.getAttributeConfig("dataSource",{method:this._getDa taSource});this.setAttributeConfig("dataSource",{method:this._setDataSource});th is.getAttributeConfig("series",{method:this._getSeriesDefs});this.setAttributeCo nfig("series",{method:this._setSeriesDefs});this.getAttributeConfig("categoryNam es",{method:this._getCategoryNames});this.setAttributeConfig("categoryNames",{va lidator:YAHOO.lang.isArray,method:this._setCategoryNames});this.getAttributeConf ig("dataTipFunction",{method:this._getDataTipFunction});this.setAttributeConfig( "dataTipFunction",{method:this._setDataTipFunction});this.getAttributeConfig("po lling",{method:this._getPolling});this.setAttributeConfig("polling",{method:this ._setPolling});},_loadHandler:function(){this._swf.setType(this._type);if(this._ attributes.style){var A=this._attributes.style;this.setStyles(A);}YAHOO.widget.C hart.superclass._loadHandler.call(this);if(this._dataSource){this.set("dataSourc e",this._dataSource);}},refreshData:function(){if(!this._initialized){return;}if (this._dataSource!==null){if(this._pollingID!==null){this._dataSource.clearInter val(this._pollingID);this._pollingID=null;}if(this._pollingInterval>0){this._pol lingID=this._dataSource.setInterval(this._pollingInterval,this._request,this._lo adDataHandler,this);}this._dataSource.sendRequest(this._request,this._loadDataHa ndler,this);}},_loadDataHandler:function(D,C,J){if(this._swf){if(J){}else{var H; if(this._seriesLabelFunctions){var I=this._seriesLabelFunctions.length;for(H=0;H <I;H++){YAHOO.widget.FlashAdapter.removeProxyFunction(this._seriesLabelFunctions [H]);}this._seriesLabelFunction=null;}this._seriesLabelFunctions=[];var F=[];var E=0;var K=null;if(this._seriesDefs!==null){E=this._seriesDefs.length;for(H=0;H< E;H++){K=this._seriesDefs[H];var B={};for(var A in K){if(YAHOO.lang.hasOwnProper ty(K,A)){if(A=="style"){if(K.style!==null){B.style=YAHOO.lang.JSON.stringify(K.s tyle);}}else{if(A=="labelFunction"){if(K.labelFunction!==null&&typeof K.labelFun ction=="function"){B.labelFunction=YAHOO.widget.FlashAdapter.createProxyFunction (K.labelFunction);this._seriesLabelFunctions.push(B.labelFunction);}}else{B[A]=K [A];}}}}F.push(B);}}if(E>0){for(H=0;H<E;H++){K=F[H];if(!K.type){K.type=this._typ e;}K.dataProvider=C.results;}}else{var G={type:this._type,dataProvider:C.results };F.push(G);}this._swf.setDataProvider(F);}}},_request:"",_getRequest:function() {return this._request;},_setRequest:function(A){this._request=A;this.refreshData ();},_dataSource:null,_getDataSource:function(){return this._dataSource;},_setDa taSource:function(A){this._dataSource=A;this.refreshData();},_seriesDefs:null,_g etSeriesDefs:function(){return this._seriesDefs;},_setSeriesDefs:function(A){thi

s._seriesDefs=A;this.refreshData();},_getCategoryNames:function(){this._swf.getC ategoryNames();},_setCategoryNames:function(A){this._swf.setCategoryNames(A);},_ setDataTipFunction:function(A){if(this._dataTipFunction){YAHOO.widget.FlashAdapt er.removeProxyFunction(this._dataTipFunction);}if(A&&typeof A=="function"){A=YAH OO.widget.FlashAdapter.createProxyFunction(A);this._dataTipFunction=A;}this._swf .setDataTipFunction(A);},_getPolling:function(){return this._pollingInterval;},_ setPolling:function(A){this._pollingInterval=A;this.refreshData();}});YAHOO.widg et.Chart.SWFURL="assets/charts.swf";YAHOO.widget.PieChart=function(A,C,B){YAHOO. widget.PieChart.superclass.constructor.call(this,"pie",A,C,B);};YAHOO.lang.exten d(YAHOO.widget.PieChart,YAHOO.widget.Chart,{_initAttributes:function(A){YAHOO.wi dget.PieChart.superclass._initAttributes.call(this,A);this.getAttributeConfig("d ataField",{method:this._getDataField});this.setAttributeConfig("dataField",{vali dator:YAHOO.lang.isString,method:this._setDataField});this.getAttributeConfig("c ategoryField",{method:this._getCategoryField});this.setAttributeConfig("category Field",{validator:YAHOO.lang.isString,method:this._setCategoryField});},_getData Field:function(){return this._swf.getDataField();},_setDataField:function(A){thi s._swf.setDataField(A);},_getCategoryField:function(){return this._swf.getCatego ryField();},_setCategoryField:function(A){this._swf.setCategoryField(A);}});YAHO O.widget.CartesianChart=function(C,A,D,B){YAHOO.widget.CartesianChart.superclass .constructor.call(this,C,A,D,B);};YAHOO.lang.extend(YAHOO.widget.CartesianChart, YAHOO.widget.Chart,{_xAxisLabelFunction:null,_yAxisLabelFunction:null,destroy:fu nction(){if(this._xAxisLabelFunction){YAHOO.widget.FlashAdapter.removeProxyFunct ion(this._xAxisLabelFunction);this._xAxisLabelFunction=null;}if(this._yAxisLabel Function){YAHOO.widget.FlashAdapter.removeProxyFunction(this._yAxisLabelFunction );this._yAxisLabelFunction=null;}YAHOO.widget.CartesianChart.superclass.destroy. call(this);},_initAttributes:function(A){YAHOO.widget.CartesianChart.superclass. _initAttributes.call(this,A);this.getAttributeConfig("xField",{method:this._getX Field});this.setAttributeConfig("xField",{validator:YAHOO.lang.isString,method:t his._setXField});this.getAttributeConfig("yField",{method:this._getYField});this .setAttributeConfig("yField",{validator:YAHOO.lang.isString,method:this._setYFie ld});this.setAttributeConfig("xAxis",{method:this._setXAxis});this.setAttributeC onfig("yAxis",{method:this._setYAxis});},_getXField:function(){return this._swf. getHorizontalField();},_setXField:function(A){this._swf.setHorizontalField(A);}, _getYField:function(){return this._swf.getVerticalField();},_setYField:function( A){this._swf.setVerticalField(A);},_setXAxis:function(B){if(this._xAxisLabelFunc tion!==null){YAHOO.widget.FlashAdapter.removeProxyFunction(this._xAxisLabelFunct ion);this._xAxisLabelFunction=null;}var A={};for(var C in B){if(C=="labelFunctio n"){if(B.labelFunction!==null){if(typeof B.labelFunction=="function"){A.labelFun ction=YAHOO.widget.FlashAdapter.createProxyFunction(B.labelFunction);}else{A.lab elFunction=B.labelFunction;}this._xAxisLabelFunction=A.labelFunction;}}else{A[C] =B[C];}}this._swf.setHorizontalAxis(A);},_setYAxis:function(B){if(this._yAxisLab elFunction!==null){YAHOO.widget.FlashAdapter.removeProxyFunction(this._yAxisLabe lFunction);this._yAxisLabelFunction=null;}var A={};for(var C in B){if(C=="labelF unction"){if(B.labelFunction!==null){if(typeof B.labelFunction=="function"){A.la belFunction=YAHOO.widget.FlashAdapter.createProxyFunction(B.labelFunction);}else {A.labelFunction=B.labelFunction;}this._yAxisLabelFunction=A.labelFunction;}}els e{A[C]=B[C];}}this._swf.setVerticalAxis(A);}});YAHOO.widget.LineChart=function(A ,C,B){YAHOO.widget.LineChart.superclass.constructor.call(this,"line",A,C,B);};YA HOO.lang.extend(YAHOO.widget.LineChart,YAHOO.widget.CartesianChart);YAHOO.widget .ColumnChart=function(A,C,B){YAHOO.widget.ColumnChart.superclass.constructor.cal l(this,"column",A,C,B);};YAHOO.lang.extend(YAHOO.widget.ColumnChart,YAHOO.widget .CartesianChart);YAHOO.widget.BarChart=function(A,C,B){YAHOO.widget.BarChart.sup erclass.constructor.call(this,"bar",A,C,B);};YAHOO.lang.extend(YAHOO.widget.BarC hart,YAHOO.widget.CartesianChart);YAHOO.widget.StackedColumnChart=function(A,C,B ){YAHOO.widget.StackedColumnChart.superclass.constructor.call(this,"stackcolumn" ,A,C,B);};YAHOO.lang.extend(YAHOO.widget.StackedColumnChart,YAHOO.widget.Cartesi anChart);YAHOO.widget.StackedBarChart=function(A,C,B){YAHOO.widget.StackedBarCha rt.superclass.constructor.call(this,"stackbar",A,C,B);};YAHOO.lang.extend(YAHOO. widget.StackedBarChart,YAHOO.widget.CartesianChart);YAHOO.widget.Axis=function() {};YAHOO.widget.Axis.prototype={type:null,reverse:false,labelFunction:null,label

Spacing:2,title:null};YAHOO.widget.NumericAxis=function(){YAHOO.widget.NumericAx is.superclass.constructor.call(this);};YAHOO.lang.extend(YAHOO.widget.NumericAxi s,YAHOO.widget.Axis,{type:"numeric",minimum:NaN,maximum:NaN,majorUnit:NaN,minorU nit:NaN,snapToUnits:true,stackingEnabled:false,alwaysShowZero:true,scale:"linear ",roundMajorUnit:true});YAHOO.widget.TimeAxis=function(){YAHOO.widget.TimeAxis.s uperclass.constructor.call(this);};YAHOO.lang.extend(YAHOO.widget.TimeAxis,YAHOO .widget.Axis,{type:"time",minimum:null,maximum:null,majorUnit:NaN,majorTimeUnit: null,minorUnit:NaN,minorTimeUnit:null,snapToUnits:true,stackingEnabled:false});Y AHOO.widget.CategoryAxis=function(){YAHOO.widget.CategoryAxis.superclass.constru ctor.call(this);};YAHOO.lang.extend(YAHOO.widget.CategoryAxis,YAHOO.widget.Axis, {type:"category",categoryNames:null,calculateCategoryCount:false});YAHOO.widget. Series=function(){};YAHOO.widget.Series.prototype={type:null,displayName:null};Y AHOO.widget.CartesianSeries=function(){YAHOO.widget.CartesianSeries.superclass.c onstructor.call(this);};YAHOO.lang.extend(YAHOO.widget.CartesianSeries,YAHOO.wid get.Series,{xField:null,yField:null});YAHOO.widget.ColumnSeries=function(){YAHOO .widget.ColumnSeries.superclass.constructor.call(this);};YAHOO.lang.extend(YAHOO .widget.ColumnSeries,YAHOO.widget.CartesianSeries,{type:"column"});YAHOO.widget. LineSeries=function(){YAHOO.widget.LineSeries.superclass.constructor.call(this); };YAHOO.lang.extend(YAHOO.widget.LineSeries,YAHOO.widget.CartesianSeries,{type:" line"});YAHOO.widget.BarSeries=function(){YAHOO.widget.BarSeries.superclass.cons tructor.call(this);};YAHOO.lang.extend(YAHOO.widget.BarSeries,YAHOO.widget.Carte sianSeries,{type:"bar"});YAHOO.widget.PieSeries=function(){YAHOO.widget.PieSerie s.superclass.constructor.call(this);};YAHOO.lang.extend(YAHOO.widget.PieSeries,Y AHOO.widget.Series,{type:"pie",dataField:null,categoryField:null,labelFunction:n ull});YAHOO.widget.StackedBarSeries=function(){YAHOO.widget.StackedBarSeries.sup erclass.constructor.call(this);};YAHOO.lang.extend(YAHOO.widget.StackedBarSeries ,YAHOO.widget.CartesianSeries,{type:"stackbar"});YAHOO.widget.StackedColumnSerie s=function(){YAHOO.widget.StackedColumnSeries.superclass.constructor.call(this); };YAHOO.lang.extend(YAHOO.widget.StackedColumnSeries,YAHOO.widget.CartesianSerie s,{type:"stackcolumn"});YAHOO.register("charts",YAHOO.widget.Chart,{version:"2.7 .0",build:"1799"});YAHOO.namespace("util");YAHOO.util.Cookie={_createCookieStrin g:function(B,D,C,A){var F=YAHOO.lang;var E=encodeURIComponent(B)+"="+(C?encodeUR IComponent(D):D);if(F.isObject(A)){if(A.expires instanceof Date){E+="; expires=" +A.expires.toGMTString();}if(F.isString(A.path)&&A.path!=""){E+="; path="+A.path ;}if(F.isString(A.domain)&&A.domain!=""){E+="; domain="+A.domain;}if(A.secure=== true){E+="; secure";}}return E;},_createCookieHashString:function(B){var D=YAHOO .lang;if(!D.isObject(B)){throw new TypeError("Cookie._createCookieHashString(): Argument must be an object.");}var C=new Array();for(var A in B){if(D.hasOwnProp erty(B,A)&&!D.isFunction(B[A])&&!D.isUndefined(B[A])){C.push(encodeURIComponent( A)+"="+encodeURIComponent(String(B[A])));}}return C.join("&");},_parseCookieHash :function(E){var D=E.split("&"),F=null,C=new Object();if(E.length>0){for(var B=0 ,A=D.length;B<A;B++){F=D[B].split("=");C[decodeURIComponent(F[0])]=decodeURIComp onent(F[1]);}}return C;},_parseCookieString:function(J,A){var K=new Object();if( YAHOO.lang.isString(J)&&J.length>0){var B=(A===false?function(L){return L;}:deco deURIComponent);if(/[^=]+=[^=;]?(?:; [^=]+=[^=]?)?/.test(J)){var H=J.split(/;\s/ g),I=null,C=null,E=null;for(var D=0,F=H.length;D<F;D++){E=H[D].match(/([^=]+)=/i );if(E instanceof Array){try{I=decodeURIComponent(E[1]);C=B(H[D].substring(E[1]. length+1));}catch(G){}}else{I=decodeURIComponent(H[D]);C=I;}K[I]=C;}}}return K;} ,get:function(A,B){var D=YAHOO.lang;var C=this._parseCookieString(document.cooki e);if(!D.isString(A)||A===""){throw new TypeError("Cookie.get(): Cookie name mus t be a non-empty string.");}if(D.isUndefined(C[A])){return null;}if(!D.isFunctio n(B)){return C[A];}else{return B(C[A]);}},getSub:function(A,C,B){var E=YAHOO.lan g;var D=this.getSubs(A);if(D!==null){if(!E.isString(C)||C===""){throw new TypeEr ror("Cookie.getSub(): Subcookie name must be a non-empty string.");}if(E.isUndef ined(D[C])){return null;}if(!E.isFunction(B)){return D[C];}else{return B(D[C]);} }else{return null;}},getSubs:function(A){if(!YAHOO.lang.isString(A)||A===""){thr ow new TypeError("Cookie.getSubs(): Cookie name must be a non-empty string.");}v ar B=this._parseCookieString(document.cookie,false);if(YAHOO.lang.isString(B[A]) ){return this._parseCookieHash(B[A]);}return null;},remove:function(B,A){if(!YAH OO.lang.isString(B)||B===""){throw new TypeError("Cookie.remove(): Cookie name m

ust be a non-empty string.");}A=A||{};A.expires=new Date(0);return this.set(B,"" ,A);},removeSub:function(B,D,A){if(!YAHOO.lang.isString(B)||B===""){throw new Ty peError("Cookie.removeSub(): Cookie name must be a non-empty string.");}if(!YAHO O.lang.isString(D)||D===""){throw new TypeError("Cookie.removeSub(): Subcookie n ame must be a non-empty string.");}var C=this.getSubs(B);if(YAHOO.lang.isObject( C)&&YAHOO.lang.hasOwnProperty(C,D)){delete C[D];return this.setSubs(B,C,A);}else {return"";}},set:function(B,C,A){var E=YAHOO.lang;if(!E.isString(B)){throw new T ypeError("Cookie.set(): Cookie name must be a string.");}if(E.isUndefined(C)){th row new TypeError("Cookie.set(): Value cannot be undefined.");}var D=this._creat eCookieString(B,C,true,A);document.cookie=D;return D;},setSub:function(B,D,C,A){ var F=YAHOO.lang;if(!F.isString(B)||B===""){throw new TypeError("Cookie.setSub() : Cookie name must be a non-empty string.");}if(!F.isString(D)||D===""){throw ne w TypeError("Cookie.setSub(): Subcookie name must be a non-empty string.");}if(F .isUndefined(C)){throw new TypeError("Cookie.setSub(): Subcookie value cannot be undefined.");}var E=this.getSubs(B);if(!F.isObject(E)){E=new Object();}E[D]=C;r eturn this.setSubs(B,E,A);},setSubs:function(B,C,A){var E=YAHOO.lang;if(!E.isStr ing(B)){throw new TypeError("Cookie.setSubs(): Cookie name must be a string.");} if(!E.isObject(C)){throw new TypeError("Cookie.setSubs(): Cookie value must be a n object.");}var D=this._createCookieString(B,this._createCookieHashString(C),fa lse,A);document.cookie=D;return D;}};YAHOO.register("cookie",YAHOO.util.Cookie,{ version:"2.7.0",build:"1799"});if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMg r=function(){var A=YAHOO.util.Event,B=YAHOO.util.Dom;return{useShim:false,_shimA ctive:false,_shimState:false,_debugShim:false,_createShim:function(){var C=docum ent.createElement("div");C.id="yui-ddm-shim";if(document.body.firstChild){docume nt.body.insertBefore(C,document.body.firstChild);}else{document.body.appendChild (C);}C.style.display="none";C.style.backgroundColor="red";C.style.position="abso lute";C.style.zIndex="99999";B.setStyle(C,"opacity","0");this._shim=C;A.on(C,"mo useup",this.handleMouseUp,this,true);A.on(C,"mousemove",this.handleMouseMove,thi s,true);A.on(window,"scroll",this._sizeShim,this,true);},_sizeShim:function(){if (this._shimActive){var C=this._shim;C.style.height=B.getDocumentHeight()+"px";C. style.width=B.getDocumentWidth()+"px";C.style.top="0";C.style.left="0";}},_activ ateShim:function(){if(this.useShim){if(!this._shim){this._createShim();}this._sh imActive=true;var C=this._shim,D="0";if(this._debugShim){D=".5";}B.setStyle(C,"o pacity",D);this._sizeShim();C.style.display="block";}},_deactivateShim:function( ){this._shim.style.display="none";this._shimActive=false;},_shim:null,ids:{},han dleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,st opPropagation:true,initialized:false,locked:false,interactionInfo:null,init:func tion(){this.initialized=true;},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_ex ecOnAll:function(E,D){for(var F in this.ids){for(var C in this.ids[F]){var G=thi s.ids[F][C];if(!this.isTypeOfDD(G)){continue;}G[E].apply(G,D);}}},_onLoad:functi on(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(docu ment,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUn load,this,true);A.on(window,"resize",this._onResize,this,true);},_onResize:funct ion(C){this._execOnAll("resetConstraints",[]);},lock:function(){this.locked=true ;},unlock:function(){this.locked=false;},isLocked:function(){return this.locked; },locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThr eshMet:false,clickTimeout:null,startX:0,startY:0,fromTimeout:false,regDragDrop:f unction(D,C){if(!this.initialized){this.init();}if(!this.ids[C]){this.ids[C]={}; }this.ids[C][D.id]=D;},removeDDFromGroup:function(E,C){if(!this.ids[C]){this.ids [C]={};}var D=this.ids[C];if(D&&D[E.id]){delete D[E.id];}},_remove:function(E){f or(var D in E.groups){if(D){var C=this.ids[D];if(C&&C[E.id]){delete C[E.id];}}}d elete this.handleIds[E.id];},regHandle:function(D,C){if(!this.handleIds[D]){this .handleIds[D]={};}this.handleIds[D][C]=C;},isDragDrop:function(C){return(this.ge tDDById(C))?true:false;},getRelated:function(H,D){var G=[];for(var F in H.groups ){for(var E in this.ids[F]){var C=this.ids[F][E];if(!this.isTypeOfDD(C)){continu e;}if(!D||C.isTarget){G[G.length]=C;}}}return G;},isLegalTarget:function(G,F){va r D=this.getRelated(G,true);for(var E=0,C=D.length;E<C;++E){if(D[E].id==F.id){re turn true;}}return false;},isTypeOfDD:function(C){return(C&&C.__ygDragDrop);},is Handle:function(D,C){return(this.handleIds[D]&&this.handleIds[D][C]);},getDDById :function(D){for(var C in this.ids){if(this.ids[C][D]){return this.ids[C][D];}}r

eturn null;},handleMouseDown:function(E,D){this.currentTarget=YAHOO.util.Event.g etTarget(E);this.dragCurrent=D;var C=D.getEl();this.startX=YAHOO.util.Event.getP ageX(E);this.startY=YAHOO.util.Event.getPageY(E);this.deltaX=this.startX-C.offse tLeft;this.deltaY=this.startY-C.offsetTop;this.dragThreshMet=false;this.clickTim eout=setTimeout(function(){var F=YAHOO.util.DDM;F.startDrag(F.startX,F.startY);F .fromTimeout=true;},this.clickTimeThresh);},startDrag:function(C,E){if(this.drag Current&&this.dragCurrent.useShim){this._shimState=this.useShim;this.useShim=tru e;}this._activateShim();clearTimeout(this.clickTimeout);var D=this.dragCurrent;i f(D&&D.events.b4StartDrag){D.b4StartDrag(C,E);D.fireEvent("b4StartDragEvent",{x: C,y:E});}if(D&&D.events.startDrag){D.startDrag(C,E);D.fireEvent("startDragEvent" ,{x:C,y:E});}this.dragThreshMet=true;},handleMouseUp:function(C){if(this.dragCur rent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){if(this.fromTimeout ){this.fromTimeout=false;this.handleMouseMove(C);}this.fromTimeout=false;this.fi reEvents(C,true);}else{}this.stopDrag(C);this.stopEvent(C);}},stopEvent:function (C){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(C);}if(this.preven tDefault){YAHOO.util.Event.preventDefault(C);}},stopDrag:function(E,D){var C=thi s.dragCurrent;if(C&&!D){if(this.dragThreshMet){if(C.events.b4EndDrag){C.b4EndDra g(E);C.fireEvent("b4EndDragEvent",{e:E});}if(C.events.endDrag){C.endDrag(E);C.fi reEvent("endDragEvent",{e:E});}}if(C.events.mouseUp){C.onMouseUp(E);C.fireEvent( "mouseUpEvent",{e:E});}}if(this._shimActive){this._deactivateShim();if(this.drag Current&&this.dragCurrent.useShim){this.useShim=this._shimState;this._shimState= false;}}this.dragCurrent=null;this.dragOvers={};},handleMouseMove:function(F){va r C=this.dragCurrent;if(C){if(YAHOO.util.Event.isIE&&!F.button){this.stopEvent(F );return this.handleMouseUp(F);}else{if(F.clientX<0||F.clientY<0){}}if(!this.dra gThreshMet){var E=Math.abs(this.startX-YAHOO.util.Event.getPageX(F));var D=Math. abs(this.startY-YAHOO.util.Event.getPageY(F));if(E>this.clickPixelThresh||D>this .clickPixelThresh){this.startDrag(this.startX,this.startY);}}if(this.dragThreshM et){if(C&&C.events.b4Drag){C.b4Drag(F);C.fireEvent("b4DragEvent",{e:F});}if(C&&C .events.drag){C.onDrag(F);C.fireEvent("dragEvent",{e:F});}if(C){this.fireEvents( F,false);}}this.stopEvent(F);}},fireEvents:function(V,L){var a=this.dragCurrent; if(!a||a.isLocked()||a.dragOnly){return;}var N=YAHOO.util.Event.getPageX(V),M=YA HOO.util.Event.getPageY(V),P=new YAHOO.util.Point(N,M),K=a.getTargetCoord(P.x,P. y),F=a.getDragEl(),E=["out","over","drop","enter"],U=new YAHOO.util.Region(K.y,K .x+F.offsetWidth,K.y+F.offsetHeight,K.x),I=[],D={},Q=[],c={outEvts:[],overEvts:[ ],dropEvts:[],enterEvts:[]};for(var S in this.dragOvers){var d=this.dragOvers[S] ;if(!this.isTypeOfDD(d)){continue;}if(!this.isOverTarget(P,d,this.mode,U)){c.out Evts.push(d);}I[S]=true;delete this.dragOvers[S];}for(var R in a.groups){if("str ing"!=typeof R){continue;}for(S in this.ids[R]){var G=this.ids[R][S];if(!this.is TypeOfDD(G)){continue;}if(G.isTarget&&!G.isLocked()&&G!=a){if(this.isOverTarget( P,G,this.mode,U)){D[R]=true;if(L){c.dropEvts.push(G);}else{if(!I[G.id]){c.enterE vts.push(G);}else{c.overEvts.push(G);}this.dragOvers[G.id]=G;}}}}}this.interacti onInfo={out:c.outEvts,enter:c.enterEvts,over:c.overEvts,drop:c.dropEvts,point:P, draggedRegion:U,sourceRegion:this.locationCache[a.id],validDrop:L};for(var C in D){Q.push(C);}if(L&&!c.dropEvts.length){this.interactionInfo.validDrop=false;if( a.events.invalidDrop){a.onInvalidDrop(V);a.fireEvent("invalidDropEvent",{e:V});} }for(S=0;S<E.length;S++){var Y=null;if(c[E[S]+"Evts"]){Y=c[E[S]+"Evts"];}if(Y&&Y .length){var H=E[S].charAt(0).toUpperCase()+E[S].substr(1),X="onDrag"+H,J="b4Dra g"+H,O="drag"+H+"Event",W="drag"+H;if(this.mode){if(a.events[J]){a[J](V,Y,Q);a.f ireEvent(J+"Event",{event:V,info:Y,group:Q});}if(a.events[W]){a[X](V,Y,Q);a.fire Event(O,{event:V,info:Y,group:Q});}}else{for(var Z=0,T=Y.length;Z<T;++Z){if(a.ev ents[J]){a[J](V,Y[Z].id,Q[0]);a.fireEvent(J+"Event",{event:V,info:Y[Z].id,group: Q[0]});}if(a.events[W]){a[X](V,Y[Z].id,Q[0]);a.fireEvent(O,{event:V,info:Y[Z].id ,group:Q[0]});}}}}}},getBestMatch:function(E){var G=null;var D=E.length;if(D==1) {G=E[0];}else{for(var F=0;F<D;++F){var C=E[F];if(this.mode==this.INTERSECT&&C.cu rsorIsOver){G=C;break;}else{if(!G||!G.overlap||(C.overlap&&G.overlap.getArea()<C .overlap.getArea())){G=C;}}}}return G;},refreshCache:function(D){var F=D||this.i ds;for(var C in F){if("string"!=typeof C){continue;}for(var E in this.ids[C]){va r G=this.ids[C][E];if(this.isTypeOfDD(G)){var H=this.getLocation(G);if(H){this.l ocationCache[G.id]=H;}else{delete this.locationCache[G.id];}}}}},verifyEl:functi on(D){try{if(D){var C=D.offsetParent;if(C){return true;}}}catch(E){}return false

;},getLocation:function(H){if(!this.isTypeOfDD(H)){return null;}var F=H.getEl(), K,E,D,M,L,N,C,J,G;try{K=YAHOO.util.Dom.getXY(F);}catch(I){}if(!K){return null;}E =K[0];D=E+F.offsetWidth;M=K[1];L=M+F.offsetHeight;N=M-H.padding[0];C=D+H.padding [1];J=L+H.padding[2];G=E-H.padding[3];return new YAHOO.util.Region(N,C,J,G);},is OverTarget:function(K,C,E,F){var G=this.locationCache[C.id];if(!G||!this.useCach e){G=this.getLocation(C);this.locationCache[C.id]=G;}if(!G){return false;}C.curs orIsOver=G.contains(K);var J=this.dragCurrent;if(!J||(!E&&!J.constrainX&&!J.cons trainY)){return C.cursorIsOver;}C.overlap=null;if(!F){var H=J.getTargetCoord(K.x ,K.y);var D=J.getDragEl();F=new YAHOO.util.Region(H.y,H.x+D.offsetWidth,H.y+D.of fsetHeight,H.x);}var I=F.intersect(G);if(I){C.overlap=I;return(E)?true:C.cursorI sOver;}else{return false;}},_onUnload:function(D,C){this.unregAll();},unregAll:f unction(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null;}this._exec OnAll("unreg",[]);this.ids={};},elementCache:{},getElWrapper:function(D){var C=t his.elementCache[D];if(!C||!C.el){C=this.elementCache[D]=new this.ElementWrapper (YAHOO.util.Dom.get(D));}return C;},getElement:function(C){return YAHOO.util.Dom .get(C);},getCss:function(D){var C=YAHOO.util.Dom.get(D);return(C)?C.style:null; },ElementWrapper:function(C){this.el=C||null;this.id=this.el&&C.id;this.css=this .el&&C.style;},getPosX:function(C){return YAHOO.util.Dom.getX(C);},getPosY:funct ion(C){return YAHOO.util.Dom.getY(C);},swapNode:function(E,C){if(E.swapNode){E.s wapNode(C);}else{var F=C.parentNode;var D=C.nextSibling;if(D==E){F.insertBefore( E,C);}else{if(C==E.nextSibling){F.insertBefore(C,E);}else{E.parentNode.replaceCh ild(C,E);F.insertBefore(E,D);}}}},getScroll:function(){var E,C,F=document.docume ntElement,D=document.body;if(F&&(F.scrollTop||F.scrollLeft)){E=F.scrollTop;C=F.s crollLeft;}else{if(D){E=D.scrollTop;C=D.scrollLeft;}else{}}return{top:E,left:C}; },getStyle:function(D,C){return YAHOO.util.Dom.getStyle(D,C);},getScrollTop:func tion(){return this.getScroll().top;},getScrollLeft:function(){return this.getScr oll().left;},moveToEl:function(C,E){var D=YAHOO.util.Dom.getXY(E);YAHOO.util.Dom .setXY(C,D);},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight ();},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth();},numeri cSort:function(D,C){return(D-C);},_timeoutCount:0,_addListeners:function(){var C =YAHOO.util.DDM;if(YAHOO.util.Event&&document){C._onLoad();}else{if(C._timeoutCo unt>2000){}else{setTimeout(C._addListeners,10);if(document&&document.body){C._ti meoutCount+=1;}}}},handleWasClicked:function(C,E){if(this.isHandle(E,C.id)){retu rn true;}else{var D=C.parentNode;while(D){if(this.isHandle(E,D.id)){return true; }else{D=D.parentNode;}}}return false;}};}();YAHOO.util.DDM=YAHOO.util.DragDropMg r;YAHOO.util.DDM._addListeners();}(function(){var A=YAHOO.util.Event;var B=YAHOO .util.Dom;YAHOO.util.DragDrop=function(E,C,D){if(E){this.init(E,C,D);}};YAHOO.ut il.DragDrop.prototype={events:null,on:function(){this.subscribe.apply(this,argum ents);},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:nul l,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,grou ps:null,locked:false,lock:function(){this.locked=true;},unlock:function(){this.l ocked=false;},isTarget:true,padding:null,dragOnly:false,useShim:false,_domRef:nu ll,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY :0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonO nly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b 4StartDrag:function(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag :function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:f unction(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:func tion(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:funct ion(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C) {},onMouseUp:function(C){},onAvailable:function(){},getEl:function(){if(!this._d omRef){this._domRef=B.get(this.id);}return this._domRef;},getDragEl:function(){r eturn B.get(this.dragElId);},init:function(F,C,D){this.initTarget(F,C,D);A.on(th is._domRef||this.id,"mousedown",this.handleMouseDown,this,true);for(var E in thi s.events){this.createEvent(E+"Event");}},initTarget:function(E,C,D){this.config= D||{};this.events={};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof E!=="strin g"){this._domRef=E;E=B.generateId(E);}this.id=E;this.addToGroup((C)?C:"default") ;this.handleElId=E;A.onAvailable(E,this.handleOnAvailable,this,true);this.setDra gElId(E);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHa ndleClasses=[];this.applyConfig();},applyConfig:function(){this.events={mouseDow

n:true,b4MouseDown:true,mouseUp:true,b4StartDrag:true,startDrag:true,b4EndDrag:t rue,endDrag:true,drag:true,b4Drag:true,invalidDrop:true,b4DragOut:true,dragOut:t rue,dragEnter:true,b4DragOver:true,dragOver:true,b4DragDrop:true,dragDrop:true}; if(this.config.events){for(var C in this.config.events){if(this.config.events[C] ===false){this.events[C]=false;}}}this.padding=this.config.padding||[0,0,0,0];th is.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.main tainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);this. dragOnly=((this.config.dragOnly===true)?true:false);this.useShim=((this.config.u seShim===true)?true:false);},handleOnAvailable:function(){this.available=true;th is.resetConstraints();this.onAvailable();},setPadding:function(E,C,F,D){if(!C&&0 !==C){this.padding=[E,E,E,E];}else{if(!F&&0!==F){this.padding=[E,C,E,C];}else{th is.padding=[E,C,F,D];}}},setInitPosition:function(F,E){var G=this.getEl();if(!th is.DDM.verifyEl(G)){if(G&&G.style&&(G.style.display=="none")){}else{}return;}var D=F||0;var C=E||0;var H=B.getXY(G);this.initPageX=H[0]-D;this.initPageY=H[1]-C; this.lastPageX=H[0];this.lastPageY=H[1];this.setStartPosition(H);},setStartPosit ion:function(D){var C=D||B.getXY(this.getEl());this.deltaSetXY=null;this.startPa geX=C[0];this.startPageY=C[1];},addToGroup:function(C){this.groups[C]=true;this. DDM.regDragDrop(this,C);},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C];}this.DDM.removeDDFromGroup(this,C);},setDragElId:function(C){thi s.dragElId=C;},setHandleElId:function(C){if(typeof C!=="string"){C=B.generateId( C);}this.handleElId=C;this.DDM.regHandle(this.id,C);},setOuterHandleElId:functio n(C){if(typeof C!=="string"){C=B.generateId(C);}A.on(C,"mousedown",this.handleMo useDown,this,true);this.setHandleElId(C);this.hasOuterHandles=true;},unreg:funct ion(){A.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=nu ll;this.DDM._remove(this);},isLocked:function(){return(this.DDM.isLocked()||this .locked);},handleMouseDown:function(J,I){var D=J.which||J.button;if(this.primary ButtonOnly&&D>1){return;}if(this.isLocked()){return;}var C=this.b4MouseDown(J),F =true;if(this.events.b4MouseDown){F=this.fireEvent("b4MouseDownEvent",J);}var E= this.onMouseDown(J),H=true;if(this.events.mouseDown){H=this.fireEvent("mouseDown Event",J);}if((C===false)||(E===false)||(F===false)||(H===false)){return;}this.D DM.refreshCache(this.groups);var G=new YAHOO.util.Point(A.getPageX(J),A.getPageY (J));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(G,this)){}else{if(this.cli ckValidator(J)){this.setStartPosition();this.DDM.handleMouseDown(J,this);this.DD M.stopEvent(J);}else{}}},clickValidator:function(D){var C=YAHOO.util.Event.getTa rget(D);return(this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.h andleWasClicked(C,this.id)));},getTargetCoord:function(E,D){var C=E-this.deltaX; var F=D-this.deltaY;if(this.constrainX){if(C<this.minX){C=this.minX;}if(C>this.m axX){C=this.maxX;}}if(this.constrainY){if(F<this.minY){F=this.minY;}if(F>this.ma xY){F=this.maxY;}}C=this.getTick(C,this.xTicks);F=this.getTick(F,this.yTicks);re turn{x:C,y:F};},addInvalidHandleType:function(C){var D=C.toUpperCase();this.inva lidHandleTypes[D]=D;},addInvalidHandleId:function(C){if(typeof C!=="string"){C=B .generateId(C);}this.invalidHandleIds[C]=C;},addInvalidHandleClass:function(C){t his.invalidHandleClasses.push(C);},removeInvalidHandleType:function(C){var D=C.t oUpperCase();delete this.invalidHandleTypes[D];},removeInvalidHandleId:function( C){if(typeof C!=="string"){C=B.generateId(C);}delete this.invalidHandleIds[C];}, removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.len gth;E<C;++E){if(this.invalidHandleClasses[E]==D){delete this.invalidHandleClasse s[E];}}},isValidHandleChild:function(F){var E=true;var H;try{H=F.nodeName.toUppe rCase();}catch(G){H=F.nodeName;}E=E&&!this.invalidHandleTypes[H];E=E&&!this.inva lidHandleIds[F.id];for(var D=0,C=this.invalidHandleClasses.length;E&&D<C;++D){E= !B.hasClass(F,this.invalidHandleClasses[D]);}return E;},setXTicks:function(F,C){ this.xTicks=[];this.xTickSize=C;var E={};for(var D=this.initPageX;D>=this.minX;D =D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}for(D=this.initPag eX;D<=this.maxX;D=D+C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}t his.xTicks.sort(this.DDM.numericSort);},setYTicks:function(F,C){this.yTicks=[];t his.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){ this.yTicks[this.yTicks.length]=D;E[D]=true;}}for(D=this.initPageY;D<=this.maxY; D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}this.yTicks.sort( this.DDM.numericSort);},setXConstraint:function(E,D,C){this.leftConstraint=parse Int(E,10);this.rightConstraint=parseInt(D,10);this.minX=this.initPageX-this.left

Constraint;this.maxX=this.initPageX+this.rightConstraint;if(C){this.setXTicks(th is.initPageX,C);}this.constrainX=true;},clearConstraints:function(){this.constra inX=false;this.constrainY=false;this.clearTicks();},clearTicks:function(){this.x Ticks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0;},setYConstraint:f unction(C,E,D){this.topConstraint=parseInt(C,10);this.bottomConstraint=parseInt( E,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this. bottomConstraint;if(D){this.setYTicks(this.initPageY,D);}this.constrainY=true;}, resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.m aintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this. lastPageY-this.initPageY:0;this.setInitPosition(D,C);}else{this.setInitPosition( );}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstra int,this.xTickSize);}if(this.constrainY){this.setYConstraint(this.topConstraint, this.bottomConstraint,this.yTickSize);}},getTick:function(I,F){if(!F){return I;} else{if(F[0]>=I){return F[0];}else{for(var D=0,C=F.length;D<C;++D){var E=D+1;if( F[E]&&F[E]>=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E];}}return F[F.leng th-1];}}},toString:function(){return("DragDrop "+this.id);}};YAHOO.augment(YAHOO .util.DragDrop,YAHOO.util.EventProvider);})();YAHOO.util.DD=function(C,A,B){if(C ){this.init(C,A,B);}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:tru e,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this. setDelta(A,D);},setDelta:function(B,A){this.deltaX=B;this.deltaY=A;},setDragElPo s:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B);},alignElWit hMouse:function(C,G,F){var E=this.getTargetCoord(G,F);if(!this.deltaSetXY){var H =[E.x,E.y];YAHOO.util.Dom.setXY(C,H);var D=parseInt(YAHOO.util.Dom.getStyle(C,"l eft"),10);var B=parseInt(YAHOO.util.Dom.getStyle(C,"top"),10);this.deltaSetXY=[D -E.x,B-E.y];}else{YAHOO.util.Dom.setStyle(C,"left",(E.x+this.deltaSetXY[0])+"px" );YAHOO.util.Dom.setStyle(C,"top",(E.y+this.deltaSetXY[1])+"px");}this.cachePosi tion(E.x,E.y);var A=this;setTimeout(function(){A.autoScroll.call(A,E.x,E.y,C.off setHeight,C.offsetWidth);},0);},cachePosition:function(B,A){if(B){this.lastPageX =B;this.lastPageY=A;}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPage X=C[0];this.lastPageY=C[1];}},autoScroll:function(J,I,E,K){if(this.scroll){var L =this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getSc rollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.d eltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G<C ){window.scrollTo(D,N+A);}if(I<N&&N>0&&I-N<C){window.scrollTo(D,N-A);}if(M>B&&F< C){window.scrollTo(D+A,N);}if(J<D&&D>0&&J-D<C){window.scrollTo(D-A,N);}}},applyC onfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(th is.config.scroll!==false);},b4MouseDown:function(A){this.setStartPosition();this .autoOffset(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},b4Drag: function(A){this.setDragElPos(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getP ageY(A));},toString:function(){return("DD "+this.id);}});YAHOO.util.DDProxy=func tion(C,A,B){if(C){this.init(C,A,B);this.initFrame();}};YAHOO.util.DDProxy.dragEl Id="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,ce nterFrame:false,createFrame:function(){var B=this,A=document.body;if(!A||!A.firs tChild){setTimeout(function(){B.createFrame();},50);return;}var F=this.getDragEl (),E=YAHOO.util.Dom;if(!F){F=document.createElement("div");F.id=this.dragElId;va r D=F.style;D.position="absolute";D.visibility="hidden";D.cursor="move";D.border ="2px solid #aaa";D.zIndex=999;D.height="25px";D.width="25px";var C=document.cre ateElement("div");E.setStyle(C,"height","100%");E.setStyle(C,"width","100%");E.s etStyle(C,"background-color","#ccc");E.setStyle(C,"opacity","0");F.appendChild(C );A.insertBefore(F,A.firstChild);}},initFrame:function(){this.createFrame();},ap plyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.r esizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.cente rFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId);},sh owFrame:function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;th is._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width ,10)/2),Math.round(parseInt(B.height,10)/2));}this.setDragElPos(E,D);YAHOO.util. Dom.setStyle(A,"visibility","visible");},_resizeProxy:function(){if(this.resizeF rame){var H=YAHOO.util.Dom;var B=this.getEl();var C=this.getDragEl();var G=parse Int(H.getStyle(C,"borderTopWidth"),10);var I=parseInt(H.getStyle(C,"borderRightW idth"),10);var F=parseInt(H.getStyle(C,"borderBottomWidth"),10);var D=parseInt(H

.getStyle(C,"borderLeftWidth"),10);if(isNaN(G)){G=0;}if(isNaN(I)){I=0;}if(isNaN( F)){F=0;}if(isNaN(D)){D=0;}var E=Math.max(0,B.offsetWidth-I-D);var A=Math.max(0, B.offsetHeight-G-F);H.setStyle(C,"width",E+"px");H.setStyle(C,"height",A+"px");} },b4MouseDown:function(B){this.setStartPosition();var A=YAHOO.util.Event.getPage X(B);var C=YAHOO.util.Event.getPageY(B);this.autoOffset(A,C);},b4StartDrag:funct ion(A,B){this.showFrame(A,B);},b4EndDrag:function(A){YAHOO.util.Dom.setStyle(thi s.getDragEl(),"visibility","hidden");},endDrag:function(D){var C=YAHOO.util.Dom; var B=this.getEl();var A=this.getDragEl();C.setStyle(A,"visibility","");C.setSty le(B,"visibility","hidden");YAHOO.util.DDM.moveToEl(B,A);C.setStyle(A,"visibilit y","hidden");C.setStyle(B,"visibility","");},toString:function(){return("DDProxy "+this.id);}});YAHOO.util.DDTarget=function(C,A,B){if(C){this.initTarget(C,A,B) ;}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){re turn("DDTarget "+this.id);}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{ version:"2.7.0",build:"1799"});YAHOO.namespace("Updates").Disclosure=function(){ var i="/updates-status/";var f=100;var A=function(C,B){var D=document.createElem ent(C);for(var d in B){if(d=="innerHTML"){D.innerHTML=B[d]}else{if(B[d]&&YAHOO.l ang.hasOwnProperty(B,d)){D.setAttribute(d,B[d])}}}return D};var p=function(C,d){ var B=document.getElementsByTagName("head")[0];var D=A(C,d);B.appendChild(D);ret urn D};var g=function(d,B){return d.indexOf("http")===0||B===false?p("link",{typ e:"text/css",charset:"utf-8",rel:"stylesheet",href:d}):p("style",{type:"text/css ",innerHTML:d})};var t=function(d,B){return d.indexOf("http")===0||B===false?p(" script",{type:"text/javascript",charset:"utf-8",src:d}):p("script",{type:"text/j avascript",charset:"utf-8",innerHTML:d})};var v=function(B,d){var C=B.getElement sByTagName(d);if(C.length&&C[0].firstChild){C=C[0].firstChild.nodeValue}else{C=f alse}return C};var x;var o=function(){return x};var r=function(){if(x){x.destroy ();x=null}};var e=function(C,d){var B=YAHOO.util.Dom,D=h();B.setStyle(D,"display ","block");B.setStyle(D,"left",d[0]+"px");B.setStyle(D,"top",d[1]+"px");B.setSty le(D,"zIndex",(C.cfg.getProperty("zIndex")+2))};var q=function(U){var V=false,T= '<div class="disc-ov-msg">'+U.message+'</div> <div class="disc-ov-mng"><a href=" '+U.manageURL+'">'+U.manageTxt+"</a></div>",D=U.syndication,X="",O=false,E="";va r M=YAHOO.util.Event,N=YAHOO.util.Dom,C=YAHOO.widget.Overlay,L=[];for(var Q=0,P= D.length,J=0;Q<P;Q++){var W=D[Q],K="ov_disc_bcst_img_"+W.destination;if((W.statu s==="ENABLED")&&(W.destination!=f||W.constraint!="PRIVATE")){V=true;var B="ov_di sc_tooltip_"+K;var d=new C(B,{visible:false,modal:true});d.setBody('<div class=" disc-tooltip"><div>'+W.iconTxt+"</div></div>");d.render(document.body);L[J]=d;J+ +;var S;var F=(function(){var Y=d;var Z=K;return function(){if(S){S.cancel()}for (var ad=0,ab=L.length;ad<ab;ad++){if(typeof(L[ad])!=="undefined"){var af=L[ad];i f(Y!=af){af.hide()}}}var ae=N.get(Z),ac=N.getRegion(ae),aa=[(ac.left-20),(ac.bot tom+8)];N.setStyle(Y.element,"left",aa[0]+"px");N.setStyle(Y.element,"top",aa[1] +"px");Y.cfg.setProperty("zIndex",(N.getStyle("yup-dialog_c","zIndex")+2));e(Y,[ ac.left,ac.bottom]);Y.show()}})();M.addListener(K,"mouseover",F);M.addListener(B ,"mouseover",F);var H=(function(){var Y=d;return function(){S=YAHOO.lang.later(1 ,Y,function(){N.setStyle(h(),"display","none");Y.hide()})}})();M.addListener(K," mouseout",H);M.addListener(B,"mouseout",H);var R='<img src="'+W.iconURL+'" id="' +K+'" alt="'+W.iconTxt+'" />';X+=R}else{if(W.status==="UNLINKED"){O=true;var I=" ov_disc_upsell_link_"+W.destination,R='<div id="'+K+'"> <img src="'+W.iconURL+'" alt="'+W.iconTxt+'" /><a href="#" id="'+I+'">'+W.linkTxt+"</a></div>";E+=R;M.ad dListener(I,"click",function(){var Y=W.linkURL;return function(Z){u();YAHOO.util .Connect.asyncRequest("POST",i,{success:k,argument:U},"initRestApiUrl="+Y+"&dest Id="+W.destination+"&lang="+U.lang+"&"+U.crumbName+"="+U.crumb)}}())}}}var G=""; if(V){var R='<div class="ebcstrs_c">'+T+'<div class="ebcstrs">'+X+"</div> </div> ";G+=R}if(O){var R='<div class="unbcstrs_c">'+E+"</div>";G+=R}return G};var y=fu nction(B){if(!YAHOO.lang.isObject(B)||!B.source||!B.container||(!B.response&&!B. type)){return false}var F=function(L){r();if(!L&&B.response){var N=B.response}el se{var N=YAHOO.lang.JSON.parse(L.responseText)}var M=N.disclosure||false;if(!YAH OO.lang.isString(M)||(M.toLowerCase()!="show"&&M.toLowerCase()!="showchecked")){ return 0}if(N.global_optout=="1"){return}var G=N.syndication,I=false,T;for(var O =0,K=G.length;O<K;O++){T=G[O];if((T.status==="ENABLED")&&(T.destination!=f||T.co nstraint!="PRIVATE")){I=true}}if(!I){return}if(N.style){g(N.style)}var J=YAHOO.u til.Dom;J.addClass(document.body,"yui-skin-sam");var H=function(){this.submit()}

;x=new YAHOO.widget.SimpleDialog("yup-dialog",{width:"400px",underlay:"shadow",m odal:true,fixedcenter:true,close:true,postmethod:"async",visible:false,draggable :false,monitorresize:false,constraintoviewport:true,zIndex:2000000001,buttons:[{ text:N.button,handler:H,isDefault:false}]});if(B.events){for(var R in B.events){ if(x[R]&&x[R].subscribe){var S=B.events[R];x[R].subscribe(S.fn,S.obj||x,S.scope) }}}x.setHeader(N.loc_localizedName);var P="";var V='<div class="result">'+N.resu lt+"</div>";P+=V;P+=q(N);x.setBody(P);x.render(B.container);var Q=A("form",{id:" yup-show",action:i,method:"POST"});var U=(M.toLowerCase()=="showchecked")?'"chec ked=checked"':"";Q.innerHTML=['<input type="checkbox" id="yup_ov_disc_option" '+ U,' name="yup_ov_disc_option" >','<label for="yup_ov_disc_option">'+N.prompt+"</ label>",'<input type="hidden" name="source" value="'+B.source+'">','<input type= "hidden" name="'+N.crumb_name+'" value="'+N.crumb+'">','<input type="hidden" nam e="ov_disc_form" value="submitForm">'].join("");x.appendToBody(Q);x.form.parentN ode.replaceChild(Q,x.form);x.form=Q;if(M.toLowerCase()=="showchecked"){document. getElementById("yup_ov_disc_option").checked=true}x.show();if(N.script){t(N.scri pt)}};var E=function(){YAHOO.util.Connect.asyncRequest("POST",i,{success:F},"sou rce="+B.source+"&type="+B.type+"&lang="+(B.lang||"en-US")+"&get_disc=true&format =xml")};var D=B.yuiBasePath||"yui/2.6.0/build/",d="http://l.yimg.com/d/combo?";v ar C=function(G){var I=YAHOO.env.modules.connection?true:false,K=YAHOO.env.modul es.json?true:false,J=YAHOO.env.modules.container?true:false;if(I&&J){if(B.respon se){F()}else{E()}}else{if(!G){if(!J){g(d+D+"container/assets/skins/sam/container .css")}var H="";H+=K?"":(H?"&":"")+D+"json/json-min.js";H+=I?"":(H?"&":"")+D+"co nnection/connection-min.js";H+=J?"":(H?"&":"")+D+"container/container-min.js";t( d+H)}setTimeout(function(){C(true)},100)}};if(typeof B.resolveDependencies==="un defined"||B.resolveDependencies){C()}};var l,n={"450":"http://l.yimg.com/kx/ds/h tml/error_450.html","424":"http://l.yimg.com/kx/ds/html/error_424.html"};var u=f unction(){l=window.open("","disclosures_auth_flow","modal=yes,width=804,height=5 07")};var w=function(B,E){var D=YAHOO.lang.JSON.parse(B.responseText),d=B.argume nt;if(D.errorCode){if(n[D.errorCode]){l.location=n[D.errorCode]+"?lang="+d.lang} else{l.location=n["424"]+"?lang="+d.lang}}else{if(D.results&&D.results.authorize URL){var G=D.results.authorizeURL;l.location=G;var C=500;var F=YAHOO.lang.later( C,null,function(){if(l.closed){F.cancel();YAHOO.lang.later(250,this,a.updateAllI nstances);a.executePostLinkCallbacks()}},null,true)}else{l.location=n["424"]+"?l ang="+d.lang}}l.focus()};var k=function(d){w(d,true)};var h=function(){return YA HOO.util.Dom.getElementsByClassName("disc-tooltip-knob","div")[0]};var j=functio n(G,H){var C=YAHOO.util.Event,D=YAHOO.util.Dom,d=YAHOO.widget.Overlay,E=YAHOO.ut il.connect,J=G.inlinePermInfo;var I=new d(J.ovlyId,{context:[G.imageId,"tl","bl" ]});I.render(J.conId);var F=function(K){D.removeClass(J.ovlyId,"disc-hide");I.sh ow();I.align("tl","bl");C.addListener(document,"click",B);C.stopEvent(K)};var B= function(){I.hide();C.removeListener(document,"click",B)};C.addListener(J.actId, "click",F);C.addListener(J.evId,"click",function(){YAHOO.util.Connect.asyncReque st("POST",i,{success:function(){D.addClass(J.evId,"selected");D.removeClass(J.co nnId,"selected");B();D.get(G.inputId).checked=true;a.syncOtherInstances(H.id)}}, "source="+H.source+"&type="+H.type+"&mod_synd_cons=PUB&dest=100&"+H.crumbName+"= "+H.crumb)});C.addListener(J.connId,"click",function(){YAHOO.util.Connect.asyncR equest("POST",i,{success:function(){D.addClass(J.connId,"selected");D.removeClas s(J.evId,"selected");B();D.get(G.inputId).checked=true;a.syncOtherInstances(H.id )}},"source="+H.source+"&type="+H.type+"&mod_synd_cons=CXN&dest=100&"+H.crumbNam e+"="+H.crumb)})};var s=function(D){var I=D,E=YAHOO.util.Event,F=YAHOO.util.Dom, C=YAHOO.widget.Overlay,K=I.destinations,O=[];for(var H=0,G=K.length;H<G;H++){var L=K[H];var B="disc_tooltip_"+L.imageId,J=new C(B,{visible:false});J.setBody('<d iv class="disc-tooltip"><div>'+L.ttTxt+"</div></div>");J.render(document.body);O [H]=J;var N;var P=(function(){var d=J;var Q=L.imageId;return function(){if(N){N. cancel()}for(var U=0,S=O.length;U<S;U++){var W=O[U];if(d!=W){W.hide()}}var V=F.g et(Q),T=F.getRegion(V),R=[(T.left-20),(T.bottom+8)];F.setStyle(d.element,"left", R[0]+"px");F.setStyle(d.element,"top",R[1]+"px");e(d,[T.left,T.bottom]);d.show() }})();E.addListener(L.imageId,"mouseover",P);E.addListener(B,"mouseover",P);var M=(function(){var d=J;return function(){N=YAHOO.lang.later(1,d,function(){F.setS tyle(h(),"display","none");d.hide()})}})();E.addListener(L.imageId,"mouseout",M) ;E.addListener(B,"mouseout",M);if(L.state==="ENABLED"||L.state==="DISABLED"){E.a

ddListener(L.inputId,"click",function(){var d=L;return function(V){var S=functio n(){a.syncOtherInstances(I.id)};if(d.dest==f){var T=this,U=T.checked?"PUB":"PRIV ATE",R=d.inlinePermInfo;S=function(){if(T.checked){F.addClass(R.evId,"selected") ;F.removeClass(R.connId,"selected")}else{F.removeClass(R.evId,"selected");F.remo veClass(R.connId,"selected")}a.syncOtherInstances(I.id)};YAHOO.util.Connect.asyn cRequest("POST",i,{success:S},"source="+I.source+"&type="+I.type+"&mod_synd_cons ="+U+"&dest="+d.dest+"&"+I.crumbName+"="+I.crumb)}else{var Q=this.checked?"ENABL ED":"DISABLED";YAHOO.util.Connect.asyncRequest("POST",i,{success:S},"source="+I. source+"&type="+I.type+"&mod_synd_stat="+Q+"&dest="+d.dest+"&"+I.crumbName+"="+I .crumb)}}}())}if(L.state==="UNLINKED"){E.addListener(L.upsellLinkId,"click",func tion(){var d=L.initEndPoint;var Q=L.dest;return function(R){u();YAHOO.util.Conne ct.asyncRequest("POST",i,{success:w,argument:I},"initRestApiUrl="+d+"&"+I.crumbN ame+"="+I.crumb+"&destId="+Q+"&lang="+I.lang)}}());E.addListener(L.upsellLinkId, "mouseover",P);E.addListener(L.upsellLinkId,"mouseout",M)}if(L.dest==f){j(L,I)}} };var z=false,b=false;var c=function(d){var E=YAHOO.env.modules.connection?true: false,G=YAHOO.env.modules.json?true:false,F=YAHOO.env.modules.container?true:fal se;if(E&&G&&F){d()}else{if(!z){var C="yui/2.6.0/build/",B="http://l.yimg.com/d/c ombo?";if(!F){g(B+C+"container/assets/skins/sam/container.css")}var D="";D+=E?"" :(D?"&":"")+C+"connection/connection-min.js";D+=G?"":(D?"&":"")+C+"json/json-min .js";D+=F?"":(D?"&":"")+C+"container/container-min.js";t(B+D);z=true}setTimeout( function(){c.call(null,d)},100)}};var m=function(){if(!YAHOO.Updates||!YAHOO.Upd ates.DiscConfig){return}c(function(){YAHOO.util.Dom.addClass(document.body,"yuiskin-sam");var B=YAHOO.Updates.DiscConfig;for(var C in B){if(YAHOO.lang.hasOwnPr operty(B,C)){var d=YAHOO.Updates.DiscConfig[C];a.initRenderedInstance(d)}}})};YA HOO.util.Event.addListener(window,"load",m);var a=function(){var d=[];var C=[];v ar G=function(J){C[C.length]=J};var H=function(){var L,K,J;for(L=0,K=C.length;L< K;L++){J=C[L];if(typeof(J.fn)=="function"){J.fn.call(J.scope,J.obj)}}};var E=fun ction(J){c(function(){var K=YAHOO.lang.JSON.parse(J);d[d.length]=K;s(K)})};var B =function(){};var I=function(K){var J=function(N){var P=YAHOO.lang.JSON.parse(N. responseText),M=YAHOO.util.Dom,Q=M.get(K.containerId),L=YAHOO.lang.JSON.parse(P. js_config);var O=M.getAncestorByTagName(Q,"div");O.innerHTML=P.html;s(L)};YAHOO. util.Connect.asyncRequest("POST",i,{success:J},"fetchInlineMarkupAndConfig=true& source="+K.source+"&type="+K.type+"&lang="+K.lang+"&id="+K.id+"&"+K.crumbName+"= "+K.crumb)};var F=function(){for(var K=0,J=d.length;K<J;K++){I(d[K])}};var D=fun ction(M){for(var K=0,J=d.length;K<J;K++){var L=d[K];if(L.id!=M){I(L)}}};return{i nitRenderedInstance:E,syncOtherInstances:D,updateAllInstances:F,addInstance:B,re gisterPostLinkCallback:G,executePostLinkCallbacks:H}}();return{manager:a,showDia log:y,getDialog:o,destroyDialog:r,getXmlNodeValue:v,createNode:A,addCss:g,addJs: t,version:1}}();YAHOO.namespace('YAHOO.EU.widget.Carousel');YAHOO.EU.widget.Caro usel=function(){return this;};YAHOO.EU.widget.Carousel.prototype={init:function( el,oConfig){this.oConfig=oConfig;this.sTag=oConfig.tag||"ul";this.nVisiblePanes= oConfig.visiblePanes||1;this.nPanesToMove=oConfig.panesToMove||this.nVisiblePane s;this.bHorizontal=!oConfig.isVertical;this.bLoop=oConfig.loop||0;this.oCont=YAH OO.util.Dom.get(el);this.oClip=YAHOO.util.Dom.getElementsByClassName('clip','div ',this.oCont)[0];this.oPanel=this.oCont.getElementsByTagName(this.sTag)[0];this. oButtonCont=oConfig.buttonCont||this.oCont;this.nCurrentPane=0;YAHOO.util.Dom.ad dClass(this.oCont,"js");YAHOO.util.Dom.addClass(this.oCont,(this.bHorizontal)?"h orz":"vert");this.assignElements();YAHOO.util.Dom.setStyle(this.oClip,"overflow" ,"hidden");YAHOO.util.Dom.setStyle(this.oClip,"clip","rect(0 "+this.oCont.offset Width+"px "+this.oCont.offsetHeight+"px 0)");this.createNav();this.createEvents( );this.onAnimStart.fire();return this;},assignElements:function(){var oPanel=thi s.oPanel;this.aPanels=YAHOO.util.Dom.getElementsBy(function(o){if(o.parentNode== oPanel){return true;} return false;},"li",this.oPanel);var nPadding=this.getPadding(this.aPanels[0]);v ar nPaddingCont=this.getPadding(this.oCont);this.nMoveInc=Math.floor((this.bHori zontal)?(this.oCont.offsetWidth-nPaddingCont)/this.nVisiblePanes:(this.oCont.off setHeight-nPaddingCont)/this.nVisiblePanes)-nPadding;for(var i=0,j=this.aPanels. length;i<j;i++){if(this.bHorizontal){this.aPanels[i].style.width=this.nMoveInc+" px";}else{this.aPanels[i].style.height=this.nMoveInc+"px";}} this.nMoveInc+=nPadding;this.nPanes=this.aPanels.length;},getPadding:function(o)

{return(this.bHorizontal)?(parseInt(YAHOO.util.Dom.getStyle(o,"paddingRight"))+p arseInt(YAHOO.util.Dom.getStyle(o,"paddingLeft"))+parseInt(YAHOO.util.Dom.getSty le(o,"borderRightWidth").replace("medium",0))+parseInt(YAHOO.util.Dom.getStyle(o ,"borderLeftWidth").replace("medium",0))):(parseInt(YAHOO.util.Dom.getStyle(o,"p addingBottom"))+parseInt(YAHOO.util.Dom.getStyle(o,"paddingTop"))+parseInt(YAHOO .util.Dom.getStyle(o,"borderTopWidth").replace("medium",0))+parseInt(YAHOO.util. Dom.getStyle(o,"borderBottomWidth").replace("medium",0)));},createNav:function() {this.oButtonCont=YAHOO.util.Dom.get(this.oButtonCont);this.oBtnPrev=document.cr eateElement("button");YAHOO.util.Dom.addClass(this.oBtnPrev,"btnprev");this.oBtn Prev.appendChild(document.createTextNode("Previous"));this.oButtonCont.appendChi ld(this.oBtnPrev);this.oBtnNext=document.createElement("button");YAHOO.util.Dom. addClass(this.oBtnNext,"btnnext");this.oBtnNext.appendChild(document.createTextN ode("Next"));this.oButtonCont.appendChild(this.oBtnNext);},createEvents:function (){this.onAnimStart=new YAHOO.util.CustomEvent("onAnimStart");this.onAnimEnd=new YAHOO.util.CustomEvent("onAnimEnd");this.onNavigate=new YAHOO.util.CustomEvent( "onNavigate");this.onCarouselEnd=new YAHOO.util.CustomEvent("onCarouselEnd");thi s.onAnimStart.subscribe(this.enableButtons,this,true);this.onAnimEnd.subscribe(t his.enableButtons,this,true);YAHOO.util.Event.on(this.oBtnPrev,'click',function( e){this.moveBy(e,-1);},this,true);YAHOO.util.Event.on(this.oBtnNext,'click',func tion(e){this.moveBy(e,1);},this,true);},enableButtons:function(){this.oBtnPrev.d isabled=false;this.oBtnNext.disabled=false;YAHOO.util.Dom.removeClass(this.oBtnP rev,"btnprevdisabled");YAHOO.util.Dom.removeClass(this.oBtnNext,"btnnextdisabled ");if((!this.nCurrentPane&&!this.bLoop)||this.nVisiblePanes>this.nPanes){YAHOO.u til.Dom.addClass(this.oBtnPrev,"btnprevdisabled");this.oBtnPrev.disabled=true;th is.oBtnNext.disabled=false;} if((this.nCurrentPane>=this.nPanes-this.nVisiblePanes&&!this.bLoop)||(this.bLoop &&this.nVisiblePanes>this.nPanes)){YAHOO.util.Dom.addClass(this.oBtnNext,"btnnex tdisabled");this.oBtnPrev.disabled=false;this.oBtnNext.disabled=true;}},moveBy:f unction(e,nPanes){if(e){YAHOO.util.Event.preventDefault(e);this.onNavigate.fire( );} this.nCurrentPane+=nPanes*this.nPanesToMove;if(this.nCurrentPane+this.nVisiblePa nes-this.nPanesToMove>=this.nPanes){if(this.bLoop){this.nCurrentPane=0;} this.onCarouselEnd.fire();}else if(this.nCurrentPane<=-this.nPanesToMove){if(thi s.bLoop){this.nCurrentPane=this.nPanes+(nPanes*this.nPanesToMove);} this.onCarouselEnd.fire();} this.gotoPane(this.nCurrentPane);},gotoPane:function(nPane){if(nPane<0){nPane=0; } if(nPane>this.nPanes-this.nVisiblePanes){nPane=this.nPanes-this.nVisiblePanes;} this.nCurrentPane=nPane;var oAnim=new YAHOO.util.Anim(this.oPanel,(this.bHorizon tal)?{left:{to:-this.nMoveInc*nPane}}:{top:{to:-this.nMoveInc*nPane}},this.oConf ig.animDuration||0.5,this.oConfig.easing||YAHOO.util.Easing.easeBoth);var onAnim End=function(type,args){this.onAnimEnd.fire();};oAnim.onComplete.subscribe(onAni mEnd,this,true);this.onAnimStart.fire();oAnim.animate();}};YAHOO.EU.widget.Carou sel.prototype.autoPlay=function(oConfig){var self=this;if(oConfig){this.oAutoCon fig=oConfig;this.oBtnPause=document.createElement("button");YAHOO.util.Dom.addCl ass(this.oBtnPause,"btnpause");this.oBtnPause.appendChild(document.createTextNod e(this.oAutoConfig.buttonLabel));this.oButtonCont.appendChild(this.oBtnPause);YA HOO.util.Event.on(this.oBtnPause,'click',this.pause,this,true);this.onNavigate.s ubscribe(function(){this.pause(true);},this,true);} this.bPaused=0;YAHOO.util.Dom.removeClass(this.oBtnPause,"btnpausedisabled");thi s.oTimer=window.setInterval(function(){self.moveBy(null,1);},this.oAutoConfig.au toPlayDelay||5000);return this;};YAHOO.EU.widget.Carousel.prototype.pause=functi on(e){if(e&&e!==true){YAHOO.util.Event.preventDefault(e);if(this.bPaused){this.m oveBy(null,1);return this.autoPlay();}} this.bPaused=1;YAHOO.util.Dom.addClass(this.oBtnPause,"btnpausedisabled");clearT imeout(this.oTimer);};YAHOO.EU.widget.Carousel.prototype.enableCheckForUpdates=f unction(oConfig){var self=this;this.oLoadConfig=oConfig;this.nMaxItems=oConfig.m axItems;this.oLoadTimer=window.setInterval(function(){self.checkForUpdates();},t his.oLoadConfig.checkDelay||10000);this.onContentChange=new YAHOO.util.CustomEve nt("onContentChange");return this;};YAHOO.EU.widget.Carousel.prototype.checkForU

pdates=function(){YAHOO.util.Connect.asyncRequest("GET",this.oLoadConfig.url,{su ccess:this.checkedForUpdates,scope:this});};YAHOO.EU.widget.Carousel.prototype.c heckedForUpdates=function(oResponse){var re=/[\S]/g;if(!re.test(oResponse.respon seText)){return;} var sCurrentHTML=this.oPanel.innerHTML;this.oPanel.innerHTML=oResponse.responseT ext;this.assignElements();this.gotoPane(0);this.enableButtons();if(this.oPanel.i nnerHTML!=sCurrentHTML){this.onContentChange.fire();}};YAHOO.EU.widget.Carousel. prototype.paginate=function(){var oUL=document.createElement("ul");YAHOO.util.Do m.addClass(oUL,"pagination");this.updatePagination=function(){for(i=0,j=this.aPa ge.length;i<j;i++){if(i===Math.ceil(this.nCurrentPane/this.nPanesToMove)){YAHOO. util.Dom.addClass(this.aPage[i],"current");this.aPage[i].getElementsByTagName("b utton")[0].disabled=true;}else{YAHOO.util.Dom.removeClass(this.aPage[i],"current ");this.aPage[i].getElementsByTagName("button")[0].disabled=false;}}};for(i=0,j= Math.ceil((this.nPanes-this.nVisiblePanes)/this.nPanesToMove)+1;i<j;i++){var oLI =document.createElement("li");var oB=document.createElement("button");oB.appendC hild(document.createTextNode(i+1));oLI.appendChild(oB);oUL.appendChild(oLI);} this.aPage=YAHOO.util.Dom.getElementsBy(function(o){if(o.parentNode===oUL){retur n true;} return false;},"li",oUL);YAHOO.util.Event.on(oUL,"click",function(e){this.onNavi gate.fire();this.gotoPane((YAHOO.util.Event.getTarget(e).firstChild.nodeValue-1) *this.nPanesToMove);YAHOO.util.Event.preventDefault(e);},this,true);this.updateP agination();this.onAnimStart.subscribe(this.updatePagination,this,true);this.oBu ttonCont.appendChild(oUL);return this;};YAHOO.EU.widget.Carousel.prototype.infin iteScroll=function(){this.moveBy=function(e,nPanes){if(this.bActive){return;} if(e){YAHOO.util.Event.preventDefault(e);this.onNavigate.fire();} this.nCurrentPane+=nPanes*this.nPanesToMove;if(this.nCurrentPane+this.nVisiblePa nes-this.nPanesToMove>=this.nPanes){this.nCurrentPane=0;this.onCarouselEnd.fire( );}else if(this.nCurrentPane<=-this.nPanesToMove){return this.nCurrentPane=0;} this.gotoPane(this.nCurrentPane);};for(var i=0;i<this.nVisiblePanes;i++){this.oC lone=this.oPanel.getElementsByTagName("li")[i].cloneNode(true);this.oPanel.appen dChild(this.oClone);} this.assignElements();this.onAnimStart.subscribe(function(){this.bActive=1;if(th is.nCurrentPane==this.nPanes-this.nVisiblePanes){this.nCurrentPane=0;if(this.upd atePagination){this.updatePagination();} this.enableButtons();}},this,true);this.onAnimEnd.subscribe(function(){if(this.n CurrentPane==0){this.oPanel.style.left=0;this.oPanel.style.top=0;} this.bActive=0;},this,true);return this;};YAHOO.EU.widget.Carousel.prototype.ans wersScroll=function(){var nPrevPane=0;for(var i=1,len=this.nPanes;i<len;i++){YAH OO.util.Dom.setStyle(this.aPanels[i],'left','100%');} this.moveBy=function(e,nPanes){if(this.bActive){return;} if(e){YAHOO.util.Event.preventDefault(e);this.onNavigate.fire();} this.nCurrentPane+=nPanes*this.nPanesToMove;if(this.nCurrentPane+this.nVisiblePa nes-this.nPanesToMove>=this.nPanes){if(this.bLoop){this.nCurrentPane=0;} this.onCarouselEnd.fire();}else if(this.nCurrentPane<=-this.nPanesToMove){if(thi s.bLoop){this.nCurrentPane=this.nPanes+(nPanes*this.nPanesToMove);} this.onCarouselEnd.fire();} this.gotoPane(this.nCurrentPane,nPanes<0?'-':'+');};this.gotoPane=function(nPane ,sDirection){if(this.bActive){return;} if(nPane<0){nPane=0;} if(nPane>this.nPanes-this.nVisiblePanes){nPane=this.nPanes-this.nVisiblePanes;} if(!sDirection){sDirection=nPane>nPrevPane?'+':'-';} YAHOO.util.Dom.setStyle(this.aPanels[nPane],'left',sDirection==='+'?'629px':'-62 9px');this.nCurrentPane=nPane;var oAnim=new YAHOO.util.Anim(this.aPanels[nPane], (this.bHorizontal)?{left:{to:0}}:{top:{to:0}},this.oConfig.animDuration||0.5,thi s.oConfig.easing||YAHOO.util.Easing.easeBoth);var onAnimEnd=function(type,args){ this.onAnimEnd.fire(nPane);};oAnim.onComplete.subscribe(onAnimEnd,this,true);thi s.onAnimStart.fire(nPane);oAnim.animate();};this.onAnimStart.subscribe(function( type,nPane){this.bActive=1;var oAnim=new YAHOO.util.Anim(this.aPanels[nPrevPane] ,{opacity:{to:0}},this.oConfig.animDuration||0.5,this.oConfig.easing||YAHOO.util .Easing.easeBoth);oAnim.animate();},this,true);this.onAnimEnd.subscribe(function

(type,nPane){this.bActive=0;YAHOO.util.Dom.setStyle(this.aPanels[nPrevPane],'lef t','100%');YAHOO.util.Dom.setStyle(this.aPanels[nPrevPane],'opacity','1');nPrevP ane=nPane;},this,true);return this;};(function(){if(top!==self){var whitelist=[' yahoo.com','google.com'];var match=document.referrer.match(/:\/\/(.[^\/?]+)/)[1] ;for(var i=0,len=whitelist.length;i<len;i++){var domainre=new RegExp('(^|.)'+whi telist[i]+'$','gi');if(domainre.exec(match)){return;}} top.location.href=self.location.href;}})();if(typeof YAHOO!=='undefined'){YAHOO. namespace('Search.Answers');YAHOO.Search.Answers={morelists:[{id:'yan-interestin g-menu',amount:12,max:50}]};YAHOO.util.Event.onDOMReady(function(){YAHOO.Search. Answers.interfaceReady.fire();});YAHOO.namespace('YAHOO.widget.Chart');YAHOO.wid get.Chart.SWFURL="http://yui.yahooapis.com/2.7.0/build/charts/assets/charts.swf" ;} YAHOO.Search.Answers.css={jsEnabledClass:'js',hideClass:'hide',showClass:'show'} ;YAHOO.Search.Answers.css.moreList={moreClass:'show-more',extraClass:'extra'};YA HOO.Search.Answers.css.answersCompact={compactClass:'low-rating',hideClass:'hidd en',toggleClass:'toggle',answerPrefix:'answer-'};YAHOO.Search.Answers.css.askMin i={textArea:'yan-askmini-q',countClass:'count-chars'};YAHOO.Search.Answers.css.u serProfileCard={profileClass:'profile',profilePrefix:'profile-',statsPrefix:'sta ts-',myStatusId:'yan-mystatus',footerClass:'network',profileCardId:'yan-user-pro file-card'};YAHOO.Search.Answers.css.commentPane={commentButtonId:'yan-comment-l ink',commentPaneId:'yan-comments',commentClass:'comment',showClass:'show',openBu ttonClass:'open',errorClass:'error'};YAHOO.Search.Answers.css.pointsAlert={myAle rtId:'yan-myincentives'};YAHOO.Search.Answers.css.answersSort={formId:'yan-answe r-sort',selectId:'yan-answer-sort-box',buttonClass:'button',hashTo:'yan-answers' };YAHOO.Search.Answers.css.answersRating={successClass:'success',failureClass:'f ailure',loadingClass:'loading',rateUpClass:'rate-up',signInClass:'failure',rateA greeClass:'agree',rateInformativeClass:'informative',rateUsefulClass:'useful',ra teFunnyClass:'funny',ratedUsefulClass:'useful-rated',rateDownClass:'rate-down',r ateButtonClass:'rate-button',disabledClass:'disabled',dynamicClass:'dynamic',rat edClass:'rated',myAnswerClass:'myanswer',utilClass:'answer-util',ratingUtilClass :'answer-rating-util',thumbClass:'thumb-status'};YAHOO.Search.Answers.css.action Bar={actionBarId:'yan-question-tools',dropDownIds:['yan-edit-question','yan-save -question'],dropDownClass:'menu',menuPostfix:'-menu',firstItem:'first-child'};YA HOO.Search.Answers.css.starQuestion={addStarClass:'add-star',removeStarClass:'re move-star',showStatusClass:'show-status',successClass:'success',failureClass:'fa ilure',starredClass:'starred',removeStarClass:'remove-star',addStarClass:'add-st ar',hasStarsClass:'has-stars',starCountClass:'star-count',statusPrefix:'starstat us-',starStatusClass:'star-status'};YAHOO.Search.Answers.css.contactLinks={conta ctList:'network',isContact:'contact',isBlocked:'blocked',addContact:'add-contact ',blockUser:'block-user'};YAHOO.Search.Answers.css.alertPane={alertId:'yan-alert '};YAHOO.Search.Answers.css.seoThumbs={rateId:'yan-seo-tools',upId:'seo-rate-u', downId:'seo-rate-d',onClass:'on',containerClass:'container',yesHdClass:'on',logg edInClass:'logged-in',countClass:'count-chars'};YAHOO.Search.Answers.css.spellCh ecker={container:'spellcheck-container',suggestedLabel:'yan-suggestedword',other Label:'yan-otherwords',checkClass:'spellcheck',triggerClass:'spell-trigger'};YAH OO.Search.Answers.css.confirmations={selectors:['yan-delete-question','yan-delet e-answer','delete-comment']};YAHOO.Search.Answers.css.askFlow={labelMoveFrom:'ya n-ask-title-l',labelMoveTo:'yan-ask-title',labelMovedClass:'default',countClass: 'count-chars'};YAHOO.Search.Answers.css.answerFlow={webSearchForm:'yan-answer-se arch-inline',actsAsLabel:'acts-as-label'};YAHOO.Search.Answers.css.tabView={tabC lass:'tab-view',showClass:'selected',hideClass:'not-selected',bdClass:'bd',hdCla ss:'hd'};YAHOO.Search.Answers.css.multiSelect={multiSelectClass:'multi-select'}; YAHOO.Search.Answers.css.profileRegistration={changeReg:'change-registration'};Y AHOO.Search.Answers.css.editAboutYou={countClass:'registration-about-you'};YAHOO .Search.Answers.css.bestAnswer={countClass:'count-chars'};YAHOO.Search.Answers.c ss.domCollapse={triggerClass:'trigger',hideClass:'hide',parentClass:'parent',ope nClass:'open'};YAHOO.Search.Answers.css.marketingVideo={videoId:'yan-marketing-v ideo'};YAHOO.namespace('YAHOO.Search.Answers');YAHOO.Search.Answers.labels={allL abel:"Show all %count%...",moreLabel:"Show more...",hideLabel:"Hide...",errorTry Again:"Sorry, please try again.",signin:"Please sign in and try again."};YAHOO.S

earch.Answers.labels.answersRating={saving:"Saving...",connectionError:"Sorry, w e couldn't save your rating. Please try again later.",success:"Thanks for ratin g!"};YAHOO.Search.Answers.labels.starQuestion={addSuccess:"%emphasis_open%Thanks .%emphasis_close% This question has been added to your %link_open%star list%link _close%.",overLimit:"%emphasis_open%Sorry,%emphasis_close% you have reached your daily limit for starring questions.",connectionError:"%emphasis_open%Sorry,%emp hasis_close% we couldn't save your star. Please try again later."};YAHOO.Search .Answers.labels.userProfileCard={memberSince:"Member Since:",totalPoints:"Total Points:",websiteLabel:"Web address:",thisWeek:"Points earned this week:",addCont act:"Add Contact",blockUser:"Block User",loading:"Loading",bestAnswer:"Best answ er",answerCountSingular:"%count% answer",answerCountPlural:"%count% answers"};YA HOO.Search.Answers.labels.actionBar={firstLinks:{'yan-edit-question':"Add Detail s",'yan-save-question':"Add to private Watchlist"}};YAHOO.Search.Answers.labels. calendar={dayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","F ebruary","March","April","May","June","July","August","September","October","Nov ember","December"],startWeekday:"CALENDAR.STARTING_DAY"};YAHOO.Search.Answers.la bels.askMini={noText:"Get answers from millions of real people."};YAHOO.Search.A nswers.labels.contactLinks={addContact:"Add Contact",blockContact:"Block User",r emoveContact:"Remove Contact",removeBlock:"Remove Block",genericName:"He / She", addSuccessHd:"%nick% added to Contacts",addSuccess:"%nick% has been successfully added to your Contacts",removeSuccessHd:"%nick% removed from Contacts",removeSu ccess:"%nick% has been successfully removed from your Contacts",blockSuccessHd:" %nick% added to your Blocked Users list",blockSuccess:"%nick% will no longer be able to add you as a Contact. %nick% will not have access to your Network or Q&A via your public profile page.",rBlockSuccessHd:"%nick% removed from your Blocke d Users list",rBlockSuccess:"%nick% will now be able to add you as a Contact. %n ick% will also be able to access your Q&A and Network on your public profile pag e.",okay:"OK",errorHd:"Oops",errorBd:"Oops, we did something wrong, please try a gain",contactLimitHd:"Sorry, you have already reached your limit of contacts",co ntactLimitBd:"You need to <a href=\"/my/contacts/connections/\">remove people fr om your contact list</a> to make room for additional people",contactNAHd:"Cannot add to your Contacts",contactNABd:"This person is not allowing anyone to add hi m or her to their Contacts",contactYouHd:"Cannot add to your Contacts",contactYo uBd:"You cannot add yourself as a friend",removeFanHd:"We've removed your fans", removeFanBd:"We've removed your fans",contactCantHd:"Cannot add to your Contacts ",contactCantBd:"You cannot add this person to your Contacts at this time.",bloc kLimitHd:"You have reached the limit for Blocked Users",blockLimitBd:"Sorry, you have already reached your limit of 200 Blocked Users. You need to <a href=\"/m y/contacts/connections/\">remove people from your Blocked Users list</a> to make room for additional people"};YAHOO.Search.Answers.labels.answersCompact={hide:" Hide",show:"Show",lowRating:"You gave this answer a low rating:"};YAHOO.Search.A nswers.labels.seoThumbs={buttonLabel:"Post Question",textAreaBLabel:"Drat, this isn't quite what you were looking for?",textAreaSLabel:"Ask the Answers Communit y your exact question",thanksMsg:"%bold%Thanks.%end_bold% %a%Join Answers%end_a% to ask your own questions.",thanksMsgLgdIn:"Thanks for helping us make Answers search better.",limit:"110"};YAHOO.Search.Answers.labels.interestingList={noStar s:"Be the first person to mark this question as interesting!",you:"You",countSin gle:"%STAR_COUNT% Person found this interesting.",countPlural:"%STAR_COUNT% Peop le found this interesting."};YAHOO.Search.Answers.labels.confirmations={'yan-del ete-question':"Are you sure you want to delete this question?\n",'yan-delete-ans wer':"Are you sure? You will not be able to submit a new answer for this questio n.\n\nTo edit your current answer:\n1. Click on \"Cancel\".\n2. Go to your answe r and click on the \"Edit\" link below it.",'delete-comment':"Are you sure you w ant to delete your comment?"};YAHOO.Search.Answers.labels.spellChecker={useLang: "en_GB",buttonChange:"Change",buttonDone:"Done",buttonIgnore:"Ignore",msgNoMista kes:"No misspellings found",msgNoMore:"No more misspellings",labelChange:"Change to:",labelSuggestion:"Suggestions:",labelCheck:"Check Spelling"};YAHOO.Search.A nswers.labels.qualityTips={};YAHOO.Search.Answers.labels.qualityTips.defaultLabe ls={issueShort:["This is a little short. Try being more descriptive."],issueCaps :["%openBold%Did you leave the Caps Lock key on?%closeBold% Using all caps can b

e perceived as shouting.."],issueSpelling:["%openBold%Oops!%closeBold% It looks like you have %openBold%%count%%closeBold% misspelling(s).","Open Spell Checker" ],issueSpellingOpen:["Please correct your spelling."],issueSpellingComplete:["No more misspellings."],issuePunctuation:["Hmm...it looks like you have a lot of p unctuation."]};YAHOO.Search.Answers.labels.qualityTips.questionTitle={issueShort :["Your question is a little short. Try being more descriptive.","%openBold%Tip% closeBold%: Ask a \"%openBold%who%closeBold%, %openBold%what%closeBold%, %openBo ld%when%closeBold%, %openBold%where%closeBold%, %openBold%why%closeBold%, or %op enBold%how%closeBold%\" question."],issueLong:["You have exceeded the 5000 chara cter limit, please shorten your details."],issueSpellingOpen:["%openBold%Tip:%cl oseBold% Correct spelling and grammar makes it easier for others to answer your question."],issuePunctuation:["Hmm...it looks like you have a lot of punctuation . Try revising your question."],issueCaps:["%openBold%Did you leave the Caps Loc k key on?%closeBold% Using all caps can be perceived as SHOUTING. Try using both upper and lower case letters for a better question."],issueSimilar:["%openBold% Wait!%closeBold% We might already have the answer you are looking for:"]};YAHOO. Search.Answers.labels.qualityTips.answer={issuePunctuation:["%openBold%Whoa!%clo seBold% You used a lot of punctuation. Try revising your answer."],issueCaps:["% openBold%Did you leave the Caps Lock key on?%closeBold% Using all caps can be pe rceived as shouting. Try using both upper and lower case letters for a better an swer."],issueSpellingOpen:["%openBold%Tip:%closeBold% Improve your chances of ge tting a best answer by correcting your spelling."]};YAHOO.Search.Answers.labels. qualityTips.answerGroup={default_tip:["%openBold%Tip:%closeBold% Get 5 extra poi nts for representing a group when you answer."]};YAHOO.Search.Answers.labels.qua lityTips.groupDescription={default_tip:["%openBold%Tip:%closeBold% An interestin g and accurate description will encourage more people to join your group"]};YAHO O.Search.Answers.labels.qualityTips.groupDefault={default_tip:["%openBold%Tip:%c loseBold% Want to learn more about starting a group? Read our %OPEN_LINK_GROUP_G UIDELINES%Groups Guidelines.%CLOSE_LINK%"],guidelines_link:"URL.groups_guideline s"};YAHOO.Search.Answers.labels.multiSelect={preset:" All ",topLabel:"Select a c ategory",secondLabel:"Select a sub-category of %CATEGORY%",selectedCategory:"You selected: %OPEN_EMPHASIS%%CATEGORY%%CLOSE_EMPHASIS%"};YAHOO.Search.Answers.labe ls.profileRegistration={labelChange:"Change Email"};YAHOO.Search.Answers.labels. editAboutYou={defaultText:"Tell the Answers Community a little about yourself. D o you have any professional skills? What interests you? What's the last good boo k you read?"};YAHOO.Search.Answers.labels.limitCharacters={statusCount:"You have %count% characters left."};YAHOO.Search.Answers.labels.audioCaptcha={playText:" Play audio code",problems:"There is an audio capture available via the \"Play au dio code\" link. If you still experiance issues with this form please contact us for %vip_assistance%assistance%vip_assistance%"};YAHOO.Search.Answers.labels.si milarQuestions={title:"Similar Questions",answerCount:"1 answer",answerCountPlur al:"%COUNT% answers"};YAHOO.Search.Answers.labels.groups={addSuccessMsg:"%openBo ld%Success!%closeBold% The question has been added to:",removeSuccessMsg:"%openB old%Thank you.%closeBold% The question has now been removed from:",addErrorMsg:" %openBold%Error!%closeBold% There was an error adding your question to:",removeE rrorMsg:"%openBold%Error!%closeBold% There was an error removing your question f rom:",learnMoreAbout:"Learn more about groups on Answers.",inNoGroupsYet:"This q uestion isn't featured in any groups yet",featuredIn:"This question is featured in the following groups:",removeLinkTitle:"remove this question from the group", removeLinkText:"(Remove)",noItems:"Sorry, nothing here",newlyAdded:"new"};YAHOO. Search.Answers.labels.groupInvitation={inviteText:"Invite More People"};YAHOO.Se arch.Answers.labels.contactsPagination={nextText:"next",previousText:"previous", resultText:"result",resultsText:"results"};YAHOO.Search.Answers.labels.ratingsCh art={};YAHOO.Search.Answers.labels.ratingsChart.ratings=["Accurate","Helpful","I nteresting","Very Thorough","Incomplete","Needs Updating"];YAHOO.Search.Answers. labels.ratingsChart.other="Other";YAHOO.Search.Answers.labels.legacyWidget={too_ long:"Your nickname needs to be %OPEN_BOLD%less than%CLOSE_BOLD% %OPEN_BOLD%%CHA RACTER_LIMIT%%CLOSE_BOLD% characters long.",not_provided:"You must enter a %OPEN _BOLD%nickname%CLOSE_BOLD% to continue.",invalid:"We couldn't save your details just now. Our system may be having problems. Does something need fixing? %OPEN_L

INK_FORUM%Let us know%CLOSE_LINK%",forum_link:"http://messages.answers.yahoo.com /answers/forumview?bn=SEA-YahooAnswers"};YAHOO.Search.Answers.labels.editSetting s={editNotSaved:"You've made changes to your settings and if you continue your c hanges will be discarded.",continueSave:"Continue to save details."};YAHOO.Searc h.Answers.labels.suggestedQuestions={noQuestions:"Sorry, no more questions for y ou right now - check for more the next time you login."};YAHOO.Search.Answers.la bels.categoryWidget={pleaseSelect:" Please select",allSubCategories:" All sub-ca tegories",noSubCategories:" No sub-categories",loadingCategories:" Loading Categ ories",errorLoadingCategories:" Error loading categories"};YAHOO.Search.Answers. labels.searchForm={defaultText:"What are you looking for?",enterSearchTerms:" Pl ease Enter a Search Term Here",confirmation:"Are you sure you want to delete \"% NAME%\"",trendingConfirmation:"This search uses the top trending topic on Yahoo! right now. If you delete this saved search, you will not be able to create anot her search using Yahoo! trending topics."};YAHOO.Search.Answers.labels.contentLo ader={defaultText:"Loading results "};YAHOO.Search.Answers.labels.pullRefresh={pull: "Pull down to refresh",release:"Release to refresh",refresh:"Refreshing"};YAHOO. Search.Answers.labels.videoEndScreen={header:"Ready to participate?",button:"Get Started",play:"Play Video"};YAHOO.Search.Answers.cta=function(){var tracking=[] ;function changeTracking(el){if(tracking[el.id]){el.form.action=tracking[el.id]; }} function fixSubmit(e){YAHOO.util.Event.preventDefault(e);var form=this.form;if(Y AHOO.env.ua.ie>0){var els=form.getElementsByTagName('button');if(els.length>0){f or(var i=0,l=els.length;i<l;i++){if(els[i]!==this){els[i].disabled=true;}} var input=document.createElement('input');input.type='hidden';input.name=this.na me;input.value=this.value;form.appendChild(input);}} else{var input=document.createElement('input');input.type='hidden';input.name=th is.name;input.value=this.value;form.appendChild(input);} changeTracking(this);form.submit();} function convert(el){var startContent='<span><span><span><span>';var endContent= '<\/span><\/span><\/span><\/span>';if(el.nodeName.toLowerCase()==='input'&&el.ty pe.toLowerCase()==='submit'){var button=document.createElement('button');button. className=el.className;button.name=el.name;button.value=el.value;button.id=el.id ;if(YAHOO.util.Dom.hasClass(el,'disabled')){button.disabled=true;} button.innerHTML=startContent+el.value+endContent;el.parentNode.replaceChild(but ton,el);YAHOO.util.Event.on(button,'click',fixSubmit);YAHOO.util.Event.on(button ,'click',function(e){var target=YAHOO.util.Event.getTarget(e);YAHOO.util.Event.p reventDefault(e);YAHOO.util.Dom.addClass(target,'click');changeTracking(target); this.form.submit();});if(YAHOO.env.ua.ie>0){YAHOO.util.Event.on(button,'mouseent er',function(e){YAHOO.util.Dom.addClass(this,'hover');});YAHOO.util.Event.on(but ton,'mouseleave',function(e){YAHOO.util.Dom.removeClass(this,'hover');});YAHOO.u til.Event.on(button,'focus',function(e){YAHOO.util.Dom.addClass(this,'hover');}) ;YAHOO.util.Event.on(button,'blur',function(e){YAHOO.util.Dom.removeClass(this,' hover');});}}} return{init:function(){var els=YAHOO.util.Dom.getElementsByClassName('cta-button ','input');if(els.length>0){for(var i=0,l=els.length;i<l;i++){convert(els[i]);}} },convert:convert,addTracking:function(ref,url){tracking[ref]=url;}};}();YAHOO.S earch.Answers.moreList=function(){var gCss=YAHOO.Search.Answers.css,css=YAHOO.Se arch.Answers.css.moreList,Yud=YAHOO.util.Dom,Yue=YAHOO.util.Event;var toggle=fun ction(e){Yue.preventDefault(e);var list=this.parentNode.getElementsByTagName('ol ')[0];if(Yud.hasClass(list,gCss.showClass)){Yud.removeClass(list,gCss.showClass) ;this.innerHTML=this.oldLabel;}else{Yud.addClass(list,gCss.showClass);this.oldLa bel=this.innerHTML;this.innerHTML=YAHOO.Search.Answers.labels.hideLabel;} var limit=YAHOO.util.Dom.getElementsByClassName('limit','p','yan-interesting-men u');if(limit.length>0){if(limit[0].innerHTML.match(/\b50\b/)){limit[0].innerHTML =limit[0].innerHTML.replace(/\b50\b/,'12');} else{limit[0].innerHTML=limit[0].innerHTML.replace(/\b12\b/,'50');}}};return{ini t:function(){var lists=YAHOO.Search.Answers.morelists;for(var i=0;lists[i];i++){ var list=document.getElementById(lists[i].id);if(list&&list.tagName!=='OL'){list =list.getElementsByTagName('ol')[0];} if(list){var it=list.getElementsByTagName('li');for(var j=0;j<lists[i].amount;j+

+){Yud.addClass(it[j],gCss.showClass);} if(it.length>lists[i].amount){var trigger=document.createElement('a');Yud.addCla ss(trigger,YAHOO.Search.Answers.css.moreList.moreClass);trigger.setAttribute('hr ef','#');if(it.length<lists[i].max){trigger.innerHTML=YAHOO.Search.Answers.label s.allLabel.replace(/%count%/,'<span>'+it.length+'</span>');} else{trigger.innerHTML=YAHOO.Search.Answers.labels.moreLabel;} list.parentNode.insertBefore(trigger,list);Yue.on(trigger,'click',toggle);}}}}}; }();YAHOO.Search.Answers.answersCompact=function(){function toggle(e){YAHOO.util .Event.preventDefault(e);if(YAHOO.util.Dom.hasClass(this.parentNode.parentNode,Y AHOO.Search.Answers.css.answersCompact.hideClass)){YAHOO.util.Dom.removeClass(th is.parentNode.parentNode,YAHOO.Search.Answers.css.answersCompact.hideClass);this .innerHTML=YAHOO.Search.Answers.labels.answersCompact.hide;}else{YAHOO.util.Dom. addClass(this.parentNode.parentNode,YAHOO.Search.Answers.css.answersCompact.hide Class);this.innerHTML=YAHOO.Search.Answers.labels.answersCompact.show;}} function collapse(el){YAHOO.util.Dom.addClass(el,YAHOO.Search.Answers.css.answer sCompact.hideClass);YAHOO.util.Dom.addClass(el,YAHOO.Search.Answers.css.answersC ompact.compactClass);var p=YAHOO.util.Dom.getElementsByClassName(YAHOO.Search.An swers.css.answersCompact.toggleClass,'p',el)[0];var d=p.getElementsByTagName('a' )[0];if(!d){d=document.createElement('a');d.href="#";p.appendChild(d);YAHOO.util .Event.on(d,'click',toggle);} d.innerHTML=YAHOO.Search.Answers.labels.answersCompact.show;} function handleRating(type,args){var answer=document.getElementById(YAHOO.Search .Answers.css.userProfileCard.profilePrefix+args[0]).parentNode;if(!YAHOO.util.Do m.hasClass(answer,'best')){YAHOO.util.Dom.addClass(answer,YAHOO.Search.Answers.c ss.answersCompact.compactClass);var p=YAHOO.util.Dom.getElementsByClassName(YAHO O.Search.Answers.css.answersCompact.toggleClass,'p',answer)[0];if(!p){p=document .createElement('p');p.className='toggle';answer.insertBefore(p,YAHOO.util.Dom.ge tElementsByClassName('qa-container','div',answer)[0]);} if(p.firstChild){p.firstChild.nodeValue=YAHOO.Search.Answers.labels.answersCompa ct.lowRating+' ';} else{p.appendChild(document.createTextNode(YAHOO.Search.Answers.labels.answersCo mpact.lowRating+' '));} collapse(answer);}} return{init:function(){YAHOO.Search.Answers.answerRateDown.subscribe(handleRatin g);var answers=YAHOO.util.Dom.getElementsByClassName(YAHOO.Search.Answers.css.an swersCompact.compactClass,'div');if(answers.length>0){YAHOO.util.Dom.batch(answe rs,collapse);}}};}();YAHOO.Search.Answers.answersRating=function(){function hand leRating(e){var MESSAGE_FAIL=0;var MESSAGE_SUCCESS=1;var MESSAGE_LOADING=2;funct ion callbackSuccess(o){var response=eval('('+o.responseText+')');if(response.err or){displayMessage(YAHOO.Search.Answers.labels.answersRating.connectionError,MES SAGE_FAIL);} else{displayMessage(YAHOO.Search.Answers.labels.answersRating.success,MESSAGE_SU CCESS);}} function callbackFail(o){displayMessage(YAHOO.Search.Answers.labels.answersRatin g.connectionError,MESSAGE_FAIL);} function displayMessage(message,type){var msg=utils.getElementsByTagName('p')[0] ;if(!msg){msg=document.createElement('p');} if(type===MESSAGE_SUCCESS){msg.className=YAHOO.Search.Answers.css.answersRating. successClass;} else if(type===MESSAGE_FAIL){msg.className=YAHOO.Search.Answers.css.answersRatin g.failureClass;} else if(type===MESSAGE_LOADING){msg.className=YAHOO.Search.Answers.css.answersRa ting.loadingClass;} msg.innerHTML=message;utils.appendChild(msg);} var target=YAHOO.util.Event.getTarget(e);while(target&&target.nodeName.toLowerCa se()!=='a'){target=target.parentNode;} if(target){var targetParent=target.parentNode;var utils=target.parentNode.parent Node.parentNode;if((YAHOO.util.Dom.hasClass(target.parentNode,YAHOO.Search.Answe rs.css.answersRating.rateUpClass)||YAHOO.util.Dom.hasClass(target.parentNode,YAH OO.Search.Answers.css.answersRating.rateDownClass))&&!YAHOO.util.Dom.hasClass(ut

ils,YAHOO.Search.Answers.css.answersRating.disabledClass)&&!YAHOO.util.Dom.hasCl ass(utils,YAHOO.Search.Answers.css.answersRating.dynamicClass)){YAHOO.util.Event .preventDefault(e);YAHOO.util.Dom.addClass(utils,YAHOO.Search.Answers.css.answer sRating.disabledClass);var a_thumbup=YAHOO.util.Dom.getElementsByClassName(YAHOO .Search.Answers.css.answersRating.rateUpClass,'li',target.parentNode.parentNode) [0].getElementsByTagName('a')[0];var a_thumbdown=YAHOO.util.Dom.getElementsByCla ssName(YAHOO.Search.Answers.css.answersRating.rateDownClass,'li',target.parentNo de.parentNode)[0].getElementsByTagName('a')[0];target.getElementsByTagName('span ')[0].firstChild.nodeValue=(parseInt(target.getElementsByTagName('span')[0].firs tChild.nodeValue,10)+1)+' ';if(YAHOO.util.Dom.hasClass(target.parentNode,YAHOO.S earch.Answers.css.answersRating.rateDownClass)){YAHOO.Search.Answers.answerRateD own.fire(target.href.match(/targetKid=([^&]*)/)[1]);} var url=target.href.replace(/done=[^&]*&/,'');var s_thumbup=a_thumbup.firstChild ;YAHOO.util.Dom.removeClass(s_thumbup,YAHOO.Search.Answers.css.answersRating.rat eButtonClass);if(YAHOO.util.Dom.hasClass(targetParent,YAHOO.Search.Answers.css.a nswersRating.rateUpClass)){YAHOO.util.Dom.addClass(s_thumbup,YAHOO.Search.Answer s.css.answersRating.ratedClass);} a_thumbup.parentNode.replaceChild(s_thumbup,a_thumbup);var s_thumbdown=a_thumbdo wn.firstChild;YAHOO.util.Dom.removeClass(s_thumbdown,YAHOO.Search.Answers.css.an swersRating.rateButtonClass);if(YAHOO.util.Dom.hasClass(targetParent,YAHOO.Searc h.Answers.css.answersRating.rateDownClass)){YAHOO.util.Dom.addClass(s_thumbdown, YAHOO.Search.Answers.css.answersRating.ratedClass);} a_thumbdown.parentNode.replaceChild(s_thumbdown,a_thumbdown);displayMessage(YAHO O.Search.Answers.labels.answersRating.saving,MESSAGE_LOADING);var callback={succ ess:callbackSuccess,failure:callbackFail};YAHOO.util.Connect.asyncRequest('GET', url,callback);}}} return{init:function(){var utils=YAHOO.util.Dom.getElementsByClassName(YAHOO.Sea rch.Answers.css.answersRating.utilClass,'div');if(utils.length>0){YAHOO.util.Dom .batch(utils,function(el){var status=YAHOO.util.Dom.getElementsByClassName(YAHOO .Search.Answers.css.answersRating.thumbClass,'p',el.parentNode);if(status.length >0){var thumb=YAHOO.util.Dom.getElementsByClassName(YAHOO.Search.Answers.css.ans wersRating.rateUpClass,'li',el);if(thumb.length>0){YAHOO.util.Event.on(thumb[0], 'click',function(e){YAHOO.util.Dom.addClass(status[0].parentNode,'show');});YAHO O.util.Dom.setStyle(thumb[0],'cursor','pointer');} thumb=YAHOO.util.Dom.getElementsByClassName(YAHOO.Search.Answers.css.answersRati ng.rateDownClass,'li',el);if(thumb.length>0){YAHOO.util.Event.on(thumb[0],'click ',function(e){YAHOO.util.Dom.addClass(status[0].parentNode,'show');});YAHOO.util .Dom.setStyle(thumb[0],'cursor','pointer');}}});YAHOO.util.Event.on(utils,'click ',handleRating);}}};}();YAHOO.Search.Answers.answersRatingV2=function(){function handleRating(e){var MESSAGE_FAIL=1;var MESSAGE_SUCCESS=0;var MESSAGE_LOADING=2; var MESSAGE_SIGNIN=-1;var enabledRatings=enabledGlobalRatings;if(enabledRatings. length==0){enabledRatings=['A','I','F','U'];} var originalRatingDataset=[{elId:'A',elName:'agree',elTitle:'agreeTitle',token:' a-',ratingCSS:YAHOO.Search.Answers.css.answersRating.rateAgreeClass,ratedCSS:YAH OO.Search.Answers.css.answersRating.ratedClass},{elId:'I',elName:'informative',e lTitle:'informativeTitle',token:'i-',ratingCSS:YAHOO.Search.Answers.css.answersR ating.rateInformativeClass,ratedCSS:YAHOO.Search.Answers.css.answersRating.rated Class},{elId:'F',elName:'funny',elTitle:'funnyTitle',token:'f-',ratingCSS:YAHOO. Search.Answers.css.answersRating.rateFunnyClass,ratedCSS:YAHOO.Search.Answers.cs s.answersRating.ratedClass},{elId:'U',elName:'useful',elTitle:'usefulTitle',toke n:'u-',ratingCSS:YAHOO.Search.Answers.css.answersRating.rateUsefulClass,ratedCSS :YAHOO.Search.Answers.css.answersRating.ratedClass}];var ratingDataset=Array();f or(i=0;i<originalRatingDataset.length;i++){if(isRatingEnabled(originalRatingData set[i].elId,enabledRatings)){ratingDataset.push(originalRatingDataset[i]);}} function isRatingEnabled(rType,eRatings){for(j=0;j<eRatings.length;j++){if(rType ==eRatings[j]){return 1;}} return 0;} function callbackSuccess(o){var response=YAHOO.lang.JSON.parse(o.responseText);i f(response.error==MESSAGE_FAIL){displayMessage(YAHOO.Search.Answers.labels.answe rsRating.connectionError,MESSAGE_FAIL);}

else if(response.error==MESSAGE_SIGNIN){displayMessage(response.message,MESSAGE_ SIGNIN);} else{displayMessage(YAHOO.Search.Answers.labels.answersRating.success,MESSAGE_SU CCESS);var target=YAHOO.util.Event.getTarget(e);if(target){var targetParent=targ et.parentNode;var totalCount=YAHOO.util.Dom.get('t-'+target.id.split('-')[1]).fi rstChild;var total=0;for(i=0;i<ratingDataset.length;i++){total+=parseInt(respons e[ratingDataset[i].elName],10);} totalCount.nodeValue=total;var ratingElements=new Array();for(i=0;i<ratingDatase t.length;i++){ratingElements.push(YAHOO.util.Dom.get(ratingDataset[i].token+targ et.id.split('-')[1]));} for(k=0;k<ratingElements.length;k++){currentNode=ratingElements[k].parentNode.pa rentNode;if(YAHOO.util.Dom.hasClass(currentNode,YAHOO.Search.Answers.css.answers Rating.ratedClass)){YAHOO.util.Dom.removeClass(currentNode,YAHOO.Search.Answers. css.answersRating.ratedClass);break;}} for(l=0;l<ratingDataset.length;l++){if(YAHOO.util.Dom.hasClass(targetParent.pare ntNode,ratingDataset[l].ratingCSS)){YAHOO.util.Dom.addClass(targetParent.parentN ode,YAHOO.Search.Answers.css.answersRating.ratedClass);break;}} for(m=0;m<ratingDataset.length;m++){var currentElement=YAHOO.util.Dom.get(rating Dataset[m].token+target.id.split('-')[1]);ratingCount=currentElement.firstChild; var re=/\(\d+\)/g;ratingCount.nodeValue=ratingCount.nodeValue.replace(re,'('+res ponse[ratingDataset[m].elName]+')');}}}} function callbackFail(o){displayMessage(YAHOO.Search.Answers.labels.answersRatin g.connectionError,MESSAGE_FAIL);} function displayMessage(message,type){var msg=utils.getElementsByTagName('p')[0] ;if(!msg){msg=document.createElement('p');} if(type===MESSAGE_SUCCESS){msg.className=YAHOO.Search.Answers.css.answersRating. successClass;} else if(type===MESSAGE_FAIL){msg.className=YAHOO.Search.Answers.css.answersRatin g.failureClass;} else if(type===MESSAGE_LOADING){msg.className=YAHOO.Search.Answers.css.answersRa ting.loadingClass;} else if(type===MESSAGE_SIGNIN){msg.className=YAHOO.Search.Answers.css.answersRat ing.signInClass;} msg.innerHTML=message;utils.appendChild(msg);} var target=YAHOO.util.Event.getTarget(e);var ratingSpanNodes=new Array();for(n=0 ;n<ratingDataset.length;n++){ratingSpanNodes.push(YAHOO.util.Dom.get(ratingDatas et[n].token+target.id.split('-')[1]));} while(target&&target.nodeName.toLowerCase()!=='a'){target=target.parentNode;} if(target){var targetParent=target.parentNode;var utils=target.parentNode.parent Node.parentNode;if(!YAHOO.util.Dom.hasClass(target.parentNode,YAHOO.Search.Answe rs.css.answersRating.myAnswerClass)&&(YAHOO.util.Dom.hasClass(target.parentNode, YAHOO.Search.Answers.css.answersRating.rateAgreeClass)||YAHOO.util.Dom.hasClass( target.parentNode,YAHOO.Search.Answers.css.answersRating.rateUsefulClass)||YAHOO .util.Dom.hasClass(target.parentNode,YAHOO.Search.Answers.css.answersRating.rate FunnyClass)||YAHOO.util.Dom.hasClass(target.parentNode,YAHOO.Search.Answers.css. answersRating.rateInformativeClass))){YAHOO.util.Event.preventDefault(e);var rac t='add';for(p=0;p<ratingSpanNodes.length;p++){currentNode=ratingSpanNodes[p].par entNode.parentNode;if(YAHOO.util.Dom.hasClass(currentNode,YAHOO.Search.Answers.c ss.answersRating.ratedClass)){ract='update';break;}} ract=target.href.match(/act=([^&]*)/)[1]=='update'?'update':ract;var url=target. href.replace(/act=[^&]*&/,'act='+ract+'&');if(!YAHOO.util.Dom.hasClass(target.pa rentNode,YAHOO.Search.Answers.css.answersRating.ratedClass)){displayMessage(YAHO O.Search.Answers.labels.answersRating.saving,MESSAGE_LOADING);var callback={succ ess:callbackSuccess,failure:callbackFail};YAHOO.util.Connect.asyncRequest('GET', url,callback);}}}} return{init:function(){var utils=YAHOO.util.Dom.getElementsByClassName(YAHOO.Sea rch.Answers.css.answersRating.ratingUtilClass,'div');if(utils.length>0){YAHOO.ut il.Dom.batch(utils,function(el){var status=YAHOO.util.Dom.getElementsByClassName (YAHOO.Search.Answers.css.answersRating.thumbClass,'p',el.parentNode);if(status. length>0){for(q=0;q<ratingDataset.length;q++){var thumb=YAHOO.util.Dom.getElemen

tsByClassName(ratingDataset[q].ratingCSS,'li',el);if(thumb.length>0){YAHOO.util. Event.on(thumb[0],'click',function(e){YAHOO.util.Dom.addClass(status[0].parentNo de,'show');});YAHOO.util.Dom.setStyle(thumb[0],'cursor','pointer');}}}});YAHOO.u til.Event.on(utils,'click',handleRating);}}};}();YAHOO.Search.Answers.userProfil eCard=function(){var cache=[],cached=false,cCss=YAHOO.Search.Answers.css.contact Links,css=YAHOO.Search.Answers.css.userProfileCard,fetchingData=false,networkPro cessing=false,hoverTimer,hoverOpen=false,ids=[],div,statCard=false,Yuc=YAHOO.uti l.Connection,Yud=YAHOO.util.Dom,Yue=YAHOO.util.Event,networkMethod,profileId,url ;function callbackSuccess(o){var response=eval('('+o.responseText+')');var args; var nickname=YAHOO.Search.Answers.labels.contactLinks.genericName;var profile=do cument.getElementById(YAHOO.Search.Answers.css.userProfileCard.profilePrefix+pro fileId);if(profile){var nicks=Yud.getElementsByClassName('fn','span',profile);if (nicks.length==0){nicks=profile.getElementsByTagName('h1');} if(nicks.length>0){nickname=nicks[0].innerHTML;} var networks=Yud.getElementsByClassName(YAHOO.Search.Answers.css.contactLinks.co ntactList,'ul',profile);if(networks.length>0){var network=networks[0];} var regex=new RegExp('%nick%','g');var myButtons=[{text:YAHOO.Search.Answers.lab els.contactLinks.okay,handler:function(){YAHOO.Search.Answers.closeAlert.fire(); },isDefault:true}];switch(response){case 0:if(networkMethod==='addFriend'){args= {header:YAHOO.Search.Answers.labels.contactLinks.addSuccessHd.replace(regex,nick name),body:YAHOO.Search.Answers.labels.contactLinks.addSuccess.replace(regex,nic kname),footer:myButtons,addClass:'ico-blue-buddy'};network.innerHTML='<li><a hre f="'+url.replace(/addFriend/,'removeFriend')+'">'+YAHOO.Search.Answers.labels.co ntactLinks.removeContact+'</a></li>';Yud.addClass(profile,YAHOO.Search.Answers.c ss.contactLinks.isContact);}else if(networkMethod==='unBlockUser'){args={header: YAHOO.Search.Answers.labels.contactLinks.rBlockSuccessHd.replace(regex,nickname) ,body:YAHOO.Search.Answers.labels.contactLinks.rBlockSuccess.replace(regex,nickn ame),footer:myButtons,addClass:'ico-block'};network.innerHTML='<li><a href="'+ur l.replace(/unBlockUser/,'addFriend')+'" class="'+YAHOO.Search.Answers.css.contac tLinks.addContact+'">'+YAHOO.Search.Answers.labels.contactLinks.addContact+'</a> </li>';network.innerHTML+='<li><a href="'+url.replace(/unBlockUser/,'blockUser') +'" class="'+YAHOO.Search.Answers.css.contactLinks.blockUser+'">'+YAHOO.Search.A nswers.labels.contactLinks.blockContact+'</a></li>';Yud.removeClass(profile,YAHO O.Search.Answers.css.contactLinks.isBlocked);YAHOO.Search.Answers.removeContact. fire({removedContact:profile});}else if(networkMethod==='removeFriend'){args={he ader:YAHOO.Search.Answers.labels.contactLinks.removeSuccessHd.replace(regex,nick name),body:YAHOO.Search.Answers.labels.contactLinks.removeSuccess.replace(regex, nickname),footer:myButtons,addClass:'ico-blue-buddy'};network.innerHTML='<li><a href="'+url.replace(/removeFriend/,'addFriend')+'" class="'+YAHOO.Search.Answers .css.contactLinks.addContact+'">'+YAHOO.Search.Answers.labels.contactLinks.addCo ntact+'</a></li>';network.innerHTML+='<li><a href="'+url.replace(/removeFriend/, 'blockUser')+'" class="'+YAHOO.Search.Answers.css.contactLinks.blockUser+'">'+YA HOO.Search.Answers.labels.contactLinks.blockContact+'</a></li>';Yud.removeClass( profile,YAHOO.Search.Answers.css.contactLinks.isContact);YAHOO.Search.Answers.re moveContact.fire({removedContact:profile});}else if(networkMethod==='blockUser') {args={header:YAHOO.Search.Answers.labels.contactLinks.blockSuccessHd.replace(re gex,nickname),body:YAHOO.Search.Answers.labels.contactLinks.blockSuccess.replace (regex,nickname),footer:myButtons,addClass:'ico-block'};network.innerHTML='<li>< a href="'+url.replace(/blockUser/,'unBlockUser')+'">'+YAHOO.Search.Answers.label s.contactLinks.removeBlock+'</a></li>';Yud.addClass(profile,YAHOO.Search.Answers .css.contactLinks.isBlocked);} break;case-3:args={header:YAHOO.Search.Answers.labels.contactLinks.contactLimitH d,body:YAHOO.Search.Answers.labels.contactLinks.contactLimitBd,footer:myButtons, addClass:'ico-yield'};break;case-4:args={header:YAHOO.Search.Answers.labels.cont actLinks.contactNAHd,body:YAHOO.Search.Answers.labels.contactLinks.contactNABd,f ooter:myButtons,addClass:'ico-yield'};break;case-5:args={header:YAHOO.Search.Ans wers.labels.contactLinks.contactYouHd,body:YAHOO.Search.Answers.labels.contactLi nks.contactYouBd,footer:myButtons,addClass:'ico-yield'};break;case-6:args={heade r:YAHOO.Search.Answers.labels.contactLinks.removeFanHd,body:YAHOO.Search.Answers .labels.contactLinks.removeFanBd,footer:myButtons,addClass:'ico-blue-buddy'};bre

ak;case-9:args={header:YAHOO.Search.Answers.labels.contactLinks.contactCantHd,bo dy:YAHOO.Search.Answers.labels.contactLinks.contactCantBd,footer:myButtons,addCl ass:'ico-yield'};break;case-11:args={header:YAHOO.Search.Answers.labels.contactL inks.blockLimitHd,body:YAHOO.Search.Answers.labels.contactLinks.blockLimitBd,foo ter:myButtons,addClass:'ico-yield'};break;case-1:case-2:case-7:default:args={hea der:YAHOO.Search.Answers.labels.contactLinks.errorHd,body:YAHOO.Search.Answers.l abels.contactLinks.errorBd,footer:myButtons,addClass:'ico-yield'};break;} YAHOO.Search.Answers.showAlert.fire(args);networkProcessing=false;}} function callbackFail(o){var myButtons=[{text:YAHOO.Search.Answers.labels.contac tLinks.okay,handler:function(){YAHOO.Search.Answers.closeAlert.fire();},isDefaul t:true}];args={header:YAHOO.Search.Answers.labels.contactLinks.errorHd,body:YAHO O.Search.Answers.labels.contactLinks.errorBd,footer:myButtons,addClass:'ico-yiel d'};YAHOO.Search.Answers.showAlert.fire(args);networkProcessing=false;} function networkLink(e){if(networkProcessing){return true;} networkProcessing=true;if(statCard){statCard.hide();} hoverOpen=false;var target=Yue.getTarget(e);if(target.tagName.toLowerCase()==='a '&&!target.href.match(/login.yahoo.com/)){Yue.preventDefault(e);url=target.href; networkMethod=url.match(/method=([^&]*)/)[1];profileId=url.match(/kid=([^&]*)/)[ 1];var callback={success:callbackSuccess,failure:callbackFail};YAHOO.util.Connec t.asyncRequest('GET',url+"&curtime="+(new Date().getTime().toString()),callback) ;}} return{init:function(){var profileNetwork=Yud.getElementsByClassName('network',' ul','member-summary')[0];if(profileNetwork){Yue.on(profileNetwork,'click',networ kLink);} var drawProfile=function(e,timeout){timeout=(timeout!==undefined)?timeout:200;va r self=this;Yue.stopPropagation(e);accId=self.id;accId=accId.replace(/profile-/, '');if(!YAHOO.util.Dom.hasClass(self.parentNode,YAHOO.Search.Answers.css.answers Compact.hideClass)){clearTimeout(hoverTimer);} hoverTimer=setTimeout(function(){if(hoverOpen!==accId&&!YAHOO.util.Dom.hasClass( self.parentNode,YAHOO.Search.Answers.css.answersCompact.hideClass)){var footerLi nks=Yud.getElementsByClassName(css.footerClass,'ul',self.parentNode);if(footerLi nks.length){statCard.setFooter(footerLinks[0].cloneNode(true));} else{statCard.setFooter('&nbsp;');} div.parentNode.removeChild(div);self.appendChild(div);hoverOpen=accId;statCard.c fg.setProperty('context',[self,'tl','tr']);statCard.cfg.setProperty('x',(statCar d.cfg.getProperty('x')));statCard.setBody('<img src="http://l.yimg.com/sc/28176/ answers2/images/a/i/us/sch/gr2/greenbusy_whbg.gif" alt="'+YAHOO.Search.Answers.l abels.userProfileCard.loading+'">');statCard.render();statCard.show();YAHOO.Sear ch.Answers.userProfileCard.getData(accId);var ft=Yud.getElementsByClassName('ft' ,'div',css.profileCardId)[0];Yue.on(ft,'click',networkLink);}},timeout);};var ki llProfile=function(e,timeout){timeout=(timeout!==undefined)?timeout:500;Yue.stop Propagation(e);clearTimeout(hoverTimer);hoverTimer=setTimeout(function(){statCar d.hide();hoverOpen=false;},timeout);};var cards=Yud.getElementsByClassName(css.p rofileClass,'div');if(cards.length>0){div=document.createElement('div');div.id=c ss.profileCardId;document.getElementById('yan-content').appendChild(div);statCar d=new YAHOO.widget.Overlay(div,{visible:false,constraintoviewport:false,zIndex:1 });statCard.render();for(var i=0,l=cards.length;i<l;i++){var accId=cards[i].id;a ccId=accId.replace(/profile-/,'');if(accId===css.myStatusId||accId===YAHOO.Searc h.Answers.css.pointsAlert.myAlertId||!Yud.getElementsByClassName('stats','dl',ca rds[i]).length){continue;} ids.push(accId);Yue.on(cards[i],'mouseover',drawProfile,200);Yue.on(cards[i],'mo useout',killProfile,500);Yue.on(cards[i],'focus',drawProfile,0);Yue.on(cards[i], 'blur',killProfile,0);}}},updateCard:function(accId){cached=true;var item=docume nt.getElementById(css.profilePrefix+accId);var MemberSince=item.getElementsByTag Name('dd')[0].firstChild.nodeValue;var els=YAHOO.util.Dom.getElementsByClassName ('contributions','dl',item);var SecondItemValue=false;if(YAHOO.util.Dom.hasClass (item,'knowledge-partner')){SecondItemValue=item.getElementsByTagName('dd')[1].i nnerHTML;SecondItemName=item.getElementsByTagName('dt')[1].innerHTML;}else{Secon dItemValue=item.getElementsByTagName('dd')[1].firstChild.nodeValue;} var contributions='';if(els.length>0){contributions='<dl class="contributions">'

+els[0].innerHTML+'</dl>';} var cardBody;cardBody='<ul class="best">';cardBody+='<li class="best">'+YAHOO.Se arch.Answers.labels.userProfileCard.bestAnswer+' <span>'+cache['profileCards'][a ccId].percent+'%</span>';if((cache['profileCards'][accId].total_ans_cnt)===1){ca rdBody+='<li class="total">'+YAHOO.Search.Answers.labels.userProfileCard.answerC ountSingular.replace(/%count%/,cache['profileCards'][accId].total_ans_cnt);} else{cardBody+='<li class="total">'+YAHOO.Search.Answers.labels.userProfileCard. answerCountPlural.replace(/%count%/,cache['profileCards'][accId].total_ans_cnt); } cardBody+='</ul>';cardBody+=contributions;cardBody+='<dl class="stats">';if(!YAH OO.util.Dom.hasClass(item,'knowledge-partner')){cardBody+='<dt>'+YAHOO.Search.An swers.labels.userProfileCard.memberSince+' </dt><dd>'+MemberSince+'</dd>';cardBo dy+='<dt>'+YAHOO.Search.Answers.labels.userProfileCard.totalPoints+' </dt><dd>'+ SecondItemValue+'</dd>';cardBody+='<dt class="last">'+YAHOO.Search.Answers.label s.userProfileCard.thisWeek+' </dt><dd class="last">'+cache['profileCards'][accId ].weekly+'</dd>';}else{if(YAHOO.util.Dom.hasClass(item.getElementsByTagName('dd' )[1],'website')){cardBody+='<dt>'+YAHOO.Search.Answers.labels.userProfileCard.me mberSince+' </dt><dd>'+MemberSince+'</dd>';cardBody+='<dt class="last website">' +SecondItemName+'</dt><dd class="last">'+SecondItemValue+'</dd>';} else{cardBody+='<dt class="last">'+YAHOO.Search.Answers.labels.userProfileCard.m emberSince+' </dt><dd class="last">'+MemberSince+'</dd>';}} cardBody+='</dl>';statCard.setBody(cardBody);},getData:function(accId){if(cached &&typeof cache!=='undefined'){YAHOO.Search.Answers.userProfileCard.updateCard(ac cId);}else if(!fetchingData){fetchingData=true;var uri="/common/util/ks-qa-xhr-h andler.php"+"?method=getKidData&kidarr="+ids;var callback={success:YAHOO.Search. Answers.userProfileCard.getResponse,failure:YAHOO.Search.Answers.userProfileCard .getResponse,timeout:7000,argument:[accId]};var transaction=YAHOO.util.Connect.a syncRequest('GET',uri,callback,null);}else{statCard.hide();}},getResponse:functi on(response){fetchingData=false;jsonText=response.responseText;var json=eval('(' +jsonText+')');cache['profileCards']=json;YAHOO.Search.Answers.userProfileCard.u pdateCard(response.argument[0]);}};}();YAHOO.Search.Answers.pointsAlert=function (){var fadeTimer;return{init:function(){var notify=document.getElementById(YAHOO .Search.Answers.css.pointsAlert.myAlertId);if(notify){var myCard=document.getEle mentById(YAHOO.Search.Answers.css.userProfileCard.myStatusId);if(myCard){var pos =YAHOO.util.Dom.getXY(myCard);YAHOO.util.Dom.setXY(notify,pos,true);YAHOO.util.D om.setStyle(YAHOO.util.Dom.getElementsByClassName('bd','div',notify)[0],'height' ,YAHOO.util.Dom.getElementsByClassName('bd','div',myCard)[0].offsetHeight+4+'px' );var notifyft=YAHOO.util.Dom.getElementsByClassName('ft','div',notify)[0];notif yft.parentNode.removeChild(notifyft);var anim=new YAHOO.util.Anim(notify,{opacit y:{to:0}},1.5,YAHOO.util.Easing.easeIn);fadeTimer=setTimeout(function(){anim.ani mate();},7000);anim.onComplete.subscribe(function(e){YAHOO.util.Dom.setX(notify, '-9999');});}}}};}();YAHOO.Search.Answers.commentPane=function(){var gCss=YAHOO. Search.Answers.css,css=YAHOO.Search.Answers.css.commentPane,Yud=YAHOO.util.Dom,Y ue=YAHOO.util.Event;return{init:function(){var comments=document.getElementById( css.commentPaneId);var commentButton=document.getElementById(css.commentButtonId );if(comments&&commentButton){Yue.on(commentButton,'click',function(e){Yue.preve ntDefault(e);if(Yud.hasClass(comments,css.showClass)){Yud.removeClass(comments,c ss.showClass);Yud.removeClass(commentButton,css.openButtonClass);}else{Yud.addCl ass(comments,css.showClass);Yud.addClass(commentButton,css.openButtonClass);}}); var form=comments.getElementsByTagName('form')[0];Yue.on(form,'submit',function( e){Yue.preventDefault(e);var errors=false;var comments=document.getElementById(c ss.commentPaneId);if(comments.getElementsByTagName('textarea').length>0&&comment s.getElementsByTagName('textarea')[0].value===''){errors=true;Yud.addClass(comme nts.getElementsByTagName('textarea')[0],css.errorClass);} if(!errors){this.submit();}});YAHOO.Search.Answers.limitCharacters(comments.getE lementsByTagName('textarea')[0],300,false,YAHOO.Search.Answers.labels.limitChara cters.statusCount,"block",YAHOO.Search.Answers.css.askFlow.countClass);}}};}();Y AHOO.Search.Answers.answersSort=function(){var gCss=YAHOO.Search.Answers.css,css =YAHOO.Search.Answers.css.answersSort,Yud=YAHOO.util.Dom,Yue=YAHOO.util.Event;re turn{init:function(){var form=document.getElementById(css.formId);if(form){var s

elect=document.getElementById(css.selectId);if(select){Yue.on(select,'change',fu nction(e){var url=form.action+'?qid='+form.qid.value+'&show='+select.value+'#'+c ss.hashTo;if(typeof yanAnswerSortUlt!=='undefined'){url=yanAnswerSortUlt['option '+select.value].replace(/&amp;/g,'&')+'#'+css.hashTo;} window.location=url;});}}}};}();YAHOO.Search.Answers.limitCharacters=function(el ,limit,before,limitText,display,addClass,removeDefault){var textarea,counter;lim it=limit||110;display=display||"block";before=before||false;removeDefault=(typeo f removeDefault=='undefined'?true:removeDefault);limitText=limitText||YAHOO.Sear ch.Answers.labels.limitCharacters.statusCount;var createCounter=function(){if(re moveDefault) {if(el.value===removeDefault){el.value='';el.defaultValue='';}} if(!counter){if(display==='inline'){var ret=document.createElement('span');}else {var ret=document.createElement('div');} ret.innerHTML=limitText.replace(/%count%/,'<span>'+limit+'</span>');if(addClass) {YAHOO.util.Dom.addClass(ret,addClass);} if(display!=='none'&&before){YAHOO.util.Dom.insertBefore(ret,el);}else if(displa y!=='none'){YAHOO.util.Dom.insertAfter(ret,el);} counter=ret.getElementsByTagName('span')[0];checkLength();}};var checkLength=fun ction(e){if(!counter){createCounter();} if(parseInt(limit,10)-el.value.length<0){YAHOO.util.Event.preventDefault(e);el.v alue=el.value.substring(0,limit);} counter.innerHTML=(parseInt(limit,10)-el.value.length);};if(el){if(typeof before ==='undefined'){before=true;} el.maxLength=limit;YAHOO.util.Event.on(el,'keyup',checkLength);YAHOO.util.Event. on(el,'focus',createCounter);if(el.value!==el.defaultValue){createCounter();}}}; YAHOO.Search.Answers.askMini=function(){var Yud=YAHOO.util.Dom,Yue=YAHOO.util.Ev ent;return{init:function(){var el=document.getElementById('yan-askmini-q');if(el ){if(el.value===YAHOO.Search.Answers.labels.askMini.noText||el.value===''){Yud.a ddClass(el,'default');el.defaultValue=YAHOO.Search.Answers.labels.askMini.noText ;el.value=YAHOO.Search.Answers.labels.askMini.noText;} Yue.on(el,'focus',function(e){if(this.value===YAHOO.Search.Answers.labels.askMin i.noText||this.value===''){Yud.removeClass(this,'default');this.value='';}});Yue .on(el,'blur',function(e){if(this.value===''){Yud.addClass(this,'default');this. value=YAHOO.Search.Answers.labels.askMini.noText;}});YAHOO.Search.Answers.limitC haracters(el,110,false,YAHOO.Search.Answers.labels.limitCharacters.statusCount," block",YAHOO.Search.Answers.css.askMini.countClass,YAHOO.Search.Answers.labels.a skMini.noText);YAHOO.util.Event.on(el.form,'submit',function(e){if(el.value===YA HOO.Search.Answers.labels.askMini.noText){el.value='';}});}}};}();YAHOO.Search.A nswers.actionBar=function(){var hoverTimer,menus=[];function createDropDown(el){ if(el){var contents=el.getElementsByTagName('ul')[0];var editLink=el.getElements ByTagName('a')[0].cloneNode(true);var li=document.createElement('li');var str=YA HOO.Search.Answers.labels.actionBar.firstLinks[el.id];if(editLink.getAttribute(' title')){str=editLink.getAttribute('title');el.getElementsByTagName('a')[0].setA ttribute('title','');} editLink.innerHTML=str;YAHOO.util.Dom.addClass(li,YAHOO.Search.Answers.css.actio nBar.firstItem);li.appendChild(editLink);contents.insertBefore(li,contents.first Child);menus[el.id]=new YAHOO.widget.Overlay(el.id+YAHOO.Search.Answers.css.acti onBar.menuPostfix,{visible:false,constraintoviewport:false,zIndex:2});menus[el.i d].setBody(contents);menus[el.id].render(el);YAHOO.util.Event.on(el.getElementsB yTagName('a')[0],'click',function(e){YAHOO.util.Event.preventDefault(e);});YAHOO .util.Event.on(el,'mouseover',function(e){menus[this.id].cfg.setProperty('contex t',[this,'tl','bl']);menus[this.id].show();clearTimeout(hoverTimer);});YAHOO.uti l.Event.on(el,'mouseout',function(e){var self=this;hoverTimer=setTimeout(functio n(){menus[self.id].hide();},500);});YAHOO.util.Event.on(el.getElementsByTagName( 'a'),'focus',function(e){var self=YAHOO.util.Dom.getAncestorByClassName(this,'me nu');menus[self.id].cfg.setProperty('context',[self,'tl','bl']);menus[self.id].s how();clearTimeout(hoverTimer);});YAHOO.util.Event.on(el.getElementsByTagName('a '),'blur',function(e){var self=YAHOO.util.Dom.getAncestorByClassName(this,'menu' );hoverTimer=setTimeout(function(){menus[self.id].hide();},500);});}} return{init:function(){var bar=document.getElementById(YAHOO.Search.Answers.css.

actionBar.actionBarId);var drops=YAHOO.Search.Answers.css.actionBar.dropDownIds; if(bar){for(var i=0,l=drops.length;i<l;i++){var drop=document.getElementById(dro ps[i]);if(drop){YAHOO.util.Dom.addClass(drop,YAHOO.Search.Answers.css.actionBar. dropDownClass);createDropDown(drop);}} YAHOO.util.Event.on(bar.getElementsByTagName('li'),'mouseenter',function(e){if(! YAHOO.util.Dom.hasClass(this,'disabled')&&this.parentNode.id==='yan-question-too ls'){YAHOO.util.Dom.addClass(this,'hover');}});YAHOO.util.Event.on(bar.getElemen tsByTagName('li'),'mouseleave',function(e){if(this.parentNode.id==='yan-question -tools'){YAHOO.util.Dom.removeClass(this,'hover');}});}}};}();YAHOO.Search.Answe rs.starQuestion=function(){var MESSAGE_FAIL=0;var MESSAGE_SUCCESS=1;function ini tStar(el){var qid=el.href.match(/qid=([^&]*)/)[1];function handleStar(type,args) {if(args[0]===qid){var starCount=YAHOO.util.Dom.getElementsByClassName(YAHOO.Sea rch.Answers.css.starQuestion.starCountClass,'span',el)[0];if(YAHOO.util.Dom.hasC lass(el,YAHOO.Search.Answers.css.starQuestion.starredClass)){YAHOO.util.Dom.remo veClass(el,YAHOO.Search.Answers.css.starQuestion.starredClass);if(starCount&&par seInt(starCount.firstChild.nodeValue,10)>0){starCount.firstChild.nodeValue=(pars eInt(starCount.firstChild.nodeValue,10)-1);if(parseInt(starCount.firstChild.node Value,10)===0){YAHOO.util.Dom.removeClass(starCount,YAHOO.Search.Answers.css.sta rQuestion.hasStarsClass);}}} else{YAHOO.util.Dom.addClass(el,YAHOO.Search.Answers.css.starQuestion.starredCla ss);YAHOO.util.Dom.addClass(starCount,YAHOO.Search.Answers.css.starQuestion.hasS tarsClass);if(starCount){starCount.firstChild.nodeValue=(parseInt(starCount.firs tChild.nodeValue,10)+1);}}}} YAHOO.Search.Answers.starEvent.subscribe(handleStar);YAHOO.util.Event.on(el,'cli ck',toggleStar);} function toggleStar(e){var target=this;function callbackSuccess(o){var response= eval('('+o.responseText+')');YAHOO.util.Dom.removeClass(target,YAHOO.Search.Answ ers.css.starQuestion.addStarClass);YAHOO.util.Dom.removeClass(target,YAHOO.Searc h.Answers.css.starQuestion.removeStarClass);if(response.error==='overlimit'){dis playMessage(YAHOO.Search.Answers.labels.starQuestion.overLimit.replace(/%emphasi s_open%/,'<em class="failure">').replace(/%emphasis_close%/,'</em>'),MESSAGE_FAI L);} else{if(response.star_success_text!=='undefined'){if(YAHOO.util.Dom.hasClass(tar get,YAHOO.Search.Answers.css.starQuestion.starredClass)){var msg=document.getEle mentById(YAHOO.Search.Answers.css.starQuestion.statusPrefix+qid);if(msg){msg.par entNode.removeChild(msg);}} else{displayMessage(YAHOO.Search.Answers.labels.starQuestion.addSuccess.replace( /%emphasis_open%/,'<em class="success">').replace(/%emphasis_close%/,'</em>').re place(/%link_open%/,'<a href="/my/qa/index?link=starred">').replace(/%link_close %/,'</a>'),MESSAGE_SUCCESS);} YAHOO.Search.Answers.starEvent.fire(qid,starState,primaryQuestion);} else{displayMessage(YAHOO.Search.Answers.labels.starQuestion.connectionError.rep lace(/%emphasis_open%/,'<em class="failure">').replace(/%emphasis_close%/,'</em> '),MESSAGE_FAIL);}}} function callbackFail(o){YAHOO.util.Dom.removeClass(target,YAHOO.Search.Answers. css.starQuestion.addStarClass);YAHOO.util.Dom.removeClass(target,YAHOO.Search.An swers.css.starQuestion.removeStarClass);displayMessage(YAHOO.Search.Answers.labe ls.starQuestion.connectionError.replace(/%emphasis_open%/,'<em class="failure">' ).replace(/%emphasis_close%/,'</em>'),MESSAGE_FAIL);} function displayMessage(message,type){if(YAHOO.util.Dom.hasClass(target,YAHOO.Se arch.Answers.css.starQuestion.showStatusClass)){var msg=document.getElementById( YAHOO.Search.Answers.css.starQuestion.statusPrefix+qid);if(!msg){msg=document.cr eateElement('p');msg.id=YAHOO.Search.Answers.css.starQuestion.statusPrefix+qid;Y AHOO.util.Dom.addClass(msg,YAHOO.Search.Answers.css.starQuestion.starStatusClass );} if(type===MESSAGE_SUCCESS){YAHOO.util.Dom.addClass(msg,YAHOO.Search.Answers.css. starQuestion.successClass);} else if(type===MESSAGE_FAIL){YAHOO.util.Dom.addClass(msg,YAHOO.Search.Answers.cs s.starQuestion.failureClass);} msg.innerHTML=message;YAHOO.Search.Answers.interestingList.displayMessage(msg);}

} YAHOO.util.Event.preventDefault(e);var url=this.href.replace(/done=[^&]*/,'');va r qid=url.match(/qid=([^&]*)/)[1];var starState;var primaryQuestion=false;if(YAH OO.util.Dom.isAncestor(document.getElementById('yan-question-tools'),this)){prim aryQuestion=true;} if(YAHOO.util.Dom.hasClass(this,YAHOO.Search.Answers.css.starQuestion.starredCla ss)){YAHOO.util.Dom.addClass(this,YAHOO.Search.Answers.css.starQuestion.removeSt arClass);url=url.replace(/method=[^&]*/,'method=unStarItem');starState=false;} else{YAHOO.util.Dom.addClass(this,YAHOO.Search.Answers.css.starQuestion.addStarC lass);url=url.replace(/method=[^&]*/,'method=starItem');starState=true;} var callback={success:callbackSuccess,failure:callbackFail};YAHOO.util.Connect.a syncRequest('GET',url,callback);} return{init:function(type,args){var method=function(el){var re=new RegExp('(star Item|unStarItem)');return(re.test(el.href)&&!el.href.match('login'));};var targe ts=YAHOO.util.Dom.getElementsBy(method,'a');if(targets.length>0){YAHOO.util.Dom. batch(targets,initStar);}},initStar:function(el){initStar(el);}};}();YAHOO.Searc h.Answers.alertPane=function(){var div=false,panel,classToRemove=false;function showAlert(e,args){if(!div){div=document.createElement('div');div.id=YAHOO.Search .Answers.css.alertPane.alertId;document.body.appendChild(div);panel=new YAHOO.wi dget.Dialog(div,{modal:true,visible:false,fixedcenter:true,constraintoviewport:t rue,draggable:false,close:true,underlay:'none'});} if(classToRemove){YAHOO.util.Dom.removeClass(div,classToRemove);classToRemove=fa lse;} if(args[0].addClass){YAHOO.util.Dom.addClass(div,args[0].addClass);classToRemove =args[0].addClass;} panel.setHeader('<div>'+args[0].header+'</div>');panel.setBody(args[0]['body']); panel.cfg.queueProperty('buttons',args[0].footer);panel.cfg.queueProperty('width ',args[0].width||'373px');panel.render();panel.show();} function hideAlert(){panel.hide();} return{init:function(){YAHOO.Search.Answers.showAlert.subscribe(showAlert);YAHOO .Search.Answers.closeAlert.subscribe(hideAlert);}};}();YAHOO.Search.Answers.seoT humbs=function(){var clicked,rater=null,submitted=false;function handleClick(e){ var target=YAHOO.util.Event.getTarget(e);YAHOO.util.Event.preventDefault(e);if(! submitted){submitted=true;if(!YAHOO.util.Dom.hasClass(target,YAHOO.Search.Answer s.css.seoThumbs.onClass)){YAHOO.util.Dom.addClass(target,YAHOO.Search.Answers.cs s.seoThumbs.onClass);} clicked=target.id;var url=target.href.replace(/done=[^&]*&/,'');var callback={su ccess:callbackSuccess,failure:callbackFail};YAHOO.util.Connect.asyncRequest('GET ',url,callback);}} function callbackSuccess(o){var response=eval('('+o.responseText+')');if(clicked ===YAHOO.Search.Answers.css.seoThumbs.upId) {var hd=rater.getElementsByTagName('h4')[0];var containers=YAHOO.util.Dom.getEle mentsByClassName(YAHOO.Search.Answers.css.seoThumbs.containerClass,'div',rater); if(hd&&containers.length>0){var container=containers[0];if(YAHOO.util.Dom.hasCla ss(rater,YAHOO.Search.Answers.css.seoThumbs.loggedInClass)){var string=YAHOO.Sea rch.Answers.labels.seoThumbs.thanksMsgLgdIn;}else{var string=YAHOO.Search.Answer s.labels.seoThumbs.thanksMsg.replace(/%bold%/,'<strong>');string=string.replace( /%end_bold%/,'</strong>');string=string.replace(/%a%/,'<a href="/my/my">');strin g=string.replace(/%end_a%/,'</a>');} YAHOO.util.Dom.addClass(hd,YAHOO.Search.Answers.css.seoThumbs.yesHdClass);hd.inn erHTML=string;}} else if(clicked===YAHOO.Search.Answers.css.seoThumbs.downId) {var hd=rater.getElementsByTagName('h4')[0];var containers=YAHOO.util.Dom.getEle mentsByClassName(YAHOO.Search.Answers.css.seoThumbs.containerClass,'div',rater); if(hd&&containers.length>0){var container=containers[0];hd.innerHTML=YAHOO.Searc h.Answers.labels.seoThumbs.textAreaBLabel;var f=document.createElement('form');f .action='/question/';var l=document.createElement('label');l.innerHTML=YAHOO.Sea rch.Answers.labels.seoThumbs.textAreaSLabel;l.setAttribute('for','yan-seo-answer ');var h=document.createElement('input');h.type='hidden';h.value='ask';h.name='l ink';var t=document.createElement('textarea');t.name='title';t.id='yan-seo-answe

r';var p=document.createElement('p');p.className='cta';var b=document.createElem ent('button');b.name='submit';b.className='blue';YAHOO.util.Event.on(b,'click',f unction(e){this.form.submit();});b.innerHTML='<span><span><span><span>'+YAHOO.Se arch.Answers.labels.seoThumbs.buttonLabel+'<\/span><\/span><\/span><\/span>';p.a ppendChild(b);f.appendChild(l);f.appendChild(h);f.appendChild(t);f.appendChild(p );YAHOO.Search.Answers.limitCharacters(t,YAHOO.Search.Answers.labels.seoThumbs.l imit,true,YAHOO.Search.Answers.labels.limitCharacters.statusCount,"block",YAHOO. Search.Answers.css.askMini.countClass);container.appendChild(f);}}} function callbackFail(o){} return{init:function(){rater=document.getElementById(YAHOO.Search.Answers.css.se oThumbs.rateId);if(rater){var thumbs=rater.getElementsByTagName('ul')[0];if(thum bs){YAHOO.util.Event.on(thumbs,'click',handleClick);}}}};}();YAHOO.Search.Answer s.User=function(){return{getNick:function(){return YAHOO.util.Dom.getElementsByC lassName('fn','a',document.getElementById('yan-mystatus'))[0].firstChild.nodeVal ue;},getAvatar:function(){return YAHOO.util.Dom.getElementsByClassName('photo',' img',document.getElementById('yan-mystatus'))[0].src;}};}();YAHOO.Search.Answers .interestingList=function(){var dropdown;function handleStar(e,args){if(args[2]) {var container=document.getElementById('yan-interesting-menu');var list=containe r.getElementsByTagName('ol')[0];if(args[1]){if(!YAHOO.util.Dom.getElementsByClas sName('you','li',list)[0]){if(!list){list=document.createElement('ol');var p=YAH OO.util.Dom.getElementsByClassName('bd','p',container)[0];p.parentNode.replaceCh ild(list,p);} var listItem=document.createElement('li');YAHOO.util.Dom.addClass(listItem,'you' );YAHOO.util.Dom.addClass(listItem,'vcard');var link=document.createElement('a') ;link.href='/my/my';YAHOO.util.Dom.addClass(link,'fn');YAHOO.util.Dom.addClass(l ink,'nick');var img=document.createElement('img');img.src=YAHOO.Search.Answers.U ser.getAvatar();img.width=16;img.height=16;img.alt='';link.appendChild(img);link .appendChild(document.createTextNode(YAHOO.Search.Answers.labels.interestingList .you));listItem.appendChild(link);if(list.getElementsByTagName('li').length>0&&l ist.getElementsByTagName('li').length<50){list.insertBefore(listItem,list.firstC hild);} else{list.appendChild(listItem);} var count=YAHOO.util.Dom.getElementsByClassName('count','span',container);if(cou nt.length>0){count[0].innerHTML=parseInt(YAHOO.util.Dom.getElementsByClassName(' count','span',container)[0].innerHTML,10)+1;}}} else{var you=YAHOO.util.Dom.getElementsByClassName('you','li',list)[0];if(you){l ist.removeChild(you);if(list.getElementsByTagName('li').length===0){text=documen t.createElement('p');YAHOO.util.Dom.addClass(text,'bd');text.innerHTML=YAHOO.Sea rch.Answers.labels.interestingList.noStars;var ol=container.getElementsByTagName ('ol')[0];ol.parentNode.replaceChild(text,ol);}} var count=YAHOO.util.Dom.getElementsByClassName('count','span',container);if(cou nt.length>0){count[0].innerHTML=parseInt(YAHOO.util.Dom.getElementsByClassName(' count','span',container)[0].innerHTML)-1;}} if(list&&list.getElementsByTagName('li').length>0){if(list.getElementsByTagName( 'li').length<50){var it=list.getElementsByTagName('li');YAHOO.util.Dom.removeCla ss(it,YAHOO.Search.Answers.css.showClass);for(var j=0;j<12;j++){YAHOO.util.Dom.a ddClass(it[j],YAHOO.Search.Answers.css.showClass);} if(!YAHOO.util.Dom.hasClass(list,YAHOO.Search.Answers.css.showClass)&&it.length> 12){var trigger=YAHOO.util.Dom.getElementsByClassName(YAHOO.Search.Answers.css.m oreList.moreClass,'a',container)[0];if(!trigger){trigger=document.createElement( 'a');YAHOO.util.Dom.addClass(trigger,YAHOO.Search.Answers.css.moreList.moreClass );trigger.setAttribute('href','#');list.parentNode.appendChild(trigger);} trigger.innerHTML=YAHOO.Search.Answers.labels.allLabel.replace(/%count%/,it.leng th);}}}}} return{displayMessage:function(msg){var menu=document.getElementById('yan-intere sting-menu');if(menu){var header=menu.getElementsByTagName('h2')[0].nextSibling; header.parentNode.insertBefore(msg,header);}},init:function(){var interesting=do cument.getElementById('yan-interesting');if(interesting){YAHOO.Search.Answers.st arEvent.subscribe(handleStar);var heading=document.createElement('h2');var headi ngText=interesting.getElementsByTagName('h2')[0].getElementsByTagName('a');if(he

adingText.length>0){headingText=interesting.getElementsByTagName('h2')[0].getEle mentsByTagName('a')[0].firstChild.nodeValue;} else{headingText=interesting.getElementsByTagName('h2')[0].getElementsByTagName( 'span')[0].firstChild.nodeValue;} heading.appendChild(document.createTextNode(headingText));interesting.replaceChi ld(heading,interesting.getElementsByTagName('h2')[0]);var contents=interesting.i nnerHTML;var starthis=document.getElementById('yan-starthis');if(starthis){dropd own=new YAHOO.widget.Overlay(interesting.id+YAHOO.Search.Answers.css.actionBar.m enuPostfix,{visible:false,constraintoviewport:false,zIndex:2});dropdown.setBody( contents);interesting.parentNode.removeChild(interesting);dropdown.render(starth is);var hoverTimer;YAHOO.util.Event.on(starthis,'mouseover',function(e){dropdown .cfg.setProperty('context',[this,'tl','bl']);dropdown.show();clearTimeout(hoverT imer);});YAHOO.util.Event.on(starthis,'mouseout',function(e){hoverTimer=setTimeo ut(function(){var status=YAHOO.util.Dom.getElementsByClassName('star-status','p' ,'yan-interesting-menu');if(status.length>0){status[0].parentNode.removeChild(st atus[0]);} dropdown.hide();},500);});YAHOO.util.Event.on(starthis.getElementsByTagName('a') ,'focus',function(e){var self=YAHOO.util.Dom.getAncestorByClassName(this,'menu') ;dropdown.cfg.setProperty('context',[self,'tl','bl']);dropdown.show();clearTimeo ut(hoverTimer);});YAHOO.util.Event.on(starthis.getElementsByTagName('a'),'blur', function(e){var self=YAHOO.util.Dom.getAncestorByClassName(this,'menu');hoverTim er=setTimeout(function(){dropdown.hide();},500);});var limit=YAHOO.util.Dom.getE lementsByClassName('limit','p','yan-interesting-menu');if(limit.length>0){limit[ 0].innerHTML=limit[0].innerHTML.replace(/\b50\b/,'12');}}}}};}();YAHOO.Search.An swers.confirmations=function(){function confirm(e){var selector=false;if(this.id !==''){selector=this.id;}else{selector=this.className;} if(!window.confirm(YAHOO.Search.Answers.labels.confirmations[selector])){YAHOO.u til.Event.preventDefault(e);}} return{init:function(){for(var i=0,l=YAHOO.Search.Answers.css.confirmations.sele ctors.length;i<l;i++){var el=document.getElementById(YAHOO.Search.Answers.css.co nfirmations.selectors[i]);if(el){YAHOO.util.Event.on(el,'click',confirm);}else{v ar els=YAHOO.util.Dom.getElementsByClassName(YAHOO.Search.Answers.css.confirmati ons.selectors[i],'a');if(els.length>0){YAHOO.util.Event.on(els,'click',confirm); }}}}};}();YAHOO.Search.Answers.spellChecker=function(){var beingChecked=false,cu rrentIndex=false,currentOffset=0,otherWords,suggestedWord,spelling,cur,offset,al ternatives,div,container=false,done,ignore,change,obj;function checkSpelling(e,t oCheck,insertAfter,json){if(e){YAHOO.util.Event.preventDefault(e);} if(container){return;} YAHOO.Search.Answers.spellCheckStarted.fire();container=document.createElement(' div');div=document.createElement('div');container.appendChild(div);if(insertAfte r){var afterEl=YAHOO.util.Dom.getNextSibling(toCheck);if(afterEl&&YAHOO.util.Dom .hasClass(afterEl,'count-chars')){YAHOO.util.Dom.insertAfter(container,toCheck.n extSibling);} else{YAHOO.util.Dom.insertAfter(container,toCheck);}} else {YAHOO.util.Dom.insertBefore(container,toCheck);} currentOffset=0;if(json){beingChecked=toCheck;container.className=YAHOO.Search.A nswers.css.spellChecker.container;div.innerHTML='';checkerDisplay();if(json.leng th>0){currentIndex=0;obj=json;correctSpelling();}else{noMistakes();}} else{var toSend=toCheck.value?toCheck.value:'';if(toSend!==''){beingChecked=toCh eck;var url='/common/util/ks-spellcheck.php?iformat=text&oformat=js&text='+toSen d+'&lang='+YAHOO.Search.Answers.labels.spellChecker.useLang;var callback={succes s:callbackSuccess,failure:callbackFail};YAHOO.util.Connect.asyncRequest('GET',ur l,callback);div.innerHTML='<img src="http://l.yimg.com/sc/28176/answers2/images/ a/i/us/pim/dclient/img/md5/c8ad9845c9414424cb5854238af212b0_1.gif">';}else{check erDisplay();noMistakes();}}} function checkerDisplay(){container.className=YAHOO.Search.Answers.css.spellChec ker.container;var buttons=document.createElement('div');buttons.className='spell check-buttons';change=document.createElement('button');change.innerHTML=YAHOO.Se arch.Answers.labels.spellChecker.buttonChange;YAHOO.util.Dom.addClass(change,'ch

ange');if(buttons.appendChild(change)){YAHOO.util.Event.on(change,'click',change Word);} ignore=document.createElement('button');ignore.innerHTML=YAHOO.Search.Answers.la bels.spellChecker.buttonIgnore;YAHOO.util.Dom.addClass(ignore,'ignore');if(butto ns.appendChild(ignore)){YAHOO.util.Event.on(ignore,'click',function(e){YAHOO.uti l.Event.preventDefault(e);currentIndex++;correctSpelling();});} done=document.createElement('button');done.innerHTML=YAHOO.Search.Answers.labels .spellChecker.buttonDone;YAHOO.util.Dom.addClass(done,'done');if(buttons.appendC hild(done)){YAHOO.util.Event.on(done,'click',function(e){YAHOO.util.Event.preven tDefault(e);beingChecked=false;checkerClose();});} container.appendChild(buttons);} function checkerClose(){if(container){container.parentNode.removeChild(container );container=null;otherWords=null;beingChecked=false;}} function callbackSuccess(o){var response=eval('('+o.responseText+')');container. className=YAHOO.Search.Answers.css.spellChecker.container;div.innerHTML='';check erDisplay();if(response.length>0){currentIndex=0;obj=response;correctSpelling(); }else{noMistakes();}} function noMistakes(){div.innerHTML='<strong>'+YAHOO.Search.Answers.labels.spell Checker.msgNoMistakes+'</strong>';} function callbackFail(){return;} function spellingFinished(){YAHOO.Search.Answers.spellCheckComplete.fire();ignor e.disabled=true;change.disabled=true;div.innerHTML='<strong>'+YAHOO.Search.Answe rs.labels.spellChecker.msgNoMore+'</strong>';} function correctSpelling(){if(currentIndex===obj.length){spellingFinished();} if(obj[currentIndex]){cur=obj[currentIndex];offset=parseInt(cur.offset,10)+parse Int(currentOffset,10);alternatives=cur.suggestions;if(!otherWords){var suggested Container=document.createElement('div');YAHOO.util.Dom.addClass(suggestedContain er,'changeto');var suggestedWordLabel=document.createElement('label');suggestedW ordLabel.innerHTML=YAHOO.Search.Answers.labels.spellChecker.labelChange;suggeste dWordLabel.setAttribute('for',YAHOO.Search.Answers.css.spellChecker.suggestedLab el);suggestedWord=document.createElement('input');suggestedWord.type='text';sugg estedWord.id=YAHOO.Search.Answers.css.spellChecker.suggestedLabel;suggestedConta iner.appendChild(suggestedWordLabel);suggestedContainer.appendChild(suggestedWor d);div.appendChild(suggestedContainer);var otherWordsContainer=document.createEl ement('div');YAHOO.util.Dom.addClass(otherWordsContainer,'otherwords');var other WordsLabel=document.createElement('label');otherWordsLabel.innerHTML=YAHOO.Searc h.Answers.labels.spellChecker.labelSuggestion;otherWordsLabel.setAttribute('for' ,YAHOO.Search.Answers.css.spellChecker.otherLabel);otherWords=document.createEle ment('select');otherWords.id=YAHOO.Search.Answers.css.spellChecker.otherLabel;ot herWords.size=3;otherWordsContainer.appendChild(otherWordsLabel);otherWordsConta iner.appendChild(otherWords);div.appendChild(otherWordsContainer);div.innerHTML= div.innerHTML;otherWords=document.getElementById(YAHOO.Search.Answers.css.spellC hecker.otherLabel);suggestedWord=document.getElementById(YAHOO.Search.Answers.cs s.spellChecker.suggestedLabel);YAHOO.util.Event.on(otherWords,'change',changeSel ection);} otherWords.options.length=0;for(var i=0,l=alternatives.length;i<l;i++){var o=doc ument.createElement('option');o.innerHTML=alternatives[i];o.setAttribute('value' ,alternatives[i]);otherWords.appendChild(o);} otherWords.selectedIndex=0;suggestedWord.value=alternatives[0]||'';if(typeof(bei ngChecked.selectionStart)=='number'){setTimeout(function(){beingChecked.focus(); beingChecked.select();beingChecked.selectionStart=offset;beingChecked.selectionE nd=offset+cur.word.length;},1);}else if(document.selection&&document.selection.c reateRange){setTimeout(function(){beingChecked.focus();beingChecked.select();var range=document.selection.createRange();range.collapse();range.moveStart('charac ter',offset);range.moveEnd('character',cur.word.length);range.select();},1);}}} function changeSelection(e){var selected=this.value;suggestedWord.value=selected ;} function changeWord(e){YAHOO.util.Event.preventDefault(e);var newText='';var w=s uggestedWord.value;var oldText=beingChecked.value;newText+=oldText.substr(0,pars eInt(offset,10));newText+=w;newText+=oldText.substr(parseInt(offset,10)+parseInt

(cur.word.length,10),parseInt(oldText.length,10)-(parseInt(offset,10)+parseInt(c ur.word.length,10)));beingChecked.value=newText;currentOffset+=parseInt(w.length ,10)-parseInt(cur.word.length,10);currentIndex++;correctSpelling();} return{init:function(){var els=YAHOO.util.Dom.getElementsByClassName(YAHOO.Searc h.Answers.css.spellChecker.checkClass,'textarea');if(els.length>0){for(var i=0,l =els.length;i<l;i++){var a=document.createElement('a');YAHOO.util.Dom.addClass(a ,YAHOO.Search.Answers.css.spellChecker.triggerClass);a.href='#';a.innerHTML=YAHO O.Search.Answers.labels.spellChecker.labelCheck;if(YAHOO.util.Dom.insertBefore(a ,els[i])){YAHOO.util.Event.on(a,'click',checkSpelling,els[i]);}}}},check:functio n(el,insertAfter,json){el=YAHOO.util.Dom.get(el);insertAfter=insertAfter||false; checkSpelling(null,el,insertAfter,json);},close:function(){checkerClose();},getT arget:function(){return beingChecked;}};}();YAHOO.Search.Answers.externalLinks=f unction(){function textForExternal(el){return(el&&el.getAttribute('rel')&&(el.ge tAttribute('rel').match(/\bexternal\b/)||el.getAttribute('rel').match(/\bpopup\b /)));} function newWindow(e){if(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey){return true ;}else{YAHOO.util.Event.preventDefault(e);if(this.getAttribute('rel').match(/\be xternal\b/)){var win=window.open(this.getAttribute('href'),'_blank');if(win){if( win.focus){win.focus();} return false;} win=null;}else if(this.getAttribute('rel').match(/\bpopup\b/)){var win=window.op en(this.getAttribute('href'),'popup','width=700px,height=420px,status=0,location =0,resizable=1,scrollbars=1');}} return true;} return{init:function(){var els=YAHOO.util.Dom.getElementsBy(textForExternal,'a') ;if(els.length>0){YAHOO.util.Event.on(els,'click',newWindow);}}};}();YAHOO.Searc h.Answers.advancedSearch=function(){function handleClick(e){var searchTerms=docu ment.getElementById('yan-p');if(!YAHOO.util.Dom.hasClass(searchTerms,'default')& &searchTerms.value.length>0){searchTerms.form.action='/search/search_advance';se archTerms.form.submit();YAHOO.util.Event.preventDefault(e);}} return{init:function(){YAHOO.util.Event.on(document.getElementById('advanced-sea rch'),'click',handleClick);}};}();YAHOO.Search.Answers.askFlow=function(){var Cs s=YAHOO.Search.Answers.css.askFlow,Yud=YAHOO.util.Dom,Yue=YAHOO.util.Event;retur n{init:function(){var label=document.getElementById(Css.labelMoveFrom);if(label) {var txtField=document.getElementById(Css.labelMoveTo);var originalValue=txtFiel d.value;txtField.defaultValue=label.innerHTML;txtField.value=originalValue;if(tx tField.value===label.innerHTML||txtField.value===''){Yud.addClass(txtField,Css.l abelMovedClass);txtField.defaultValue=label.innerHTML;txtField.value=label.inner HTML;} Yue.on(txtField,'focus',function(e){Yud.removeClass(this,Css.labelMovedClass);if (this.value===label.innerHTML||this.value===''){this.value='';}});Yue.on(txtFiel d,'blur',function(e){if(this.value===''){Yud.addClass(txtField,Css.labelMovedCla ss);this.value=label.innerHTML;}});Yue.on(txtField,'change',function(e){if(this. value!==label.innerHTML){Yud.removeClass(this,Css.labelMovedClass);}});YAHOO.Sea rch.Answers.qualityTips.addCheck(txtField,{'spell':true,'caps':true,'too_short': true,'non_alpha':true,'similar':true},true,'questionTitle');YAHOO.Search.Answers .limitCharacters(txtField,110,false,YAHOO.Search.Answers.labels.limitCharacters. statusCount,"block",YAHOO.Search.Answers.css.askFlow.countClass,label.innerHTML) ;txtField.spellcheck=true;} var detailField=document.getElementById('yan-ask-details');if(detailField){YAHOO .Search.Answers.qualityTips.addCheck(detailField,{'spell':true,'caps':true,'non_ alpha':true},true);YAHOO.Search.Answers.limitCharacters(detailField,5000,false,Y AHOO.Search.Answers.labels.limitCharacters.statusCount,"block",YAHOO.Search.Answ ers.css.askFlow.countClass);} var form=document.getElementById('yan-ask-preview');if(form){var QtEl=document.g etElementById('yan-qt');if(Yud.hasClass(QtEl,'qt-vitality')) {Yud.setY(QtEl,Yud.getY(document.getElementById('yan-vitality-setting'))-13);} YAHOO.Search.Answers.disableDoubleSubmit(form);}}};}();YAHOO.Search.Answers.disa bleDoubleSubmit=function(form){YAHOO.util.Event.removeListener(form.getElementsB yTagName('button'),'click');YAHOO.util.Event.on(form.getElementsByTagName('butto

n'),'click',function(e){YAHOO.util.Dom.batch(form.getElementsByTagName('button') ,function(el){el.disabled=true;YAHOO.util.Dom.addClass(el,'disabled');});YAHOO.u til.Event.preventDefault(e);YAHOO.util.Event.removeListener(form.getElementsByTa gName('button'),'click');var input=document.createElement('input');input.type='h idden';input.name=this.name;input.value=this.value;form.appendChild(input);form. submit();});} YAHOO.Search.Answers.answerFlow=function(){var Css=YAHOO.Search.Answers.css.answ erFlow,Yud=YAHOO.util.Dom,Yue=YAHOO.util.Event;function focusLabel(e){var id=thi s.id.replace(/f-/,'');if(document.getElementById(id)&&document.getElementById(id ).focus){document.getElementById(id).focus();}} return{init:function(){if(document.getElementById('yan-answer-answer')){YAHOO.Se arch.Answers.qualityTips.addCheck(document.getElementById('yan-answer-answer'),{ 'spell':true,'caps':true,'too_short':false,'non_alpha':true},true);} if(document.getElementById('yan-answer-withgroup')){YAHOO.Search.Answers.quality Tips.addCheck(document.getElementById('yan-answer-withgroup'),{'show_default':tr ue},false,'answerGroup');var formEl=Yud.get('yan-answer-search-inline');} var form=document.getElementById('yan-answer-preview');if(form){var QtEl=documen t.getElementById('yan-qt');if(Yud.hasClass(QtEl,'qt-vitality')) {Yud.setY(QtEl,Yud.getY(document.getElementById('yan-vitality-setting'))-13);} YAHOO.Search.Answers.disableDoubleSubmit(form);} var form=document.getElementById('yan-answer-entertext');if(form){YAHOO.Search.A nswers.disableDoubleSubmit(form);} if(document.getElementById(Css.webSearchForm)){document.getElementById(Css.webSe archForm).target='_blank';} var els=Yud.getElementsByClassName(Css.actsAsLabel);if(els.length>0){Yue.on(els, 'click',focusLabel);}}};}();YAHOO.Search.Answers.qualityTips=function(){var clas sToRemove=false,typeToHide=false,Css=YAHOO.Search.Answers.css.askFlow,inProgress =false,inProgressEl=false,pollTimer,hideTimer,defaultLabels=YAHOO.Search.Answers .labels.qualityTips.defaultLabels,QtEl=false,tips={},QtUrl='/question/qualityTip s?text=',Yuc=YAHOO.util.Connect,Yud=YAHOO.util.Dom,Yue=YAHOO.util.Event;function poll(e){var self=this;window.clearTimeout(pollTimer);var words=encodeURICompone nt(this.value);pollTimer=window.setTimeout(function(){getTips(self);},800);} function getTips(el){var callback={success:callbackSuccess,failure:callbackFail, timeout:7000,argument:el};YAHOO.util.Connect.abort(inProgress,callback);if(YAHOO .Search.Answers.spellChecker.getTarget()===el){renderTip(el,'spell_open');} else if(!YAHOO.util.Connect.isCallInProgress(inProgress)&&el.value.length>5&&el. value!==el.defaultValue){var url=QtUrl+encodeURIComponent(el.value)+'&curtime='+ (new Date().getTime().toString());var closedCases='';for(closedCase in tips[el.i d].closedCases) {closedCases+=closedCase+',';} url+='&closed='+encodeURIComponent(closedCases);if(tips[el.id].options.similar) {url+='&similar=1';} inProgress=YAHOO.util.Connect.asyncRequest('POST',url,callback);} else if(!YAHOO.util.Connect.isCallInProgress(inProgress)&&el.value.length===0&&t ips[el.id].options.show_default){renderTip(el,'default');}} function closeTip(){YAHOO.Search.Answers.qualityTipHidden.fire();Yud.addClass(Qt El,'closed');dimContent();} function dimContent(){var sidebar=document.getElementById('yan-answer-search-inl ine');if(sidebar){var children=YAHOO.util.Dom.getChildren(sidebar);var qtRegion= YAHOO.util.Dom.getRegion(QtEl);for(child in children){if(qtRegion&&qtRegion.inte rsect(YAHOO.util.Dom.getRegion(children[child]))){Yud.setStyle(children[child],' opacity','0.2');} else{Yud.setStyle(children[child],'opacity','1');}}}} function positionQt(el){if(QtEl){Yud.removeClass(QtEl,'closed');var close=docume nt.getElementById('yan-qt-close');if(!close){close=document.createElement('a');c lose.id='yan-qt-close';close.innerHTML='Close Tip';close.href='#';QtEl.insertBef ore(close,null);Yue.on(close,'click',function(e){Yue.preventDefault(e);closeTip( );if(tips[inProgressEl.id]) {tips[inProgressEl.id].closedCases[typeToHide]=true;if(inProgressEl.focus){inPro gressEl.focus();}}});}

Yud.setY(QtEl,Yud.getY(el)-26);dimContent();}} function qtSpellCheck(e,spellings){Yue.preventDefault(e);YAHOO.Search.Answers.sp ellChecker.close();YAHOO.Search.Answers.spellChecker.check(inProgressEl,true,spe llings);} function renderTip(el,type,options){var bds=Yud.getElementsByClassName('bd','div ',QtEl);Yud.removeClass(QtEl,'qt-error');Yud.removeClass(inProgressEl,'has-error ');inProgressEl=el;if(bds.length){if(classToRemove){Yud.removeClass(QtEl,classTo Remove);classToRemove=false;} var tip=tips[inProgressEl.id];if(!tip.labels){tip.labels='defaultLabels';} var bd=bds[0];if(type=='spell'){Yud.addClass(QtEl,'qt-eraser');classToRemove='qt -eraser';typeToHide='spell';var str=formatBd(YAHOO.Search.Answers.labels.quality Tips[tip.labels].issueSpelling||YAHOO.Search.Answers.labels.qualityTips.defaultL abels.issueSpelling);bd.innerHTML=str.replace(/%count%/,options.length);if(YAHOO .Search.Answers.spellChecker.getTarget()!==inProgressEl){bd.getElementsByTagName ('p')[1].innerHTML='<a href="#" id="yan-spell-launch">'+bd.getElementsByTagName( 'p')[1].innerHTML+'</a>';Yue.on('yan-spell-launch','click',qtSpellCheck,options) ;} else{bd.removeChild(bd.getElementsByTagName('p')[1]);} positionQt(inProgressEl);} else if(type=='spell_open'){Yud.addClass(QtEl,'qt-eraser');classToRemove='qt-era ser';bd.innerHTML=formatBd(YAHOO.Search.Answers.labels.qualityTips[tip.labels].i ssueSpellingOpen||YAHOO.Search.Answers.labels.qualityTips.defaultLabels.issueSpe llingOpen);positionQt(inProgressEl);} else if(type=='spell_complete'){Yud.addClass(QtEl,'qt-penciltip-tick');classToRe move='qt-penciltip-tick';bd.innerHTML=formatBd(YAHOO.Search.Answers.labels.quali tyTips[tip.labels].issueSpellingComplete||YAHOO.Search.Answers.labels.qualityTip s.defaultLabels.issueSpellingComplete);positionQt(inProgressEl);setTimeout(funct ion(){getTips(inProgressEl);},1500);} else if(type=='caps'){Yud.addClass(QtEl,'qt-bubble');classToRemove='qt-bubble';t ypeToHide='caps';bd.innerHTML=formatBd(YAHOO.Search.Answers.labels.qualityTips[t ip.labels].issueCaps||YAHOO.Search.Answers.labels.qualityTips.defaultLabels.issu eCaps);positionQt(inProgressEl);} else if(type=='short'){Yud.addClass(QtEl,'qt-penciltip');classToRemove='qt-penci ltip';typeToHide='short';bd.innerHTML=formatBd(YAHOO.Search.Answers.labels.quali tyTips[tip.labels].issueShort||YAHOO.Search.Answers.labels.qualityTips.defaultLa bels.issueShort);positionQt(inProgressEl);} else if(type=='too_long'){Yud.addClass(QtEl,'qt-eraser');classToRemove='qt-erase r';typeToHide='too_long';bd.innerHTML=formatBd(YAHOO.Search.Answers.labels.quali tyTips[tip.labels].issueLong);positionQt(inProgressEl);} else if(type=='non_alpha'){Yud.addClass(QtEl,'qt-bubble');classToRemove='qt-bubb le';typeToHide='non_alpha';bd.innerHTML=formatBd(YAHOO.Search.Answers.labels.qua lityTips[tip.labels].issuePunctuation||YAHOO.Search.Answers.labels.qualityTips.d efaultLabels.issuePunctuation);positionQt(inProgressEl);} else if(type=='similar'){Yud.addClass(QtEl,'qt-magnify');classToRemove='qt-magni fy';typeToHide='similar';bd.innerHTML=formatBd(YAHOO.Search.Answers.labels.quali tyTips[tip.labels].issueSimilar||YAHOO.Search.Answers.labels.qualityTips.default Labels.issueSimilar);positionQt(inProgressEl);YAHOO.Search.Answers.similarQuesti ons.show(options);} else if(type=='default'){typeToHide='default';bd.innerHTML=formatBd(YAHOO.Search .Answers.labels.qualityTips[tip.labels].default_tip);positionQt(inProgressEl);} YAHOO.Search.Answers.qualityTipShown.fire(type);}} function callbackSuccess(o){if(o.responseText&&YAHOO.Search.Answers.spellChecker .getTarget()!==o.argument){var el=o.argument;var response=eval('('+o.responseTex t+')');if(QtEl){var bds=Yud.getElementsByClassName('bd','div',QtEl);if(bds.lengt h>0){var tip=tips[o.argument.id];if(response){inProgressEl=o.argument;if(tip.opt ions.spell&&response.SPELL&&response.SPELL!==false&&!tip.closedCases['spell']){r enderTip(el,'spell',response.SPELL);}else if(tip.options.caps&&response.CAPS&&re sponse.CAPS!==false&&!tip.closedCases['caps']){renderTip(el,'caps');}else if(tip .options.too_short&&response.SHORT&&response.SHORT!==false&&!tip.closedCases['sh ort']){renderTip(el,'short');}else if(tip.options.too_long&&response.TOO_LONG&&r

esponse.TOO_LONG!==false&&!tip.closedCases['too_long']){renderTip(el,'too_long') ;}else if(tip.options.non_alpha&&response.NON_ALPHA&&response.NON_ALPHA!==false& &!tip.closedCases['non_alpha']){renderTip(el,'non_alpha');}else if(tip.options.s imilar&&response.SIMILAR&&response.SIMILAR!==false&&!tip.closedCases['similar']) {renderTip(el,'similar',response.SIMILAR);}else{closeTip();}} else {positionQt(inProgressEl);}}}}} function formatBd(content){var finalContent='';if(content.length>0){for(var i=0, l=content.length;i<l;i++){var str=content[i];var lastClass='';if(i==l-1){lastCla ss=' class="last"';} str=str.replace(/%openBold%/g,'<strong>');str=str.replace(/%closeBold%/g,'</stro ng>');str=str.replace(/%OPEN_LINK_GROUP_GUIDELINES%/g,'<a href="'+YAHOO.Search.A nswers.labels.qualityTips.groupDefault.guidelines_link+'">');str=str.replace(/%C LOSE_LINK%/g,'</a>');finalContent+='<p'+lastClass+'>'+str+'</p>';}} return finalContent;} function callbackFail(){Yud.addClass(QtEl,'closed');} function closeSpellCheck(){var el=YAHOO.Search.Answers.spellChecker.getTarget(); if(el){el.focus();YAHOO.Search.Answers.spellChecker.close();renderTip(el,'spell_ complete');}} function startSpellCheck(){getTips(inProgressEl);} return{addCheck:function(el,options,defaultEnabled,labels){QtEl=document.getElem entById('yan-qt');tips[el.id]={};tips[el.id].closedCases={};tips[el.id].options= options;tips[el.id].labels=labels;if(defaultEnabled) {var errorParra=QtEl.getElementsByTagName('p');var targetClass=new RegExp("(^|\\ s)qt-focus-[a-zA-Z0-9-_]+(\\s|$)");var targetID=false;for(var i=0;i<errorParra.l ength;i++){if(errorParra[0].className!=='') {var matches=targetClass.exec(errorParra[0].className);if(matches){targetID=matc hes[0].replace(/\s/gi,'').replace('qt-focus-','');}}} if(!targetID) {inProgressEl=el;if(!YAHOO.util.Dom.hasClass(QtEl,'qt-error')&&(el.value!==el.de faultValue)){getTips(el);} positionQt(el);}else{inProgressEl=document.getElementById(targetID);positionQt(i nProgressEl);}} if(YAHOO.util.Dom.hasClass(document.body,'tips-disabled')){return false;} YAHOO.Search.Answers.spellCheckComplete.subscribe(closeSpellCheck);YAHOO.Search. Answers.spellCheckStarted.subscribe(startSpellCheck);if(el.nodeName.toLowerCase( )=='textarea'||el.nodeName.toLowerCase()=='select'||(el.nodeName.toLowerCase()== 'input'&&el.type.toLowerCase()=='text')){Yue.on(el,'focus',function(e){clearTime out(hideTimer);getTips(this);});Yue.on(el,'keyup',poll);Yue.on(el,'change',poll) ;}},getTarget:function() {return inProgressEl;},refreshQTPos:function() {if(inProgressEl){positionQt(inProgressEl);}}};}();YAHOO.Search.Answers.multiSel ect=function(){var Yud=YAHOO.util.Dom,Yue=YAHOO.util.Event,multiContainer,catego rylisting,youHaveSelectedEl=false,selectedInput=false;function updateSelected(it em){var str;if(item.sub_categories){str=YAHOO.Search.Answers.labels.multiSelect. secondLabel;} else{str=YAHOO.Search.Answers.labels.multiSelect.selectedCategory;selectedInput= document.getElementById('yan-manualselected');if(!selectedInput){selectedInput=d ocument.createElement('input');selectedInput.name='category';selectedInput.type= 'hidden';selectedInput.id='yan-manualselected';multiContainer.appendChild(select edInput);} selectedInput.value=item.category;} str=str.replace(/%OPEN_EMPHASIS%/g,'<strong>');str=str.replace(/%CLOSE_EMPHASIS% /g,'</strong>');str=str.replace(/%CATEGORY%/g,item.text);youHaveSelectedEl.inner HTML=str;} function addCategory(select,item){var name=item.text,cid=item.category;if(item.s ub_categories){name+=' >';} var option=document.createElement('option');option.appendChild(document.createTe xtNode(name));option.value=cid;option.id='cat-'+cid;select.appendChild(option);} function createMultiSelect(el){var toMulti=el.getElementsByTagName('fieldset')[0

];var select1=document.createElement('select');var select2=document.createElemen t('select');var select3=document.createElement('select');multiContainer=toMulti. parentNode;multiContainer.removeChild(toMulti);categoryListing=createSelect(toMu lti,{});select1.length=0;var frag=document.createDocumentFragment();for(var item in categoryListing){addCategory(frag,categoryListing[item]);} select1.appendChild(frag);select1.size=select1.options.length;select2.size=selec t1.size;select3.size=select1.size;multiContainer.appendChild(select1);multiConta iner.appendChild(select2);multiContainer.appendChild(select3);multiContainer.inn erHTML=multiContainer.innerHTML;select1=multiContainer.getElementsByTagName('sel ect')[0];select2=multiContainer.getElementsByTagName('select')[1];select3=multiC ontainer.getElementsByTagName('select')[2];if(select1.selectedIndex!==-1) {select1.selectedIndex=-1;} Yue.on(select1,'change',function(){var listing=categoryListing[select1.options[s elect1.selectedIndex].id].sub_categories;select2.length=0;select3.length=0;if(li sting){var frag=document.createDocumentFragment();for(var item in listing){addCa tegory(frag,listing[item]);} select2.appendChild(frag);} updateSelected(categoryListing[select1.options[select1.selectedIndex].id]);});Yu e.on(select2,'change',function(){var listing=categoryListing[select1.options[sel ect1.selectedIndex].id].sub_categories[select2.options[select2.selectedIndex].id ].sub_categories;select3.length=0;if(listing){var frag=document.createDocumentFr agment();for(var item in listing){addCategory(frag,listing[item]);} select3.appendChild(frag);} updateSelected(categoryListing[select1.options[select1.selectedIndex].id].sub_ca tegories[select2.options[select2.selectedIndex].id]);});Yue.on(select3,'change', function(){updateSelected(categoryListing[select1.options[select1.selectedIndex] .id].sub_categories[select2.options[select2.selectedIndex].id].sub_categories[se lect3.options[select3.selectedIndex].id]);});} function createSelect(el,vTree){var children=el.childNodes;if(children.length>0) {for(var i=0,j=children.length;i<j;i++){var my_el=children[i];if(my_el.nodeName. toLowerCase()=='fieldset'){var prev=Yud.getPreviousSibling(my_el);var idToUse=pr ev.getAttribute('for')||prev.htmlFor;vTree[idToUse]['sub_categories']=createSele ct(my_el,{});} else if(my_el.nodeName.toLowerCase()=='input'&&my_el.type=='radio'){var idToGet= my_el.id;if(vTree[idToGet]){vTree[idToGet]['category']=my_el.value;} else{vTree[idToGet]={'category':my_el.value};}} else if(my_el.nodeName.toLowerCase()=='label'){var idToGet=my_el.getAttribute('f or')||my_el.htmlFor;if(vTree[idToGet]){vTree[idToGet]['text']=my_el.firstChild.n odeValue;} else{vTree[idToGet]={'text':my_el.firstChild.nodeValue};}}}} return vTree;} function changeTab(type,args){selectedInput=document.getElementById('yan-manuals elected');if(selectedInput){if(args[0]=='yan-ask-autocat'){selectedInput.disable d=true;} else{selectedInput.disabled=false;}}} return{init:function(){var els=Yud.getElementsByClassName('multi-select','div'); if(els.length>0){for(var i=0,j=els.length;i<j;i++){createMultiSelect(els[i]);} youHaveSelectedEl=document.createElement('p');youHaveSelectedEl.appendChild(docu ment.createTextNode(YAHOO.Search.Answers.labels.multiSelect.topLabel));multiCont ainer.appendChild(youHaveSelectedEl);YAHOO.Search.Answers.tabChange.subscribe(ch angeTab);}}};}();YAHOO.Search.Answers.questionFilter=function(){return{init:func tion(){var filter=document.getElementById('yan-question-filter');if(filter){YAHO O.util.Event.on(filter.getElementsByTagName('select')[0],'change',function(){fil ter.getElementsByTagName('form')[0].submit();});}}};}();YAHOO.Search.Answers.spe lling=function(){return{createRange:function(el,start,length){if(el){if(typeof(e l.selectionStart)=='number'){setTimeout(function(){el.focus();el.select();el.sel ectionStart=start;el.selectionEnd=start+length;},1);}else if(document.selection& &document.selection.createRange){setTimeout(function(){el.focus();el.select();va r range=document.selection.createRange();range.collapse();range.moveStart('chara cter',start);range.moveEnd('character',length);range.select();},1);}}},correctWo

rd:function(el,newWord){if(el){var newText='';var oldText=el.value;var offset=0; var wordLength=0;if(typeof(el.selectionStart)=='number'){offset=el.selectionStar t;wordLength=el.selectionEnd-el.selectionStart;}else if(document.selection&&docu ment.selection.createRange){var sel=el.getSelection();var range=sel.getRangeAt(0 );offset=range.startOffset;wordLength=range.endOffset-range.startOffset;} newText+=oldText.substr(0,parseInt(offset,10));newText+=newWord;newText+=oldText .substr(parseInt(offset,10)+parseInt(wordLength,10),parseInt(oldText.length,10)(parseInt(offset,10)+parseInt(wordLength,10)));el.value=newText;wordChanged.fire ();}}};}();YAHOO.Search.Answers.profileRegistration=function(){var toggle=functi on(e){var emailList=document.getElementById('yan-email-option-list');Yud.setStyl e(emailList,'display','block');Yud.setStyle(document.getElementById('change-emai l-link'),'display','none');Yud.setStyle(document.getElementById('current-email') ,'display','none');};return{init:function(){var emailList=document.getElementByI d('yan-email-option-list');if(emailList){var span=document.createElement('span') ;span.setAttribute('id','current-email');var labelEmail=document.getElementById( 'labelEmail0');if(labelEmail){span.innerHTML=labelEmail.innerHTML;emailList.pare ntNode.insertBefore(span,emailList);var anchor=document.createElement('a');Yud.a ddClass(anchor,YAHOO.Search.Answers.css.profileRegistration.changeReg);anchor.se tAttribute('id','change-email-link');anchor.innerHTML=YAHOO.Search.Answers.label s.profileRegistration.labelChange;emailList.parentNode.insertBefore(anchor,email List);Yue.on(anchor,'click',toggle);Yud.setStyle(emailList,'display','none');}}} };}();YAHOO.Search.Answers.bestAnswer=function(){var Yud=YAHOO.util.Dom;var Yue= YAHOO.util.Event;var Yan=YAHOO.Search.Answers;var QtEl;return{init:function(){va r el=document.getElementById('yan-bestanswer-feedback');if(el){Yan.limitCharacte rs(el,300,false,Yan.labels.limitCharacters.statusCount,"block",Yan.css.bestAnswe r.countClass);Yan.qualityTips.addCheck(el,{'spell':true,'caps':true,'non_alpha': true},true);}}};}();YAHOO.Search.Answers.carousel=function(){return{init:functio n(){var el=document.getElementById('yan-bestof');if(el){var pannels=YAHOO.util.D om.getElementsBy(function(o){if(o.parentNode.parentNode.parentNode==el){return t rue;} return false;},"li",el);if(pannels.length>2){var oCarouselConfig={visiblePanes:1 ,animDuration:0.5,loop:1};YAHOO.EU.oTicker=new YAHOO.EU.widget.Carousel().init(e l,oCarouselConfig).paginate().answersScroll().autoPlay({buttonLabel:"play",autoP layDelay:15000});}}}};}();YAHOO.Search.Answers.clickBox=function(){return{init:f unction(){var boxes=YAHOO.util.Dom.getElementsByClassName('clickbox');if(boxes.l ength>0){for(var i=0,box;box=boxes[i];i++){YAHOO.util.Event.on(box,'click',funct ion(e){var links=this.getElementsByTagName('a');if(links.length>0){document.loca tion.href=links[0].href;}});YAHOO.util.Event.on(box,'mouseenter',function(e){YAH OO.util.Dom.addClass(this,this.className.split(' ')[1]+'-hover');YAHOO.util.Dom. addClass(this,'hover');});YAHOO.util.Event.on(box,'mouseleave',function(e){YAHOO .util.Dom.removeClass(this,this.className.split(' ')[1]+'-hover');YAHOO.util.Dom .removeClass(this,'hover');});}}}};}();YAHOO.Search.Answers.similarQuestions=fun ction(){var callback={success:callbackSuccess,failure:callbackFail,timeout:7000} ,inProgress=false,container=false,similarUrl='/question/similarQuestions?text='; function addQuestion(question){var li=document.createElement('li');var avatar=do cument.createElement('img');avatar.src=question.avatar;avatar.alt='';avatar.widt h='24';avatar.height='24';li.appendChild(avatar);var title=document.createElemen t('h3');var link=document.createElement('a');link.appendChild(document.createTex tNode(question.title));link.href=question.url;title.appendChild(link);li.appendC hild(title);var text=document.createElement('p');text.appendChild(document.creat eTextNode(question.text));li.appendChild(text);var ul=document.createElement('ul ');ul.className='meta';var catName=document.createElement('li');catName.appendCh ild(document.createTextNode(question.category+' - '));var answerCount=document.c reateElement('li');var str;if(parseInt(question.answerCount,10)>1){str=YAHOO.Sea rch.Answers.labels.similarQuestions.answerCountPlural.replace(/%COUNT%/,question .answerCount);} else{str=YAHOO.Search.Answers.labels.similarQuestions.answerCount;} answerCount.appendChild(document.createTextNode(str));ul.appendChild(catName);ul .appendChild(answerCount);li.appendChild(ul);return li;} function clearQuestions(type,args){if(container&&args!='similar'){container.inne

rHTML='';}} function displayQuestions(response){if(!container){container=document.createElem ent('div');container.id='yan-similar-questions';document.getElementById('yan-con tent').appendChild(container);YAHOO.Search.Answers.qualityTipHidden.subscribe(cl earQuestions);YAHOO.Search.Answers.qualityTipShown.subscribe(clearQuestions);} clearQuestions();var hd=document.createElement('h2');hd.appendChild(document.cre ateTextNode(YAHOO.Search.Answers.labels.similarQuestions.title));container.appen dChild(hd);var ul=document.createElement('ul');ul.className='questions';for(var i=0,len=response.length;i<len;i++){ul.appendChild(addQuestion(response[i]));} container.appendChild(ul);} function callbackSuccess(o){if(o.responseText){var response=eval('('+o.responseT ext+')');displayQuestions(response);}} function callbackFail(){} function getQuestions(){if(!YAHOO.util.Connect.isCallInProgress(inProgress)){inP rogress=YAHOO.util.Connect.asyncRequest('GET',similarUrl+encodeURIComponent(docu ment.getElementById('yan-ask-title').value)+' '+encodeURIComponent(document.getE lementById('yan-ask-details').value)+'&curtime='+(new Date().getTime().toString( )),callback);}} return{show:function(questions){if(!questions){getQuestions();} else{displayQuestions(questions);}}};}();YAHOO.Search.Answers.articleRatings=fun ction(){var chartEl;function initChart(){var myChart,opinionData;opinionData=new YAHOO.util.DataSource(document.getElementById('yan-kh-ratings').getElementsByTa gName('table')[0],{responseType:YAHOO.util.DataSource.TYPE_HTMLTABLE,responseSch ema:{fields:["response","count"]}});var colors=[];opinionData.sendRequest(null,{ success:function(req,res){for(var i=0,len=res.results.length;i<len;i++){switch(r es.results[i].response){case YAHOO.Search.Answers.labels.ratingsChart.ratings[0] :colors[i]=0x2C5E14;break;case YAHOO.Search.Answers.labels.ratingsChart.ratings[ 1]:colors[i]=0x399A06;break;case YAHOO.Search.Answers.labels.ratingsChart.rating s[2]:colors[i]=0x54C40A;break;case YAHOO.Search.Answers.labels.ratingsChart.rati ngs[3]:colors[i]=0xC5E49D;break;case YAHOO.Search.Answers.labels.ratingsChart.ra tings[4]:colors[i]=0x666666;break;case YAHOO.Search.Answers.labels.ratingsChart. ratings[5]:colors[i]=0xCCCCCC;break;case YAHOO.Search.Answers.labels.ratingsChar t.other:colors[i]=0x80B4CC;break;}}}});var bd=YAHOO.util.Dom.getElementsByClassN ame('bd','div','yan-kh-ratings')[0];var table=bd.getElementsByTagName('table')[0 ];table.className='hidden';chartEl=document.createElement('div');YAHOO.util.Dom. insertBefore(chartEl,table);YAHOO.util.Dom.setStyle(chartEl,'height','125px');my Chart=new YAHOO.widget.PieChart(chartEl,opinionData,{dataField:"count",categoryF ield:"response",dataTipFunction:function(item,index,series){var total=0;for(i in series.data){total+=parseInt(series.data[i].count,10);} var toolTipText=item.response;toolTipText+="\n"+((item.count/total)*100).toFixed (1)+'%';return toolTipText;},series:[{yField:"count",style:{colors:colors}}],sty le:{dataTip:{border:{color:0xCCCCCC}},background:{color:0xF0F8E6},padding:0,lege nd:{display:"right",padding:10,spacing:5,font:{name:"Arial",color:0x333333,size: 12}}}});} function initRater(){var div=new YAHOO.util.Element(document.getElementById('yan -article-rating')),form=div.getElementsByTagName('form'),anchor=div.getElementsB yTagName('a');function handleSuccess(o){var data=YAHOO.lang.JSON.parse(o.respons eText),chart=document.getElementById('yan-kh-ratings'),temp;div.removeClass('loa ding');temp=document.createElement('div');temp.innerHTML=data.widget;var temp2=t emp.getElementsByTagName('div');if(temp2.length){div.set('innerHTML',temp2[0].in nerHTML);} else{div.set('innerHTML','');} if(chart&&data.chart){var chart=new YAHOO.util.Element(chart);if(chart){var body =chart.getElementsByClassName('bd')[0];body.innerHTML=data.chart;initChart();}} var cta=div.getElementsByClassName('cta-button','input');if(cta.length){YAHOO.Se arch.Answers.cta.convert(cta[0]);} initRater();} if(form.length){form=new YAHOO.util.Element(form[0]);YAHOO.util.Event.removeList ener(form.getElementsByTagName('button'));YAHOO.util.Event.addListener(form.getE lementsByTagName('button'),'click',function(e){YAHOO.util.Event.preventDefault(e

);YAHOO.Search.Answers.formSubmit(form,{success:handleSuccess});div.set('innerHT ML',YAHOO.Search.Answers.labels.userProfileCard.loading);div.addClass('loading') ;});form.on('submit',function(e){YAHOO.util.Event.preventDefault(e);YAHOO.Search .Answers.formSubmit(form,{success:handleSuccess});div.set('innerHTML',YAHOO.Sear ch.Answers.labels.userProfileCard.loading);div.addClass('loading');});} else if(anchor.length){anchor=new YAHOO.util.Element(anchor[0]);anchor.on('click ',function(e){YAHOO.util.Event.preventDefault(e);YAHOO.util.Connect.asyncRequest ('get',document.location+'/updateRating',{success:handleSuccess});div.set('inner HTML',YAHOO.Search.Answers.labels.userProfileCard.loading);div.addClass('loading ');});}} return{init:function(){if(document.getElementById('yan-kh-ratings')){initChart() ;} if(document.getElementById('yan-ka')&&document.getElementById('yan-article-ratin g')){initRater();}}};}();YAHOO.Search.Answers.formSubmit=function(form,callback) {var params=[];var tags=['input','textarea','button','select'];for(var i in tags ){YAHOO.util.Dom.batch(form.getElementsByTagName(tags[i]),function(el){if((el.ty pe=='radio'||el.type=='checkbox')) {if(el.checked){params.push(el.name+'='+el.value);}} else{params.push(el.name+'='+el.value);}});} params=params.join('&');YAHOO.util.Connect.asyncRequest(form.get('method'),form. get('action'),callback,params);};YAHOO.Search.Answers.navBar=function(){var hove rTimer,overTimer,menus=[];function createDropDown(el){var el=YAHOO.util.Dom.get( el);if(el){YAHOO.util.Dom.addClass(el,'menu');var contents=YAHOO.util.Dom.getEle mentsByClassName('sub','*',el);if(contents.length){contents=contents[0];menus[el .id]=new YAHOO.widget.Overlay(el.id+'-menu',{visible:false,constraintoviewport:f alse,zIndex:-1});menus[el.id].setBody(contents);menus[el.id].render(el);} else {menus[el.id]=false;} YAHOO.util.Event.on(el,'mouseover',function(e){YAHOO.util.Dom.addClass(el,'hover ');for(var menu in menus){if(menu!==this.id){YAHOO.util.Dom.removeClass(menu,'ho ver');if(menus[menu]){menus[menu].hide();}} else if(menus[menu]){clearTimeout(overTimer);clearTimeout(hoverTimer);overTimer= setTimeout(function(){menus[el.id].cfg.setProperty('context',[el,'tl','bl']);men us[el.id].show();var panel=YAHOO.util.Dom.getElementsByClassName('yui-module','d iv',el)[0];YAHOO.util.Dom.setStyle(panel,'top',(panel.offsetTop-2)+'px');},200); }}});YAHOO.util.Event.on(el,'mouseout',function(e){var self=this;clearTimeout(ov erTimer);hoverTimer=setTimeout(function(){YAHOO.util.Dom.removeClass(el,'hover') ;if(menus[self.id]){menus[self.id].hide();}},500);});YAHOO.util.Event.on(el.getE lementsByTagName('a'),'focus',function(e){var self=YAHOO.util.Dom.getAncestorByC lassName(this,'menu');YAHOO.util.Dom.addClass(self,'hover');for(var menu in menu s){if(menu!==self.id){YAHOO.util.Dom.removeClass(menu,'hover');if(menus[menu]){m enus[menu].hide();}} else if(menus[menu]){menus[self.id].cfg.setProperty('context',[self,'tl','bl']); menus[self.id].show();var panel=YAHOO.util.Dom.getElementsByClassName('yui-modul e','div',el)[0];YAHOO.util.Dom.setStyle(panel,'top',(panel.offsetTop-2)+'px');cl earTimeout(hoverTimer);}}});YAHOO.util.Event.on(el.getElementsByTagName('a'),'bl ur',function(e){var self=YAHOO.util.Dom.getAncestorByClassName(this,'menu');hove rTimer=setTimeout(function(){YAHOO.util.Dom.removeClass(self,'hover');if(menus[s elf.id]){menus[self.id].hide();}},500);});}} return{init:function(){var bar=document.getElementById('yan-nav');if(bar){create DropDown('yan-nav-home');createDropDown('yan-nav-browse');createDropDown('yan-na v-my-activity');createDropDown('yan-nav-about');var inp=document.getElementById( 'banner-ask');YAHOO.Search.Answers.limitCharacters(inp,110,false,'',"none");if(i np) {var askBox=document.getElementById('yan-banner-ask');var lbl=askBox.getElements ByTagName('label')[0];var originalValue=inp.value;YAHOO.util.Dom.addClass(lbl,'o ffscreen');inp.defaultValue=lbl.innerHTML;inp.value=originalValue;if(inp.value== =lbl.innerHTML||inp.value===''){YAHOO.util.Dom.addClass(inp,'default');inp.defau ltValue=lbl.innerHTML;inp.value=lbl.innerHTML;} YAHOO.util.Event.on(inp,'focus',function(e){YAHOO.util.Dom.removeClass(this,'def

ault');if(this.value===lbl.innerHTML||this.value===''){this.value='';}});YAHOO.u til.Event.on(inp,'blur',function(e){if(this.value===lbl.innerHTML||this.value=== ''){YAHOO.util.Dom.addClass(inp,'default');this.value=lbl.innerHTML;}});}}}};}() ;YAHOO.Search.Answers.searchBar=function(){var YUD=YAHOO.util.Dom,YUE=YAHOO.util .Event;var lbl,inp;function fixCTASubmitsAgain(){YUE.removeListener(YUD.getEleme ntsByClassName('cta-button','button',inp.form),'click');YUE.addListener(inp.form .getElementsByTagName('button'),'click',function(e){YUE.preventDefault(e);if(YAH OO.lang.trim(inp.value).length>0&&inp.value!==lbl.innerHTML&&inp.value!==''&&inp .value!==YAHOO.Search.Answers.labels.searchForm.enterSearchTerms){this.form.subm it();} else {YUD.addClass(inp,'error');inp.value=YAHOO.Search.Answers.labels.searchForm.ente rSearchTerms;}});YUE.on(inp.form,'submit',function(e){YUE.preventDefault(e);if(Y AHOO.lang.trim(inp.value).length>0&&inp.value!==lbl.innerHTML&&inp.value!==''&&i np.value!==YAHOO.Search.Answers.labels.searchForm.enterSearchTerms){this.submit( );} else {YUD.addClass(inp,'error');inp.value=YAHOO.Search.Answers.labels.searchForm.ente rSearchTerms;}});} return{init:function(){var bar=document.getElementById('yan-header-searchbox');i f(bar&&YAHOO.util.Dom.hasClass(document.body,'new-header')){lbl=bar.getElementsB yTagName('label')[0];inp=document.getElementById('yan-p');var originalValue=inp. value;YAHOO.util.Dom.addClass(lbl,'offscreen');inp.defaultValue=lbl.innerHTML;in p.value=originalValue;if(inp.value===lbl.innerHTML||inp.value===''){YUD.removeCl ass(inp,'error');YAHOO.util.Dom.addClass(inp,'default');inp.defaultValue=lbl.inn erHTML;inp.value=lbl.innerHTML;} YAHOO.util.Event.on(inp,'focus',function(e){YUD.removeClass(inp,'error');YAHOO.u til.Dom.removeClass(this,'default');if(this.value===lbl.innerHTML||this.value=== ''||this.value===YAHOO.Search.Answers.labels.searchForm.enterSearchTerms){this.v alue='';}});YAHOO.util.Event.on(inp,'blur',function(e){if(this.value===lbl.inner HTML||this.value===''){YAHOO.util.Dom.addClass(inp,'default');this.value=lbl.inn erHTML;}});fixCTASubmitsAgain();}}};}();YAHOO.Search.Answers.removeQuestions=fun ction() {var inProgress;function populateRemoveLink(el){YAHOO.util.Event.on(el,'click',f unction(e){YAHOO.util.Event.preventDefault(e);if(!inProgress){var qid=this.paren tNode.parentNode.id.replace(/question-/,'');processQuestion(qid);}});} function updateQuestion(qid,data){if(!data.qid||document.getElementById('questio n-'+data.qid)){removeQuestion(qid);} var question=document.getElementById('question-'+qid);question.getElementsByTagN ame('div')[0].innerHTML=data.html;question.id='question-'+data.qid;var removeLin k=YAHOO.util.Dom.getElementsByClassName('remove','a',question);populateRemoveLin k(removeLink[0]);var method=function(el){var re=new RegExp('(starItem|unStarItem )');return(re.test(el.href)&&!el.href.match('login'));};var targets=YAHOO.util.D om.getElementsBy(method,'a',question);if(targets.length>0){YAHOO.Search.Answers. starQuestion.initStar(targets[0]);} YAHOO.util.Dom.removeClass(question,'loading');YAHOO.util.Dom.setStyle(question. getElementsByTagName('div')[0],'opacity',1);} function processQuestion(qid){var callback={success:callbackSuccess,failure:call backFail,argument:qid};var excludeQids=[];var lis=document.getElementById('yan-c r').getElementsByTagName('li');for(var i=0,len=lis.length;i<len;i++){if(YAHOO.ut il.Dom.hasClass(lis[i].parentNode,'questions')){var li=lis[i];excludeQids.push(l i.id.replace('question-',''));}} inProgress=true;var conectionManager=YAHOO.util.Connect.asyncRequest('GET','/que stion/contentRouting?act=remove&qid='+qid+'&exclude='+excludeQids.join(',')+'&do ne='+document.location.href,callback);var question=document.getElementById('ques tion-'+qid);var fadeAnim=new YAHOO.util.Anim(question.getElementsByTagName('div' )[0],{opacity:{to:0}},0.3);fadeAnim.onComplete.subscribe(function(){var removeLi nk=YAHOO.util.Dom.getElementsByClassName('remove','a',question);removeLink[0].pa rentNode.removeChild(removeLink[0]);YAHOO.util.Dom.addClass(question,'loading'); });fadeAnim.animate();}

function removeQuestion(qid){var question=document.getElementById('question-'+qi d);var questionsUl=question.parentNode;question.parentNode.removeChild(question) ;var questions=YAHOO.util.Dom.getElementsBy(function(el){if(el.parentNode==quest ionsUl){return true;} return false;},'li',questionsUl);var len=questions.length;if(len){for(var i=0;i< len;i++){var questionLi=questions[i];YAHOO.util.Dom.removeClass(questionLi,'firs t');YAHOO.util.Dom.removeClass(questionLi,'second');YAHOO.util.Dom.removeClass(q uestionLi,'alt');if(i==0){YAHOO.util.Dom.addClass(questionLi,'first');} if(i==1){YAHOO.util.Dom.addClass(questionLi,'second');} if(i%2){YAHOO.util.Dom.addClass(questionLi,'alt');}}} else{var noQuestionsText=YAHOO.Search.Answers.labels.suggestedQuestions.noQuesti ons;noQuestionsText=noQuestionsText.replace('%OPEN_PREFERENCES_LINK%','<a href=" /my/my_edit">');noQuestionsText=noQuestionsText.replace('%CLOSE_PREFERENCES_LINK %','</a>');questionsUl.parentNode.innerHTML='<p>'+noQuestionsText+'</p>';}} function callbackSuccess(o){if(o.responseText){updateQuestion(o.argument,eval('( '+o.responseText+')'));} else{removeQuestion(o.argument);} inProgress=false;} function callbackFail(o){removeQuestion(o.argument);inProgress=false;} return{init:function(){if(document.getElementById('yan-cr')) {var questionLists=YAHOO.util.Dom.getElementsByClassName('questions','ul');for(v ar i=0,len=questionLists.length;i<len;i++){var removeLinks=YAHOO.util.Dom.getEle mentsByClassName('remove','a',questionLists[i]);for(var j=0,len2=removeLinks.len gth;j<len2;j++){populateRemoveLink(removeLinks[j]);}}}},populateRemoveLink:popul ateRemoveLink};}();YAHOO.Search.Answers.toggle=function(oConfig) {var YUD=YAHOO.util.Dom;var YUE=YAHOO.util.Event;function toggleIt(){if(YUD.hasC lass(oConfig.toggleElement,'toggleShow')){YUD.replaceClass(oConfig.toggleElement ,'toggleShow','toggleHide');YUD.replaceClass(oConfig.contentNode,'toggleContentS how','toggleContentHide');oConfig.toggleElement.firstChild.nodeValue=oConfig.sho wText;oConfig.toggleElement.href='#show-suggested-questions';YAHOO.util.Cookie.s etSub("answers-session",'toggle-'+oConfig.toggleElement.id,'toggleHide',{domain: "answers.yahoo.com"});} else{YUD.replaceClass(oConfig.toggleElement,'toggleHide','toggleShow');YUD.repla ceClass(oConfig.contentNode,'toggleContentHide','toggleContentShow');oConfig.tog gleElement.firstChild.nodeValue=oConfig.hideText;oConfig.toggleElement.href='#hi de-suggested-questions';YAHOO.util.Cookie.removeSub("answers-session",'toggle-'+ oConfig.toggleElement.id,{domain:"answers.yahoo.com"});}} function toggleClick(e){YUE.preventDefault(e);YAHOO.Search.Answers.toggledEvent. fire();} function loadToggle(){if(!YUD.inDocument(oConfig.containerNode)||!YUD.inDocument (oConfig.contentNode)){return false;} var toggleElement=document.createElement('a');var toggleText=document.createText Node(oConfig.hideText);toggleElement.appendChild(toggleText);toggleElement.id=(t ypeof oConfig.createToggle!=="undefined"?oConfig.createToggle.toggleID:'');toggl eElement.href='#'+oConfig.createToggle.toggleID;oConfig.containerNode.appendChil d(toggleElement);oConfig.toggleElement=toggleElement;YAHOO.util.Dom.addClass(oCo nfig.toggleElement,'toggleShow');if(oConfig.autoHide===true||YAHOO.util.Cookie.g etSub("answers-session","toggle-"+toggleElement.id)=='toggleHide'){YAHOO.Search. Answers.toggledEvent.fire();} YUE.addListener(oConfig.toggleElement,'click',toggleClick);return true;} YAHOO.Search.Answers.toggledEvent.subscribe(toggleIt);return{init:function(){if( !loadToggle()){return false;}}};};YAHOO.Search.Answers.homePageToggle=function() {return{init:function(){if(document.getElementById('yan-cr')) {var oConfig={containerNode:document.getElementById('yan-cr'),createToggle:{togg leID:'suggested-toggle'},autoHide:false,showText:YAHOO.Search.Answers.labels.ans wersCompact.show,hideText:YAHOO.Search.Answers.labels.answersCompact.hide,conten tNode:YAHOO.util.Dom.getElementsByClassName('bd','div',document.getElementById(' yan-cr'))[0]};var oToggle=new YAHOO.Search.Answers.toggle(oConfig);oToggle.init( );}}};}();YAHOO.Search.Answers.otherAnswersToggle=function() {return{init:function(){var el=document.getElementById('yan-answers');if(el&&YAH

OO.util.Dom.hasClass(el,'from-search')) {var oConfig={containerNode:document.getElementById('yan-answers'),createToggle: {toggleID:'other-answers-toggle'},autoHide:true,showText:YAHOO.Search.Answers.la bels.answersCompact.show,hideText:YAHOO.Search.Answers.labels.answersCompact.hid e,contentNode:document.getElementById('yan-answers')};var oToggle=new YAHOO.Sear ch.Answers.toggle(oConfig);oToggle.init();}}};}();YAHOO.Updates.Disclosure.manag er.registerPostLinkCallback({"fn":function(){var askPreviewForm=YAHOO.util.Dom.g et('yan-ask-preview');var answerPreviewForm=YAHOO.util.Dom.get('yan-answer-previ ew');if(askPreviewForm||answerPreviewForm){if(askPreviewForm){var previewForm=as kPreviewForm;}else if(answerPreviewForm){var previewForm=answerPreviewForm;} if(previewForm){var reloadForm=function(){var oButtonsNodes=YAHOO.util.Dom.getEl ementsByClassName('buttons','div',previewForm);if(oButtonsNodes[0]){var oNode=do cument.createElement('input');oNode.setAttribute('type','hidden');oNode.name='li nk-account';oNode.value='true';var oFormButton=oButtonsNodes[0];oFormButton.appe ndChild(oNode);previewForm.submit();}};var callback={success:function(o){if(o.re sponseText){previewForm.elements['crumb'].value=eval('('+o.responseText+')');} else{reloadForm();}},failure:function(o){reloadForm();}};YAHOO.util.Connect.asyn cRequest('GET','/my/crumb',callback);}}}});YAHOO.Search.Answers.contactActions=f unction() {var YUD=YAHOO.util.Dom;var YUE=YAHOO.util.Event;function resetProfileCards(type ,args){if(YUD.get('yan-user-profile-card')) {var oldProfileCards=YUD.get('yan-user-profile-card');oldProfileCards.parentNode .removeChild(oldProfileCards);} YAHOO.Search.Answers.userProfileCard.init();} function removeFrom(e,args){if(args[0].removedContact){if(YUD.isAncestor(YUD.get ('yan-connections'),args[0].removedContact)){var link=YAHOO.util.History.getQuer yStringParameter('link');var orderby=YAHOO.util.History.getQueryStringParameter( 'orderby');var userid=YAHOO.util.History.getQueryStringParameter('show');var uri Params=[];if(link!==null){uriParams.push('link='+link);} if(orderby!==null){uriParams.push('orderby='+orderby);} if(userid!==null){uriParams.push('show='+userid);} var querystring=uriParams.length>=1?('?'+uriParams.join('&')):'';var url=locatio n.pathname+querystring;var trigger={el:url,eventType:'uri',sourceType:'direct',m ethodType:'GET',targetel:YUD.get('yan-connections')};YAHOO.Search.Answers.Conten t.loader.registerTrigger(trigger);}}} return{init:function(){YAHOO.Search.Answers.removeContact.subscribe(removeFrom); YAHOO.Search.Answers.resetLoaderAndContentEvent.subscribe(resetProfileCards);}}; }();YAHOO.Search.Answers.todayTrack=function() {return{init:function(){var today=document.getElementById('yan-today');if(today) {var anchors=today.getElementsByTagName('a');YAHOO.util.Event.on(anchors,'click' ,function(e){var ylu=this.href.match(/_ylu=[^;]*/)[0];var beacon=document.create Element('img');beacon.src='http://s.capi.yahoo.com/answers/b.gif?'+ylu;document. body.appendChild(beacon);});}}}}();YAHOO.Search.Answers.marketingCodeCookie=func tion() {return{init:function(){if(typeof marketingCode!="undefined"){if(YAHOO.util.Cook ie.getSubs("answers-session")){var mcode=YAHOO.util.Cookie.getSubs("answers-sess ion").mcode;} if(!mcode){YAHOO.util.Cookie.setSub("answers-session","mcode",marketingCode,{dom ain:"answers.yahoo.com",path:"/"});}}}}}();YAHOO.Search.Answers.marketingVideo=f unction() {var YUD=YAHOO.util.Dom,YUE=YAHOO.util.Event;var div=false,panel,videoLink,_play er,panelState;function loadPanel(e){YUE.preventDefault(e);if(!div){div=document. createElement('div');div.id=YAHOO.Search.Answers.css.marketingVideo.videoId;docu ment.body.appendChild(div);panel=new YAHOO.widget.Dialog(div,{modal:true,visible :false,fixedcenter:true,constraintoviewport:true,draggable:false,close:true,unde rlay:'none'});} panel.hideEvent.subscribe(function(){var popup=YUD.get('yahoo-video-player');var splash=YUD.get('video-splash');var parent,child;if(splash){child=splash;parent= splash.parentNode;} else if(popup){child=popup;parent=popup.parentNode;}

var video=document.createElement('div');video.id='yahoo-video-player';parent.rem oveChild(child);parent.appendChild(video);});loadVideo();panel.show();} function loadSplash(){panel.setBody('<div id="video-splash"><h3>'+YAHOO.Search.A nswers.labels.videoEndScreen.header+'</h3><ul><li class="cta first"><a id="regis ter-btn" href="/join?.done='+encodeURIComponent(document.location.href)+'" class ="search"><span><span><span><span>'+YAHOO.Search.Answers.labels.videoEndScreen.b utton+'</span></span></span></span></a></li><li class="cta"><a href="'+videoLink .href+'" class="secondary yan-marketing-replay"><span><span><span><span>'+YAHOO. Search.Answers.labels.videoEndScreen.play+'</span></span></span></span></a></li> </ul></div>');var videoReplay=YUD.getElementsByClassName('yan-marketing-replay', 'a',div)[0];if(videoReplay){YUE.on(videoReplay,'click',function(e){YUE.preventDe fault(e);loadVideo();});}} function loadVideo(){if(videoId){panel.setBody('<div id="yahoo-video-player"></d iv>');panel.render();var _playlistContent=[{mediaId:videoId}];var _playerConfig= {playerUrl:'http://d.yimg.com/nl/y-answers/popup/player.swf',width:'512',height: '322',autoPlay:1};var _eventsConfig={onPlayerReady:function(){for(mediaItem in _ playlistContent){_player.addToPlaylist(_playlistContent[mediaItem]);}},onPlaybac kComplete:loadSplash};_player=new YAHOO.widget.Video('yahoo-video-player',_playe rConfig,_eventsConfig);_player.render();}} return{init:function(){var marketingBar=YUD.get('yan-marketing-bar');if(marketin gBar){videoLink=YUD.getElementsByClassName('yan-marketing-video','a',marketingBa r)[0];if(typeof videoLink!='undefined'){videoId=videoLink.href.match(/([0-9]*)$/ )[0];if(videoId){var scriptNode=document.createElement('script');scriptNode.type ='text/javascript';scriptNode.src='http://d.yimg.com/nl/y-answers/popup/player.j s';marketingBar.appendChild(scriptNode);var checkVideoPoll=setInterval(function( ){if(typeof YAHOO.widget.Video!='undefined'){clearInterval(checkVideoPoll);YUE.o n(videoLink,'click',loadPanel);} return;},100);}} joinURL=YUD.getElementsByClassName('yan-join','a',marketingBar)[0];if(joinURL){j oinURL.href=joinURL.href+'?.done='+encodeURIComponent(document.location.href);}} }};}();YAHOO.Search.Answers.recommendedQuestionPagination=function(){function ha ndlePagination(e){var target=YAHOO.util.Event.getTarget(e);var showId=target.fir stChild.nodeValue;var eleShow=document.getElementById('recommendation'+showId);e leShow.style.display="block";var butShow=document.getElementById('page'+showId); YAHOO.util.Dom.replaceClass(butShow,'pageButton','current');YAHOO.util.Dom.setSt yle(butShow,'cursor','none');YAHOO.util.Dom.setStyle(butShow,'color','black');va r parentUl=document.getElementById('pageButList');var liList=parentUl.getElement sByTagName('li');for(var i=1;i<liList.length;i++){var hideId=i;if(hideId!=showId ){var eleHide=document.getElementById('recommendation'+hideId);eleHide.style.dis play="none";var butHide=document.getElementById('page'+hideId);YAHOO.util.Dom.re placeClass(butHide,'current','pageButton');YAHOO.util.Dom.setStyle(butHide,'curs or','pointer');YAHOO.util.Dom.setStyle(butHide,'color','#006699');}}} return{init:function(){var pgUl=YAHOO.util.Dom.getElementsByClassName('paginatio n','ul');YAHOO.util.Event.on(pgUl,'click',handlePagination);}};}();YAHOO.Search. Answers.recommendedQuestionCarousel=function(){return{init:function() {var RECOMMENDATION_FETCH_COUNT=10;var RECOMMENDATION_BUFFER_THRESHOLD=5;var IGN ORE_TIMEOUT=5*1000;var IGNORE_SOAK_THRESHOLD=10;var qidArray=new Array();functio n handleClose(e) {var eventTarget=YAHOO.util.Event.getTarget(e);var liNode=eventTarget.parentNode .parentNode;replaceDataInList(liNode);var qid=liNode.id.substr(9);checkAndAddIgn ore(qid);var extraUlDiv=YAHOO.util.Dom.get('question-carousel1');var extraUl=YAH OO.util.Dom.getFirstChild(extraUlDiv);var pendingItemCount=extraUl.childElementC ount;if(pendingItemCount<RECOMMENDATION_BUFFER_THRESHOLD) {sendIgnoreAndClear();getNewRecommendations();}} function insertDatatoList(liNode) {var olNode=liNode.parentNode;var extraUlDiv=YAHOO.util.Dom.get('question-carous el1');var extraUl=YAHOO.util.Dom.getFirstChild(extraUlDiv);olNode.removeChild(li Node);extraUl.appendChild(liNode);YAHOO.util.Event.on(liNode,'click',handleClose );} function replaceDataInList(liNode)

{var olNode=liNode.parentNode;var extraUlDiv=YAHOO.util.Dom.get('question-carous el1');var extraUl=YAHOO.util.Dom.getFirstChild(extraUlDiv);if(extraUl.childEleme ntCount>1) {var extraLi=YAHOO.util.Dom.getFirstChild(extraUl);extraUl.removeChild(extraLi); olNode.appendChild(extraLi);var prevClassName;var j=0;for(var i=0;i<olNode.child ElementCount-1;++i,++j) {if(liNode==olNode.children[i]) {j++;prevClassName=olNode.children[j].className;olNode.children[j].className=olN ode.children[i].className;} else if(i!=j) {var curClassName=olNode.children[j].className;olNode.children[j].className=prev ClassName;prevClassName=curClassName;} olNode.children[j].style="";}} var removeElement=function(){olNode.removeChild(liNode);} var removeAnim=new YAHOO.util.Anim(liNode,{opacity:{from:1.0,to:0.1}},0.5,YAHOO. util.Easing.easeOut);removeAnim.onComplete.subscribe(removeElement);removeAnim.a nimate();} function getNewRecommendations() {var AjaxObject={handleSuccess:function(o){this.processResult(o);},handleFailure :function(o){},processResult:function(o){var responseData=o.responseText;var res ponseUpdated=responseData.replace("id=\"question-carousel\"","id=\"question-caro usel2\"");var questionUlDiv=YAHOO.util.Dom.get('question-carousel');var question ContainerDiv=questionUlDiv.parentNode;var newNode=document.createElement("div"); newNode.innerHTML=responseUpdated;questionContainerDiv.appendChild(newNode.child ren[0]);var newExtraDiv=YAHOO.util.Dom.get('question-carousel2');var newExtraOl= newExtraDiv.children[0];while(newExtraOl.childElementCount>0) {var extraLi=newExtraOl.children[0];insertDatatoList(extraLi);} questionContainerDiv.removeChild(newExtraDiv);},startRequest:function(){var cate goryId=0;var categoryTag=YAHOO.util.Dom.getElementBy(this.getCategoryTag,'h1','y an-categories');if(categoryTag.className) categoryId=categoryTag.className.substring(4);var selbox=YAHOO.util.Dom.get('yan -showquestions');var filtr=selbox.options[selbox.selectedIndex].value;var getUrl ="/question/recommendations?categoryId="+categoryId+"&numRecommendations="+RECOM MENDATION_FETCH_COUNT+"&filtr="+filtr;YAHOO.util.Connect.asyncRequest('GET',getU rl,callback,null);},getCategoryTag:function(element){if(element.className.substr ing(0,4)=="cat-") return true;return false;}};var callback={success:AjaxObject.handleSuccess,failu re:AjaxObject.handleFailure,scope:AjaxObject};AjaxObject.startRequest();} function checkAndAddIgnore(qid) {qidArray.push(qid);if(qidArray.length>IGNORE_SOAK_THRESHOLD) sendIgnoreAndClear();} function sendIgnoreAndClear() {if(qidArray.length>0) {sendIgnore();qidArray=new Array();}} function sendIgnore() {var AjaxObject={handleSuccess:function(o){this.processResult(o);},handleFailure :function(o){},processResult:function(o){},startRequest:function(){var qidList;q idList=qidArray[0];for(var i=1;i<qidArray.length;++i) qidList+=":"+qidArray[i];YAHOO.util.Connect.asyncRequest('POST',"/question/ignor e",callback,"qid="+qidList);}};var callback={success:AjaxObject.handleSuccess,fa ilure:AjaxObject.handleFailure,scope:AjaxObject};AjaxObject.startRequest();} var questionCloseList=YAHOO.util.Dom.getElementsByClassName('ignore-question');i f(!questionCloseList) return;YAHOO.util.Event.on(questionCloseList,'click',handleClose);window.onbefor eunload=sendIgnoreAndClear;setInterval(function(){sendIgnoreAndClear()},IGNORE_T IMEOUT);}};}();if(typeof YOSWIDGETS=="undefined"||!YOSWIDGETS){var YOSWIDGETS={} ;}YOSWIDGETS.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.lengt h;C=C+1){D=(""+A[C]).split(".");E=YOSWIDGETS;for(B=(D[0]=="YOSWIDGETS")?1:0;B<D. length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YOSWIDGETS.log=function (D,A,C){var B=YOSWIDGETS.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{re

turn false;}};YOSWIDGETS.register=function(A,E,D){var I=YOSWIDGETS.env.modules,B ,H,G,F,C;if(!I[A]){I[A]={versions:[],builds:[]};}B=I[A];H=D.version;G=D.build;F= YOSWIDGETS.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.bui lds.push(G);B.mainClass=E;for(C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E .BUILD=G;}else{YOSWIDGETS.log("mainClass is undefined for module "+A,"warn");}}; YOSWIDGETS.env=YOSWIDGETS.env||{modules:[],listeners:[]};YOSWIDGETS.env.getVersi on=function(A){return YOSWIDGETS.env.modules[A]||null;};YOSWIDGETS.env.ua=functi on(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0,caja:0},B=navigator. userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWebKit\/([^\s]*)/) ;if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple"; }else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0];}}A=B.match(/AdobeAIR\/([^\s ]*)/);if(A){C.air=A[0];}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[ 1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}} else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.matc h(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.ge cko=parseFloat(A[1]);}}}}}A=B.match(/Caja\/([^\s]*)/);if(A&&A[1]){C.caja=parseFl oat(A[1]);}return C;}();(function(){YOSWIDGETS.namespace("util","widget","exampl e");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YOSWIDGE TS.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;br eak;}}if(D){A.push(B);}}}})();YOSWIDGETS.lang=YOSWIDGETS.lang||{};(function(){va r B=YOSWIDGETS.lang,F="[object Array]",C="[object Function]",A=Object.prototype, E=["toString","valueOf"],D={isArray:function(G){return A.toString.apply(G)===F;} ,isBoolean:function(G){return typeof G==="boolean";},isFunction:function(G){retu rn A.toString.apply(G)===C;},isNull:function(G){return G===null;},isNumber:funct ion(G){return typeof G==="number"&&isFinite(G);},isObject:function(G){return(G&& (typeof G==="object"||B.isFunction(G)))||false;},isString:function(G){return typ eof G==="string";},isUndefined:function(G){return typeof G==="undefined";},_IEEn umFix:(YOSWIDGETS.env.ua.ie)?function(I,H){var G,K,J;for(G=0;G<E.length;G=G+1){K =E[G];J=H[K];if(B.isFunction(J)&&J!=A[K]){I[K]=J;}}}:function(){},extend:functio n(J,K,I){if(!K||!J){throw new Error("extend failed, please check that "+"all dep endencies are included.");}var H=function(){},G;H.prototype=K.prototype;J.protot ype=new H();J.prototype.constructor=J;J.superclass=K.prototype;if(K.prototype.co nstructor==A.constructor){K.prototype.constructor=K;}if(I){for(G in I){if(B.hasO wnProperty(I,G)){J.prototype[G]=I[G];}}B._IEEnumFix(J.prototype,I);}},augmentObj ect:function(K,J){if(!J||!K){throw new Error("Absorb failed, verify dependencies .");}var G=arguments,I,L,H=G[2];if(H&&H!==true){for(I=2;I<G.length;I=I+1){K[G[I] ]=J[G[I]];}}else{for(L in J){if(H||!(L in K)){K[L]=J[L];}}B._IEEnumFix(K,J);}},a ugmentProto:function(J,I){if(!I||!J){throw new Error("Augment failed, verify dep endencies.");}var G=[J.prototype,I.prototype],H;for(H=2;H<arguments.length;H=H+1 ){G.push(arguments[H]);}B.augmentObject.apply(this,G);},dump:function(G,L){var I ,K,N=[],O="{...}",H="f(){...}",M=", ",J=" => ";if(!B.isObject(G)){return G+"";}e lse{if(G instanceof Date||("nodeType"in G&&"tagName"in G)){return G;}else{if(B.i sFunction(G)){return H;}}}L=(B.isNumber(L))?L:3;if(B.isArray(G)){N.push("[");for (I=0,K=G.length;I<K;I=I+1){if(B.isObject(G[I])){N.push((L>0)?B.dump(G[I],L-1):O) ;}else{N.push(G[I]);}N.push(M);}if(N.length>1){N.pop();}N.push("]");}else{N.push ("{");for(I in G){if(B.hasOwnProperty(G,I)){N.push(I+J);if(B.isObject(G[I])){N.p ush((L>0)?B.dump(G[I],L-1):O);}else{N.push(G[I]);}N.push(M);}}if(N.length>1){N.p op();}N.push("}");}return N.join("");},substitute:function(V,H,O){var L,K,J,R,S, U,Q=[],I,M="dump",P=" ",G="{",T="}",N;for(;;){L=V.lastIndexOf(G);if(L<0){break;} K=V.indexOf(T,L);if(L+1>=K){break;}I=V.substring(L+1,K);R=I;U=null;J=R.indexOf(P );if(J>-1){U=R.substring(J+1);R=R.substring(0,J);}S=H[R];if(O){S=O(R,S,U);}if(B. isObject(S)){if(B.isArray(S)){S=B.dump(S,parseInt(U,10));}else{U=U||"";N=U.index Of(M);if(N>-1){U=U.substring(4);}if(S.toString===A.toString||N>-1){S=B.dump(S,pa rseInt(U,10));}else{S=S.toString();}}}else{if(!B.isString(S)&&!B.isNumber(S)){S= "~-"+Q.length+"-~";Q[Q.length]=I;}}V=V.substring(0,L)+S+V.substring(K+1);}for(L= Q.length-1;L>=0;L=L-1){V=V.replace(new RegExp("~-"+L+"-~"),"{"+Q[L]+"}","g");}re turn V;},trim:function(G){try{return G.replace(/^\s+|\s+$/g,"");}catch(H){return G;}},merge:function(){var J={},H=arguments,G=H.length,I;for(I=0;I<G;I=I+1){B.au gmentObject(J,H[I],true);}return J;},later:function(N,H,O,J,K){N=N||0;H=H||{};va r I=O,M=J,L,G;if(B.isString(O)){I=H[O];}if(!I){throw new TypeError("method undef

ined");}if(!B.isArray(M)){M=[J];}L=function(){I.apply(H,M);};G=(K)?setInterval(L ,N):setTimeout(L,N);return{interval:K,cancel:function(){if(this.interval){clearI nterval(G);}else{clearTimeout(G);}}};},isValue:function(G){return(B.isObject(G)| |B.isString(G)||B.isNumber(G)||B.isBoolean(G));}};B.hasOwnProperty=(A.hasOwnProp erty)?function(G,H){return G&&G.hasOwnProperty(H);}:function(G,H){return!B.isUnd efined(G[H])&&G.constructor.prototype[H]!==G[H];};D.augmentObject(B,D,true);YOSW IDGETS.util.Lang=B;B.augment=B.augmentProto;YOSWIDGETS.augment=B.augmentProto;YO SWIDGETS.extend=B.extend;})();YOSWIDGETS.register("yahoo",YOSWIDGETS,{version:"2 .7.0",build:"1796"});(function(){YOSWIDGETS.env._id_counter=YOSWIDGETS.env._id_c ounter||0;var E=YOSWIDGETS.util,L=YOSWIDGETS.lang,m=YOSWIDGETS.env.ua,A=YOSWIDGE TS.lang.trim,d={},h={},N=/^t(?:able|d|h)$/i,X=/color$/i,K=window.document,W=K.do cumentElement,e="ownerDocument",n="defaultView",v="documentElement",t="compatMod e",b="offsetLeft",P="offsetTop",u="offsetParent",Z="parentNode",l="nodeType",C=" tagName",O="scrollLeft",i="scrollTop",Q="getBoundingClientRect",w="getComputedSt yle",a="currentStyle",M="CSS1Compat",c="BackCompat",g="class",F="className",J="" ,B=" ",s="(?:^|\\s)",k="(?= |$)",U="g",p="position",f="fixed",V="relative",j="le ft",o="top",r="medium",q="borderLeftWidth",R="borderTopWidth",D=m.opera,I=m.webk it,H=m.gecko,T=m.ie;E.Dom={CUSTOM_ATTRIBUTES:(!W.hasAttribute)?{"for":"htmlFor", "class":F}:{"htmlFor":"for","className":g},get:function(y){var AA,Y,z,x,G;if(y){ if(y[l]||y.item){return y;}if(typeof y==="string"){AA=y;y=K.getElementById(y);if (y&&y.id===AA){return y;}else{if(y&&K.all){y=null;Y=K.all[AA];for(x=0,G=Y.length ;x<G;++x){if(Y[x].id===AA){return Y[x];}}}}return y;}if(y.DOM_EVENTS){y=y.get("e lement");}if("length"in y){z=[];for(x=0,G=y.length;x<G;++x){z[z.length]=E.Dom.ge t(y[x]);}return z;}return y;}return null;},getComputedStyle:function(G,Y){if(win dow[w]){return G[e][n][w](G,null)[Y];}else{if(G[a]){return E.Dom.IE_ComputedStyl e.get(G,Y);}}},getStyle:function(G,Y){return E.Dom.batch(G,E.Dom._getStyle,Y);}, _getStyle:function(){if(window[w]){return function(G,y){y=(y==="float")?y="cssFl oat":E.Dom._toCamel(y);var x=G.style[y],Y;if(!x){Y=G[e][n][w](G,null);if(Y){x=Y[ y];}}return x;};}else{if(W[a]){return function(G,y){var x;switch(y){case"opacity ":x=100;try{x=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(z){tr y{x=G.filters("alpha").opacity;}catch(Y){}}return x/100;case"float":y="styleFloa t";default:y=E.Dom._toCamel(y);x=G[a]?G[a][y]:null;return(G.style[y]||x);}};}}}( ),setStyle:function(G,Y,x){E.Dom.batch(G,E.Dom._setStyle,{prop:Y,val:x});},_setS tyle:function(){if(T){return function(Y,G){var x=E.Dom._toCamel(G.prop),y=G.val; if(Y){switch(x){case"opacity":if(L.isString(Y.style.filter)){Y.style.filter="alp ha(opacity="+y*100+")";if(!Y[a]||!Y[a].hasLayout){Y.style.zoom=1;}}break;case"fl oat":x="styleFloat";default:Y.style[x]=y;}}else{}};}else{return function(Y,G){va r x=E.Dom._toCamel(G.prop),y=G.val;if(Y){if(x=="float"){x="cssFloat";}Y.style[x] =y;}else{}};}}(),getXY:function(G){return E.Dom.batch(G,E.Dom._getXY);},_canPosi tion:function(G){return(E.Dom._getStyle(G,"display")!=="none"&&E.Dom._inDoc(G)); },_getXY:function(){if(K[v][Q]){return function(y){var z,Y,AA,AF,AE,AD,AC,G,x,AB =Math.floor,AG=false;if(E.Dom._canPosition(y)){AA=y[Q]();AF=y[e];z=E.Dom.getDocu mentScrollLeft(AF);Y=E.Dom.getDocumentScrollTop(AF);AG=[AB(AA[j]),AB(AA[o])];if( T&&m.ie<8){AE=2;AD=2;AC=AF[t];G=S(AF[v],q);x=S(AF[v],R);if(m.ie===6){if(AC!==c){ AE=0;AD=0;}}if((AC==c)){if(G!==r){AE=parseInt(G,10);}if(x!==r){AD=parseInt(x,10) ;}}AG[0]-=AE;AG[1]-=AD;}if((Y||z)){AG[0]+=z;AG[1]+=Y;}AG[0]=AB(AG[0]);AG[1]=AB(A G[1]);}else{}return AG;};}else{return function(y){var x,Y,AA,AB,AC,z=false,G=y;i f(E.Dom._canPosition(y)){z=[y[b],y[P]];x=E.Dom.getDocumentScrollLeft(y[e]);Y=E.D om.getDocumentScrollTop(y[e]);AC=((H||m.webkit>519)?true:false);while((G=G[u])){ z[0]+=G[b];z[1]+=G[P];if(AC){z=E.Dom._calcBorders(G,z);}}if(E.Dom._getStyle(y,p) !==f){G=y;while((G=G[Z])&&G[C]){AA=G[i];AB=G[O];if(H&&(E.Dom._getStyle(G,"overfl ow")!=="visible")){z=E.Dom._calcBorders(G,z);}if(AA||AB){z[0]-=AB;z[1]-=AA;}}z[0 ]+=x;z[1]+=Y;}else{if(D){z[0]-=x;z[1]-=Y;}else{if(I||H){z[0]+=x;z[1]+=Y;}}}z[0]= Math.floor(z[0]);z[1]=Math.floor(z[1]);}else{}return z;};}}(),getX:function(G){v ar Y=function(x){return E.Dom.getXY(x)[0];};return E.Dom.batch(G,Y,E.Dom,true);} ,getY:function(G){var Y=function(x){return E.Dom.getXY(x)[1];};return E.Dom.batc h(G,Y,E.Dom,true);},setXY:function(G,x,Y){E.Dom.batch(G,E.Dom._setXY,{pos:x,noRe try:Y});},_setXY:function(G,z){var AA=E.Dom._getStyle(G,p),y=E.Dom.setStyle,AD=z .pos,Y=z.noRetry,AB=[parseInt(E.Dom.getComputedStyle(G,j),10),parseInt(E.Dom.get ComputedStyle(G,o),10)],AC,x;if(AA=="static"){AA=V;y(G,p,AA);}AC=E.Dom._getXY(G)

;if(!AD||AC===false){return false;}if(isNaN(AB[0])){AB[0]=(AA==V)?0:G[b];}if(isN aN(AB[1])){AB[1]=(AA==V)?0:G[P];}if(AD[0]!==null){y(G,j,AD[0]-AC[0]+AB[0]+"px"); }if(AD[1]!==null){y(G,o,AD[1]-AC[1]+AB[1]+"px");}if(!Y){x=E.Dom._getXY(G);if((AD [0]!==null&&x[0]!=AD[0])||(AD[1]!==null&&x[1]!=AD[1])){E.Dom._setXY(G,{pos:AD,no Retry:true});}}},setX:function(Y,G){E.Dom.setXY(Y,[G,null]);},setY:function(G,Y) {E.Dom.setXY(G,[null,Y]);},getRegion:function(G){var Y=function(x){var y=false;i f(E.Dom._canPosition(x)){y=E.Region.getRegion(x);}else{}return y;};return E.Dom. batch(G,Y,E.Dom,true);},getClientWidth:function(){return E.Dom.getViewportWidth( );},getClientHeight:function(){return E.Dom.getViewportHeight();},getElementsByC lassName:function(AB,AF,AC,AE,x,AD){AB=L.trim(AB);AF=AF||"*";AC=(AC)?E.Dom.get(A C):null||K;if(!AC){return[];}var Y=[],G=AC.getElementsByTagName(AF),z=E.Dom.hasC lass;for(var y=0,AA=G.length;y<AA;++y){if(z(G[y],AB)){Y[Y.length]=G[y];}}if(AE){ E.Dom.batch(Y,AE,x,AD);}return Y;},hasClass:function(Y,G){return E.Dom.batch(Y,E .Dom._hasClass,G);},_hasClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom.getAt tribute(x,F)||J;if(Y.exec){G=Y.test(y);}else{G=Y&&(B+y+B).indexOf(B+Y+B)>-1;}}el se{}return G;},addClass:function(Y,G){return E.Dom.batch(Y,E.Dom._addClass,G);}, _addClass:function(x,Y){var G=false,y;if(x&&Y){y=E.Dom.getAttribute(x,F)||J;if(! E.Dom._hasClass(x,Y)){E.Dom.setAttribute(x,F,A(y+B+Y));G=true;}}else{}return G;} ,removeClass:function(Y,G){return E.Dom.batch(Y,E.Dom._removeClass,G);},_removeC lass:function(y,x){var Y=false,AA,z,G;if(y&&x){AA=E.Dom.getAttribute(y,F)||J;E.D om.setAttribute(y,F,AA.replace(E.Dom._getClassRegex(x),J));z=E.Dom.getAttribute( y,F);if(AA!==z){E.Dom.setAttribute(y,F,A(z));Y=true;if(E.Dom.getAttribute(y,F)== =""){G=(y.hasAttribute&&y.hasAttribute(g))?g:F;y.removeAttribute(G);}}}else{}ret urn Y;},replaceClass:function(x,Y,G){return E.Dom.batch(x,E.Dom._replaceClass,{f rom:Y,to:G});},_replaceClass:function(y,x){var Y,AB,AA,G=false,z;if(y&&x){AB=x.f rom;AA=x.to;if(!AA){G=false;}else{if(!AB){G=E.Dom._addClass(y,x.to);}else{if(AB! ==AA){z=E.Dom.getAttribute(y,F)||J;Y=(B+z.replace(E.Dom._getClassRegex(AB),B+AA) ).split(E.Dom._getClassRegex(AA));Y.splice(1,0,B+AA);E.Dom.setAttribute(y,F,A(Y. join(J)));G=true;}}}}else{}return G;},generateId:function(G,x){x=x||"yui-gen";va r Y=function(y){if(y&&y.id){return y.id;}var z=x+YOSWIDGETS.env._id_counter++;if (y){if(y[e].getElementById(z)){return E.Dom.generateId(y,z+x);}y.id=z;}return z; };return E.Dom.batch(G,Y,E.Dom,true)||Y.apply(E.Dom,arguments);},isAncestor:func tion(Y,x){Y=E.Dom.get(Y);x=E.Dom.get(x);var G=false;if((Y&&x)&&(Y[l]&&x[l])){if( Y.contains&&Y!==x){G=Y.contains(x);}else{if(Y.compareDocumentPosition){G=!!(Y.co mpareDocumentPosition(x)&16);}}}else{}return G;},inDocument:function(G,Y){return E.Dom._inDoc(E.Dom.get(G),Y);},_inDoc:function(Y,x){var G=false;if(Y&&Y[C]){x=x ||Y[e];G=E.Dom.isAncestor(x[v],Y);}else{}return G;},getElementsBy:function(Y,AF, AB,AD,y,AC,AE){AF=AF||"*";AB=(AB)?E.Dom.get(AB):null||K;if(!AB){return[];}var x= [],G=AB.getElementsByTagName(AF);for(var z=0,AA=G.length;z<AA;++z){if(Y(G[z])){i f(AE){x=G[z];break;}else{x[x.length]=G[z];}}}if(AD){E.Dom.batch(x,AD,y,AC);}retu rn x;},getElementBy:function(x,G,Y){return E.Dom.getElementsBy(x,G,Y,null,null,n ull,true);},batch:function(x,AB,AA,z){var y=[],Y=(z)?AA:window;x=(x&&(x[C]||x.it em))?x:E.Dom.get(x);if(x&&AB){if(x[C]||x.length===undefined){return AB.call(Y,x, AA);}for(var G=0;G<x.length;++G){y[y.length]=AB.call(Y,x[G],AA);}}else{return fa lse;}return y;},getDocumentHeight:function(){var Y=(K[t]!=M||I)?K.body.scrollHei ght:W.scrollHeight,G=Math.max(Y,E.Dom.getViewportHeight());return G;},getDocumen tWidth:function(){var Y=(K[t]!=M||I)?K.body.scrollWidth:W.scrollWidth,G=Math.max (Y,E.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self. innerHeight,Y=K[t];if((Y||T)&&!D){G=(Y==M)?W.clientHeight:K.body.clientHeight;}r eturn G;},getViewportWidth:function(){var G=self.innerWidth,Y=K[t];if(Y||T){G=(Y ==M)?W.clientWidth:K.body.clientWidth;}return G;},getAncestorBy:function(G,Y){wh ile((G=G[Z])){if(E.Dom._testElement(G,Y)){return G;}}return null;},getAncestorBy ClassName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null;}var x=function(y){ret urn E.Dom.hasClass(y,G);};return E.Dom.getAncestorBy(Y,x);},getAncestorByTagName :function(Y,G){Y=E.Dom.get(Y);if(!Y){return null;}var x=function(y){return y[C]& &y[C].toUpperCase()==G.toUpperCase();};return E.Dom.getAncestorBy(Y,x);},getPrev iousSiblingBy:function(G,Y){while(G){G=G.previousSibling;if(E.Dom._testElement(G ,Y)){return G;}}return null;},getPreviousSibling:function(G){G=E.Dom.get(G);if(! G){return null;}return E.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function (G,Y){while(G){G=G.nextSibling;if(E.Dom._testElement(G,Y)){return G;}}return nul

l;},getNextSibling:function(G){G=E.Dom.get(G);if(!G){return null;}return E.Dom.g etNextSiblingBy(G);},getFirstChildBy:function(G,x){var Y=(E.Dom._testElement(G.f irstChild,x))?G.firstChild:null;return Y||E.Dom.getNextSiblingBy(G.firstChild,x) ;},getFirstChild:function(G,Y){G=E.Dom.get(G);if(!G){return null;}return E.Dom.g etFirstChildBy(G);},getLastChildBy:function(G,x){if(!G){return null;}var Y=(E.Do m._testElement(G.lastChild,x))?G.lastChild:null;return Y||E.Dom.getPreviousSibli ngBy(G.lastChild,x);},getLastChild:function(G){G=E.Dom.get(G);return E.Dom.getLa stChildBy(G);},getChildrenBy:function(Y,y){var x=E.Dom.getFirstChildBy(Y,y),G=x? [x]:[];E.Dom.getNextSiblingBy(x,function(z){if(!y||y(z)){G[G.length]=z;}return f alse;});return G;},getChildren:function(G){G=E.Dom.get(G);if(!G){}return E.Dom.g etChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||K;return Math.max(G[v]. scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||K;return M ath.max(G[v].scrollTop,G.body.scrollTop);},insertBefore:function(Y,G){Y=E.Dom.ge t(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){return null;}return G[Z].insertBefore(Y,G) ;},insertAfter:function(Y,G){Y=E.Dom.get(Y);G=E.Dom.get(G);if(!Y||!G||!G[Z]){ret urn null;}if(G.nextSibling){return G[Z].insertBefore(Y,G.nextSibling);}else{retu rn G[Z].appendChild(Y);}},getClientRegion:function(){var x=E.Dom.getDocumentScro llTop(),Y=E.Dom.getDocumentScrollLeft(),y=E.Dom.getViewportWidth()+Y,G=E.Dom.get ViewportHeight()+x;return new E.Region(x,y,G,Y);},setAttribute:function(Y,G,x){G =E.Dom.CUSTOM_ATTRIBUTES[G]||G;Y.setAttribute(G,x);},getAttribute:function(Y,G){ G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;return Y.getAttribute(G);},_toCamel:function(Y){ var x=d;function G(y,z){return z.toUpperCase();}return x[Y]||(x[Y]=Y.indexOf("-" )===-1?Y:Y.replace(/-([a-z])/gi,G));},_getClassRegex:function(Y){var G;if(Y!==un defined){if(Y.exec){G=Y;}else{G=h[Y];if(!G){Y=Y.replace(E.Dom._patterns.CLASS_RE _TOKENS,"\\$1");G=h[Y]=new RegExp(s+Y+k,U);}}}return G;},_patterns:{ROOT_TAG:/^b ody|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}])/g},_testElement:func tion(G,Y){return G&&G[l]==1&&(!Y||Y(G));},_calcBorders:function(x,y){var Y=parse Int(E.Dom[w](x,R),10)||0,G=parseInt(E.Dom[w](x,q),10)||0;if(H){if(N.test(x[C])){ Y=0;G=0;}}y[0]+=G;y[1]+=Y;return y;}};var S=E.Dom[w];if(m.opera){E.Dom[w]=functi on(Y,G){var x=S(Y,G);if(X.test(G)){x=E.Dom.Color.toRGB(x);}return x;};}if(m.webk it){E.Dom[w]=function(Y,G){var x=S(Y,G);if(x==="rgba(0, 0, 0, 0)"){x="transparen t";}return x;};}})();YOSWIDGETS.util.Region=function(C,D,A,B){this.top=C;this.y= C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this.x=B;this[0]=B;this.width =this.right-this.left;this.height=this.bottom-this.top;};YOSWIDGETS.util.Region. prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A. top>=this.top&&A.bottom<=this.bottom);};YOSWIDGETS.util.Region.prototype.getArea =function(){return((this.bottom-this.top)*(this.right-this.left));};YOSWIDGETS.u til.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top),D=Math .min(this.right,E.right),A=Math.min(this.bottom,E.bottom),B=Math.max(this.left,E .left);if(A>=C&&D>=B){return new YOSWIDGETS.util.Region(C,D,A,B);}else{return nu ll;}};YOSWIDGETS.util.Region.prototype.union=function(E){var C=Math.min(this.top ,E.top),D=Math.max(this.right,E.right),A=Math.max(this.bottom,E.bottom),B=Math.m in(this.left,E.left);return new YOSWIDGETS.util.Region(C,D,A,B);};YOSWIDGETS.uti l.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", rig ht: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this .height+", width: "+this.width+"}");};YOSWIDGETS.util.Region.getRegion=function( D){var F=YOSWIDGETS.util.Dom.getXY(D),C=F[1],E=F[0]+D.offsetWidth,A=F[1]+D.offse tHeight,B=F[0];return new YOSWIDGETS.util.Region(C,E,A,B);};YOSWIDGETS.util.Poin t=function(A,B){if(YOSWIDGETS.lang.isArray(A)){B=A[1];A=A[0];}YOSWIDGETS.util.Po int.superclass.constructor.call(this,B,A,B,A);};YOSWIDGETS.extend(YOSWIDGETS.uti l.Point,YOSWIDGETS.util.Region);(function(){var B=YOSWIDGETS.util,A="clientTop", F="clientLeft",J="parentNode",K="right",W="hasLayout",I="px",U="opacity",L="auto ",D="borderLeftWidth",G="borderTopWidth",P="borderRightWidth",V="borderBottomWid th",S="visible",Q="transparent",N="height",E="width",H="style",T="currentStyle", R=/^width|height$/,O=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|de g|rad|ms|s|hz|khz|%){1}?/i,M={get:function(X,Z){var Y="",a=X[T][Z];if(Z===U){Y=B .Dom.getStyle(X,U);}else{if(!a||(a.indexOf&&a.indexOf(I)>-1)){Y=a;}else{if(B.Dom .IE_COMPUTED[Z]){Y=B.Dom.IE_COMPUTED[Z](X,Z);}else{if(O.test(a)){Y=B.Dom.IE.Comp utedStyle.getPixel(X,Z);}else{Y=a;}}}}return Y;},getOffset:function(Z,e){var b=Z [T][e],X=e.charAt(0).toUpperCase()+e.substr(1),c="offset"+X,Y="pixel"+X,a="",d;i

f(b==L){d=Z[c];if(d===undefined){a=0;}a=d;if(R.test(e)){Z[H][e]=d;if(Z[c]>d){a=d -(Z[c]-d);}Z[H][e]=L;}}else{if(!Z[H][Y]&&!Z[H][e]){Z[H][e]=b;}a=Z[H][Y];}return a+I;},getBorderWidth:function(X,Z){var Y=null;if(!X[T][W]){X[H].zoom=1;}switch(Z ){case G:Y=X[A];break;case V:Y=X.offsetHeight-X.clientHeight-X[A];break;case D:Y =X[F];break;case P:Y=X.offsetWidth-X.clientWidth-X[F];break;}return Y+I;},getPix el:function(Y,X){var a=null,b=Y[T][K],Z=Y[T][X];Y[H][K]=Z;a=Y[H].pixelRight;Y[H] [K]=b;return a+I;},getMargin:function(Y,X){var Z;if(Y[T][X]==L){Z=0+I;}else{Z=B. Dom.IE.ComputedStyle.getPixel(Y,X);}return Z;},getVisibility:function(Y,X){var Z ;while((Z=Y[T])&&Z[X]=="inherit"){Y=Y[J];}return(Z)?Z[X]:S;},getColor:function(Y ,X){return B.Dom.Color.toRGB(Y[T][X])||Q;},getBorderColor:function(Y,X){var Z=Y[ T],a=Z[X]||Z.color;return B.Dom.Color.toRGB(B.Dom.Color.toHex(a));}},C={};C.top= C.right=C.bottom=C.left=C[E]=C[N]=M.getOffset;C.color=M.getColor;C[G]=C[P]=C[V]= C[D]=M.getBorderWidth;C.marginTop=C.marginRight=C.marginBottom=C.marginLeft=M.ge tMargin;C.visibility=M.getVisibility;C.borderColor=C.borderTopColor=C.borderRigh tColor=C.borderBottomColor=C.borderLeftColor=M.getBorderColor;B.Dom.IE_COMPUTED= C;B.Dom.IE_ComputedStyle=M;})();(function(){var C="toString",A=parseInt,B=RegExp ,D=YOSWIDGETS.util;D.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"8080 80",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"0 08000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008 080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_he x:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:fu nction(E){if(!D.Dom.Color.re_RGB.test(E)){E=D.Dom.Color.toHex(E);}if(D.Dom.Color .re_hex.exec(E)){E="rgb("+[A(B.$1,16),A(B.$2,16),A(B.$3,16)].join(", ")+")";}ret urn E;},toHex:function(H){H=D.Dom.Color.KEYWORDS[H]||H;if(D.Dom.Color.re_RGB.exe c(H)){var G=(B.$1.length===1)?"0"+B.$1:Number(B.$1),F=(B.$2.length===1)?"0"+B.$2 :Number(B.$2),E=(B.$3.length===1)?"0"+B.$3:Number(B.$3);H=[G[C](16),F[C](16),E[C ](16)].join("");}if(H.length<6){H=H.replace(D.Dom.Color.re_hex3,"$1$1");}if(H!== "transparent"&&H.indexOf("#")<0){H="#"+H;}return H.toLowerCase();}};}());YOSWIDG ETS.register("dom",YOSWIDGETS.util.Dom,{version:"2.7.0",build:"1796"});YOSWIDGET S.util.CustomEvent=function(D,C,B,A){this.type=D;this.scope=C||window;this.silen t=B;this.signature=A||YOSWIDGETS.util.CustomEvent.LIST;this.subscribers=[];if(!t his.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YOSWIDG ETS.util.CustomEvent(E,this,true);}this.lastError=null;};YOSWIDGETS.util.CustomE vent.LIST=0;YOSWIDGETS.util.CustomEvent.FLAT=1;YOSWIDGETS.util.CustomEvent.proto type={subscribe:function(A,B,C){if(!A){throw new Error("Invalid callback for sub scriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(A ,B,C);}this.subscribers.push(new YOSWIDGETS.util.Subscriber(A,B,C));},unsubscrib e:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=t his.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)) {this._delete(B);E=true;}}return E;},fire:function(){this.lastError=null;var K=[ ],E=this.subscribers.length;if(!E&&this.silent){return true;}var I=[].slice.call (arguments,0),G=true,D,J=false;if(!this.silent){}var C=this.subscribers.slice(), A=YOSWIDGETS.util.Event.throwErrors;for(D=0;D<E;++D){var M=C[D];if(!M){J=true;}e lse{if(!this.silent){}var L=M.getScope(this.scope);if(this.signature==YOSWIDGETS .util.CustomEvent.FLAT){var B=null;if(I.length>0){B=I[0];}try{G=M.fn.call(L,B,M. obj);}catch(F){this.lastError=F;if(A){throw F;}}}else{try{G=M.fn.call(L,this.typ e,I,M.obj);}catch(H){this.lastError=H;if(A){throw H;}}}if(false===G){if(!this.si lent){}break;}}}return(G!==false);},unsubscribeAll:function(){var A=this.subscri bers.length,B;for(B=A-1;B>-1;B--){this._delete(B);}this.subscribers=[];return A; },_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;} this.subscribers.splice(A,1);},toString:function(){return"CustomEvent: "+"'"+thi s.type+"', "+"context: "+this.scope;}};YOSWIDGETS.util.Subscriber=function(A,B,C ){this.fn=A;this.obj=YOSWIDGETS.lang.isUndefined(B)?null:B;this.overrideContext= C;};YOSWIDGETS.util.Subscriber.prototype.getScope=function(A){if(this.overrideCo ntext){if(this.overrideContext===true){return this.obj;}else{return this.overrid eContext;}}return A;};YOSWIDGETS.util.Subscriber.prototype.contains=function(A,B ){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YOSWIDGETS.u til.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj +", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YOSWIDGETS.util.E vent){YOSWIDGETS.util.Event=function(){var H=false;var I=[];var J=[];var G=[];va

r E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235 :39,63276:33,63277:34,25:9};var K=YOSWIDGETS.env.ua.ie?"focusin":"focus";var L=Y OSWIDGETS.env.ua.ie?"focusout":"blur";return{POLL_RETRYS:2000,POLL_INTERVAL:20,E L:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,i sSafari:YOSWIDGETS.env.ua.webkit,webkit:YOSWIDGETS.env.ua.webkit,isIE:YOSWIDGETS .env.ua.ie,_interval:null,_dri:null,DOMReady:false,throwErrors:false,startInterv al:function(){if(!this._interval){var M=this;var N=function(){M._tryPreloadAttac h();};this._interval=setInterval(N,this.POLL_INTERVAL);}},onAvailable:function(S ,O,Q,R,P){var M=(YOSWIDGETS.lang.isString(S))?[S]:S;for(var N=0;N<M.length;N=N+1 ){F.push({id:M[N],fn:O,obj:Q,overrideContext:R,checkReady:P});}C=this.POLL_RETRY S;this.startInterval();},onContentReady:function(P,M,N,O){this.onAvailable(P,M,N ,O,true);},onDOMReady:function(M,N,O){if(this.DOMReady){setTimeout(function(){va r P=window;if(O){if(O===true){P=N;}else{P=O;}}M.call(P,"DOMReady",[],N);},0);}el se{this.DOMReadyEvent.subscribe(M,N,O);}},_addListener:function(O,M,Y,S,W,b){if( !Y||!Y.call){return false;}if(this._isValidCollection(O)){var Z=true;for(var T=0 ,V=O.length;T<V;++T){Z=this.on(O[T],M,Y,S,W)&&Z;}return Z;}else{if(YOSWIDGETS.la ng.isString(O)){var R=this.getEl(O);if(R){O=R;}else{this.onAvailable(O,function( ){YOSWIDGETS.util.Event.on(O,M,Y,S,W);});return true;}}}if(!O){return false;}if( "unload"==M&&S!==this){J[J.length]=[O,M,Y,S,W];return true;}var N=O;if(W){if(W== =true){N=S;}else{N=W;}}var P=function(c){return Y.call(N,YOSWIDGETS.util.Event.g etEvent(c,O),S);};var a=[O,M,Y,P,N,S,W];var U=I.length;I[U]=a;if(this.useLegacyE vent(O,M)){var Q=this.getLegacyIndex(O,M);if(Q==-1||O!=G[Q][0]){Q=G.length;B[O.i d+M]=Q;G[Q]=[O,M,O["on"+M]];E[Q]=[];O["on"+M]=function(c){YOSWIDGETS.util.Event. fireLegacyEvent(YOSWIDGETS.util.Event.getEvent(c),Q);};}E[Q].push(a);}else{try{t his._simpleAdd(O,M,P,b);}catch(X){this.lastError=X;this.removeListener(O,M,Y);re turn false;}}return true;},addListener:function(N,Q,M,O,P){return this._addListe ner(N,Q,M,O,P,false);},addFocusListener:function(N,M,O,P){return this._addListen er(N,K,M,O,P,true);},removeFocusListener:function(N,M){return this.removeListene r(N,K,M);},addBlurListener:function(N,M,O,P){return this._addListener(N,L,M,O,P, true);},removeBlurListener:function(N,M){return this.removeListener(N,L,M);},fir eLegacyEvent:function(R,P){var T=true,M,V,U,N,S;V=E[P].slice();for(var O=0,Q=V.l ength;O<Q;++O){U=V[O];if(U&&U[this.WFN]){N=U[this.ADJ_SCOPE];S=U[this.WFN].call( N,R);T=(T&&S);}}M=G[P];if(M&&M[2]){M[2](R);}return T;},getLegacyIndex:function(N ,O){var M=this.generateId(N)+O;if(typeof B[M]=="undefined"){return-1;}else{retur n B[M];}},useLegacyEvent:function(M,N){return(this.webkit&&this.webkit<419&&("cl ick"==N||"dblclick"==N));},removeListener:function(N,M,V){var Q,T,X;if(typeof N= ="string"){N=this.getEl(N);}else{if(this._isValidCollection(N)){var W=true;for(Q =N.length-1;Q>-1;Q--){W=(this.removeListener(N[Q],M,V)&&W);}return W;}}if(!V||!V .call){return this.purgeElement(N,false,M);}if("unload"==M){for(Q=J.length-1;Q>1;Q--){X=J[Q];if(X&&X[0]==N&&X[1]==M&&X[2]==V){J.splice(Q,1);return true;}}retur n false;}var R=null;var S=arguments[3];if("undefined"===typeof S){S=this._getCac heIndex(N,M,V);}if(S>=0){R=I[S];}if(!N||!R){return false;}if(this.useLegacyEvent (N,M)){var P=this.getLegacyIndex(N,M);var O=E[P];if(O){for(Q=0,T=O.length;Q<T;++ Q){X=O[Q];if(X&&X[this.EL]==N&&X[this.TYPE]==M&&X[this.FN]==V){O.splice(Q,1);bre ak;}}}}else{try{this._simpleRemove(N,M,R[this.WFN],false);}catch(U){this.lastErr or=U;return false;}}delete I[S][this.WFN];delete I[S][this.FN];I.splice(S,1);ret urn true;},getTarget:function(O,N){var M=O.target||O.srcElement;return this.reso lveTextNode(M);},resolveTextNode:function(N){try{if(N&&3==N.nodeType){return N.p arentNode;}}catch(M){}return N;},getPageX:function(N){var M=N.pageX;if(!M&&0!==M ){M=N.clientX||0;if(this.isIE){M+=this._getScrollLeft();}}return M;},getPageY:fu nction(M){var N=M.pageY;if(!N&&0!==N){N=M.clientY||0;if(this.isIE){N+=this._getS crollTop();}}return N;},getXY:function(M){return[this.getPageX(M),this.getPageY( M)];},getRelatedTarget:function(N){var M=N.relatedTarget;if(!M){if(N.type=="mous eout"){M=N.toElement;}else{if(N.type=="mouseover"){M=N.fromElement;}}}return thi s.resolveTextNode(M);},getTime:function(O){if(!O.time){var N=new Date().getTime( );try{O.time=N;}catch(M){this.lastError=M;return N;}}return O.time;},stopEvent:f unction(M){this.stopPropagation(M);this.preventDefault(M);},stopPropagation:func tion(M){if(M.stopPropagation){M.stopPropagation();}else{M.cancelBubble=true;}},p reventDefault:function(M){if(M.preventDefault){M.preventDefault();}else{M.return Value=false;}},getEvent:function(O,M){var N=O||window.event;if(!N){var P=this.ge

tEvent.caller;while(P){N=P.arguments[0];if(N&&Event==N.constructor){break;}P=P.c aller;}}return N;},getCharCode:function(N){var M=N.keyCode||N.charCode||0;if(YOS WIDGETS.env.ua.webkit&&(M in D)){M=D[M];}return M;},_getCacheIndex:function(Q,R, P){for(var O=0,N=I.length;O<N;O=O+1){var M=I[O];if(M&&M[this.FN]==P&&M[this.EL]= =Q&&M[this.TYPE]==R){return O;}}return-1;},generateId:function(M){var N=M.id;if( !N){N="yuievtautoid-"+A;++A;M.id=N;}return N;},_isValidCollection:function(N){tr y{return(N&&typeof N!=="string"&&N.length&&!N.tagName&&!N.alert&&typeof N[0]!==" undefined");}catch(M){return false;}},elCache:{},getEl:function(M){return(typeof M==="string")?document.getElementById(M):M;},clearCache:function(){},DOMReadyEv ent:new YOSWIDGETS.util.CustomEvent("DOMReady",this),_load:function(N){if(!H){H= true;var M=YOSWIDGETS.util.Event;M._ready();M._tryPreloadAttach();}},_ready:func tion(N){var M=YOSWIDGETS.util.Event;if(!M.DOMReady){M.DOMReady=true;M.DOMReadyEv ent.fire();M._simpleRemove(document,"DOMContentLoaded",M._ready);}},_tryPreloadA ttach:function(){if(F.length===0){C=0;if(this._interval){clearInterval(this._int erval);this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!th is.DOMReady){this.startInterval();return;}}this.locked=true;var S=!H;if(!S){S=(C >0&&F.length>0);}var R=[];var T=function(V,W){var U=V;if(W.overrideContext){if(W .overrideContext===true){U=W.obj;}else{U=W.overrideContext;}}W.fn.call(U,W.obj); };var N,M,Q,P,O=[];for(N=0,M=F.length;N<M;N=N+1){Q=F[N];if(Q){P=this.getEl(Q.id) ;if(P){if(Q.checkReady){if(H||P.nextSibling||!S){O.push(Q);F[N]=null;}}else{T(P, Q);F[N]=null;}}else{R.push(Q);}}}for(N=0,M=O.length;N<M;N=N+1){Q=O[N];T(this.get El(Q.id),Q);}C--;if(S){for(N=F.length-1;N>-1;N--){Q=F[N];if(!Q||!Q.id){F.splice( N,1);}}this.startInterval();}else{if(this._interval){clearInterval(this._interva l);this._interval=null;}}this.locked=false;},purgeElement:function(Q,R,T){var O= (YOSWIDGETS.lang.isString(Q))?this.getEl(Q):Q;var S=this.getListeners(O,T),P,M;i f(S){for(P=S.length-1;P>-1;P--){var N=S[P];this.removeListener(O,N.type,N.fn);}} if(R&&O&&O.childNodes){for(P=0,M=O.childNodes.length;P<M;++P){this.purgeElement( O.childNodes[P],R,T);}}},getListeners:function(O,M){var R=[],N;if(!M){N=[I,J];}e lse{if(M==="unload"){N=[J];}else{N=[I];}}var T=(YOSWIDGETS.lang.isString(O))?thi s.getEl(O):O;for(var Q=0;Q<N.length;Q=Q+1){var V=N[Q];if(V){for(var S=0,U=V.leng th;S<U;++S){var P=V[S];if(P&&P[this.EL]===T&&(!M||M===P[this.TYPE])){R.push({typ e:P[this.TYPE],fn:P[this.FN],obj:P[this.OBJ],adjust:P[this.OVERRIDE],scope:P[thi s.ADJ_SCOPE],index:S});}}}}return(R.length)?R:null;},_unload:function(T){var N=Y OSWIDGETS.util.Event,Q,P,O,S,R,U=J.slice(),M;for(Q=0,S=J.length;Q<S;++Q){O=U[Q]; if(O){M=window;if(O[N.ADJ_SCOPE]){if(O[N.ADJ_SCOPE]===true){M=O[N.UNLOAD_OBJ];}e lse{M=O[N.ADJ_SCOPE];}}O[N.FN].call(M,N.getEvent(T,O[N.EL]),O[N.UNLOAD_OBJ]);U[Q ]=null;}}O=null;M=null;J=null;if(I){for(P=I.length-1;P>-1;P--){O=I[P];if(O){N.re moveListener(O[N.EL],O[N.TYPE],O[N.FN],P);}}O=null;}G=null;N._simpleRemove(windo w,"unload",N._unload);},_getScrollLeft:function(){return this._getScroll()[1];}, _getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var M=document.documentElement,N=document.body;if(M&&(M.scrollTop||M.scrollLeft)){r eturn[M.scrollTop,M.scrollLeft];}else{if(N){return[N.scrollTop,N.scrollLeft];}el se{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventLi stener){return function(O,P,N,M){O.addEventListener(P,N,(M));};}else{if(window.a ttachEvent){return function(O,P,N,M){O.attachEvent("on"+P,N);};}else{return func tion(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return fu nction(O,P,N,M){O.removeEventListener(P,N,(M));};}else{if(window.detachEvent){re turn function(N,O,M){N.detachEvent("on"+O,M);};}else{return function(){};}}}()}; }();(function(){var EU=YOSWIDGETS.util.Event;EU.on=EU.addListener;EU.onFocus=EU. addFocusListener;EU.onBlur=EU.addBlurListener;if(EU.isIE){YOSWIDGETS.util.Event. onDOMReady(YOSWIDGETS.util.Event._tryPreloadAttach,YOSWIDGETS.util.Event,true);v ar n=document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll(" left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null;}catch(ex){}},EU.P OLL_INTERVAL);}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){ var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dr i);EU._dri=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"D OMContentLoaded",EU._ready);}}EU._simpleAdd(window,"load",EU._load);EU._simpleAd d(window,"unload",EU._unload);EU._tryPreloadAttach();})();}YOSWIDGETS.util.Event Provider=function(){};YOSWIDGETS.util.EventProvider.prototype={__yui_events:null ,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui

_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui _subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B [A]=[];}B[A].push({fn:C,obj:F,overrideContext:E});}},unsubscribe:function(C,E,G) {this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C ];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YOSWIDGET S.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false; },unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G ,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events; if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YOSWIDGETS.util.Cu stomEvent(G,H,E,YOSWIDGETS.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallbac k){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=thi s.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.le ngth;++C){B.subscribe(F[C].fn,F[C].obj,F[C].overrideContext);}}}return I[G];},fi reEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__y ui_events[E];if(!G){return null;}var B=[];for(var F=1;F<arguments.length;++F){B. push(arguments[F]);}return G.fire.apply(G,B);},hasEvent:function(A){if(this.__yu i_events){if(this.__yui_events[A]){return true;}}return false;}};(function(){var A=YOSWIDGETS.util.Event,C=YOSWIDGETS.lang;YOSWIDGETS.util.KeyListener=function( D,I,E,F){if(!D){}else{if(!I){}else{if(!E){}}}if(!F){F=YOSWIDGETS.util.KeyListene r.KEYDOWN;}var G=new YOSWIDGETS.util.CustomEvent("keyPressed");this.enabledEvent =new YOSWIDGETS.util.CustomEvent("enabled");this.disabledEvent=new YOSWIDGETS.ut il.CustomEvent("disabled");if(C.isString(D)){D=document.getElementById(D);}if(C. isFunction(E)){G.subscribe(E);}else{G.subscribe(E.fn,E.scope,E.correctScope);}fu nction H(O,N){if(!I.shift){I.shift=false;}if(!I.alt){I.alt=false;}if(!I.ctrl){I. ctrl=false;}if(O.shiftKey==I.shift&&O.altKey==I.alt&&O.ctrlKey==I.ctrl){var J,M= I.keys,L;if(YOSWIDGETS.lang.isArray(M)){for(var K=0;K<M.length;K++){J=M[K];L=A.g etCharCode(O);if(J==L){G.fire(L,O);break;}}}else{L=A.getCharCode(O);if(M==L){G.f ire(L,O);}}}}this.enable=function(){if(!this.enabled){A.on(D,F,H);this.enabledEv ent.fire(I);}this.enabled=true;};this.disable=function(){if(this.enabled){A.remo veListener(D,F,H);this.disabledEvent.fire(I);}this.enabled=false;};this.toString =function(){return"KeyListener ["+I.keys+"] "+D.tagName+(D.id?"["+D.id+"]":"");} ;};var B=YOSWIDGETS.util.KeyListener;B.KEYDOWN="keydown";B.KEYUP="keyup";B.KEY={ ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ES CAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,P RINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YOSWI DGETS.register("event",YOSWIDGETS.util.Event,{version:"2.7.0",build:"1796"});YOS WIDGETS.register("yahoo-dom-event",YOSWIDGETS,{version:"2.7.0",build:"1796"});YO SWIDGETS.util.Get=function(){var M={},L=0,R=0,E=false,N=YOSWIDGETS.env.ua,S=YOSW IDGETS.lang;var J=function(W,T,X){var U=X||window,Y=U.document,Z=Y.createElement (W);for(var V in T){if(T[V]&&YOSWIDGETS.lang.hasOwnProperty(T,V)){Z.setAttribute (V,T[V]);}}return Z;};var I=function(T,U,W){var V=W||"utf-8";return J("link",{"i d":"yui__dyn_"+(R++),"type":"text/css","charset":V,"rel":"stylesheet","href":T}, U);};var P=function(T,U,W){var V=W||"utf-8";return J("script",{"id":"yui__dyn_"+ (R++),"type":"text/javascript","charset":V,"src":T},U);};var A=function(T,U){ret urn{tId:T.tId,win:T.win,data:T.data,nodes:T.nodes,msg:U,purge:function(){D(this. tId);}};};var B=function(T,W){var U=M[W],V=(S.isString(T))?U.win.document.getEle mentById(T):T;if(!V){Q(W,"target node not found: "+T);}return V;};var Q=function (W,V){var T=M[W];if(T.onFailure){var U=T.scope||T.win;T.onFailure.call(U,A(T,V)) ;}};var C=function(W){var T=M[W];T.finished=true;if(T.aborted){var V="transactio n "+W+" was aborted";Q(W,V);return;}if(T.onSuccess){var U=T.scope||T.win;T.onSuc cess.call(U,A(T));}};var O=function(V){var T=M[V];if(T.onTimeout){var U=T.scope| |T;T.onTimeout.call(U,A(T));}};var G=function(V,Z){var U=M[V];if(U.timer){U.time r.cancel();}if(U.aborted){var X="transaction "+V+" was aborted";Q(V,X);return;}i f(Z){U.url.shift();if(U.varName){U.varName.shift();}}else{U.url=(S.isString(U.ur l))?[U.url]:U.url;if(U.varName){U.varName=(S.isString(U.varName))?[U.varName]:U. varName;}}var c=U.win,b=c.document,a=b.getElementsByTagName("head")[0],W;if(U.ur l.length===0){if(U.type==="script"&&N.webkit&&N.webkit<420&&!U.finalpass&&!U.var Name){var Y=P(null,U.win,U.charset);Y.innerHTML='YOSWIDGETS.util.Get._finalize(" '+V+'");';U.nodes.push(Y);a.appendChild(Y);}else{C(V);}return;}var T=U.url[0];if (!T){U.url.shift();return G(V);}if(U.timeout){U.timer=S.later(U.timeout,U,O,V);}

if(U.type==="script"){W=P(T,c,U.charset);}else{W=I(T,c,U.charset);}F(U.type,W,V, T,c,U.url.length);U.nodes.push(W);if(U.insertBefore){var e=B(U.insertBefore,V);i f(e){e.parentNode.insertBefore(W,e);}}else{a.appendChild(W);}if((N.webkit||N.gec ko)&&U.type==="css"){G(V,T);}};var K=function(){if(E){return;}E=true;for(var T i n M){var U=M[T];if(U.autopurge&&U.finished){D(U.tId);delete M[T];}}E=false;};var D=function(a){var X=M[a];if(X){var Z=X.nodes,T=Z.length,Y=X.win.document,W=Y.ge tElementsByTagName("head")[0];if(X.insertBefore){var V=B(X.insertBefore,a);if(V) {W=V.parentNode;}}for(var U=0;U<T;U=U+1){W.removeChild(Z[U]);}X.nodes=[];}};var H=function(U,T,V){var X="q"+(L++);V=V||{};if(L%YOSWIDGETS.util.Get.PURGE_THRESH= ==0){K();}M[X]=S.merge(V,{tId:X,type:U,url:T,finished:false,aborted:false,nodes: []});var W=M[X];W.win=W.win||window;W.scope=W.scope||W.win;W.autopurge=("autopur ge"in W)?W.autopurge:(U==="script")?true:false;S.later(0,W,G,X);return{tId:X};}; var F=function(c,X,W,U,Y,Z,b){var a=b||G;if(N.ie){X.onreadystatechange=function( ){var d=this.readyState;if("loaded"===d||"complete"===d){X.onreadystatechange=nu ll;a(W,U);}};}else{if(N.webkit){if(c==="script"){if(N.webkit>=420){X.addEventLis tener("load",function(){a(W,U);});}else{var T=M[W];if(T.varName){var V=YOSWIDGET S.util.Get.POLL_FREQ;T.maxattempts=YOSWIDGETS.util.Get.TIMEOUT/V;T.attempts=0;T. _cache=T.varName[0].split(".");T.timer=S.later(V,T,function(j){var f=this._cache ,e=f.length,d=this.win,g;for(g=0;g<e;g=g+1){d=d[f[g]];if(!d){this.attempts++;if( this.attempts++>this.maxattempts){var h="Over retry limit, giving up";T.timer.ca ncel();Q(W,h);}else{}return;}}T.timer.cancel();a(W,U);},null,true);}else{S.later (YOSWIDGETS.util.Get.POLL_FREQ,null,a,[W,U]);}}}}else{X.onload=function(){a(W,U) ;};}}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(T){S. later(0,null,C,T);},abort:function(U){var V=(S.isString(U))?U:U.tId;var T=M[V];i f(T){T.aborted=true;}},script:function(T,U){return H("script",T,U);},css:functio n(T,U){return H("css",T,U);}};}();YOSWIDGETS.register("get",YOSWIDGETS.util.Get, {version:"2.7.0",build:"1796"});if(typeof YOSWIDGETS==="undefined"||!YOSWIDGETS) {var YOSWIDGETS={util:{},lang:{isFunction:function(x){return typeof x==='functio n';},isString:function(s){return(''+s)===s&&typeof s==='string';},hasOwnProperty :function(o,prop){if(Object.prototype.hasOwnProperty){return o.hasOwnProperty(pr op);} return typeof o[prop]!=='undefined'&&o.constructor.prototype[prop]!==o[prop];}}} ;} YOSWIDGETS.util.CrossFrame=(function(){var MAX_SIZE=2000,FRAMES_NUMERIC=/^frames \[(\d+)\]$/,FRAMES_NAMED=/^frames\[['"]([a-zA-Z0-9-_]+)['"]\]$/,$L=YOSWIDGETS.la ng;var forEach=function(arr,func){for(var i=0,l=arr.length;i<l;i++){func(arr[i], i);}};var mapReduce=function(arr,func,res){forEach(arr,function(item,index){res= func(item,index,res);});return res;};var parseQueryString=function(s){return map Reduce(s.split('&'),function(pair,index,result){var e=pair.indexOf('=');result[p air.substr(0,e)]=decodeURIComponent(pair.substr(e+1));return result;},{});};var nodeToTarget=function(node){if($L.isString(node)){return node;} if(node===window.parent){return'parent';} if(node===window.top){return'top';} if(node.tagName&&node.tagName==='IFRAME'&&node.contentWindow){if(node.name!=='') {return"frames['"+node.name+"']";} else{var iframes=document.getElementsByTagName('iframe');for(var i=0,l=iframes.l ength;i<l;i++){if(iframes[i]===node){return"frames["+i+"]";}}}} return null;};var targetToNode=function(target){if(target.tagName&&target.tagNam e==='IFRAME'&&target.contentWindow){return target.contentWindow;} return mapReduce(target.split('.'),function(part,index,node){if(part==='parent') {return node.parent;} if(part==='top'){return node.top;} var matches;if((matches=FRAMES_NUMERIC.exec(part)||FRAMES_NAMED.exec(part))){ret urn node.frames[matches[1]];} throw new Error('Invalid Target Part: '+part);},window);};var findIframe=functio n(src){var href=($L.isString(src))?src.replace(/#$/,''):false;var iframes=docume nt.getElementsByTagName('iframe');for(var i=0,l=iframes.length;i<l;i++){if(ifram es[i].src.replace(/#$/,'')===href||iframes[i].contentWindow.location===src){retu rn iframes[i];}} return null;};var isActionStringValid=function(s){var strings;strings={"close":1

,"height":1,"photo-select-success":1,"photo-select-failure":1,"successName":1,"r efresh":1,"cc-redirect":1,"cc-closehidden":1};return strings[s];} var isCrumbValid=function(c,widgetName){return(c==YOSWIDGETS.Profiles.WidgetLoad er[widgetName+"Crumb"]);};var isWidgetNameValid=function(w){var widgetNames;widg etNames={photopicker:1,nicknamepicker:1,contactcard:1};return widgetNames[w];};v ar isMessageValid=function(msg){var parts,ret,widgetNames,i;if(!$L.isString(msg) )return false;parts=msg.split("|");if(parts[2]!="action")return false;return(isW idgetNameValid(parts[0])&&isCrumbValid(parts[1],parts[0])&&isActionStringValid(p arts[3]));};var _send;if(window.postMessage||document.postMessage){var useDocume nt=!$L.isFunction(window.postMessage)&&!window.attachEvent;var messageHandler=fu nction(evt){var iframe=findIframe(evt.source.location||evt.uri);var uri;if(ifram e&&iframe.src){uri=iframe.src;}else{uri=evt.origin?evt.origin:'http://'+evt.doma in;} var domain=uri.split('/')[2];if(isMessageValid(evt.data)){YOSWIDGETS.util.CrossF rame.onMessageEvent.fire(evt.data,domain,uri,iframe);}};if(window.addEventListen er){window.addEventListener('message',messageHandler,false);} else if(window.attachEvent){window.attachEvent('onmessage',messageHandler);} _send=function(proxy,target,message){var matches,targetNode;targetNode=targetToN ode(nodeToTarget(target));if(useDocument){targetNode=targetNode.document;} if(!targetNode){throw new Error('Could not resolve target: '+target);} targetNode.postMessage(message,proxy);};} else{var iframeOnload=function X(e,args){var el=this;YOSWIDGETS.util.Event.remov eListener(el,'load',X);window.setTimeout(function(){if(el.parentNode){el.parentN ode.removeChild(el);} el=null;if(args.message_rest){_send(args.proxy,args.target,args.message_rest,arg s.key);}},20);};_send=function(proxy,target,message,key){target=nodeToTarget(tar get);var el,s,message_rest;if(message.length>MAX_SIZE){message_rest=message.subs tr(MAX_SIZE);message=message.substr(0,MAX_SIZE);} key=key||(Math.random()*(1<<30)).toString(16);el=document.createElement('iframe' );s=el.style;s.position='absolute';s.visibility='hidden';s.top=s.left=s.width=s. height='0';document.body.appendChild(el);YOSWIDGETS.util.Event.addListener(el,'l oad',iframeOnload,{proxy:proxy,target:target,message_rest:message_rest,key:key}) ;s='target='+encodeURIComponent(target)+'&key='+encodeURIComponent(key)+'&messag e='+encodeURIComponent(message)+'&url='+encodeURIComponent(window.location.toStr ing());if(message_rest){s+='&p=1';} el.src=proxy+'#'+s;};} var proxyReceive=function(){var href=window.location.href,params=parseQueryStrin g(href.substr(href.indexOf('#')+1));if($L.hasOwnProperty(params,'target')&&$L.ha sOwnProperty(params,'message')&&$L.hasOwnProperty(params,'key')&&$L.hasOwnProper ty(params,'url')){var target=targetToNode('parent.'+params.target),domain=params .url.split('/')[2],buffer=target.YOSWIDGETS.util.CrossFrame.buffer,key=params.ur l+'|'+params.key;if($L.hasOwnProperty(params,'p')){if(!buffer[key]){buffer[key]= [];} buffer[key].push(params.message);return;}else if(buffer[key]){params.message=[]. join.call(buffer[key],'')+params.message;delete buffer[key];} if(!target){throw new Error('Could not resolve target: '+target);} target.YOSWIDGETS.util.CrossFrame._receive(params.message,domain,params.url);}el se{throw new Error('Missing required params: '+location.hash.substr(1));}};var C rossFrame;if(YOSWIDGETS.util.CustomEvent){CrossFrame={onMessageEvent:new YOSWIDG ETS.util.CustomEvent('onMessage'),buffer:{},send:_send,_receive:function(message ,domain,uri){if(isMessageValid(message)){YOSWIDGETS.util.CrossFrame.onMessageEve nt.fire(message,domain,uri,findIframe(uri));}},proxyReceive:proxyReceive};} else{CrossFrame={proxyReceive:proxyReceive};} return CrossFrame;})();YOSWIDGETS.namespace("Profiles");YOSWIDGETS.Profiles.Widg etLoader=function(){var widgetConfig,widgetName,filesMap,Dom,Event,Get,basePath; Dom=YOSWIDGETS.util.Dom;Event=YOSWIDGETS.util.Event;Get=YOSWIDGETS.util.Get;base Path=YOSWIDGETS.Profiles.widgetHostPath||"http://widgets.profiles.yahoo.com/";fi lesMap={photoPicker:["js/pickers.widget.js"],nicknamePicker:["js/pickers.widget. js"],contactCard:["one/contactcard/js/contactcard.widget.js"]};function loadWidg et(e){Event.preventDefault(e);if(typeof YOSWIDGETS.Profiles.Widgets[widgetName].

init==="undefined"){Get.script(basePath+filesMap[widgetName],{onSuccess:function (){YOSWIDGETS.Profiles.Widgets[widgetName].init(widgetConfig);}});} else{YOSWIDGETS.Profiles.Widgets[widgetName].init(widgetConfig);}} function setUpWidgets(){var links,linksLen,i;switch(widgetName){case"photoPicker ":links=Dom.getElementsByClassName(widgetConfig.changePhotoLink);linksLen=links. length;for(i=0;i<linksLen;i++){Event.on(links[i],"click",loadWidget,{},true);} break;case"nicknamePicker":links=Dom.getElementsByClassName(widgetConfig.namePic kerClass);linksLen=links.length;for(i=0;i<linksLen;i++){Event.on(links[i],"click ",loadWidget,{},true);} break;case"contactCard":if(widgetConfig.contactcardedited==1){Event.onDOMReady(l oadWidget);} links=Dom.getElementsByClassName(widgetConfig.contactCardClass);linksLen=links.l ength;for(i=0;i<linksLen;i++){Event.on(links[i],"click",loadWidget,{},true);} break;default:break;}} function load(wName,wConf){widgetConfig=wConf;widgetName=wName;YOSWIDGETS.Profil es.WidgetLoader[wName.toLowerCase()+"Crumb"]=widgetConfig.pickerCrumb;YOSWIDGETS .namespace("Profiles.Widgets."+widgetName);if(typeof YOSWIDGETS.Profiles.Widgets [widgetName]){setUpWidgets();}} return{load:load};};YAHOO.Search.Answers.tabView=function(){var Css=YAHOO.Search .Answers.css.tabView,Yud=YAHOO.util.Dom,Yue=YAHOO.util.Event;function createTabs (el){var nav=Yud.getElementsByClassName(Css.hdClass,'ul',el);YAHOO.Search.Answer s.tabChange.subscribe(showTab);if(nav.length>0){Yue.on(nav[0],'click',tabNavigat ion);} var el=document.getElementById('yan-ask-allcats');if(el){Yue.on(el,'click',tabNa vigation);} var el=document.getElementById('yan-ask-autocat');if(el){Yue.on(el,'click',tabNa vigation);}} function tabNavigation(e){var el=Yue.getTarget(e);if(e){target=(el.nodeName.toLo werCase()=='a'?el:Yud.getAncestorByTagName(el,'a'));if(target){var id=document.g etElementById(target.href.replace(/.*#/,''));if(id){Yue.preventDefault(e);YAHOO. Search.Answers.tabChange.fire(target);}}}} function showTab(sType,aArgs){var target=aArgs[0];var id=document.getElementById (target.href.replace(/.*#/,''));if(id){Yud.removeClass(id,Css.hideClass);var hd= Yud.getElementsByClassName('hd','ul',id.parentNode.parentNode)[0];Yud.replaceCla ss(Yud.getElementsByClassName(Css.showClass,'li',hd),Css.showClass,Css.hideClass );var tab=Yud.getElementsBy(function(el){if(el.getElementsByTagName('a')[0].href .replace(/.*#/,'')==target.href.replace(/.*#/,'')){return true;} return false;},'li',hd);Yud.replaceClass(tab,Css.hideClass,Css.showClass);Yud.re placeClass(Yud.getElementsByClassName(Css.showClass,'div',id.parentNode),Css.sho wClass,Css.hideClass);Yud.replaceClass(id,Css.hideClass,Css.showClass);}} return{init:function(){var els=Yud.getElementsByClassName(Css.tabClass);if(els.l ength>0){for(var i=0,l=els.length;i<l;i++){createTabs(els[i]);}}},addTabEvent:fu nction(el){if(el){Yue.on(el,'click',tabNavigation);}},showTab:function(el){YAHOO .Search.Answers.tabChange.fire(el);}};}();YAHOO.Search.Answers.domCollapse=funct ion(){var css=YAHOO.Search.Answers.css.domCollapse;function toggle(e){var parent =YAHOO.util.Dom.hasClass(this,css.triggerClass)?this:this.parentNode;var id=this .href.replace(/.*#/,'');YAHOO.log(id);var t=document.getElementById(id);if(t!==u ndefined){if(YAHOO.util.Dom.hasClass(t,css.hideClass)){YAHOO.util.Dom.removeClas s(t,css.hideClass);YAHOO.util.Dom.replaceClass(parent,css.parentClass,css.openCl ass);}else{YAHOO.util.Dom.addClass(t,css.hideClass);YAHOO.util.Dom.replaceClass( parent,css.openClass,css.parentClass);};YAHOO.util.Event.preventDefault(e);};} function getNext(o){var t=o.nextSibling;if(t){while(t.nodeType!==1&&t.nextSiblin g){t=t.nextSibling;}} return t;} return{init:function(){if(typeof(css)!=='undefined'){var bookmark=window.locatio n.hash.replace('#','');var elms=YAHOO.util.Dom.getElementsByClassName(css.trigge rClass);for(var i=0,j=elms.length;i<j;i++){if(elms[i].nodeName.toLowerCase()!==' a'){var t=getNext(elms[i]);if(t){var newID=t.id||YAHOO.util.Dom.generateId();t.s etAttribute('id',newID);var a=document.createElement('a');a.setAttribute('href', '#'+newID);var c=elms[i].innerHTML;a.innerHTML=elms[i].innerHTML;elms[i].innerHT

ML='';elms[i].appendChild(a);if(newID!==bookmark){YAHOO.util.Dom.addClass(elms[i ],css.openClass);YAHOO.util.Dom.addClass(t,css.openClass);}else{YAHOO.util.Dom.a ddClass(elms[i],css.hideClass);YAHOO.util.Dom.removeClass(t,css.openClass);};YAH OO.util.Event.on(a,'click',toggle);};}else{var newID=elms[i].href.replace(/.*#/, '');var t=document.getElementById(newID)||getNext(elms[i]);if(t!==null){if(t.id! ==newID){newID=t.id;elms[i].setAttribute('href','#'+newID);};if(newID!==bookmark ){YAHOO.util.Dom.addClass(elms[i],css.parentClass);}else{YAHOO.util.Dom.addClass (elms[i],css.hideClass);};YAHOO.util.Event.on(elms[i],'click',toggle);};};};};}} ;}();YAHOO.Search.Answers.simpleRater=function(){var labelContainers,labelContai nersLength;var rated=0;var labels=[];var clickedEl;var config;var setText=functi on(rating){var ratingText,ratingTextEl=document.getElementById(config.ratingText ElId);if(!rating){ratingText="";YAHOO.util.Dom.setStyle(ratingTextEl,"visibility ","hidden")}else{ratingText=labels[rating];YAHOO.util.Dom.setStyle(ratingTextEl, "visibility","visible");} ratingTextEl.getElementsByTagName("span")[0].innerHTML=ratingText;};var swapStar s=function(eventType,rating){var imgEl,divId,divRating;for(var i=0;i<labelContai nersLength;i++){divId=labelContainers[i].id;divRating=divId.charAt(divId.length1);if(divRating<=rating){imgEl=labelContainers[i].getElementsByTagName("img")[0] ;if(eventType==="mouseover"||eventType==="focus"){imgEl.src=config.starHoverURL; }else{imgEl.src=config.starOnURL;}}else{imgEl=labelContainers[i].getElementsByTa gName("img")[0];imgEl.src=config.starOffURL;}}};var setStarRating=function(e){YA HOO.util.Event.preventDefault(e);var currentEl=YAHOO.util.Event.getTarget(e);if( currentEl.nodeName.toLowerCase()==='img'){currentEl=document.getElementById(curr entEl.parentNode.htmlFor);} if(currentEl.nodeName.toLowerCase()==='label'){currentEl=document.getElementById (currentEl.htmlFor);} if(currentEl.nodeName.toLowerCase()==='input'){var rating=currentEl.value;if((e. type==="mouseover")&&((currentEl!==clickedEl)||!rated)){swapStars("mouseover",ra ting);} if(e.type==="click"||e.type==="focus"){swapStars("click",rating);currentEl.check ed=true;rated=rating;clickedEl=currentEl;} setText(rating);}};var resetStarRating=function(e){for(var i=0;i<labelContainers Length;i++){var imgEl=labelContainers[i].getElementsByTagName("img")[0];if(i<rat ed){imgEl.src=config.starOnURL;} else{imgEl.src=config.starOffURL;}} setText(rated);};var init=function(msg,args,cfg){config={ratingContainerElId:cfg &&cfg.ratingContainerElId||"answer-rating",ratingTextElId:cfg&&cfg.ratingTextElI d||"rating-text",starOnURL:cfg&&cfg.starOnURL||"http://l.yimg.com/h/28176/images /all/cba-star-on-32.png",starOffURL:cfg&&cfg.starOffURL||"http://l.yimg.com/h/28 176/images/all/cba-star-off-32.png",starHoverURL:cfg&&cfg.starHoverURL||"http:// l.yimg.com/h/28176/images/all/cba-star-hover-32.png",feedbackTxtAreaElId:cfg&&cf g.feedbackTxtAreaElId||"yan-bestanswer-feedback"} var ratingText,reorderedLabelContainers=[];if(!document.getElementById(config.ra tingContainerElId)){return;} var ratingContainerEl=document.getElementById(config.ratingContainerElId);labelC ontainers=ratingContainerEl.getElementsByTagName("div") if(!labelContainers.length){labelContainers=ratingContainerEl.getElementsByTagNa me("li");} labelContainersLength=labelContainers.length;for(var c=0;c<labelContainersLength ;c++){var currentLabel=labelContainers[c].getElementsByTagName("label")[0];ratin gText=currentLabel.firstChild.nodeValue;labels[labelContainersLength-c]=ratingTe xt;reorderedLabelContainers[labelContainersLength-1-c]=labelContainers[c];} for(var x=0;x<labelContainersLength;x++){ratingContainerEl.appendChild(reordered LabelContainers[x]);} for(var i=0;i<labelContainersLength;i++){var label=labelContainers[i].getElement sByTagName("label")[0];if(document.getElementById(label.htmlFor).checked){rated= i+1;} ratingText=label.firstChild.nodeValue;label.innerHTML="";var imgEl=document.crea teElement("img");imgEl.src=config.starOffURL;imgEl.alt=ratingText;label.appendCh ild(imgEl);YAHOO.util.Event.addListener(label,'mouseover',setStarRating);YAHOO.u

til.Event.addListener(label,'mouseout',resetStarRating);YAHOO.util.Event.addList ener(label,'click',setStarRating);YAHOO.util.Event.addListener(label.htmlFor,'fo cus',setStarRating);YAHOO.util.Event.addListener(label.htmlFor,'click',setStarRa ting);} var ratingTextPara=document.createElement("p");var ratingTextSpan=document.creat eElement("span");ratingTextPara.id=config.ratingTextElId;ratingTextPara.appendCh ild(ratingTextSpan);YAHOO.util.Dom.insertAfter(ratingTextPara,ratingContainerEl) ;resetStarRating();};return{init:init};}();YAHOO.namespace('YAHOO.Search.Answers .Profiles');YAHOO.Search.Answers.Profiles.YOSWidgets=function(){var YUD=YAHOO.ut il.Dom;var nicknameConf,photoPickerConf,yosCrumb;var proxyUrl='http://'+document .domain+':'+window.location.port+'/yos_fe_proxy/proxy.html';function callbackSuc cess(o){if(o.responseText){var data=YAHOO.lang.JSON.parse(o.responseText);if(dat a.status&&data.status.user=='updated'){return true;}} return false;} function callbackFail(o){return false;} function updatePhotoType(){var photoType=YUD.get('photo-type');var crumb=YUD.get ('crumb');if(crumb&&photoType&&photoType.value=='update') {var callback={success:callbackSuccess,failure:callbackFail};requestPictureUpdat e=YAHOO.util.Connect.asyncRequest('POST','/my-activity/edit/about/change-picture ',callback,'crumb='+crumb.value);}} function handlePhotoChange(type,args,callbackData){if(type==="PhotoChangeSuccess "){if(document.getElementById("yos-photo").src!==args[0].imgUrl){document.getEle mentById("yos-photo").src=args[0].imgUrl;updatePhotoType();}}else if(type==="Pho toChangeFailure"){return false;}} function handleNameChange(type,args,callbackData){if(type==="NicknameChangeSucce ss"){YUD.get("yos-nickname").innerHTML=args[0];}else if(type==="NicknameChangeFa ilure"){return false;}} function loadIt(){yosCrumb=YAHOO.util.Dom.get("yos-crumb").value;nicknameConf={z Index:"100",namePickerClass:"yos-nickname-picker",proxyUrl:proxyUrl,pickerCrumb: yosCrumb,nicknameChangeSuccess:{fn:handleNameChange,data:{a:"input parameter"}}, nicknameChangeFailure:{fn:handleNameChange,data:{a:"input parameter"}}};photoPic kerConf={tnSize:"tn48",avSize:"medium",changePhotoLink:"yos-photo-picker",proxyU rl:proxyUrl,pickerCrumb:yosCrumb,photoChangeSuccess:{fn:handlePhotoChange,data:{ a:"input parameter"}},photoChangeFailure:{fn:handlePhotoChange,data:{a:"input pa rameter"}}};} return{init:function(){if(YAHOO.util.Dom.get('yos-crumb')){loadIt();var oNickNam ePicker=new YOSWIDGETS.Profiles.WidgetLoader().load("nicknamePicker",nicknameCon f);var oPhotoPicker=new YOSWIDGETS.Profiles.WidgetLoader().load("photoPicker",ph otoPickerConf);}}};}();YAHOO.Search.Answers.Profiles.LegcayNameWidget=function() {var YUD=YAHOO.util.Dom;var YUE=YAHOO.util.Event;var VitalityPanel,toggleElement ,requestForm,legacyPanelForm;var toggledEvent=new YAHOO.util.CustomEvent('toggle Content');function callbackSuccess(o){function submitSuccess(o){var data=YAHOO.l ang.JSON.parse(o.responseText);if(data.success===true){var currentName=YUD.get(' yos-nickname');if(!currentName.firstChild){currentName.appendChild(document.crea teTextNode(''));} currentName.firstChild.nodeValue=YUD.get('yan-answers-profile-name').value;Vital ityPanel.hide();} else if(data.error){var errorItems=YUD.getElementsByClassName('first','li',YUD.g et('yan-confirm-cta-mini'));if(errorItems[0]) {var errorList,errorElementNode,errorTextNode,errorTextHtml;errorList=errorItems [0].parentNode;if(YUD.getChildren(errorList).length>1) {while(YUD.getChildren(errorList).length!==1){errorList.removeChild(YUD.getLastC hild(errorList));}} if(data.error.nickname==='too_long'){errorTextHtml=YAHOO.Search.Answers.labels.l egacyWidget.too_long.replace(/%OPEN_BOLD%/g,'<strong>');errorTextHtml=errorTextH tml.replace(/%CLOSE_BOLD%/g,'</strong>');errorTextHtml=errorTextHtml.replace(/%C HARACTER_LIMIT%/,data.error.limit);errorNode=document.createElement('li');errorN ode.innerHTML=errorTextHtml;} if(data.error.nickname==='not_provided'){errorTextHtml=YAHOO.Search.Answers.labe ls.legacyWidget.not_provided.replace(/%OPEN_BOLD%/g,'<strong>');errorTextHtml=er

rorTextHtml.replace(/%CLOSE_BOLD%/g,'</strong>');errorNode=document.createElemen t('li');errorNode.innerHTML=errorTextHtml;} if(data.error.nickname==='invalid'||data.error.crumb==='invalid'){errorTextHtml= YAHOO.Search.Answers.labels.legacyWidget.invalid;errorTextHtml=errorTextHtml.rep lace(/%OPEN_LINK_FORUM%/g,'<a href="'+YAHOO.Search.Answers.labels.legacyWidget.f orum_link+'">');errorTextHtml=errorTextHtml.replace(/%CLOSE_LINK%/g,'</a>');erro rNode=document.createElement('li');errorNode.innerHTML=errorTextHtml;} errorList.appendChild(errorNode);}} else{errorTextHtml='<div id="yan-confirm-cta-mini">'+' <div class="warning">'+' <ul>'+' <li class="first">'+' <p>'+YAHOO.Search.Answers.labels.l egacyWidget.invalid+'</p>'+' </li>'+' </ul>'+' </div>'+'</div>';errorTe xtHtml=errorTextHtml.replace(/%OPEN_LINK_FORUM%/g,'<a href="'+YAHOO.Search.Answe rs.labels.legacyWidget.forum_link+'">');errorTextHtml=errorTextHtml.replace(/%CL OSE_LINK%/g,'</a>');VitalityPanel.setBody(errorTextHtml);}} if(o.responseText!==undefined){var data=YAHOO.lang.JSON.parse(o.responseText);if (data.widget){var tempDiv=document.createElement('div');tempDiv.innerHTML=data.w idget;var cta=YUD.getElementsByClassName('cta-button','input',tempDiv);if(cta.le ngth){YAHOO.Search.Answers.cta.convert(cta[0]);} var panelHeader=tempDiv.getElementsByTagName('h3')[0];if(panelHeader){panelHeade r.parentNode.removeChild(panelHeader);VitalityPanel.setHeader(panelHeader.innerH TML);} VitalityPanel.setBody(tempDiv.innerHTML);VitalityPanel.render(document.body);Vit alityPanel.show();VitalityPanel.cfg.resetProperty('zindex');YUD.removeClass(togg leElement,'loading');legacyPanelForm=new YAHOO.util.Element('legacy-widget');YUE .removeListener(legacyPanelForm.getElementsByTagName('button'),'click');YUE.addL istener(legacyPanelForm.getElementsByTagName('button'),'click',function(e){YUE.p reventDefault(e);YAHOO.Search.Answers.formSubmit(legacyPanelForm,{success:submit Success});});legacyPanelForm.on('submit',function(e){YAHOO.util.Event.preventDef ault(e);YAHOO.Search.Answers.formSubmit(legacyPanelForm,{success:submitSuccess}) ;});YUE.on(YUD.get('cancel-button'),'click',function(e){YAHOO.util.Event.prevent Default(e);VitalityPanel.hide();});YAHOO.Search.Answers.Profiles.LegcayNameOptio n.init();} else{YUD.removeClass(toggleElement,'loading');}}} function callbackFail(o){return;} function togglePanel(){if(!YAHOO.util.Connect.isCallInProgress(requestForm)){YUD .addClass(toggleElement,'loading');var sUrl=toggleElement.href;var callback={suc cess:callbackSuccess,failure:callbackFail};requestForm=YAHOO.util.Connect.asyncR equest('GET',sUrl,callback);}} function toggleClick(e){YUE.preventDefault(e);toggledEvent.fire();} function loadWidget() {var configPanel={visible:false,constraintoviewport:true,modal:true,draggable:fa lse,close:true,fixedcenter:true,width:'400px',zIndex:100};VitalityPanel=new YAHO O.widget.Panel('legacy-widget-panel',configPanel);VitalityPanel.setHeader('Panel Header');VitalityPanel.render(document.body);} toggledEvent.subscribe(togglePanel);return{init:function(){var toggleElements=YU D.getElementsByClassName('yan-nickname-picker','a');if(toggleElements.length>0){ toggleElement=toggleElements[0];YUE.addListener(toggleElement,'click',toggleClic k);loadWidget();}}};}();YAHOO.Search.Answers.Profiles.LegcayNameOption=function( ){var YUD=YAHOO.util.Dom;var YUE=YAHOO.util.Event;var enableSD,enableLegacy,show LegacyNickname;function handleRadioChange(e){if(enableLegacy.checked){showLegacy Nickname.disabled=false;YAHOO.util.Dom.setStyle(YUD.getLastChild(showLegacyNickn ame.parentNode),'color','#333');} else{showLegacyNickname.disabled=true;YAHOO.util.Dom.setStyle(YUD.getLastChild(s howLegacyNickname.parentNode),'color','#999');}} return{init:function(){enableLegacy=YUD.get('yan-use-answer-profile');enableSD=Y UD.get('yan-use-sd-profile');showLegacyNickname=YUD.get('yan-answers-profile-nam e');if(enableLegacy&&showLegacyNickname&&enableSD){YUE.on(enableLegacy,'click',h andleRadioChange);YUE.on(enableSD,'click',handleRadioChange);}}};}();YAHOO.Searc h.Answers.Profiles.NotifyMe=function(){var YUD=YAHOO.util.Dom;var YUE=YAHOO.util .Event;var notifyMe;var doneURL;var memberCenterUrl="https://edit.yahoo.com/comm

channel/manage?src=ans";var yosEmail;function handelSelection(e){aURLParams=getU rlParams(doneURL);if(notifyMe.checked){if(checkUrlParam(aURLParams,"yan-ask-noti fy")){aURLParams=removeUrlParam(aURLParams,"yan-ask-notify");} aURLParams=removeUrlParam(aURLParams,".intl");aURLParams.push("yan-ask-notify=y" );}else{aURLParams=removeUrlParam(aURLParams,".intl");if(checkUrlParam(aURLParam s,"yan-ask-notify")){aURLParams=removeUrlParam(aURLParams,"yan-ask-notify");} aURLParams.push("yan-ask-notify=n");} doneURL=aURLParams.length>0?'?'+aURLParams.join("&"):'';port=window.location.por t!==80?':'+window.location.port:'';yosEmail.getElementsByTagName("a")[0].href=me mberCenterUrl+"&.done="+encodeURIComponent('http://'+window.location.hostname+po rt+window.location.pathname+doneURL);} function getUrlParams(url){var newQueryParams=[];if(url.length>0){var queryParam s=url.charAt(0)==='?'?url.substring(1).split("&"):url.split("&");for(var i=0,j=q ueryParams.length;i<j;i++){var nameValuePair=queryParams[i].split("=");newQueryP arams.push(nameValuePair[0]+'='+nameValuePair[1]);}} return newQueryParams;} function checkUrlParam(aUrlParams,param){if(aUrlParams.length>0){for(var i=0,j=a UrlParams.length;i<j;i++){var nameValuePair=aUrlParams[i].split("=");if(nameValu ePair[0]===param){return true;}}} return false;} function removeUrlParam(aUrlParams,param){var newQueryParams=[];for(var i=0,j=aU rlParams.length;i<j;i++){var nameValuePair=aUrlParams[i].split("=");if(nameValue Pair[0]!==param){newQueryParams.push(nameValuePair[0]+'='+nameValuePair[1]);}} return newQueryParams;} return{init:function(){if(YUD.get("yan-user-registration")){notifyMe=YUD.get("ya n-ask-notify");yosEmail=YUD.get("yos-email");doneURL=window.location.search;YUE. on(notifyMe,'click',handelSelection);}}};}();YAHOO.Search.Answers.compareFormCon tent=function(){var YUD=YAHOO.util.Dom;var YUE=YAHOO.util.Event;function formVal ues(form) {var params=[];var tags=['input','textarea','select'];for(var i in tags){YAHOO.u til.Dom.batch(form.getElementsByTagName(tags[i]),function(el){var formContent=[] ;if(el.type.toLowerCase()==='radio'||el.type.toLowerCase()==='checkbox'){formCon tent.push(el.name);formContent.push(el.checked);} else{formContent.push(el.name);formContent.push(el.value);} params.push(formContent);});} return YAHOO.lang.JSON.stringify(params);} return{getFormValues:function(oForm){return formValues(oForm);},hasFormChanged:f unction(formString1,formString2){if(formString1!==formString2){return true;} else{return false;}}};}();YAHOO.Search.Answers.Profiles.EditPreferencesLeaveWith outSaving=function(){var YUD=YAHOO.util.Dom;var YUE=YAHOO.util.Event;var editFro m,formStrings1;function confirmClose(e){YUE.removeListener(window,'beforeunload' ,confirmClose);if(e){e.returnValue=YAHOO.Search.Answers.labels.editSettings.edit NotSaved;return YAHOO.Search.Answers.labels.editSettings.editNotSaved;} return YAHOO.Search.Answers.labels.editSettings.continueSave;} function checkFormValues(e){var formStrings2=YAHOO.Search.Answers.compareFormCon tent.getFormValues(editFrom);var target=YUE.getTarget(e);if(target.tagName.toLow erCase()==='a'&&YAHOO.Search.Answers.compareFormContent.hasFormChanged(formStrin gs1,formStrings2)){YUE.on(window,'beforeunload',confirmClose);}} return{init:function(){if(YUD.get('yan-user-edit-about')){editFrom=YUD.get('yanuser-edit-about');formStrings1=YAHOO.Search.Answers.compareFormContent.getFormVa lues(editFrom);YUE.on(YUD.get('tab-settings'),'click',checkFormValues);YUE.on(YU D.get('email-settings').getElementsByTagName('a'),'click',checkFormValues);} if(YUD.get('yan-user-edit-settings')){editFrom=YUD.get('yan-user-edit-settings') ;formStrings1=YAHOO.Search.Answers.compareFormContent.getFormValues(editFrom);YU E.on(YUD.get('tab-about'),'click',checkFormValues);}}};}();YAHOO.Search.Answers. Profiles.ContentRoutingOption=function(){var YUD=YAHOO.util.Dom;var YUE=YAHOO.ut il.Event;var enableContentRouting,showContentRouting;function handleChange(e){if (enableContentRouting.checked){showContentRouting.disabled=false;YAHOO.util.Dom. setStyle(showContentRouting.parentNode,'color','#333');} else{showContentRouting.disabled=true;YAHOO.util.Dom.setStyle(showContentRouting

.parentNode,'color','#999');}} return{init:function(){enableContentRouting=YUD.get('yan-enable-suggested-questi on');showContentRouting=YUD.get('yan-show-suggested-question');if(enableContentR outing&&showContentRouting){YUE.on(enableContentRouting,'change',handleChange);Y UE.on(enableContentRouting,'click',handleChange);handleChange();if(YUD.getElemen tsByClassName('qt-focus-yan-enable-suggested-question','p').length>0){YAHOO.Sear ch.Answers.staticQualityTips.changeQTPosition('qt-focus-yan-enable-suggested-que stion',{offsetY:45});}}}};}();YAHOO.Search.Answers.staticQualityTips=function(){ var YUD=YAHOO.util.Dom;var YUE=YAHOO.util.Event;var config;return{changeQTPositi on:function(focusClass,config){var qualityTip=YUD.get('yan-qt');if(typeof config =='undefined'){config={};} else{config=config;} config.offsetY=config.offsetY||20;var targetElement=YUD.getElementsByClassName(f ocusClass,'p',qualityTip);if(qualityTip&&targetElement.length){var el=YUD.get(fo cusClass.replace(/qt-focus-/,''));YUD.setY(qualityTip,YUD.getY(el)-config.offset Y);YUD.setStyle(qualityTip,'display','block');}}};}();YAHOO.Search.Answers.regis trationAboutYou=function(){var YUE=YAHOO.util.Event;var YUD=YAHOO.util.Dom;var e ditAboutForm,aboutYouText;function fixCTASubmitsAgain(){editAboutForm=YUD.get('y an-user-edit-about');YUE.removeListener(editAboutForm.getElementsByTagName('butt on'),'click');YUE.addListener(editAboutForm.getElementsByTagName('button'),'clic k',function(e){YUE.preventDefault(e);if(aboutYouText.value===YAHOO.Search.Answer s.labels.editAboutYou.defaultText){aboutYouText.value='';} this.form.submit();});YUE.on(editAboutForm,'submit',function(e){YUE.preventDefau lt(e);if(aboutYouText.value===YAHOO.Search.Answers.labels.editAboutYou.defaultTe xt){aboutYouText.value='';} this.submit();});} return{init:function(){if(YUD.getElementsByClassName('qt-focus-email-settings',' p').length>0){YAHOO.Search.Answers.staticQualityTips.changeQTPosition('qt-focusemail-settings');} if(YUD.getElementsByClassName('qt-focus-yan-about-you','p').length>0){YAHOO.Sear ch.Answers.staticQualityTips.changeQTPosition('qt-focus-yan-about-you');} aboutYouText=document.getElementById('yan-about-you');if(aboutYouText){if(aboutY ouText.value===YAHOO.Search.Answers.labels.editAboutYou.defaultText||aboutYouTex t.value===''){YUD.addClass(aboutYouText,'default');aboutYouText.defaultValue=YAH OO.Search.Answers.labels.editAboutYou.defaultText;aboutYouText.value=YAHOO.Searc h.Answers.labels.editAboutYou.defaultText;} YUE.on(aboutYouText,'focus',function(e){if(this.value===YAHOO.Search.Answers.lab els.editAboutYou.defaultText||this.value===''){YUD.removeClass(this,'default');t his.value='';}});YUE.on(aboutYouText,'blur',function(e){if(this.value===''){YUD. addClass(this,'default');this.value=YAHOO.Search.Answers.labels.editAboutYou.def aultText;}});YAHOO.Search.Answers.limitCharacters(aboutYouText,1000,false,YAHOO. Search.Answers.labels.limitCharacters.statusCount,"block",YAHOO.Search.Answers.c ss.askFlow.countClass);fixCTASubmitsAgain();}}};}();YAHOO.Search.Answers.editLeg acyNameError=function(){var YUE=YAHOO.util.Event;var YUD=YAHOO.util.Dom;return{i nit:function(){if(document.getElementById('legacy-widget')&&YUD.getElementsByCla ssName('user-editlegacyname','body').length>0){var QtEl=document.getElementById( 'yan-qt');if(YUD.hasClass(QtEl,'qt-error')) {YUD.setY(QtEl,YUD.getY(YUD.get('yan-answers-profile-name'))-25);}}}};}();YAHOO. Search.Answers.Profiles.StatisticsChart=function(){var YUD=YAHOO.util.Dom;functi on initChart(tableEl){var profileCharts=YUD.getAncestorByClassName(tableEl,'yanprofile-data');var borderColor=0xCCCCCC;var profileColor=0x98CC61;var deepBorder Color=0x69A531;if(YUD.getElementsByClassName('branded-member').length>0){borderC olor=YUD.Color.toHex(YUD.getStyle(YUD.getPreviousSibling(tableEl),'border-top-co lor')).substr(1,6);profileColor=YUD.Color.toHex(YUD.getStyle(YUD.getPreviousSibl ing(tableEl),'background-color')).substr(1,6);profileColor=parseInt(profileColor ,16);borderColor=parseInt(borderColor,16);deepBorderColor=profileColor;} if(profileCharts){YUD.addClass(profileCharts,'yan-profile-chart');} if(tableEl.id=='member-answers-data'){YUD.addClass(profileCharts,'member-answers -chart');} else if(tableEl.id=='member-questions-data'){YUD.addClass(profileCharts,'member-

questions-chart');} var statisticsData=new YAHOO.util.DataSource(tableEl,{responseType:YAHOO.util.Da taSource.TYPE_HTMLTABLE,responseSchema:{fields:[{key:'State'},{key:'NumInState', parser:'number'}]}});var scaledFontSize=12;var maxCharsAtDefault=7 if(tableEl.getElementsByTagName('tbody')[0]){var tableBody=tableEl.getElementsBy TagName('tbody')[0];var tableData=tableBody.getElementsByTagName('td');if(tableD ata.length){var dataEntryMaxLength=0;for(var i=0,j=tableData.length;i<j;i++){var dataLength=tableData[i].innerHTML.length;if(dataLength>dataEntryMaxLength){data EntryMaxLength=dataLength;}} var ratio=Math.floor((maxCharsAtDefault/dataEntryMaxLength)*scaledFontSize);scal edFontSize=(scaledFontSize<=ratio)?scaledFontSize:ratio;}} tableEl.className='hidden';var chartEl=document.createElement('div');chartEl.cla ssName='chart-flash';YUD.insertBefore(chartEl,tableEl);YUD.setStyle(chartEl,'hei ght','150px');function dataTipFunction(item,index,series){return item.NumInState +' '+item[series.xField];} var seriesDef=[{xField:"State",style:{color:profileColor,size:40,borderColor:dee pBorderColor}}];var myChart=new YAHOO.widget.ColumnChart(chartEl,statisticsData, {wmode:"opaque",xField:'State',yField:'NumInState',series:seriesDef,dataTipFunct ion:dataTipFunction,style:{yAxis:{majorGridLines:{size:0},size:1,hideOverlapping Labels:true,labelSpacing:0,display:'none',showLabels:true,majorTicks:{color:0xF0 F8E6,display:'none'},minorTicks:{color:0xF0F8E6,display:'none'}},dataTip:{border :{color:0xCCCCCC}},background:{color:0xFFFFFF},border:{size:1,color:borderColor} ,padding:5,font:{name:"Arial",color:0x333333,size:scaledFontSize}}});var chartMa jorUnit=0;statisticsData.sendRequest(null,{success:function(req,res){for(var i=0 ,len=res.results.length;i<len;i++){if(chartMajorUnit<res.results[i].NumInState) {chartMajorUnit=res.results[i].NumInState;}}}});var axisMajorUnit=new YAHOO.widg et.NumericAxis();axisMajorUnit.scale='linear';axisMajorUnit.majorUnit=chartMajor Unit;axisMajorUnit.maximum=chartMajorUnit;myChart.set('yAxis',axisMajorUnit);} return{init:function(){var playerVersion=YAHOO.deconcept.SWFObjectUtil.getPlayer Version();if((playerVersion.major==9&&playerVersion.minor>=1)||playerVersion.maj or>9){if(YUD.get('member-answers-data')&&YUD.get('member-questions-data')){initC hart(YUD.get('member-answers-data'));initChart(YUD.get('member-questions-data')) ;}} else {var aData=YUD.get('member-answers-data');YAHOO.util.Dom.setStyle(aData,'text-in dent',0);YAHOO.util.Dom.setStyle(aData,'position','relative');var qData=YUD.get( 'member-questions-data');YAHOO.util.Dom.setStyle(qData,'text-indent',0);YAHOO.ut il.Dom.setStyle(qData,'position','relative');var profileData=YUD.getElementsByCl assName('yan-profile-data','div');for(var i=0,len=profileData.length;i<len;i++){ var dataHeaders=YUD.getFirstChild(profileData[i]);YAHOO.util.Dom.setStyle(dataHe aders,'text-indent',0);YAHOO.util.Dom.setStyle(dataHeaders,'position','relative' );}}}};}();YAHOO.Search.Answers.Profiles.contactsListFocus=function() {var YUD=YAHOO.util.Dom;function autoFocusScroll(el){var activeItems=YUD.getElem entsByClassName('active','li',el);if(activeItems[0]){var scrollTo=activeItems[0] .offsetTop;var attributes={scroll:{to:[0,scrollTo]}};var anim=new YAHOO.util.Scr oll(el,attributes);anim.animate();}} return{init:function(){var contactListWrapper=YUD.get('my-contacts-list');if(con tactListWrapper){var contactLists=YUD.getElementsByClassName('bd','ol',contactLi stWrapper);if(contactLists[0]){autoFocusScroll(contactLists[0]);}}}};}();YAHOO.S earch.Answers.Profiles.aboutMeToggler=function() {var YUD=YAHOO.util.Dom;var YUE=YAHOO.util.Event;function attachToggleEvent(e){Y UE.preventDefault(e);YAHOO.Search.Answers.toggledEvent.fire();} function setUpToggles(el){var oConfig={containerNode:el,createToggle:{toggleID:' about-me-toggle'},autoHide:true,showText:YAHOO.Search.Answers.labels.answersComp act.show,hideText:YAHOO.Search.Answers.labels.answersCompact.hide,contentNode:YA HOO.util.Dom.getElementsByClassName('bd','div',document.getElementById('member-a bout-text'))[0]};var oToggle=new YAHOO.Search.Answers.toggle(oConfig);oToggle.in it();} return{init:function(){var aboutme=document.getElementById('member-about-text'); if(YUD.hasClass(aboutme,'toggle'))

{YUE.on(YUD.getFirstChild(aboutme),'click',attachToggleEvent) setUpToggles(aboutme);}}};}();YAHOO.namespace('YAHOO.Search.Answers.Search');YAH OO.Search.Answers.Search.defaultInputText=function(){var YUD=YAHOO.util.Dom,YUE= YAHOO.util.Event;var inp;function fixCTASubmitsAgain(){YUE.removeListener(inp.fo rm.getElementsByTagName('button'),'click');YUE.removeListener(document.getElemen tById('reset-button'),'click');function handleCtaClicks(e){YUE.preventDefault(e) ;ctaButton=YUE.getTarget(e);var hidden=document.createElement('input');hidden.na me=ctaButton.name;hidden.type='hidden';hidden.value=ctaButton.value;this.form.ap pendChild(hidden);if(YAHOO.lang.trim(inp.value).length>0&&inp.value!==YAHOO.Sear ch.Answers.labels.searchForm.defaultText&&inp.value!==''&&inp.value!==YAHOO.Sear ch.Answers.labels.searchForm.enterSearchTerms){var searchFilter=document.getElem entById('yan-search-filter');if(searchFilter) {var searchFilterForm=searchFilter.getElementsByTagName('form')[0];if(searchFilt erForm){var filter_inp=document.createElement('input');filter_inp.type='hidden'; filter_inp.name='filter_search';filter_inp.value='true';searchFilterForm.appendC hild(filter_inp);searchFilterForm.submit();}}else{this.form.submit();}} else {YUD.addClass(inp,'error');inp.value=YAHOO.Search.Answers.labels.searchForm.ente rSearchTerms;}} YUE.addListener(inp.form.getElementsByTagName('button'),'click',handleCtaClicks) ;YUE.addListener(document.getElementById('reset-button'),'click',handleCtaClicks );YUE.on(inp.form,'submit',function(e){YUE.preventDefault(e);if(YAHOO.lang.trim( inp.value).length>0&&inp.value!==YAHOO.Search.Answers.labels.searchForm.defaultT ext&&inp.value!==''&&inp.value!==YAHOO.Search.Answers.labels.searchForm.enterSea rchTerms){var searchFilter=document.getElementById('yan-search-filter');if(searc hFilter) {var forms=searchFilter.getElementsByTagName('form')[0];if(searchFilterForm){var filter_inp=document.createElement('input');filter_inp.type='hidden';filter_inp. name='filter_search';filter_inp.value='true';searchFilterForm.appendChild(filter _inp);searchFilterForm.submit();}}else{inp.form.submit();}} else {YUD.addClass(inp,'error');inp.value=YAHOO.Search.Answers.labels.searchForm.ente rSearchTerms;}});} return{init:function(){inp=document.getElementById('yan-p');var advanceForm=YUD. getElementsByClassName('advanced-search-flow','form');if(inp&&advanceForm.length ==0){if(inp.value===''||inp.value===YAHOO.Search.Answers.labels.searchForm.defau ltText||YAHOO.lang.trim(inp.value).length==0){YUD.removeClass(inp,'error');YUD.a ddClass(inp,'default');inp.defaultValue=YAHOO.Search.Answers.labels.searchForm.d efaultText;inp.value=YAHOO.Search.Answers.labels.searchForm.defaultText;} YUE.on(inp,'focus',function(e){YUD.removeClass(this,'error');YUD.removeClass(thi s,'default');if(this.value===''||this.value===YAHOO.Search.Answers.labels.search Form.defaultText||this.value===YAHOO.Search.Answers.labels.searchForm.enterSearc hTerms){this.value='';}});YUE.on(inp,'keyup',function(e){var searchFilter=docume nt.getElementById('yan-search-filter');if(searchFilter) {var searchFilterForm=searchFilter.getElementsByTagName('form')[0];var hiddenKey word=searchFilterForm.elements['p'];if(hiddenKeyword){hiddenKeyword.value=inp.va lue;}}});YUE.on(inp,'blur',function(e){if(this.value===''){YUD.addClass(inp,'def ault');this.value=YAHOO.Search.Answers.labels.searchForm.defaultText;}});fixCTAS ubmitsAgain();} var saveCheckbox=document.getElementById('add-save');var saveInput=document.getE lementById('add-save-name');var saveLabel;if(saveInput){saveLabel=saveInput.pare ntNode.getElementsByTagName('label');saveLabel=saveLabel[0];YAHOO.util.Dom.addCl ass(saveLabel,'offscreen');if(saveInput.value===''||saveInput.value===saveLabel. firstChild.nodeValue||YAHOO.lang.trim(saveInput.value).length==0){YUD.removeClas s(saveInput,'error');YUD.addClass(saveInput,'default');saveInput.defaultValue=sa veLabel.firstChild.nodeValue;saveInput.value=saveLabel.firstChild.nodeValue;} YUE.on(saveInput,'focus',function(e){YUD.removeClass(this,'error');YUD.removeCla ss(this,'default');if(this.value===''||this.value===saveLabel.firstChild.nodeVal ue){this.value='';}});YUE.on(saveInput,'blur',function(e){if(this.value===''){YU D.addClass(this,'default');this.value=saveLabel.firstChild.nodeValue;}});}

if(saveInput&&saveCheckbox){saveInput.disabled=!saveCheckbox.checked;YUE.on(save Checkbox,'click',function(e){saveInput.disabled=!this.checked;});} if(saveLabel&&document.getElementById('yan-qt')){YAHOO.Search.Answers.qualityTip s.addCheck(saveLabel,false,true,false);}}};}();YAHOO.Search.Answers.Search.Categ oryTool=function(){var YUD=YAHOO.util.Dom,YUE=YAHOO.util.Event,YUC=YAHOO.util.Co nnect;var categoryToolWrapper,headingLoader,ajaxHandle,timeout,focusedEl,cache=[ ],selectButtons;function updateSelect(nextId,value){resetSelects(nextId);if((cac he[value]&&cache[value].length!==0)||(cache[value]===false)){nextId='category-le vel-'+nextId;var nextEl=document.getElementById(nextId);if(!nextEl){var nextEl=d ocument.createElement('select');nextEl.id=nextId;nextEl.name='category';nextEl.s ize=categoryToolWrapper.getElementsByTagName('select')[0].size;categoryToolWrapp er.appendChild(nextEl);YUE.on(nextEl,'change',handleChange);YAHOO.Search.Answers .Search.selectFix.addSelect(nextEl);} nextEl.innerHTML='';var option=document.createElement('option');option.disabled= true;option.className='disabled';option.value=value;if(cache[value]&&cache[value ].length!==0){nextEl.innerHTML='';option.appendChild(document.createTextNode(YAH OO.Search.Answers.labels.categoryWidget.pleaseSelect));YUD.addClass(option,'plea se-select');nextEl.appendChild(option);var allOption=document.createElement('opt ion');allOption.appendChild(document.createTextNode(YAHOO.Search.Answers.labels. categoryWidget.allSubCategories));allOption.value=value;nextEl.appendChild(allOp tion);YUD.addClass(allOption,'all');for(category in cache[value].child){option=d ocument.createElement('option');option.value=cache[value].child[category]['id']; option.appendChild(document.createTextNode(cache[value].child[category]['name']) );nextEl.appendChild(option);}} else{option.appendChild(document.createTextNode(YAHOO.Search.Answers.labels.cate goryWidget.loadingCategories));nextEl.appendChild(option);nextEl.selectedIndex=0 ;} nextEl.selectedIndex=1;if(nextEl==focusedEl){nextEl.focus();} YUD.removeClass(headingLoader,'loading');}} function resetSelects(id){for(var i=id;el=document.getElementById('category-leve l-'+i);i++){if(i>1){el.parentNode.removeChild(el);} else{el.innerHTML='';var option=document.createElement('option');option.disabled =true;option.className='disabled';option.value=-1;option.appendChild(document.cr eateTextNode(YAHOO.Search.Answers.labels.categoryWidget.noSubCategories));el.app endChild(option);}}} function handleFocus(e){focusedEl=YUE.getTarget(e);} function handleBlur(e){focusedEl=false;} function handleChange(e){YUD.addClass(headingLoader,'loading');var currentEl=YUE .getTarget(e);var currentId=currentEl.id;var nextId=currentId.match(/category-le vel-(\d+)/);if(nextId){nextId=(parseInt(nextId[1],10)+1);} else{nextId=0;} if(currentEl.getElementsByTagName('option')[this.selectedIndex]){var selectedOpt ion=currentEl.getElementsByTagName('option')[this.selectedIndex];if(YUD.hasClass (selectedOption,'all')||YUD.hasClass(selectedOption,'please-select')){YUD.remove Class(headingLoader,'loading');resetSelects(nextId);return false;}} if(currentEl.value>0){clearTimeout(timeout);if(YUC.isCallInProgress(ajaxHandle)) {YUC.abort(ajaxHandle);} resetSelects(nextId);var el=document.getElementById('category-level-'+nextId);if (el){el.innerHTML='';var option=document.createElement('option');option.disabled =true;option.className='disabled';option.value=-1;option.appendChild(document.cr eateTextNode(YAHOO.Search.Answers.labels.categoryWidget.loadingCategories));el.a ppendChild(option);} if(cache[currentEl.value]){updateSelect(nextId,currentEl.value);YUD.removeClass( headingLoader,'loading');} else{timeout=setTimeout(function(){var selects=categoryToolWrapper.getElementsBy TagName('select');ajaxHandle=YUC.asyncRequest('GET','/dir/xhr_list?category='+cu rrentEl.value,{success:handleSuccess,failure:handleFailure,scope:currentEl});},5 00);}}} function handleFailure(o){var currentId=this.id;var nextId=currentId.match(/cate gory-level-(\d+)/);if(nextId){nextId=(parseInt(nextId[1],10)+1);}

else{nextId=0;} YUD.removeClass(headingLoader,'loading');cache[this.value]=false;updateSelect(ne xtId,this.value);} function handleSuccess(o){var currentId=this.id;var nextId=currentId.match(/cate gory-level-(\d+)/);if(nextId){nextId=(parseInt(nextId[1],10)+1);} else{nextId=0;} if(o.responseText){var data=YAHOO.lang.JSON.parse(o.responseText);if(data.succes s===true){if(data.meta['category-count']>0){cache[this.value]=data;this.removeAt tribute('name');updateSelect(nextId,this.value);} else{cache[this.value]=[];}} else{cache[this.value]=false;}} else{cache[this.value]=false;} YUD.removeClass(headingLoader,'loading');} function loader(){selectButtons=YUD.getElementsByClassName('category-buttons','d iv','yan-category-tool')[0];if(YUD.getElementsByClassName('category-selection',' fieldset')[0].getElementsByTagName('h3')[0]){headingLoader=YUD.getElementsByClas sName('category-selection','fieldset')[0].getElementsByTagName('h3')[0];} YUE.on(categoryToolWrapper.getElementsByTagName('select'),'change',handleChange) ;YUE.on(categoryToolWrapper.getElementsByTagName('select'),'focus',handleFocus); YUE.on(categoryToolWrapper.getElementsByTagName('select'),'blur',handleBlur);} return{init:function(){if(YUD.get('yan-category-tool')){categoryToolWrapper=YUD. get('yan-category-tool');loader();}}};}();YAHOO.Search.Answers.Search.selectFix= function(){var YUD=YAHOO.util.Dom,YUE=YAHOO.util.Event;var selectClicked=[];var selectWidth=200;var effectedSelects;var selectRedrawWidth=new YAHOO.util.CustomE vent('redrawAutoWidth');var selectRedraw=new YAHOO.util.CustomEvent('selectWidth Content');function addEventHandlers(el){YUE.on(el,'mouseover',function(e){select RedrawWidth.fire(this);});YUE.on(el,'change',function(e){selectRedraw.fire(this) ;});YUE.on(el,'mouseleave',function(e){var selectedOptionItem=YUE.getTarget(e);i f(!selectClicked[selectedOptionItem.name]) {YUD.removeClass(effectedSelects,'switch-it');YUD.setStyle(effectedSelects,'widt h',selectWidth+'px');selectClicked=[];}});YUE.on(el,'focusout',function(e){selec tRedraw.fire(this);});YUE.on(el,'click',function(e){var selectedOptionItem=YUE.g etTarget(e);selectClicked[selectedOptionItem.name]=true;});} function redrawAutoWidth(type,args){YUD.addClass(args[0],'switch-it');YUD.setSty le(args[0],'position','relative');YUD.setStyle(args[0],'width','auto');YUD.setSt yle(args[0],'z-index','2');} function redrawWidth(type,args){if(args[0].nodeName.toLowerCase()=='select'){YUD .removeClass(args[0],'switch-it');YUD.setStyle(args[0],'width',selectWidth+'px') ;} selectClicked=[];} selectRedrawWidth.subscribe(redrawAutoWidth);selectRedraw.subscribe(redrawWidth) ;return{init:function(){var searchFormFilter=document.getElementById('yan-search -filter');if(searchFormFilter){var selects=searchFormFilter.getElementsByTagName ('select');if(selects&&YAHOO.env.ua.ie>=6){var selectsTotal=selects.length;effec tedSelects=[];for(var i=0;i<selectsTotal;i++){if(selects[i].offsetWidth>selectWi dth){YUD.setStyle(selects[i],'width',selectWidth+'px');effectedSelects.push(sele cts[i]);}} if(effectedSelects.length){addEventHandlers(effectedSelects);}}}},addSelect:func tion(el){if(el.offsetWidth>selectWidth){YUD.setStyle(el,'width',selectWidth+'px' );effectedSelects.push(el);addEventHandlers(el);}}};}();YAHOO.Search.Answers.Sea rch.savedSearch=function(){var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event,DDM=YAH OO.util.DragDropMgr,Connect=YAHOO.util.Connect;function DD(id,sGroup,config){thi s.cont=config.cont;DD.superclass.constructor.apply(this,arguments);var dragEl=th is.getDragEl();var clickEl=this.getEl();Dom.setStyle(dragEl,'opacity',0.6);} YAHOO.extend(DD,YAHOO.util.DDProxy,{cont:null,init:function(){DD.superclass.init .apply(this,arguments);this.initConstraints();Event.on(window,'resize',function( ){this.initConstraints();},this,true);},initConstraints:function(){var region=Do m.getRegion(this.cont);var el=this.getEl();var xy=Dom.getXY(el);var width=el.off setWidth;var height=el.offsetHeight;var left=xy[0]-region.left;var right=region. right-xy[0]-width;var top=xy[1]-region.top;var bottom=region.bottom-xy[1]-height

;this.setXConstraint(left,right);this.setYConstraint(top,bottom);},startDrag:fun ction(x,y){var dragEl=this.getDragEl();var clickEl=this.getEl();Dom.setStyle(cli ckEl,"visibility","hidden");dragEl.innerHTML='<div>'+clickEl.innerHTML+'</div>'; Dom.addClass(dragEl,'saved-search-proxy');},endDrag:function(e){var dragEl=this. getDragEl();var clickEl=this.getEl();var order;var els=YAHOO.util.Dom.getElement sBy(function(el){return el.parentNode.id=='saved-searches';},'li','saved-searche s');for(var i=0,len=els.length;i<len;i++){if(els[i]===clickEl){order=i+1;break;} } var form=clickEl.getElementsByTagName('form')[0];var ssid=form.elements['ssid']. value;Connect.asyncRequest('GET','/search/search_saved_order?ssid='+ssid+'&order ='+order,null,null);Dom.setStyle(dragEl,"visibility","");var a=new YAHOO.util.Mo tion(dragEl,{points:{to:Dom.getXY(clickEl)}},0.2,YAHOO.util.Easing.easeOut);a.on Complete.subscribe(function(){dragEl.innerHTML='';Dom.setStyle(dragEl.id,"visibi lity","hidden");Dom.setStyle(clickEl.id,"visibility","");});a.animate();},onDrag :function(e){var y=Event.getPageY(e);if(y<this.lastY){this.goingUp=true;} else if(y>this.lastY){this.goingUp=false;} this.lastY=y;},onDragOver:function(e,el){var srcEl=this.getEl();var destEl=Dom.g et(el);if(destEl.nodeName.toLowerCase()=="li"){var orig_p=srcEl.parentNode;var p =destEl.parentNode;if(this.goingUp){p.insertBefore(srcEl,destEl);} else{p.insertBefore(srcEl,destEl.nextSibling);} DDM.refreshCache();}}});return{init:function(){var savedSearch=document.getEleme ntById('saved-searches');if(savedSearch){var els=YAHOO.util.Dom.getElementsBy(fu nction(el){return el.parentNode.id=='saved-searches';},'li',savedSearch);if(els. length>1){for(var i=0,len=els.length;i<len;i++) {new DD(els[i],'',{cont:'saved-searches'});} new YAHOO.util.DDTarget('saved-searches');} Event.removeListener(savedSearch.getElementsByTagName('button'),'click');Event.a ddListener(savedSearch.getElementsByTagName('button'),'click',function(e){Event. preventDefault(e);ctaButton=Event.getTarget(e);while(!Dom.hasClass(ctaButton,'ct a-button')){ctaButton=ctaButton.parentNode;} if(ctaButton.name=='delete-go'){var container=ctaButton.parentNode.parentNode;wh ile(container.nodeName.toLowerCase()!='li'){container=container.parentNode;} var searchName=container.getElementsByTagName('h2')[0].getElementsByTagName('a') [0].firstChild.nodeValue;var msg;if(YAHOO.util.Dom.hasClass(container,'trending' )) {msg=YAHOO.Search.Answers.labels.searchForm.trendingConfirmation.replace(/%NAME% /,searchName);} else {msg=YAHOO.Search.Answers.labels.searchForm.confirmation.replace(/%NAME%/,search Name);} if(!confirm(msg.replace(/%NAME%/,searchName))){return;}} var hidden=document.createElement('input');hidden.name=ctaButton.name;hidden.typ e='hidden';hidden.value=ctaButton.value;var els=savedSearch.getElementsByTagName ('button');for(var i=0,len=els.length;i<len;i++){els[i].name='';} this.form.appendChild(hidden);this.form.submit();});}}};}();YAHOO.namespace('YAH OO.Search.Answers.Content');YAHOO.Search.Answers.Content.loader=function(){var Y UD=YAHOO.util.Dom;var YUE=YAHOO.util.Event;var loader=false;var loaderWidth;var loaderOpacityActive='0.15';var triggeredEvent=new YAHOO.util.CustomEvent('trigge redEvent');var triggers=[];var inProgress=false;var inProgressTrigger=false;func tion eventTypeCallback(e){YUE.preventDefault(e);inProgressTrigger=triggers[this. id];triggeredEvent.fire(e,this);} function handleTriggeredEvent(type,args){var target=YAHOO.util.Event.getTarget(a rgs[0]);while(target.nodeName.toLowerCase()!=='a'&&YUD.isAncestor(args[1],target )){target=target.parentNode;} if(target.form){inProgressTrigger.formObj=target.form;inProgressTrigger.methodTy pe=(inProgressTrigger.formObj.getAttribute('method').toLowerCase()=='post'?'POST ':'GET');inProgressTrigger.uri=inProgressTrigger.formObj.getAttribute('action'); } if(inProgressTrigger.sourceType!=='form'&&target.href){inProgressTrigger.uri=tar get.href.replace(/done=[^&]*&/,'');}

if(inProgressTrigger.uri){handleSendRequest();}} function handleSendRequest(){var callback={success:callbackSuccess,failure:callb ackFail,cache:false};if(inProgress){YAHOO.util.Connect.abort(inProgress,callback );var previousTrigger=inProgress.trigger;var previousLoader=YUD.getPreviousSibli ng(previousTrigger.targetel);var args={};if(previousLoader&&YUD.hasClass(previou sLoader,'yan-content-loading')){args.loader=previousLoader} args.targetEl=previousTrigger.targetel;YAHOO.Search.Answers.resetLoaderAndConten tEvent.fire(args);} if(!YAHOO.util.Connect.isCallInProgress(inProgress)){if(inProgressTrigger.source Type==='form'){YAHOO.util.Connect.setForm(inProgressTrigger.formObj);} var existingLoader=YUD.getPreviousSibling(inProgressTrigger.targetel);if(!YUD.ha sClass(existingLoader,'yan-content-loading')){var loaderNode=document.createElem ent('div');var defaultText=YAHOO.Search.Answers.labels.contentLoader.defaultText ;loaderNode.innerHTML='<p>'+defaultText+'</p>';loader=loaderNode;YUD.addClass(lo ader,'yan-content-loading');YUD.insertBefore(loader,inProgressTrigger.targetel); loaderWidth=loader.offsetWidth/2;} else{loader=existingLoader;} YUD.setStyle(inProgressTrigger.targetel,'opacity',loaderOpacityActive);var YTrig gerPos=YUD.getY(inProgressTrigger.targetel);var YTriggerWidth=inProgressTrigger. targetel.offsetWidth;var loaderOffset=Math.floor((YTriggerWidth/2)-loaderWidth); YUD.setY(loader,YTriggerPos+20);YUD.setStyle(loader,'left',loaderOffset+'px');YU D.setStyle(loader,'display','block');inProgressTrigger.methodType=inProgressTrig ger.methodType?inProgressTrigger.methodType:'GET';inProgress=YAHOO.util.Connect. asyncRequest(inProgressTrigger.methodType,inProgressTrigger.uri,callback);inProg ress.trigger=inProgressTrigger;if(inProgressTrigger.sourceType==='form'){YAHOO.u til.Connect.resetFormState();}}} function resetLoaderAndContent(type,args){if(args[0]&&args[0].loader){YUD.setSty le(args[0].loader,'display','none');} if(args[0]&&args[0].targetEl){YUD.setStyle(args[0].targetEl,'opacity','1');} if(YUD.get('yan-user-profile-card')) {var oldProfileCards=YUD.get('yan-user-profile-card');oldProfileCards.parentNode .removeChild(oldProfileCards);YAHOO.Search.Answers.userProfileCard.init();}} function callbackSuccess(o){var response=o.responseText;var targetNode=inProgres sTrigger.targetel;targetNode.innerHTML=response;var args={loader:loader,targetEl :inProgressTrigger.targetel};YAHOO.Search.Answers.resetLoaderAndContentEvent.fir e(args);} function callbackFail(o){var args={loader:loader,targetEl:inProgressTrigger.targ etel};YAHOO.Search.Answers.resetLoaderAndContentEvent.fire(args);} function addTriggerElement(trigger){if(trigger.sourceType=='direct'){if(!trigger s[trigger.el]){triggers[trigger.el]=trigger;} inProgressTrigger=trigger;inProgressTrigger.uri=trigger.el;handleSendRequest();} else{triggers[trigger.el.id]=trigger;YUE.addListener(trigger.el,trigger.eventTyp e,eventTypeCallback);}} triggeredEvent.subscribe(handleTriggeredEvent);return{registerTrigger:function(t rigger){addTriggerElement(trigger);YAHOO.Search.Answers.resetLoaderAndContentEve nt.subscribe(resetLoaderAndContent);},getInProgress:function(){return inProgress ;},getTriggers:function(){return triggers;}};}();YAHOO.util.Event.throwErrors=tr ue;YAHOO.Search.Answers.interfaceReady=new YAHOO.util.CustomEvent('Interface is ready');YAHOO.Search.Answers.starEvent=new YAHOO.util.CustomEvent('Question has been starred');YAHOO.Search.Answers.contacts=new YAHOO.util.CustomEvent('Add use r network behaviour');YAHOO.Search.Answers.answerRateDown=new YAHOO.util.CustomE vent('Answer has been rated down');YAHOO.Search.Answers.showAlert=new YAHOO.util .CustomEvent('Alert pane');YAHOO.Search.Answers.closeAlert=new YAHOO.util.Custom Event('Close alert pane');YAHOO.Search.Answers.spellCheckStarted=new YAHOO.util. CustomEvent('Spellcheck has started');YAHOO.Search.Answers.spellCheckComplete=ne w YAHOO.util.CustomEvent('Spellcheck has completed');YAHOO.Search.Answers.tabCha nge=new YAHOO.util.CustomEvent('Tab has been changed');YAHOO.Search.Answers.qual ityTipShown=new YAHOO.util.CustomEvent('Quality tip has been shown');YAHOO.Searc h.Answers.qualityTipHidden=new YAHOO.util.CustomEvent('Quality tip has been hidd en');YAHOO.Search.Answers.paginationStart=new YAHOO.util.CustomEvent('pagination

clicked');YAHOO.Search.Answers.paginationComplete=new YAHOO.util.CustomEvent('p agination complete');YAHOO.Search.Answers.removeContact=new YAHOO.util.CustomEve nt('Remove contact');YAHOO.Search.Answers.resetLoaderAndContentEvent=new YAHOO.u til.CustomEvent('sendToXhrHandle');YAHOO.Search.Answers.toggledEvent=new YAHOO.u til.CustomEvent('toggleContent');YAHOO.Search.Answers.interfaceReady.subscribe(Y AHOO.Search.Answers.navBar.init);YAHOO.Search.Answers.interfaceReady.subscribe(Y AHOO.Search.Answers.interestingList.init);YAHOO.Search.Answers.interfaceReady.su bscribe(YAHOO.Search.Answers.moreList.init);YAHOO.Search.Answers.interfaceReady. subscribe(YAHOO.Search.Answers.cta.init);YAHOO.Search.Answers.interfaceReady.sub scribe(YAHOO.Search.Answers.searchBar.init);YAHOO.Search.Answers.interfaceReady. subscribe(YAHOO.Search.Answers.alertPane.init);YAHOO.Search.Answers.interfaceRea dy.subscribe(YAHOO.Search.Answers.answersCompact.init);YAHOO.Search.Answers.inte rfaceReady.subscribe(YAHOO.Search.Answers.answersRating.init);YAHOO.Search.Answe rs.interfaceReady.subscribe(YAHOO.Search.Answers.answersRatingV2.init);YAHOO.Sea rch.Answers.interfaceReady.subscribe(YAHOO.Search.Answers.answersSort.init);YAHO O.Search.Answers.interfaceReady.subscribe(YAHOO.Search.Answers.pointsAlert.init) ;YAHOO.Search.Answers.interfaceReady.subscribe(YAHOO.Search.Answers.commentPane. init);YAHOO.Search.Answers.interfaceReady.subscribe(YAHOO.Search.Answers.removeQ uestions.init);YAHOO.Search.Answers.interfaceReady.subscribe(YAHOO.Search.Answer s.homePageToggle.init);YAHOO.Search.Answers.interfaceReady.subscribe(YAHOO.Searc h.Answers.otherAnswersToggle.init);YAHOO.Search.Answers.interfaceReady.subscribe (YAHOO.Search.Answers.actionBar.init);YAHOO.Search.Answers.interfaceReady.subscr ibe(YAHOO.Search.Answers.starQuestion.init);YAHOO.Search.Answers.interfaceReady. subscribe(YAHOO.Search.Answers.askMini.init);YAHOO.Search.Answers.interfaceReady .subscribe(YAHOO.Search.Answers.seoThumbs.init);YAHOO.Search.Answers.interfaceRe ady.subscribe(YAHOO.Search.Answers.confirmations.init);YAHOO.Search.Answers.inte rfaceReady.subscribe(YAHOO.Search.Answers.spellChecker.init);YAHOO.Search.Answer s.interfaceReady.subscribe(YAHOO.Search.Answers.advancedSearch.init);YAHOO.Searc h.Answers.interfaceReady.subscribe(YAHOO.Search.Answers.questionFilter.init);YAH OO.Search.Answers.interfaceReady.subscribe(YAHOO.Search.Answers.externalLinks.in it);YAHOO.Search.Answers.interfaceReady.subscribe(YAHOO.Search.Answers.askFlow.i nit);YAHOO.Search.Answers.interfaceReady.subscribe(YAHOO.Search.Answers.answerFl ow.init);YAHOO.Search.Answers.interfaceReady.subscribe(YAHOO.Search.Answers.tabV iew.init);YAHOO.Search.Answers.interfaceReady.subscribe(YAHOO.Search.Answers.mul tiSelect.init);YAHOO.Search.Answers.interfaceReady.subscribe(YAHOO.Search.Answer s.profileRegistration.init);YAHOO.Search.Answers.interfaceReady.subscribe(YAHOO. Search.Answers.carousel.init);YAHOO.Search.Answers.interfaceReady.subscribe(YAHO O.Search.Answers.clickBox.init);YAHOO.Search.Answers.interfaceReady.subscribe(YA HOO.Search.Answers.domCollapse.init);YAHOO.Search.Answers.interfaceReady.subscri be(YAHOO.Search.Answers.contactActions.init);YAHOO.Search.Answers.interfaceReady .subscribe(YAHOO.Search.Answers.userProfileCard.init);YAHOO.Search.Answers.inter faceReady.subscribe(YAHOO.Search.Answers.bestAnswer.init);YAHOO.Search.Answers.i nterfaceReady.subscribe(YAHOO.Search.Answers.simpleRater.init,{starOnURL:'http:/ /l.yimg.com/h/28176/images/all/star_on.gif',starOffURL:'http://l.yimg.com/h/2817 6/images/all/star_off.gif',starHoverURL:'http://l.yimg.com/h/28176/images/all/st ar_hover.gif'});YAHOO.Search.Answers.interfaceReady.subscribe(YAHOO.Search.Answe rs.articleRatings.init);YAHOO.Search.Answers.interfaceReady.subscribe(YAHOO.Sear ch.Answers.registrationAboutYou.init);YAHOO.Search.Answers.interfaceReady.subscr ibe(YAHOO.Search.Answers.todayTrack.init);YAHOO.Search.Answers.interfaceReady.su bscribe(YAHOO.Search.Answers.marketingCodeCookie.init);YAHOO.Search.Answers.inte rfaceReady.subscribe(YAHOO.Search.Answers.marketingVideo.init);YAHOO.Search.Answ ers.interfaceReady.subscribe(YAHOO.Search.Answers.recommendedQuestionPagination. init);YAHOO.Search.Answers.interfaceReady.subscribe(YAHOO.Search.Answers.recomme ndedQuestionCarousel.init) YAHOO.Search.Answers.interfaceReady.subscribe(YAHOO.Search.Answers.Profiles.YOSW idgets.init);YAHOO.Search.Answers.interfaceReady.subscribe(YAHOO.Search.Answers. Profiles.NotifyMe.init);YAHOO.Search.Answers.interfaceReady.subscribe(YAHOO.Sear ch.Answers.Profiles.ContentRoutingOption.init);YAHOO.Search.Answers.interfaceRea dy.subscribe(YAHOO.Search.Answers.Profiles.LegcayNameWidget.init);YAHOO.Search.A nswers.interfaceReady.subscribe(YAHOO.Search.Answers.Profiles.LegcayNameOption.i

nit);YAHOO.Search.Answers.interfaceReady.subscribe(YAHOO.Search.Answers.editLega cyNameError.init);YAHOO.Search.Answers.interfaceReady.subscribe(YAHOO.Search.Ans wers.Profiles.EditPreferencesLeaveWithoutSaving.init);YAHOO.Search.Answers.inter faceReady.subscribe(YAHOO.Search.Answers.Profiles.StatisticsChart.init);YAHOO.Se arch.Answers.interfaceReady.subscribe(YAHOO.Search.Answers.Profiles.contactsList Focus.init);YAHOO.Search.Answers.interfaceReady.subscribe(YAHOO.Search.Answers.P rofiles.aboutMeToggler.init);YAHOO.Search.Answers.interfaceReady.subscribe(YAHOO .Search.Answers.Search.CategoryTool.init);YAHOO.Search.Answers.interfaceReady.su bscribe(YAHOO.Search.Answers.Search.defaultInputText.init);YAHOO.Search.Answers. interfaceReady.subscribe(YAHOO.Search.Answers.Search.selectFix.init);YAHOO.Searc h.Answers.interfaceReady.subscribe(YAHOO.Search.Answers.Search.savedSearch.init) ;YAHOO.namespace('YAHOO.Search.Answers.ContextualShortcuts');YAHOO.Search.Answer s.ContextualShortcuts.getCSData=new YAHOO.util.CustomEvent('Get CS data');YAHOO. Search.Answers.ContextualShortcuts.APIManager=function(){var YUD=YAHOO.util.Dom; var CSXMLNodes=[];function callbackSuccess(o){var data=YAHOO.lang.JSON.parse(o.r esponseText);YAHOO.Search.Answers.ContextualShortcuts.getCSData.fire(data);} function callbackFail(){return false;} return{addRequest:function(node){CSXMLNodes.push(node);},sendRequest:function(){ if(CSXMLNodes.length>0){var callback={success:callbackSuccess,failure:callbackFa il,cache:false};var postData='csdata='+encodeURIComponent(CSXMLNodes.join(''));i nProgress=YAHOO.util.Connect.asyncRequest('POST','/contextual-shortcuts',callbac k,postData);}}};}();YAHOO.Search.Answers.ContextualShortcuts.defineRequests=func tion(){var YUD=YAHOO.util.Dom;var bestContent;var stripHTML=/<\S[^><]*>/g;functi on compareText(originalText,newCSText){var newCSTextStripped=newCSText.replace(s tripHTML,'');var originalTextStripped=originalText.replace(stripHTML,'');if(orig inalTextStripped==newCSTextStripped){return true;} return false;} function extractCSData(type,args) {var data=args[0];if(data.meta.success){var head=document.getElementsByTagName(' head')[0];if(head){if(data.csdata.bestAnswer&&data.csdata.bestAnswer.content){va r sameText=compareText(bestContent.innerHTML,data.csdata.bestAnswer.content);if( sameText){bestContent.innerHTML=data.csdata.bestAnswer.content;}} var scriptNode=document.createElement('script');scriptNode.type='text/javascript ';if(typeof scriptNode.canHaveChildren!=='undefined'||YAHOO.env.ua.ie>0){scriptN ode.text=data.csdata.script;} else {scriptNode.innerHTML=data.csdata.script;} head.appendChild(scriptNode);var scriptNode=document.createElement('script');scr iptNode.type='text/javascript';scriptNode.src=data.csdata.yui3script;head.append Child(scriptNode);}}} YAHOO.Search.Answers.ContextualShortcuts.getCSData.subscribe(extractCSData);retu rn{init:function(){var questionPage=YUD.getElementsByClassName('question-index', 'body');if(questionPage[0]){var yanMain=YUD.get('yan-main');if(yanMain){var best =YUD.getElementsByClassName('best','div',yanMain);if(best[0]){var bestAnswerXMLC ontent=[];var bestContentNodes=YUD.getElementsByClassName('content','div',best[0 ]);if(bestContentNodes[0]){bestContent=bestContentNodes[0];bestAnswerXMLContent. push(bestContent.innerHTML);} if(bestAnswerXMLContent.length>0){YAHOO.Search.Answers.ContextualShortcuts.APIMa nager.addRequest('<div id="bestAnswer">'+bestAnswerXMLContent.join('')+'</div>') ;}}} YAHOO.Search.Answers.ContextualShortcuts.APIManager.sendRequest();}}};}();(funct ion(){var W;YAHOO.widget.Carousel=function(k,j){this._navBtns={};this._pages={}; YAHOO.widget.Carousel.superclass.constructor.call(this,k,j);};var e=YAHOO.widget .Carousel,C=YAHOO.util.Dom,i=YAHOO.util.Event,R=YAHOO.lang;W="Carousel";var G={} ;var h="afterScroll";var F="beforeHide";var f="beforePageChange";var b="beforeSc roll";var A="beforeShow";var V="blur";var D="focus";var O="hide";var Q="itemAdde d";var J="itemRemoved";var d="itemSelected";var B="loadItems";var E="navigationS tateChange";var U="pageChange";var T="render";var I="show";var c="startAutoPlay" ;var g="stopAutoPlay";function L(){var k=this._firstItem,j;if(k>=this.get("numIt ems")-1){if(this.get("isCircular")){j=0;}else{this.stopAutoPlay();}}else{j=k+thi

s.get("numVisible");}this.scrollTo.call(this,j);}function a(k,j){var l=document. createElement(k);j=j||{};if(j.className){C.addClass(l,j.className);}if(j.parent) {j.parent.appendChild(l);}if(j.id){l.setAttribute("id",j.id);}if(j.content){if(j .content.nodeName){l.appendChild(j.content);}else{l.innerHTML=j.content;}}return l;}function K(l,k,j){var n;function m(q,p){var r;r=parseInt(C.getStyle(q,p),10) ;return R.isNumber(r)?r:0;}function o(q,p){var r;r=parseFloat(C.getStyle(q,p));r eturn R.isNumber(r)?r:0;}if(typeof j=="undefined"){j="int";}switch(k){case"heigh t":n=l.offsetHeight;if(n>0){n+=m(l,"marginTop")+m(l,"marginBottom");}else{n=o(l, "height")+m(l,"marginTop")+m(l,"marginBottom")+m(l,"borderTopWidth")+m(l,"border BottomWidth")+m(l,"paddingTop")+m(l,"paddingBottom");}break;case"width":n=l.offs etWidth;if(n>0){n+=m(l,"marginLeft")+m(l,"marginRight");}else{n=o(l,"width")+m(l ,"marginLeft")+m(l,"marginRight")+m(l,"borderLeftWidth")+m(l,"borderRightWidth") +m(l,"paddingLeft")+m(l,"paddingRight");}break;default:if(j=="int"){n=m(l,k);if( k=="marginRight"&&YAHOO.env.ua.webkit){n=m(l,"marginLeft");}}else{if(j=="float") {n=o(l,k);}else{n=C.getStyle(l,k);}}break;}return n;}function Y(l){var m,k=0,j=f alse;if(this._itemsTable.numItems===0){return 0;}if(typeof l=="undefined"){if(th is._itemsTable.size>0){return this._itemsTable.size;}}if(R.isUndefined(this._ite msTable.items[0])){return 0;}m=C.get(this._itemsTable.items[0].id);if(typeof l== "undefined"){j=this.get("isVertical");}else{j=l=="height";}if(j){k=K(m,"height") ;}else{k=K(m,"width");}if(typeof l=="undefined"){this._itemsTable.size=k;}return k;}function S(l){var k=0,j=0;k=Y.call(this);j=k*l;if(this.get("isVertical")){j=l;}return j;}function H(){var n=this.get("firstVisible"),k=0,j=this.get("numIte ms"),l=this.get("numVisible"),m=this.get("revealAmount");k=n+l-1+(m?1:0);k=k>j-1 ?j-1:k;if(!this.getItem(n)||!this.getItem(k)){this.fireEvent(B,{ev:B,first:n,las t:k,num:k-n});}}function N(j,k){k.scrollPageBackward();i.preventDefault(j);}func tion X(j,k){k.scrollPageForward();i.preventDefault(j);}function P(o,j){var r,t=t his.CLASSES,k,q=this._firstItem,l=this.get("isCircular"),p=this.get("numItems"), s=this.get("numVisible"),n=j,m=q+s-1;r=s>1&&!l&&n>o;if(n>=0&&n<p){if(!R.isUndefi ned(this._itemsTable.items[n])){k=C.get(this._itemsTable.items[n].id);if(k){C.re moveClass(k,t.SELECTED_ITEM);}}}if(R.isNumber(o)){o=parseInt(o,10);o=R.isNumber( o)?o:0;}else{o=q;}if(R.isUndefined(this._itemsTable.items[o])){this.scrollTo(o); }if(!R.isUndefined(this._itemsTable.items[o])){k=C.get(this._itemsTable.items[o] .id);if(k){C.addClass(k,t.SELECTED_ITEM);}}if(o<q||o>m){if(r){this.scrollTo(q-s, true);}else{this.scrollTo(o);}}}function Z(){var l=false,k=this.CLASSES,n,j,m;j= this.get("navigation");m=this._firstItem+this.get("numVisible");if(j.prev){if(th is._firstItem===0){if(!this.get("isCircular")){i.removeListener(j.prev,"click",N );C.addClass(j.prev,k.FIRST_NAV_DISABLED);for(n=0;n<this._navBtns.prev.length;n+ +){this._navBtns.prev[n].setAttribute("disabled","true");}this._prevEnabled=fals e;}else{l=!this._prevEnabled;}}else{l=!this._prevEnabled;}if(l){i.on(j.prev,"cli ck",N,this);C.removeClass(j.prev,k.FIRST_NAV_DISABLED);for(n=0;n<this._navBtns.p rev.length;n++){this._navBtns.prev[n].removeAttribute("disabled");}this._prevEna bled=true;}}l=false;if(j.next){if(m>=this.get("numItems")){if(!this.get("isCircu lar")){i.removeListener(j.next,"click",X);C.addClass(j.next,k.DISABLED);for(n=0; n<this._navBtns.next.length;n++){this._navBtns.next[n].setAttribute("disabled"," true");}this._nextEnabled=false;}else{l=!this._nextEnabled;}}else{l=!this._nextE nabled;}if(l){i.on(j.next,"click",X,this);C.removeClass(j.next,k.DISABLED);for(n =0;n<this._navBtns.next.length;n++){this._navBtns.next[n].removeAttribute("disab led");}this._nextEnabled=true;}}this.fireEvent(E,{next:this._nextEnabled,prev:th is._prevEnabled});}function M(q){var n,l,p,k,j,r,m;if(!R.isObject(q)){return;}sw itch(q.ev){case Q:r=R.isUndefined(q.pos)?this._itemsTable.numItems-1:q.pos;if(!R .isUndefined(this._itemsTable.items[r])){p=this._itemsTable.items[r];if(p&&!R.is Undefined(p.id)){j=C.get(p.id);}}if(!j){n=this._createCarouselItem({className:p. className,content:p.item,id:p.id});if(R.isUndefined(q.pos)){if(!R.isUndefined(th is._itemsTable.loading[r])){j=this._itemsTable.loading[r];}if(j){this._carouselE l.replaceChild(n,j);}else{this._carouselEl.appendChild(n);}}else{if(!R.isUndefin ed(this._itemsTable.items[q.pos+1])){m=C.get(this._itemsTable.items[q.pos+1].id) ;}if(m){this._carouselEl.insertBefore(n,m);}else{}}}else{if(R.isUndefined(q.pos) ){if(!C.isAncestor(this._carouselEl,j)){this._carouselEl.appendChild(j);}}else{i f(!C.isAncestor(this._carouselEl,j)){if(!R.isUndefined(this._itemsTable.items[q. pos+1])){this._carouselEl.insertBefore(j,C.get(this._itemsTable.items[q.pos+1].i

d));}}}}if(this._recomputeSize){this._setClipContainerSize();}break;case J:k=thi s.get("numItems");p=q.item;r=q.pos;if(p&&(n=C.get(p.id))){if(n&&C.isAncestor(thi s._carouselEl,n)){i.purgeElement(n,true);this._carouselEl.removeChild(n);}if(thi s.get("selectedItem")==r){r=r>=k?k-1:r;this.set("selectedItem",r);}}else{}break; case B:for(l=q.first;l<=q.last;l++){n=this._createCarouselItem({content:this.CON FIG.ITEM_LOADING,id:C.generateId()});if(n){if(!R.isUndefined(this._itemsTable.it ems[q.last+1])){m=C.get(this._itemsTable.items[q.last+1].id);if(m){this._carouse lEl.insertBefore(n,m);}else{}}else{this._carouselEl.appendChild(n);}}this._items Table.loading[l]=n;}break;}}e.getById=function(j){return G[j]?G[j]:false;};YAHOO .extend(e,YAHOO.util.Element,{_carouselEl:null,_clipEl:null,_firstItem:0,_isAnim ationInProgress:false,_itemsTable:null,_navBtns:null,_navEl:null,_nextEnabled:tr ue,_pages:null,_prevEnabled:true,_recomputeSize:true,CLASSES:{BUTTON:"yui-carous el-button",CAROUSEL:"yui-carousel",CAROUSEL_EL:"yui-carousel-element",CONTAINER: "yui-carousel-container",CONTENT:"yui-carousel-content",DISABLED:"yui-carousel-b utton-disabled",FIRST_NAV:" yui-carousel-first-button",FIRST_NAV_DISABLED:"yui-c arousel-first-button-disabled",FIRST_PAGE:"yui-carousel-nav-first-page",FOCUSSED _BUTTON:"yui-carousel-button-focus",HORIZONTAL:"yui-carousel-horizontal",NAVIGAT ION:"yui-carousel-nav",NEXT_PAGE:"yui-carousel-next",NAV_CONTAINER:"yui-carousel -buttons",PREV_PAGE:"yui-carousel-prev",SELECTED_ITEM:"yui-carousel-item-selecte d",SELECTED_NAV:"yui-carousel-nav-page-selected",VERTICAL:"yui-carousel-vertical ",VERTICAL_CONTAINER:"yui-carousel-vertical-container",VISIBLE:"yui-carousel-vis ible"},CONFIG:{FIRST_VISIBLE:0,ITEM_LOADING:"<img "+'src="../../build/carousel/a ssets/ajax-loader.gif" '+'alt="Loading" '+'style="margin-top:-32px;position:rela tive;top:50%;">',ITEM_TAG_NAME:"LI",MAX_PAGER_BUTTONS:5,MIN_WIDTH:99,NUM_VISIBLE :3,TAG_NAME:"OL"},STRINGS:{NEXT_BUTTON_TEXT:"Next Page",PAGER_PREFIX_TEXT:"Go to page ",PREVIOUS_BUTTON_TEXT:"Previous Page"},addItem:function(p,k){var n,o,m,j, l=this.get("numItems");if(!p){return false;}if(R.isString(p)||p.nodeName){o=p.no deName?p.innerHTML:p;}else{if(R.isObject(p)){o=p.content;}else{return false;}}n= p.className||"";j=p.id?p.id:C.generateId();if(R.isUndefined(k)){this._itemsTable .items.push({item:o,className:n,id:j});}else{if(k<0||k>=l){return false;}this._i temsTable.items.splice(k,0,{item:o,className:n,id:j});}this._itemsTable.numItems ++;if(l<this._itemsTable.items.length){this.set("numItems",this._itemsTable.item s.length);}this.fireEvent(Q,{pos:k,ev:Q});return true;},addItems:function(j){var k,m,l=true;if(!R.isArray(j)){return false;}for(k=0,m=j.length;k<m;k++){if(this. addItem(j[k][0],j[k][1])===false){l=false;}}return l;},blur:function(){this._car ouselEl.blur();this.fireEvent(V);},clearItems:function(){var j=this.get("numItem s");while(j>0){this.removeItem(0);j--;}},focus:function(){var j,s,k,m,n,r,p,o,l; if(this._isAnimationInProgress){return;}j=this.get("selectedItem");s=this.get("n umVisible");k=this.get("selectOnScroll");m=this.getItem(j);n=this.get("firstVisi ble");r=n+s-1;p=(j<n||j>r);o=(m&&m.id)?C.get(m.id):null;l=this._itemsTable;if(!k &&p){o=(l&&l.items&&l.items[n])?C.get(l.items[n].id):null;}if(o){try{o.focus();} catch(q){}}this.fireEvent(D);},hide:function(){if(this.fireEvent(F)!==false){thi s.removeClass(this.CLASSES.VISIBLE);this.fireEvent(O);}},init:function(l,k){var j=l,m=false;if(!l){return;}this._itemsTable={loading:{},numItems:0,items:[],size :0};if(R.isString(l)){l=C.get(l);}else{if(!l.nodeName){return;}}if(l){if(!l.id){ l.setAttribute("id",C.generateId());}this._parseCarousel(l);m=true;}else{l=this. _createCarousel(j);}j=l.id;e.superclass.init.call(this,l,k);this.initEvents();if (m){this._parseCarouselItems();}if(!k||typeof k.isVertical=="undefined"){this.se t("isVertical",false);}this._parseCarouselNavigation(l);this._navEl=this._setupC arouselNavigation();G[j]=this;H.call(this);},initAttributes:function(j){j=j||{}; e.superclass.initAttributes.call(this,j);this.setAttributeConfig("currentPage",{ readOnly:true,value:0});this.setAttributeConfig("firstVisible",{method:this._set FirstVisible,validator:this._validateFirstVisible,value:j.firstVisible||this.CON FIG.FIRST_VISIBLE});this.setAttributeConfig("selectOnScroll",{validator:R.isBool ean,value:j.selectOnScroll||true});this.setAttributeConfig("numVisible",{method: this._setNumVisible,validator:this._validateNumVisible,value:j.numVisible||this. CONFIG.NUM_VISIBLE});this.setAttributeConfig("numItems",{method:this._setNumItem s,validator:this._validateNumItems,value:this._itemsTable.numItems});this.setAtt ributeConfig("scrollIncrement",{validator:this._validateScrollIncrement,value:j. scrollIncrement||1});this.setAttributeConfig("selectedItem",{method:this._setSel

ectedItem,validator:R.isNumber,value:0});this.setAttributeConfig("revealAmount", {method:this._setRevealAmount,validator:this._validateRevealAmount,value:j.revea lAmount||0});this.setAttributeConfig("isCircular",{validator:R.isBoolean,value:j .isCircular||false});this.setAttributeConfig("isVertical",{method:this._setOrien tation,validator:R.isBoolean,value:j.isVertical||false});this.setAttributeConfig ("navigation",{method:this._setNavigation,validator:this._validateNavigation,val ue:j.navigation||{prev:null,next:null,page:null}});this.setAttributeConfig("anim ation",{validator:this._validateAnimation,value:j.animation||{speed:0,effect:nul l}});this.setAttributeConfig("autoPlay",{validator:R.isNumber,value:j.autoPlay|| 0});},initEvents:function(){var j=this.CLASSES;this.on("keydown",this._keyboardE ventHandler);this.subscribe(h,Z);this.on(h,this.focus);this.subscribe(Q,M);this. subscribe(Q,Z);this.subscribe(J,M);this.subscribe(J,Z);this.on(d,this.focus);thi s.subscribe(B,M);this.subscribe(U,this._syncPagerUI);this.subscribe(T,Z);this.su bscribe(T,this._syncPagerUI);this.on("selectedItemChange",function(k){P.call(thi s,k.newValue,k.prevValue);this._updateTabIndex(this.getElementForItem(k.newValue ));this.fireEvent(d,k.newValue);});this.on("firstVisibleChange",function(k){if(! this.get("selectOnScroll")){this._updateTabIndex(this.getElementForItem(k.newVal ue));}});this.on("click",this._itemClickHandler);this.on("click",this._pagerClic kHandler);i.onFocus(this.get("element"),function(k,l){l._updateNavButtons(i.getT arget(k),true);},this);i.onBlur(this.get("element"),function(k,l){l._updateNavBu ttons(i.getTarget(k),false);},this);},getElementForItem:function(j){if(j<0||j>=t his.get("numItems")){return null;}if(this._itemsTable.numItems>j){if(!R.isUndefi ned(this._itemsTable.items[j])){return C.get(this._itemsTable.items[j].id);}}ret urn null;},getElementForItems:function(){var k=[],j;for(j=0;j<this._itemsTable.n umItems;j++){k.push(this.getElementForItem(j));}return k;},getItem:function(j){i f(j<0||j>=this.get("numItems")){return null;}if(this._itemsTable.numItems>j){if( !R.isUndefined(this._itemsTable.items[j])){return this._itemsTable.items[j];}}re turn null;},getItems:function(j){return this._itemsTable.items;},getItemPosition ById:function(l){var j=0,k=this._itemsTable.numItems;while(j<k){if(!R.isUndefine d(this._itemsTable.items[j])){if(this._itemsTable.items[j].id==l){return j;}}j++ ;}return-1;},removeItem:function(k){var l,j=this.get("numItems");if(k<0||k>=j){r eturn false;}l=this._itemsTable.items.splice(k,1);if(l&&l.length==1){this.set("n umItems",j-1);this.fireEvent(J,{item:l[0],pos:k,ev:J});return true;}return false ;},render:function(l){var k=this.CONFIG,j=this.CLASSES,m;this.addClass(j.CAROUSE L);if(!this._clipEl){this._clipEl=this._createCarouselClip();this._clipEl.append Child(this._carouselEl);}if(l){this.appendChild(this._clipEl);this.appendTo(l);t his._setClipContainerSize();}else{if(!C.inDocument(this.get("element"))){return false;}this.appendChild(this._clipEl);}if(this.get("isVertical")){m=Y.call(this) ;m=m<k.MIN_WIDTH?k.MIN_WIDTH:m;this.setStyle("width",m+"px");this.addClass(j.VER TICAL);}else{this.addClass(j.HORIZONTAL);}if(this.get("numItems")<1){return fals e;}this.set("selectedItem",this.get("firstVisible"));this.fireEvent(T);this._set ContainerSize();return true;},scrollBackward:function(){this.scrollTo(this._firs tItem-this.get("scrollIncrement"));},scrollForward:function(){this.scrollTo(this ._firstItem+this.get("scrollIncrement"));},scrollPageBackward:function(){this.sc rollTo(this._firstItem-this.get("numVisible"));},scrollPageForward:function(){th is.scrollTo(this._firstItem+this.get("numVisible"));},scrollTo:function(x,v){var u,m,j,w=this.get("animation"),p=this.get("isCircular"),y,z,AA=this._firstItem,t ,s=this.get("numItems"),k=this.get("numVisible"),n,l=this.get("currentPage"),o,r ,q;if(x==AA){return;}if(this._isAnimationInProgress){return;}if(x<0){if(p){x=s+x ;}else{return;}}else{if(x>s-1){if(this.get("isCircular")){x=s-x;}else{return;}}} z=(this._firstItem>x)?"backward":"forward";r=AA+k;r=(r>s-1)?s-1:r;o=this.fireEve nt(b,{dir:z,first:AA,last:r});if(o===false){return;}this.fireEvent(f,{page:l});y =AA-x;this._firstItem=x;this.set("firstVisible",x);H.call(this);r=x+k;r=(r>s-1)? s-1:r;q=this.get("isVertical")?"top":"left";n=S.call(this,y);m=w.speed>0;if(m){t his._isAnimationInProgress=true;if(this.get("isVertical")){j={points:{by:[0,n]}} ;}else{j={points:{by:[n,0]}};}u=new YAHOO.util.Motion(this._carouselEl,j,w.speed ,w.effect);u.onComplete.subscribe(function(AB){var AC=this.get("firstVisible");t his._isAnimationInProgress=false;this.fireEvent(h,{first:AC,last:r});},null,this );u.animate();u=null;}else{n+=K(this._carouselEl,q);C.setStyle(this._carouselEl, q,n+"px");}t=parseInt(this._firstItem/k,10);if(t!=l){this.setAttributeConfig("cu

rrentPage",{value:t});this.fireEvent(U,t);}if(!v){if(this.get("selectOnScroll")) {if(x!=this._selectedItem){this.set("selectedItem",this._getSelectedItem(x));}}} delete this._autoPlayTimer;if(this.get("autoPlay")>0){this.startAutoPlay();}if(! m){this.fireEvent(h,{first:x,last:r});}},show:function(){var j=this.CLASSES;if(t his.fireEvent(A)!==false){this.addClass(j.VISIBLE);this.fireEvent(I);}},startAut oPlay:function(){var j=this,k=this.get("autoPlay");if(k>0){if(!R.isUndefined(thi s._autoPlayTimer)){return;}this.fireEvent(c);this._autoPlayTimer=setTimeout(func tion(){L.call(j);},k);}},stopAutoPlay:function(){if(!R.isUndefined(this._autoPla yTimer)){clearTimeout(this._autoPlayTimer);delete this._autoPlayTimer;this.set(" autoPlay",0);this.fireEvent(g);}},toString:function(){return W+(this.get?" (#"+t his.get("id")+")":"");},_createCarousel:function(k){var j=this.CLASSES;var l=a(" DIV",{className:j.CAROUSEL,id:k});if(!this._carouselEl){this._carouselEl=a(this. CONFIG.TAG_NAME,{className:j.CAROUSEL_EL});}return l;},_createCarouselClip:funct ion(){var j=a("DIV",{className:this.CLASSES.CONTENT});this._setClipContainerSize (j);return j;},_createCarouselItem:function(j){return a(this.CONFIG.ITEM_TAG_NAM E,{className:j.className,content:j.content,id:j.id});},_getSelectedItem:function (m){var j=this.get("isCircular"),l=this.get("numItems"),k=l-1;if(m<0){if(j){m=l+ m;}else{m=this.get("selectedItem");}}else{if(m>k){if(j){m=m-l;}else{m=this.get(" selectedItem");}}}return m;},_itemClickHandler:function(m){var j=this.get("eleme nt"),k,l,n=YAHOO.util.Event.getTarget(m);while(n&&n!=j&&n.id!=this._carouselEl){ k=n.nodeName;if(k.toUpperCase()==this.CONFIG.ITEM_TAG_NAME){break;}n=n.parentNod e;}if((l=this.getItemPositionById(n.id))>=0){this.set("selectedItem",this._getSe lectedItem(l));}},_keyboardEventHandler:function(m){var l=i.getCharCode(m),k=fal se,j=0,n;if(this._isAnimationInProgress){return;}switch(l){case 37:case 38:n=thi s.get("selectedItem");if(n==this._firstItem){j=n-this.get("numVisible");this.scr ollTo(j);this.set("selectedItem",this._getSelectedItem(n-1));}else{j=this.get("s electedItem")-this.get("scrollIncrement");this.set("selectedItem",this._getSelec tedItem(j));}k=true;break;case 39:case 40:j=this.get("selectedItem")+this.get("s crollIncrement");this.set("selectedItem",this._getSelectedItem(j));k=true;break; case 33:this.scrollPageBackward();k=true;break;case 34:this.scrollPageForward(); k=true;break;}if(k){i.preventDefault(m);}},_pagerClickHandler:function(j){var m, k,l;k=i.getTarget(j);l=k.href||k.value;if(R.isString(l)&&l){m=l.lastIndexOf("#") ;if(m!=-1){l=this.getItemPositionById(l.substring(m+1));this.scrollTo(l);i.preve ntDefault(j);}}},_parseCarousel:function(k){var n,j,m,l;j=this.CLASSES;m=false;f or(n=k.firstChild;n;n=n.nextSibling){if(n.nodeType==1){l=n.nodeName;if(l.toUpper Case()==this.CONFIG.TAG_NAME){this._carouselEl=n;C.addClass(this._carouselEl,thi s.CLASSES.CAROUSEL_EL);m=true;}}}return m;},_parseCarouselItems:function(){var m ,j,l,k=this._carouselEl;for(m=k.firstChild;m;m=m.nextSibling){if(m.nodeType==1){ l=m.nodeName;if(l.toUpperCase()==this.CONFIG.ITEM_TAG_NAME){if(m.id){j=m.id;}els e{j=C.generateId();m.setAttribute("id",j);}this.addItem(m);}}}},_parseCarouselNa vigation:function(p){var l,k=this.CLASSES,o,n,m,q,r=false;q=C.getElementsByClass Name(k.PREV_PAGE,"*",p);if(q.length>0){for(n in q){if(q.hasOwnProperty(n)){o=q[n ];if(o.nodeName=="INPUT"||o.nodeName=="BUTTON"){if(typeof this._navBtns.prev=="u ndefined"){this._navBtns.prev=[];}this._navBtns.prev.push(o);}else{m=o.getElemen tsByTagName("INPUT");if(R.isArray(m)&&m.length>0){this._navBtns.prev.push(m[0]); }else{m=o.getElementsByTagName("BUTTON");if(R.isArray(m)&&m.length>0){this._navB tns.prev.push(m[0]);}}}}}l={prev:q};}q=C.getElementsByClassName(k.NEXT_PAGE,"*", p);if(q.length>0){for(n in q){if(q.hasOwnProperty(n)){o=q[n];if(o.nodeName=="INP UT"||o.nodeName=="BUTTON"){if(typeof this._navBtns.next=="undefined"){this._navB tns.next=[];}this._navBtns.next.push(o);}else{m=o.getElementsByTagName("INPUT"); if(R.isArray(m)&&m.length>0){this._navBtns.next.push(m[0]);}else{m=o.getElements ByTagName("BUTTON");if(R.isArray(m)&&m.length>0){this._navBtns.next.push(m[0]);} }}}}if(l){l.next=q;}else{l={next:q};}}if(l){this.set("navigation",l);r=true;}ret urn r;},_setupCarouselNavigation:function(){var m,k,j,q,n,p,o,l;j=this.CLASSES;n =C.getElementsByClassName(j.NAVIGATION,"DIV",this.get("element"));if(n.length=== 0){n=a("DIV",{className:j.NAVIGATION});this.insertBefore(n,C.getFirstChild(this. get("element")));}else{n=n[0];}this._pages.el=a("UL");n.appendChild(this._pages. el);q=this.get("navigation");if(q.prev&&q.prev.length>0){n.appendChild(q.prev[0] );}else{l=a("SPAN",{className:j.BUTTON+j.FIRST_NAV});C.setStyle(l,"visibility"," visible");m=C.generateId();l.innerHTML='<input type="button" '+'id="'+m+'" '+'va

lue="'+this.STRINGS.PREVIOUS_BUTTON_TEXT+'" '+'name="'+this.STRINGS.PREVIOUS_BUT TON_TEXT+'">';n.appendChild(l);m=C.get(m);this._navBtns.prev=[m];k={prev:[l]};}i f(q.next&&q.next.length>0){n.appendChild(q.next[0]);}else{p=a("SPAN",{className: j.BUTTON});C.setStyle(p,"visibility","visible");m=C.generateId();p.innerHTML='<i nput type="button" '+'id="'+m+'" '+'value="'+this.STRINGS.NEXT_BUTTON_TEXT+'" '+ 'name="'+this.STRINGS.NEXT_BUTTON_TEXT+'">';n.appendChild(p);m=C.get(m);this._na vBtns.next=[m];if(k){k.next=[p];}else{k={next:[p]};}}if(k){this.set("navigation" ,k);}return n;},_setClipContainerSize:function(k,m){var n,j,o,p,q,r,l;o=this.get ("isVertical");q=this.get("revealAmount");l=o?"height":"width";n=o?"top":"left"; k=k||this._clipEl;if(!k){return;}m=m||this.get("numVisible");p=Y.call(this,l);r= p*m;this._recomputeSize=(r===0);if(this._recomputeSize){return;}if(q>0){q=p*(q/1 00)*2;r+=q;j=parseFloat(C.getStyle(this._carouselEl,n));j=R.isNumber(j)?j:0;C.se tStyle(this._carouselEl,n,j+(q/2)+"px");}if(o){r+=K(this._carouselEl,"marginTop" )+K(this._carouselEl,"marginBottom")+K(this._carouselEl,"paddingTop")+K(this._ca rouselEl,"paddingBottom")+K(this._carouselEl,"borderTop")+K(this._carouselEl,"bo rderBottom");C.setStyle(k,l,(r-(m-1))+"px");}else{r+=K(this._carouselEl,"marginL eft")+K(this._carouselEl,"marginRight")+K(this._carouselEl,"paddingLeft")+K(this ._carouselEl,"paddingRight")+K(this._carouselEl,"borderLeft")+K(this._carouselEl ,"borderRight");C.setStyle(k,l,r+"px");}this._setContainerSize(k);},_setContaine rSize:function(l,j){var m,k;m=this.get("isVertical");l=l||this._clipEl;j=j||(m?" height":"width");k=parseFloat(C.getStyle(l,j),10);k=R.isNumber(k)?k:0;k+=K(l,"ma rginLeft")+K(l,"marginRight")+K(l,"paddingLeft")+K(l,"paddingRight")+K(l,"border Left")+K(l,"borderRight");if(m){k+=K(this._navEl,"height");}this.setStyle(j,k+"p x");},_setFirstVisible:function(j){if(j>=0&&j<this.get("numItems")){this.scrollT o(j);}else{j=this.get("firstVisible");}return j;},_setNavigation:function(j){if( j.prev){i.on(j.prev,"click",N,this);}if(j.next){i.on(j.next,"click",X,this);}},_ setNumVisible:function(j){if(j>1&&j<this.get("numItems")){this._setClipContainer Size(this._clipEl,j);}else{j=this.get("numVisible");}return j;},_setNumItems:fun ction(k){var j=this._itemsTable.numItems;if(R.isArray(this._itemsTable.items)){i f(this._itemsTable.items.length!=j){j=this._itemsTable.items.length;this._itemsT able.numItems=j;}}if(k<j){while(j>k){this.removeItem(j-1);j--;}}return k;},_setO rientation:function(k){var j=this.CLASSES;if(k){this.replaceClass(j.HORIZONTAL,j .VERTICAL);}else{this.replaceClass(j.VERTICAL,j.HORIZONTAL);}this._itemsTable.si ze=0;return k;},_setRevealAmount:function(j){if(j>=0&&j<=100){j=parseInt(j,10);j =R.isNumber(j)?j:0;this._setClipContainerSize();}else{j=this.get("revealAmount") ;}return j;},_setSelectedItem:function(j){this._selectedItem=j;},_syncPagerUI:fu nction(p){var k,j=this.CLASSES,n,m="",l,o=this.get("numVisible");p=p||0;l=Math.c eil(this.get("numItems")/o);this._pages.num=l;this._pages.cur=p;if(l>this.CONFIG .MAX_PAGER_BUTTONS){m="<form><select>";}else{m="";}for(n=0;n<l;n++){if(R.isUndef ined(this._itemsTable.items[n*o])){break;}k=this._itemsTable.items[n*o].id;if(l> this.CONFIG.MAX_PAGER_BUTTONS){m+='<option value="#'+k+'" '+(n==p?" selected":"" )+">"+this.STRINGS.PAGER_PREFIX_TEXT+" "+(n+1)+"</option>";}else{m+='<li class=" '+(n===0?j.FIRST_PAGE:"")+(n==p?" "+j.SELECTED_NAV:"")+'"><a href="#'+k+'" tabin dex="0"><em>'+this.STRINGS.PAGER_PREFIX_TEXT+" "+(n+1)+"</em></a></li>";}}if(l>t his.CONFIG.MAX_PAGER_BUTTONS){m+="</select></form>";}this._pages.el.innerHTML=m; m=null;},_updateNavButtons:function(n,k){var l,j=this.CLASSES,o,m=n.parentNode;i f(!m){return;}o=m.parentNode;if(n.nodeName.toUpperCase()=="INPUT"&&C.hasClass(m, j.BUTTON)){if(k){if(o){l=C.getChildren(o);if(l){C.removeClass(l,j.FOCUSSED_BUTTO N);}}C.addClass(m,j.FOCUSSED_BUTTON);}else{C.removeClass(m,j.FOCUSSED_BUTTON);}} },_updateTabIndex:function(j){if(j){if(this._focusableItemEl){this._focusableIte mEl.tabIndex=-1;}this._focusableItemEl=j;j.tabIndex=0;}},_validateAnimation:func tion(j){var k=true;if(R.isObject(j)){if(j.speed){k=k&&R.isNumber(j.speed);}if(j. effect){k=k&&R.isFunction(j.effect);}else{if(!R.isUndefined(YAHOO.util.Easing)){ j.effect=YAHOO.util.Easing.easeOut;}}}else{k=false;}return k;},_validateFirstVis ible:function(j){var k=false;if(R.isNumber(j)){k=(j>=0&&j<this.get("numItems")); }return k;},_validateNavigation:function(j){var k;if(!R.isObject(j)){return fals e;}if(j.prev){if(!R.isArray(j.prev)){return false;}for(k in j.prev){if(j.prev.ha sOwnProperty(k)){if(!R.isString(j.prev[k].nodeName)){return false;}}}}if(j.next) {if(!R.isArray(j.next)){return false;}for(k in j.next){if(j.next.hasOwnProperty( k)){if(!R.isString(j.next[k].nodeName)){return false;}}}}return true;},_validate

NumItems:function(j){var k=false;if(R.isNumber(j)){k=j>0;}return k;},_validateNu mVisible:function(j){var k=false;if(R.isNumber(j)){k=j>0&&j<this.get("numItems") ;}return k;},_validateRevealAmount:function(j){var k=false;if(R.isNumber(j)){k=j >=0&&j<100;}return k;},_validateScrollIncrement:function(j){var k=false;if(R.isN umber(j)){k=(j>0&&j<this.get("numItems"));}return k;}});})();YAHOO.register("car ousel",YAHOO.widget.Carousel,{version:"2.6.0",build:"1321"});