if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=(""+A[C]).split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules,B,H,G,F,C;if(!I[A]){I[A]={versions:[],builds:[]};}B=I[A];H=D.version;G=D.build;F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var D=function(H){var I=0;return parseFloat(H.replace(/\./g,function(){return(I++==1)?"":".";}));},G=navigator,F={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0,caja:G.cajaVersion,secure:false,os:null},C=navigator&&navigator.userAgent,E=window&&window.location,B=E&&E.href,A;F.secure=B&&(B.toLowerCase().indexOf("https")===0);if(C){if((/windows|win32/i).test(C)){F.os="windows";}else{if((/macintosh/i).test(C)){F.os="macintosh";}}if((/KHTML/).test(C)){F.webkit=1;}A=C.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){F.webkit=D(A[1]);if(/ Mobile\//.test(C)){F.mobile="Apple";}else{A=C.match(/NokiaN[^\/]*/);if(A){F.mobile=A[0];}}A=C.match(/AdobeAIR\/([^\s]*)/);if(A){F.air=A[0];}}if(!F.webkit){A=C.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){F.opera=D(A[1]);A=C.match(/Opera Mini[^;]*/);if(A){F.mobile=A[0];}}else{A=C.match(/MSIE\s([^;]*)/);if(A&&A[1]){F.ie=D(A[1]);}else{A=C.match(/Gecko\/([^\s]*)/);if(A){F.gecko=1;A=C.match(/rv:([^\s\)]*)/);if(A&&A[1]){F.gecko=D(A[1]);}}}}}}return F;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C++){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var B=YAHOO.lang,A=Object.prototype,H="[object Array]",C="[object Function]",G="[object Object]",E=[],F=["toString","valueOf"],D={isArray:function(I){return A.toString.apply(I)===H;},isBoolean:function(I){return typeof I==="boolean";},isFunction:function(I){return(typeof I==="function")||A.toString.apply(I)===C;},isNull:function(I){return I===null;},isNumber:function(I){return typeof I==="number"&&isFinite(I);},isObject:function(I){return(I&&(typeof I==="object"||B.isFunction(I)))||false;},isString:function(I){return typeof I==="string";},isUndefined:function(I){return typeof I==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(K,J){var I,M,L;for(I=0;I<F.length;I=I+1){M=F[I];L=J[M];if(B.isFunction(L)&&L!=A[M]){K[M]=L;}}}:function(){},extend:function(L,M,K){if(!M||!L){throw new Error("extend failed, please check that "+"all dependencies are included.");}var J=function(){},I;J.prototype=M.prototype;L.prototype=new J();L.prototype.constructor=L;L.superclass=M.prototype;if(M.prototype.constructor==A.constructor){M.prototype.constructor=M;}if(K){for(I in K){if(B.hasOwnProperty(K,I)){L.prototype[I]=K[I];}}B._IEEnumFix(L.prototype,K);}},augmentObject:function(M,L){if(!L||!M){throw new Error("Absorb failed, verify dependencies.");}var I=arguments,K,N,J=I[2];if(J&&J!==true){for(K=2;K<I.length;K=K+1){M[I[K]]=L[I[K]];}}else{for(N in L){if(J||!(N in M)){M[N]=L[N];}}B._IEEnumFix(M,L);}},augmentProto:function(L,K){if(!K||!L){throw new Error("Augment failed, verify dependencies.");}var I=[L.prototype,K.prototype],J;for(J=2;J<arguments.length;J=J+1){I.push(arguments[J]);}B.augmentObject.apply(this,I);},dump:function(I,N){var K,M,P=[],Q="{...}",J="f(){...}",O=", ",L=" => ";if(!B.isObject(I)){return I+"";}else{if(I instanceof Date||("nodeType"in I&&"tagName"in I)){return I;}else{if(B.isFunction(I)){return J;}}}N=(B.isNumber(N))?N:3;if(B.isArray(I)){P.push("[");for(K=0,M=I.length;K<M;K=K+1){if(B.isObject(I[K])){P.push((N>0)?B.dump(I[K],N-1):Q);}else{P.push(I[K]);}P.push(O);}if(P.length>1){P.pop();}P.push("]");}else{P.push("{");for(K in I){if(B.hasOwnProperty(I,K)){P.push(K+L);if(B.isObject(I[K])){P.push((N>0)?B.dump(I[K],N-1):Q);}else{P.push(I[K]);}P.push(O);}}if(P.length>1){P.pop();}P.push("}");}return P.join("");},substitute:function(Y,J,R){var N,M,L,U,V,X,T=[],K,O="dump",S=" ",I="{",W="}",Q,P;for(;;){N=Y.lastIndexOf(I);if(N<0){break;}M=Y.indexOf(W,N);if(N+1>=M){break;}K=Y.substring(N+1,M);U=K;X=null;L=U.indexOf(S);if(L>-1){X=U.substring(L+1);U=U.substring(0,L);}V=J[U];if(R){V=R(U,V,X);}if(B.isObject(V)){if(B.isArray(V)){V=B.dump(V,parseInt(X,10));}else{X=X||"";Q=X.indexOf(O);if(Q>-1){X=X.substring(4);}P=V.toString();if(P===G||Q>-1){V=B.dump(V,parseInt(X,10));}else{V=P;}}}else{if(!B.isString(V)&&!B.isNumber(V)){V="~-"+T.length+"-~";T[T.length]=K;}}Y=Y.substring(0,N)+V+Y.substring(M+1);}for(N=T.length-1;N>=0;N=N-1){Y=Y.replace(new RegExp("~-"+N+"-~"),"{"+T[N]+"}","g");}return Y;},trim:function(I){try{return I.replace(/^\s+|\s+$/g,"");}catch(J){return I;}},merge:function(){var L={},J=arguments,I=J.length,K;for(K=0;K<I;K=K+1){B.augmentObject(L,J[K],true);}return L;},later:function(P,J,Q,L,M){P=P||0;J=J||{};var K=Q,O=L,N,I;if(B.isString(Q)){K=J[Q];}if(!K){throw new TypeError("method undefined");}if(O&&!B.isArray(O)){O=[L];}N=function(){K.apply(J,O||E);};I=(M)?setInterval(N,P):setTimeout(N,P);return{interval:M,cancel:function(){if(this.interval){clearInterval(I);}else{clearTimeout(I);}}};},isValue:function(I){return(B.isObject(I)||B.isString(I)||B.isNumber(I)||B.isBoolean(I));}};B.hasOwnProperty=(A.hasOwnProperty)?function(I,J){return I&&I.hasOwnProperty(J);}:function(I,J){return!B.isUndefined(I[J])&&I.constructor.prototype[J]!==I[J];};D.augmentObject(B,D,true);YAHOO.util.Lang=B;B.augment=B.augmentProto;YAHOO.augment=B.augmentProto;YAHOO.extend=B.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.8.2",build:"19"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||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="ownerDocument",n="defaultView",v="documentElement",t="compatMode",b="offsetLeft",P="offsetTop",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":"for","className":g},DOT_ATTRIBUTES:{},get:function(z){var AB,x,AA,y,Y,G;if(z){if(z[l]||z.item){return z;}if(typeof z==="string"){AB=z;z=K.getElementById(z);G=(z)?z.attributes:null;if(z&&G&&G.id&&G.id.value===AB){return z;}else{if(z&&K.all){z=null;x=K.all[AB];for(y=0,Y=x.length;y<Y;++y){if(x[y].id===AB){return x[y];}}}}return z;}if(YAHOO.util.Element&&z instanceof YAHOO.util.Element){z=z.get("element");}if("length"in z){AA=[];for(y=0,Y=z.length;y<Y;++y){AA[AA.length]=E.Dom.get(z[y]);}return AA;}return z;}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: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="cssFloat":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){try{x=G.filters("alpha").opacity;}catch(Y){}}return x/100;case"float":y="styleFloat";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});},_setStyle: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="alpha(opacity="+y*100+")";if(!Y[a]||!Y[a].hasLayout){Y.style.zoom=1;}}break;case"float":x="styleFloat";default: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:function(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.Dom.getDocumentScrollTop(AF);AG=[AB(AA[j]),AB(AA[o])];if(T&&m.ie<8){AE=2;AD=2;AC=AF[t];if(m.ie===6){if(AC!==c){AE=0;AD=0;}}if((AC===c)){G=S(AF[v],q);x=S(AF[v],R);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(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.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){var 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.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=[parseInt(E.Dom.getComputedStyle(G,j),10),parseInt(E.Dom.getComputedStyle(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(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,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,noRetry: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;if(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();},getElementsByClassName:function(AB,AF,AC,AE,x,AD){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.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._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: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);},_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.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{}return Y;},replaceClass:function(x,Y,G){return E.Dom.batch(x,E.Dom._replaceClass,{from:Y,to:G});},_replaceClass:function(y,x){var Y,AB,AA,G=false,z;if(y&&x){AB=x.from;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";var Y=function(y){if(y&&y.id){return y.id;}var z=x+YAHOO.env._id_counter++;if(y){if(y[e]&&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.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.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(AF);for(var z=0,AA=G.length;z<AA;++z){if(Y(G[z])){if(AE){x=G[z];break;}else{x[x.length]=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,AB,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;},getDocumentHeight: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());return 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: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){while((G=G[Z])){if(E.Dom._testElement(G,Y)){return G;}}return null;},getAncestorByClassName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null;}var x=function(y){return 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);},getPreviousSiblingBy: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 null;},getNextSibling:function(G){G=E.Dom.get(G);if(!G){return null;}return E.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,x){var Y=(E.Dom._testElement(G.firstChild,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.getFirstChildBy(G);},getLastChildBy: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);},getLastChild:function(G){G=E.Dom.get(G);return E.Dom.getLastChildBy(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 false;});return G;},getChildren:function(G){G=E.Dom.get(G);if(!G){}return E.Dom.getChildrenBy(G);},getDocumentScrollLeft: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){return G[Z].insertBefore(Y,G.nextSibling);}else{return G[Z].appendChild(Y);}},getClientRegion:function(){var x=E.Dom.getDocumentScrollTop(),Y=E.Dom.getDocumentScrollLeft(),y=E.Dom.getViewportWidth()+Y,G=E.Dom.getViewportHeight()+x;return new E.Region(x,y,G,Y);},setAttribute:function(Y,G,x){E.Dom.batch(Y,E.Dom._setAttribute,{attr:G,val:x});},_setAttribute:function(x,Y){var G=E.Dom._toCamel(Y.attr),y=Y.val;if(x&&x.setAttribute){if(E.Dom.DOT_ATTRIBUTES[G]){x[G]=y;}else{G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;x.setAttribute(G,y);}}else{}},getAttribute:function(Y,G){return E.Dom.batch(Y,E.Dom._getAttribute,G);},_getAttribute:function(Y,G){var x;G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;if(Y&&Y.getAttribute){x=Y.getAttribute(G,2);}else{}return x;},_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!==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 RegExp(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=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]=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;};}if(m.ie&&m.ie>=8&&K.documentElement.hasAttribute){E.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.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;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top),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.bottom,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+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D),C=F[1],E=F[0]+D.offsetWidth,A=F[1]+D.offsetHeight,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.constructor.call(this,B,A,B,A);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){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="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|deg|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.ComputedStyle.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;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.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;},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);}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.getMargin;C.visibility=M.getVisibility;C.borderColor=C.borderTopColor=C.borderRightColor=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=YAHOO.util;D.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"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.KEYWORDS[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: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();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.8.2",build:"19"});YAHOO.util.CustomEvent=function(D,C,B,A,E){this.type=D;this.scope=C||window;this.silent=B;this.fireOnce=E;this.fired=false;this.firedWith=null;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var F="_YUICEOnSubscribe";if(D!==F){this.subscribeEvent=new YAHOO.util.CustomEvent(F,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(B,C,D){if(!B){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(B,C,D);}var A=new YAHOO.util.Subscriber(B,C,D);if(this.fireOnce&&this.fired){this.notify(A,this.firedWith);}else{this.subscribers.push(A);}},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true;}}return E;},fire:function(){this.lastError=null;var H=[],A=this.subscribers.length;var D=[].slice.call(arguments,0),C=true,F,B=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=D;}}this.fired=true;if(!A&&this.silent){return true;}if(!this.silent){}var E=this.subscribers.slice();for(F=0;F<A;++F){var G=E[F];if(!G){B=true;}else{C=this.notify(G,D);if(false===C){if(!this.silent){}break;}}}return(C!==false);},notify:function(F,C){var B,H=null,E=F.getScope(this.scope),A=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(C.length>0){H=C[0];}try{B=F.fn.call(E,H,F.obj);}catch(G){this.lastError=G;if(A){throw G;}}}else{try{B=F.fn.call(E,this.type,C,F.obj);}catch(D){this.lastError=D;if(A){throw D;}}}return B;},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.splice(A,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(A,B,C){this.fn=A;this.obj=YAHOO.lang.isUndefined(B)?null:B;this.overrideContext=C;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var G=false,H=[],J=[],A=0,E=[],B=0,C={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},D=YAHOO.env.ua.ie,F="focusin",I="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:D,_interval:null,_dri:null,_specialTypes:{focusin:(D?"focusin":"focus"),focusout:(D?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(Q,M,O,P,N){var K=(YAHOO.lang.isString(Q))?[Q]:Q;for(var L=0;L<K.length;L=L+1){E.push({id:K[L],fn:M,obj:O,overrideContext:P,checkReady:N});}A=this.POLL_RETRYS;this.startInterval();},onContentReady:function(N,K,L,M){this.onAvailable(N,K,L,M,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(M,K,V,P,T,Y){if(!V||!V.call){return false;}if(this._isValidCollection(M)){var W=true;for(var Q=0,S=M.length;Q<S;++Q){W=this.on(M[Q],K,V,P,T)&&W;}return W;}else{if(YAHOO.lang.isString(M)){var O=this.getEl(M);if(O){M=O;}else{this.onAvailable(M,function(){YAHOO.util.Event._addListener(M,K,V,P,T,Y);});return true;}}}if(!M){return false;}if("unload"==K&&P!==this){J[J.length]=[M,K,V,P,T];return true;}var L=M;if(T){if(T===true){L=P;}else{L=T;}}var N=function(Z){return V.call(L,YAHOO.util.Event.getEvent(Z,M),P);};var X=[M,K,V,N,L,P,T,Y];var R=H.length;H[R]=X;try{this._simpleAdd(M,K,N,Y);}catch(U){this.lastError=U;this.removeListener(M,K,V);return false;}return true;},_getType:function(K){return this._specialTypes[K]||K;},addListener:function(M,P,L,N,O){var K=((P==F||P==I)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(M,this._getType(P),L,N,O,K);},addFocusListener:function(L,K,M,N){return this.on(L,F,K,M,N);},removeFocusListener:function(L,K){return this.removeListener(L,F,K);},addBlurListener:function(L,K,M,N){return this.on(L,I,K,M,N);},removeBlurListener:function(L,K){return this.removeListener(L,I,K);},removeListener:function(L,K,R){var M,P,U;K=this._getType(K);if(typeof L=="string"){L=this.getEl(L);}else{if(this._isValidCollection(L)){var S=true;for(M=L.length-1;M>-1;M--){S=(this.removeListener(L[M],K,R)&&S);}return S;}}if(!R||!R.call){return this.purgeElement(L,false,K);}if("unload"==K){for(M=J.length-1;M>-1;M--){U=J[M];if(U&&U[0]==L&&U[1]==K&&U[2]==R){J.splice(M,1);return true;}}return false;}var N=null;var O=arguments[3];if("undefined"===typeof O){O=this._getCacheIndex(H,L,K,R);}if(O>=0){N=H[O];}if(!L||!N){return false;}var T=N[this.CAPTURE]===true?true:false;try{this._simpleRemove(L,K,N[this.WFN],T);}catch(Q){this.lastError=Q;return false;}delete H[O][this.WFN];delete H[O][this.FN];H.splice(O,1);return true;},getTarget:function(M,L){var K=M.target||M.srcElement;return this.resolveTextNode(K);},resolveTextNode:function(L){try{if(L&&3==L.nodeType){return L.parentNode;}}catch(K){}return L;},getPageX:function(L){var K=L.pageX;if(!K&&0!==K){K=L.clientX||0;if(this.isIE){K+=this._getScrollLeft();}}return K;},getPageY:function(K){var L=K.pageY;if(!L&&0!==L){L=K.clientY||0;if(this.isIE){L+=this._getScrollTop();}}return L;},getXY:function(K){return[this.getPageX(K),this.getPageY(K)];},getRelatedTarget:function(L){var K=L.relatedTarget;if(!K){if(L.type=="mouseout"){K=L.toElement;}else{if(L.type=="mouseover"){K=L.fromElement;}}}return this.resolveTextNode(K);},getTime:function(M){if(!M.time){var L=new Date().getTime();try{M.time=L;}catch(K){this.lastError=K;return L;}}return M.time;},stopEvent:function(K){this.stopPropagation(K);this.preventDefault(K);},stopPropagation:function(K){if(K.stopPropagation){K.stopPropagation();}else{K.cancelBubble=true;}},preventDefault:function(K){if(K.preventDefault){K.preventDefault();}else{K.returnValue=false;}},getEvent:function(M,K){var L=M||window.event;if(!L){var N=this.getEvent.caller;while(N){L=N.arguments[0];if(L&&Event==L.constructor){break;}N=N.caller;}}return L;},getCharCode:function(L){var K=L.keyCode||L.charCode||0;if(YAHOO.env.ua.webkit&&(K in C)){K=C[K];}return K;},_getCacheIndex:function(M,P,Q,O){for(var N=0,L=M.length;N<L;N=N+1){var K=M[N];if(K&&K[this.FN]==O&&K[this.EL]==P&&K[this.TYPE]==Q){return N;}}return-1;},generateId:function(K){var L=K.id;if(!L){L="yuievtautoid-"+B;++B;K.id=L;}return L;},_isValidCollection:function(L){try{return(L&&typeof L!=="string"&&L.length&&!L.tagName&&!L.alert&&typeof L[0]!=="undefined");}catch(K){return false;}},elCache:{},getEl:function(K){return(typeof K==="string")?document.getElementById(K):K;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(L){if(!G){G=true;var K=YAHOO.util.Event;K._ready();K._tryPreloadAttach();}},_ready:function(L){var K=YAHOO.util.Event;if(!K.DOMReady){K.DOMReady=true;K.DOMReadyEvent.fire();K._simpleRemove(document,"DOMContentLoaded",K._ready);}},_tryPreloadAttach:function(){if(E.length===0){A=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var Q=!G;if(!Q){Q=(A>0&&E.length>0);}var P=[];var R=function(T,U){var S=T;if(U.overrideContext){if(U.overrideContext===true){S=U.obj;}else{S=U.overrideContext;}}U.fn.call(S,U.obj);};var L,K,O,N,M=[];for(L=0,K=E.length;L<K;L=L+1){O=E[L];if(O){N=this.getEl(O.id);if(N){if(O.checkReady){if(G||N.nextSibling||!Q){M.push(O);E[L]=null;}}else{R(N,O);E[L]=null;}}else{P.push(O);}}}for(L=0,K=M.length;L<K;L=L+1){O=M[L];R(this.getEl(O.id),O);}A--;if(Q){for(L=E.length-1;L>-1;L--){O=E[L];if(!O||!O.id){E.splice(L,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(O,P,R){var M=(YAHOO.lang.isString(O))?this.getEl(O):O;var Q=this.getListeners(M,R),N,K;if(Q){for(N=Q.length-1;N>-1;N--){var L=Q[N];this.removeListener(M,L.type,L.fn);}}if(P&&M&&M.childNodes){for(N=0,K=M.childNodes.length;N<K;++N){this.purgeElement(M.childNodes[N],P,R);}}},getListeners:function(M,K){var P=[],L;if(!K){L=[H,J];}else{if(K==="unload"){L=[J];}else{K=this._getType(K);L=[H];}}var R=(YAHOO.lang.isString(M))?this.getEl(M):M;for(var O=0;O<L.length;O=O+1){var T=L[O];if(T){for(var Q=0,S=T.length;Q<S;++Q){var N=T[Q];if(N&&N[this.EL]===R&&(!K||K===N[this.TYPE])){P.push({type:N[this.TYPE],fn:N[this.FN],obj:N[this.OBJ],adjust:N[this.OVERRIDE],scope:N[this.ADJ_SCOPE],index:Q});}}}}return(P.length)?P:null;},_unload:function(R){var L=YAHOO.util.Event,O,N,M,Q,P,S=J.slice(),K;for(O=0,Q=J.length;O<Q;++O){M=S[O];if(M){K=window;if(M[L.ADJ_SCOPE]){if(M[L.ADJ_SCOPE]===true){K=M[L.UNLOAD_OBJ];}else{K=M[L.ADJ_SCOPE];}}M[L.FN].call(K,L.getEvent(R,M[L.EL]),M[L.UNLOAD_OBJ]);S[O]=null;}}M=null;K=null;J=null;if(H){for(N=H.length-1;N>-1;N--){M=H[N];if(M){L.removeListener(M[L.EL],M[L.TYPE],M[L.FN],N);}}M=null;}L._simpleRemove(window,"unload",L._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var K=document.documentElement,L=document.body;if(K&&(K.scrollTop||K.scrollLeft)){return[K.scrollTop,K.scrollLeft];}else{if(L){return[L.scrollTop,L.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(M,N,L,K){M.addEventListener(N,L,(K));};}else{if(window.attachEvent){return function(M,N,L,K){M.attachEvent("on"+N,L);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(M,N,L,K){M.removeEventListener(N,L,(K));};}else{if(window.detachEvent){return function(L,M,K){L.detachEvent("on"+M,K);};}else{return function(){};}}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;EU.onFocus=EU.addFocusListener;EU.onBlur=EU.addBlurListener;if(EU.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;EU._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var n=document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll("left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null;}catch(ex){}},EU.POLL_INTERVAL);}}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU._dri=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready);}}EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,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(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(B,G){this.__yui_events=this.__yui_events||{};var E=G||{},D=this.__yui_events,F;if(D[B]){}else{F=new YAHOO.util.CustomEvent(B,E.scope||this,E.silent,YAHOO.util.CustomEvent.FLAT,E.fireOnce);D[B]=F;if(E.onSubscribeCallback){F.subscribeEvent.subscribe(E.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var A=this.__yui_subscribers[B];if(A){for(var C=0;C<A.length;++C){F.subscribe(A[C].fn,A[C].obj,A[C].overrideContext);}}}return D[B];},fireEvent:function(B){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[B];if(!D){return null;}var A=[];for(var C=1;C<arguments.length;++C){A.push(arguments[C]);}return D.fire.apply(D,A);},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true;}}return false;}};(function(){var A=YAHOO.util.Event,C=YAHOO.lang;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("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.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);}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.enabled){A.removeListener(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=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.8.2",build:"19"});YAHOO.register("yahoo-dom-event",YAHOO,{version:"2.8.2",build:"19"});var ccms=window.ccms||{};ccms.object=function(o){function F(){}
F.prototype=o;return new F();};ccms.extend=ccms.update=function(destination,source){for(var property in source){if(YAHOO.lang.hasOwnProperty(source,property)){destination[property]=source[property];}}
return destination;};ccms.cloneOf=function(what){var o;if(typeof what.prototype=='undefined'){o={};for(var i in what){o[i]=what[i];}}
else{o=ccms.object(what.prototype);for(var i in what){if(YAHOO.lang.hasOwnProperty(what,i)){o[i]=what[i];}}}
return o;};ccms.namespace=function(name){if(!name||!name.length){return null;}
var parts=name.split(".");var ns=window;for(var i=0;i<parts.length;++i){ns[parts[i]]=ns[parts[i]]||{};ns=ns[parts[i]];}
return ns;};ccms.namespace('ccms.async');ccms.namespace('ccms.config');ccms.namespace('ccms.dom');ccms.namespace('ccms.event');ccms.namespace('ccms.log');ccms.namespace('ccms.css');ccms.namespace('ccms.date');ccms.extend(ccms,(function(){var scripts=[];return{detectScripts:function(evt){var src;var stags=ccms.arrayOf(document.getElementsByTagName('script'));for(var t=0;t<stags.length;++t){if((src=stags[t].getAttribute('src'))&&src.length){scripts[src]=true;}}},addScript:function(url){scripts[url]=true;},require:function(url,callback){var s=false;if(typeof scripts[url]==='undefined'){scripts[url]=true;if(navigator.userAgent.indexOf('MSIE')>0){ccms.require_sync(url);}
else{s=document.createElement('script');s.setAttribute('type','text/javascript');s.setAttribute('src',url);document.getElementsByTagName('head')[0].appendChild(s);}}
if(typeof callback==='function'){if(s){ccms.event.attach(s,'load',function(){callback();});}
else{callback();}}
return scripts[url];},require_sync:function(url){var script=ccms.async.http({url:url});window.eval(script);},browser:{isIE:false,isSafari:navigator.userAgent.match(/safari/gi),isGecko:!navigator.userAgent.match(/safari/gi)&&navigator.userAgent.indexOf('Gecko')>0},push:function(a,value){a[a.length]=value;},indexOf:function(a,item){for(var i=0;i<a.length;++i){if(a[i]===item){return i;}}
return-1;},filter:function(a,callback){if(!callback){callback=function(e){return e;};}
var out=[];for(var i=0;i<a.length;++i){if(callback(a[i])){out[out.length]=a[i];}}
return out;},map:function(a,callback){if(!callback){callback=function(e){return e;};}
var out=[];for(var i in a){if(YAHOO.lang.hasOwnProperty(a,i)){out[i]=callback(a[i]);}}
return out;},contains:function(a,value){for(var i in a){if(YAHOO.lang.hasOwnProperty(a,i)&&a[i]===value){return true;}}
return false;},containsi:function(a,value){var valuei=value.toLowerCase();for(var i in a){if(YAHOO.lang.hasOwnProperty(a,i)&&(((typeof a[i]==='string')&&(a[i].toLowerCase()===valuei))||(a[i]===value))){return true;}}},remove:function(a,value){for(var i in a){if(YAHOO.lang.hasOwnProperty(a,i)&&a[i]===value){delete a[i];}}
return a;},removei:function(a,value){var valuei=value.toLowerCase();for(var i in a){if(YAHOO.lang.hasOwnProperty(a,i)&&(((typeof a[i]==='string')&&(a[i].toLowerCase()===valuei))||(a[i]===value))){delete a[i];}}
return a;},flip:function(a){var b=[];for(var i in a){if(YAHOO.lang.hasOwnProperty(a,i)){b[a[i]]=i;}}
return b;},shift:function(a){var result=a[0];for(var i=0;i<a.length-1;++i){a[i]=a[i+1];}
--a.length;return result;},keysOf:function(object){var r=[];for(var i in object){if(YAHOO.lang.hasOwnProperty(object,i)){r[r.length]=i;}}
return r;},valuesOf:function(object){var r=[];for(var i in object){if(YAHOO.lang.hasOwnProperty(object,i)){r[r.length]=object[i];}}
return r;},arrayOf:function(iterable){var results=[];if(!iterable){return results;}
if(iterable.toArray){return iterable.toArray();}
else{for(var i=0;i<iterable.length;i++){results[results.length]=iterable[i];}
return results;}},isCollection:function(o){return(o&&o.length&&(typeof o!=="string")&&!o.tagName&&!o.alert&&(typeof o[0]!=="undefined"));},bind:function(obj,method){return function(){var args=arguments;return method.apply(obj,args);};},chain:function(f1,f2){if(f1){if(f2){return function(){f1();return f2();};}
return f1;}
return f2;},html:{isAvailable:false,isWanted:false,use:function(){ccms.html.isAvailable=true;ccms.html.isWanted=true;ccms.html=ccms.DomBuilder.apply(ccms.html);ccms.html.use=function(){};}},widgets:{widgetlist:[],installers:{},add:function(widget,id){if(typeof id!=='string'||id===''){id=ccms.widgets.widgetlist.length;}
if(ccms.widgets.widgetlist[id]){id=ccms.dom.generateId();}
ccms.widgets.widgetlist[id]=widget;},get:function(id){return ccms.widgets.widgetlist[id];},each:function(callback){for(var i in ccms.widgets.widgetlist){if(YAHOO.lang.hasOwnProperty(ccms.widgets.widgetlist,i)){callback(ccms.widgets.widgetlist[i]);}}},addInstaller:function(name,callback,condition){ccms.widgets.installers[name]=callback;if(condition!==false){if(typeof condition==='undefined'){if(ccms.dom.ready){callback();}
else{ccms.event.onDOMReady(function(){callback();});}
return;}
if(!ccms.dom.ready){ccms.event.addLoadEvent(function(){ccms.async.when(condition,callback);});}
else{ccms.async.when(condition,callback);}}},runInstallers:function(block,optional_data){if(typeof block==='undefined'){block=document;}
else if(block.target||block.srcElement){block=document;}
var funx=ccms.widgets.installers;for(var name in funx){if(YAHOO.lang.hasOwnProperty(funx,name)){funx[name](block,optional_data);}}
return block;},addClassInstaller:function(WidgetConstructor,classname,tagname){var name=classname;var i=1;while(name in ccms.widgets.installers){name=classname+(++i);}
ccms.widgets.addInstaller(name,ccms.widgets.installNow.partial(WidgetConstructor,classname,tagname));},installNow:function(WidgetConstructor,classname,tagname,rootelement){if(typeof rootelement==='undefined'&&window.opera){rootelement=document.body;}
var elts=ccms.dom.getElementsByClassName(classname,tagname,rootelement);for(var i=0;i<elts.length;++i){var v=new WidgetConstructor(elts[i]);if(!WidgetConstructor.anonymouswidget){ccms.widgets.add(v,elts[i].id);}}},install:function(WidgetConstructor,classname,tagname,rootelement){ccms.log.debug('Replace Me...  ccms.widgets.install: '+classname+', '+tagname+', '+rootelement);ccms.log.debug(WidgetConstructor);if(typeof rootelement==='undefined'){if(window.opera){rootelement=document.body;}
else{rootelement=document;}}
if(typeof tagname==='undefined'){tagname='*';}
ccms.event.onDOMReady(function(){var elts=ccms.dom.getElementsByClassName(classname,tagname,rootelement);for(var i=0;i<elts.length;++i){var id=elts[i].id;if(id===''){id=ccms.dom.generateId();elts[i].setAttribute('id',id);}
ccms.widgets.add(new WidgetConstructor(elts[i]),id);}});}},repr:function(){var i;var out='';if(arguments.length===1){var a=arguments[0];out+=a+"\r\n";if(typeof a==='object'){for(i in a){if(YAHOO.lang.hasOwnProperty(a,i)){out+=i+": "+a[i]+"\r\n";}}}}
else{for(i in arguments){if(YAHOO.lang.hasOwnProperty(arguments,i)){out+=ccms.repr(arguments[i]);}}}
return out;}};})());ccms.extend(ccms.config,{get:function(name,default_value){return(typeof ccms.config[name]==='undefined')?default_value:ccms.config[name];},set:function(name,value){if(name!=='set'&&name!=='get'){return ccms.config[name]=value;}}});ccms.html.Module=function(options){if(!ccms.html.isAvailable)ccms.html.use();if(typeof options==='undefined')options={};if(typeof options.className==='undefined'){options.className='module';}
else{options.className='module '+options.className;}
if(typeof options.id==='undefined'){options.id=ccms.dom.generateId();}
var module=ccms.html.DIV({'class':options.className,'id':options.id});if(options.header!==false){if(typeof options.css_hd==='undefined'){options.css_hd='header';}
var head=ccms.html.DIV({'class':options.css_hd});head=module.appendChild(head);if(typeof options.header==='string'){head.innerHTML=options.header;}
else if(typeof options.header==='object'){head.appendChild(options.header);}}
if(options.body!==false){if(typeof options.css_bd==='undefined'){options.css_bd='body';}
var body=ccms.html.DIV({'class':options.css_bd});body=module.appendChild(body);if(typeof options.body==='string'){body.innerHTML=options.body;}
else if(typeof options.body==='object'){body.appendChild(options.body);}}
if(options.footer!==false){if(typeof options.css_ft==='undefined'){options.css_ft='footer';}
var foot=ccms.html.DIV({'class':options.css_ft});foot=module.appendChild(foot);if(typeof options.footer==='string'){foot.innerHTML=options.footer;}
else if(typeof options.footer==='object'){foot.appendChild(options.footer);}}
return module;};ccms.html.MessageBox=function(options){if(typeof YAHOO==='object'&&typeof YAHOO.widget==='object'&&typeof YAHOO.widget.SimpleDialog==='function'){var p=ccms.update({width:"300px",fixedcenter:true,visible:false,draggable:true,close:options.close,text:options.body,icon:options.icon,constraintoviewport:true,buttons:[]},options);for(var k in options.buttons){if(YAHOO.lang.hasOwnProperty(options.buttons,k)){var button=options.buttons[k];var callback=null;var isDefault=false;if(button!==null){if(typeof button==='object'){if(YAHOO.lang.hasOwnProperty(button,'onclick')){callback=button.onclick;}
if(YAHOO.lang.hasOwnProperty(button,'isDefault')){isDefault=button.isDefault;}}
else if(typeof button==='function'){callback=button;}}
if(callback===null){callback=function(){this.hide();};}
p.buttons.push({text:k,handler:callback,isDefault:isDefault});}}
var dlg=new YAHOO.widget.SimpleDialog("MessageBox",p);dlg.render('content');return dlg;}
else{ccms.html.MessageBox.close=function(e){this.parentNode.removeChild(this);};ccms.html.MessageBox.show=function(){var parent=document.body;if(typeof this.options.parent!=='undefined'){parent=$(this.options.parent);}
parent.appendChild(this);if(typeof this.options.center==='string'){var w=ccms.dom.getViewportWidth();var h=ccms.dom.getViewportHeight();var box=this;if(this.options.backing){ccms.dom.setXY(this,[0,0]);ccms.dom.setStyle(this,'width',''+w+'px');ccms.dom.setStyle(this,'height',''+h+'px');box=box.firstChild;}
if(this.options.center.indexOf('x')>-1){ccms.dom.setX(box,(w-box.offsetWidth)/2);}
if(this.options.center.indexOf('y')>-1){ccms.dom.setY(box,((h-box.offsetHeight)/2)-64);}
if(this.options.shadow){ccms.dom.setStyle(box,'height',''+box.firstChild.offsetHeight+'px');}}};if(!ccms.html.isAvailable){ccms.html.use();}
if(typeof options==='undefined'){options={};}
if(typeof options.className==='undefined'){options.className='ccmsMessageBox';}
if(typeof options.buttons==='undefined'){options.buttons={'Ok':null};}
var callback;var buttons=[];var ul=ccms.html.UL({'class':'buttons'}),li;for(var k in options.buttons){if(YAHOO.lang.hasOwnProperty(options.buttons,k)){var klass='button';var button=options.buttons[k];callback=null;if(button!==null){if(typeof button==='object'){if(YAHOO.lang.hasOwnProperty(button,'class')){klass+=' '+button['class'];}
if(YAHOO.lang.hasOwnProperty(button,'onclick')){callback=button.onclick;}}
else if(typeof button==='function')
callback=button;}
li=ccms.html.LI({'class':klass},ccms.html.SPAN(k));ul.appendChild(li);buttons.push([li,callback]);}}
options.footer=ccms.html.DIV(ul,ccms.html.DIV({'class':'clear'}));var module=ccms.html.Module(options);if(options.shadow){module=ccms.html.DIV({'class':'ccmsMessageBoxShadow'},module);}
if(options.backing){module=ccms.html.DIV({'class':'ccmsMessageBoxBacking'},module);}
var close=ccms.html.MessageBox.close.bind(module);for(var i=0;i<buttons.length;++i){li=buttons[i][0];callback=buttons[i][1];if(callback===null){callback=close;}
else if(typeof callback==='function'){callback=callback.chain(close);}
ccms.event.attach(li,'click',callback);}
module.show=ccms.html.MessageBox.show.bind(module);module.options=options;return module;}}
ccms.DomBuilder={IE_TRANSLATIONS:{'class':'className','for':'htmlFor'},ieAttrSet:function(a,i,el){var trans;if(trans=this.IE_TRANSLATIONS[i])el[trans]=a[i];else if(i==='style')el.style.cssText=a[i];else if(i.match(/^on/))el[i]=new Function(a[i]);else el.setAttribute(i,a[i]);},apply:function(o){o=o||{};var els=("p|div|span|strong|em|img|table|tr|td|th|thead|tbody|tfoot|pre|code|"+"h1|h2|h3|h4|h5|h6|ul|ol|li|form|input|textarea|legend|fieldset|"+"select|option|blockquote|cite|br|hr|dd|dl|dt|address|a|button|abbr|acronym|"+"script|link|style|bdo|ins|del|object|param|col|colgroup|optgroup|caption|"+"label|dfn|kbd|samp|var").split("|");var el,i=0;while(el=els[i++]){o[el.toUpperCase()]=ccms.DomBuilder.tagFunc(el);}
return o;},tagFunc:function(tag){return function(){var a=arguments,at,ch;a.slice=[].slice;if(a.length>0){if(a[0].nodeName||typeof a[0]==="string")ch=a;else{at=a[0];ch=a.slice(1);}}
return ccms.DomBuilder.elem(tag,at,ch);}},elem:function(e,a,c){a=a||{};c=c||[];var el=document.createElement(e),isIE=navigator.userAgent.match(/MSIE/);for(var i in a){if(typeof a[i]!=='function'){if(isIE)this.ieAttrSet(a,i,el);else el.setAttribute(i,a[i]);}}
for(var i=0;i<c.length;i++){if(typeof c[i]==='string')c[i]=document.createTextNode(c[i]);el.appendChild(c[i]);}
return el;}}
ccms.extend(ccms.log,(function(){var responders={};return{debugging:false,levels:{FATAL:50,ERROR:40,WARNING:30,INFO:20,DEBUG:10},output:function(){var args=ccms.arrayOf(arguments);var level=ccms.shift(args);if(typeof(responders[level])==='function'){responders[level].apply(this,args);}},setup:function(){for(var id in this.levels){var level=this.levels[id];responders[level]=this._debug;this[id.toLowerCase()]=this.output.partial(level);}},addListener:function(level,responder){responders[level]=responder;},_debug:function(){if(this.debugging){var body=document.getElementsByTagName('body');if(body.length){body=body[0];}
else{if(typeof console!=='undefined'&&console.debug){console.debug('%o',arguments);}
else if(typeof opera!=='undefined'&&opera.postError){opera.postError(ccms.repr(arguments));}
else{alert(ccms.repr(arguments));}
return;}
if(!this._debug.output){this._debug.output=document.createElement('pre');this._debug.output.className='debugoutput';body.appendChild(this._debug.output);}
this._debug.output.innerHTML+=this.stringify.apply(this,arguments);}},stringify:function(){var s='';for(var i=0;i<arguments.length;++i){if(typeof arguments[i]==='object'){s+=ccms.repr(arguments[i])+"\r\n";}
else{s+=arguments[i]+"\n";}}
return s;}};})());function intval(value){value=parseInt(value,10);if(isNaN(value)){value=0;}
return value;}
function floatval(value){value=parseFloat(value);if(isNaN(value)){value=0.0;}
return value;}
Function.prototype.method=function(name,fn){this.prototype[name]=fn;return this;};if(!Array.prototype.forEach){Array.method('forEach',function(fn,thisObj){var scope=thisObj||window;for(var i=0,j=this.length;i<j;++i){fn.call(scope,this[i],i,this);}}).method('every',function(fn,thisObj){var scope=thisObj||window;for(var i=0,j=this.length;i<j;++i){if(!fn.call(scope,this[i],i,this)){return false;}}
return true;}).method('some',function(fn,thisObj){var scope=thisObj||window;for(var i=0,j=this.length;i<j;++i){if(fn.call(scope,this[i],i,this)){return true;}}
return false;}).method('map',function(fn,thisObj){var scope=thisObj||window;var a=[];for(var i=0,j=this.length;i<j;++i){a.push(fn.call(scope,this[i],i,this));}
return a;}).method('filter',function(fn,thisObj){var scope=thisObj||window;var a=[];for(var i=0,j=this.length;i<j;++i){if(!fn.call(scope,this[i],i,this)){continue;}
a.push(this[i]);}
return a;}).method('indexOf',function(el,start){var start=start||0;for(var i=start,j=this.length;i<j;++i){if(this[i]===el){return i;}}
return-1;}).method('lastIndexOf',function(el,start){var start=start||this.length;if(start>=this.length){start=this.length;}
if(start<0){start=this.length+start;}
for(var i=start;i>=0;--i){if(this[i]===el){return i;}}
return-1;});}
Array.prototype.foreach=Array.prototype.forEach;if(!Array.prototype.reduce){Array.method('reduce',function(fn,initial){var i=0,r=initial;if(typeof initial==='undefined')r=this[i++];while(i<this.length){r=fn(r,this[i++]);}
return r;});}
if(!Array.prototype.findBy){Array.method('findBy',function(fn,start){var start=start||0;for(var i=start,j=this.length;i<j;++i){if(fn(this[i])){return i;}}
return-1;});}
String.prototype.startswith=function(text){return this.substring(0,text.length)===text;};String.prototype.endswith=function(text){return this.substring(this.length-text.length)===text;};String.prototype.trim=function(chars){if(typeof chars==='undefined')
chars='\\s';return this.ltrim(chars).rtrim(chars);};String.prototype.ltrim=function(chars){if(typeof chars==='undefined')
chars='\\s';var rx=new RegExp('^['+chars+']*(.*?)$');return this.replace(rx,'$1');};String.prototype.rtrim=function(chars){if(typeof chars==='undefined')
chars='\\s';var rx=new RegExp('^(.*?)['+chars+']*$');return this.replace(rx,'$1');};String.prototype.stripTags=function(){return this.replace(/<\/?[^>]+>/gi,'');};String.prototype.escapeHTML=function(){var div=document.createElement('div');var text=document.createTextNode(this);div.appendChild(text);return div.innerHTML;};String.prototype.unescapeHTML=function(){var div=document.createElement('div');div.innerHTML=this.stripTags();return div.childNodes[0]?div.childNodes[0].nodeValue:'';};String.prototype.parseJSON=function(){if(JSON)return JSON.parse(this);return eval('('+this+')');};Function.prototype.bind=function(){var __method=this;var args=ccms.arrayOf(arguments);var object=ccms.shift(args);return function(){return __method.apply(object,args.concat(ccms.arrayOf(arguments)));}}
Function.prototype.partial=function(){var __method=this;var args=ccms.arrayOf(arguments);return function(){return __method.apply(this,args.concat(ccms.arrayOf(arguments)));}}
Function.prototype.rpartial=function(){var __method=this;var args=ccms.arrayOf(arguments);return function(){return __method.apply(this,ccms.arrayOf(arguments).concat(args));}}
Function.prototype.chain=function(){var __method=this;var funcs=ccms.arrayOf(arguments);funcs.unshift(__method);return function(){var rv;var args=ccms.arrayOf(arguments);for(var i=0;i<funcs.length;++i){rv=funcs[i].apply(this,args);if(false===rv)return false;}
return rv;}}
function actsAsAspect(object){object.yield=null;object.rv={};object.before=function(method,f){var original=eval("this."+method);this[method]=function(){f.apply(this,arguments);return original.apply(this,arguments);};};object.after=function(method,f){var original=eval("this."+method);this[method]=function(){this.rv[method]=original.apply(this,arguments);return f.apply(this,arguments);}};object.around=function(method,f){var original=eval("this."+method);this[method]=function(){this.yield=original;return f.apply(this,arguments);}};return object;}
String.prototype.camelize=function(){var oStringList=this.split('-');if(oStringList.length===1)return oStringList[0];var camelizedString=this.indexOf('-')===0?oStringList[0].charAt(0).toUpperCase()+oStringList[0].substring(1):oStringList[0];for(var i=1,len=oStringList.length;i<len;i++){var s=oStringList[i];camelizedString+=s.charAt(0).toUpperCase()+s.substring(1);}
return camelizedString;};ccms.URL=function(url){this._fields={'username':4,'password':5,'port':7,'protocol':2,'scheme':2,'host':6,'path':8,'url':0,'query':9,'fragment':10};this._regex=/^((\w+):\/\/)?((\w+):?(\w+)?@)?([^\/\?:]+):?(\d+)?(\/?[^\?#]+)?\??([^#]+)?#?(\w*)/;if(typeof url!=='undefined')
this.parse(url);}
ccms.URL.prototype.parse=function(url){var r=this._regex.exec(url);if(!r)throw"ccms.URL::parse -> Invalid URL";for(var f in this._fields){if(typeof r[this._fields[f]]==='undefined')this[f]='';else this[f]=r[this._fields[f]];}
this.parseQuery(this.query);}
ccms.URL.prototype.parseQuery=function(qs){this.query={};var params=qs.split('&');for(var i=0;i<params.length;++i){if(params[i].length){var kv=params[i].split("=");if(kv.length)this.query[kv[0]]=kv[1];}}}
ccms.URL.prototype.appendPath=function(path){this.path=this.path.rtrim('/')+'/'+path.ltrim('/');return this.path;}
ccms.URL.prototype.prependPath=function(path){this.path='/'+path.trim('/')+'/'+this.path.ltrim('/');return this.path;}
ccms.URL.prototype.pop=function(){this.path=this.path.replace(/\/[^\/]+\/?$/,'');}
ccms.URL.prototype.localURL=function(){var s='';if(this.path)s+=this.path;if(ccms.keysOf(this.query).length>0)s+='?'+urlencode(this.query);if(this.fragment!=='')s+='#'+this.fragment;return s;}
ccms.URL.prototype.toString=function(){var s='';if(this.protocol)s+=this.protocol+'://';if(this.username||this.password)s+=this.username+':'+this.password+'@';if(this.host)s+=this.host;if(this.port)s+=':'+this.port;return s+this.localURL();}
ccms.URL.open=function(url,new_window){if(typeof new_window==='undefined')new_window=false;if(typeof url==='object')url=url.toString();if(!url.match(/^(\w+:\/\/|[\/\.])/))url='http://'+url;if(new_window)return window.open(url);document.location.href=url;}
ccms.URL.stripHost=function(url){return url.replace(/^(\w+:\/\/[^\/]+)(.+)$/,'$2');}
function urlencode(){var output=[];for(var i=0;i<arguments.length;++i){var arg=arguments[i];if(typeof arg==='object'){for(var j in arg){if(YAHOO.lang.hasOwnProperty(arg,j)){if(typeof arg[j]==='object'){for(var k in arg[j]){if(YAHOO.lang.hasOwnProperty(arg[j],k)){output[output.length]=encodeURIComponent(j)+'='+encodeURIComponent(arg[j][k]);}}}
else{output[output.length]=encodeURIComponent(j)+'='+encodeURIComponent(arg[j]);}}}}
else{output[output.length]=encodeURIComponent(arg)}}
return output.join('&');}
function ccmsQS(args){return'?'+urlencode(args);}
function ccmsQSAppend(url,args){return url+(url.indexOf('?')>0?'&':'?')+urlencode(args);}
function ccmsFormData(formId,return_these_too){var oForm=$(formId);if(!oForm)return false;var oElement,oName,oValue,oDisabled;var hasSubmit=false;var out;if(typeof return_these_too==='undefined')out={};else out=ccms.cloneOf(return_these_too);for(var i=0;i<oForm.elements.length;i++){oDisabled=oForm.elements[i].disabled;if(oForm.elements[i].name!==''){oElement=oForm.elements[i];oName=oForm.elements[i].name;oValue=oForm.elements[i].value;}
if(!oDisabled)
{switch(oElement.type)
{case'select-one':for(var j=0;j<oElement.options.length;j++){if(oElement.options[j].selected){out[oName]=oElement.options[j].value;break;}}
break;case'select-multiple':for(var j=0;j<oElement.options.length;j++){if(oElement.options[j].selected){if(typeof out[oName]==='undefined')out[oName]=[];out[oName][out[oName].length]=oElement.options[j].value;}}
break;case'radio':case'checkbox':if(oElement.checked){out[oName]=oValue;}
break;case'file':case undefined:case'reset':case'button':break;case'submit':if(hasSubmit===false){hasSubmit=true;out[oName]=oValue;}
break;default:if(oName.substring(oName.length-2)==='[]'){if(typeof out[oName]==='undefined')out[oName]=[];out[oName][out[oName].length]=oValue;}
else
out[oName]=oValue;break;}}}
return out;}
ccms.async.when=function(condition,callback,timeout){return new ccms.async.Poller(condition,callback,timeout);}
ccms.async.Poller=ccmsWaiter=function(condition,callback,timeout){timeout=timeout||500;var interval=false;function test(){if(condition()){window.clearInterval(interval);interval=false;callback();}}
self.start=function(){if(interval===false)
interval=window.setInterval(test,timeout);}
self.cancel=function(){if(interval!==false){window.clearInterval(interval);interval=false;}}
self.start();}
ccms.extend(ccms.async,{getXMLHttpRequest:function(){var self=arguments.callee;if(!self.XMLHttpRequest){var tryThese=[function(){return new XMLHttpRequest();},function(){return new ActiveXObject('Msxml2.XMLHTTP.6.0');},function(){return new ActiveXObject('Msxml2.XMLHTTP');},function(){return new ActiveXObject('Microsoft.XMLHTTP');},function(){return new ActiveXObject('Msxml2.XMLHTTP.4.0');},function(){throw new Exception("Browser does not support XMLHttpRequest");}];for(var i=0;i<tryThese.length;i++){var func=tryThese[i];try{self.XMLHttpRequest=func;return func();}catch(e){}}}
return self.XMLHttpRequest();},CachingXMLHttpRequest:function(){return new ccms.async._CachingXMLHttpRequest();},http:function(args){var settings=ccms.extend({method:'GET',async:(args.onSuccess?true:false),onFailure:ccms.async.onHTTPError},args);settings.cancelled=false;settings.cancel=function(){settings.cancelled=true;};settings.method=settings.method.toUpperCase();var http;if(typeof settings.HttpFactory==='function')http=settings.HttpFactory();else http=this.getXMLHttpRequest();var postdata=null;var p;if((p=settings.url.indexOf('#'))!==-1){settings.url=settings.url.substring(0,p);}
if(settings.parameters){if(settings.method==='POST'){postdata=urlencode(settings.parameters);}
else if(settings.method==='GET'||settings.method==='HEAD'){settings.url+=(settings.url.indexOf('?')>0?'&':'?')+urlencode(settings.parameters);}}
if(settings.method==='GET'&&settings.url.length>2048){settings.method='POST';if(typeof settings.HttpFactory==='function')
http=this.getXMLHttpRequest();p=settings.url.indexOf('?');postdata=urlencode({'X-CCMS-TUNNELLED-GET':settings.url.substring(p+1)});http.open(settings.method,settings.url.substring(0,p),settings.async);}
else{http.open(settings.method,settings.url,settings.async);}
if(postdata){http.setRequestHeader('Content-Type','application/x-www-form-urlencoded');}
http.send(postdata);if(settings.async){http.onreadystatechange=function(){if(settings.cancelled){try{http.onreadystatechange=null;}catch(e){;}
return;}
if(http.readyState===4){if(http.status===200||http.status===304){if(settings.onSuccess){if(settings.parseJSON)settings.onSuccess(http.responseText.parseJSON());else settings.onSuccess(http);}}
else{if(settings.onFailure)
settings.onFailure(http);}
try{http.onreadystatechange=null;}catch(e){;}}}}
else{return http.responseText;}
return settings;},submitForm:function(formid,args){var oForm=$(formid);if(typeof args==='undefined')args={};if(typeof args.parameters==='object')
args.parameters=ccms.extend(args.parameters,ccmsFormData(oForm));else
args.parameters=ccmsFormData(oForm);ccms.extend(args,{'url':oForm.action,'method':oForm.method});ccms.async.http(args);},onHTTPError:function(req){ccms.log.debug('HTTP Error: '+req.status+' '+req.statusText+"\n"+req.responseText);},after:function(timeout,callback){return setTimeout(callback,timeout);},cancelTimeout:function(timeout_id){return clearTimeout(timeout_id);},_cache:{},_CachingXMLHttpRequest:function(){var http=null,cache=null,asynchronous=false,key;var self=this;this.onreadystatechange=null;this.open=function(method,url,async){asynchronous=async;key=null;if(method==='GET'){key=method+url+async;if(typeof ccms.async._cache[key]==='object'){cache=ccms.async._cache[key];if(typeof console==='object'&&typeof console.log==='function'){if(typeof console.group==='function')console.group("GET (ccms cached) "+url);console.log(cache);if(typeof console.groupEnd==='function')console.groupEnd();}
return;}}
if(false){url=ccmsQSAppend(url,{'cachebust':(new Date()).getTime()});}
http=ccms.async.getXMLHttpRequest();http.open(method,url,async);};this.send=function(data){if(cache===null){if(asynchronous){http.onreadystatechange=_onreadystatechange.bind(this);http.send(data);}
else{cache=http.send(data);ccms.async._cache[key]=cache;return cache;}}
else if(asynchronous){ccms.async.after(1,_cached_onreadystatechange.bind(this));}
else{return cache;}}
function _cached_onreadystatechange(){ccms.extend(self,cache);self.onreadystatechange(cache);}
function _onreadystatechange(){if(http.readyState===4&&http.status===200){try{http.onreadystatechange=null;}
catch(e){;}
cache={status:http.status,statusText:http.statusText,readyState:http.readyState,responseText:http.responseText};ccms.extend(self,cache);ccms.async._cache[key]=cache;self.onreadystatechange(cache);}
else if(self.onreadystatechange!==null){self.onreadystatechange(http);}}}});ccms.async.jsr=(function(){var count=0;var head=document.getElementsByTagName("head").item(0);return{callbacks:{},create_cb:function(onSuccess){var c=count;this.callbacks[count]=function(json){var s=$("ccmsjsr"+c);s.parentNode.removeChild(s);delete ccms.async.jsr.callbacks[c];return onSuccess(json);}
return this.callbacks[count];},call:function(settings){if(settings.parameters){settings.url+=(settings.url.indexOf('?')>0?'&':'?')+urlencode(settings.parameters);}
this.create_cb(settings.onSuccess);settings.url+=(settings.url.indexOf('?')>0?'&':'?')+urlencode({callback:'ccms.async.jsr.callbacks['+count+']'})+'&noCacheIE='+(new Date()).getTime();var scriptObj=document.createElement("script");scriptObj.setAttribute("type","text/javascript");scriptObj.setAttribute("src",settings.url);scriptObj.setAttribute("id","ccmsjsr"+count);head.appendChild(scriptObj);++count;if(typeof console!=='undefined'&&typeof console.log==='function')console.log(settings.url);}};})();ccms.async.processJSON=function(json){ccms.ApiLinks.addMany(json.links);if(typeof json.js!=='undefined'){json.js.foreach(ccms.require);}};ccms.async.trapMultipleSubmits=function(root_element){ccms.event.attach(root_element,'click',function(e){var target=ccms.event.getTarget(e);if(target.type==='submit'){ccms.dom.getElementsBy(function(node){return node.type==='submit'&&node.name!==target.name;},'input',root_element).foreach(function(node){node.value='';node.name='';});}});};if(typeof(YAHOO)==='undefined'){var _script=ccms.async.http({url:'/js/3rdparty/yui/yahoo/yahoo-min.js'});eval(_script);}
if(typeof YAHOO.util.Event==='undefined'){var _script=ccms.async.http({url:'/js/3rdparty/yui/event/event-min.js'});eval(_script);}
if(typeof YAHOO.util.Dom==='undefined'){var _script=ccms.async.http({url:'/js/3rdparty/yui/dom/dom-min.js'});eval(_script);}
if(typeof YAHOO!=='undefined'&&typeof YAHOO.util!=='undefined'){if(typeof YAHOO.util.Event!=='undefined'){ccms.event=YAHOO.util.Event;ccms.event.CustomEvent=YAHOO.util.CustomEvent;ccms.event.addLoadEvent=function(handler,oScope,bOverride){return YAHOO.util.Event.addListener(window,'load',handler,oScope,bOverride);};ccms.event.attach=ccms.event.addListener;ccms.event.detach=ccms.event.removeListener;ccms.event.killEvent=function(e){ccms.event.stopEvent(e);return false;}
ccms.event.YAHOO_onDOMReady=ccms.event.onDOMReady;ccms.event.onDOMReady=function(callback,data,scope){return YAHOO.util.Event.YAHOO_onDOMReady(function(){try{callback.apply(this,arguments);}
catch(ex){if(typeof console==='object'&&typeof console.error==='function'){console.error(ex);}
else ccms.debug.error(ex);throw ex;}},data,scope);}}
else{document.write('<b>ccms.event unavailable, because the YAHOO Event library has not been included before ccms.js</b>');}
if(typeof YAHOO.util.Dom!=='undefined'){ccms.dom=YAHOO.util.Dom;}}
else{document.write('<b>ccms.dom and ccms.event unavailable, because the YAHOO libraries have not been included</b>');}
ccms.events=(function(){var events={};var subs={};return{subscribe:function(p_type,p_fn,p_obj,p_override){var ce=events[p_type];if(ce){ce.subscribe(p_fn,p_obj,p_override);}
else{if(!subs[p_type]){subs[p_type]=[];}
subs[p_type].push({fn:p_fn,obj:p_obj,override:p_override});}},unsubscribe:function(p_type,p_fn,p_obj){var ce=events[p_type];if(ce){return ce.unsubscribe(p_fn,p_obj);}
else{return false;}},add:function(p_type,p_config){var opts=p_config||{};if(events[p_type]){;}
else{var scope=opts.scope||this;var silent=opts.silent||null;var ce=new ccms.event.CustomEvent(p_type,scope,silent);events[p_type]=ce;if(opts.onSubscribeCallback){ce.subscribeEvent.subscribe(opts.onSubscribeCallback);}
var qs=subs[p_type];if(qs){for(var i=0;i<qs.length;++i){ce.subscribe(qs[i].fn,qs[i].obj,qs[i].override);}}}
return events[p_type];},fire:function(p_type,arg1,arg2,etc){var ce=events[p_type];if(ce){var args=[];for(var i=1;i<arguments.length;++i){args.push(arguments[i]);}
return ce.fire.apply(ce,args);}
else{return null;}}}})();function $(){var elements=[];for(var i=0;i<arguments.length;i++){var element=arguments[i];if(typeof element==='string')
element=document.getElementById(element);if(arguments.length===1)
return element;elements[elements.length]=element;}
return elements;};if(!window.Node||!window.Node.ELEMENT_NODE){var Node={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12};}
ccms.extend(ccms.dom,{toggle:function(e,style){if(typeof e==='string')
e=$(e);if(e.style.display!=='none'){e.style.display='none';}
else if(style)e.style.display=style;else{e.style.display='';}},isHidden:function(e){if(typeof e==='string')e=$(e);return(e.style.display==='none');},hide:function(e){if(typeof e==='string')
e=$(e);e.style.display='none';},show:function(e,style){if(typeof e==='string')
e=$(e);if(style)e.style.display=style;else e.style.display='';},refresh:function(e){if(typeof e==='undefined')
e=document.body;else if(typeof e==='string')
e=$(e);ccms.dom.hide(e);ccms.dom.show(e);},isVisible:function(el,root){if(typeof root=='undefined')root=document.body;while(el&&el!==root){if(ccms.dom.getStyle(el,'display')=='none'||ccms.dom.getStyle(el,'visibility')=='hidden'){return false;}
el=el.parentNode;}
return true;},swapNode:function(n1,n2){if(n1.swapNode){n1.swapNode(n2);}
else{var p=n2.parentNode;var s=n2.nextSibling;if(s==n1){p.insertBefore(n1,n2);}
else if(n2==n1.nextSibling){p.insertBefore(n2,n1);}
else{n1.parentNode.replaceChild(n2,n1);p.insertBefore(n1,s);}}},insertAfter:function(nInsert,nPrevious){var nParent=nPrevious.parentNode;if(nPrevious.nextSibling){nInsert=nParent.insertBefore(nInsert,nPrevious.nextSibling)}
else{nInsert=nParent.appendChild(nInsert);}
return nInsert;},getParentByClassName:function(oElm,strTagName,strClassName){var tf=ccms.dom.hasTagName.rpartial(strTagName.toLowerCase());var f;if(typeof strClassName==='string'){var cf=ccms.dom.hasClass.rpartial(strClassName);f=function(n){return tf(n)&&cf(n);};}
else{f=function(n){return tf(n);};}
return ccms.dom.getAncestor(oElm,f);},getSelfOrAncestorBy:function(callback,node){while(node){if(node.nodeType===Node.ELEMENT_NODE){if(callback(node))
break;}
node=node.parentNode;}
return node;},getElementsByClassNameRE:function(regex,strTagName,oElm){if(typeof(regex)=='string')regex=RegExp(regex);return ccms.dom.getElementsBy(function(node){return node.className.match(regex);},strTagName,oElm);},getElementByClassName:function(strClassName,strTagName,oElm){if(window.opera){if(typeof oElm==='undefined')oElm=document;if(oElm.nodeType===Node.DOCUMENT_NODE)oElm=oElm.body;}
return ccms.dom.getElementsByClassName(strClassName,strTagName,oElm)[0];},getChildrenBy:function(callback,parent,elements_only){if(typeof elements_only==='undefined')elements_only=true;var kids=[];var n=parent.firstChild;while(n){if((!elements_only||ccms.dom.isElementNode(n))&&callback(n))
kids.push(n);n=n.nextSibling;}
return kids;},getChildrenByTagName:function(tagName,parent){return ccms.dom.getChildrenBy(ccms.dom.hasTagName.rpartial(tagName),parent);},getChildrenByClassName:function(className,tagName,parent){var cf=ccms.dom.hasClass.rpartial(className);var f;if(typeof tagName==='string'){var tf=ccms.dom.hasTagName.rpartial(strTagName.toLowerCase());f=function(n){return tf(n)&&cf(n);};}
else{f=function(n){return cf(n);};}
return ccms.dom.getChildrenBy(f,parent);},getElementPosition:function(element){if(element.offsetParent){for(var posX=0,posY=0;element.offsetParent;element=element.offsetParent){posX+=element.offsetLeft;posY+=element.offsetTop;}
return[posX,posY];}
else{return[element.x,element.y];}},getDocumentScroll:function(){return[ccms.dom.getDocumentScrollLeft,ccms.dom.getDocumentScrollTop];},getWidth:function(o){if(typeof o.innerWidth==='number'){return o.innerWidth;}
else if(o.clientWidth){return o.clientWidth;}
return 0;},getHeight:function(o){if(typeof o.innerHeight==='number'){return o.innerHeight;}
else if(o.clientHeight){return o.clientHeight;}
return 0;},isSubnodeOf:function(parent,subnode){if(subnode){var n=subnode.parentNode;while(n){if(n===parent){return true;}
n=n.parentNode;}}
return false;},hasMovedOutOf:function(eventobj,element){var src=ccms.event.getTarget(eventobj);if(element!==src&&src&&!ccms.dom.isSubnodeOf(element,src)){return true;}
var rel=ccms.event.getRelatedTarget(eventobj);return rel!==element&&!ccms.dom.isSubnodeOf(element,rel);},getStyleObject:function(element,style_names){element=$(element);var styles;if(element){styles={};style_names.foreach(function(name){styles[name]=ccms.dom.getStyle(element,name);});}
return styles;},setStyleObject:function(element,styles){element=$(element);if(element)for(var name in styles)ccms.dom.setStyle(element,name,styles[name]);},setStyleByClass:function(t,c,p,v,root){ccms.dom.getElementsByClassName(c,t,root).foreach(function(node){ccms.dom.setStyle(node,p,v);});},toggleClass:function(element,className){if(ccms.dom.hasClass(element,className))
ccms.dom.removeClass(element,className);else
ccms.dom.addClass(element,className);},swapClass:function(element,removeClass,addClass){if(ccms.dom.hasClass(element,removeClass))
ccms.dom.removeClass(element,removeClass);ccms.dom.addClass(element,addClass);},getElementIndex:function(node,includeNonElementNodes){var n=node.parentNode.firstChild;var i=0;if(typeof includeNonElementNodes==='undefined')
includeNonElementNodes=false;while(n){if(n===node)return i;if(includeNonElementNodes||n.nodeType===Node.ELEMENT_NODE)
++i;n=n.nextSibling;}
return-1;},removeChildren:function(el){var prev;var node=el.lastChild;while(node){prev=node.previousSibling;el.removeChild(node);node=prev;}},getNext:function(node,callback,oData){var cb=callback;if(!cb)cb=ccms.dom.isElementNode;var n=node.nextSibling;while(n&&!cb(n,oData)){n=n.nextSibling;}
return n;},getPrevious:function(node,callback,oData){var cb=callback;if(!cb)cb=ccms.dom.isElementNode;var n=node.previousSibling;while(n&&!cb(n,oData)){n=n.previousSibling;}
return n;},getAncestor:function(node,callback,oData){var cb=callback;if(!cb)cb=ccms.dom.isElementNode;var n=node.parentNode;while(n&&!cb(n,oData)){n=n.parentNode;}
return n;},getChild:function(node,callback,oData){var cb=callback;if(!cb)cb=ccms.dom.isElementNode;var n=node.firstChild;while(n&&!cb(n,oData)){n=n.nextSibling;}
return n;},isElementNode:function(node){return node.nodeType===Node.ELEMENT_NODE;},hasTagName:function(node,sTagName){return sTagName==='*'||(typeof node.tagName!=='undefined'&&node.tagName.toUpperCase()===sTagName.toUpperCase());},hasRel:function(node,sRel){return!sRel||(node.getAttribute('rel')&&ccms.contains(node.getAttribute('rel').split(' '),sRel));},_waiting:0,pushWaitingClass:function(){++ccms.dom._waiting;ccms.dom.addClass(document.body,'waiting');},popWaitingClass:function(){if(--ccms.dom._waiting<=0){ccms.dom.removeClass(document.body,'waiting');}},fixDuplicateIDs:function(html){var bits=html.match(/id=('.+?'|".+?")/g);bits.foreach(function(attr){var id=attr.match(/('.+?'|".+?")/);id=id[1].substring(1,id[1].length-1);if($(id)){var new_attr='id="'+id+'-'+ccms.dom.generateId()+'"';html=html.replace(attr,new_attr);}});return html;},setSelectedIndexByValue:function(select,value){for(var i=0;i<select.options.length;++i){if(value==select.options[i].value){select.selectedIndex=i;break;}}},ready:false});ccms.event.onDOMReady(function(){ccms.dom.ready=true;});ccms.dom.updatePopupLinks=function(root){ccms.dom.getElementsByClassName('external','a',document.body).foreach(function(node){node.setAttribute('target','_blank');});ccms.dom.getElementsByClassName('external','form',document.body).foreach(function(node){node.setAttribute('target','_blank');});}
ccms.dom.updateExternalLinks=function(root){ccms.dom.getElementsBy(function(node){return ccms.dom.hasRel(node,'external');},'a',document.body).foreach(function(node){node.setAttribute('target','_blank');});}
ccms.extend(ccms.css,{styleSheets:[],require:function(url)
{if(this.styleSheets[url])return;this.styleSheets[url]=true;if(navigator.userAgent.indexOf('MSIE')>0)
{document.write('<link rel="stylesheet" type="text/css" href="'+url+'" />');}
else
{var s=document.createElement('link');s.setAttribute('rel','stylesheet');s.setAttribute('type','text/css');s.setAttribute('href',url);document.getElementsByTagName('head')[0].appendChild(s);}}});ccms.namespace('ccms.screen');ccms.extend(ccms.screen,(function(){var classes=[];var widths=[];var current_class='';return{setScreenClass:function(){var width=document.documentElement.clientWidth;var new_class=classes[widths[0]];for(var i in widths){var w=widths[i];if(w<=width)new_class=classes[w];}
if(current_class!==new_class){if(current_class!=='')
ccms.dom.removeClass(document.body,current_class);ccms.dom.addClass(document.body,current_class=new_class);ccms.require('/js/ccmsBrowserCapabilities.js');ccms.require('/js/3rdparty/JSONstring.js');ccms.async.when(function(){return(typeof ccms.browser.getCapabilities==='function')&&(typeof JSONstring==='object')},function(){ccms.async.http({url:'/browsercaps',method:'POST',parameters:{'json':JSONstring.make(ccms.browser.getCapabilities())},onSuccess:function(req){},onFailure:function(req){ccms.log.debugging=true;ccms.log.debug('ccmsBrowserCapabilities: '+req.status+' '+req.statusText+"\n"+req.responseText);}});});}},setupMonitor:function(dat,current){var sorter=function sortNumber(a,b){return a-b}
if(current)current_class=current;var i=0;for(var w in dat){widths[i++]=w;classes[w]=dat[w];}
widths.sort(sorter);if(widths.length>0){ccms.event.addLoadEvent(ccms.screen.setScreenClass);ccms.event.addListener(window,'resize',ccms.screen.setScreenClass);}}};})());ccms.cookie={get:function(cookieName,default_value){var cookieNameStart,valueStart,valueEnd,value;cookieNameStart=document.cookie.indexOf(cookieName+'=');if(cookieNameStart<0){if(typeof default_value==='undefined')return null;return default_value;}
valueStart=document.cookie.indexOf(cookieName+'=')+cookieName.length+1;valueEnd=document.cookie.indexOf(";",valueStart);if(valueEnd===-1){valueEnd=document.cookie.length;}
value=document.cookie.substring(valueStart,valueEnd);value=unescape(value);if(value===''){if(typeof default_value==='undefined')return null;return default_value;}
return value;},set:function(cookieName,value,hoursToLive,path,domain,secure){var expireString,timerObj,expireAt,pathString,domainString,secureString,setCookieString;if(!hoursToLive||typeof hoursToLive!=='number'||parseInt(hoursToLive)==='NaN'){expireString='';}
else{timerObj=new Date();timerObj.setTime(timerObj.getTime()+(parseInt(hoursToLive,10)*60*60*1000));expireAt=timerObj.toGMTString();expireString=";expires="+expireAt;}
pathString=";path=";(!path||path==='')?pathString+="/":pathString+=path;domainString="; domain=";(!domain||domain==='')?domainString+=window.location.hostname:domainString+=domain;(secure===true)?secureString=";secure":secureString='';value=escape(value);setCookieString=cookieName+"="+(value)+expireString+pathString+domainString;document.cookie=setCookieString;},del:function(cookieName,path,domain){(!path||!path.length)?path='':path=path;(!domain||!domain.length)?domain='':domain=domain;ccms.cookie.set(cookieName,'',-8760,path,domain);},test:function(){ccms.cookie.set('cT','acc');var runTest=ccms.cookie.get('cT');if(runTest==='acc'){ccms.cookies.del('cT');testStatus=true;}
else{testStatus=false;}
return testStatus;}};ccms.flash=function(html)
{if(typeof html!=='undefined'){var block=html,content;if(html.constructor.prototype===String.prototype)
{if(html===''){block=false;}
else{block=document.createElement('div');block.innerHTML=html;block=block.childNodes[0];}}
if(block){if(content=$('content')){if(content.childNodes.length>0){content.insertBefore(block,content.childNodes.item(0))}
else{content.appendChild(block);}}}}
var flashes=ccms.arrayOf(ccms.dom.getElementsByClassName('flash','div'));if(flashes.length>0){flash=flashes[0];if(flashes.length>1){for(var f=1;f<flashes.length;++f){var kids=ccms.arrayOf(flashes[f].getElementsByTagName('p'));for(var k=0;k<kids.length;++k){flash.appendChild(kids[k]);}
flashes[f].parentNode.removeChild(flashes[f]);}}
ccms.flash.attachFlash(flash);}}
ccms.flash.attachFlash=function(root_element){}
ccms.event.attach(window,'load',function(e){ccms.flash()});ccms.log.setup();ccms.event.addLoadEvent(ccms.detectScripts);ccms.widgets.addInstaller('updatePopupLinks',ccms.dom.updatePopupLinks);if(!Array.prototype.indexOf)
{Array.prototype.indexOf=function(elt)
{var len=this.length;var from=Number(arguments[1])||0;from=(from<0)?Math.ceil(from):Math.floor(from);if(from<0)
from+=len;for(;from<len;from++)
{if(from in this&&this[from]===elt)
return from;}
return-1;};}
ccms.ApiLinks=(function(){var links=[];var have_document=false;var _boundcall=function(config){config.api=this;return ccms.ApiLinks.call(config);};ccms.event.onDOMReady(function(){ccms.ApiLinks.extract();});return{extract:function(root_element){if(typeof root_element==='undefined'){if(have_document)return true;have_document=true;root_element=document;}
ccms.arrayOf(root_element.getElementsByTagName('link')).foreach(function(node){links.push({'href':node.getAttribute('href'),'rel':node.getAttribute('rel'),'title':node.getAttribute('title'),'type':node.getAttribute('type'),'parameters':{},'call':_boundcall});});},add:function(link){if(typeof link.parameters==='undefined')link.parameters={};link.call=_boundcall;links.push(link);},addMany:function(links){if(typeof links==='object'&&typeof links.foreach==='function')
links.foreach(this.add);},findByRel:function(rel){return links[links.findBy(function(link){if(typeof rel=='string')return link.rel==rel;return link.rel.match(rel);})];},findWithRel:function(rel){if(typeof rel=='string')
return links.filter(function(link){return link.rel==rel;});else
return links.filter(function(link){return link.rel.match(rel);});},call:function(config){var api;if(YAHOO.lang.isObject(api=config.api)||(api=this.findByRel(config.api))){config.parseJSON=true;if(typeof config.url==='undefined')config.url=api.href;if(typeof config.parameters==='undefined')config.parameters=api.parameters;else config.parameters=ccms.update(ccms.cloneOf(api.parameters),config.parameters);if(typeof config.parameters.jsi!=='string')config.parameters.jsi='content';return ccms.async.http(config);}}};})();if(!this.JSON){JSON=function(){function f(n){return n<10?'0'+n:n;}
Date.prototype.toJSON=function(key){return this.getUTCFullYear()+'-'+
f(this.getUTCMonth()+1)+'-'+
f(this.getUTCDate())+'T'+
f(this.getUTCHours())+':'+
f(this.getUTCMinutes())+':'+
f(this.getUTCSeconds())+'Z';};var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapeable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},rep;function quote(string){escapeable.lastIndex=0;return escapeable.test(string)?'"'+string.replace(escapeable,function(a){var c=meta[a];if(typeof c==='string'){return c;}
return'\\u'+('0000'+
(+(a.charCodeAt(0))).toString(16)).slice(-4);})+'"':'"'+string+'"';}
function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==='object'&&typeof value.toJSON==='function'){value=value.toJSON(key);}
if(typeof rep==='function'){value=rep.call(holder,key,value);}
switch(typeof value){case'string':return quote(value);case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null';}
gap+=indent;partial=[];if(typeof value.length==='number'&&!(value.propertyIsEnumerable('length'))){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||'null';}
v=partial.length===0?'[]':gap?'[\n'+gap+
partial.join(',\n'+gap)+'\n'+
mind+']':'['+partial.join(',')+']';gap=mind;return v;}
if(rep&&typeof rep==='object'){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==='string'){v=str(k,value,rep);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value,rep);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}
v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+
mind+'}':'{'+partial.join(',')+'}';gap=mind;return v;}}
return{stringify:function(value,replacer,space){var i;gap='';indent='';if(typeof space==='number'){for(i=0;i<space;i+=1){indent+=' ';}}else if(typeof space==='string'){indent=space;}
rep=replacer;if(replacer&&typeof replacer!=='function'&&(typeof replacer!=='object'||typeof replacer.length!=='number')){throw new Error('JSON.stringify');}
return str('',{'':value});},parse:function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==='object'){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else{delete value[k];}}}}
return reviver.call(holder,key,value);}
cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return'\\u'+('0000'+
(+(a.charCodeAt(0))).toString(16)).slice(-4);});}
if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof reviver==='function'?walk({'':j},''):j;}
throw new SyntaxError('JSON.parse');}};}();}
ccms.extend(ccms.date,{monthNames:"January February March April May June July August September October November December".split(" "),weekdayNames:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ")});Date.prototype.setISO8601=function(string){var regexp="([0-9]{4})(-([0-9]{2})(-([0-9]{2})"+"(T([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?"+"(Z|(([-+])([0-9]{2}):([0-9]{2})))?)?)?)?";var d=string.match(new RegExp(regexp));var offset=0;var date=new Date(d[1],0,1);if(d[3]){date.setMonth(d[3]-1);}
if(d[5]){date.setDate(d[5]);}
if(d[7]){date.setHours(d[7]);}
if(d[8]){date.setMinutes(d[8]);}
if(d[10]){date.setSeconds(d[10]);}
if(d[12]){date.setMilliseconds(Number("0."+d[12])*1000);}
if(d[14]){offset=(Number(d[16])*60)+Number(d[17]);offset*=((d[15]=='-')?1:-1);}
offset-=date.getTimezoneOffset();time=(Number(date)+(offset*60*1000));this.setTime(Number(time));}
ccms.flash.attachFlash=function(root_element){ccms.dom.hide(root_element);if(ccms.dom.getElementByClassName('register-complete-header','p',root_element))
return;var o=new YAHOO.widget.Panel('flashoverlay',{xy:[intval((ccms.dom.getDocumentWidth()-550)/2),150],width:'550px',zIndex:10000,modal:true,close:false,visible:false});o.setBody("<div class='flash jsflash'><div class='closebutton'></div>"+root_element.innerHTML+"</div>");o.render(document.body);o.show();ccms.dom.setStyle(o.element,'position','fixed');var _t=0;function hide(e){ccms.async.cancelTimeout(_t);_t=0;if(typeof Animator=='function'){(new Animator({duration:200,transition:Animator.tx.easeIn,onComplete:function(){o.hide();}})).addSubject(new NumericalStyleSubject(o.element,'opacity',1.0,0.0)).addSubject(new NumericalStyleSubject(o.mask,'opacity',0.5,0.0)).play();}
else{o.hide();}}
ccms.event.attach(o.element,'click',hide);_t=ccms.async.after(ccms.dom.getElementByClassName('sticky','*',root_element)?8000:3000,hide);};ccms.widgets.addInstaller('updateExternalLinks',ccms.dom.updateExternalLinks);ccms.namespace('ams');ccms.namespace('ams.menu');ccms.html.use();ccms.dom.addClass(document.body,'jsenabled');ams.checkboxToggle=function(element,event){if(this.checked){ccms.dom.show(element);}
else{ccms.dom.hide(element);}};ccms.event.onDOMReady(function(){var s=$('quickselect_action');if(s){function onQuickselect(e){if(this.value){var form=ccms.dom.getAncestorByTagName(this,'form');if(form){var url=new ccms.URL(form.action);url.appendPath(this.value);document.location.href=url.toString();}}}
ccms.event.attach(s,'change',onQuickselect);}
function autosubmit(e){ccms.dom.getAncestorByTagName(this,'form').submit();}
ccms.dom.getElementsByClassName('amsAutoSubmit','select',document.body).foreach(function(select){ccms.event.attach(select,'change',autosubmit);});if((s=$('captcha'))){ams.captchaToggle(s);}
var f=ccms.dom.getElementByClassName('register-complete-header','p');if(f){f=f.parentNode;ccms.dom.hide(f);ams.ShowPopover(f.innerHTML);}
ccms.dom.getElementsByClassName('cmsCommentThread','div').foreach(ams.ExpandingComments);ccms.dom.getElementsByClassName('listingpage','div').foreach(ams.ExpandingComments);if((f=$('q'))){ccms.dom.getElementsByClassName('searchlink','a').foreach(function(a){ccms.event.attach(a,'click',function(e){$('q').focus();return ccms.event.killEvent(e);});});}});ccms.widgets.addInstaller('supportComment',function(){var addsupport=$('addsupport'),comment_box;if(addsupport){if(addsupport.tagName.toLowerCase()=='input'&&addsupport.type=='checkbox'&&(comment_box=$('comment'))&&(comment_box=ccms.dom.getParentByClassName(comment_box,'div','fm-field'))){ccms.event.attach(addsupport,'click',ams.checkboxToggle.partial(comment_box));ams.checkboxToggle.bind(addsupport)(comment_box);}}});ams.RegisterForm=function(root_element){var form=ccms.dom.getElementByClassName('register-form','form',root_element);if(!form)form=$('signup-register-form');if(!form)form=$('fsAccount-Settings');if(form){var genre=ccms.dom.getElementByClassName('fm-property-genre','div',form);if(genre){genre=genre.getElementsByTagName('select');if(genre.length){genre=genre[0];var dob=ccms.dom.getElementByClassName('fm-property-date-of-birth','fieldset',form);if(!dob)dob=ccms.dom.getElementByClassName('fm-property-date-of-birth','div',form);var gender=ccms.dom.getElementByClassName('fm-property-gender','div',form);var charity=ccms.dom.getElementByClassName('fm-property-charity-number','div',form);var company=ccms.dom.getElementByClassName('fm-property-company-number','div',form);var name=ccms.dom.getElementByClassName('fm-property-title','div',form);var first_name=ccms.dom.getElementByClassName('fm-property-first-name','div',form);var last_name=ccms.dom.getElementByClassName('fm-property-last-name','div',form);function hide(div){var p=ccms.dom.getPrevious(div,function(n){return n.nodeType==Node.ELEMENT_NODE&&ccms.dom.hasClass(n,'error');});if(p)ccms.dom.hide(p);ccms.dom.hide(div);}
function show(div){var p=ccms.dom.getPrevious(div,function(n){return n.nodeType==Node.ELEMENT_NODE&&ccms.dom.hasClass(n,'error');});if(p)ccms.dom.show(p);ccms.dom.show(div);}
function update(e){if(this.value.endswith('individual')||this.value.endswith('public_figure')){if(dob)show(dob);if(gender)show(gender);if(first_name)show(first_name);if(last_name)show(last_name);if(name)hide(name);if(charity)hide(charity);if(company)hide(company);}
else{if(dob)hide(dob);if(gender)hide(gender);if(first_name)hide(first_name);if(last_name)hide(last_name);if(name)show(name);if(this.value.endswith('charity')){if(charity)show(charity);if(company)hide(company);}
else if(this.value.endswith('business')){if(charity)hide(charity);if(company)show(company);}
else{if(charity)hide(charity);if(company)hide(company);}}}
ccms.event.attach(genre,'click',update);ccms.event.attach(genre,'change',update);(update.bind(genre))();}}}};ccms.widgets.addInstaller('ams.RegisterForm',ams.RegisterForm);ams.ExpandingComments=function(root){function OnLinkClick(e){var target=ccms.event.getTarget(e);if(target&&ccms.dom.hasClass(target,'showmore')){var comment=target.parentNode.previousSibling;var preview=comment.previousSibling;ccms.dom.toggle(preview);ccms.dom.toggle(comment);if(preview.style.display=='none'){target.innerHTML='Show Less';}
else{target.innerHTML='Show More';}}}
function setupPreview(comment,length){if(comment.innerHTML.length>length){var preview=comment.innerHTML;preview=preview.replace(/<br\s*\/?>/ig,"\n").replace(/<\/p>/ig,"\n\n");preview=preview.stripTags().substring(0,length);preview=preview.replace(/\n\n/g,"</p><p>").replace(/\n/g,"<br />")+'...';var div=ccms.html.DIV({'class':'preview'});div.innerHTML="<p>"+preview+"</p>";var link=ccms.html.P({'class':'showmorep'},'(',ccms.html.SPAN({'class':'showmore'},'Show More'),')');ccms.dom.insertBefore(div,comment);ccms.dom.insertAfter(link,comment);ccms.dom.hide(comment);return true;}
return false;}
var i=0;ccms.dom.getElementsByClassName('comment','div',root).foreach(function(comment){if(ccms.dom.hasClass(comment,'module'))comment=ccms.dom.getElementByClassName('body','div',comment);if(setupPreview(comment,500))++i;});ccms.dom.getElementsByClassName('collapsed-description','div',root).foreach(function(comment){if(setupPreview(comment,200))++i;});if(i>0){ccms.event.attach(root,'click',OnLinkClick);}};ams.captchaToggle=function(captcha){var form=ccms.dom.getAncestorByTagName(captcha,'form');var fs=ccms.dom.getAncestorByTagName(captcha,'fieldset');var inputs=ccms.dom.getElementsBy(function(node){return node.type=='password';},'input',form);function updateCaptcha(e){if(ccms.dom.hasClass(fs,'fm-invalid')||inputs.filter(function(node){return node.value!='';}).length==inputs.length){ccms.dom.show(fs);}
else{ccms.dom.hide(fs);}}
inputs.foreach(function(node){ccms.event.attach(node,'keyup',updateCaptcha);});updateCaptcha();};ams.menu.current=false;ams.menu.timeout=false;ams.menu.installMenuHover=function(root){if(typeof root=='undefined')root=document.body;ccms.dom.getElementsByClassName('menu','div',$('menu')).foreach(function(ul){ccms.dom.getElementsByClassName('*','li',ul).foreach(function(li){ccms.event.attach(li,'mouseover',ams.menu.installMenuHover.onMouseOver);ccms.event.attach(li,'mouseout',ams.menu.installMenuHover.onMouseOut);});});};ams.menu.installMenuHover.onMouseOver=function(e){if(!ccms.dom.hasClass(this,'hover')){if(ccms.dom.hasClass(this.parentNode.parentNode,'menu')){ams.menu.installMenuHover.clearHover();ams.menu.current=this;}
ccms.dom.addClass(this,'hover');}};ams.menu.installMenuHover.onMouseOut=function(e){if(ccms.dom.hasClass(this.parentNode.parentNode,'menu')){ams.menu.timeout=window.setTimeout(ams.menu.installMenuHover.clearHover,5000);}
else{ccms.dom.removeClass(this,'hover');}};ams.menu.installMenuHover.clearHover=function(){if(ams.menu.timeout!==false){window.clearTimeout(ams.menu.timeout);ams.menu.timeout=false;}
if(ams.menu.current){ccms.dom.removeClass(ams.menu.current,'hover');}};ccms.widgets.addInstaller('installMenuHover',ams.menu.installMenuHover);ams.LabelToTextbox=function(form,label){if(typeof form!='undefined'){ccms.dom.getElementsByClassName('textbox','input',form).foreach(function(input){var id=input.getAttribute?input.getAttribute('id'):input.id;if(label||((label=ccms.dom.getElementsBy(function(elm){return elm.getAttribute('for')==id;},'label',form)[0])&&(label=label.innerHTML))){var v=label.rtrim('\\W');if(input.value==''||input.value==v){input.value=v;ccms.dom.addClass(input,'label-text');ccms.event.attach(input,'focus',ams.menu.installLoginLabels.onFocus);}}});}};ams.menu.installLoginLabels=function(root){var form;if((form=$('login'))){ams.LabelToTextbox(form);}
if((form=$('search'))){ams.LabelToTextbox(form,'enter keywords');ccms.event.attach(form,'submit',ams.menu.dont_search_enter_keywords);}
if((form=$('search2'))){ams.LabelToTextbox(form,'enter keywords');ccms.event.attach(form,'submit',ams.menu.dont_search_enter_keywords);}};ams.menu.installLoginLabels.onFocus=function(e){if(ccms.dom.hasClass(this,'label-text')){ccms.dom.removeClass(this,'label-text');this.value='';}
ccms.event.detach(this,'focus',ams.menu.installLoginLabels.onFocus);};ams.menu.dont_search_enter_keywords=function(e){var input=ccms.dom.getElementByClassName('textbox','input',this);if(input&&input.value=='enter keywords')input.value='';};ccms.widgets.addInstaller('installLoginLabels',ams.menu.installLoginLabels);ccms.namespace('milk');milk.isInternalLink=function(url){if(!url||!url.match(/^https?:/)||url.match(/^http:\/\/(([^\/]*.)?addmysupport|\w+-ams\.dev\.cuttlefish).([^\/]*)/))
return!url.match(/(^|\/)about\//)||url.match(/(^|\/)about\/bookmarklets/);return false;};ccms.dom.updateExternalLinks=function(root){ccms.dom.getElementsBy(function(node){var href=node.getAttribute('href');return(node.getAttribute('rel')=='external')||(href&&!milk.isInternalLink(href));},'a',typeof root!='undefined'?root:document).foreach(function(node){node.setAttribute('target','_blank');ccms.dom.addClass(node,'external');});};ccms.widgets.addInstaller('updateExternalLinks',ccms.dom.updateExternalLinks);ams.CollapseState=(function(){var i=ccms.cookie.get('oc','{}').parseJSON();return{open:function(name){i[name]=true;ccms.cookie.set('oc',JSON.stringify(i),24*90);},close:function(name){i[name]=false;ccms.cookie.set('oc',JSON.stringify(i),24*90);},isOpen:function(name,default_value){if(typeof i[name]=='undefined')return default_value;return i[name];}};})();ams.PanelCollapse=function(root_element){function isOpenByDefault(module){return module.className.match(/\b(startOpen|support_(?:offered|needed)|introduction|location|information|extra-info|related-experience|sp_news|sp_library|sp_resources|sp_support_pages|sp_supporting|sp_subscriptions)\b/)||(module.className.match(/\b(ams-recommendations|featured-content|preferences)\b/));}
function toggle(expander,module,force){var body=ccms.dom.getElementByClassName('body','div',module);var show=false;if(typeof force=='undefined'){show=ccms.dom.hasClass(module,'collapsed');}
else{show=force;}
if(show){ccms.dom.removeClass(module,'collapsed');}
else{ccms.dom.addClass(module,'collapsed');}}
ccms.dom.getElementsByClassName('collapsable','div',root_element).foreach(function(module){var header;if((header=ccms.dom.getElementByClassName('header','div',module))){header.appendChild(ccms.html.DIV({'class':'expander'}));ccms.event.attach(header,'click',function(e){var target=ccms.event.getTarget(e).tagName.toLowerCase();if(target!='a'&&target!='img'){toggle(header.lastChild,module);}});var default_value=isOpenByDefault(module);toggle(header.lastChild,module,default_value);}});};ccms.widgets.addInstaller('ams.PanelCollapse',ams.PanelCollapse);ams.AjaxActions=function(actions,specific_action){var ams_sharethis_loc=null;var current_action=null;if(typeof specific_action=='undefined')specific_action=null;function onSubmit(){if(this.form.action.match(/\/tellsomeone$/)){this.form.submit();}
else{var referers=ccms.dom.getElementsBy(function(node){return node.name=='referer';},'input',this.form);if(referers.length)referers[0].value=document.location.href+'/actions?jsi=actions';else this.form.appendChild(ccms.html.INPUT({'type':'hidden','name':'referer','value':document.location.href+'/actions?jsi=actions'}));ccms.async.submitForm(this.form,{'onSuccess':onSubmitted,'parseJSON':true});}}
function onSubmitted(response){var m,d;if(response){if(response.redirect){document.location.href=response.redirect;}
else{if((m=response.html.replace(/\n/g,'').match(/<ul[^>]+>(.+)<\/ul>/m))){var meta;if((meta=ccms.dom.getElementByClassName('meta','div',document.body))){d=ccms.html.DIV();d.innerHTML=m[0];var a=ccms.dom.getElementByClassName('actions','div',meta);a.replaceChild(d.firstChild,a.getElementsByTagName('ul')[0]);ams.setupActions(a);}
else{var replace=null;if((meta=ccms.dom.getElementByClassName('support-actions'))){replace=meta;if((meta=ccms.dom.getElementByClassName('sidebar-actions'))){replace.parentNode.removeChild(replace);replace=meta.parentNode;}}
else if((meta=ccms.dom.getElementByClassName('sidebar-actions'))){replace=meta.parentNode;}
if(replace){d=ccms.html.DIV();d.innerHTML=m[0];meta=replace.parentNode;meta.replaceChild(d,replace);ams.setupActions(meta);}}}
if((m=current_action.match(/\/(support|join)$/))){ccms.async.http({'url':current_action.replace(/\/(support|join)$/,'/actions/tellyourfriends'),'parameters':{'jsi':'action','from':m[1]},'parseJSON':true,'onSuccess':onRecvAction});}
else if(response.flash){ccms.flash(response.flash);}}}}
function onRecvAction(response){if(response.redirect){document.location.href=response.redirect;return;}
ccms.async.processJSON(response);var m=response.html.match(/action="([^"]+)"/);if(m&&m[1])
current_action=m[1];var mb=ccms.html.MessageBox({'body':response.html,'buttons':[],'shadow':true,'backing':true,'center':'xy','fixedcenter':false,'icon':null,'width':'','modal':true,'close':false,'postmethod':'manual'});ccms.widgets.runInstallers(mb.element);mb.manualSubmitEvent.subscribe(onSubmit);mb.form.appendChild(ccms.html.INPUT({'type':'hidden','name':'amsjs','value':'1'}));var submits=ccms.dom.getElementsByClassName('submit','input',mb.element);submits.foreach(function(node){mb.form.appendChild(ccms.html.INPUT({'type':'hidden','value':node.value}));});var cancels=ccms.dom.getElementsByClassName('cancel','input',mb.element);if(cancels.length==0){var btn=ccms.html.INPUT({'type':'button','value':'Close','class':'button cancel'});ccms.dom.addClass(mb.form,'ccmsForm');mb.form.appendChild(ccms.html.DIV({'class':'fm-footer'},btn));ccms.event.attach(btn,'click',function(e){mb.hide();return ccms.event.killEvent(e);});}
else{cancels.foreach(function(node){var btn=ccms.html.INPUT({'type':'button','value':node.value,'class':'button cancel'});node.parentNode.replaceChild(btn,node);ccms.event.attach(btn,'click',function(e){mb.hide();return ccms.event.killEvent(e);});});}
ccms.events.subscribe('ccms.editor.Folksonomy.update',function(){mb.center();});mb.center();mb.show();}
function onClick(e){var a=ccms.event.getTarget(e);if(specific_action&&a!==specific_action)
return true;var li=ccms.dom.getAncestorByTagName(a,'li');if(!li)li=ccms.dom.getAncestorByTagName(a,'p');var m;if(li&&!ccms.dom.hasClass(li,'no-popover')&&(m=li.className.match(/\b(?:action-|li_)([^ ]+)/))){if(li.className.match(/action-message/)&&navigator.userAgent.match(/MSIE/)&&a.pathname.match(/^\/message/)){return true;}
if(li.className.match(/action-support-target/)){return true;}
var sharethis=$('ams_sharethis');if(m[1]!='share'){ccms.dom.setStyle(sharethis,'display','none');a=li.getElementsByTagName('a')[0];ccms.async.http({'url':a.href,'parameters':{'jsi':a.href.match(/\/(comments|extrasupport)\/\d/)?'form':'action'},'parseJSON':true,'onSuccess':onRecvAction});}
else if(sharethis){if(ccms.dom.getStyle(sharethis,'display')!='block'){ccms.dom.setStyle(sharethis,'display','block');if(ams_sharethis_loc===null){ams_sharethis_loc=ccms.html.DIV({'id':ccms.dom.generateId()});sharethis.appendChild(ams_sharethis_loc);var tmp=ccms.html.DIV();sharethis.appendChild(tmp);ccms.dom.setStyle(tmp,'height','32px');}
ams_sharethis.attachButton($(ams_sharethis_loc));ams_sharethis.popup();ccms.event.attach(ccms.dom.getElementByClassName('stclose','a'),'click',function(e){ccms.dom.setStyle(sharethis,'display','none');});}
else{ccms.dom.setStyle(sharethis,'display','none');ams_sharethis.popup();}}
return ccms.event.killEvent(e);}
return true;}
function onShareThis(div){var btnid=ccms.dom.generateId();var spacerid=ccms.dom.generateId();var mb=ccms.html.MessageBox({'body':div.innerHTML+"<div id='"+btnid+"'></div>"+"<div id='"+spacerid+"'></div>",'shadow':true,'backing':true,'center':'xy','fixedcenter':false,'icon':null,'width':'','modal':true,'close':false,'postmethod':'manual'});var cancels=ccms.dom.getElementsByClassName('cancel','input',mb.element);if(cancels.length==0){var btn=ccms.html.INPUT({'type':'button','value':'Close','class':'button cancel'});ccms.dom.addClass(mb.form,'ccmsForm');mb.form.appendChild(ccms.html.DIV({'class':'fm-footer'},btn));ccms.event.attach(btn,'click',function(e){mb.hide();ams_sharethis.popup();return ccms.event.killEvent(e);});}
else{cancels.foreach(function(node){var btn=ccms.html.INPUT({'type':'button','value':node.value,'class':'button cancel'});node.parentNode.replaceChild(btn,node);ccms.event.attach(btn,'click',function(e){mb.hide();ams_sharethis.popup();return ccms.event.killEvent(e);});});}
ccms.dom.addClass(mb.element,'sharethis-popover');ccms.dom.setStyle($(spacerid),'height','300px');mb.center();mb.show();ams_sharethis.attachButton($(btnid));ams_sharethis.popup();ccms.dom.setStyle($('stframe'),'height','290px');$('stframe').setAttribute('scrolling','yes');$('stframe').setAttribute('width',370);ccms.dom.hide(ccms.dom.getElementByClassName('stclose','a'));var xy=ccms.dom.getXY($('stwrapper'));var h=xy[1]-ccms.dom.getXY(mb.element)[1];mb.moveEvent.subscribe(function(name,args){var pos=args[0];ccms.dom.setXY($('stwrapper'),[xy[0],pos[1]+h]);ccms.dom.setStyle($(spacerid),'height',''+(ccms.dom.getStyle($('stwrapper'),'height')+16)+'px');ccms.dom.setStyle($('stframe'),'height','280px');$('stframe').setAttribute('scrolling','yes');});}
ccms.event.attach(actions,'click',onClick);};ams.setupActions=function(root_element){if(typeof root_element!='object')
root_element=document.body;ccms.dom.getElementsByClassName('meta','div',root_element).foreach(function(node){var actions=ccms.dom.getElementsByClassName('actions','div',node);actions.foreach(function(div){if(ccms.dom.getElementByClassName('page-actions','ul',div)){new ams.AjaxActions(div);}});});ccms.dom.getElementsByClassName('sidebar','div',root_element).foreach(function(node){var actions=ccms.dom.getElementsByClassName('actions','div',node);actions.foreach(function(div){if(ccms.dom.getElementByClassName('page-actions','ul',div)){new ams.AjaxActions(div);}});});ccms.dom.getElementsByClassName('comment','div',root_element).foreach(function(node){ccms.dom.getElementsByClassName('actions','ul',node).foreach(function(ul){new ams.AjaxActions(ul);});});var ul;if((ul=ccms.dom.getElementByClassName('sidebar-actions','ul',root_element))){new ams.AjaxActions(ul.parentNode);}
if((ul=ccms.dom.getElementByClassName('support-actions','ol',root_element))){new ams.AjaxActions(ul.parentNode);}
ccms.dom.getElementsByClassName('PopOverAction','a',root_element).foreach(function(a){new ams.AjaxActions(a.parentNode.parentNode,a);});ccms.dom.getElementsByClassName('PopOverLink','a',root_element).foreach(function(a){ccms.event.attach(a,'click',ams.OnPopoverPageLink);});if(document.location.href.match(/\/actions\/share\/?(\?.*)?$/)){var sharethis=$('ams_sharethis');if(sharethis&&typeof ams_sharethis=='object'){ccms.dom.setStyle(sharethis,'display','block');var ams_sharethis_loc=ccms.html.DIV({'id':ccms.dom.generateId()});sharethis.appendChild(ams_sharethis_loc);var tmp=ccms.html.DIV();sharethis.appendChild(tmp);ccms.dom.setStyle(tmp,'height','32px');ams_sharethis.attachButton($(ams_sharethis_loc));ams_sharethis.popup();}}
if(ccms.modules&&ccms.modules.CommentThread){var onRecvBlock=ccms.modules.CommentThread.prototype.onRecvBlock;ccms.modules.CommentThread.prototype.onRecvBlock=function(json,block){if(json.html){if(-1==json.html.search('<form')){return onRecvBlock.bind(this)(json,block);}
var mb=ccms.html.MessageBox({'body':json.html,'buttons':[],'shadow':true,'backing':true,'center':'xy','fixedcenter':false,'icon':null,'width':'','height':'300px','modal':true,'close':false,'postmethod':'manual'});ccms.widgets.runInstallers(mb.element);var self=this;mb.manualSubmitEvent.subscribe(self.onSubmit.bind({'block':block,'form':mb.form,'self':self}));mb.form.appendChild(ccms.html.INPUT({'type':'hidden','name':'amsjs','value':'1'}));var submits=ccms.dom.getElementsByClassName('submit','input',mb.element);submits.foreach(function(node){mb.form.appendChild(ccms.html.INPUT({'type':'hidden','value':node.value}));});var cancels=ccms.dom.getElementsByClassName('cancel','input',mb.element);if(cancels.length==0){var btn=ccms.html.INPUT({'type':'button','value':'Close','class':'button cancel'});ccms.dom.addClass(mb.form,'ccmsForm');mb.form.appendChild(ccms.html.DIV({'class':'fm-footer'},btn));ccms.event.attach(btn,'click',function(e){mb.hide();return ccms.event.killEvent(e);});}
else{cancels.foreach(function(node){var btn=ccms.html.INPUT({'type':'button','value':node.value,'class':'button cancel'});node.parentNode.replaceChild(btn,node);ccms.event.attach(btn,'click',function(e){mb.hide();return ccms.event.killEvent(e);});});}
mb.center();mb.show();}
return true;};}};ccms.event.onDOMReady(ams.setupActions);ams.ShowPopover=function(html){var mb=ccms.html.MessageBox({'body':html,'buttons':[],'shadow':true,'backing':true,'center':'xy','fixedcenter':false,'icon':null,'width':'','height':'300px','modal':true,'close':false,'postmethod':'manual'});ccms.widgets.runInstallers(mb.element);var btn=ccms.html.INPUT({'type':'button','value':'Close','class':'button cancel'});ccms.dom.addClass(mb.form,'ccmsForm');ccms.dom.addClass(mb.element,'amsPopoverPage');mb.form.appendChild(ccms.html.DIV({'class':'fm-footer'},btn));ccms.event.attach(btn,'click',function(e){mb.hide();return ccms.event.killEvent(e);});mb.center();mb.show();};ams.OnPopoverPageLink=function(e){ccms.event.stopEvent(e);function onRecvPage(response){ccms.async.processJSON(response);ams.ShowPopover(response.html);}
a=ccms.event.getTarget(e);if(a.tagName.toLowerCase()=='a'){ccms.async.http({'url':a.href,'parameters':{'jsi':'main-details'},'parseJSON':true,'onSuccess':onRecvPage});}
return false;};ccms.widgets.addInstaller('amsShowMeter',function(root){var field;if((field=ccms.dom.getElementByClassName('fm-property-support-target-display','div',root))){ccms.dom.getElementsBy(function(node){return node.type=='radio';},'input',field).foreach(function(input){ccms.event.attach(input,'click',ams.ShowMeterUpdateClick);if(input.checked)ams.ShowMeterUpdate(input);});}});ams.ShowMeterUpdateClick=function(e){var input=ccms.event.getTarget(e);ams.ShowMeterUpdate(input);};ams.ShowMeterUpdate=function(input){var form=ccms.dom.getAncestorByTagName(input,'form');if(form){var table=ccms.dom.getElementByClassName('support-target-info','table',form);if(table){if(input.value=='1'){ccms.dom.setStyle(table,'opacity','1.0');}
else{ccms.dom.setStyle(table,'opacity','0.4');}}}};if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=(""+A[C]).split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules,B,H,G,F,C;if(!I[A]){I[A]={versions:[],builds:[]};}B=I[A];H=D.version;G=D.build;F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var D=function(H){var I=0;return parseFloat(H.replace(/\./g,function(){return(I++==1)?"":".";}));},G=navigator,F={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0,caja:G.cajaVersion,secure:false,os:null},C=navigator&&navigator.userAgent,E=window&&window.location,B=E&&E.href,A;F.secure=B&&(B.toLowerCase().indexOf("https")===0);if(C){if((/windows|win32/i).test(C)){F.os="windows";}else{if((/macintosh/i).test(C)){F.os="macintosh";}}if((/KHTML/).test(C)){F.webkit=1;}A=C.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){F.webkit=D(A[1]);if(/ Mobile\//.test(C)){F.mobile="Apple";}else{A=C.match(/NokiaN[^\/]*/);if(A){F.mobile=A[0];}}A=C.match(/AdobeAIR\/([^\s]*)/);if(A){F.air=A[0];}}if(!F.webkit){A=C.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){F.opera=D(A[1]);A=C.match(/Opera Mini[^;]*/);if(A){F.mobile=A[0];}}else{A=C.match(/MSIE\s([^;]*)/);if(A&&A[1]){F.ie=D(A[1]);}else{A=C.match(/Gecko\/([^\s]*)/);if(A){F.gecko=1;A=C.match(/rv:([^\s\)]*)/);if(A&&A[1]){F.gecko=D(A[1]);}}}}}}return F;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C++){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var B=YAHOO.lang,A=Object.prototype,H="[object Array]",C="[object Function]",G="[object Object]",E=[],F=["toString","valueOf"],D={isArray:function(I){return A.toString.apply(I)===H;},isBoolean:function(I){return typeof I==="boolean";},isFunction:function(I){return(typeof I==="function")||A.toString.apply(I)===C;},isNull:function(I){return I===null;},isNumber:function(I){return typeof I==="number"&&isFinite(I);},isObject:function(I){return(I&&(typeof I==="object"||B.isFunction(I)))||false;},isString:function(I){return typeof I==="string";},isUndefined:function(I){return typeof I==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(K,J){var I,M,L;for(I=0;I<F.length;I=I+1){M=F[I];L=J[M];if(B.isFunction(L)&&L!=A[M]){K[M]=L;}}}:function(){},extend:function(L,M,K){if(!M||!L){throw new Error("extend failed, please check that "+"all dependencies are included.");}var J=function(){},I;J.prototype=M.prototype;L.prototype=new J();L.prototype.constructor=L;L.superclass=M.prototype;if(M.prototype.constructor==A.constructor){M.prototype.constructor=M;}if(K){for(I in K){if(B.hasOwnProperty(K,I)){L.prototype[I]=K[I];}}B._IEEnumFix(L.prototype,K);}},augmentObject:function(M,L){if(!L||!M){throw new Error("Absorb failed, verify dependencies.");}var I=arguments,K,N,J=I[2];if(J&&J!==true){for(K=2;K<I.length;K=K+1){M[I[K]]=L[I[K]];}}else{for(N in L){if(J||!(N in M)){M[N]=L[N];}}B._IEEnumFix(M,L);}},augmentProto:function(L,K){if(!K||!L){throw new Error("Augment failed, verify dependencies.");}var I=[L.prototype,K.prototype],J;for(J=2;J<arguments.length;J=J+1){I.push(arguments[J]);}B.augmentObject.apply(this,I);},dump:function(I,N){var K,M,P=[],Q="{...}",J="f(){...}",O=", ",L=" => ";if(!B.isObject(I)){return I+"";}else{if(I instanceof Date||("nodeType"in I&&"tagName"in I)){return I;}else{if(B.isFunction(I)){return J;}}}N=(B.isNumber(N))?N:3;if(B.isArray(I)){P.push("[");for(K=0,M=I.length;K<M;K=K+1){if(B.isObject(I[K])){P.push((N>0)?B.dump(I[K],N-1):Q);}else{P.push(I[K]);}P.push(O);}if(P.length>1){P.pop();}P.push("]");}else{P.push("{");for(K in I){if(B.hasOwnProperty(I,K)){P.push(K+L);if(B.isObject(I[K])){P.push((N>0)?B.dump(I[K],N-1):Q);}else{P.push(I[K]);}P.push(O);}}if(P.length>1){P.pop();}P.push("}");}return P.join("");},substitute:function(Y,J,R){var N,M,L,U,V,X,T=[],K,O="dump",S=" ",I="{",W="}",Q,P;for(;;){N=Y.lastIndexOf(I);if(N<0){break;}M=Y.indexOf(W,N);if(N+1>=M){break;}K=Y.substring(N+1,M);U=K;X=null;L=U.indexOf(S);if(L>-1){X=U.substring(L+1);U=U.substring(0,L);}V=J[U];if(R){V=R(U,V,X);}if(B.isObject(V)){if(B.isArray(V)){V=B.dump(V,parseInt(X,10));}else{X=X||"";Q=X.indexOf(O);if(Q>-1){X=X.substring(4);}P=V.toString();if(P===G||Q>-1){V=B.dump(V,parseInt(X,10));}else{V=P;}}}else{if(!B.isString(V)&&!B.isNumber(V)){V="~-"+T.length+"-~";T[T.length]=K;}}Y=Y.substring(0,N)+V+Y.substring(M+1);}for(N=T.length-1;N>=0;N=N-1){Y=Y.replace(new RegExp("~-"+N+"-~"),"{"+T[N]+"}","g");}return Y;},trim:function(I){try{return I.replace(/^\s+|\s+$/g,"");}catch(J){return I;}},merge:function(){var L={},J=arguments,I=J.length,K;for(K=0;K<I;K=K+1){B.augmentObject(L,J[K],true);}return L;},later:function(P,J,Q,L,M){P=P||0;J=J||{};var K=Q,O=L,N,I;if(B.isString(Q)){K=J[Q];}if(!K){throw new TypeError("method undefined");}if(O&&!B.isArray(O)){O=[L];}N=function(){K.apply(J,O||E);};I=(M)?setInterval(N,P):setTimeout(N,P);return{interval:M,cancel:function(){if(this.interval){clearInterval(I);}else{clearTimeout(I);}}};},isValue:function(I){return(B.isObject(I)||B.isString(I)||B.isNumber(I)||B.isBoolean(I));}};B.hasOwnProperty=(A.hasOwnProperty)?function(I,J){return I&&I.hasOwnProperty(J);}:function(I,J){return!B.isUndefined(I[J])&&I.constructor.prototype[J]!==I[J];};D.augmentObject(B,D,true);YAHOO.util.Lang=B;B.augment=B.augmentProto;YAHOO.augment=B.augmentProto;YAHOO.extend=B.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.8.2",build:"19"});YAHOO.util.Get=function(){var M={},L=0,R=0,E=false,N=YAHOO.env.ua,S=YAHOO.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]&&YAHOO.lang.hasOwnProperty(T,V)){Z.setAttribute(V,T[V]);}}return Z;};var I=function(U,V,T){var W={id:"yui__dyn_"+(R++),type:"text/css",rel:"stylesheet",href:U};if(T){S.augmentObject(W,T);}return J("link",W,V);};var P=function(U,V,T){var W={id:"yui__dyn_"+(R++),type:"text/javascript",src:U};if(T){S.augmentObject(W,T);}return J("script",W,V);};var A=function(T,U){return{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.getElementById(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="transaction "+W+" was aborted";Q(W,V);return;}if(T.onSuccess){var U=T.scope||T.win;T.onSuccess.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.timer.cancel();}if(U.aborted){var X="transaction "+V+" was aborted";Q(V,X);return;}if(Z){U.url.shift();if(U.varName){U.varName.shift();}}else{U.url=(S.isString(U.url))?[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.url.length===0){if(U.type==="script"&&N.webkit&&N.webkit<420&&!U.finalpass&&!U.varName){var Y=P(null,U.win,U.attributes);Y.innerHTML='YAHOO.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.attributes);}else{W=I(T,c,U.attributes);}F(U.type,W,V,T,c,U.url.length);U.nodes.push(W);if(U.insertBefore){var e=B(U.insertBefore,V);if(e){e.parentNode.insertBefore(W,e);}}else{a.appendChild(W);}if((N.webkit||N.gecko)&&U.type==="css"){G(V,T);}};var K=function(){if(E){return;}E=true;for(var T in M){var U=M[T];if(U.autopurge&&U.finished){D(U.tId);delete M[T];}}E=false;};var D=function(Z){if(M[Z]){var T=M[Z],U=T.nodes,X=U.length,c=T.win.document,a=c.getElementsByTagName("head")[0],V,Y,W,b;if(T.insertBefore){V=B(T.insertBefore,Z);if(V){a=V.parentNode;}}for(Y=0;Y<X;Y=Y+1){W=U[Y];if(W.clearAttributes){W.clearAttributes();}else{for(b in W){delete W[b];}}a.removeChild(W);}T.nodes=[];}};var H=function(U,T,V){var X="q"+(L++);V=V||{};if(L%YAHOO.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=("autopurge"in W)?W.autopurge:(U==="script")?true:false;if(V.charset){W.attributes=W.attributes||{};W.attributes.charset=V.charset;}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=null;a(W,U);}};}else{if(N.webkit){if(c==="script"){if(N.webkit>=420){X.addEventListener("load",function(){a(W,U);});}else{var T=M[W];if(T.varName){var V=YAHOO.util.Get.POLL_FREQ;T.maxattempts=YAHOO.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.cancel();Q(W,h);}else{}return;}}T.timer.cancel();a(W,U);},null,true);}else{S.later(YAHOO.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];if(T){T.aborted=true;}},script:function(T,U){return H("script",T,U);},css:function(T,U){return H("css",T,U);}};}();YAHOO.register("get",YAHOO.util.Get,{version:"2.8.2",build:"19"});(function(){var Y=YAHOO,util=Y.util,lang=Y.lang,env=Y.env,PROV="_provides",SUPER="_supersedes",REQ="expanded",AFTER="_after";var YUI={dupsAllowed:{"yahoo":true,"get":true},info:{"root":"2.8.1/build/","base":"http://yui.yahooapis.com/2.8.1/build/","comboBase":"http://yui.yahooapis.com/combo?","skin":{"defaultSkin":"sam","base":"assets/skins/","path":"skin.css","after":["reset","fonts","grids","base"],"rollup":3},dupsAllowed:["yahoo","get"],"moduleInfo":{"animation":{"type":"js","path":"animation/animation-min.js","requires":["dom","event"]},"autocomplete":{"type":"js","path":"autocomplete/autocomplete-min.js","requires":["dom","event","datasource"],"optional":["connection","animation"],"skinnable":true},"base":{"type":"css","path":"base/base-min.css","after":["reset","fonts","grids"]},"button":{"type":"js","path":"button/button-min.js","requires":["element"],"optional":["menu"],"skinnable":true},"calendar":{"type":"js","path":"calendar/calendar-min.js","requires":["event","dom"],supersedes:["datemeth"],"skinnable":true},"carousel":{"type":"js","path":"carousel/carousel-min.js","requires":["element"],"optional":["animation"],"skinnable":true},"charts":{"type":"js","path":"charts/charts-min.js","requires":["element","json","datasource","swf"]},"colorpicker":{"type":"js","path":"colorpicker/colorpicker-min.js","requires":["slider","element"],"optional":["animation"],"skinnable":true},"connection":{"type":"js","path":"connection/connection-min.js","requires":["event"],"supersedes":["connectioncore"]},"connectioncore":{"type":"js","path":"connection/connection_core-min.js","requires":["event"],"pkg":"connection"},"container":{"type":"js","path":"container/container-min.js","requires":["dom","event"],"optional":["dragdrop","animation","connection"],"supersedes":["containercore"],"skinnable":true},"containercore":{"type":"js","path":"container/container_core-min.js","requires":["dom","event"],"pkg":"container"},"cookie":{"type":"js","path":"cookie/cookie-min.js","requires":["yahoo"]},"datasource":{"type":"js","path":"datasource/datasource-min.js","requires":["event"],"optional":["connection"]},"datatable":{"type":"js","path":"datatable/datatable-min.js","requires":["element","datasource"],"optional":["calendar","dragdrop","paginator"],"skinnable":true},datemath:{"type":"js","path":"datemath/datemath-min.js","requires":["yahoo"]},"dom":{"type":"js","path":"dom/dom-min.js","requires":["yahoo"]},"dragdrop":{"type":"js","path":"dragdrop/dragdrop-min.js","requires":["dom","event"]},"editor":{"type":"js","path":"editor/editor-min.js","requires":["menu","element","button"],"optional":["animation","dragdrop"],"supersedes":["simpleeditor"],"skinnable":true},"element":{"type":"js","path":"element/element-min.js","requires":["dom","event"],"optional":["event-mouseenter","event-delegate"]},"element-delegate":{"type":"js","path":"element-delegate/element-delegate-min.js","requires":["element"]},"event":{"type":"js","path":"event/event-min.js","requires":["yahoo"]},"event-simulate":{"type":"js","path":"event-simulate/event-simulate-min.js","requires":["event"]},"event-delegate":{"type":"js","path":"event-delegate/event-delegate-min.js","requires":["event"],"optional":["selector"]},"event-mouseenter":{"type":"js","path":"event-mouseenter/event-mouseenter-min.js","requires":["dom","event"]},"fonts":{"type":"css","path":"fonts/fonts-min.css"},"get":{"type":"js","path":"get/get-min.js","requires":["yahoo"]},"grids":{"type":"css","path":"grids/grids-min.css","requires":["fonts"],"optional":["reset"]},"history":{"type":"js","path":"history/history-min.js","requires":["event"]},"imagecropper":{"type":"js","path":"imagecropper/imagecropper-min.js","requires":["dragdrop","element","resize"],"skinnable":true},"imageloader":{"type":"js","path":"imageloader/imageloader-min.js","requires":["event","dom"]},"json":{"type":"js","path":"json/json-min.js","requires":["yahoo"]},"layout":{"type":"js","path":"layout/layout-min.js","requires":["element"],"optional":["animation","dragdrop","resize","selector"],"skinnable":true},"logger":{"type":"js","path":"logger/logger-min.js","requires":["event","dom"],"optional":["dragdrop"],"skinnable":true},"menu":{"type":"js","path":"menu/menu-min.js","requires":["containercore"],"skinnable":true},"paginator":{"type":"js","path":"paginator/paginator-min.js","requires":["element"],"skinnable":true},"profiler":{"type":"js","path":"profiler/profiler-min.js","requires":["yahoo"]},"profilerviewer":{"type":"js","path":"profilerviewer/profilerviewer-min.js","requires":["profiler","yuiloader","element"],"skinnable":true},"progressbar":{"type":"js","path":"progressbar/progressbar-min.js","requires":["element"],"optional":["animation"],"skinnable":true},"reset":{"type":"css","path":"reset/reset-min.css"},"reset-fonts-grids":{"type":"css","path":"reset-fonts-grids/reset-fonts-grids.css","supersedes":["reset","fonts","grids","reset-fonts"],"rollup":4},"reset-fonts":{"type":"css","path":"reset-fonts/reset-fonts.css","supersedes":["reset","fonts"],"rollup":2},"resize":{"type":"js","path":"resize/resize-min.js","requires":["dragdrop","element"],"optional":["animation"],"skinnable":true},"selector":{"type":"js","path":"selector/selector-min.js","requires":["yahoo","dom"]},"simpleeditor":{"type":"js","path":"editor/simpleeditor-min.js","requires":["element"],"optional":["containercore","menu","button","animation","dragdrop"],"skinnable":true,"pkg":"editor"},"slider":{"type":"js","path":"slider/slider-min.js","requires":["dragdrop"],"optional":["animation"],"skinnable":true},"storage":{"type":"js","path":"storage/storage-min.js","requires":["yahoo","event","cookie"],"optional":["swfstore"]},"stylesheet":{"type":"js","path":"stylesheet/stylesheet-min.js","requires":["yahoo"]},"swf":{"type":"js","path":"swf/swf-min.js","requires":["element"],"supersedes":["swfdetect"]},"swfdetect":{"type":"js","path":"swfdetect/swfdetect-min.js","requires":["yahoo"]},"swfstore":{"type":"js","path":"swfstore/swfstore-min.js","requires":["element","cookie","swf"]},"tabview":{"type":"js","path":"tabview/tabview-min.js","requires":["element"],"optional":["connection"],"skinnable":true},"treeview":{"type":"js","path":"treeview/treeview-min.js","requires":["event","dom"],"optional":["json","animation","calendar"],"skinnable":true},"uploader":{"type":"js","path":"uploader/uploader-min.js","requires":["element"]},"utilities":{"type":"js","path":"utilities/utilities.js","supersedes":["yahoo","event","dragdrop","animation","dom","connection","element","yahoo-dom-event","get","yuiloader","yuiloader-dom-event"],"rollup":8},"yahoo":{"type":"js","path":"yahoo/yahoo-min.js"},"yahoo-dom-event":{"type":"js","path":"yahoo-dom-event/yahoo-dom-event.js","supersedes":["yahoo","event","dom"],"rollup":3},"yuiloader":{"type":"js","path":"yuiloader/yuiloader-min.js","supersedes":["yahoo","get"]},"yuiloader-dom-event":{"type":"js","path":"yuiloader-dom-event/yuiloader-dom-event.js","supersedes":["yahoo","dom","event","get","yuiloader","yahoo-dom-event"],"rollup":5},"yuitest":{"type":"js","path":"yuitest/yuitest-min.js","requires":["logger"],"optional":["event-simulate"],"skinnable":true}}},ObjectUtil:{appendArray:function(o,a){if(a){for(var i=0;i<a.length;i=i+1){o[a[i]]=true;}}},keys:function(o,ordered){var a=[],i;for(i in o){if(lang.hasOwnProperty(o,i)){a.push(i);}}return a;}},ArrayUtil:{appendArray:function(a1,a2){Array.prototype.push.apply(a1,a2);},indexOf:function(a,val){for(var i=0;i<a.length;i=i+1){if(a[i]===val){return i;}}return-1;},toObject:function(a){var o={};for(var i=0;i<a.length;i=i+1){o[a[i]]=true;}return o;},uniq:function(a){return YUI.ObjectUtil.keys(YUI.ArrayUtil.toObject(a));}}};YAHOO.util.YUILoader=function(o){this._internalCallback=null;this._useYahooListener=false;this.onSuccess=null;this.onFailure=Y.log;this.onProgress=null;this.onTimeout=null;this.scope=this;this.data=null;this.insertBefore=null;this.charset=null;this.varName=null;this.base=YUI.info.base;this.comboBase=YUI.info.comboBase;this.combine=false;this.root=YUI.info.root;this.timeout=0;this.ignore=null;this.force=null;this.allowRollup=true;this.filter=null;this.required={};this.moduleInfo=lang.merge(YUI.info.moduleInfo);this.rollups=null;this.loadOptional=false;this.sorted=[];this.loaded={};this.dirty=true;this.inserted={};var self=this;env.listeners.push(function(m){if(self._useYahooListener){self.loadNext(m.name);}});this.skin=lang.merge(YUI.info.skin);this._config(o);};Y.util.YUILoader.prototype={FILTERS:{RAW:{"searchExp":"-min\\.js","replaceStr":".js"},DEBUG:{"searchExp":"-min\\.js","replaceStr":"-debug.js"}},SKIN_PREFIX:"skin-",_config:function(o){if(o){for(var i in o){if(lang.hasOwnProperty(o,i)){if(i=="require"){this.require(o[i]);}else{this[i]=o[i];}}}}var f=this.filter;if(lang.isString(f)){f=f.toUpperCase();if(f==="DEBUG"){this.require("logger");}if(!Y.widget.LogWriter){Y.widget.LogWriter=function(){return Y;};}this.filter=this.FILTERS[f];}},addModule:function(o){if(!o||!o.name||!o.type||(!o.path&&!o.fullpath)){return false;}o.ext=("ext"in o)?o.ext:true;o.requires=o.requires||[];this.moduleInfo[o.name]=o;this.dirty=true;return true;},require:function(what){var a=(typeof what==="string")?arguments:what;this.dirty=true;YUI.ObjectUtil.appendArray(this.required,a);},_addSkin:function(skin,mod){var name=this.formatSkin(skin),info=this.moduleInfo,sinf=this.skin,ext=info[mod]&&info[mod].ext;if(!info[name]){this.addModule({"name":name,"type":"css","path":sinf.base+skin+"/"+sinf.path,"after":sinf.after,"rollup":sinf.rollup,"ext":ext});}if(mod){name=this.formatSkin(skin,mod);if(!info[name]){var mdef=info[mod],pkg=mdef.pkg||mod;this.addModule({"name":name,"type":"css","after":sinf.after,"path":pkg+"/"+sinf.base+skin+"/"+mod+".css","ext":ext});}}return name;},getRequires:function(mod){if(!mod){return[];}if(!this.dirty&&mod.expanded){return mod.expanded;}mod.requires=mod.requires||[];var i,d=[],r=mod.requires,o=mod.optional,info=this.moduleInfo,m;for(i=0;i<r.length;i=i+1){d.push(r[i]);m=info[r[i]];YUI.ArrayUtil.appendArray(d,this.getRequires(m));}if(o&&this.loadOptional){for(i=0;i<o.length;i=i+1){d.push(o[i]);YUI.ArrayUtil.appendArray(d,this.getRequires(info[o[i]]));}}mod.expanded=YUI.ArrayUtil.uniq(d);return mod.expanded;},getProvides:function(name,notMe){var addMe=!(notMe),ckey=(addMe)?PROV:SUPER,m=this.moduleInfo[name],o={};if(!m){return o;}if(m[ckey]){return m[ckey];}var s=m.supersedes,done={},me=this;var add=function(mm){if(!done[mm]){done[mm]=true;lang.augmentObject(o,me.getProvides(mm));}};if(s){for(var i=0;i<s.length;i=i+1){add(s[i]);}}m[SUPER]=o;m[PROV]=lang.merge(o);m[PROV][name]=true;return m[ckey];},calculate:function(o){if(o||this.dirty){this._config(o);this._setup();this._explode();if(this.allowRollup){this._rollup();}this._reduce();this._sort();this.dirty=false;}},_setup:function(){var info=this.moduleInfo,name,i,j;for(name in info){if(lang.hasOwnProperty(info,name)){var m=info[name];if(m&&m.skinnable){var o=this.skin.overrides,smod;if(o&&o[name]){for(i=0;i<o[name].length;i=i+1){smod=this._addSkin(o[name][i],name);}}else{smod=this._addSkin(this.skin.defaultSkin,name);}m.requires.push(smod);}}}var l=lang.merge(this.inserted);if(!this._sandbox){l=lang.merge(l,env.modules);}if(this.ignore){YUI.ObjectUtil.appendArray(l,this.ignore);}if(this.force){for(i=0;i<this.force.length;i=i+1){if(this.force[i]in l){delete l[this.force[i]];}}}for(j in l){if(lang.hasOwnProperty(l,j)){lang.augmentObject(l,this.getProvides(j));}}this.loaded=l;},_explode:function(){var r=this.required,i,mod;for(i in r){if(lang.hasOwnProperty(r,i)){mod=this.moduleInfo[i];if(mod){var req=this.getRequires(mod);if(req){YUI.ObjectUtil.appendArray(r,req);}}}}},_skin:function(){},formatSkin:function(skin,mod){var s=this.SKIN_PREFIX+skin;if(mod){s=s+"-"+mod;}return s;},parseSkin:function(mod){if(mod.indexOf(this.SKIN_PREFIX)===0){var a=mod.split("-");return{skin:a[1],module:a[2]};}return null;},_rollup:function(){var i,j,m,s,rollups={},r=this.required,roll,info=this.moduleInfo;if(this.dirty||!this.rollups){for(i in info){if(lang.hasOwnProperty(info,i)){m=info[i];if(m&&m.rollup){rollups[i]=m;}}}this.rollups=rollups;}for(;;){var rolled=false;for(i in rollups){if(!r[i]&&!this.loaded[i]){m=info[i];s=m.supersedes;roll=false;if(!m.rollup){continue;}var skin=(m.ext)?false:this.parseSkin(i),c=0;if(skin){for(j in r){if(lang.hasOwnProperty(r,j)){if(i!==j&&this.parseSkin(j)){c++;roll=(c>=m.rollup);if(roll){break;}}}}}else{for(j=0;j<s.length;j=j+1){if(this.loaded[s[j]]&&(!YUI.dupsAllowed[s[j]])){roll=false;break;}else{if(r[s[j]]){c++;roll=(c>=m.rollup);if(roll){break;}}}}}if(roll){r[i]=true;rolled=true;this.getRequires(m);}}}if(!rolled){break;}}},_reduce:function(){var i,j,s,m,r=this.required;for(i in r){if(i in this.loaded){delete r[i];}else{var skinDef=this.parseSkin(i);if(skinDef){if(!skinDef.module){var skin_pre=this.SKIN_PREFIX+skinDef.skin;for(j in r){if(lang.hasOwnProperty(r,j)){m=this.moduleInfo[j];var ext=m&&m.ext;if(!ext&&j!==i&&j.indexOf(skin_pre)>-1){delete r[j];}}}}}else{m=this.moduleInfo[i];s=m&&m.supersedes;if(s){for(j=0;j<s.length;j=j+1){if(s[j]in r){delete r[s[j]];}}}}}}},_onFailure:function(msg){YAHOO.log("Failure","info","loader");var f=this.onFailure;if(f){f.call(this.scope,{msg:"failure: "+msg,data:this.data,success:false});}},_onTimeout:function(){YAHOO.log("Timeout","info","loader");var f=this.onTimeout;if(f){f.call(this.scope,{msg:"timeout",data:this.data,success:false});}},_sort:function(){var s=[],info=this.moduleInfo,loaded=this.loaded,checkOptional=!this.loadOptional,me=this;var requires=function(aa,bb){var mm=info[aa];if(loaded[bb]||!mm){return false;}var ii,rr=mm.expanded,after=mm.after,other=info[bb],optional=mm.optional;if(rr&&YUI.ArrayUtil.indexOf(rr,bb)>-1){return true;}if(after&&YUI.ArrayUtil.indexOf(after,bb)>-1){return true;}if(checkOptional&&optional&&YUI.ArrayUtil.indexOf(optional,bb)>-1){return true;}var ss=info[bb]&&info[bb].supersedes;if(ss){for(ii=0;ii<ss.length;ii=ii+1){if(requires(aa,ss[ii])){return true;}}}if(mm.ext&&mm.type=="css"&&!other.ext&&other.type=="css"){return true;}return false;};for(var i in this.required){if(lang.hasOwnProperty(this.required,i)){s.push(i);}}var p=0;for(;;){var l=s.length,a,b,j,k,moved=false;for(j=p;j<l;j=j+1){a=s[j];for(k=j+1;k<l;k=k+1){if(requires(a,s[k])){b=s.splice(k,1);s.splice(j,0,b[0]);moved=true;break;}}if(moved){break;}else{p=p+1;}}if(!moved){break;}}this.sorted=s;},toString:function(){var o={type:"YUILoader",base:this.base,filter:this.filter,required:this.required,loaded:this.loaded,inserted:this.inserted};lang.dump(o,1);},_combine:function(){this._combining=[];var self=this,s=this.sorted,len=s.length,js=this.comboBase,css=this.comboBase,target,startLen=js.length,i,m,type=this.loadType;YAHOO.log("type "+type);for(i=0;i<len;i=i+1){m=this.moduleInfo[s[i]];if(m&&!m.ext&&(!type||type===m.type)){target=this.root+m.path;target+="&";if(m.type=="js"){js+=target;}else{css+=target;}this._combining.push(s[i]);}}if(this._combining.length){YAHOO.log("Attempting to combine: "+this._combining,"info","loader");var callback=function(o){var c=this._combining,len=c.length,i,m;for(i=0;i<len;i=i+1){this.inserted[c[i]]=true;}this.loadNext(o.data);},loadScript=function(){if(js.length>startLen){YAHOO.util.Get.script(self._filter(js),{data:self._loading,onSuccess:callback,onFailure:self._onFailure,onTimeout:self._onTimeout,insertBefore:self.insertBefore,charset:self.charset,timeout:self.timeout,scope:self});}};if(css.length>startLen){YAHOO.util.Get.css(this._filter(css),{data:this._loading,onSuccess:loadScript,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,scope:self});}else{loadScript();}return;}else{this.loadNext(this._loading);}},insert:function(o,type){this.calculate(o);this._loading=true;this.loadType=type;if(this.combine){return this._combine();}if(!type){var self=this;this._internalCallback=function(){self._internalCallback=null;self.insert(null,"js");};this.insert(null,"css");return;}this.loadNext();},sandbox:function(o,type){this._config(o);if(!this.onSuccess){throw new Error("You must supply an onSuccess handler for your sandbox");}this._sandbox=true;var self=this;if(!type||type!=="js"){this._internalCallback=function(){self._internalCallback=null;self.sandbox(null,"js");};this.insert(null,"css");return;}if(!util.Connect){var ld=new YAHOO.util.YUILoader();ld.insert({base:this.base,filter:this.filter,require:"connection",insertBefore:this.insertBefore,charset:this.charset,onSuccess:function(){this.sandbox(null,"js");},scope:this},"js");return;}this._scriptText=[];this._loadCount=0;this._stopCount=this.sorted.length;this._xhr=[];this.calculate();var s=this.sorted,l=s.length,i,m,url;for(i=0;i<l;i=i+1){m=this.moduleInfo[s[i]];if(!m){this._onFailure("undefined module "+m);for(var j=0;j<this._xhr.length;j=j+1){this._xhr[j].abort();}return;}if(m.type!=="js"){this._loadCount++;continue;}url=m.fullpath;url=(url)?this._filter(url):this._url(m.path);var xhrData={success:function(o){var idx=o.argument[0],name=o.argument[2];this._scriptText[idx]=o.responseText;if(this.onProgress){this.onProgress.call(this.scope,{name:name,scriptText:o.responseText,xhrResponse:o,data:this.data});}this._loadCount++;if(this._loadCount>=this._stopCount){var v=this.varName||"YAHOO";var t="(function() {\n";var b="\nreturn "+v+";\n})();";var ref=eval(t+this._scriptText.join("\n")+b);this._pushEvents(ref);if(ref){this.onSuccess.call(this.scope,{reference:ref,data:this.data});}else{this._onFailure.call(this.varName+" reference failure");}}},failure:function(o){this.onFailure.call(this.scope,{msg:"XHR failure",xhrResponse:o,data:this.data});},scope:this,argument:[i,url,s[i]]};this._xhr.push(util.Connect.asyncRequest("GET",url,xhrData));}},loadNext:function(mname){if(!this._loading){return;}if(mname){if(mname!==this._loading){return;}this.inserted[mname]=true;if(this.onProgress){this.onProgress.call(this.scope,{name:mname,data:this.data});}}var s=this.sorted,len=s.length,i,m;for(i=0;i<len;i=i+1){if(s[i]in this.inserted){continue;}if(s[i]===this._loading){return;}m=this.moduleInfo[s[i]];if(!m){this.onFailure.call(this.scope,{msg:"undefined module "+m,data:this.data});return;}if(!this.loadType||this.loadType===m.type){this._loading=s[i];var fn=(m.type==="css")?util.Get.css:util.Get.script,url=m.fullpath,self=this,c=function(o){self.loadNext(o.data);};url=(url)?this._filter(url):this._url(m.path);if(env.ua.webkit&&env.ua.webkit<420&&m.type==="js"&&!m.varName){c=null;this._useYahooListener=true;}fn(url,{data:s[i],onSuccess:c,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,varName:m.varName,scope:self});return;}}this._loading=null;if(this._internalCallback){var f=this._internalCallback;this._internalCallback=null;f.call(this);}else{if(this.onSuccess){this._pushEvents();this.onSuccess.call(this.scope,{data:this.data});}}},_pushEvents:function(ref){var r=ref||YAHOO;if(r.util&&r.util.Event){r.util.Event._load();}},_filter:function(str){var f=this.filter;return(f)?str.replace(new RegExp(f.searchExp,"g"),f.replaceStr):str;},_url:function(path){return this._filter((this.base||"")+path);}};})();YAHOO.register("yuiloader",YAHOO.util.YUILoader,{version:"2.8.2",build:"19"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||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="ownerDocument",n="defaultView",v="documentElement",t="compatMode",b="offsetLeft",P="offsetTop",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":"for","className":g},DOT_ATTRIBUTES:{},get:function(z){var AB,x,AA,y,Y,G;if(z){if(z[l]||z.item){return z;}if(typeof z==="string"){AB=z;z=K.getElementById(z);G=(z)?z.attributes:null;if(z&&G&&G.id&&G.id.value===AB){return z;}else{if(z&&K.all){z=null;x=K.all[AB];for(y=0,Y=x.length;y<Y;++y){if(x[y].id===AB){return x[y];}}}}return z;}if(YAHOO.util.Element&&z instanceof YAHOO.util.Element){z=z.get("element");}if("length"in z){AA=[];for(y=0,Y=z.length;y<Y;++y){AA[AA.length]=E.Dom.get(z[y]);}return AA;}return z;}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: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="cssFloat":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){try{x=G.filters("alpha").opacity;}catch(Y){}}return x/100;case"float":y="styleFloat";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});},_setStyle: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="alpha(opacity="+y*100+")";if(!Y[a]||!Y[a].hasLayout){Y.style.zoom=1;}}break;case"float":x="styleFloat";default: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:function(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.Dom.getDocumentScrollTop(AF);AG=[AB(AA[j]),AB(AA[o])];if(T&&m.ie<8){AE=2;AD=2;AC=AF[t];if(m.ie===6){if(AC!==c){AE=0;AD=0;}}if((AC===c)){G=S(AF[v],q);x=S(AF[v],R);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(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.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){var 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.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=[parseInt(E.Dom.getComputedStyle(G,j),10),parseInt(E.Dom.getComputedStyle(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(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,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,noRetry: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;if(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();},getElementsByClassName:function(AB,AF,AC,AE,x,AD){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.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._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: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);},_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.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{}return Y;},replaceClass:function(x,Y,G){return E.Dom.batch(x,E.Dom._replaceClass,{from:Y,to:G});},_replaceClass:function(y,x){var Y,AB,AA,G=false,z;if(y&&x){AB=x.from;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";var Y=function(y){if(y&&y.id){return y.id;}var z=x+YAHOO.env._id_counter++;if(y){if(y[e]&&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.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.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(AF);for(var z=0,AA=G.length;z<AA;++z){if(Y(G[z])){if(AE){x=G[z];break;}else{x[x.length]=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,AB,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;},getDocumentHeight: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());return 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: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){while((G=G[Z])){if(E.Dom._testElement(G,Y)){return G;}}return null;},getAncestorByClassName:function(Y,G){Y=E.Dom.get(Y);if(!Y){return null;}var x=function(y){return 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);},getPreviousSiblingBy: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 null;},getNextSibling:function(G){G=E.Dom.get(G);if(!G){return null;}return E.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,x){var Y=(E.Dom._testElement(G.firstChild,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.getFirstChildBy(G);},getLastChildBy: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);},getLastChild:function(G){G=E.Dom.get(G);return E.Dom.getLastChildBy(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 false;});return G;},getChildren:function(G){G=E.Dom.get(G);if(!G){}return E.Dom.getChildrenBy(G);},getDocumentScrollLeft: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){return G[Z].insertBefore(Y,G.nextSibling);}else{return G[Z].appendChild(Y);}},getClientRegion:function(){var x=E.Dom.getDocumentScrollTop(),Y=E.Dom.getDocumentScrollLeft(),y=E.Dom.getViewportWidth()+Y,G=E.Dom.getViewportHeight()+x;return new E.Region(x,y,G,Y);},setAttribute:function(Y,G,x){E.Dom.batch(Y,E.Dom._setAttribute,{attr:G,val:x});},_setAttribute:function(x,Y){var G=E.Dom._toCamel(Y.attr),y=Y.val;if(x&&x.setAttribute){if(E.Dom.DOT_ATTRIBUTES[G]){x[G]=y;}else{G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;x.setAttribute(G,y);}}else{}},getAttribute:function(Y,G){return E.Dom.batch(Y,E.Dom._getAttribute,G);},_getAttribute:function(Y,G){var x;G=E.Dom.CUSTOM_ATTRIBUTES[G]||G;if(Y&&Y.getAttribute){x=Y.getAttribute(G,2);}else{}return x;},_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!==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 RegExp(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=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]=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;};}if(m.ie&&m.ie>=8&&K.documentElement.hasAttribute){E.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.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;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top),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.bottom,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+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D),C=F[1],E=F[0]+D.offsetWidth,A=F[1]+D.offsetHeight,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.constructor.call(this,B,A,B,A);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){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="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|deg|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.ComputedStyle.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;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.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;},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);}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.getMargin;C.visibility=M.getVisibility;C.borderColor=C.borderTopColor=C.borderRightColor=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=YAHOO.util;D.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"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.KEYWORDS[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: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();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.8.2",build:"19"});YAHOO.util.CustomEvent=function(D,C,B,A,E){this.type=D;this.scope=C||window;this.silent=B;this.fireOnce=E;this.fired=false;this.firedWith=null;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var F="_YUICEOnSubscribe";if(D!==F){this.subscribeEvent=new YAHOO.util.CustomEvent(F,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(B,C,D){if(!B){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(B,C,D);}var A=new YAHOO.util.Subscriber(B,C,D);if(this.fireOnce&&this.fired){this.notify(A,this.firedWith);}else{this.subscribers.push(A);}},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true;}}return E;},fire:function(){this.lastError=null;var H=[],A=this.subscribers.length;var D=[].slice.call(arguments,0),C=true,F,B=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=D;}}this.fired=true;if(!A&&this.silent){return true;}if(!this.silent){}var E=this.subscribers.slice();for(F=0;F<A;++F){var G=E[F];if(!G){B=true;}else{C=this.notify(G,D);if(false===C){if(!this.silent){}break;}}}return(C!==false);},notify:function(F,C){var B,H=null,E=F.getScope(this.scope),A=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(C.length>0){H=C[0];}try{B=F.fn.call(E,H,F.obj);}catch(G){this.lastError=G;if(A){throw G;}}}else{try{B=F.fn.call(E,this.type,C,F.obj);}catch(D){this.lastError=D;if(A){throw D;}}}return B;},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.splice(A,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(A,B,C){this.fn=A;this.obj=YAHOO.lang.isUndefined(B)?null:B;this.overrideContext=C;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var G=false,H=[],J=[],A=0,E=[],B=0,C={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},D=YAHOO.env.ua.ie,F="focusin",I="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:D,_interval:null,_dri:null,_specialTypes:{focusin:(D?"focusin":"focus"),focusout:(D?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(Q,M,O,P,N){var K=(YAHOO.lang.isString(Q))?[Q]:Q;for(var L=0;L<K.length;L=L+1){E.push({id:K[L],fn:M,obj:O,overrideContext:P,checkReady:N});}A=this.POLL_RETRYS;this.startInterval();},onContentReady:function(N,K,L,M){this.onAvailable(N,K,L,M,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(M,K,V,P,T,Y){if(!V||!V.call){return false;}if(this._isValidCollection(M)){var W=true;for(var Q=0,S=M.length;Q<S;++Q){W=this.on(M[Q],K,V,P,T)&&W;}return W;}else{if(YAHOO.lang.isString(M)){var O=this.getEl(M);if(O){M=O;}else{this.onAvailable(M,function(){YAHOO.util.Event._addListener(M,K,V,P,T,Y);});return true;}}}if(!M){return false;}if("unload"==K&&P!==this){J[J.length]=[M,K,V,P,T];return true;}var L=M;if(T){if(T===true){L=P;}else{L=T;}}var N=function(Z){return V.call(L,YAHOO.util.Event.getEvent(Z,M),P);};var X=[M,K,V,N,L,P,T,Y];var R=H.length;H[R]=X;try{this._simpleAdd(M,K,N,Y);}catch(U){this.lastError=U;this.removeListener(M,K,V);return false;}return true;},_getType:function(K){return this._specialTypes[K]||K;},addListener:function(M,P,L,N,O){var K=((P==F||P==I)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(M,this._getType(P),L,N,O,K);},addFocusListener:function(L,K,M,N){return this.on(L,F,K,M,N);},removeFocusListener:function(L,K){return this.removeListener(L,F,K);},addBlurListener:function(L,K,M,N){return this.on(L,I,K,M,N);},removeBlurListener:function(L,K){return this.removeListener(L,I,K);},removeListener:function(L,K,R){var M,P,U;K=this._getType(K);if(typeof L=="string"){L=this.getEl(L);}else{if(this._isValidCollection(L)){var S=true;for(M=L.length-1;M>-1;M--){S=(this.removeListener(L[M],K,R)&&S);}return S;}}if(!R||!R.call){return this.purgeElement(L,false,K);}if("unload"==K){for(M=J.length-1;M>-1;M--){U=J[M];if(U&&U[0]==L&&U[1]==K&&U[2]==R){J.splice(M,1);return true;}}return false;}var N=null;var O=arguments[3];if("undefined"===typeof O){O=this._getCacheIndex(H,L,K,R);}if(O>=0){N=H[O];}if(!L||!N){return false;}var T=N[this.CAPTURE]===true?true:false;try{this._simpleRemove(L,K,N[this.WFN],T);}catch(Q){this.lastError=Q;return false;}delete H[O][this.WFN];delete H[O][this.FN];H.splice(O,1);return true;},getTarget:function(M,L){var K=M.target||M.srcElement;return this.resolveTextNode(K);},resolveTextNode:function(L){try{if(L&&3==L.nodeType){return L.parentNode;}}catch(K){}return L;},getPageX:function(L){var K=L.pageX;if(!K&&0!==K){K=L.clientX||0;if(this.isIE){K+=this._getScrollLeft();}}return K;},getPageY:function(K){var L=K.pageY;if(!L&&0!==L){L=K.clientY||0;if(this.isIE){L+=this._getScrollTop();}}return L;},getXY:function(K){return[this.getPageX(K),this.getPageY(K)];},getRelatedTarget:function(L){var K=L.relatedTarget;if(!K){if(L.type=="mouseout"){K=L.toElement;}else{if(L.type=="mouseover"){K=L.fromElement;}}}return this.resolveTextNode(K);},getTime:function(M){if(!M.time){var L=new Date().getTime();try{M.time=L;}catch(K){this.lastError=K;return L;}}return M.time;},stopEvent:function(K){this.stopPropagation(K);this.preventDefault(K);},stopPropagation:function(K){if(K.stopPropagation){K.stopPropagation();}else{K.cancelBubble=true;}},preventDefault:function(K){if(K.preventDefault){K.preventDefault();}else{K.returnValue=false;}},getEvent:function(M,K){var L=M||window.event;if(!L){var N=this.getEvent.caller;while(N){L=N.arguments[0];if(L&&Event==L.constructor){break;}N=N.caller;}}return L;},getCharCode:function(L){var K=L.keyCode||L.charCode||0;if(YAHOO.env.ua.webkit&&(K in C)){K=C[K];}return K;},_getCacheIndex:function(M,P,Q,O){for(var N=0,L=M.length;N<L;N=N+1){var K=M[N];if(K&&K[this.FN]==O&&K[this.EL]==P&&K[this.TYPE]==Q){return N;}}return-1;},generateId:function(K){var L=K.id;if(!L){L="yuievtautoid-"+B;++B;K.id=L;}return L;},_isValidCollection:function(L){try{return(L&&typeof L!=="string"&&L.length&&!L.tagName&&!L.alert&&typeof L[0]!=="undefined");}catch(K){return false;}},elCache:{},getEl:function(K){return(typeof K==="string")?document.getElementById(K):K;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(L){if(!G){G=true;var K=YAHOO.util.Event;K._ready();K._tryPreloadAttach();}},_ready:function(L){var K=YAHOO.util.Event;if(!K.DOMReady){K.DOMReady=true;K.DOMReadyEvent.fire();K._simpleRemove(document,"DOMContentLoaded",K._ready);}},_tryPreloadAttach:function(){if(E.length===0){A=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var Q=!G;if(!Q){Q=(A>0&&E.length>0);}var P=[];var R=function(T,U){var S=T;if(U.overrideContext){if(U.overrideContext===true){S=U.obj;}else{S=U.overrideContext;}}U.fn.call(S,U.obj);};var L,K,O,N,M=[];for(L=0,K=E.length;L<K;L=L+1){O=E[L];if(O){N=this.getEl(O.id);if(N){if(O.checkReady){if(G||N.nextSibling||!Q){M.push(O);E[L]=null;}}else{R(N,O);E[L]=null;}}else{P.push(O);}}}for(L=0,K=M.length;L<K;L=L+1){O=M[L];R(this.getEl(O.id),O);}A--;if(Q){for(L=E.length-1;L>-1;L--){O=E[L];if(!O||!O.id){E.splice(L,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(O,P,R){var M=(YAHOO.lang.isString(O))?this.getEl(O):O;var Q=this.getListeners(M,R),N,K;if(Q){for(N=Q.length-1;N>-1;N--){var L=Q[N];this.removeListener(M,L.type,L.fn);}}if(P&&M&&M.childNodes){for(N=0,K=M.childNodes.length;N<K;++N){this.purgeElement(M.childNodes[N],P,R);}}},getListeners:function(M,K){var P=[],L;if(!K){L=[H,J];}else{if(K==="unload"){L=[J];}else{K=this._getType(K);L=[H];}}var R=(YAHOO.lang.isString(M))?this.getEl(M):M;for(var O=0;O<L.length;O=O+1){var T=L[O];if(T){for(var Q=0,S=T.length;Q<S;++Q){var N=T[Q];if(N&&N[this.EL]===R&&(!K||K===N[this.TYPE])){P.push({type:N[this.TYPE],fn:N[this.FN],obj:N[this.OBJ],adjust:N[this.OVERRIDE],scope:N[this.ADJ_SCOPE],index:Q});}}}}return(P.length)?P:null;},_unload:function(R){var L=YAHOO.util.Event,O,N,M,Q,P,S=J.slice(),K;for(O=0,Q=J.length;O<Q;++O){M=S[O];if(M){K=window;if(M[L.ADJ_SCOPE]){if(M[L.ADJ_SCOPE]===true){K=M[L.UNLOAD_OBJ];}else{K=M[L.ADJ_SCOPE];}}M[L.FN].call(K,L.getEvent(R,M[L.EL]),M[L.UNLOAD_OBJ]);S[O]=null;}}M=null;K=null;J=null;if(H){for(N=H.length-1;N>-1;N--){M=H[N];if(M){L.removeListener(M[L.EL],M[L.TYPE],M[L.FN],N);}}M=null;}L._simpleRemove(window,"unload",L._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var K=document.documentElement,L=document.body;if(K&&(K.scrollTop||K.scrollLeft)){return[K.scrollTop,K.scrollLeft];}else{if(L){return[L.scrollTop,L.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(M,N,L,K){M.addEventListener(N,L,(K));};}else{if(window.attachEvent){return function(M,N,L,K){M.attachEvent("on"+N,L);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(M,N,L,K){M.removeEventListener(N,L,(K));};}else{if(window.detachEvent){return function(L,M,K){L.detachEvent("on"+M,K);};}else{return function(){};}}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;EU.onFocus=EU.addFocusListener;EU.onBlur=EU.addBlurListener;if(EU.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;EU._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var n=document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll("left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null;}catch(ex){}},EU.POLL_INTERVAL);}}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU._dri=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready);}}EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,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(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(B,G){this.__yui_events=this.__yui_events||{};var E=G||{},D=this.__yui_events,F;if(D[B]){}else{F=new YAHOO.util.CustomEvent(B,E.scope||this,E.silent,YAHOO.util.CustomEvent.FLAT,E.fireOnce);D[B]=F;if(E.onSubscribeCallback){F.subscribeEvent.subscribe(E.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var A=this.__yui_subscribers[B];if(A){for(var C=0;C<A.length;++C){F.subscribe(A[C].fn,A[C].obj,A[C].overrideContext);}}}return D[B];},fireEvent:function(B){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[B];if(!D){return null;}var A=[];for(var C=1;C<arguments.length;++C){A.push(arguments[C]);}return D.fire.apply(D,A);},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true;}}return false;}};(function(){var A=YAHOO.util.Event,C=YAHOO.lang;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("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.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);}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.enabled){A.removeListener(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=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.8.2",build:"19"});YAHOO.util.Connect={_msxml_progid:["Microsoft.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:"application/x-www-form-urlencoded; charset=UTF-8",_default_form_header:"application/x-www-form-urlencoded",_use_default_xhr_header:true,_default_xhr_header:"XMLHttpRequest",_has_default_headers:true,_default_headers:{},_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,startEvent:new YAHOO.util.CustomEvent("start"),completeEvent:new YAHOO.util.CustomEvent("complete"),successEvent:new YAHOO.util.CustomEvent("success"),failureEvent:new YAHOO.util.CustomEvent("failure"),abortEvent:new YAHOO.util.CustomEvent("abort"),_customEvents:{onStart:["startEvent","start"],onComplete:["completeEvent","complete"],onSuccess:["successEvent","success"],onFailure:["failureEvent","failure"],onUpload:["uploadEvent","upload"],onAbort:["abortEvent","abort"]},setProgId:function(A){this._msxml_progid.unshift(A);},setDefaultPostHeader:function(A){if(typeof A=="string"){this._default_post_header=A;}else{if(typeof A=="boolean"){this._use_default_post_header=A;}}},setDefaultXhrHeader:function(A){if(typeof A=="string"){this._default_xhr_header=A;}else{this._use_default_xhr_header=A;}},setPollingInterval:function(A){if(typeof A=="number"&&isFinite(A)){this._polling_interval=A;}},createXhrObject:function(F){var D,A,B;try{A=new XMLHttpRequest();D={conn:A,tId:F,xhr:true};}catch(C){for(B=0;B<this._msxml_progid.length;++B){try{A=new ActiveXObject(this._msxml_progid[B]);D={conn:A,tId:F,xhr:true};break;}catch(E){}}}finally{return D;}},getConnectionObject:function(A){var C,D=this._transaction_id;try{if(!A){C=this.createXhrObject(D);}else{C={tId:D};if(A==="xdr"){C.conn=this._transport;C.xdr=true;}else{if(A==="upload"){C.upload=true;}}}if(C){this._transaction_id++;}}catch(B){}return C;},asyncRequest:function(G,D,F,A){var E,C,B=(F&&F.argument)?F.argument:null;if(this._isFileUpload){C="upload";}else{if(F.xdr){C="xdr";}}E=this.getConnectionObject(C);if(!E){return null;}else{if(F&&F.customevents){this.initCustomEvents(E,F);}if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(E,F,D,A);return E;}if(G.toUpperCase()=="GET"){if(this._sFormData.length!==0){D+=((D.indexOf("?")==-1)?"?":"&")+this._sFormData;}}else{if(G.toUpperCase()=="POST"){A=A?this._sFormData+"&"+A:this._sFormData;}}}if(G.toUpperCase()=="GET"&&(F&&F.cache===false)){D+=((D.indexOf("?")==-1)?"?":"&")+"rnd="+new Date().valueOf().toString();}if(this._use_default_xhr_header){if(!this._default_headers["X-Requested-With"]){this.initHeader("X-Requested-With",this._default_xhr_header,true);}}if((G.toUpperCase()==="POST"&&this._use_default_post_header)&&this._isFormSubmit===false){this.initHeader("Content-Type",this._default_post_header);}if(E.xdr){this.xdr(E,G,D,F,A);return E;}E.conn.open(G,D,true);if(this._has_default_headers||this._has_http_headers){this.setHeader(E);}this.handleReadyState(E,F);E.conn.send(A||"");if(this._isFormSubmit===true){this.resetFormState();}this.startEvent.fire(E,B);if(E.startEvent){E.startEvent.fire(E,B);}return E;}},initCustomEvents:function(A,C){var B;for(B in C.customevents){if(this._customEvents[B][0]){A[this._customEvents[B][0]]=new YAHOO.util.CustomEvent(this._customEvents[B][1],(C.scope)?C.scope:null);A[this._customEvents[B][0]].subscribe(C.customevents[B]);}}},handleReadyState:function(C,D){var B=this,A=(D&&D.argument)?D.argument:null;if(D&&D.timeout){this._timeOut[C.tId]=window.setTimeout(function(){B.abort(C,D,true);},D.timeout);}this._poll[C.tId]=window.setInterval(function(){if(C.conn&&C.conn.readyState===4){window.clearInterval(B._poll[C.tId]);delete B._poll[C.tId];if(D&&D.timeout){window.clearTimeout(B._timeOut[C.tId]);delete B._timeOut[C.tId];}B.completeEvent.fire(C,A);if(C.completeEvent){C.completeEvent.fire(C,A);}B.handleTransactionResponse(C,D);}},this._polling_interval);},handleTransactionResponse:function(B,I,D){var E,A,G=(I&&I.argument)?I.argument:null,C=(B.r&&B.r.statusText==="xdr:success")?true:false,H=(B.r&&B.r.statusText==="xdr:failure")?true:false,J=D;try{if((B.conn.status!==undefined&&B.conn.status!==0)||C){E=B.conn.status;}else{if(H&&!J){E=0;}else{E=13030;}}}catch(F){E=13030;}if((E>=200&&E<300)||E===1223||C){A=B.xdr?B.r:this.createResponseObject(B,G);if(I&&I.success){if(!I.scope){I.success(A);}else{I.success.apply(I.scope,[A]);}}this.successEvent.fire(A);if(B.successEvent){B.successEvent.fire(A);}}else{switch(E){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:A=this.createExceptionObject(B.tId,G,(D?D:false));if(I&&I.failure){if(!I.scope){I.failure(A);}else{I.failure.apply(I.scope,[A]);}}break;default:A=(B.xdr)?B.response:this.createResponseObject(B,G);if(I&&I.failure){if(!I.scope){I.failure(A);}else{I.failure.apply(I.scope,[A]);}}}this.failureEvent.fire(A);if(B.failureEvent){B.failureEvent.fire(A);}}this.releaseObject(B);A=null;},createResponseObject:function(A,G){var D={},I={},E,C,F,B;try{C=A.conn.getAllResponseHeaders();F=C.split("\n");for(E=0;E<F.length;E++){B=F[E].indexOf(":");if(B!=-1){I[F[E].substring(0,B)]=YAHOO.lang.trim(F[E].substring(B+2));}}}catch(H){}D.tId=A.tId;D.status=(A.conn.status==1223)?204:A.conn.status;D.statusText=(A.conn.status==1223)?"No Content":A.conn.statusText;D.getResponseHeader=I;D.getAllResponseHeaders=C;D.responseText=A.conn.responseText;D.responseXML=A.conn.responseXML;if(G){D.argument=G;}return D;},createExceptionObject:function(H,D,A){var F=0,G="communication failure",C=-1,B="transaction aborted",E={};E.tId=H;if(A){E.status=C;E.statusText=B;}else{E.status=F;E.statusText=G;}if(D){E.argument=D;}return E;},initHeader:function(A,D,C){var B=(C)?this._default_headers:this._http_headers;B[A]=D;if(C){this._has_default_headers=true;}else{this._has_http_headers=true;}},setHeader:function(A){var B;if(this._has_default_headers){for(B in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,B)){A.conn.setRequestHeader(B,this._default_headers[B]);}}}if(this._has_http_headers){for(B in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,B)){A.conn.setRequestHeader(B,this._http_headers[B]);}}this._http_headers={};this._has_http_headers=false;}},resetDefaultHeaders:function(){this._default_headers={};this._has_default_headers=false;},abort:function(E,G,A){var D,B=(G&&G.argument)?G.argument:null;E=E||{};if(E.conn){if(E.xhr){if(this.isCallInProgress(E)){E.conn.abort();window.clearInterval(this._poll[E.tId]);delete this._poll[E.tId];if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId];}D=true;}}else{if(E.xdr){E.conn.abort(E.tId);D=true;}}}else{if(E.upload){var C="yuiIO"+E.tId;var F=document.getElementById(C);if(F){YAHOO.util.Event.removeListener(F,"load");document.body.removeChild(F);if(A){window.clearTimeout(this._timeOut[E.tId]);delete this._timeOut[E.tId];}D=true;}}else{D=false;}}if(D===true){this.abortEvent.fire(E,B);if(E.abortEvent){E.abortEvent.fire(E,B);}this.handleTransactionResponse(E,G,true);}return D;},isCallInProgress:function(A){A=A||{};if(A.xhr&&A.conn){return A.conn.readyState!==4&&A.conn.readyState!==0;}else{if(A.xdr&&A.conn){return A.conn.isCallInProgress(A.tId);}else{if(A.upload===true){return document.getElementById("yuiIO"+A.tId)?true:false;}else{return false;}}}},releaseObject:function(A){if(A&&A.conn){A.conn=null;A=null;}}};(function(){var G=YAHOO.util.Connect,H={};function D(I){var J='<object id="YUIConnectionSwf" type="application/x-shockwave-flash" data="'+I+'" width="0" height="0">'+'<param name="movie" value="'+I+'">'+'<param name="allowScriptAccess" value="always">'+"</object>",K=document.createElement("div");document.body.appendChild(K);K.innerHTML=J;}function B(L,I,J,M,K){H[parseInt(L.tId)]={"o":L,"c":M};if(K){M.method=I;M.data=K;}L.conn.send(J,M,L.tId);}function E(I){D(I);G._transport=document.getElementById("YUIConnectionSwf");}function C(){G.xdrReadyEvent.fire();}function A(J,I){if(J){G.startEvent.fire(J,I.argument);if(J.startEvent){J.startEvent.fire(J,I.argument);}}}function F(J){var K=H[J.tId].o,I=H[J.tId].c;if(J.statusText==="xdr:start"){A(K,I);return;}J.responseText=decodeURI(J.responseText);K.r=J;if(I.argument){K.r.argument=I.argument;}this.handleTransactionResponse(K,I,J.statusText==="xdr:abort"?true:false);delete H[J.tId];}G.xdr=B;G.swf=D;G.transport=E;G.xdrReadyEvent=new YAHOO.util.CustomEvent("xdrReady");G.xdrReady=C;G.handleXdrResponse=F;})();(function(){var D=YAHOO.util.Connect,F=YAHOO.util.Event;D._isFormSubmit=false;D._isFileUpload=false;D._formNode=null;D._sFormData=null;D._submitElementValue=null;D.uploadEvent=new YAHOO.util.CustomEvent("upload"),D._hasSubmitListener=function(){if(F){F.addListener(document,"click",function(J){var I=F.getTarget(J),H=I.nodeName.toLowerCase();if((H==="input"||H==="button")&&(I.type&&I.type.toLowerCase()=="submit")){D._submitElementValue=encodeURIComponent(I.name)+"="+encodeURIComponent(I.value);}});return true;}return false;}();function G(T,O,J){var S,I,R,P,W,Q=false,M=[],V=0,L,N,K,U,H;this.resetFormState();if(typeof T=="string"){S=(document.getElementById(T)||document.forms[T]);}else{if(typeof T=="object"){S=T;}else{return;}}if(O){this.createFrame(J?J:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=S;return;}for(L=0,N=S.elements.length;L<N;++L){I=S.elements[L];W=I.disabled;R=I.name;if(!W&&R){R=encodeURIComponent(R)+"=";P=encodeURIComponent(I.value);switch(I.type){case"select-one":if(I.selectedIndex>-1){H=I.options[I.selectedIndex];M[V++]=R+encodeURIComponent((H.attributes.value&&H.attributes.value.specified)?H.value:H.text);}break;case"select-multiple":if(I.selectedIndex>-1){for(K=I.selectedIndex,U=I.options.length;K<U;++K){H=I.options[K];if(H.selected){M[V++]=R+encodeURIComponent((H.attributes.value&&H.attributes.value.specified)?H.value:H.text);}}}break;case"radio":case"checkbox":if(I.checked){M[V++]=R+P;}break;case"file":case undefined:case"reset":case"button":break;case"submit":if(Q===false){if(this._hasSubmitListener&&this._submitElementValue){M[V++]=this._submitElementValue;}Q=true;}break;default:M[V++]=R+P;}}}this._isFormSubmit=true;this._sFormData=M.join("&");this.initHeader("Content-Type",this._default_form_header);return this._sFormData;}function C(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData="";}function B(H){var I="yuiIO"+this._transaction_id,J;if(YAHOO.env.ua.ie){J=document.createElement('<iframe id="'+I+'" name="'+I+'" />');if(typeof H=="boolean"){J.src="javascript:false";}}else{J=document.createElement("iframe");J.id=I;J.name=I;}J.style.position="absolute";J.style.top="-1000px";J.style.left="-1000px";document.body.appendChild(J);}function E(H){var K=[],I=H.split("&"),J,L;for(J=0;J<I.length;J++){L=I[J].indexOf("=");if(L!=-1){K[J]=document.createElement("input");K[J].type="hidden";K[J].name=decodeURIComponent(I[J].substring(0,L));K[J].value=decodeURIComponent(I[J].substring(L+1));this._formNode.appendChild(K[J]);}}return K;}function A(K,V,L,J){var Q="yuiIO"+K.tId,R="multipart/form-data",T=document.getElementById(Q),M=(document.documentMode&&document.documentMode===8)?true:false,W=this,S=(V&&V.argument)?V.argument:null,U,P,I,O,H,N;H={action:this._formNode.getAttribute("action"),method:this._formNode.getAttribute("method"),target:this._formNode.getAttribute("target")};this._formNode.setAttribute("action",L);this._formNode.setAttribute("method","POST");this._formNode.setAttribute("target",Q);if(YAHOO.env.ua.ie&&!M){this._formNode.setAttribute("encoding",R);}else{this._formNode.setAttribute("enctype",R);}if(J){U=this.appendPostData(J);}this._formNode.submit();this.startEvent.fire(K,S);if(K.startEvent){K.startEvent.fire(K,S);}if(V&&V.timeout){this._timeOut[K.tId]=window.setTimeout(function(){W.abort(K,V,true);},V.timeout);}if(U&&U.length>0){for(P=0;P<U.length;P++){this._formNode.removeChild(U[P]);}}for(I in H){if(YAHOO.lang.hasOwnProperty(H,I)){if(H[I]){this._formNode.setAttribute(I,H[I]);}else{this._formNode.removeAttribute(I);}}}this.resetFormState();N=function(){if(V&&V.timeout){window.clearTimeout(W._timeOut[K.tId]);delete W._timeOut[K.tId];}W.completeEvent.fire(K,S);if(K.completeEvent){K.completeEvent.fire(K,S);}O={tId:K.tId,argument:V.argument};try{O.responseText=T.contentWindow.document.body?T.contentWindow.document.body.innerHTML:T.contentWindow.document.documentElement.textContent;O.responseXML=T.contentWindow.document.XMLDocument?T.contentWindow.document.XMLDocument:T.contentWindow.document;}catch(X){}if(V&&V.upload){if(!V.scope){V.upload(O);}else{V.upload.apply(V.scope,[O]);}}W.uploadEvent.fire(O);if(K.uploadEvent){K.uploadEvent.fire(O);}F.removeListener(T,"load",N);setTimeout(function(){document.body.removeChild(T);W.releaseObject(K);},100);};F.addListener(T,"load",N);}D.setForm=G;D.resetFormState=C;D.createFrame=B;D.appendPostData=E;D.uploadFile=A;})();YAHOO.register("connection",YAHOO.util.Connect,{version:"2.8.2",build:"19"});(function(){var B=YAHOO.util;var A=function(D,C,E,F){if(!D){}this.init(D,C,E,F);};A.NAME="Anim";A.prototype={toString:function(){var C=this.getEl()||{};var D=C.id||C.tagName;return(this.constructor.NAME+": "+D);},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(C,E,D){return this.method(this.currentFrame,E,D-E,this.totalFrames);},setAttribute:function(C,F,E){var D=this.getEl();if(this.patterns.noNegatives.test(C)){F=(F>0)?F:0;}if(C in D&&!("style"in D&&C in D.style)){D[C]=F;}else{B.Dom.setStyle(D,C,F+E);}},getAttribute:function(C){var E=this.getEl();var G=B.Dom.getStyle(E,C);if(G!=="auto"&&!this.patterns.offsetUnit.test(G)){return parseFloat(G);}var D=this.patterns.offsetAttribute.exec(C)||[];var H=!!(D[3]);var F=!!(D[2]);if("style"in E){if(F||(B.Dom.getStyle(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"";},setRuntimeAttribute:function(D){var I;var E;var F=this.attributes;this.runtimeAttributes[D]={};var H=function(J){return(typeof J!=="undefined");};if(!H(F[D]["to"])&&!H(F[D]["by"])){return false;}I=(H(F[D]["from"]))?F[D]["from"]:this.getAttribute(D);if(H(F[D]["to"])){E=F[D]["to"];}else{if(H(F[D]["by"])){if(I.constructor==Array){E=[];for(var G=0,C=I.length;G<C;++G){E[G]=I[G]+F[D]["by"][G]*1;}}else{E=I+F[D]["by"]*1;}}}this.runtimeAttributes[D].start=I;this.runtimeAttributes[D].end=E;this.runtimeAttributes[D].unit=(H(F[D].unit))?F[D]["unit"]:this.getDefaultUnit(D);return true;},init:function(E,J,I,C){var D=false;var F=null;var H=0;E=B.Dom.get(E);this.attributes=J||{};this.duration=!YAHOO.lang.isUndefined(I)?I:1;this.method=C||B.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=B.AnimMgr.fps;this.setEl=function(M){E=B.Dom.get(M);};this.getEl=function(){return E;};this.isAnimated=function(){return D;};this.getStartTime=function(){return F;};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false;}this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(B.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1;}B.AnimMgr.registerElement(this);return true;};this.stop=function(M){if(!this.isAnimated()){return false;}if(M){this.currentFrame=this.totalFrames;this._onTween.fire();}B.AnimMgr.stop(this);};var L=function(){this.onStart.fire();this.runtimeAttributes={};for(var M in this.attributes){this.setRuntimeAttribute(M);}D=true;H=0;F=new Date();};var K=function(){var O={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};O.toString=function(){return("duration: "+O.duration+", currentFrame: "+O.currentFrame);};this.onTween.fire(O);var N=this.runtimeAttributes;for(var M in N){this.setAttribute(M,this.doMethod(M,N[M].start,N[M].end),N[M].unit);}H+=1;};var G=function(){var M=(new Date()-F)/1000;var N={duration:M,frames:H,fps:H/M};N.toString=function(){return("duration: "+N.duration+", frames: "+N.frames+", fps: "+N.fps);};D=false;H=0;this.onComplete.fire(N);};this._onStart=new B.CustomEvent("_start",this,true);this.onStart=new B.CustomEvent("start",this);this.onTween=new B.CustomEvent("tween",this);this._onTween=new B.CustomEvent("_tween",this,true);this.onComplete=new B.CustomEvent("complete",this);this._onComplete=new B.CustomEvent("_complete",this,true);this._onStart.subscribe(L);this._onTween.subscribe(K);this._onComplete.subscribe(G);}};B.Anim=A;})();YAHOO.util.AnimMgr=new function(){var C=null;var B=[];var A=0;this.fps=1000;this.delay=1;this.registerElement=function(F){B[B.length]=F;A+=1;F._onStart.fire();this.start();};this.unRegister=function(G,F){F=F||E(G);if(!G.isAnimated()||F===-1){return false;}G._onComplete.fire();B.splice(F,1);A-=1;if(A<=0){this.stop();}return true;};this.start=function(){if(C===null){C=setInterval(this.run,this.delay);}};this.stop=function(H){if(!H){clearInterval(C);for(var G=0,F=B.length;G<F;++G){this.unRegister(B[0],0);}B=[];C=null;A=0;}else{this.unRegister(H);}};this.run=function(){for(var H=0,F=B.length;H<F;++H){var G=B[H];if(!G||!G.isAnimated()){continue;}if(G.currentFrame<G.totalFrames||G.totalFrames===null){G.currentFrame+=1;if(G.useSeconds){D(G);}G._onTween.fire();}else{YAHOO.util.AnimMgr.stop(G,H);}}};var E=function(H){for(var G=0,F=B.length;G<F;++G){if(B[G]===H){return G;}}return-1;};var D=function(G){var J=G.totalFrames;var I=G.currentFrame;var H=(G.currentFrame*G.duration*1000/G.totalFrames);var F=(new Date()-G.getStartTime());var K=0;if(F<G.duration*1000){K=Math.round((F/H-1)*G.currentFrame);}else{K=J-(I+1);}if(K>0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1);}G.currentFrame+=K;}};this._queue=B;this._getIndex=E;};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B<F;++B){C[B]=[E[B][0],E[B][1]];}for(var A=1;A<F;++A){for(B=0;B<F-A;++B){C[B][0]=(1-D)*C[B][0]+D*C[parseInt(B+1,10)][0];C[B][1]=(1-D)*C[B][1]+D*C[parseInt(B+1,10)][1];}}return[C[0][0],C[0][1]];};};(function(){var A=function(F,E,G,H){A.superclass.constructor.call(this,F,E,G,H);};A.NAME="ColorAnim";A.DEFAULT_BGCOLOR="#fff";var C=YAHOO.util;YAHOO.extend(A,C.Anim);var D=A.superclass;var B=A.prototype;B.patterns.color=/color$/i;B.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;B.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;B.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;B.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;B.parseColor=function(E){if(E.length==3){return E;}var F=this.patterns.hex.exec(E);if(F&&F.length==4){return[parseInt(F[1],16),parseInt(F[2],16),parseInt(F[3],16)];}F=this.patterns.rgb.exec(E);if(F&&F.length==4){return[parseInt(F[1],10),parseInt(F[2],10),parseInt(F[3],10)];}F=this.patterns.hex3.exec(E);if(F&&F.length==4){return[parseInt(F[1]+F[1],16),parseInt(F[2]+F[2],16),parseInt(F[3]+F[3],16)];}return null;};B.getAttribute=function(E){var G=this.getEl();if(this.patterns.color.test(E)){var I=YAHOO.util.Dom.getStyle(G,E);var H=this;if(this.patterns.transparent.test(I)){var F=YAHOO.util.Dom.getAncestorBy(G,function(J){return!H.patterns.transparent.test(I);});if(F){I=C.Dom.getStyle(F,E);}else{I=A.DEFAULT_BGCOLOR;}}}else{I=D.getAttribute.call(this,E);}return I;};B.doMethod=function(F,J,G){var I;if(this.patterns.color.test(F)){I=[];for(var H=0,E=J.length;H<E;++H){I[H]=D.doMethod.call(this,F,J[H],G[H]);}I="rgb("+Math.floor(I[0])+","+Math.floor(I[1])+","+Math.floor(I[2])+")";}else{I=D.doMethod.call(this,F,J,G);}return I;};B.setRuntimeAttribute=function(F){D.setRuntimeAttribute.call(this,F);if(this.patterns.color.test(F)){var H=this.attributes;var J=this.parseColor(this.runtimeAttributes[F].start);var G=this.parseColor(this.runtimeAttributes[F].end);if(typeof H[F]["to"]==="undefined"&&typeof H[F]["by"]!=="undefined"){G=this.parseColor(H[F].by);for(var I=0,E=J.length;I<E;++I){G[I]=J[I]+G[I];}}this.runtimeAttributes[F].start=J;this.runtimeAttributes[F].end=G;}};C.ColorAnim=A;})();YAHOO.util.Easing={easeNone:function(B,A,D,C){return D*B/C+A;},easeIn:function(B,A,D,C){return D*(B/=C)*B+A;},easeOut:function(B,A,D,C){return-D*(B/=C)*(B-2)+A;},easeBoth:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B+A;}return-D/2*((--B)*(B-2)-1)+A;},easeInStrong:function(B,A,D,C){return D*(B/=C)*B*B*B+A;},easeOutStrong:function(B,A,D,C){return-D*((B=B/C-1)*B*B*B-1)+A;},easeBothStrong:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B*B*B+A;}return-D/2*((B-=2)*B*B*B-2)+A;},elasticIn:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return-(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;},elasticOut:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F)==1){return A+G;}if(!E){E=F*0.3;}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}return B*Math.pow(2,-10*C)*Math.sin((C*F-D)*(2*Math.PI)/E)+G+A;},elasticBoth:function(C,A,G,F,B,E){if(C==0){return A;}if((C/=F/2)==2){return A+G;}if(!E){E=F*(0.3*1.5);}if(!B||B<Math.abs(G)){B=G;var D=E/4;}else{var D=E/(2*Math.PI)*Math.asin(G/B);}if(C<1){return-0.5*(B*Math.pow(2,10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E))+A;}return B*Math.pow(2,-10*(C-=1))*Math.sin((C*F-D)*(2*Math.PI)/E)*0.5+G+A;},backIn:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*(B/=D)*B*((C+1)*B-C)+A;},backOut:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}return E*((B=B/D-1)*B*((C+1)*B+C)+1)+A;},backBoth:function(B,A,E,D,C){if(typeof C=="undefined"){C=1.70158;}if((B/=D/2)<1){return E/2*(B*B*(((C*=(1.525))+1)*B-C))+A;}return E/2*((B-=2)*B*(((C*=(1.525))+1)*B+C)+2)+A;},bounceIn:function(B,A,D,C){return D-YAHOO.util.Easing.bounceOut(C-B,0,D,C)+A;},bounceOut:function(B,A,D,C){if((B/=C)<(1/2.75)){return D*(7.5625*B*B)+A;}else{if(B<(2/2.75)){return D*(7.5625*(B-=(1.5/2.75))*B+0.75)+A;}else{if(B<(2.5/2.75)){return D*(7.5625*(B-=(2.25/2.75))*B+0.9375)+A;}}}return D*(7.5625*(B-=(2.625/2.75))*B+0.984375)+A;},bounceBoth:function(B,A,D,C){if(B<C/2){return YAHOO.util.Easing.bounceIn(B*2,0,D,C)*0.5+A;}return YAHOO.util.Easing.bounceOut(B*2-C,0,D,C)*0.5+D*0.5+A;}};(function(){var A=function(H,G,I,J){if(H){A.superclass.constructor.call(this,H,G,I,J);}};A.NAME="Motion";var E=YAHOO.util;YAHOO.extend(A,E.ColorAnim);var F=A.superclass;var C=A.prototype;C.patterns.points=/^points$/i;C.setAttribute=function(G,I,H){if(this.patterns.points.test(G)){H=H||"px";F.setAttribute.call(this,"left",I[0],H);F.setAttribute.call(this,"top",I[1],H);}else{F.setAttribute.call(this,G,I,H);}};C.getAttribute=function(G){if(this.patterns.points.test(G)){var H=[F.getAttribute.call(this,"left"),F.getAttribute.call(this,"top")];}else{H=F.getAttribute.call(this,G);}return H;};C.doMethod=function(G,K,H){var J=null;if(this.patterns.points.test(G)){var I=this.method(this.currentFrame,0,100,this.totalFrames)/100;J=E.Bezier.getPosition(this.runtimeAttributes[G],I);}else{J=F.doMethod.call(this,G,K,H);}return J;};C.setRuntimeAttribute=function(P){if(this.patterns.points.test(P)){var H=this.getEl();var J=this.attributes;var G;var L=J["points"]["control"]||[];var I;var M,O;if(L.length>0&&!(L[0]instanceof Array)){L=[L];}else{var K=[];for(M=0,O=L.length;M<O;++M){K[M]=L[M];}L=K;}if(E.Dom.getStyle(H,"position")=="static"){E.Dom.setStyle(H,"position","relative");}if(D(J["points"]["from"])){E.Dom.setXY(H,J["points"]["from"]);}else{E.Dom.setXY(H,E.Dom.getXY(H));}G=this.getAttribute("points");if(D(J["points"]["to"])){I=B.call(this,J["points"]["to"],G);var N=E.Dom.getXY(this.getEl());for(M=0,O=L.length;M<O;++M){L[M]=B.call(this,L[M],G);}}else{if(D(J["points"]["by"])){I=[G[0]+J["points"]["by"][0],G[1]+J["points"]["by"][1]];for(M=0,O=L.length;M<O;++M){L[M]=[G[0]+L[M][0],G[1]+L[M][1]];}}}this.runtimeAttributes[P]=[G];if(L.length>0){this.runtimeAttributes[P]=this.runtimeAttributes[P].concat(L);}this.runtimeAttributes[P][this.runtimeAttributes[P].length]=I;}else{F.setRuntimeAttribute.call(this,P);}};var B=function(G,I){var H=E.Dom.getXY(this.getEl());G=[G[0]-H[0]+I[0],G[1]-H[1]+I[1]];return G;};var D=function(G){return(typeof G!=="undefined");};E.Motion=A;})();(function(){var D=function(F,E,G,H){if(F){D.superclass.constructor.call(this,F,E,G,H);}};D.NAME="Scroll";var B=YAHOO.util;YAHOO.extend(D,B.ColorAnim);var C=D.superclass;var A=D.prototype;A.doMethod=function(E,H,F){var G=null;if(E=="scroll"){G=[this.method(this.currentFrame,H[0],F[0]-H[0],this.totalFrames),this.method(this.currentFrame,H[1],F[1]-H[1],this.totalFrames)];}else{G=C.doMethod.call(this,E,H,F);}return G;};A.getAttribute=function(E){var G=null;var F=this.getEl();if(E=="scroll"){G=[F.scrollLeft,F.scrollTop];}else{G=C.getAttribute.call(this,E);}return G;};A.setAttribute=function(E,H,G){var F=this.getEl();if(E=="scroll"){F.scrollLeft=H[0];F.scrollTop=H[1];}else{C.setAttribute.call(this,E,H,G);}};B.Scroll=D;})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.8.2",build:"19"});if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var A=YAHOO.util.Event,B=YAHOO.util.Dom;return{useShim:false,_shimActive:false,_shimState:false,_debugShim:false,_createShim:function(){var C=document.createElement("div");C.id="yui-ddm-shim";if(document.body.firstChild){document.body.insertBefore(C,document.body.firstChild);}else{document.body.appendChild(C);}C.style.display="none";C.style.backgroundColor="red";C.style.position="absolute";C.style.zIndex="99999";B.setStyle(C,"opacity","0");this._shim=C;A.on(C,"mouseup",this.handleMouseUp,this,true);A.on(C,"mousemove",this.handleMouseMove,this,true);A.on(window,"scroll",this._sizeShim,this,true);},_sizeShim:function(){if(this._shimActive){var C=this._shim;C.style.height=B.getDocumentHeight()+"px";C.style.width=B.getDocumentWidth()+"px";C.style.top="0";C.style.left="0";}},_activateShim:function(){if(this.useShim){if(!this._shim){this._createShim();}this._shimActive=true;var C=this._shim,D="0";if(this._debugShim){D=".5";}B.setStyle(C,"opacity",D);this._sizeShim();C.style.display="block";}},_deactivateShim:function(){this._shim.style.display="none";this._shimActive=false;},_shim:null,ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true;},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(E,D){for(var F in this.ids){for(var C in this.ids[F]){var G=this.ids[F][C];if(!this.isTypeOfDD(G)){continue;}G[E].apply(G,D);}}},_onLoad:function(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true);},_onResize:function(C){this._execOnAll("resetConstraints",[]);},lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isLocked:function(){return this.locked;},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,fromTimeout:false,regDragDrop:function(D,C){if(!this.initialized){this.init();}if(!this.ids[C]){this.ids[C]={};}this.ids[C][D.id]=D;},removeDDFromGroup:function(E,C){if(!this.ids[C]){this.ids[C]={};}var D=this.ids[C];if(D&&D[E.id]){delete D[E.id];}},_remove:function(E){for(var D in E.groups){if(D){var C=this.ids[D];if(C&&C[E.id]){delete C[E.id];}}}delete this.handleIds[E.id];},regHandle:function(D,C){if(!this.handleIds[D]){this.handleIds[D]={};}this.handleIds[D][C]=C;},isDragDrop:function(C){return(this.getDDById(C))?true:false;},getRelated:function(H,D){var G=[];for(var F in H.groups){for(var E in this.ids[F]){var C=this.ids[F][E];if(!this.isTypeOfDD(C)){continue;}if(!D||C.isTarget){G[G.length]=C;}}}return G;},isLegalTarget:function(G,F){var D=this.getRelated(G,true);for(var E=0,C=D.length;E<C;++E){if(D[E].id==F.id){return true;}}return false;},isTypeOfDD:function(C){return(C&&C.__ygDragDrop);},isHandle:function(D,C){return(this.handleIds[D]&&this.handleIds[D][C]);},getDDById:function(D){for(var C in this.ids){if(this.ids[C][D]){return this.ids[C][D];}}return null;},handleMouseDown:function(E,D){this.currentTarget=YAHOO.util.Event.getTarget(E);this.dragCurrent=D;var C=D.getEl();this.startX=YAHOO.util.Event.getPageX(E);this.startY=YAHOO.util.Event.getPageY(E);this.deltaX=this.startX-C.offsetLeft;this.deltaY=this.startY-C.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var F=YAHOO.util.DDM;F.startDrag(F.startX,F.startY);F.fromTimeout=true;},this.clickTimeThresh);},startDrag:function(C,E){if(this.dragCurrent&&this.dragCurrent.useShim){this._shimState=this.useShim;this.useShim=true;}this._activateShim();clearTimeout(this.clickTimeout);var D=this.dragCurrent;if(D&&D.events.b4StartDrag){D.b4StartDrag(C,E);D.fireEvent("b4StartDragEvent",{x:C,y:E});}if(D&&D.events.startDrag){D.startDrag(C,E);D.fireEvent("startDragEvent",{x:C,y:E});}this.dragThreshMet=true;},handleMouseUp:function(C){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){if(this.fromTimeout){this.fromTimeout=false;this.handleMouseMove(C);}this.fromTimeout=false;this.fireEvents(C,true);}else{}this.stopDrag(C);this.stopEvent(C);}},stopEvent:function(C){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(C);}if(this.preventDefault){YAHOO.util.Event.preventDefault(C);}},stopDrag:function(E,D){var C=this.dragCurrent;if(C&&!D){if(this.dragThreshMet){if(C.events.b4EndDrag){C.b4EndDrag(E);C.fireEvent("b4EndDragEvent",{e:E});}if(C.events.endDrag){C.endDrag(E);C.fireEvent("endDragEvent",{e:E});}}if(C.events.mouseUp){C.onMouseUp(E);C.fireEvent("mouseUpEvent",{e:E});}}if(this._shimActive){this._deactivateShim();if(this.dragCurrent&&this.dragCurrent.useShim){this.useShim=this._shimState;this._shimState=false;}}this.dragCurrent=null;this.dragOvers={};},handleMouseMove:function(F){var C=this.dragCurrent;if(C){if(YAHOO.util.Event.isIE&&!F.button){this.stopEvent(F);return this.handleMouseUp(F);}else{if(F.clientX<0||F.clientY<0){}}if(!this.dragThreshMet){var E=Math.abs(this.startX-YAHOO.util.Event.getPageX(F));var D=Math.abs(this.startY-YAHOO.util.Event.getPageY(F));if(E>this.clickPixelThresh||D>this.clickPixelThresh){this.startDrag(this.startX,this.startY);}}if(this.dragThreshMet){if(C&&C.events.b4Drag){C.b4Drag(F);C.fireEvent("b4DragEvent",{e:F});}if(C&&C.events.drag){C.onDrag(F);C.fireEvent("dragEvent",{e:F});}if(C){this.fireEvents(F,false);}}this.stopEvent(F);}},fireEvents:function(V,L){var a=this.dragCurrent;if(!a||a.isLocked()||a.dragOnly){return;}var N=YAHOO.util.Event.getPageX(V),M=YAHOO.util.Event.getPageY(V),P=new YAHOO.util.Point(N,M),K=a.getTargetCoord(P.x,P.y),F=a.getDragEl(),E=["out","over","drop","enter"],U=new YAHOO.util.Region(K.y,K.x+F.offsetWidth,K.y+F.offsetHeight,K.x),I=[],D={},Q=[],c={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var S in this.dragOvers){var d=this.dragOvers[S];if(!this.isTypeOfDD(d)){continue;}if(!this.isOverTarget(P,d,this.mode,U)){c.outEvts.push(d);}I[S]=true;delete this.dragOvers[S];}for(var R in a.groups){if("string"!=typeof R){continue;}for(S in this.ids[R]){var G=this.ids[R][S];if(!this.isTypeOfDD(G)){continue;}if(G.isTarget&&!G.isLocked()&&G!=a){if(this.isOverTarget(P,G,this.mode,U)){D[R]=true;if(L){c.dropEvts.push(G);}else{if(!I[G.id]){c.enterEvts.push(G);}else{c.overEvts.push(G);}this.dragOvers[G.id]=G;}}}}}this.interactionInfo={out:c.outEvts,enter:c.enterEvts,over:c.overEvts,drop:c.dropEvts,point:P,draggedRegion:U,sourceRegion:this.locationCache[a.id],validDrop:L};for(var C in D){Q.push(C);}if(L&&!c.dropEvts.length){this.interactionInfo.validDrop=false;if(a.events.invalidDrop){a.onInvalidDrop(V);a.fireEvent("invalidDropEvent",{e:V});}}for(S=0;S<E.length;S++){var Y=null;if(c[E[S]+"Evts"]){Y=c[E[S]+"Evts"];}if(Y&&Y.length){var H=E[S].charAt(0).toUpperCase()+E[S].substr(1),X="onDrag"+H,J="b4Drag"+H,O="drag"+H+"Event",W="drag"+H;if(this.mode){if(a.events[J]){a[J](V,Y,Q);a.fireEvent(J+"Event",{event:V,info:Y,group:Q});}if(a.events[W]){a[X](V,Y,Q);a.fireEvent(O,{event:V,info:Y,group:Q});}}else{for(var Z=0,T=Y.length;Z<T;++Z){if(a.events[J]){a[J](V,Y[Z].id,Q[0]);a.fireEvent(J+"Event",{event:V,info:Y[Z].id,group:Q[0]});}if(a.events[W]){a[X](V,Y[Z].id,Q[0]);a.fireEvent(O,{event:V,info:Y[Z].id,group:Q[0]});}}}}}},getBestMatch:function(E){var G=null;var D=E.length;if(D==1){G=E[0];}else{for(var F=0;F<D;++F){var C=E[F];if(this.mode==this.INTERSECT&&C.cursorIsOver){G=C;break;}else{if(!G||!G.overlap||(C.overlap&&G.overlap.getArea()<C.overlap.getArea())){G=C;}}}}return G;},refreshCache:function(D){var F=D||this.ids;for(var C in F){if("string"!=typeof C){continue;}for(var E in this.ids[C]){var G=this.ids[C][E];if(this.isTypeOfDD(G)){var H=this.getLocation(G);if(H){this.locationCache[G.id]=H;}else{delete this.locationCache[G.id];}}}}},verifyEl:function(D){try{if(D){var C=D.offsetParent;if(C){return true;}}}catch(E){}return false;},getLocation:function(H){if(!this.isTypeOfDD(H)){return null;}var F=H.getEl(),K,E,D,M,L,N,C,J,G;try{K=YAHOO.util.Dom.getXY(F);}catch(I){}if(!K){return null;}E=K[0];D=E+F.offsetWidth;M=K[1];L=M+F.offsetHeight;N=M-H.padding[0];C=D+H.padding[1];J=L+H.padding[2];G=E-H.padding[3];return new YAHOO.util.Region(N,C,J,G);},isOverTarget:function(K,C,E,F){var G=this.locationCache[C.id];if(!G||!this.useCache){G=this.getLocation(C);this.locationCache[C.id]=G;}if(!G){return false;}C.cursorIsOver=G.contains(K);var J=this.dragCurrent;if(!J||(!E&&!J.constrainX&&!J.constrainY)){return C.cursorIsOver;}C.overlap=null;if(!F){var H=J.getTargetCoord(K.x,K.y);var D=J.getDragEl();F=new YAHOO.util.Region(H.y,H.x+D.offsetWidth,H.y+D.offsetHeight,H.x);}var I=F.intersect(G);if(I){C.overlap=I;return(E)?true:C.cursorIsOver;}else{return false;}},_onUnload:function(D,C){this.unregAll();},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null;}this._execOnAll("unreg",[]);this.ids={};},elementCache:{},getElWrapper:function(D){var C=this.elementCache[D];if(!C||!C.el){C=this.elementCache[D]=new this.ElementWrapper(YAHOO.util.Dom.get(D));}return C;},getElement:function(C){return YAHOO.util.Dom.get(C);},getCss:function(D){var C=YAHOO.util.Dom.get(D);return(C)?C.style:null;},ElementWrapper:function(C){this.el=C||null;this.id=this.el&&C.id;this.css=this.el&&C.style;},getPosX:function(C){return YAHOO.util.Dom.getX(C);},getPosY:function(C){return YAHOO.util.Dom.getY(C);},swapNode:function(E,C){if(E.swapNode){E.swapNode(C);}else{var F=C.parentNode;var D=C.nextSibling;if(D==E){F.insertBefore(E,C);}else{if(C==E.nextSibling){F.insertBefore(C,E);}else{E.parentNode.replaceChild(C,E);F.insertBefore(E,D);}}}},getScroll:function(){var E,C,F=document.documentElement,D=document.body;if(F&&(F.scrollTop||F.scrollLeft)){E=F.scrollTop;C=F.scrollLeft;}else{if(D){E=D.scrollTop;C=D.scrollLeft;}else{}}return{top:E,left:C};},getStyle:function(D,C){return YAHOO.util.Dom.getStyle(D,C);},getScrollTop:function(){return this.getScroll().top;},getScrollLeft:function(){return this.getScroll().left;},moveToEl:function(C,E){var D=YAHOO.util.Dom.getXY(E);YAHOO.util.Dom.setXY(C,D);},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight();},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth();},numericSort:function(D,C){return(D-C);},_timeoutCount:0,_addListeners:function(){var C=YAHOO.util.DDM;if(YAHOO.util.Event&&document){C._onLoad();}else{if(C._timeoutCount>2000){}else{setTimeout(C._addListeners,10);if(document&&document.body){C._timeoutCount+=1;}}}},handleWasClicked:function(C,E){if(this.isHandle(E,C.id)){return true;}else{var D=C.parentNode;while(D){if(this.isHandle(E,D.id)){return true;}else{D=D.parentNode;}}}return false;}};}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners();}(function(){var A=YAHOO.util.Event;var B=YAHOO.util.Dom;YAHOO.util.DragDrop=function(E,C,D){if(E){this.init(E,C,D);}};YAHOO.util.DragDrop.prototype={events:null,on:function(){this.subscribe.apply(this,arguments);},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isTarget:true,padding:null,dragOnly:false,useShim:false,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:function(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:function(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=B.get(this.id);}return this._domRef;},getDragEl:function(){return B.get(this.dragElId);},init:function(F,C,D){this.initTarget(F,C,D);A.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);for(var E in this.events){this.createEvent(E+"Event");}},initTarget:function(E,C,D){this.config=D||{};this.events={};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof E!=="string"){this._domRef=E;E=B.generateId(E);}this.id=E;this.addToGroup((C)?C:"default");this.handleElId=E;A.onAvailable(E,this.handleOnAvailable,this,true);this.setDragElId(E);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();},applyConfig:function(){this.events={mouseDown:true,b4MouseDown:true,mouseUp:true,b4StartDrag:true,startDrag:true,b4EndDrag:true,endDrag:true,drag:true,b4Drag:true,invalidDrop:true,b4DragOut:true,dragOut:true,dragEnter:true,b4DragOver:true,dragOver:true,b4DragDrop:true,dragDrop:true};if(this.config.events){for(var C in this.config.events){if(this.config.events[C]===false){this.events[C]=false;}}}this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);this.dragOnly=((this.config.dragOnly===true)?true:false);this.useShim=((this.config.useShim===true)?true:false);},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable();},setPadding:function(E,C,F,D){if(!C&&0!==C){this.padding=[E,E,E,E];}else{if(!F&&0!==F){this.padding=[E,C,E,C];}else{this.padding=[E,C,F,D];}}},setInitPosition:function(F,E){var G=this.getEl();if(!this.DDM.verifyEl(G)){if(G&&G.style&&(G.style.display=="none")){}else{}return;}var D=F||0;var C=E||0;var H=B.getXY(G);this.initPageX=H[0]-D;this.initPageY=H[1]-C;this.lastPageX=H[0];this.lastPageY=H[1];this.setStartPosition(H);},setStartPosition:function(D){var C=D||B.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=C[0];this.startPageY=C[1];},addToGroup:function(C){this.groups[C]=true;this.DDM.regDragDrop(this,C);},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C];}this.DDM.removeDDFromGroup(this,C);},setDragElId:function(C){this.dragElId=C;},setHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.handleElId=C;this.DDM.regHandle(this.id,C);},setOuterHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}A.on(C,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(C);this.hasOuterHandles=true;},unreg:function(){A.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this);},isLocked:function(){return(this.DDM.isLocked()||this.locked);},handleMouseDown:function(J,I){var D=J.which||J.button;if(this.primaryButtonOnly&&D>1){return;}if(this.isLocked()){return;}var C=this.b4MouseDown(J),F=true;if(this.events.b4MouseDown){F=this.fireEvent("b4MouseDownEvent",J);}var E=this.onMouseDown(J),H=true;if(this.events.mouseDown){H=this.fireEvent("mouseDownEvent",J);}if((C===false)||(E===false)||(F===false)||(H===false)){return;}this.DDM.refreshCache(this.groups);var G=new YAHOO.util.Point(A.getPageX(J),A.getPageY(J));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(G,this)){}else{if(this.clickValidator(J)){this.setStartPosition();this.DDM.handleMouseDown(J,this);this.DDM.stopEvent(J);}else{}}},clickValidator:function(D){var C=YAHOO.util.Event.getTarget(D);return(this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.handleWasClicked(C,this.id)));},getTargetCoord:function(E,D){var C=E-this.deltaX;var F=D-this.deltaY;if(this.constrainX){if(C<this.minX){C=this.minX;}if(C>this.maxX){C=this.maxX;}}if(this.constrainY){if(F<this.minY){F=this.minY;}if(F>this.maxY){F=this.maxY;}}C=this.getTick(C,this.xTicks);F=this.getTick(F,this.yTicks);return{x:C,y:F};},addInvalidHandleType:function(C){var D=C.toUpperCase();this.invalidHandleTypes[D]=D;},addInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.invalidHandleIds[C]=C;},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C);},removeInvalidHandleType:function(C){var D=C.toUpperCase();delete this.invalidHandleTypes[D];},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}delete this.invalidHandleIds[C];},removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.length;E<C;++E){if(this.invalidHandleClasses[E]==D){delete this.invalidHandleClasses[E];}}},isValidHandleChild:function(F){var E=true;var H;try{H=F.nodeName.toUpperCase();}catch(G){H=F.nodeName;}E=E&&!this.invalidHandleTypes[H];E=E&&!this.invalidHandleIds[F.id];for(var D=0,C=this.invalidHandleClasses.length;E&&D<C;++D){E=!B.hasClass(F,this.invalidHandleClasses[D]);}return E;},setXTicks:function(F,C){this.xTicks=[];this.xTickSize=C;var E={};for(var D=this.initPageX;D>=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}this.xTicks.sort(this.DDM.numericSort);},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}this.yTicks.sort(this.DDM.numericSort);},setXConstraint:function(E,D,C){this.leftConstraint=parseInt(E,10);this.rightConstraint=parseInt(D,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(C){this.setXTicks(this.initPageX,C);}this.constrainX=true;},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks();},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0;},setYConstraint:function(C,E,D){this.topConstraint=parseInt(C,10);this.bottomConstraint=parseInt(E,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(D){this.setYTicks(this.initPageY,D);}this.constrainY=true;},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C);}else{this.setInitPosition();}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize);}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize);}},getTick:function(I,F){if(!F){return I;}else{if(F[0]>=I){return F[0];}else{for(var D=0,C=F.length;D<C;++D){var E=D+1;if(F[E]&&F[E]>=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E];}}return F[F.length-1];}}},toString:function(){return("DragDrop "+this.id);}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider);})();YAHOO.util.DD=function(C,A,B){if(C){this.init(C,A,B);}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D);},setDelta:function(B,A){this.deltaX=B;this.deltaY=A;},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B);},alignElWithMouse:function(C,G,F){var E=this.getTargetCoord(G,F);if(!this.deltaSetXY){var H=[E.x,E.y];YAHOO.util.Dom.setXY(C,H);var D=parseInt(YAHOO.util.Dom.getStyle(C,"left"),10);var B=parseInt(YAHOO.util.Dom.getStyle(C,"top"),10);this.deltaSetXY=[D-E.x,B-E.y];}else{YAHOO.util.Dom.setStyle(C,"left",(E.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(C,"top",(E.y+this.deltaSetXY[1])+"px");}this.cachePosition(E.x,E.y);var A=this;setTimeout(function(){A.autoScroll.call(A,E.x,E.y,C.offsetHeight,C.offsetWidth);},0);},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A;}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1];}},autoScroll:function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G<C){window.scrollTo(D,N+A);}if(I<N&&N>0&&I-N<C){window.scrollTo(D,N-A);}if(M>B&&F<C){window.scrollTo(D+A,N);}if(J<D&&D>0&&J-D<C){window.scrollTo(D-A,N);}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false);},b4MouseDown:function(A){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},b4Drag:function(A){this.setDragElPos(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},toString:function(){return("DD "+this.id);}});YAHOO.util.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame();}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this,A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame();},50);return;}var F=this.getDragEl(),E=YAHOO.util.Dom;if(!F){F=document.createElement("div");F.id=this.dragElId;var D=F.style;D.position="absolute";D.visibility="hidden";D.cursor="move";D.border="2px solid #aaa";D.zIndex=999;D.height="25px";D.width="25px";var C=document.createElement("div");E.setStyle(C,"height","100%");E.setStyle(C,"width","100%");E.setStyle(C,"background-color","#ccc");E.setStyle(C,"opacity","0");F.appendChild(C);A.insertBefore(F,A.firstChild);}},initFrame:function(){this.createFrame();},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId);},showFrame:function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2));}this.setDragElPos(E,D);YAHOO.util.Dom.setStyle(A,"visibility","visible");},_resizeProxy:function(){if(this.resizeFrame){var H=YAHOO.util.Dom;var B=this.getEl();var C=this.getDragEl();var G=parseInt(H.getStyle(C,"borderTopWidth"),10);var I=parseInt(H.getStyle(C,"borderRightWidth"),10);var F=parseInt(H.getStyle(C,"borderBottomWidth"),10);var D=parseInt(H.getStyle(C,"borderLeftWidth"),10);if(isNaN(G)){G=0;}if(isNaN(I)){I=0;}if(isNaN(F)){F=0;}if(isNaN(D)){D=0;}var E=Math.max(0,B.offsetWidth-I-D);var A=Math.max(0,B.offsetHeight-G-F);H.setStyle(C,"width",E+"px");H.setStyle(C,"height",A+"px");}},b4MouseDown:function(B){this.setStartPosition();var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.autoOffset(A,C);},b4StartDrag:function(A,B){this.showFrame(A,B);},b4EndDrag:function(A){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden");},endDrag:function(D){var C=YAHOO.util.Dom;var B=this.getEl();var A=this.getDragEl();C.setStyle(A,"visibility","");C.setStyle(B,"visibility","hidden");YAHOO.util.DDM.moveToEl(B,A);C.setStyle(A,"visibility","hidden");C.setStyle(B,"visibility","");},toString:function(){return("DDProxy "+this.id);}});YAHOO.util.DDTarget=function(C,A,B){if(C){this.initTarget(C,A,B);}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id);}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.8.2",build:"19"});YAHOO.util.Attribute=function(B,A){if(A){this.owner=A;this.configure(B,true);}};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,setter:null,getter:null,validator:null,getValue:function(){var A=this.value;if(this.getter){A=this.getter.call(this.owner,this.name,A);}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)){return false;}if(!B){E=A.fireBeforeChangeEvent(D);if(E===false){return false;}}if(this.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||{};if(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);},resetConfig:function(){this.configure(this._initialConfig,true);},refresh:function(A){this.setValue(this.value,A);}};(function(){var A=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(C){this._configs=this._configs||{};var B=this._configs[C];if(!B||!this._configs.hasOwnProperty(C)){return null;}return B.getValue();},set:function(D,E,B){this._configs=this._configs||{};var C=this._configs[D];if(!C){return false;}return C.setValue(E,B);},getAttributeKeys:function(){this._configs=this._configs;var 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:function(D,B){for(var C in D){if(A.hasOwnProperty(D,C)){this.set(C,D[C],B);}}},resetValue:function(C,B){this._configs=this._configs||{};if(this._configs[C]){this.set(C,this._configs[C]._initialConfig.value,B);return true;}return false;},refresh:function(E,C){this._configs=this._configs||{};var F=this._configs;E=((A.isString(E))?[E]:E)||this.getAttributeKeys();for(var D=0,B=E.length;D<B;++D){if(F.hasOwnProperty(E[D])){this._configs[E[D]].refresh(C);}}},register:function(B,C){this.setAttributeConfig(B,C);},getAttributeConfig:function(C){this._configs=this._configs||{};var B=this._configs[C]||{};var D={};for(C in B){if(A.hasOwnProperty(B,C)){D[C]=B[C];}}return D;},setAttributeConfig:function(B,C,D){this._configs=this._configs||{};C=C||{};if(!this._configs[B]){C.name=B;this._configs[B]=this.createAttribute(C);}else{this._configs[B].configure(C,D);}},configureAttribute:function(B,C,D){this.setAttributeConfig(B,C,D);},resetAttributeConfig:function(B){this._configs=this._configs||{};this._configs[B].resetConfig();},subscribe:function(B,C){this._events=this._events||{};if(!(B in this._events)){this._events[B]=this.createEvent(B);}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){this.subscribe.apply(this,arguments);},addListener:function(){this.subscribe.apply(this,arguments);},fireBeforeChangeEvent:function(C){var B="before";B+=C.type.charAt(0).toUpperCase()+C.type.substr(1)+"Change";C.type=B;return this.fireEvent(C.type,C);},fireChangeEvent:function(B){B.type+="Change";return this.fireEvent(B.type,B);},createAttribute:function(B){return new YAHOO.util.Attribute(B,this);}};YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider);})();(function(){var B=YAHOO.util.Dom,D=YAHOO.util.AttributeProvider,C={mouseenter:true,mouseleave:true};var A=function(E,F){this.init.apply(this,arguments);};A.DOM_EVENTS={"click":true,"dblclick":true,"keydown":true,"keypress":true,"keyup":true,"mousedown":true,"mousemove":true,"mouseout":true,"mouseover":true,"mouseup":true,"mouseenter":true,"mouseleave":true,"focus":true,"blur":true,"submit":true,"change":true};A.prototype={DOM_EVENTS:null,DEFAULT_HTML_SETTER:function(G,E){var F=this.get("element");if(F){F[E]=G;}return G;},DEFAULT_HTML_GETTER:function(E){var F=this.get("element"),G;if(F){G=F[E];}return G;},appendChild:function(E){E=E.get?E.get("element"):E;return this.get("element").appendChild(E);},getElementsByTagName:function(E){return this.get("element").getElementsByTagName(E);},hasChildNodes:function(){return this.get("element").hasChildNodes();},insertBefore:function(E,F){E=E.get?E.get("element"):E;F=(F&&F.get)?F.get("element"):F;return this.get("element").insertBefore(E,F);},removeChild:function(E){E=E.get?E.get("element"):E;return this.get("element").removeChild(E);},replaceChild:function(E,F){E=E.get?E.get("element"):E;F=F.get?F.get("element"):F;return this.get("element").replaceChild(E,F);},initAttributes:function(E){},addListener:function(J,I,K,H){H=H||this;var E=YAHOO.util.Event,G=this.get("element")||this.get("id"),F=this;if(C[J]&&!E._createMouseDelegate){return false;}if(!this._events[J]){if(G&&this.DOM_EVENTS[J]){E.on(G,J,function(M,L){if(M.srcElement&&!M.target){M.target=M.srcElement;}if((M.toElement&&!M.relatedTarget)||(M.fromElement&&!M.relatedTarget)){M.relatedTarget=E.getRelatedTarget(M);}if(!M.currentTarget){M.currentTarget=G;}F.fireEvent(J,M,L);},K,H);}this.createEvent(J,{scope:this});}return YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments);},on:function(){return this.addListener.apply(this,arguments);},subscribe:function(){return this.addListener.apply(this,arguments);},removeListener:function(F,E){return this.unsubscribe.apply(this,arguments);},addClass:function(E){B.addClass(this.get("element"),E);},getElementsByClassName:function(F,E){return B.getElementsByClassName(F,E,this.get("element"));},hasClass:function(E){return B.hasClass(this.get("element"),E);},removeClass:function(E){return B.removeClass(this.get("element"),E);},replaceClass:function(F,E){return B.replaceClass(this.get("element"),F,E);},setStyle:function(F,E){return B.setStyle(this.get("element"),F,E);},getStyle:function(E){return B.getStyle(this.get("element"),E);},fireQueue:function(){var F=this._queue;for(var G=0,E=F.length;G<E;++G){this[F[G][0]].apply(this,F[G][1]);}},appendTo:function(F,G){F=(F.get)?F.get("element"):B.get(F);this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:F});G=(G&&G.get)?G.get("element"):B.get(G);var E=this.get("element");if(!E){return false;}if(!F){return false;}if(E.parent!=F){if(G){F.insertBefore(E,G);}else{F.appendChild(E);}}this.fireEvent("appendTo",{type:"appendTo",target:F});return E;},get:function(E){var G=this._configs||{},F=G.element;if(F&&!G[E]&&!YAHOO.lang.isUndefined(F.value[E])){this._setHTMLAttrConfig(E);}return D.prototype.get.call(this,E);},setAttributes:function(K,H){var F={},I=this._configOrder;for(var J=0,E=I.length;J<E;++J){if(K[I[J]]!==undefined){F[I[J]]=true;this.set(I[J],K[I[J]],H);}}for(var G in K){if(K.hasOwnProperty(G)&&!F[G]){this.set(G,K[G],H);}}},set:function(F,H,E){var G=this.get("element");if(!G){this._queue[this._queue.length]=["set",arguments];if(this._configs[F]){this._configs[F].value=H;}return;}if(!this._configs[F]&&!YAHOO.lang.isUndefined(G[F])){this._setHTMLAttrConfig(F);}return D.prototype.set.apply(this,arguments);},setAttributeConfig:function(E,F,G){this._configOrder.push(E);D.prototype.setAttributeConfig.apply(this,arguments);},createEvent:function(F,E){this._events[F]=true;return D.prototype.createEvent.apply(this,arguments);},init:function(F,E){this._initElement(F,E);},destroy:function(){var E=this.get("element");YAHOO.util.Event.purgeElement(E,true);this.unsubscribeAll();if(E&&E.parentNode){E.parentNode.removeChild(E);}this._queue=[];this._events={};this._configs={};this._configOrder=[];},_initElement:function(G,F){this._queue=this._queue||[];this._events=this._events||{};this._configs=this._configs||{};this._configOrder=[];F=F||{};F.element=F.element||G||null;var I=false;var E=A.DOM_EVENTS;this.DOM_EVENTS=this.DOM_EVENTS||{};for(var H in E){if(E.hasOwnProperty(H)){this.DOM_EVENTS[H]=E[H];}}if(typeof F.element==="string"){this._setHTMLAttrConfig("id",{value:F.element});}if(B.get(F.element)){I=true;this._initHTMLElement(F);this._initContent(F);}YAHOO.util.Event.onAvailable(F.element,function(){if(!I){this._initHTMLElement(F);}this.fireEvent("available",{type:"available",target:B.get(F.element)});},this,true);YAHOO.util.Event.onContentReady(F.element,function(){if(!I){this._initContent(F);}this.fireEvent("contentReady",{type:"contentReady",target:B.get(F.element)});},this,true);},_initHTMLElement:function(E){this.setAttributeConfig("element",{value:B.get(E.element),readOnly:true});},_initContent:function(E){this.initAttributes(E);this.setAttributes(E,true);this.fireQueue();},_setHTMLAttrConfig:function(E,G){var F=this.get("element");G=G||{};G.name=E;G.setter=G.setter||this.DEFAULT_HTML_SETTER;G.getter=G.getter||this.DEFAULT_HTML_GETTER;G.value=G.value||F[E];this._configs[E]=new YAHOO.util.Attribute(G,this);}};YAHOO.augment(A,D);YAHOO.util.Element=A;})();YAHOO.register("element",YAHOO.util.Element,{version:"2.8.2",build:"19"});YAHOO.register("utilities",YAHOO,{version:"2.8.2",build:"19"});(function(){YAHOO.util.Config=function(owner){if(owner){this.init(owner);}};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Config=YAHOO.util.Config;Config.CONFIG_CHANGED_EVENT="configChanged";Config.BOOLEAN_TYPE="boolean";Config.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(owner){this.owner=owner;this.configChangedEvent=this.createEvent(Config.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=CustomEvent.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[];},checkBoolean:function(val){return(typeof val==Config.BOOLEAN_TYPE);},checkNumber:function(val){return(!isNaN(val));},fireEvent:function(key,value){var property=this.config[key];if(property&&property.event){property.event.fire(value);}},addProperty:function(key,propertyObject){key=key.toLowerCase();this.config[key]=propertyObject;propertyObject.event=this.createEvent(key,{scope:this.owner});propertyObject.event.signature=CustomEvent.LIST;propertyObject.key=key;if(propertyObject.handler){propertyObject.event.subscribe(propertyObject.handler,this.owner);}
this.setProperty(key,propertyObject.value,true);if(!propertyObject.suppressEvent){this.queueProperty(key,propertyObject.value);}},getConfig:function(){var cfg={},currCfg=this.config,prop,property;for(prop in currCfg){if(Lang.hasOwnProperty(currCfg,prop)){property=currCfg[prop];if(property&&property.event){cfg[prop]=property.value;}}}
return cfg;},getProperty:function(key){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.value;}else{return undefined;}},resetProperty:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event){if(this.initialConfig[key]&&!Lang.isUndefined(this.initialConfig[key])){this.setProperty(key,this.initialConfig[key]);return true;}}else{return false;}},setProperty:function(key,value,silent){var property;key=key.toLowerCase();if(this.queueInProgress&&!silent){this.queueProperty(key,value);return true;}else{property=this.config[key];if(property&&property.event){if(property.validator&&!property.validator(value)){return false;}else{property.value=value;if(!silent){this.fireEvent(key,value);this.configChangedEvent.fire([key,value]);}
return true;}}else{return false;}}},queueProperty:function(key,value){key=key.toLowerCase();var property=this.config[key],foundDuplicate=false,iLen,queueItem,queueItemKey,queueItemValue,sLen,supercedesCheck,qLen,queueItemCheck,queueItemCheckKey,queueItemCheckValue,i,s,q;if(property&&property.event){if(!Lang.isUndefined(value)&&property.validator&&!property.validator(value)){return false;}else{if(!Lang.isUndefined(value)){property.value=value;}else{value=property.value;}
foundDuplicate=false;iLen=this.eventQueue.length;for(i=0;i<iLen;i++){queueItem=this.eventQueue[i];if(queueItem){queueItemKey=queueItem[0];queueItemValue=queueItem[1];if(queueItemKey==key){this.eventQueue[i]=null;this.eventQueue.push([key,(!Lang.isUndefined(value)?value:queueItemValue)]);foundDuplicate=true;break;}}}
if(!foundDuplicate&&!Lang.isUndefined(value)){this.eventQueue.push([key,value]);}}
if(property.supercedes){sLen=property.supercedes.length;for(s=0;s<sLen;s++){supercedesCheck=property.supercedes[s];qLen=this.eventQueue.length;for(q=0;q<qLen;q++){queueItemCheck=this.eventQueue[q];if(queueItemCheck){queueItemCheckKey=queueItemCheck[0];queueItemCheckValue=queueItemCheck[1];if(queueItemCheckKey==supercedesCheck.toLowerCase()){this.eventQueue.push([queueItemCheckKey,queueItemCheckValue]);this.eventQueue[q]=null;break;}}}}}
return true;}else{return false;}},refireEvent:function(key){key=key.toLowerCase();var property=this.config[key];if(property&&property.event&&!Lang.isUndefined(property.value)){if(this.queueInProgress){this.queueProperty(key);}else{this.fireEvent(key,property.value);}}},applyConfig:function(userConfig,init){var sKey,oConfig;if(init){oConfig={};for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){oConfig[sKey.toLowerCase()]=userConfig[sKey];}}
this.initialConfig=oConfig;}
for(sKey in userConfig){if(Lang.hasOwnProperty(userConfig,sKey)){this.queueProperty(sKey,userConfig[sKey]);}}},refresh:function(){var prop;for(prop in this.config){if(Lang.hasOwnProperty(this.config,prop)){this.refireEvent(prop);}}},fireQueue:function(){var i,queueItem,key,value,property;this.queueInProgress=true;for(i=0;i<this.eventQueue.length;i++){queueItem=this.eventQueue[i];if(queueItem){key=queueItem[0];value=queueItem[1];property=this.config[key];property.value=value;this.eventQueue[i]=null;this.fireEvent(key,value);}}
this.queueInProgress=false;this.eventQueue=[];},subscribeToConfigEvent:function(key,handler,obj,overrideContext){var property=this.config[key.toLowerCase()];if(property&&property.event){if(!Config.alreadySubscribed(property.event,handler,obj)){property.event.subscribe(handler,obj,overrideContext);}
return true;}else{return false;}},unsubscribeFromConfigEvent:function(key,handler,obj){var property=this.config[key.toLowerCase()];if(property&&property.event){return property.event.unsubscribe(handler,obj);}else{return false;}},toString:function(){var output="Config";if(this.owner){output+=" ["+this.owner.toString()+"]";}
return output;},outputEventQueue:function(){var output="",queueItem,q,nQueue=this.eventQueue.length;for(q=0;q<nQueue;q++){queueItem=this.eventQueue[q];if(queueItem){output+=queueItem[0]+"="+queueItem[1]+", ";}}
return output;},destroy:function(){var oConfig=this.config,sProperty,oProperty;for(sProperty in oConfig){if(Lang.hasOwnProperty(oConfig,sProperty)){oProperty=oConfig[sProperty];oProperty.event.unsubscribeAll();oProperty.event=null;}}
this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null;}};Config.alreadySubscribed=function(evt,fn,obj){var nSubscribers=evt.subscribers.length,subsc,i;if(nSubscribers>0){i=nSubscribers-1;do{subsc=evt.subscribers[i];if(subsc&&subsc.obj==obj&&subsc.fn==fn){return true;}}
while(i--);}
return false;};YAHOO.lang.augmentProto(Config,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Module=function(el,userConfig){if(el){this.init(el,userConfig);}else{}};var Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Module=YAHOO.widget.Module,UA=YAHOO.env.ua,m_oModuleTemplate,m_oHeaderTemplate,m_oBodyTemplate,m_oFooterTemplate,EVENT_TYPES={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTROY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},DEFAULT_CONFIG={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:false}};Module.IMG_ROOT=null;Module.IMG_ROOT_SSL=null;Module.CSS_MODULE="yui-module";Module.CSS_HEADER="hd";Module.CSS_BODY="bd";Module.CSS_FOOTER="ft";Module.RESIZE_MONITOR_SECURE_URL="javascript:false;";Module.RESIZE_MONITOR_BUFFER=1;Module.textResizeEvent=new CustomEvent("textResize");Module.forceDocumentRedraw=function(){var docEl=document.documentElement;if(docEl){docEl.className+=" ";docEl.className=YAHOO.lang.trim(docEl.className);}};function createModuleTemplate(){if(!m_oModuleTemplate){m_oModuleTemplate=document.createElement("div");m_oModuleTemplate.innerHTML=("<div class=\""+
Module.CSS_HEADER+"\"></div>"+"<div class=\""+
Module.CSS_BODY+"\"></div><div class=\""+
Module.CSS_FOOTER+"\"></div>");m_oHeaderTemplate=m_oModuleTemplate.firstChild;m_oBodyTemplate=m_oHeaderTemplate.nextSibling;m_oFooterTemplate=m_oBodyTemplate.nextSibling;}
return m_oModuleTemplate;}
function createHeader(){if(!m_oHeaderTemplate){createModuleTemplate();}
return(m_oHeaderTemplate.cloneNode(false));}
function createBody(){if(!m_oBodyTemplate){createModuleTemplate();}
return(m_oBodyTemplate.cloneNode(false));}
function createFooter(){if(!m_oFooterTemplate){createModuleTemplate();}
return(m_oFooterTemplate.cloneNode(false));}
Module.prototype={constructor:Module,element:null,header:null,body:null,footer:null,id:null,imageRoot:Module.IMG_ROOT,initEvents:function(){var SIGNATURE=CustomEvent.LIST;this.beforeInitEvent=this.createEvent(EVENT_TYPES.BEFORE_INIT);this.beforeInitEvent.signature=SIGNATURE;this.initEvent=this.createEvent(EVENT_TYPES.INIT);this.initEvent.signature=SIGNATURE;this.appendEvent=this.createEvent(EVENT_TYPES.APPEND);this.appendEvent.signature=SIGNATURE;this.beforeRenderEvent=this.createEvent(EVENT_TYPES.BEFORE_RENDER);this.beforeRenderEvent.signature=SIGNATURE;this.renderEvent=this.createEvent(EVENT_TYPES.RENDER);this.renderEvent.signature=SIGNATURE;this.changeHeaderEvent=this.createEvent(EVENT_TYPES.CHANGE_HEADER);this.changeHeaderEvent.signature=SIGNATURE;this.changeBodyEvent=this.createEvent(EVENT_TYPES.CHANGE_BODY);this.changeBodyEvent.signature=SIGNATURE;this.changeFooterEvent=this.createEvent(EVENT_TYPES.CHANGE_FOOTER);this.changeFooterEvent.signature=SIGNATURE;this.changeContentEvent=this.createEvent(EVENT_TYPES.CHANGE_CONTENT);this.changeContentEvent.signature=SIGNATURE;this.destroyEvent=this.createEvent(EVENT_TYPES.DESTROY);this.destroyEvent.signature=SIGNATURE;this.beforeShowEvent=this.createEvent(EVENT_TYPES.BEFORE_SHOW);this.beforeShowEvent.signature=SIGNATURE;this.showEvent=this.createEvent(EVENT_TYPES.SHOW);this.showEvent.signature=SIGNATURE;this.beforeHideEvent=this.createEvent(EVENT_TYPES.BEFORE_HIDE);this.beforeHideEvent.signature=SIGNATURE;this.hideEvent=this.createEvent(EVENT_TYPES.HIDE);this.hideEvent.signature=SIGNATURE;},platform:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1){return"windows";}else if(ua.indexOf("macintosh")!=-1){return"mac";}else{return false;}}(),browser:function(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf('opera')!=-1){return'opera';}else if(ua.indexOf('msie 7')!=-1){return'ie7';}else if(ua.indexOf('msie')!=-1){return'ie';}else if(ua.indexOf('safari')!=-1){return'safari';}else if(ua.indexOf('gecko')!=-1){return'gecko';}else{return false;}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true;}else{return false;}}(),initDefaultConfig:function(){this.cfg.addProperty(DEFAULT_CONFIG.VISIBLE.key,{handler:this.configVisible,value:DEFAULT_CONFIG.VISIBLE.value,validator:DEFAULT_CONFIG.VISIBLE.validator});this.cfg.addProperty(DEFAULT_CONFIG.EFFECT.key,{suppressEvent:DEFAULT_CONFIG.EFFECT.suppressEvent,supercedes:DEFAULT_CONFIG.EFFECT.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:DEFAULT_CONFIG.MONITOR_RESIZE.value});this.cfg.addProperty(DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.key,{value:DEFAULT_CONFIG.APPEND_TO_DOCUMENT_BODY.value});},init:function(el,userConfig){var elId,child;this.initEvents();this.beforeInitEvent.fire(Module);this.cfg=new Config(this);if(this.isSecure){this.imageRoot=Module.IMG_ROOT_SSL;}
if(typeof el=="string"){elId=el;el=document.getElementById(el);if(!el){el=(createModuleTemplate()).cloneNode(false);el.id=elId;}}
this.id=Dom.generateId(el);this.element=el;child=this.element.firstChild;if(child){var fndHd=false,fndBd=false,fndFt=false;do{if(1==child.nodeType){if(!fndHd&&Dom.hasClass(child,Module.CSS_HEADER)){this.header=child;fndHd=true;}else if(!fndBd&&Dom.hasClass(child,Module.CSS_BODY)){this.body=child;fndBd=true;}else if(!fndFt&&Dom.hasClass(child,Module.CSS_FOOTER)){this.footer=child;fndFt=true;}}}while((child=child.nextSibling));}
this.initDefaultConfig();Dom.addClass(this.element,Module.CSS_MODULE);if(userConfig){this.cfg.applyConfig(userConfig,true);}
if(!Config.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true);}
this.initEvent.fire(Module);},initResizeMonitor:function(){var isGeckoWin=(UA.gecko&&this.platform=="windows");if(isGeckoWin){var self=this;setTimeout(function(){self._initResizeMonitor();},0);}else{this._initResizeMonitor();}},_initResizeMonitor:function(){var oDoc,oIFrame,sHTML;function fireTextResize(){Module.textResizeEvent.fire();}
if(!UA.opera){oIFrame=Dom.get("_yuiResizeMonitor");var supportsCWResize=this._supportsCWResize();if(!oIFrame){oIFrame=document.createElement("iframe");if(this.isSecure&&Module.RESIZE_MONITOR_SECURE_URL&&UA.ie){oIFrame.src=Module.RESIZE_MONITOR_SECURE_URL;}
if(!supportsCWResize){sHTML=["<html><head><script ","type=\"text/javascript\">","window.onresize=function(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();};<","\/script></head>","<body></body></html>"].join('');oIFrame.src="data:text/html;charset=utf-8,"+encodeURIComponent(sHTML);}
oIFrame.id="_yuiResizeMonitor";oIFrame.title="Text Resize Monitor";oIFrame.style.position="absolute";oIFrame.style.visibility="hidden";var db=document.body,fc=db.firstChild;if(fc){db.insertBefore(oIFrame,fc);}else{db.appendChild(oIFrame);}
oIFrame.style.backgroundColor="transparent";oIFrame.style.borderWidth="0";oIFrame.style.width="2em";oIFrame.style.height="2em";oIFrame.style.left="0";oIFrame.style.top=(-1*(oIFrame.offsetHeight+Module.RESIZE_MONITOR_BUFFER))+"px";oIFrame.style.visibility="visible";if(UA.webkit){oDoc=oIFrame.contentWindow.document;oDoc.open();oDoc.close();}}
if(oIFrame&&oIFrame.contentWindow){Module.textResizeEvent.subscribe(this.onDomResize,this,true);if(!Module.textResizeInitialized){if(supportsCWResize){if(!Event.on(oIFrame.contentWindow,"resize",fireTextResize)){Event.on(oIFrame,"resize",fireTextResize);}}
Module.textResizeInitialized=true;}
this.resizeMonitor=oIFrame;}}},_supportsCWResize:function(){var bSupported=true;if(UA.gecko&&UA.gecko<=1.8){bSupported=false;}
return bSupported;},onDomResize:function(e,obj){var nTop=-1*(this.resizeMonitor.offsetHeight+Module.RESIZE_MONITOR_BUFFER);this.resizeMonitor.style.top=nTop+"px";this.resizeMonitor.style.left="0";},setHeader:function(headerContent){var oHeader=this.header||(this.header=createHeader());if(headerContent.nodeName){oHeader.innerHTML="";oHeader.appendChild(headerContent);}else{oHeader.innerHTML=headerContent;}
if(this._rendered){this._renderHeader();}
this.changeHeaderEvent.fire(headerContent);this.changeContentEvent.fire();},appendToHeader:function(element){var oHeader=this.header||(this.header=createHeader());oHeader.appendChild(element);this.changeHeaderEvent.fire(element);this.changeContentEvent.fire();},setBody:function(bodyContent){var oBody=this.body||(this.body=createBody());if(bodyContent.nodeName){oBody.innerHTML="";oBody.appendChild(bodyContent);}else{oBody.innerHTML=bodyContent;}
if(this._rendered){this._renderBody();}
this.changeBodyEvent.fire(bodyContent);this.changeContentEvent.fire();},appendToBody:function(element){var oBody=this.body||(this.body=createBody());oBody.appendChild(element);this.changeBodyEvent.fire(element);this.changeContentEvent.fire();},setFooter:function(footerContent){var oFooter=this.footer||(this.footer=createFooter());if(footerContent.nodeName){oFooter.innerHTML="";oFooter.appendChild(footerContent);}else{oFooter.innerHTML=footerContent;}
if(this._rendered){this._renderFooter();}
this.changeFooterEvent.fire(footerContent);this.changeContentEvent.fire();},appendToFooter:function(element){var oFooter=this.footer||(this.footer=createFooter());oFooter.appendChild(element);this.changeFooterEvent.fire(element);this.changeContentEvent.fire();},render:function(appendToNode,moduleElement){var me=this;function appendTo(parentNode){if(typeof parentNode=="string"){parentNode=document.getElementById(parentNode);}
if(parentNode){me._addToParent(parentNode,me.element);me.appendEvent.fire();}}
this.beforeRenderEvent.fire();if(!moduleElement){moduleElement=this.element;}
if(appendToNode){appendTo(appendToNode);}else{if(!Dom.inDocument(this.element)){return false;}}
this._renderHeader(moduleElement);this._renderBody(moduleElement);this._renderFooter(moduleElement);this._rendered=true;this.renderEvent.fire();return true;},_renderHeader:function(moduleElement){moduleElement=moduleElement||this.element;if(this.header&&!Dom.inDocument(this.header)){var firstChild=moduleElement.firstChild;if(firstChild){moduleElement.insertBefore(this.header,firstChild);}else{moduleElement.appendChild(this.header);}}},_renderBody:function(moduleElement){moduleElement=moduleElement||this.element;if(this.body&&!Dom.inDocument(this.body)){if(this.footer&&Dom.isAncestor(moduleElement,this.footer)){moduleElement.insertBefore(this.body,this.footer);}else{moduleElement.appendChild(this.body);}}},_renderFooter:function(moduleElement){moduleElement=moduleElement||this.element;if(this.footer&&!Dom.inDocument(this.footer)){moduleElement.appendChild(this.footer);}},destroy:function(){var parent;if(this.element){Event.purgeElement(this.element,true);parent=this.element.parentNode;}
if(parent){parent.removeChild(this.element);}
this.element=null;this.header=null;this.body=null;this.footer=null;Module.textResizeEvent.unsubscribe(this.onDomResize,this);this.cfg.destroy();this.cfg=null;this.destroyEvent.fire();},show:function(){this.cfg.setProperty("visible",true);},hide:function(){this.cfg.setProperty("visible",false);},configVisible:function(type,args,obj){var visible=args[0];if(visible){this.beforeShowEvent.fire();Dom.setStyle(this.element,"display","block");this.showEvent.fire();}else{this.beforeHideEvent.fire();Dom.setStyle(this.element,"display","none");this.hideEvent.fire();}},configMonitorResize:function(type,args,obj){var monitor=args[0];if(monitor){this.initResizeMonitor();}else{Module.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null;}},_addToParent:function(parentNode,element){if(!this.cfg.getProperty("appendtodocumentbody")&&parentNode===document.body&&parentNode.firstChild){parentNode.insertBefore(element,parentNode.firstChild);}else{parentNode.appendChild(element);}},toString:function(){return"Module "+this.id;}};YAHOO.lang.augmentProto(Module,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Overlay=function(el,userConfig){YAHOO.widget.Overlay.superclass.constructor.call(this,el,userConfig);};var Lang=YAHOO.lang,CustomEvent=YAHOO.util.CustomEvent,Module=YAHOO.widget.Module,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,UA=YAHOO.env.ua,Overlay=YAHOO.widget.Overlay,_SUBSCRIBE="subscribe",_UNSUBSCRIBE="unsubscribe",_CONTAINED="contained",m_oIFrameTemplate,EVENT_TYPES={"BEFORE_MOVE":"beforeMove","MOVE":"move"},DEFAULT_CONFIG={"X":{key:"x",validator:Lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"Y":{key:"y",validator:Lang.isNumber,suppressEvent:true,supercedes:["iframe"]},"XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context",suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",value:false,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"HEIGHT":{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"AUTO_FILL_HEIGHT":{key:"autofillheight",supercedes:["height"],value:"body"},"ZINDEX":{key:"zindex",value:null},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:false,validator:Lang.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value:(UA.ie==6?true:false),validator:Lang.isBoolean,supercedes:["zindex"]},"PREVENT_CONTEXT_OVERLAP":{key:"preventcontextoverlap",value:false,validator:Lang.isBoolean,supercedes:["constraintoviewport"]}};Overlay.IFRAME_SRC="javascript:false;";Overlay.IFRAME_OFFSET=3;Overlay.VIEWPORT_OFFSET=10;Overlay.TOP_LEFT="tl";Overlay.TOP_RIGHT="tr";Overlay.BOTTOM_LEFT="bl";Overlay.BOTTOM_RIGHT="br";Overlay.PREVENT_OVERLAP_X={"tltr":true,"blbr":true,"brbl":true,"trtl":true};Overlay.PREVENT_OVERLAP_Y={"trbr":true,"tlbl":true,"bltl":true,"brtr":true};Overlay.CSS_OVERLAY="yui-overlay";Overlay.CSS_HIDDEN="yui-overlay-hidden";Overlay.CSS_IFRAME="yui-overlay-iframe";Overlay.STD_MOD_RE=/^\s*?(body|footer|header)\s*?$/i;Overlay.windowScrollEvent=new CustomEvent("windowScroll");Overlay.windowResizeEvent=new CustomEvent("windowResize");Overlay.windowScrollHandler=function(e){var t=Event.getTarget(e);if(!t||t===window||t===window.document){if(UA.ie){if(!window.scrollEnd){window.scrollEnd=-1;}
clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){Overlay.windowScrollEvent.fire();},1);}else{Overlay.windowScrollEvent.fire();}}};Overlay.windowResizeHandler=function(e){if(UA.ie){if(!window.resizeEnd){window.resizeEnd=-1;}
clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){Overlay.windowResizeEvent.fire();},100);}else{Overlay.windowResizeEvent.fire();}};Overlay._initialized=null;if(Overlay._initialized===null){Event.on(window,"scroll",Overlay.windowScrollHandler);Event.on(window,"resize",Overlay.windowResizeHandler);Overlay._initialized=true;}
Overlay._TRIGGER_MAP={"windowScroll":Overlay.windowScrollEvent,"windowResize":Overlay.windowResizeEvent,"textResize":Module.textResizeEvent};YAHOO.extend(Overlay,Module,{CONTEXT_TRIGGERS:[],init:function(el,userConfig){Overlay.superclass.init.call(this,el);this.beforeInitEvent.fire(Overlay);Dom.addClass(this.element,Overlay.CSS_OVERLAY);if(userConfig){this.cfg.applyConfig(userConfig,true);}
if(this.platform=="mac"&&UA.gecko){if(!Config.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true);}
if(!Config.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true);}}
this.initEvent.fire(Overlay);},initEvents:function(){Overlay.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.beforeMoveEvent=this.createEvent(EVENT_TYPES.BEFORE_MOVE);this.beforeMoveEvent.signature=SIGNATURE;this.moveEvent=this.createEvent(EVENT_TYPES.MOVE);this.moveEvent.signature=SIGNATURE;},initDefaultConfig:function(){Overlay.superclass.initDefaultConfig.call(this);var cfg=this.cfg;cfg.addProperty(DEFAULT_CONFIG.X.key,{handler:this.configX,validator:DEFAULT_CONFIG.X.validator,suppressEvent:DEFAULT_CONFIG.X.suppressEvent,supercedes:DEFAULT_CONFIG.X.supercedes});cfg.addProperty(DEFAULT_CONFIG.Y.key,{handler:this.configY,validator:DEFAULT_CONFIG.Y.validator,suppressEvent:DEFAULT_CONFIG.Y.suppressEvent,supercedes:DEFAULT_CONFIG.Y.supercedes});cfg.addProperty(DEFAULT_CONFIG.XY.key,{handler:this.configXY,suppressEvent:DEFAULT_CONFIG.XY.suppressEvent,supercedes:DEFAULT_CONFIG.XY.supercedes});cfg.addProperty(DEFAULT_CONFIG.CONTEXT.key,{handler:this.configContext,suppressEvent:DEFAULT_CONFIG.CONTEXT.suppressEvent,supercedes:DEFAULT_CONFIG.CONTEXT.supercedes});cfg.addProperty(DEFAULT_CONFIG.FIXED_CENTER.key,{handler:this.configFixedCenter,value:DEFAULT_CONFIG.FIXED_CENTER.value,validator:DEFAULT_CONFIG.FIXED_CENTER.validator,supercedes:DEFAULT_CONFIG.FIXED_CENTER.supercedes});cfg.addProperty(DEFAULT_CONFIG.WIDTH.key,{handler:this.configWidth,suppressEvent:DEFAULT_CONFIG.WIDTH.suppressEvent,supercedes:DEFAULT_CONFIG.WIDTH.supercedes});cfg.addProperty(DEFAULT_CONFIG.HEIGHT.key,{handler:this.configHeight,suppressEvent:DEFAULT_CONFIG.HEIGHT.suppressEvent,supercedes:DEFAULT_CONFIG.HEIGHT.supercedes});cfg.addProperty(DEFAULT_CONFIG.AUTO_FILL_HEIGHT.key,{handler:this.configAutoFillHeight,value:DEFAULT_CONFIG.AUTO_FILL_HEIGHT.value,validator:this._validateAutoFill,supercedes:DEFAULT_CONFIG.AUTO_FILL_HEIGHT.supercedes});cfg.addProperty(DEFAULT_CONFIG.ZINDEX.key,{handler:this.configzIndex,value:DEFAULT_CONFIG.ZINDEX.value});cfg.addProperty(DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.value,validator:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.validator,supercedes:DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.supercedes});cfg.addProperty(DEFAULT_CONFIG.IFRAME.key,{handler:this.configIframe,value:DEFAULT_CONFIG.IFRAME.value,validator:DEFAULT_CONFIG.IFRAME.validator,supercedes:DEFAULT_CONFIG.IFRAME.supercedes});cfg.addProperty(DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.key,{value:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.value,validator:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.validator,supercedes:DEFAULT_CONFIG.PREVENT_CONTEXT_OVERLAP.supercedes});},moveTo:function(x,y){this.cfg.setProperty("xy",[x,y]);},hideMacGeckoScrollbars:function(){Dom.replaceClass(this.element,"show-scrollbars","hide-scrollbars");},showMacGeckoScrollbars:function(){Dom.replaceClass(this.element,"hide-scrollbars","show-scrollbars");},_setDomVisibility:function(show){Dom.setStyle(this.element,"visibility",(show)?"visible":"hidden");var hiddenClass=Overlay.CSS_HIDDEN;if(show){Dom.removeClass(this.element,hiddenClass);}else{Dom.addClass(this.element,hiddenClass);}},configVisible:function(type,args,obj){var visible=args[0],currentVis=Dom.getStyle(this.element,"visibility"),effect=this.cfg.getProperty("effect"),effectInstances=[],isMacGecko=(this.platform=="mac"&&UA.gecko),alreadySubscribed=Config.alreadySubscribed,eff,ei,e,i,j,k,h,nEffects,nEffectInstances;if(currentVis=="inherit"){e=this.element.parentNode;while(e.nodeType!=9&&e.nodeType!=11){currentVis=Dom.getStyle(e,"visibility");if(currentVis!="inherit"){break;}
e=e.parentNode;}
if(currentVis=="inherit"){currentVis="visible";}}
if(effect){if(effect instanceof Array){nEffects=effect.length;for(i=0;i<nEffects;i++){eff=effect[i];effectInstances[effectInstances.length]=eff.effect(this,eff.duration);}}else{effectInstances[effectInstances.length]=effect.effect(this,effect.duration);}}
if(visible){if(isMacGecko){this.showMacGeckoScrollbars();}
if(effect){if(visible){if(currentVis!="visible"||currentVis===""){this.beforeShowEvent.fire();nEffectInstances=effectInstances.length;for(j=0;j<nEffectInstances;j++){ei=effectInstances[j];if(j===0&&!alreadySubscribed(ei.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){ei.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true);}
ei.animateIn();}}}}else{if(currentVis!="visible"||currentVis===""){this.beforeShowEvent.fire();this._setDomVisibility(true);this.cfg.refireEvent("iframe");this.showEvent.fire();}else{this._setDomVisibility(true);}}}else{if(isMacGecko){this.hideMacGeckoScrollbars();}
if(effect){if(currentVis=="visible"){this.beforeHideEvent.fire();nEffectInstances=effectInstances.length;for(k=0;k<nEffectInstances;k++){h=effectInstances[k];if(k===0&&!alreadySubscribed(h.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){h.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true);}
h.animateOut();}}else if(currentVis===""){this._setDomVisibility(false);}}else{if(currentVis=="visible"||currentVis===""){this.beforeHideEvent.fire();this._setDomVisibility(false);this.hideEvent.fire();}else{this._setDomVisibility(false);}}}},doCenterOnDOMEvent:function(){var cfg=this.cfg,fc=cfg.getProperty("fixedcenter");if(cfg.getProperty("visible")){if(fc&&(fc!==_CONTAINED||this.fitsInViewport())){this.center();}}},fitsInViewport:function(){var nViewportOffset=Overlay.VIEWPORT_OFFSET,element=this.element,elementWidth=element.offsetWidth,elementHeight=element.offsetHeight,viewportWidth=Dom.getViewportWidth(),viewportHeight=Dom.getViewportHeight();return((elementWidth+nViewportOffset<viewportWidth)&&(elementHeight+nViewportOffset<viewportHeight));},configFixedCenter:function(type,args,obj){var val=args[0],alreadySubscribed=Config.alreadySubscribed,windowResizeEvent=Overlay.windowResizeEvent,windowScrollEvent=Overlay.windowScrollEvent;if(val){this.center();if(!alreadySubscribed(this.beforeShowEvent,this.center)){this.beforeShowEvent.subscribe(this.center);}
if(!alreadySubscribed(windowResizeEvent,this.doCenterOnDOMEvent,this)){windowResizeEvent.subscribe(this.doCenterOnDOMEvent,this,true);}
if(!alreadySubscribed(windowScrollEvent,this.doCenterOnDOMEvent,this)){windowScrollEvent.subscribe(this.doCenterOnDOMEvent,this,true);}}else{this.beforeShowEvent.unsubscribe(this.center);windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);}},configHeight:function(type,args,obj){var height=args[0],el=this.element;Dom.setStyle(el,"height",height);this.cfg.refireEvent("iframe");},configAutoFillHeight:function(type,args,obj){var fillEl=args[0],cfg=this.cfg,autoFillHeight="autofillheight",height="height",currEl=cfg.getProperty(autoFillHeight),autoFill=this._autoFillOnHeightChange;cfg.unsubscribeFromConfigEvent(height,autoFill);Module.textResizeEvent.unsubscribe(autoFill);this.changeContentEvent.unsubscribe(autoFill);if(currEl&&fillEl!==currEl&&this[currEl]){Dom.setStyle(this[currEl],height,"");}
if(fillEl){fillEl=Lang.trim(fillEl.toLowerCase());cfg.subscribeToConfigEvent(height,autoFill,this[fillEl],this);Module.textResizeEvent.subscribe(autoFill,this[fillEl],this);this.changeContentEvent.subscribe(autoFill,this[fillEl],this);cfg.setProperty(autoFillHeight,fillEl,true);}},configWidth:function(type,args,obj){var width=args[0],el=this.element;Dom.setStyle(el,"width",width);this.cfg.refireEvent("iframe");},configzIndex:function(type,args,obj){var zIndex=args[0],el=this.element;if(!zIndex){zIndex=Dom.getStyle(el,"zIndex");if(!zIndex||isNaN(zIndex)){zIndex=0;}}
if(this.iframe||this.cfg.getProperty("iframe")===true){if(zIndex<=0){zIndex=1;}}
Dom.setStyle(el,"zIndex",zIndex);this.cfg.setProperty("zIndex",zIndex,true);if(this.iframe){this.stackIframe();}},configXY:function(type,args,obj){var pos=args[0],x=pos[0],y=pos[1];this.cfg.setProperty("x",x);this.cfg.setProperty("y",y);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y]);},configX:function(type,args,obj){var x=args[0],y=this.cfg.getProperty("y");this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");Dom.setX(this.element,x,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y]);},configY:function(type,args,obj){var x=this.cfg.getProperty("x"),y=args[0];this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.beforeMoveEvent.fire([x,y]);x=this.cfg.getProperty("x");y=this.cfg.getProperty("y");Dom.setY(this.element,y,true);this.cfg.setProperty("xy",[x,y],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([x,y]);},showIframe:function(){var oIFrame=this.iframe,oParentNode;if(oIFrame){oParentNode=this.element.parentNode;if(oParentNode!=oIFrame.parentNode){this._addToParent(oParentNode,oIFrame);}
oIFrame.style.display="block";}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none";}},syncIframe:function(){var oIFrame=this.iframe,oElement=this.element,nOffset=Overlay.IFRAME_OFFSET,nDimensionOffset=(nOffset*2),aXY;if(oIFrame){oIFrame.style.width=(oElement.offsetWidth+nDimensionOffset+"px");oIFrame.style.height=(oElement.offsetHeight+nDimensionOffset+"px");aXY=this.cfg.getProperty("xy");if(!Lang.isArray(aXY)||(isNaN(aXY[0])||isNaN(aXY[1]))){this.syncPosition();aXY=this.cfg.getProperty("xy");}
Dom.setXY(oIFrame,[(aXY[0]-nOffset),(aXY[1]-nOffset)]);}},stackIframe:function(){if(this.iframe){var overlayZ=Dom.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(overlayZ)&&!isNaN(overlayZ)){Dom.setStyle(this.iframe,"zIndex",(overlayZ-1));}}},configIframe:function(type,args,obj){var bIFrame=args[0];function createIFrame(){var oIFrame=this.iframe,oElement=this.element,oParent;if(!oIFrame){if(!m_oIFrameTemplate){m_oIFrameTemplate=document.createElement("iframe");if(this.isSecure){m_oIFrameTemplate.src=Overlay.IFRAME_SRC;}
if(UA.ie){m_oIFrameTemplate.style.filter="alpha(opacity=0)";m_oIFrameTemplate.frameBorder=0;}
else{m_oIFrameTemplate.style.opacity="0";}
m_oIFrameTemplate.style.position="absolute";m_oIFrameTemplate.style.border="none";m_oIFrameTemplate.style.margin="0";m_oIFrameTemplate.style.padding="0";m_oIFrameTemplate.style.display="none";m_oIFrameTemplate.tabIndex=-1;m_oIFrameTemplate.className=Overlay.CSS_IFRAME;}
oIFrame=m_oIFrameTemplate.cloneNode(false);oIFrame.id=this.id+"_f";oParent=oElement.parentNode;var parentNode=oParent||document.body;this._addToParent(parentNode,oIFrame);this.iframe=oIFrame;}
this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true;}}
function onBeforeShow(){createIFrame.call(this);this.beforeShowEvent.unsubscribe(onBeforeShow);this._iframeDeferred=false;}
if(bIFrame){if(this.cfg.getProperty("visible")){createIFrame.call(this);}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(onBeforeShow);this._iframeDeferred=true;}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false;}}},_primeXYFromDOM:function(){if(YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))){this.syncPosition();this.cfg.refireEvent("xy");this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);}},configConstrainToViewport:function(type,args,obj){var val=args[0];if(val){if(!Config.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true);}
if(!Config.alreadySubscribed(this.beforeShowEvent,this._primeXYFromDOM)){this.beforeShowEvent.subscribe(this._primeXYFromDOM);}}else{this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this);}},configContext:function(type,args,obj){var contextArgs=args[0],contextEl,elementMagnetCorner,contextMagnetCorner,triggers,offset,defTriggers=this.CONTEXT_TRIGGERS;if(contextArgs){contextEl=contextArgs[0];elementMagnetCorner=contextArgs[1];contextMagnetCorner=contextArgs[2];triggers=contextArgs[3];offset=contextArgs[4];if(defTriggers&&defTriggers.length>0){triggers=(triggers||[]).concat(defTriggers);}
if(contextEl){if(typeof contextEl=="string"){this.cfg.setProperty("context",[document.getElementById(contextEl),elementMagnetCorner,contextMagnetCorner,triggers,offset],true);}
if(elementMagnetCorner&&contextMagnetCorner){this.align(elementMagnetCorner,contextMagnetCorner,offset);}
if(this._contextTriggers){this._processTriggers(this._contextTriggers,_UNSUBSCRIBE,this._alignOnTrigger);}
if(triggers){this._processTriggers(triggers,_SUBSCRIBE,this._alignOnTrigger);this._contextTriggers=triggers;}}}},_alignOnTrigger:function(type,args){this.align();},_findTriggerCE:function(t){var tce=null;if(t instanceof CustomEvent){tce=t;}else if(Overlay._TRIGGER_MAP[t]){tce=Overlay._TRIGGER_MAP[t];}
return tce;},_processTriggers:function(triggers,mode,fn){var t,tce;for(var i=0,l=triggers.length;i<l;++i){t=triggers[i];tce=this._findTriggerCE(t);if(tce){tce[mode](fn,this,true);}else{this[mode](t,fn);}}},align:function(elementAlign,contextAlign,xyOffset){var contextArgs=this.cfg.getProperty("context"),me=this,context,element,contextRegion;function doAlign(v,h){var alignX=null,alignY=null;switch(elementAlign){case Overlay.TOP_LEFT:alignX=h;alignY=v;break;case Overlay.TOP_RIGHT:alignX=h-element.offsetWidth;alignY=v;break;case Overlay.BOTTOM_LEFT:alignX=h;alignY=v-element.offsetHeight;break;case Overlay.BOTTOM_RIGHT:alignX=h-element.offsetWidth;alignY=v-element.offsetHeight;break;}
if(alignX!==null&&alignY!==null){if(xyOffset){alignX+=xyOffset[0];alignY+=xyOffset[1];}
me.moveTo(alignX,alignY);}}
if(contextArgs){context=contextArgs[0];element=this.element;me=this;if(!elementAlign){elementAlign=contextArgs[1];}
if(!contextAlign){contextAlign=contextArgs[2];}
if(!xyOffset&&contextArgs[4]){xyOffset=contextArgs[4];}
if(element&&context){contextRegion=Dom.getRegion(context);switch(contextAlign){case Overlay.TOP_LEFT:doAlign(contextRegion.top,contextRegion.left);break;case Overlay.TOP_RIGHT:doAlign(contextRegion.top,contextRegion.right);break;case Overlay.BOTTOM_LEFT:doAlign(contextRegion.bottom,contextRegion.left);break;case Overlay.BOTTOM_RIGHT:doAlign(contextRegion.bottom,contextRegion.right);break;}}}},enforceConstraints:function(type,args,obj){var pos=args[0];var cXY=this.getConstrainedXY(pos[0],pos[1]);this.cfg.setProperty("x",cXY[0],true);this.cfg.setProperty("y",cXY[1],true);this.cfg.setProperty("xy",cXY,true);},_getConstrainedPos:function(pos,val){var overlayEl=this.element,buffer=Overlay.VIEWPORT_OFFSET,x=(pos=="x"),overlaySize=(x)?overlayEl.offsetWidth:overlayEl.offsetHeight,viewportSize=(x)?Dom.getViewportWidth():Dom.getViewportHeight(),docScroll=(x)?Dom.getDocumentScrollLeft():Dom.getDocumentScrollTop(),overlapPositions=(x)?Overlay.PREVENT_OVERLAP_X:Overlay.PREVENT_OVERLAP_Y,context=this.cfg.getProperty("context"),bOverlayFitsInViewport=(overlaySize+buffer<viewportSize),bPreventContextOverlap=this.cfg.getProperty("preventcontextoverlap")&&context&&overlapPositions[(context[1]+context[2])],minConstraint=docScroll+buffer,maxConstraint=docScroll+viewportSize-overlaySize-buffer,constrainedVal=val;if(val<minConstraint||val>maxConstraint){if(bPreventContextOverlap){constrainedVal=this._preventOverlap(pos,context[0],overlaySize,viewportSize,docScroll);}else{if(bOverlayFitsInViewport){if(val<minConstraint){constrainedVal=minConstraint;}else if(val>maxConstraint){constrainedVal=maxConstraint;}}else{constrainedVal=minConstraint;}}}
return constrainedVal;},_preventOverlap:function(pos,contextEl,overlaySize,viewportSize,docScroll){var x=(pos=="x"),buffer=Overlay.VIEWPORT_OFFSET,overlay=this,contextElPos=((x)?Dom.getX(contextEl):Dom.getY(contextEl))-docScroll,contextElSize=(x)?contextEl.offsetWidth:contextEl.offsetHeight,minRegionSize=contextElPos-buffer,maxRegionSize=(viewportSize-(contextElPos+contextElSize))-buffer,bFlipped=false,flip=function(){var flippedVal;if((overlay.cfg.getProperty(pos)-docScroll)>contextElPos){flippedVal=(contextElPos-overlaySize);}else{flippedVal=(contextElPos+contextElSize);}
overlay.cfg.setProperty(pos,(flippedVal+docScroll),true);return flippedVal;},setPosition=function(){var displayRegionSize=((overlay.cfg.getProperty(pos)-docScroll)>contextElPos)?maxRegionSize:minRegionSize,position;if(overlaySize>displayRegionSize){if(bFlipped){flip();}else{flip();bFlipped=true;position=setPosition();}}
return position;};setPosition();return this.cfg.getProperty(pos);},getConstrainedX:function(x){return this._getConstrainedPos("x",x);},getConstrainedY:function(y){return this._getConstrainedPos("y",y);},getConstrainedXY:function(x,y){return[this.getConstrainedX(x),this.getConstrainedY(y)];},center:function(){var nViewportOffset=Overlay.VIEWPORT_OFFSET,elementWidth=this.element.offsetWidth,elementHeight=this.element.offsetHeight,viewPortWidth=Dom.getViewportWidth(),viewPortHeight=Dom.getViewportHeight(),x,y;if(elementWidth<viewPortWidth){x=(viewPortWidth/2)-(elementWidth/2)+Dom.getDocumentScrollLeft();}else{x=nViewportOffset+Dom.getDocumentScrollLeft();}
if(elementHeight<viewPortHeight){y=(viewPortHeight/2)-(elementHeight/2)+Dom.getDocumentScrollTop();}else{y=nViewportOffset+Dom.getDocumentScrollTop();}
this.cfg.setProperty("xy",[parseInt(x,10),parseInt(y,10)]);this.cfg.refireEvent("iframe");if(UA.webkit){this.forceContainerRedraw();}},syncPosition:function(){var pos=Dom.getXY(this.element);this.cfg.setProperty("x",pos[0],true);this.cfg.setProperty("y",pos[1],true);this.cfg.setProperty("xy",pos,true);},onDomResize:function(e,obj){var me=this;Overlay.superclass.onDomResize.call(this,e,obj);setTimeout(function(){me.syncPosition();me.cfg.refireEvent("iframe");me.cfg.refireEvent("context");},0);},_getComputedHeight:(function(){if(document.defaultView&&document.defaultView.getComputedStyle){return function(el){var height=null;if(el.ownerDocument&&el.ownerDocument.defaultView){var computed=el.ownerDocument.defaultView.getComputedStyle(el,'');if(computed){height=parseInt(computed.height,10);}}
return(Lang.isNumber(height))?height:null;};}else{return function(el){var height=null;if(el.style.pixelHeight){height=el.style.pixelHeight;}
return(Lang.isNumber(height))?height:null;};}})(),_validateAutoFillHeight:function(val){return(!val)||(Lang.isString(val)&&Overlay.STD_MOD_RE.test(val));},_autoFillOnHeightChange:function(type,args,el){var height=this.cfg.getProperty("height");if((height&&height!=="auto")||(height===0)){this.fillHeight(el);}},_getPreciseHeight:function(el){var height=el.offsetHeight;if(el.getBoundingClientRect){var rect=el.getBoundingClientRect();height=rect.bottom-rect.top;}
return height;},fillHeight:function(el){if(el){var container=this.innerElement||this.element,containerEls=[this.header,this.body,this.footer],containerEl,total=0,filled=0,remaining=0,validEl=false;for(var i=0,l=containerEls.length;i<l;i++){containerEl=containerEls[i];if(containerEl){if(el!==containerEl){filled+=this._getPreciseHeight(containerEl);}else{validEl=true;}}}
if(validEl){if(UA.ie||UA.opera){Dom.setStyle(el,'height',0+'px');}
total=this._getComputedHeight(container);if(total===null){Dom.addClass(container,"yui-override-padding");total=container.clientHeight;Dom.removeClass(container,"yui-override-padding");}
remaining=Math.max(total-filled,0);Dom.setStyle(el,"height",remaining+"px");if(el.offsetHeight!=remaining){remaining=Math.max(remaining-(el.offsetHeight-remaining),0);}
Dom.setStyle(el,"height",remaining+"px");}}},bringToTop:function(){var aOverlays=[],oElement=this.element;function compareZIndexDesc(p_oOverlay1,p_oOverlay2){var sZIndex1=Dom.getStyle(p_oOverlay1,"zIndex"),sZIndex2=Dom.getStyle(p_oOverlay2,"zIndex"),nZIndex1=(!sZIndex1||isNaN(sZIndex1))?0:parseInt(sZIndex1,10),nZIndex2=(!sZIndex2||isNaN(sZIndex2))?0:parseInt(sZIndex2,10);if(nZIndex1>nZIndex2){return-1;}else if(nZIndex1<nZIndex2){return 1;}else{return 0;}}
function isOverlayElement(p_oElement){var isOverlay=Dom.hasClass(p_oElement,Overlay.CSS_OVERLAY),Panel=YAHOO.widget.Panel;if(isOverlay&&!Dom.isAncestor(oElement,p_oElement)){if(Panel&&Dom.hasClass(p_oElement,Panel.CSS_PANEL)){aOverlays[aOverlays.length]=p_oElement.parentNode;}else{aOverlays[aOverlays.length]=p_oElement;}}}
Dom.getElementsBy(isOverlayElement,"DIV",document.body);aOverlays.sort(compareZIndexDesc);var oTopOverlay=aOverlays[0],nTopZIndex;if(oTopOverlay){nTopZIndex=Dom.getStyle(oTopOverlay,"zIndex");if(!isNaN(nTopZIndex)){var bRequiresBump=false;if(oTopOverlay!=oElement){bRequiresBump=true;}else if(aOverlays.length>1){var nNextZIndex=Dom.getStyle(aOverlays[1],"zIndex");if(!isNaN(nNextZIndex)&&(nTopZIndex==nNextZIndex)){bRequiresBump=true;}}
if(bRequiresBump){this.cfg.setProperty("zindex",(parseInt(nTopZIndex,10)+2));}}}},destroy:function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe);}
this.iframe=null;Overlay.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);Overlay.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);Module.textResizeEvent.unsubscribe(this._autoFillOnHeightChange);if(this._contextTriggers){this._processTriggers(this._contextTriggers,_UNSUBSCRIBE,this._alignOnTrigger);}
Overlay.superclass.destroy.call(this);},forceContainerRedraw:function(){var c=this;Dom.addClass(c.element,"yui-force-redraw");setTimeout(function(){Dom.removeClass(c.element,"yui-force-redraw");},0);},toString:function(){return"Overlay "+this.id;}});}());(function(){YAHOO.widget.OverlayManager=function(userConfig){this.init(userConfig);};var Overlay=YAHOO.widget.Overlay,Event=YAHOO.util.Event,Dom=YAHOO.util.Dom,Config=YAHOO.util.Config,CustomEvent=YAHOO.util.CustomEvent,OverlayManager=YAHOO.widget.OverlayManager;OverlayManager.CSS_FOCUSED="focused";OverlayManager.prototype={constructor:OverlayManager,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"});},init:function(userConfig){this.cfg=new Config(this);this.initDefaultConfig();if(userConfig){this.cfg.applyConfig(userConfig,true);}
this.cfg.fireQueue();var activeOverlay=null;this.getActive=function(){return activeOverlay;};this.focus=function(overlay){var o=this.find(overlay);if(o){o.focus();}};this.remove=function(overlay){var o=this.find(overlay),originalZ;if(o){if(activeOverlay==o){activeOverlay=null;}
var bDestroyed=(o.element===null&&o.cfg===null)?true:false;if(!bDestroyed){originalZ=Dom.getStyle(o.element,"zIndex");o.cfg.setProperty("zIndex",-1000,true);}
this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));o.hideEvent.unsubscribe(o.blur);o.destroyEvent.unsubscribe(this._onOverlayDestroy,o);o.focusEvent.unsubscribe(this._onOverlayFocusHandler,o);o.blurEvent.unsubscribe(this._onOverlayBlurHandler,o);if(!bDestroyed){Event.removeListener(o.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);o.cfg.setProperty("zIndex",originalZ,true);o.cfg.setProperty("manager",null);}
if(o.focusEvent._managed){o.focusEvent=null;}
if(o.blurEvent._managed){o.blurEvent=null;}
if(o.focus._managed){o.focus=null;}
if(o.blur._managed){o.blur=null;}}};this.blurAll=function(){var nOverlays=this.overlays.length,i;if(nOverlays>0){i=nOverlays-1;do{this.overlays[i].blur();}
while(i--);}};this._manageBlur=function(overlay){var changed=false;if(activeOverlay==overlay){Dom.removeClass(activeOverlay.element,OverlayManager.CSS_FOCUSED);activeOverlay=null;changed=true;}
return changed;};this._manageFocus=function(overlay){var changed=false;if(activeOverlay!=overlay){if(activeOverlay){activeOverlay.blur();}
activeOverlay=overlay;this.bringToTop(activeOverlay);Dom.addClass(activeOverlay.element,OverlayManager.CSS_FOCUSED);changed=true;}
return changed;};var overlays=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[];}
if(overlays){this.register(overlays);this.overlays.sort(this.compareZIndexDesc);}},_onOverlayElementFocus:function(p_oEvent){var oTarget=Event.getTarget(p_oEvent),oClose=this.close;if(oClose&&(oTarget==oClose||Dom.isAncestor(oClose,oTarget))){this.blur();}else{this.focus();}},_onOverlayDestroy:function(p_sType,p_aArgs,p_oOverlay){this.remove(p_oOverlay);},_onOverlayFocusHandler:function(p_sType,p_aArgs,p_oOverlay){this._manageFocus(p_oOverlay);},_onOverlayBlurHandler:function(p_sType,p_aArgs,p_oOverlay){this._manageBlur(p_oOverlay);},_bindFocus:function(overlay){var mgr=this;if(!overlay.focusEvent){overlay.focusEvent=overlay.createEvent("focus");overlay.focusEvent.signature=CustomEvent.LIST;overlay.focusEvent._managed=true;}else{overlay.focusEvent.subscribe(mgr._onOverlayFocusHandler,overlay,mgr);}
if(!overlay.focus){Event.on(overlay.element,mgr.cfg.getProperty("focusevent"),mgr._onOverlayElementFocus,null,overlay);overlay.focus=function(){if(mgr._manageFocus(this)){if(this.cfg.getProperty("visible")&&this.focusFirst){this.focusFirst();}
this.focusEvent.fire();}};overlay.focus._managed=true;}},_bindBlur:function(overlay){var mgr=this;if(!overlay.blurEvent){overlay.blurEvent=overlay.createEvent("blur");overlay.blurEvent.signature=CustomEvent.LIST;overlay.focusEvent._managed=true;}else{overlay.blurEvent.subscribe(mgr._onOverlayBlurHandler,overlay,mgr);}
if(!overlay.blur){overlay.blur=function(){if(mgr._manageBlur(this)){this.blurEvent.fire();}};overlay.blur._managed=true;}
overlay.hideEvent.subscribe(overlay.blur);},_bindDestroy:function(overlay){var mgr=this;overlay.destroyEvent.subscribe(mgr._onOverlayDestroy,overlay,mgr);},_syncZIndex:function(overlay){var zIndex=Dom.getStyle(overlay.element,"zIndex");if(!isNaN(zIndex)){overlay.cfg.setProperty("zIndex",parseInt(zIndex,10));}else{overlay.cfg.setProperty("zIndex",0);}},register:function(overlay){var registered=false,i,n;if(overlay instanceof Overlay){overlay.cfg.addProperty("manager",{value:this});this._bindFocus(overlay);this._bindBlur(overlay);this._bindDestroy(overlay);this._syncZIndex(overlay);this.overlays.push(overlay);this.bringToTop(overlay);registered=true;}else if(overlay instanceof Array){for(i=0,n=overlay.length;i<n;i++){registered=this.register(overlay[i])||registered;}}
return registered;},bringToTop:function(p_oOverlay){var oOverlay=this.find(p_oOverlay),nTopZIndex,oTopOverlay,aOverlays;if(oOverlay){aOverlays=this.overlays;aOverlays.sort(this.compareZIndexDesc);oTopOverlay=aOverlays[0];if(oTopOverlay){nTopZIndex=Dom.getStyle(oTopOverlay.element,"zIndex");if(!isNaN(nTopZIndex)){var bRequiresBump=false;if(oTopOverlay!==oOverlay){bRequiresBump=true;}else if(aOverlays.length>1){var nNextZIndex=Dom.getStyle(aOverlays[1].element,"zIndex");if(!isNaN(nNextZIndex)&&(nTopZIndex==nNextZIndex)){bRequiresBump=true;}}
if(bRequiresBump){oOverlay.cfg.setProperty("zindex",(parseInt(nTopZIndex,10)+2));}}
aOverlays.sort(this.compareZIndexDesc);}}},find:function(overlay){var isInstance=overlay instanceof Overlay,overlays=this.overlays,n=overlays.length,found=null,o,i;if(isInstance||typeof overlay=="string"){for(i=n-1;i>=0;i--){o=overlays[i];if((isInstance&&(o===overlay))||(o.id==overlay)){found=o;break;}}}
return found;},compareZIndexDesc:function(o1,o2){var zIndex1=(o1.cfg)?o1.cfg.getProperty("zIndex"):null,zIndex2=(o2.cfg)?o2.cfg.getProperty("zIndex"):null;if(zIndex1===null&&zIndex2===null){return 0;}else if(zIndex1===null){return 1;}else if(zIndex2===null){return-1;}else if(zIndex1>zIndex2){return-1;}else if(zIndex1<zIndex2){return 1;}else{return 0;}},showAll:function(){var overlays=this.overlays,n=overlays.length,i;for(i=n-1;i>=0;i--){overlays[i].show();}},hideAll:function(){var overlays=this.overlays,n=overlays.length,i;for(i=n-1;i>=0;i--){overlays[i].hide();}},toString:function(){return"OverlayManager";}};}());(function(){YAHOO.widget.Tooltip=function(el,userConfig){YAHOO.widget.Tooltip.superclass.constructor.call(this,el,userConfig);};var Lang=YAHOO.lang,Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Dom=YAHOO.util.Dom,Tooltip=YAHOO.widget.Tooltip,UA=YAHOO.env.ua,bIEQuirks=(UA.ie&&(UA.ie<=6||document.compatMode=="BackCompat")),m_oShadowTemplate,DEFAULT_CONFIG={"PREVENT_OVERLAP":{key:"preventoverlap",value:true,validator:Lang.isBoolean,supercedes:["x","y","xy"]},"SHOW_DELAY":{key:"showdelay",value:2010,validator:Lang.isNumber},"AUTO_DISMISS_DELAY":{key:"autodismissdelay",value:5000,validator:Lang.isNumber},"HIDE_DELAY":{key:"hidedelay",value:250,validator:Lang.isNumber},"TEXT":{key:"text",suppressEvent:true},"CONTAINER":{key:"container"},"DISABLED":{key:"disabled",value:false,suppressEvent:true},"XY_OFFSET":{key:"xyoffset",value:[0,25],suppressEvent:true}},EVENT_TYPES={"CONTEXT_MOUSE_OVER":"contextMouseOver","CONTEXT_MOUSE_OUT":"contextMouseOut","CONTEXT_TRIGGER":"contextTrigger"};Tooltip.CSS_TOOLTIP="yui-tt";function restoreOriginalWidth(sOriginalWidth,sForcedWidth){var oConfig=this.cfg,sCurrentWidth=oConfig.getProperty("width");if(sCurrentWidth==sForcedWidth){oConfig.setProperty("width",sOriginalWidth);}}
function setWidthToOffsetWidth(p_sType,p_aArgs){if("_originalWidth"in this){restoreOriginalWidth.call(this,this._originalWidth,this._forcedWidth);}
var oBody=document.body,oConfig=this.cfg,sOriginalWidth=oConfig.getProperty("width"),sNewWidth,oClone;if((!sOriginalWidth||sOriginalWidth=="auto")&&(oConfig.getProperty("container")!=oBody||oConfig.getProperty("x")>=Dom.getViewportWidth()||oConfig.getProperty("y")>=Dom.getViewportHeight())){oClone=this.element.cloneNode(true);oClone.style.visibility="hidden";oClone.style.top="0px";oClone.style.left="0px";oBody.appendChild(oClone);sNewWidth=(oClone.offsetWidth+"px");oBody.removeChild(oClone);oClone=null;oConfig.setProperty("width",sNewWidth);oConfig.refireEvent("xy");this._originalWidth=sOriginalWidth||"";this._forcedWidth=sNewWidth;}}
function onDOMReady(p_sType,p_aArgs,p_oObject){this.render(p_oObject);}
function onInit(){Event.onDOMReady(onDOMReady,this.cfg.getProperty("container"),this);}
YAHOO.extend(Tooltip,YAHOO.widget.Overlay,{init:function(el,userConfig){Tooltip.superclass.init.call(this,el);this.beforeInitEvent.fire(Tooltip);Dom.addClass(this.element,Tooltip.CSS_TOOLTIP);if(userConfig){this.cfg.applyConfig(userConfig,true);}
this.cfg.queueProperty("visible",false);this.cfg.queueProperty("constraintoviewport",true);this.setBody("");this.subscribe("changeContent",setWidthToOffsetWidth);this.subscribe("init",onInit);this.subscribe("render",this.onRender);this.initEvent.fire(Tooltip);},initEvents:function(){Tooltip.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.contextMouseOverEvent=this.createEvent(EVENT_TYPES.CONTEXT_MOUSE_OVER);this.contextMouseOverEvent.signature=SIGNATURE;this.contextMouseOutEvent=this.createEvent(EVENT_TYPES.CONTEXT_MOUSE_OUT);this.contextMouseOutEvent.signature=SIGNATURE;this.contextTriggerEvent=this.createEvent(EVENT_TYPES.CONTEXT_TRIGGER);this.contextTriggerEvent.signature=SIGNATURE;},initDefaultConfig:function(){Tooltip.superclass.initDefaultConfig.call(this);this.cfg.addProperty(DEFAULT_CONFIG.PREVENT_OVERLAP.key,{value:DEFAULT_CONFIG.PREVENT_OVERLAP.value,validator:DEFAULT_CONFIG.PREVENT_OVERLAP.validator,supercedes:DEFAULT_CONFIG.PREVENT_OVERLAP.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.SHOW_DELAY.key,{handler:this.configShowDelay,value:2010,validator:DEFAULT_CONFIG.SHOW_DELAY.validator});this.cfg.addProperty(DEFAULT_CONFIG.AUTO_DISMISS_DELAY.key,{handler:this.configAutoDismissDelay,value:DEFAULT_CONFIG.AUTO_DISMISS_DELAY.value,validator:DEFAULT_CONFIG.AUTO_DISMISS_DELAY.validator});this.cfg.addProperty(DEFAULT_CONFIG.HIDE_DELAY.key,{handler:this.configHideDelay,value:DEFAULT_CONFIG.HIDE_DELAY.value,validator:DEFAULT_CONFIG.HIDE_DELAY.validator});this.cfg.addProperty(DEFAULT_CONFIG.TEXT.key,{handler:this.configText,suppressEvent:DEFAULT_CONFIG.TEXT.suppressEvent});this.cfg.addProperty(DEFAULT_CONFIG.CONTAINER.key,{handler:this.configContainer,value:document.body});this.cfg.addProperty(DEFAULT_CONFIG.DISABLED.key,{handler:this.configContainer,value:DEFAULT_CONFIG.DISABLED.value,supressEvent:DEFAULT_CONFIG.DISABLED.suppressEvent});this.cfg.addProperty(DEFAULT_CONFIG.XY_OFFSET.key,{value:DEFAULT_CONFIG.XY_OFFSET.value.concat(),supressEvent:DEFAULT_CONFIG.XY_OFFSET.suppressEvent});},configText:function(type,args,obj){var text=args[0];if(text){this.setBody(text);}},configContainer:function(type,args,obj){var container=args[0];if(typeof container=='string'){this.cfg.setProperty("container",document.getElementById(container),true);}},_removeEventListeners:function(){var aElements=this._context,nElements,oElement,i;if(aElements){nElements=aElements.length;if(nElements>0){i=nElements-1;do{oElement=aElements[i];Event.removeListener(oElement,"mouseover",this.onContextMouseOver);Event.removeListener(oElement,"mousemove",this.onContextMouseMove);Event.removeListener(oElement,"mouseout",this.onContextMouseOut);}
while(i--);}}},configContext:function(type,args,obj){var context=args[0],aElements,nElements,oElement,i;if(context){if(!(context instanceof Array)){if(typeof context=="string"){this.cfg.setProperty("context",[document.getElementById(context)],true);}else{this.cfg.setProperty("context",[context],true);}
context=this.cfg.getProperty("context");}
this._removeEventListeners();this._context=context;aElements=this._context;if(aElements){nElements=aElements.length;if(nElements>0){i=nElements-1;do{oElement=aElements[i];Event.on(oElement,"mouseover",this.onContextMouseOver,this);Event.on(oElement,"mousemove",this.onContextMouseMove,this);Event.on(oElement,"mouseout",this.onContextMouseOut,this);}
while(i--);}}}},onContextMouseMove:function(e,obj){obj.pageX=Event.getPageX(e);obj.pageY=Event.getPageY(e);},onContextMouseOver:function(e,obj){var context=this;if(context.title){obj._tempTitle=context.title;context.title="";}
if(obj.fireEvent("contextMouseOver",context,e)!==false&&!obj.cfg.getProperty("disabled")){if(obj.hideProcId){clearTimeout(obj.hideProcId);obj.hideProcId=null;}
Event.on(context,"mousemove",obj.onContextMouseMove,obj);obj.showProcId=obj.doShow(e,context);}},onContextMouseOut:function(e,obj){var el=this;if(obj._tempTitle){el.title=obj._tempTitle;obj._tempTitle=null;}
if(obj.showProcId){clearTimeout(obj.showProcId);obj.showProcId=null;}
if(obj.hideProcId){clearTimeout(obj.hideProcId);obj.hideProcId=null;}
obj.fireEvent("contextMouseOut",el,e);obj.hideProcId=setTimeout(function(){obj.hide();},obj.cfg.getProperty("hidedelay"));},doShow:function(e,context){var offset=this.cfg.getProperty("xyoffset"),xOffset=offset[0],yOffset=offset[1],me=this;if(UA.opera&&context.tagName&&context.tagName.toUpperCase()=="A"){yOffset+=12;}
return setTimeout(function(){var txt=me.cfg.getProperty("text");if(me._tempTitle&&(txt===""||YAHOO.lang.isUndefined(txt)||YAHOO.lang.isNull(txt))){me.setBody(me._tempTitle);}else{me.cfg.refireEvent("text");}
me.moveTo(me.pageX+xOffset,me.pageY+yOffset);if(me.cfg.getProperty("preventoverlap")){me.preventOverlap(me.pageX,me.pageY);}
Event.removeListener(context,"mousemove",me.onContextMouseMove);me.contextTriggerEvent.fire(context);me.show();me.hideProcId=me.doHide();},this.cfg.getProperty("showdelay"));},doHide:function(){var me=this;return setTimeout(function(){me.hide();},this.cfg.getProperty("autodismissdelay"));},preventOverlap:function(pageX,pageY){var height=this.element.offsetHeight,mousePoint=new YAHOO.util.Point(pageX,pageY),elementRegion=Dom.getRegion(this.element);elementRegion.top-=5;elementRegion.left-=5;elementRegion.right+=5;elementRegion.bottom+=5;if(elementRegion.contains(mousePoint)){this.cfg.setProperty("y",(pageY-height-5));}},onRender:function(p_sType,p_aArgs){function sizeShadow(){var oElement=this.element,oShadow=this.underlay;if(oShadow){oShadow.style.width=(oElement.offsetWidth+6)+"px";oShadow.style.height=(oElement.offsetHeight+1)+"px";}}
function addShadowVisibleClass(){Dom.addClass(this.underlay,"yui-tt-shadow-visible");if(UA.ie){this.forceUnderlayRedraw();}}
function removeShadowVisibleClass(){Dom.removeClass(this.underlay,"yui-tt-shadow-visible");}
function createShadow(){var oShadow=this.underlay,oElement,Module,nIE,me;if(!oShadow){oElement=this.element;Module=YAHOO.widget.Module;nIE=UA.ie;me=this;if(!m_oShadowTemplate){m_oShadowTemplate=document.createElement("div");m_oShadowTemplate.className="yui-tt-shadow";}
oShadow=m_oShadowTemplate.cloneNode(false);oElement.appendChild(oShadow);this.underlay=oShadow;this._shadow=this.underlay;addShadowVisibleClass.call(this);this.subscribe("beforeShow",addShadowVisibleClass);this.subscribe("hide",removeShadowVisibleClass);if(bIEQuirks){window.setTimeout(function(){sizeShadow.call(me);},0);this.cfg.subscribeToConfigEvent("width",sizeShadow);this.cfg.subscribeToConfigEvent("height",sizeShadow);this.subscribe("changeContent",sizeShadow);Module.textResizeEvent.subscribe(sizeShadow,this,true);this.subscribe("destroy",function(){Module.textResizeEvent.unsubscribe(sizeShadow,this);});}}}
function onBeforeShow(){createShadow.call(this);this.unsubscribe("beforeShow",onBeforeShow);}
if(this.cfg.getProperty("visible")){createShadow.call(this);}else{this.subscribe("beforeShow",onBeforeShow);}},forceUnderlayRedraw:function(){var tt=this;Dom.addClass(tt.underlay,"yui-force-redraw");setTimeout(function(){Dom.removeClass(tt.underlay,"yui-force-redraw");},0);},destroy:function(){this._removeEventListeners();Tooltip.superclass.destroy.call(this);},toString:function(){return"Tooltip "+this.id;}});}());(function(){YAHOO.widget.Panel=function(el,userConfig){YAHOO.widget.Panel.superclass.constructor.call(this,el,userConfig);};var _currentModal=null;var Lang=YAHOO.lang,Util=YAHOO.util,Dom=Util.Dom,Event=Util.Event,CustomEvent=Util.CustomEvent,KeyListener=YAHOO.util.KeyListener,Config=Util.Config,Overlay=YAHOO.widget.Overlay,Panel=YAHOO.widget.Panel,UA=YAHOO.env.ua,bIEQuirks=(UA.ie&&(UA.ie<=6||document.compatMode=="BackCompat")),m_oMaskTemplate,m_oUnderlayTemplate,m_oCloseIconTemplate,EVENT_TYPES={"SHOW_MASK":"showMask","HIDE_MASK":"hideMask","DRAG":"drag"},DEFAULT_CONFIG={"CLOSE":{key:"close",value:true,validator:Lang.isBoolean,supercedes:["visible"]},"DRAGGABLE":{key:"draggable",value:(Util.DD?true:false),validator:Lang.isBoolean,supercedes:["visible"]},"DRAG_ONLY":{key:"dragonly",value:false,validator:Lang.isBoolean,supercedes:["draggable"]},"UNDERLAY":{key:"underlay",value:"shadow",supercedes:["visible"]},"MODAL":{key:"modal",value:false,validator:Lang.isBoolean,supercedes:["visible","zindex"]},"KEY_LISTENERS":{key:"keylisteners",suppressEvent:true,supercedes:["visible"]},"STRINGS":{key:"strings",supercedes:["close"],validator:Lang.isObject,value:{close:"Close"}}};Panel.CSS_PANEL="yui-panel";Panel.CSS_PANEL_CONTAINER="yui-panel-container";Panel.FOCUSABLE=["a","button","select","textarea","input","iframe"];function createHeader(p_sType,p_aArgs){if(!this.header&&this.cfg.getProperty("draggable")){this.setHeader("&#160;");}}
function restoreOriginalWidth(p_sType,p_aArgs,p_oObject){var sOriginalWidth=p_oObject[0],sNewWidth=p_oObject[1],oConfig=this.cfg,sCurrentWidth=oConfig.getProperty("width");if(sCurrentWidth==sNewWidth){oConfig.setProperty("width",sOriginalWidth);}
this.unsubscribe("hide",restoreOriginalWidth,p_oObject);}
function setWidthToOffsetWidth(p_sType,p_aArgs){var oConfig,sOriginalWidth,sNewWidth;if(bIEQuirks){oConfig=this.cfg;sOriginalWidth=oConfig.getProperty("width");if(!sOriginalWidth||sOriginalWidth=="auto"){sNewWidth=(this.element.offsetWidth+"px");oConfig.setProperty("width",sNewWidth);this.subscribe("hide",restoreOriginalWidth,[(sOriginalWidth||""),sNewWidth]);}}}
YAHOO.extend(Panel,Overlay,{init:function(el,userConfig){Panel.superclass.init.call(this,el);this.beforeInitEvent.fire(Panel);Dom.addClass(this.element,Panel.CSS_PANEL);this.buildWrapper();if(userConfig){this.cfg.applyConfig(userConfig,true);}
this.subscribe("showMask",this._addFocusHandlers);this.subscribe("hideMask",this._removeFocusHandlers);this.subscribe("beforeRender",createHeader);this.subscribe("render",function(){this.setFirstLastFocusable();this.subscribe("changeContent",this.setFirstLastFocusable);});this.subscribe("show",this.focusFirst);this.initEvent.fire(Panel);},_onElementFocus:function(e){if(_currentModal===this){var target=Event.getTarget(e),doc=document.documentElement,insideDoc=(target!==doc&&target!==window);if(insideDoc&&target!==this.element&&target!==this.mask&&!Dom.isAncestor(this.element,target)){try{if(this.firstElement){this.firstElement.focus();}else{if(this._modalFocus){this._modalFocus.focus();}else{this.innerElement.focus();}}}catch(err){try{if(insideDoc&&target!==document.body){target.blur();}}catch(err2){}}}}},_addFocusHandlers:function(p_sType,p_aArgs){if(!this.firstElement){if(UA.webkit||UA.opera){if(!this._modalFocus){this._createHiddenFocusElement();}}else{this.innerElement.tabIndex=0;}}
this.setTabLoop(this.firstElement,this.lastElement);Event.onFocus(document.documentElement,this._onElementFocus,this,true);_currentModal=this;},_createHiddenFocusElement:function(){var e=document.createElement("button");e.style.height="1px";e.style.width="1px";e.style.position="absolute";e.style.left="-10000em";e.style.opacity=0;e.tabIndex=-1;this.innerElement.appendChild(e);this._modalFocus=e;},_removeFocusHandlers:function(p_sType,p_aArgs){Event.removeFocusListener(document.documentElement,this._onElementFocus,this);if(_currentModal==this){_currentModal=null;}},focusFirst:function(type,args,obj){var el=this.firstElement;if(args&&args[1]){Event.stopEvent(args[1]);}
if(el){try{el.focus();}catch(err){}}},focusLast:function(type,args,obj){var el=this.lastElement;if(args&&args[1]){Event.stopEvent(args[1]);}
if(el){try{el.focus();}catch(err){}}},setTabLoop:function(firstElement,lastElement){var backTab=this.preventBackTab,tab=this.preventTabOut,showEvent=this.showEvent,hideEvent=this.hideEvent;if(backTab){backTab.disable();showEvent.unsubscribe(backTab.enable,backTab);hideEvent.unsubscribe(backTab.disable,backTab);backTab=this.preventBackTab=null;}
if(tab){tab.disable();showEvent.unsubscribe(tab.enable,tab);hideEvent.unsubscribe(tab.disable,tab);tab=this.preventTabOut=null;}
if(firstElement){this.preventBackTab=new KeyListener(firstElement,{shift:true,keys:9},{fn:this.focusLast,scope:this,correctScope:true});backTab=this.preventBackTab;showEvent.subscribe(backTab.enable,backTab,true);hideEvent.subscribe(backTab.disable,backTab,true);}
if(lastElement){this.preventTabOut=new KeyListener(lastElement,{shift:false,keys:9},{fn:this.focusFirst,scope:this,correctScope:true});tab=this.preventTabOut;showEvent.subscribe(tab.enable,tab,true);hideEvent.subscribe(tab.disable,tab,true);}},getFocusableElements:function(root){root=root||this.innerElement;var focusable={};for(var i=0;i<Panel.FOCUSABLE.length;i++){focusable[Panel.FOCUSABLE[i]]=true;}
function isFocusable(el){if(el.focus&&el.type!=="hidden"&&!el.disabled&&focusable[el.tagName.toLowerCase()]){return true;}
return false;}
return Dom.getElementsBy(isFocusable,null,root);},setFirstLastFocusable:function(){this.firstElement=null;this.lastElement=null;var elements=this.getFocusableElements();this.focusableElements=elements;if(elements.length>0){this.firstElement=elements[0];this.lastElement=elements[elements.length-1];}
if(this.cfg.getProperty("modal")){this.setTabLoop(this.firstElement,this.lastElement);}},initEvents:function(){Panel.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.showMaskEvent=this.createEvent(EVENT_TYPES.SHOW_MASK);this.showMaskEvent.signature=SIGNATURE;this.hideMaskEvent=this.createEvent(EVENT_TYPES.HIDE_MASK);this.hideMaskEvent.signature=SIGNATURE;this.dragEvent=this.createEvent(EVENT_TYPES.DRAG);this.dragEvent.signature=SIGNATURE;},initDefaultConfig:function(){Panel.superclass.initDefaultConfig.call(this);this.cfg.addProperty(DEFAULT_CONFIG.CLOSE.key,{handler:this.configClose,value:DEFAULT_CONFIG.CLOSE.value,validator:DEFAULT_CONFIG.CLOSE.validator,supercedes:DEFAULT_CONFIG.CLOSE.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.DRAGGABLE.key,{handler:this.configDraggable,value:(Util.DD)?true:false,validator:DEFAULT_CONFIG.DRAGGABLE.validator,supercedes:DEFAULT_CONFIG.DRAGGABLE.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.DRAG_ONLY.key,{value:DEFAULT_CONFIG.DRAG_ONLY.value,validator:DEFAULT_CONFIG.DRAG_ONLY.validator,supercedes:DEFAULT_CONFIG.DRAG_ONLY.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.UNDERLAY.key,{handler:this.configUnderlay,value:DEFAULT_CONFIG.UNDERLAY.value,supercedes:DEFAULT_CONFIG.UNDERLAY.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.MODAL.key,{handler:this.configModal,value:DEFAULT_CONFIG.MODAL.value,validator:DEFAULT_CONFIG.MODAL.validator,supercedes:DEFAULT_CONFIG.MODAL.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.KEY_LISTENERS.key,{handler:this.configKeyListeners,suppressEvent:DEFAULT_CONFIG.KEY_LISTENERS.suppressEvent,supercedes:DEFAULT_CONFIG.KEY_LISTENERS.supercedes});this.cfg.addProperty(DEFAULT_CONFIG.STRINGS.key,{value:DEFAULT_CONFIG.STRINGS.value,handler:this.configStrings,validator:DEFAULT_CONFIG.STRINGS.validator,supercedes:DEFAULT_CONFIG.STRINGS.supercedes});},configClose:function(type,args,obj){var val=args[0],oClose=this.close,strings=this.cfg.getProperty("strings");if(val){if(!oClose){if(!m_oCloseIconTemplate){m_oCloseIconTemplate=document.createElement("a");m_oCloseIconTemplate.className="container-close";m_oCloseIconTemplate.href="#";}
oClose=m_oCloseIconTemplate.cloneNode(true);this.innerElement.appendChild(oClose);oClose.innerHTML=(strings&&strings.close)?strings.close:"&#160;";Event.on(oClose,"click",this._doClose,this,true);this.close=oClose;}else{oClose.style.display="block";}}else{if(oClose){oClose.style.display="none";}}},_doClose:function(e){Event.preventDefault(e);this.hide();},configDraggable:function(type,args,obj){var val=args[0];if(val){if(!Util.DD){this.cfg.setProperty("draggable",false);return;}
if(this.header){Dom.setStyle(this.header,"cursor","move");this.registerDragDrop();}
this.subscribe("beforeShow",setWidthToOffsetWidth);}else{if(this.dd){this.dd.unreg();}
if(this.header){Dom.setStyle(this.header,"cursor","auto");}
this.unsubscribe("beforeShow",setWidthToOffsetWidth);}},configUnderlay:function(type,args,obj){var bMacGecko=(this.platform=="mac"&&UA.gecko),sUnderlay=args[0].toLowerCase(),oUnderlay=this.underlay,oElement=this.element;function createUnderlay(){var bNew=false;if(!oUnderlay){if(!m_oUnderlayTemplate){m_oUnderlayTemplate=document.createElement("div");m_oUnderlayTemplate.className="underlay";}
oUnderlay=m_oUnderlayTemplate.cloneNode(false);this.element.appendChild(oUnderlay);this.underlay=oUnderlay;if(bIEQuirks){this.sizeUnderlay();this.cfg.subscribeToConfigEvent("width",this.sizeUnderlay);this.cfg.subscribeToConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.subscribe(this.sizeUnderlay);YAHOO.widget.Module.textResizeEvent.subscribe(this.sizeUnderlay,this,true);}
if(UA.webkit&&UA.webkit<420){this.changeContentEvent.subscribe(this.forceUnderlayRedraw);}
bNew=true;}}
function onBeforeShow(){var bNew=createUnderlay.call(this);if(!bNew&&bIEQuirks){this.sizeUnderlay();}
this._underlayDeferred=false;this.beforeShowEvent.unsubscribe(onBeforeShow);}
function destroyUnderlay(){if(this._underlayDeferred){this.beforeShowEvent.unsubscribe(onBeforeShow);this._underlayDeferred=false;}
if(oUnderlay){this.cfg.unsubscribeFromConfigEvent("width",this.sizeUnderlay);this.cfg.unsubscribeFromConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.forceUnderlayRedraw);YAHOO.widget.Module.textResizeEvent.unsubscribe(this.sizeUnderlay,this,true);this.element.removeChild(oUnderlay);this.underlay=null;}}
switch(sUnderlay){case"shadow":Dom.removeClass(oElement,"matte");Dom.addClass(oElement,"shadow");break;case"matte":if(!bMacGecko){destroyUnderlay.call(this);}
Dom.removeClass(oElement,"shadow");Dom.addClass(oElement,"matte");break;default:if(!bMacGecko){destroyUnderlay.call(this);}
Dom.removeClass(oElement,"shadow");Dom.removeClass(oElement,"matte");break;}
if((sUnderlay=="shadow")||(bMacGecko&&!oUnderlay)){if(this.cfg.getProperty("visible")){var bNew=createUnderlay.call(this);if(!bNew&&bIEQuirks){this.sizeUnderlay();}}else{if(!this._underlayDeferred){this.beforeShowEvent.subscribe(onBeforeShow);this._underlayDeferred=true;}}}},configModal:function(type,args,obj){var modal=args[0];if(modal){if(!this._hasModalityEventListeners){this.subscribe("beforeShow",this.buildMask);this.subscribe("beforeShow",this.bringToTop);this.subscribe("beforeShow",this.showMask);this.subscribe("hide",this.hideMask);Overlay.windowResizeEvent.subscribe(this.sizeMask,this,true);this._hasModalityEventListeners=true;}}else{if(this._hasModalityEventListeners){if(this.cfg.getProperty("visible")){this.hideMask();this.removeMask();}
this.unsubscribe("beforeShow",this.buildMask);this.unsubscribe("beforeShow",this.bringToTop);this.unsubscribe("beforeShow",this.showMask);this.unsubscribe("hide",this.hideMask);Overlay.windowResizeEvent.unsubscribe(this.sizeMask,this);this._hasModalityEventListeners=false;}}},removeMask:function(){var oMask=this.mask,oParentNode;if(oMask){this.hideMask();oParentNode=oMask.parentNode;if(oParentNode){oParentNode.removeChild(oMask);}
this.mask=null;}},configKeyListeners:function(type,args,obj){var listeners=args[0],listener,nListeners,i;if(listeners){if(listeners instanceof Array){nListeners=listeners.length;for(i=0;i<nListeners;i++){listener=listeners[i];if(!Config.alreadySubscribed(this.showEvent,listener.enable,listener)){this.showEvent.subscribe(listener.enable,listener,true);}
if(!Config.alreadySubscribed(this.hideEvent,listener.disable,listener)){this.hideEvent.subscribe(listener.disable,listener,true);this.destroyEvent.subscribe(listener.disable,listener,true);}}}else{if(!Config.alreadySubscribed(this.showEvent,listeners.enable,listeners)){this.showEvent.subscribe(listeners.enable,listeners,true);}
if(!Config.alreadySubscribed(this.hideEvent,listeners.disable,listeners)){this.hideEvent.subscribe(listeners.disable,listeners,true);this.destroyEvent.subscribe(listeners.disable,listeners,true);}}}},configStrings:function(type,args,obj){var val=Lang.merge(DEFAULT_CONFIG.STRINGS.value,args[0]);this.cfg.setProperty(DEFAULT_CONFIG.STRINGS.key,val,true);},configHeight:function(type,args,obj){var height=args[0],el=this.innerElement;Dom.setStyle(el,"height",height);this.cfg.refireEvent("iframe");},_autoFillOnHeightChange:function(type,args,el){Panel.superclass._autoFillOnHeightChange.apply(this,arguments);if(bIEQuirks){var panel=this;setTimeout(function(){panel.sizeUnderlay();},0);}},configWidth:function(type,args,obj){var width=args[0],el=this.innerElement;Dom.setStyle(el,"width",width);this.cfg.refireEvent("iframe");},configzIndex:function(type,args,obj){Panel.superclass.configzIndex.call(this,type,args,obj);if(this.mask||this.cfg.getProperty("modal")===true){var panelZ=Dom.getStyle(this.element,"zIndex");if(!panelZ||isNaN(panelZ)){panelZ=0;}
if(panelZ===0){this.cfg.setProperty("zIndex",1);}else{this.stackMask();}}},buildWrapper:function(){var elementParent=this.element.parentNode,originalElement=this.element,wrapper=document.createElement("div");wrapper.className=Panel.CSS_PANEL_CONTAINER;wrapper.id=originalElement.id+"_c";if(elementParent){elementParent.insertBefore(wrapper,originalElement);}
wrapper.appendChild(originalElement);this.element=wrapper;this.innerElement=originalElement;Dom.setStyle(this.innerElement,"visibility","inherit");},sizeUnderlay:function(){var oUnderlay=this.underlay,oElement;if(oUnderlay){oElement=this.element;oUnderlay.style.width=oElement.offsetWidth+"px";oUnderlay.style.height=oElement.offsetHeight+"px";}},registerDragDrop:function(){var me=this;if(this.header){if(!Util.DD){return;}
var bDragOnly=(this.cfg.getProperty("dragonly")===true);this.dd=new Util.DD(this.element.id,this.id,{dragOnly:bDragOnly});if(!this.header.id){this.header.id=this.id+"_h";}
this.dd.startDrag=function(){var offsetHeight,offsetWidth,viewPortWidth,viewPortHeight,scrollX,scrollY;if(YAHOO.env.ua.ie==6){Dom.addClass(me.element,"drag");}
if(me.cfg.getProperty("constraintoviewport")){var nViewportOffset=Overlay.VIEWPORT_OFFSET;offsetHeight=me.element.offsetHeight;offsetWidth=me.element.offsetWidth;viewPortWidth=Dom.getViewportWidth();viewPortHeight=Dom.getViewportHeight();scrollX=Dom.getDocumentScrollLeft();scrollY=Dom.getDocumentScrollTop();if(offsetHeight+nViewportOffset<viewPortHeight){this.minY=scrollY+nViewportOffset;this.maxY=scrollY+viewPortHeight-offsetHeight-nViewportOffset;}else{this.minY=scrollY+nViewportOffset;this.maxY=scrollY+nViewportOffset;}
if(offsetWidth+nViewportOffset<viewPortWidth){this.minX=scrollX+nViewportOffset;this.maxX=scrollX+viewPortWidth-offsetWidth-nViewportOffset;}else{this.minX=scrollX+nViewportOffset;this.maxX=scrollX+nViewportOffset;}
this.constrainX=true;this.constrainY=true;}else{this.constrainX=false;this.constrainY=false;}
me.dragEvent.fire("startDrag",arguments);};this.dd.onDrag=function(){me.syncPosition();me.cfg.refireEvent("iframe");if(this.platform=="mac"&&YAHOO.env.ua.gecko){this.showMacGeckoScrollbars();}
me.dragEvent.fire("onDrag",arguments);};this.dd.endDrag=function(){if(YAHOO.env.ua.ie==6){Dom.removeClass(me.element,"drag");}
me.dragEvent.fire("endDrag",arguments);me.moveEvent.fire(me.cfg.getProperty("xy"));};this.dd.setHandleElId(this.header.id);this.dd.addInvalidHandleType("INPUT");this.dd.addInvalidHandleType("SELECT");this.dd.addInvalidHandleType("TEXTAREA");}},buildMask:function(){var oMask=this.mask;if(!oMask){if(!m_oMaskTemplate){m_oMaskTemplate=document.createElement("div");m_oMaskTemplate.className="mask";m_oMaskTemplate.innerHTML="&#160;";}
oMask=m_oMaskTemplate.cloneNode(true);oMask.id=this.id+"_mask";document.body.insertBefore(oMask,document.body.firstChild);this.mask=oMask;if(YAHOO.env.ua.gecko&&this.platform=="mac"){Dom.addClass(this.mask,"block-scrollbars");}
this.stackMask();}},hideMask:function(){if(this.cfg.getProperty("modal")&&this.mask){this.mask.style.display="none";Dom.removeClass(document.body,"masked");this.hideMaskEvent.fire();}},showMask:function(){if(this.cfg.getProperty("modal")&&this.mask){Dom.addClass(document.body,"masked");this.sizeMask();this.mask.style.display="block";this.showMaskEvent.fire();}},sizeMask:function(){if(this.mask){var mask=this.mask,viewWidth=Dom.getViewportWidth(),viewHeight=Dom.getViewportHeight();if(mask.offsetHeight>viewHeight){mask.style.height=viewHeight+"px";}
if(mask.offsetWidth>viewWidth){mask.style.width=viewWidth+"px";}
mask.style.height=Dom.getDocumentHeight()+"px";mask.style.width=Dom.getDocumentWidth()+"px";}},stackMask:function(){if(this.mask){var panelZ=Dom.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(panelZ)&&!isNaN(panelZ)){Dom.setStyle(this.mask,"zIndex",panelZ-1);}}},render:function(appendToNode){return Panel.superclass.render.call(this,appendToNode,this.innerElement);},_renderHeader:function(moduleElement){moduleElement=moduleElement||this.innerElement;Panel.superclass._renderHeader.call(this,moduleElement);},_renderBody:function(moduleElement){moduleElement=moduleElement||this.innerElement;Panel.superclass._renderBody.call(this,moduleElement);},_renderFooter:function(moduleElement){moduleElement=moduleElement||this.innerElement;Panel.superclass._renderFooter.call(this,moduleElement);},destroy:function(){Overlay.windowResizeEvent.unsubscribe(this.sizeMask,this);this.removeMask();if(this.close){Event.purgeElement(this.close);}
Panel.superclass.destroy.call(this);},forceUnderlayRedraw:function(){var u=this.underlay;Dom.addClass(u,"yui-force-redraw");setTimeout(function(){Dom.removeClass(u,"yui-force-redraw");},0);},toString:function(){return"Panel "+this.id;}});}());(function(){YAHOO.widget.Dialog=function(el,userConfig){YAHOO.widget.Dialog.superclass.constructor.call(this,el,userConfig);};var Event=YAHOO.util.Event,CustomEvent=YAHOO.util.CustomEvent,Dom=YAHOO.util.Dom,Dialog=YAHOO.widget.Dialog,Lang=YAHOO.lang,EVENT_TYPES={"BEFORE_SUBMIT":"beforeSubmit","SUBMIT":"submit","MANUAL_SUBMIT":"manualSubmit","ASYNC_SUBMIT":"asyncSubmit","FORM_SUBMIT":"formSubmit","CANCEL":"cancel"},DEFAULT_CONFIG={"POST_METHOD":{key:"postmethod",value:"async"},"POST_DATA":{key:"postdata",value:null},"BUTTONS":{key:"buttons",value:"none",supercedes:["visible"]},"HIDEAFTERSUBMIT":{key:"hideaftersubmit",value:true}};Dialog.CSS_DIALOG="yui-dialog";function removeButtonEventHandlers(){var aButtons=this._aButtons,nButtons,oButton,i;if(Lang.isArray(aButtons)){nButtons=aButtons.length;if(nButtons>0){i=nButtons-1;do{oButton=aButtons[i];if(YAHOO.widget.Button&&oButton instanceof YAHOO.widget.Button){oButton.destroy();}
else if(oButton.tagName.toUpperCase()=="BUTTON"){Event.purgeElement(oButton);Event.purgeElement(oButton,false);}}
while(i--);}}}
YAHOO.extend(Dialog,YAHOO.widget.Panel,{form:null,initDefaultConfig:function(){Dialog.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null};this.cfg.addProperty(DEFAULT_CONFIG.POST_METHOD.key,{handler:this.configPostMethod,value:DEFAULT_CONFIG.POST_METHOD.value,validator:function(val){if(val!="form"&&val!="async"&&val!="none"&&val!="manual"){return false;}else{return true;}}});this.cfg.addProperty(DEFAULT_CONFIG.POST_DATA.key,{value:DEFAULT_CONFIG.POST_DATA.value});this.cfg.addProperty(DEFAULT_CONFIG.HIDEAFTERSUBMIT.key,{value:DEFAULT_CONFIG.HIDEAFTERSUBMIT.value});this.cfg.addProperty(DEFAULT_CONFIG.BUTTONS.key,{handler:this.configButtons,value:DEFAULT_CONFIG.BUTTONS.value,supercedes:DEFAULT_CONFIG.BUTTONS.supercedes});},initEvents:function(){Dialog.superclass.initEvents.call(this);var SIGNATURE=CustomEvent.LIST;this.beforeSubmitEvent=this.createEvent(EVENT_TYPES.BEFORE_SUBMIT);this.beforeSubmitEvent.signature=SIGNATURE;this.submitEvent=this.createEvent(EVENT_TYPES.SUBMIT);this.submitEvent.signature=SIGNATURE;this.manualSubmitEvent=this.createEvent(EVENT_TYPES.MANUAL_SUBMIT);this.manualSubmitEvent.signature=SIGNATURE;this.asyncSubmitEvent=this.createEvent(EVENT_TYPES.ASYNC_SUBMIT);this.asyncSubmitEvent.signature=SIGNATURE;this.formSubmitEvent=this.createEvent(EVENT_TYPES.FORM_SUBMIT);this.formSubmitEvent.signature=SIGNATURE;this.cancelEvent=this.createEvent(EVENT_TYPES.CANCEL);this.cancelEvent.signature=SIGNATURE;},init:function(el,userConfig){Dialog.superclass.init.call(this,el);this.beforeInitEvent.fire(Dialog);Dom.addClass(this.element,Dialog.CSS_DIALOG);this.cfg.setProperty("visible",false);if(userConfig){this.cfg.applyConfig(userConfig,true);}
this.showEvent.subscribe(this.focusFirst,this,true);this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.subscribe("changeBody",this.registerForm);this.initEvent.fire(Dialog);},doSubmit:function(){var Connect=YAHOO.util.Connect,oForm=this.form,bUseFileUpload=false,bUseSecureFileUpload=false,aElements,nElements,i,formAttrs;switch(this.cfg.getProperty("postmethod")){case"async":aElements=oForm.elements;nElements=aElements.length;if(nElements>0){i=nElements-1;do{if(aElements[i].type=="file"){bUseFileUpload=true;break;}}
while(i--);}
if(bUseFileUpload&&YAHOO.env.ua.ie&&this.isSecure){bUseSecureFileUpload=true;}
formAttrs=this._getFormAttributes(oForm);Connect.setForm(oForm,bUseFileUpload,bUseSecureFileUpload);var postData=this.cfg.getProperty("postdata");var c=Connect.asyncRequest(formAttrs.method,formAttrs.action,this.callback,postData);this.asyncSubmitEvent.fire(c);break;case"form":oForm.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break;}},_getFormAttributes:function(oForm){var attrs={method:null,action:null};if(oForm){if(oForm.getAttributeNode){var action=oForm.getAttributeNode("action");var method=oForm.getAttributeNode("method");if(action){attrs.action=action.value;}
if(method){attrs.method=method.value;}}else{attrs.action=oForm.getAttribute("action");attrs.method=oForm.getAttribute("method");}}
attrs.method=(Lang.isString(attrs.method)?attrs.method:"POST").toUpperCase();attrs.action=Lang.isString(attrs.action)?attrs.action:"";return attrs;},registerForm:function(){var form=this.element.getElementsByTagName("form")[0];if(this.form){if(this.form==form&&Dom.isAncestor(this.element,this.form)){return;}else{Event.purgeElement(this.form);this.form=null;}}
if(!form){form=document.createElement("form");form.name="frm_"+this.id;this.body.appendChild(form);}
if(form){this.form=form;Event.on(form,"submit",this._submitHandler,this,true);}},_submitHandler:function(e){Event.stopEvent(e);this.submit();this.form.blur();},setTabLoop:function(firstElement,lastElement){firstElement=firstElement||this.firstButton;lastElement=this.lastButton||lastElement;Dialog.superclass.setTabLoop.call(this,firstElement,lastElement);},setFirstLastFocusable:function(){Dialog.superclass.setFirstLastFocusable.call(this);var i,l,el,elements=this.focusableElements;this.firstFormElement=null;this.lastFormElement=null;if(this.form&&elements&&elements.length>0){l=elements.length;for(i=0;i<l;++i){el=elements[i];if(this.form===el.form){this.firstFormElement=el;break;}}
for(i=l-1;i>=0;--i){el=elements[i];if(this.form===el.form){this.lastFormElement=el;break;}}}},configClose:function(type,args,obj){Dialog.superclass.configClose.apply(this,arguments);},_doClose:function(e){Event.preventDefault(e);this.cancel();},configButtons:function(type,args,obj){var Button=YAHOO.widget.Button,aButtons=args[0],oInnerElement=this.innerElement,oButton,oButtonEl,oYUIButton,nButtons,oSpan,oFooter,i;removeButtonEventHandlers.call(this);this._aButtons=null;if(Lang.isArray(aButtons)){oSpan=document.createElement("span");oSpan.className="button-group";nButtons=aButtons.length;this._aButtons=[];this.defaultHtmlButton=null;for(i=0;i<nButtons;i++){oButton=aButtons[i];if(Button){oYUIButton=new Button({label:oButton.text});oYUIButton.appendTo(oSpan);oButtonEl=oYUIButton.get("element");if(oButton.isDefault){oYUIButton.addClass("default");this.defaultHtmlButton=oButtonEl;}
if(Lang.isFunction(oButton.handler)){oYUIButton.set("onclick",{fn:oButton.handler,obj:this,scope:this});}else if(Lang.isObject(oButton.handler)&&Lang.isFunction(oButton.handler.fn)){oYUIButton.set("onclick",{fn:oButton.handler.fn,obj:((!Lang.isUndefined(oButton.handler.obj))?oButton.handler.obj:this),scope:(oButton.handler.scope||this)});}
this._aButtons[this._aButtons.length]=oYUIButton;}else{oButtonEl=document.createElement("button");oButtonEl.setAttribute("type","button");if(oButton.isDefault){oButtonEl.className="default";this.defaultHtmlButton=oButtonEl;}
oButtonEl.innerHTML=oButton.text;if(Lang.isFunction(oButton.handler)){Event.on(oButtonEl,"click",oButton.handler,this,true);}else if(Lang.isObject(oButton.handler)&&Lang.isFunction(oButton.handler.fn)){Event.on(oButtonEl,"click",oButton.handler.fn,((!Lang.isUndefined(oButton.handler.obj))?oButton.handler.obj:this),(oButton.handler.scope||this));}
oSpan.appendChild(oButtonEl);this._aButtons[this._aButtons.length]=oButtonEl;}
oButton.htmlButton=oButtonEl;if(i===0){this.firstButton=oButtonEl;}
if(i==(nButtons-1)){this.lastButton=oButtonEl;}}
this.setFooter(oSpan);oFooter=this.footer;if(Dom.inDocument(this.element)&&!Dom.isAncestor(oInnerElement,oFooter)){oInnerElement.appendChild(oFooter);}
this.buttonSpan=oSpan;}else{oSpan=this.buttonSpan;oFooter=this.footer;if(oSpan&&oFooter){oFooter.removeChild(oSpan);this.buttonSpan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null;}}
this.changeContentEvent.fire();},getButtons:function(){return this._aButtons||null;},focusFirst:function(type,args,obj){var el=this.firstFormElement;if(args&&args[1]){Event.stopEvent(args[1]);}
if(el){try{el.focus();}catch(oException){}}else{if(this.defaultHtmlButton){this.focusDefaultButton();}else{this.focusFirstButton();}}},focusLast:function(type,args,obj){var aButtons=this.cfg.getProperty("buttons"),el=this.lastFormElement;if(args&&args[1]){Event.stopEvent(args[1]);}
if(aButtons&&Lang.isArray(aButtons)){this.focusLastButton();}else{if(el){try{el.focus();}catch(oException){}}}},_getButton:function(button){var Button=YAHOO.widget.Button;if(Button&&button&&button.nodeName&&button.id){button=Button.getButton(button.id)||button;}
return button;},focusDefaultButton:function(){var button=this._getButton(this.defaultHtmlButton);if(button){try{button.focus();}catch(oException){}}},blurButtons:function(){var aButtons=this.cfg.getProperty("buttons"),nButtons,oButton,oElement,i;if(aButtons&&Lang.isArray(aButtons)){nButtons=aButtons.length;if(nButtons>0){i=(nButtons-1);do{oButton=aButtons[i];if(oButton){oElement=this._getButton(oButton.htmlButton);if(oElement){try{oElement.blur();}catch(oException){}}}}while(i--);}}},focusFirstButton:function(){var aButtons=this.cfg.getProperty("buttons"),oButton,oElement;if(aButtons&&Lang.isArray(aButtons)){oButton=aButtons[0];if(oButton){oElement=this._getButton(oButton.htmlButton);if(oElement){try{oElement.focus();}catch(oException){}}}}},focusLastButton:function(){var aButtons=this.cfg.getProperty("buttons"),nButtons,oButton,oElement;if(aButtons&&Lang.isArray(aButtons)){nButtons=aButtons.length;if(nButtons>0){oButton=aButtons[(nButtons-1)];if(oButton){oElement=this._getButton(oButton.htmlButton);if(oElement){try{oElement.focus();}catch(oException){}}}}}},configPostMethod:function(type,args,obj){this.registerForm();},validate:function(){return true;},submit:function(){if(this.validate()){if(this.beforeSubmitEvent.fire()){this.doSubmit();this.submitEvent.fire();if(this.cfg.getProperty("hideaftersubmit")){this.hide();}
return true;}else{return false;}}else{return false;}},cancel:function(){this.cancelEvent.fire();this.hide();},getData:function(){var oForm=this.form,aElements,nTotalElements,oData,sName,oElement,nElements,sType,sTagName,aOptions,nOptions,aValues,oOption,oRadio,oCheckbox,valueAttr,i,n;function isFormElement(p_oElement){var sTag=p_oElement.tagName.toUpperCase();return((sTag=="INPUT"||sTag=="TEXTAREA"||sTag=="SELECT")&&p_oElement.name==sName);}
if(oForm){aElements=oForm.elements;nTotalElements=aElements.length;oData={};for(i=0;i<nTotalElements;i++){sName=aElements[i].name;oElement=Dom.getElementsBy(isFormElement,"*",oForm);nElements=oElement.length;if(nElements>0){if(nElements==1){oElement=oElement[0];sType=oElement.type;sTagName=oElement.tagName.toUpperCase();switch(sTagName){case"INPUT":if(sType=="checkbox"){oData[sName]=oElement.checked;}else if(sType!="radio"){oData[sName]=oElement.value;}
break;case"TEXTAREA":oData[sName]=oElement.value;break;case"SELECT":aOptions=oElement.options;nOptions=aOptions.length;aValues=[];for(n=0;n<nOptions;n++){oOption=aOptions[n];if(oOption.selected){valueAttr=oOption.attributes.value;aValues[aValues.length]=(valueAttr&&valueAttr.specified)?oOption.value:oOption.text;}}
oData[sName]=aValues;break;}}else{sType=oElement[0].type;switch(sType){case"radio":for(n=0;n<nElements;n++){oRadio=oElement[n];if(oRadio.checked){oData[sName]=oRadio.value;break;}}
break;case"checkbox":aValues=[];for(n=0;n<nElements;n++){oCheckbox=oElement[n];if(oCheckbox.checked){aValues[aValues.length]=oCheckbox.value;}}
oData[sName]=aValues;break;}}}}}
return oData;},destroy:function(){removeButtonEventHandlers.call(this);this._aButtons=null;var aForms=this.element.getElementsByTagName("form"),oForm;if(aForms.length>0){oForm=aForms[0];if(oForm){Event.purgeElement(oForm);if(oForm.parentNode){oForm.parentNode.removeChild(oForm);}
this.form=null;}}
Dialog.superclass.destroy.call(this);},toString:function(){return"Dialog "+this.id;}});}());(function(){YAHOO.widget.SimpleDialog=function(el,userConfig){YAHOO.widget.SimpleDialog.superclass.constructor.call(this,el,userConfig);};var Dom=YAHOO.util.Dom,SimpleDialog=YAHOO.widget.SimpleDialog,DEFAULT_CONFIG={"ICON":{key:"icon",value:"none",suppressEvent:true},"TEXT":{key:"text",value:"",suppressEvent:true,supercedes:["icon"]}};SimpleDialog.ICON_BLOCK="blckicon";SimpleDialog.ICON_ALARM="alrticon";SimpleDialog.ICON_HELP="hlpicon";SimpleDialog.ICON_INFO="infoicon";SimpleDialog.ICON_WARN="warnicon";SimpleDialog.ICON_TIP="tipicon";SimpleDialog.ICON_CSS_CLASSNAME="yui-icon";SimpleDialog.CSS_SIMPLEDIALOG="yui-simple-dialog";YAHOO.extend(SimpleDialog,YAHOO.widget.Dialog,{initDefaultConfig:function(){SimpleDialog.superclass.initDefaultConfig.call(this);this.cfg.addProperty(DEFAULT_CONFIG.ICON.key,{handler:this.configIcon,value:DEFAULT_CONFIG.ICON.value,suppressEvent:DEFAULT_CONFIG.ICON.suppressEvent});this.cfg.addProperty(DEFAULT_CONFIG.TEXT.key,{handler:this.configText,value:DEFAULT_CONFIG.TEXT.value,suppressEvent:DEFAULT_CONFIG.TEXT.suppressEvent,supercedes:DEFAULT_CONFIG.TEXT.supercedes});},init:function(el,userConfig){SimpleDialog.superclass.init.call(this,el);this.beforeInitEvent.fire(SimpleDialog);Dom.addClass(this.element,SimpleDialog.CSS_SIMPLEDIALOG);this.cfg.queueProperty("postmethod","manual");if(userConfig){this.cfg.applyConfig(userConfig,true);}
this.beforeRenderEvent.subscribe(function(){if(!this.body){this.setBody("");}},this,true);this.initEvent.fire(SimpleDialog);},registerForm:function(){SimpleDialog.superclass.registerForm.call(this);this.form.innerHTML+="<input type=\"hidden\" name=\""+
this.id+"\" value=\"\"/>";},configIcon:function(type,args,obj){var sIcon=args[0],oBody=this.body,sCSSClass=SimpleDialog.ICON_CSS_CLASSNAME,aElements,oIcon,oIconParent;if(sIcon&&sIcon!="none"){aElements=Dom.getElementsByClassName(sCSSClass,"*",oBody);if(aElements.length===1){oIcon=aElements[0];oIconParent=oIcon.parentNode;if(oIconParent){oIconParent.removeChild(oIcon);oIcon=null;}}
if(sIcon.indexOf(".")==-1){oIcon=document.createElement("span");oIcon.className=(sCSSClass+" "+sIcon);oIcon.innerHTML="&#160;";}else{oIcon=document.createElement("img");oIcon.src=(this.imageRoot+sIcon);oIcon.className=sCSSClass;}
if(oIcon){oBody.insertBefore(oIcon,oBody.firstChild);}}},configText:function(type,args,obj){var text=args[0];if(text){this.setBody(text);this.cfg.refireEvent("icon");}},toString:function(){return"SimpleDialog "+this.id;}});}());(function(){YAHOO.widget.ContainerEffect=function(overlay,attrIn,attrOut,targetElement,animClass){if(!animClass){animClass=YAHOO.util.Anim;}
this.overlay=overlay;this.attrIn=attrIn;this.attrOut=attrOut;this.targetElement=targetElement||overlay.element;this.animClass=animClass;};var Dom=YAHOO.util.Dom,CustomEvent=YAHOO.util.CustomEvent,ContainerEffect=YAHOO.widget.ContainerEffect;ContainerEffect.FADE=function(overlay,dur){var Easing=YAHOO.util.Easing,fin={attributes:{opacity:{from:0,to:1}},duration:dur,method:Easing.easeIn},fout={attributes:{opacity:{to:0}},duration:dur,method:Easing.easeOut},fade=new ContainerEffect(overlay,fin,fout,overlay.element);fade.handleUnderlayStart=function(){var underlay=this.overlay.underlay;if(underlay&&YAHOO.env.ua.ie){var hasFilters=(underlay.filters&&underlay.filters.length>0);if(hasFilters){Dom.addClass(overlay.element,"yui-effect-fade");}}};fade.handleUnderlayComplete=function(){var underlay=this.overlay.underlay;if(underlay&&YAHOO.env.ua.ie){Dom.removeClass(overlay.element,"yui-effect-fade");}};fade.handleStartAnimateIn=function(type,args,obj){Dom.addClass(obj.overlay.element,"hide-select");if(!obj.overlay.underlay){obj.overlay.cfg.refireEvent("underlay");}
obj.handleUnderlayStart();obj.overlay._setDomVisibility(true);Dom.setStyle(obj.overlay.element,"opacity",0);};fade.handleCompleteAnimateIn=function(type,args,obj){Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null;}
obj.handleUnderlayComplete();obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire();};fade.handleStartAnimateOut=function(type,args,obj){Dom.addClass(obj.overlay.element,"hide-select");obj.handleUnderlayStart();};fade.handleCompleteAnimateOut=function(type,args,obj){Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null;}
obj.overlay._setDomVisibility(false);Dom.setStyle(obj.overlay.element,"opacity",1);obj.handleUnderlayComplete();obj.overlay.cfg.refireEvent("iframe");obj.animateOutCompleteEvent.fire();};fade.init();return fade;};ContainerEffect.SLIDE=function(overlay,dur){var Easing=YAHOO.util.Easing,x=overlay.cfg.getProperty("x")||Dom.getX(overlay.element),y=overlay.cfg.getProperty("y")||Dom.getY(overlay.element),clientWidth=Dom.getClientWidth(),offsetWidth=overlay.element.offsetWidth,sin={attributes:{points:{to:[x,y]}},duration:dur,method:Easing.easeIn},sout={attributes:{points:{to:[(clientWidth+25),y]}},duration:dur,method:Easing.easeOut},slide=new ContainerEffect(overlay,sin,sout,overlay.element,YAHOO.util.Motion);slide.handleStartAnimateIn=function(type,args,obj){obj.overlay.element.style.left=((-25)-offsetWidth)+"px";obj.overlay.element.style.top=y+"px";};slide.handleTweenAnimateIn=function(type,args,obj){var pos=Dom.getXY(obj.overlay.element),currentX=pos[0],currentY=pos[1];if(Dom.getStyle(obj.overlay.element,"visibility")=="hidden"&&currentX<x){obj.overlay._setDomVisibility(true);}
obj.overlay.cfg.setProperty("xy",[currentX,currentY],true);obj.overlay.cfg.refireEvent("iframe");};slide.handleCompleteAnimateIn=function(type,args,obj){obj.overlay.cfg.setProperty("xy",[x,y],true);obj.startX=x;obj.startY=y;obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire();};slide.handleStartAnimateOut=function(type,args,obj){var vw=Dom.getViewportWidth(),pos=Dom.getXY(obj.overlay.element),yso=pos[1];obj.animOut.attributes.points.to=[(vw+25),yso];};slide.handleTweenAnimateOut=function(type,args,obj){var pos=Dom.getXY(obj.overlay.element),xto=pos[0],yto=pos[1];obj.overlay.cfg.setProperty("xy",[xto,yto],true);obj.overlay.cfg.refireEvent("iframe");};slide.handleCompleteAnimateOut=function(type,args,obj){obj.overlay._setDomVisibility(false);obj.overlay.cfg.setProperty("xy",[x,y]);obj.animateOutCompleteEvent.fire();};slide.init();return slide;};ContainerEffect.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=CustomEvent.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=CustomEvent.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=CustomEvent.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=CustomEvent.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this);},animateIn:function(){this.beforeAnimateInEvent.fire();this.animIn.animate();},animateOut:function(){this.beforeAnimateOutEvent.fire();this.animOut.animate();},handleStartAnimateIn:function(type,args,obj){},handleTweenAnimateIn:function(type,args,obj){},handleCompleteAnimateIn:function(type,args,obj){},handleStartAnimateOut:function(type,args,obj){},handleTweenAnimateOut:function(type,args,obj){},handleCompleteAnimateOut:function(type,args,obj){},toString:function(){var output="ContainerEffect";if(this.overlay){output+=" ["+this.overlay.toString()+"]";}
return output;}};YAHOO.lang.augmentProto(ContainerEffect,YAHOO.util.EventProvider);})();YAHOO.register("container",YAHOO.widget.Module,{version:"2.8.2",build:"19"});if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var Event=YAHOO.util.Event,Dom=YAHOO.util.Dom;return{useShim:false,_shimActive:false,_shimState:false,_debugShim:false,_createShim:function(){var s=document.createElement('div');s.id='yui-ddm-shim';if(document.body.firstChild){document.body.insertBefore(s,document.body.firstChild);}else{document.body.appendChild(s);}
s.style.display='none';s.style.backgroundColor='red';s.style.position='absolute';s.style.zIndex='99999';Dom.setStyle(s,'opacity','0');this._shim=s;Event.on(s,"mouseup",this.handleMouseUp,this,true);Event.on(s,"mousemove",this.handleMouseMove,this,true);Event.on(window,'scroll',this._sizeShim,this,true);},_sizeShim:function(){if(this._shimActive){var s=this._shim;s.style.height=Dom.getDocumentHeight()+'px';s.style.width=Dom.getDocumentWidth()+'px';s.style.top='0';s.style.left='0';}},_activateShim:function(){if(this.useShim){if(!this._shim){this._createShim();}
this._shimActive=true;var s=this._shim,o='0';if(this._debugShim){o='.5';}
Dom.setStyle(s,'opacity',o);this._sizeShim();s.style.display='block';}},_deactivateShim:function(){this._shim.style.display='none';this._shimActive=false;},_shim:null,ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true;},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(sMethod,args){for(var i in this.ids){for(var j in this.ids[i]){var oDD=this.ids[i][j];if(!this.isTypeOfDD(oDD)){continue;}
oDD[sMethod].apply(oDD,args);}}},_onLoad:function(){this.init();Event.on(document,"mouseup",this.handleMouseUp,this,true);Event.on(document,"mousemove",this.handleMouseMove,this,true);Event.on(window,"unload",this._onUnload,this,true);Event.on(window,"resize",this._onResize,this,true);},_onResize:function(e){this._execOnAll("resetConstraints",[]);},lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isLocked:function(){return this.locked;},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,fromTimeout:false,regDragDrop:function(oDD,sGroup){if(!this.initialized){this.init();}
if(!this.ids[sGroup]){this.ids[sGroup]={};}
this.ids[sGroup][oDD.id]=oDD;},removeDDFromGroup:function(oDD,sGroup){if(!this.ids[sGroup]){this.ids[sGroup]={};}
var obj=this.ids[sGroup];if(obj&&obj[oDD.id]){delete obj[oDD.id];}},_remove:function(oDD){for(var g in oDD.groups){if(g){var item=this.ids[g];if(item&&item[oDD.id]){delete item[oDD.id];}}}
delete this.handleIds[oDD.id];},regHandle:function(sDDId,sHandleId){if(!this.handleIds[sDDId]){this.handleIds[sDDId]={};}
this.handleIds[sDDId][sHandleId]=sHandleId;},isDragDrop:function(id){return(this.getDDById(id))?true:false;},getRelated:function(p_oDD,bTargetsOnly){var oDDs=[];for(var i in p_oDD.groups){for(var j in this.ids[i]){var dd=this.ids[i][j];if(!this.isTypeOfDD(dd)){continue;}
if(!bTargetsOnly||dd.isTarget){oDDs[oDDs.length]=dd;}}}
return oDDs;},isLegalTarget:function(oDD,oTargetDD){var targets=this.getRelated(oDD,true);for(var i=0,len=targets.length;i<len;++i){if(targets[i].id==oTargetDD.id){return true;}}
return false;},isTypeOfDD:function(oDD){return(oDD&&oDD.__ygDragDrop);},isHandle:function(sDDId,sHandleId){return(this.handleIds[sDDId]&&this.handleIds[sDDId][sHandleId]);},getDDById:function(id){for(var i in this.ids){if(this.ids[i][id]){return this.ids[i][id];}}
return null;},handleMouseDown:function(e,oDD){this.currentTarget=YAHOO.util.Event.getTarget(e);this.dragCurrent=oDD;var el=oDD.getEl();this.startX=YAHOO.util.Event.getPageX(e);this.startY=YAHOO.util.Event.getPageY(e);this.deltaX=this.startX-el.offsetLeft;this.deltaY=this.startY-el.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var DDM=YAHOO.util.DDM;DDM.startDrag(DDM.startX,DDM.startY);DDM.fromTimeout=true;},this.clickTimeThresh);},startDrag:function(x,y){if(this.dragCurrent&&this.dragCurrent.useShim){this._shimState=this.useShim;this.useShim=true;}
this._activateShim();clearTimeout(this.clickTimeout);var dc=this.dragCurrent;if(dc&&dc.events.b4StartDrag){dc.b4StartDrag(x,y);dc.fireEvent('b4StartDragEvent',{x:x,y:y});}
if(dc&&dc.events.startDrag){dc.startDrag(x,y);dc.fireEvent('startDragEvent',{x:x,y:y});}
this.dragThreshMet=true;},handleMouseUp:function(e){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){if(this.fromTimeout){this.fromTimeout=false;this.handleMouseMove(e);}
this.fromTimeout=false;this.fireEvents(e,true);}else{}
this.stopDrag(e);this.stopEvent(e);}},stopEvent:function(e){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(e);}
if(this.preventDefault){YAHOO.util.Event.preventDefault(e);}},stopDrag:function(e,silent){var dc=this.dragCurrent;if(dc&&!silent){if(this.dragThreshMet){if(dc.events.b4EndDrag){dc.b4EndDrag(e);dc.fireEvent('b4EndDragEvent',{e:e});}
if(dc.events.endDrag){dc.endDrag(e);dc.fireEvent('endDragEvent',{e:e});}}
if(dc.events.mouseUp){dc.onMouseUp(e);dc.fireEvent('mouseUpEvent',{e:e});}}
if(this._shimActive){this._deactivateShim();if(this.dragCurrent&&this.dragCurrent.useShim){this.useShim=this._shimState;this._shimState=false;}}
this.dragCurrent=null;this.dragOvers={};},handleMouseMove:function(e){var dc=this.dragCurrent;if(dc){if(YAHOO.util.Event.isIE&&!e.button){this.stopEvent(e);return this.handleMouseUp(e);}else{if(e.clientX<0||e.clientY<0){}}
if(!this.dragThreshMet){var diffX=Math.abs(this.startX-YAHOO.util.Event.getPageX(e));var diffY=Math.abs(this.startY-YAHOO.util.Event.getPageY(e));if(diffX>this.clickPixelThresh||diffY>this.clickPixelThresh){this.startDrag(this.startX,this.startY);}}
if(this.dragThreshMet){if(dc&&dc.events.b4Drag){dc.b4Drag(e);dc.fireEvent('b4DragEvent',{e:e});}
if(dc&&dc.events.drag){dc.onDrag(e);dc.fireEvent('dragEvent',{e:e});}
if(dc){this.fireEvents(e,false);}}
this.stopEvent(e);}},fireEvents:function(e,isDrop){var dc=this.dragCurrent;if(!dc||dc.isLocked()||dc.dragOnly){return;}
var x=YAHOO.util.Event.getPageX(e),y=YAHOO.util.Event.getPageY(e),pt=new YAHOO.util.Point(x,y),pos=dc.getTargetCoord(pt.x,pt.y),el=dc.getDragEl(),events=['out','over','drop','enter'],curRegion=new YAHOO.util.Region(pos.y,pos.x+el.offsetWidth,pos.y+el.offsetHeight,pos.x),oldOvers=[],inGroupsObj={},inGroups=[],data={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var i in this.dragOvers){var ddo=this.dragOvers[i];if(!this.isTypeOfDD(ddo)){continue;}
if(!this.isOverTarget(pt,ddo,this.mode,curRegion)){data.outEvts.push(ddo);}
oldOvers[i]=true;delete this.dragOvers[i];}
for(var sGroup in dc.groups){if("string"!=typeof sGroup){continue;}
for(i in this.ids[sGroup]){var oDD=this.ids[sGroup][i];if(!this.isTypeOfDD(oDD)){continue;}
if(oDD.isTarget&&!oDD.isLocked()&&oDD!=dc){if(this.isOverTarget(pt,oDD,this.mode,curRegion)){inGroupsObj[sGroup]=true;if(isDrop){data.dropEvts.push(oDD);}else{if(!oldOvers[oDD.id]){data.enterEvts.push(oDD);}else{data.overEvts.push(oDD);}
this.dragOvers[oDD.id]=oDD;}}}}}
this.interactionInfo={out:data.outEvts,enter:data.enterEvts,over:data.overEvts,drop:data.dropEvts,point:pt,draggedRegion:curRegion,sourceRegion:this.locationCache[dc.id],validDrop:isDrop};for(var inG in inGroupsObj){inGroups.push(inG);}
if(isDrop&&!data.dropEvts.length){this.interactionInfo.validDrop=false;if(dc.events.invalidDrop){dc.onInvalidDrop(e);dc.fireEvent('invalidDropEvent',{e:e});}}
for(i=0;i<events.length;i++){var tmp=null;if(data[events[i]+'Evts']){tmp=data[events[i]+'Evts'];}
if(tmp&&tmp.length){var type=events[i].charAt(0).toUpperCase()+events[i].substr(1),ev='onDrag'+type,b4='b4Drag'+type,cev='drag'+type+'Event',check='drag'+type;if(this.mode){if(dc.events[b4]){dc[b4](e,tmp,inGroups);dc.fireEvent(b4+'Event',{event:e,info:tmp,group:inGroups});}
if(dc.events[check]){dc[ev](e,tmp,inGroups);dc.fireEvent(cev,{event:e,info:tmp,group:inGroups});}}else{for(var b=0,len=tmp.length;b<len;++b){if(dc.events[b4]){dc[b4](e,tmp[b].id,inGroups[0]);dc.fireEvent(b4+'Event',{event:e,info:tmp[b].id,group:inGroups[0]});}
if(dc.events[check]){dc[ev](e,tmp[b].id,inGroups[0]);dc.fireEvent(cev,{event:e,info:tmp[b].id,group:inGroups[0]});}}}}}},getBestMatch:function(dds){var winner=null;var len=dds.length;if(len==1){winner=dds[0];}else{for(var i=0;i<len;++i){var dd=dds[i];if(this.mode==this.INTERSECT&&dd.cursorIsOver){winner=dd;break;}else{if(!winner||!winner.overlap||(dd.overlap&&winner.overlap.getArea()<dd.overlap.getArea())){winner=dd;}}}}
return winner;},refreshCache:function(groups){var g=groups||this.ids;for(var sGroup in g){if("string"!=typeof sGroup){continue;}
for(var i in this.ids[sGroup]){var oDD=this.ids[sGroup][i];if(this.isTypeOfDD(oDD)){var loc=this.getLocation(oDD);if(loc){this.locationCache[oDD.id]=loc;}else{delete this.locationCache[oDD.id];}}}}},verifyEl:function(el){try{if(el){var parent=el.offsetParent;if(parent){return true;}}}catch(e){}
return false;},getLocation:function(oDD){if(!this.isTypeOfDD(oDD)){return null;}
var el=oDD.getEl(),pos,x1,x2,y1,y2,t,r,b,l;try{pos=YAHOO.util.Dom.getXY(el);}catch(e){}
if(!pos){return null;}
x1=pos[0];x2=x1+el.offsetWidth;y1=pos[1];y2=y1+el.offsetHeight;t=y1-oDD.padding[0];r=x2+oDD.padding[1];b=y2+oDD.padding[2];l=x1-oDD.padding[3];return new YAHOO.util.Region(t,r,b,l);},isOverTarget:function(pt,oTarget,intersect,curRegion){var loc=this.locationCache[oTarget.id];if(!loc||!this.useCache){loc=this.getLocation(oTarget);this.locationCache[oTarget.id]=loc;}
if(!loc){return false;}
oTarget.cursorIsOver=loc.contains(pt);var dc=this.dragCurrent;if(!dc||(!intersect&&!dc.constrainX&&!dc.constrainY)){return oTarget.cursorIsOver;}
oTarget.overlap=null;if(!curRegion){var pos=dc.getTargetCoord(pt.x,pt.y);var el=dc.getDragEl();curRegion=new YAHOO.util.Region(pos.y,pos.x+el.offsetWidth,pos.y+el.offsetHeight,pos.x);}
var overlap=curRegion.intersect(loc);if(overlap){oTarget.overlap=overlap;return(intersect)?true:oTarget.cursorIsOver;}else{return false;}},_onUnload:function(e,me){this.unregAll();},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null;}
this._execOnAll("unreg",[]);this.ids={};},elementCache:{},getElWrapper:function(id){var oWrapper=this.elementCache[id];if(!oWrapper||!oWrapper.el){oWrapper=this.elementCache[id]=new this.ElementWrapper(YAHOO.util.Dom.get(id));}
return oWrapper;},getElement:function(id){return YAHOO.util.Dom.get(id);},getCss:function(id){var el=YAHOO.util.Dom.get(id);return(el)?el.style:null;},ElementWrapper:function(el){this.el=el||null;this.id=this.el&&el.id;this.css=this.el&&el.style;},getPosX:function(el){return YAHOO.util.Dom.getX(el);},getPosY:function(el){return YAHOO.util.Dom.getY(el);},swapNode:function(n1,n2){if(n1.swapNode){n1.swapNode(n2);}else{var p=n2.parentNode;var s=n2.nextSibling;if(s==n1){p.insertBefore(n1,n2);}else if(n2==n1.nextSibling){p.insertBefore(n2,n1);}else{n1.parentNode.replaceChild(n2,n1);p.insertBefore(n1,s);}}},getScroll:function(){var t,l,dde=document.documentElement,db=document.body;if(dde&&(dde.scrollTop||dde.scrollLeft)){t=dde.scrollTop;l=dde.scrollLeft;}else if(db){t=db.scrollTop;l=db.scrollLeft;}else{}
return{top:t,left:l};},getStyle:function(el,styleProp){return YAHOO.util.Dom.getStyle(el,styleProp);},getScrollTop:function(){return this.getScroll().top;},getScrollLeft:function(){return this.getScroll().left;},moveToEl:function(moveEl,targetEl){var aCoord=YAHOO.util.Dom.getXY(targetEl);YAHOO.util.Dom.setXY(moveEl,aCoord);},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight();},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth();},numericSort:function(a,b){return(a-b);},_timeoutCount:0,_addListeners:function(){var DDM=YAHOO.util.DDM;if(YAHOO.util.Event&&document){DDM._onLoad();}else{if(DDM._timeoutCount>2000){}else{setTimeout(DDM._addListeners,10);if(document&&document.body){DDM._timeoutCount+=1;}}}},handleWasClicked:function(node,id){if(this.isHandle(id,node.id)){return true;}else{var p=node.parentNode;while(p){if(this.isHandle(id,p.id)){return true;}else{p=p.parentNode;}}}
return false;}};}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners();}
(function(){var Event=YAHOO.util.Event;var Dom=YAHOO.util.Dom;YAHOO.util.DragDrop=function(id,sGroup,config){if(id){this.init(id,sGroup,config);}};YAHOO.util.DragDrop.prototype={events:null,on:function(){this.subscribe.apply(this,arguments);},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isTarget:true,padding:null,dragOnly:false,useShim:false,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(x,y){},startDrag:function(x,y){},b4Drag:function(e){},onDrag:function(e){},onDragEnter:function(e,id){},b4DragOver:function(e){},onDragOver:function(e,id){},b4DragOut:function(e){},onDragOut:function(e,id){},b4DragDrop:function(e){},onDragDrop:function(e,id){},onInvalidDrop:function(e){},b4EndDrag:function(e){},endDrag:function(e){},b4MouseDown:function(e){},onMouseDown:function(e){},onMouseUp:function(e){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=Dom.get(this.id);}
return this._domRef;},getDragEl:function(){return Dom.get(this.dragElId);},init:function(id,sGroup,config){this.initTarget(id,sGroup,config);Event.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);for(var i in this.events){this.createEvent(i+'Event');}},initTarget:function(id,sGroup,config){this.config=config||{};this.events={};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof id!=="string"){this._domRef=id;id=Dom.generateId(id);}
this.id=id;this.addToGroup((sGroup)?sGroup:"default");this.handleElId=id;Event.onAvailable(id,this.handleOnAvailable,this,true);this.setDragElId(id);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();},applyConfig:function(){this.events={mouseDown:true,b4MouseDown:true,mouseUp:true,b4StartDrag:true,startDrag:true,b4EndDrag:true,endDrag:true,drag:true,b4Drag:true,invalidDrop:true,b4DragOut:true,dragOut:true,dragEnter:true,b4DragOver:true,dragOver:true,b4DragDrop:true,dragDrop:true};if(this.config.events){for(var i in this.config.events){if(this.config.events[i]===false){this.events[i]=false;}}}
this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);this.dragOnly=((this.config.dragOnly===true)?true:false);this.useShim=((this.config.useShim===true)?true:false);},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable();},setPadding:function(iTop,iRight,iBot,iLeft){if(!iRight&&0!==iRight){this.padding=[iTop,iTop,iTop,iTop];}else if(!iBot&&0!==iBot){this.padding=[iTop,iRight,iTop,iRight];}else{this.padding=[iTop,iRight,iBot,iLeft];}},setInitPosition:function(diffX,diffY){var el=this.getEl();if(!this.DDM.verifyEl(el)){if(el&&el.style&&(el.style.display=='none')){}else{}
return;}
var dx=diffX||0;var dy=diffY||0;var p=Dom.getXY(el);this.initPageX=p[0]-dx;this.initPageY=p[1]-dy;this.lastPageX=p[0];this.lastPageY=p[1];this.setStartPosition(p);},setStartPosition:function(pos){var p=pos||Dom.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=p[0];this.startPageY=p[1];},addToGroup:function(sGroup){this.groups[sGroup]=true;this.DDM.regDragDrop(this,sGroup);},removeFromGroup:function(sGroup){if(this.groups[sGroup]){delete this.groups[sGroup];}
this.DDM.removeDDFromGroup(this,sGroup);},setDragElId:function(id){this.dragElId=id;},setHandleElId:function(id){if(typeof id!=="string"){id=Dom.generateId(id);}
this.handleElId=id;this.DDM.regHandle(this.id,id);},setOuterHandleElId:function(id){if(typeof id!=="string"){id=Dom.generateId(id);}
Event.on(id,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(id);this.hasOuterHandles=true;},unreg:function(){Event.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this);},isLocked:function(){return(this.DDM.isLocked()||this.locked);},handleMouseDown:function(e,oDD){var button=e.which||e.button;if(this.primaryButtonOnly&&button>1){return;}
if(this.isLocked()){return;}
var b4Return=this.b4MouseDown(e),b4Return2=true;if(this.events.b4MouseDown){b4Return2=this.fireEvent('b4MouseDownEvent',e);}
var mDownReturn=this.onMouseDown(e),mDownReturn2=true;if(this.events.mouseDown){mDownReturn2=this.fireEvent('mouseDownEvent',e);}
if((b4Return===false)||(mDownReturn===false)||(b4Return2===false)||(mDownReturn2===false)){return;}
this.DDM.refreshCache(this.groups);var pt=new YAHOO.util.Point(Event.getPageX(e),Event.getPageY(e));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(pt,this)){}else{if(this.clickValidator(e)){this.setStartPosition();this.DDM.handleMouseDown(e,this);this.DDM.stopEvent(e);}else{}}},clickValidator:function(e){var target=YAHOO.util.Event.getTarget(e);return(this.isValidHandleChild(target)&&(this.id==this.handleElId||this.DDM.handleWasClicked(target,this.id)));},getTargetCoord:function(iPageX,iPageY){var x=iPageX-this.deltaX;var y=iPageY-this.deltaY;if(this.constrainX){if(x<this.minX){x=this.minX;}
if(x>this.maxX){x=this.maxX;}}
if(this.constrainY){if(y<this.minY){y=this.minY;}
if(y>this.maxY){y=this.maxY;}}
x=this.getTick(x,this.xTicks);y=this.getTick(y,this.yTicks);return{x:x,y:y};},addInvalidHandleType:function(tagName){var type=tagName.toUpperCase();this.invalidHandleTypes[type]=type;},addInvalidHandleId:function(id){if(typeof id!=="string"){id=Dom.generateId(id);}
this.invalidHandleIds[id]=id;},addInvalidHandleClass:function(cssClass){this.invalidHandleClasses.push(cssClass);},removeInvalidHandleType:function(tagName){var type=tagName.toUpperCase();delete this.invalidHandleTypes[type];},removeInvalidHandleId:function(id){if(typeof id!=="string"){id=Dom.generateId(id);}
delete this.invalidHandleIds[id];},removeInvalidHandleClass:function(cssClass){for(var i=0,len=this.invalidHandleClasses.length;i<len;++i){if(this.invalidHandleClasses[i]==cssClass){delete this.invalidHandleClasses[i];}}},isValidHandleChild:function(node){var valid=true;var nodeName;try{nodeName=node.nodeName.toUpperCase();}catch(e){nodeName=node.nodeName;}
valid=valid&&!this.invalidHandleTypes[nodeName];valid=valid&&!this.invalidHandleIds[node.id];for(var i=0,len=this.invalidHandleClasses.length;valid&&i<len;++i){valid=!Dom.hasClass(node,this.invalidHandleClasses[i]);}
return valid;},setXTicks:function(iStartX,iTickSize){this.xTicks=[];this.xTickSize=iTickSize;var tickMap={};for(var i=this.initPageX;i>=this.minX;i=i-iTickSize){if(!tickMap[i]){this.xTicks[this.xTicks.length]=i;tickMap[i]=true;}}
for(i=this.initPageX;i<=this.maxX;i=i+iTickSize){if(!tickMap[i]){this.xTicks[this.xTicks.length]=i;tickMap[i]=true;}}
this.xTicks.sort(this.DDM.numericSort);},setYTicks:function(iStartY,iTickSize){this.yTicks=[];this.yTickSize=iTickSize;var tickMap={};for(var i=this.initPageY;i>=this.minY;i=i-iTickSize){if(!tickMap[i]){this.yTicks[this.yTicks.length]=i;tickMap[i]=true;}}
for(i=this.initPageY;i<=this.maxY;i=i+iTickSize){if(!tickMap[i]){this.yTicks[this.yTicks.length]=i;tickMap[i]=true;}}
this.yTicks.sort(this.DDM.numericSort);},setXConstraint:function(iLeft,iRight,iTickSize){this.leftConstraint=parseInt(iLeft,10);this.rightConstraint=parseInt(iRight,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(iTickSize){this.setXTicks(this.initPageX,iTickSize);}
this.constrainX=true;},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks();},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0;},setYConstraint:function(iUp,iDown,iTickSize){this.topConstraint=parseInt(iUp,10);this.bottomConstraint=parseInt(iDown,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(iTickSize){this.setYTicks(this.initPageY,iTickSize);}
this.constrainY=true;},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var dx=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var dy=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(dx,dy);}else{this.setInitPosition();}
if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize);}
if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize);}},getTick:function(val,tickArray){if(!tickArray){return val;}else if(tickArray[0]>=val){return tickArray[0];}else{for(var i=0,len=tickArray.length;i<len;++i){var next=i+1;if(tickArray[next]&&tickArray[next]>=val){var diff1=val-tickArray[i];var diff2=tickArray[next]-val;return(diff2>diff1)?tickArray[i]:tickArray[next];}}
return tickArray[tickArray.length-1];}},toString:function(){return("DragDrop "+this.id);}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider);})();YAHOO.util.DD=function(id,sGroup,config){if(id){this.init(id,sGroup,config);}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(iPageX,iPageY){var x=iPageX-this.startPageX;var y=iPageY-this.startPageY;this.setDelta(x,y);},setDelta:function(iDeltaX,iDeltaY){this.deltaX=iDeltaX;this.deltaY=iDeltaY;},setDragElPos:function(iPageX,iPageY){var el=this.getDragEl();this.alignElWithMouse(el,iPageX,iPageY);},alignElWithMouse:function(el,iPageX,iPageY){var oCoord=this.getTargetCoord(iPageX,iPageY);if(!this.deltaSetXY){var aCoord=[oCoord.x,oCoord.y];YAHOO.util.Dom.setXY(el,aCoord);var newLeft=parseInt(YAHOO.util.Dom.getStyle(el,"left"),10);var newTop=parseInt(YAHOO.util.Dom.getStyle(el,"top"),10);this.deltaSetXY=[newLeft-oCoord.x,newTop-oCoord.y];}else{YAHOO.util.Dom.setStyle(el,"left",(oCoord.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(el,"top",(oCoord.y+this.deltaSetXY[1])+"px");}
this.cachePosition(oCoord.x,oCoord.y);var self=this;setTimeout(function(){self.autoScroll.call(self,oCoord.x,oCoord.y,el.offsetHeight,el.offsetWidth);},0);},cachePosition:function(iPageX,iPageY){if(iPageX){this.lastPageX=iPageX;this.lastPageY=iPageY;}else{var aCoord=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=aCoord[0];this.lastPageY=aCoord[1];}},autoScroll:function(x,y,h,w){if(this.scroll){var clientH=this.DDM.getClientHeight();var clientW=this.DDM.getClientWidth();var st=this.DDM.getScrollTop();var sl=this.DDM.getScrollLeft();var bot=h+y;var right=w+x;var toBot=(clientH+st-y-this.deltaY);var toRight=(clientW+sl-x-this.deltaX);var thresh=40;var scrAmt=(document.all)?80:30;if(bot>clientH&&toBot<thresh){window.scrollTo(sl,st+scrAmt);}
if(y<st&&st>0&&y-st<thresh){window.scrollTo(sl,st-scrAmt);}
if(right>clientW&&toRight<thresh){window.scrollTo(sl+scrAmt,st);}
if(x<sl&&sl>0&&x-sl<thresh){window.scrollTo(sl-scrAmt,st);}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false);},b4MouseDown:function(e){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(e),YAHOO.util.Event.getPageY(e));},b4Drag:function(e){this.setDragElPos(YAHOO.util.Event.getPageX(e),YAHOO.util.Event.getPageY(e));},toString:function(){return("DD "+this.id);}});YAHOO.util.DDProxy=function(id,sGroup,config){if(id){this.init(id,sGroup,config);this.initFrame();}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var self=this,body=document.body;if(!body||!body.firstChild){setTimeout(function(){self.createFrame();},50);return;}
var div=this.getDragEl(),Dom=YAHOO.util.Dom;if(!div){div=document.createElement("div");div.id=this.dragElId;var s=div.style;s.position="absolute";s.visibility="hidden";s.cursor="move";s.border="2px solid #aaa";s.zIndex=999;s.height="25px";s.width="25px";var _data=document.createElement('div');Dom.setStyle(_data,'height','100%');Dom.setStyle(_data,'width','100%');Dom.setStyle(_data,'background-color','#ccc');Dom.setStyle(_data,'opacity','0');div.appendChild(_data);body.insertBefore(div,body.firstChild);}},initFrame:function(){this.createFrame();},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId);},showFrame:function(iPageX,iPageY){var el=this.getEl();var dragEl=this.getDragEl();var s=dragEl.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(s.width,10)/2),Math.round(parseInt(s.height,10)/2));}
this.setDragElPos(iPageX,iPageY);YAHOO.util.Dom.setStyle(dragEl,"visibility","visible");},_resizeProxy:function(){if(this.resizeFrame){var DOM=YAHOO.util.Dom;var el=this.getEl();var dragEl=this.getDragEl();var bt=parseInt(DOM.getStyle(dragEl,"borderTopWidth"),10);var br=parseInt(DOM.getStyle(dragEl,"borderRightWidth"),10);var bb=parseInt(DOM.getStyle(dragEl,"borderBottomWidth"),10);var bl=parseInt(DOM.getStyle(dragEl,"borderLeftWidth"),10);if(isNaN(bt)){bt=0;}
if(isNaN(br)){br=0;}
if(isNaN(bb)){bb=0;}
if(isNaN(bl)){bl=0;}
var newWidth=Math.max(0,el.offsetWidth-br-bl);var newHeight=Math.max(0,el.offsetHeight-bt-bb);DOM.setStyle(dragEl,"width",newWidth+"px");DOM.setStyle(dragEl,"height",newHeight+"px");}},b4MouseDown:function(e){this.setStartPosition();var x=YAHOO.util.Event.getPageX(e);var y=YAHOO.util.Event.getPageY(e);this.autoOffset(x,y);},b4StartDrag:function(x,y){this.showFrame(x,y);},b4EndDrag:function(e){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden");},endDrag:function(e){var DOM=YAHOO.util.Dom;var lel=this.getEl();var del=this.getDragEl();DOM.setStyle(del,"visibility","");DOM.setStyle(lel,"visibility","hidden");YAHOO.util.DDM.moveToEl(lel,del);DOM.setStyle(del,"visibility","hidden");DOM.setStyle(lel,"visibility","");},toString:function(){return("DDProxy "+this.id);}});YAHOO.util.DDTarget=function(id,sGroup,config){if(id){this.initTarget(id,sGroup,config);}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id);}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.8.2",build:"19"});﻿
function Animator(options){this.setOptions(options);var _this=this;this.timerDelegate=function(){_this.onTimerEvent()};this.subjects=[];this.target=0;this.state=0;this.lastTime=null;};Animator.prototype={setOptions:function(options){this.options=Animator.applyDefaults({interval:20,duration:400,onComplete:function(){},onStep:function(){},transition:Animator.tx.easeInOut},options);},seekTo:function(to){this.seekFromTo(this.state,to);},seekFromTo:function(from,to){this.target=Math.max(0,Math.min(1,to));this.state=Math.max(0,Math.min(1,from));this.lastTime=new Date().getTime();if(!this.intervalId){this.intervalId=window.setInterval(this.timerDelegate,this.options.interval);}},jumpTo:function(to){this.target=this.state=Math.max(0,Math.min(1,to));this.propagate();},toggle:function(){this.seekTo(1-this.target);},addSubject:function(subject){this.subjects[this.subjects.length]=subject;return this;},clearSubjects:function(){this.subjects=[];},propagate:function(){var value=this.options.transition(this.state);for(var i=0;i<this.subjects.length;i++){if(this.subjects[i].setState){this.subjects[i].setState(value);}else{this.subjects[i](value);}}},onTimerEvent:function(){var now=new Date().getTime();var timePassed=now-this.lastTime;this.lastTime=now;var movement=(timePassed/this.options.duration)*(this.state<this.target?1:-1);if(Math.abs(movement)>=Math.abs(this.state-this.target)){this.state=this.target;}else{this.state+=movement;}
try{this.propagate();}finally{this.options.onStep.call(this);if(this.target==this.state){window.clearInterval(this.intervalId);this.intervalId=null;this.options.onComplete.call(this);}}},play:function(){this.seekFromTo(0,1)},reverse:function(){this.seekFromTo(1,0)},inspect:function(){var str="#<Animator:\n";for(var i=0;i<this.subjects.length;i++){str+=this.subjects[i].inspect();}
str+=">";return str;}}
Animator.applyDefaults=function(defaults,prefs){prefs=prefs||{};var prop,result={};for(prop in defaults)result[prop]=typeof prefs[prop]!=='undefined'?prefs[prop]:defaults[prop];return result;}
Animator.makeArray=function(o){if(o==null)return[];if(!o.length)return[o];var result=[];for(var i=0;i<o.length;i++)result[i]=o[i];return result;}
Animator.camelize=function(string){var oStringList=string.split('-');if(oStringList.length==1)return oStringList[0];var camelizedString=string.indexOf('-')==0?oStringList[0].charAt(0).toUpperCase()+oStringList[0].substring(1):oStringList[0];for(var i=1,len=oStringList.length;i<len;i++){var s=oStringList[i];camelizedString+=s.charAt(0).toUpperCase()+s.substring(1);}
return camelizedString;}
Animator.apply=function(el,style,options){if(style instanceof Array){return new Animator(options).addSubject(new CSSStyleSubject(el,style[0],style[1]));}
return new Animator(options).addSubject(new CSSStyleSubject(el,style));}
Animator.makeEaseIn=function(a){return function(state){return Math.pow(state,a*2);}}
Animator.makeEaseOut=function(a){return function(state){return 1-Math.pow(1-state,a*2);}}
Animator.makeElastic=function(bounces){return function(state){state=Animator.tx.easeInOut(state);return((1-Math.cos(state*Math.PI*bounces))*(1-state))+state;}}
Animator.makeADSR=function(attackEnd,decayEnd,sustainEnd,sustainLevel){if(sustainLevel==null)sustainLevel=0.5;return function(state){if(state<attackEnd){return state/attackEnd;}
if(state<decayEnd){return 1-((state-attackEnd)/(decayEnd-attackEnd)*(1-sustainLevel));}
if(state<sustainEnd){return sustainLevel;}
return sustainLevel*(1-((state-sustainEnd)/(1-sustainEnd)));}}
Animator.makeBounce=function(bounces){var fn=Animator.makeElastic(bounces);return function(state){state=fn(state);return state<=1?state:2-state;}}
Animator.tx={easeInOut:function(pos){return((-Math.cos(pos*Math.PI)/2)+0.5);},linear:function(x){return x;},easeIn:Animator.makeEaseIn(1.5),easeOut:Animator.makeEaseOut(1.5),strongEaseIn:Animator.makeEaseIn(2.5),strongEaseOut:Animator.makeEaseOut(2.5),elastic:Animator.makeElastic(1),veryElastic:Animator.makeElastic(3),bouncy:Animator.makeBounce(1),veryBouncy:Animator.makeBounce(3)}
function NumericalStyleSubject(els,property,from,to,units){this.els=Animator.makeArray(els);if(property=='opacity'&&window.ActiveXObject){this.property='filter';}else{this.property=Animator.camelize(property);}
this.from=parseFloat(from);this.to=parseFloat(to);this.units=units!=null?units:'px';}
NumericalStyleSubject.prototype={setState:function(state){var style=this.getStyle(state);var visibility=(this.property=='opacity'&&state==0)?'hidden':'';var j=0;for(var i=0;i<this.els.length;i++){try{this.els[i].style[this.property]=style;}catch(e){if(this.property!='fontWeight')throw e;}
if(j++>20)return;}},getStyle:function(state){state=this.from+((this.to-this.from)*state);if(this.property=='filter')return"alpha(opacity="+Math.round(state*100)+")";if(this.property=='opacity')return state;return Math.round(state)+this.units;},inspect:function(){return"\t"+this.property+"("+this.from+this.units+" to "+this.to+this.units+")\n";}}
function ColorStyleSubject(els,property,from,to){this.els=Animator.makeArray(els);this.property=Animator.camelize(property);this.to=this.expandColor(to);this.from=this.expandColor(from);this.origFrom=from;this.origTo=to;}
ColorStyleSubject.prototype={expandColor:function(color){var hexColor,red,green,blue;hexColor=ColorStyleSubject.parseColor(color);if(hexColor){red=parseInt(hexColor.slice(1,3),16);green=parseInt(hexColor.slice(3,5),16);blue=parseInt(hexColor.slice(5,7),16);return[red,green,blue]}
if(window.DEBUG){alert("Invalid colour: '"+color+"'");}},getValueForState:function(color,state){return Math.round(this.from[color]+((this.to[color]-this.from[color])*state));},setState:function(state){var color='#'
+ColorStyleSubject.toColorPart(this.getValueForState(0,state))
+ColorStyleSubject.toColorPart(this.getValueForState(1,state))
+ColorStyleSubject.toColorPart(this.getValueForState(2,state));for(var i=0;i<this.els.length;i++){this.els[i].style[this.property]=color;}},inspect:function(){return"\t"+this.property+"("+this.origFrom+" to "+this.origTo+")\n";}}
ColorStyleSubject.parseColor=function(string){var color='#',match;if(match=ColorStyleSubject.parseColor.rgbRe.exec(string)){var part;for(var i=1;i<=3;i++){part=Math.max(0,Math.min(255,parseInt(match[i])));color+=ColorStyleSubject.toColorPart(part);}
return color;}
if(match=ColorStyleSubject.parseColor.hexRe.exec(string)){if(match[1].length==3){for(var i=0;i<3;i++){color+=match[1].charAt(i)+match[1].charAt(i);}
return color;}
return'#'+match[1];}
return false;}
ColorStyleSubject.toColorPart=function(number){if(number>255)number=255;var digits=number.toString(16);if(number<16)return'0'+digits;return digits;}
ColorStyleSubject.parseColor.rgbRe=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i;ColorStyleSubject.parseColor.hexRe=/^\#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;function DiscreteStyleSubject(els,property,from,to,threshold){this.els=Animator.makeArray(els);this.property=Animator.camelize(property);this.from=from;this.to=to;this.threshold=threshold||0.5;}
DiscreteStyleSubject.prototype={setState:function(state){var j=0;for(var i=0;i<this.els.length;i++){this.els[i].style[this.property]=state<=this.threshold?this.from:this.to;}},inspect:function(){return"\t"+this.property+"("+this.from+" to "+this.to+" @ "+this.threshold+")\n";}}
function CSSStyleSubject(els,style1,style2){els=Animator.makeArray(els);this.subjects=[];if(els.length==0)return;var prop,toStyle,fromStyle;if(style2){fromStyle=this.parseStyle(style1,els[0]);toStyle=this.parseStyle(style2,els[0]);}else{toStyle=this.parseStyle(style1,els[0]);fromStyle={};for(prop in toStyle){fromStyle[prop]=CSSStyleSubject.getStyle(els[0],prop);}}
var prop;for(prop in fromStyle){if(fromStyle[prop]==toStyle[prop]){delete fromStyle[prop];delete toStyle[prop];}}
var prop,units,match,type,from,to;for(prop in fromStyle){var fromProp=String(fromStyle[prop]);var toProp=String(toStyle[prop]);if(toStyle[prop]==null){if(window.DEBUG)alert("No to style provided for '"+prop+'"');continue;}
if(from=ColorStyleSubject.parseColor(fromProp)){to=ColorStyleSubject.parseColor(toProp);type=ColorStyleSubject;}else if(fromProp.match(CSSStyleSubject.numericalRe)&&toProp.match(CSSStyleSubject.numericalRe)){from=parseFloat(fromProp);to=parseFloat(toProp);type=NumericalStyleSubject;match=CSSStyleSubject.numericalRe.exec(fromProp);var reResult=CSSStyleSubject.numericalRe.exec(toProp);if(match[1]!=null){units=match[1];}else if(reResult[1]!=null){units=reResult[1];}else{units=reResult;}}else if(fromProp.match(CSSStyleSubject.discreteRe)&&toProp.match(CSSStyleSubject.discreteRe)){from=fromProp;to=toProp;type=DiscreteStyleSubject;units=0;}else{if(window.DEBUG){alert("Unrecognised format for value of "
+prop+": '"+fromStyle[prop]+"'");}
continue;}
this.subjects[this.subjects.length]=new type(els,prop,from,to,units);}}
CSSStyleSubject.prototype={parseStyle:function(style,el){var rtn={};if(style.indexOf(":")!=-1){var styles=style.split(";");for(var i=0;i<styles.length;i++){var parts=CSSStyleSubject.ruleRe.exec(styles[i]);if(parts){rtn[parts[1]]=parts[2];}}}
else{var prop,value,oldClass;oldClass=el.className;el.className=style;for(var i=0;i<CSSStyleSubject.cssProperties.length;i++){prop=CSSStyleSubject.cssProperties[i];value=CSSStyleSubject.getStyle(el,prop);if(value!=null){rtn[prop]=value;}}
el.className=oldClass;}
return rtn;},setState:function(state){for(var i=0;i<this.subjects.length;i++){this.subjects[i].setState(state);}},inspect:function(){var str="";for(var i=0;i<this.subjects.length;i++){str+=this.subjects[i].inspect();}
return str;}}
CSSStyleSubject.getStyle=function(el,property){var style;if(document.defaultView&&document.defaultView.getComputedStyle){style=document.defaultView.getComputedStyle(el,"").getPropertyValue(property);if(style){return style;}}
property=Animator.camelize(property);if(el.currentStyle){style=el.currentStyle[property];}
return style||el.style[property]}
CSSStyleSubject.ruleRe=/^\s*([a-zA-Z\-]+)\s*:\s*(\S(.+\S)?)\s*$/;CSSStyleSubject.numericalRe=/^-?\d+(?:\.\d+)?(%|[a-zA-Z]{2})?$/;CSSStyleSubject.discreteRe=/^\w+$/;CSSStyleSubject.cssProperties=['azimuth','background','background-attachment','background-color','background-image','background-position','background-repeat','border-collapse','border-color','border-spacing','border-style','border-top','border-top-color','border-right-color','border-bottom-color','border-left-color','border-top-style','border-right-style','border-bottom-style','border-left-style','border-top-width','border-right-width','border-bottom-width','border-left-width','border-width','bottom','clear','clip','color','content','cursor','direction','display','elevation','empty-cells','css-float','font','font-family','font-size','font-size-adjust','font-stretch','font-style','font-variant','font-weight','height','left','letter-spacing','line-height','list-style','list-style-image','list-style-position','list-style-type','margin','margin-top','margin-right','margin-bottom','margin-left','max-height','max-width','min-height','min-width','orphans','outline','outline-color','outline-style','outline-width','overflow','padding','padding-top','padding-right','padding-bottom','padding-left','pause','position','right','size','table-layout','text-align','text-decoration','text-indent','text-shadow','text-transform','top','vertical-align','visibility','white-space','width','word-spacing','z-index','opacity','outline-offset','overflow-x','overflow-y'];function AnimatorChain(animators,options){this.animators=animators;this.setOptions(options);for(var i=0;i<this.animators.length;i++){this.listenTo(this.animators[i]);}
this.forwards=false;this.current=0;}
AnimatorChain.prototype={setOptions:function(options){this.options=Animator.applyDefaults({resetOnPlay:true},options);},play:function(){this.forwards=true;this.current=-1;if(this.options.resetOnPlay){for(var i=0;i<this.animators.length;i++){this.animators[i].jumpTo(0);}}
this.advance();},reverse:function(){this.forwards=false;this.current=this.animators.length;if(this.options.resetOnPlay){for(var i=0;i<this.animators.length;i++){this.animators[i].jumpTo(1);}}
this.advance();},toggle:function(){if(this.forwards){this.seekTo(0);}else{this.seekTo(1);}},listenTo:function(animator){var oldOnComplete=animator.options.onComplete;var _this=this;animator.options.onComplete=function(){if(oldOnComplete)oldOnComplete.call(animator);_this.advance();}},advance:function(){if(this.forwards){if(this.animators[this.current+1]==null)return;this.current++;this.animators[this.current].play();}else{if(this.animators[this.current-1]==null)return;this.current--;this.animators[this.current].reverse();}},seekTo:function(target){if(target<=0){this.forwards=false;this.animators[this.current].seekTo(0);}else{this.forwards=true;this.animators[this.current].seekTo(1);}}}
function Accordion(options){this.setOptions(options);var selected=this.options.initialSection,current;if(this.options.rememberance){current=document.location.hash.substring(1);}
this.rememberanceTexts=[];this.ans=[];var _this=this;for(var i=0;i<this.options.sections.length;i++){var el=this.options.sections[i];var an=new Animator(this.options.animatorOptions);var from=this.options.from+(this.options.shift*i);var to=this.options.to+(this.options.shift*i);an.addSubject(new NumericalStyleSubject(el,this.options.property,from,to,this.options.units));an.jumpTo(0);var activator=this.options.getActivator(el);activator.index=i;activator.onclick=function(){_this.show(this.index)};this.ans[this.ans.length]=an;this.rememberanceTexts[i]=activator.innerHTML.replace(/\s/g,"");if(this.rememberanceTexts[i]===current){selected=i;}}
this.show(selected);}
Accordion.prototype={setOptions:function(options){this.options=Object.extend({sections:null,getActivator:function(el){return document.getElementById(el.getAttribute("activator"))},shift:0,initialSection:0,rememberance:true,animatorOptions:{}},options||{});},show:function(section){for(var i=0;i<this.ans.length;i++){this.ans[i].seekTo(i>section?1:0);}
if(this.options.rememberance){document.location.hash=this.rememberanceTexts[section];}}}
YAHOO.namespace('com.thecodecentral');var $E=YAHOO.util.Event;var $=YAHOO.util.Dom.get;var $D=YAHOO.util.Dom;var $TCC=YAHOO.com.thecodecentral;YAHOO.com.thecodecentral.empty=function(elem){while(elem.firstChild){elem.removeChild(elem.firstChild);}};YAHOO.com.thecodecentral.countAsc=function(a){var counter=0;for(var i in a){counter++;}
return counter;};YAHOO.com.thecodecentral.LoadingPanel=function(conf){if(conf==undefined){conf=new Array();}
if(conf.id==undefined){conf.id='loadingPanel';}
if(conf.header==undefined){conf.header='Loading, please wait...';}
if(conf.width==undefined){conf.width="240px";}
this.conf=conf;this.init();};YAHOO.com.thecodecentral.LoadingPanel.prototype={init:function(){this.loadingPanel=new YAHOO.widget.Panel(this.conf.id,{width:this.conf.width,fixedcenter:true,close:false,draggable:false,modal:true,visible:false,zindex:"150"});this.loadingPanel.setBody(this.conf.header+'<img src="http://us.i1.yimg.com/us.yimg.com/i/us/per/gr/gp/rel_interstitial_loading.gif" />');this.loadingPanel.render(document.body);$D.addClass(this.loadingPanel.id,'tcc_lightboxLoader');var cancelLink=document.createElement('a');$D.setStyle(cancelLink,'cursor','pointer');cancelLink.appendChild(document.createTextNode('Cancel'));$E.on(cancelLink,'click',function(e,o){o.self.hide();},{self:this.loadingPanel});this.loadingPanel.appendToBody(document.createElement('br'));this.loadingPanel.appendToBody(cancelLink);$D.setStyle(this.loadingPanel.body,'text-align','center');},show:function(text){if(text!=undefined){this.loadingPanel.setHeader(text);}else{this.loadingPanel.setHeader(this.conf.header);}
this.loadingPanel.show();},hide:function(){this.loadingPanel.hide();},getInstance:function(){return this.loadingPanel;}};YAHOO.com.thecodecentral.ImageLoader=function(url){this.url=url;this.image=null;this.loadEvent=new YAHOO.util.CustomEvent("onLoad",this);};YAHOO.com.thecodecentral.ImageLoader.prototype={load:function(){this.image=document.createElement('img');$E.on(this.image,'load',function(e,o){o.fire();},this.loadEvent);this.image.src=this.url;},getImage:function(){return this.image;}};YAHOO.com.thecodecentral.ImageGallery=function(dataSource,lightboxPanel){this.dataSource=dataSource;this.lightboxPanel=lightboxPanel;this.init();this.lightboxPanel.gallery=this;this.initKeyboardShortcut();};YAHOO.com.thecodecentral.ImageGallery.prototype={init:function(){var galleryList=new YAHOO.com.thecodecentral.ImageGalleryList(this.dataSource,true);var nextImgDiv=document.createElement('div');nextImgDiv.title='Forward';$D.addClass(nextImgDiv,'tcc_slideShowCtrlNext');var prevImgDiv=document.createElement('div');prevImgDiv.title="Backward";$D.addClass(prevImgDiv,'tcc_slideShowCtrlPrev');var closeDiv=document.createElement('div');closeDiv.title="Close this gallery";$D.addClass(closeDiv,'tcc_slideShowCtrlClose');var resizeDiv=document.createElement('div');resizeDiv.title="Resize";$D.addClass(resizeDiv,'tcc_slideShowCtrlResize');var infoDiv=document.createElement('div');infoDiv.title="Toggle tooltip";$D.addClass(infoDiv,'tcc_slideShowCtrlInfo');var helpDiv=document.createElement('div');helpDiv.title="Toggle Help";$D.addClass(helpDiv,'tcc_slideShowCtrlHelp');var dragDiv=document.createElement('div');dragDiv.title="Move toolbar";dragDiv.id=this.lightboxPanel.showImgPanel.id+"Dragger";$D.addClass(dragDiv,'tcc_slideShowCtrlDrag');this.playImgDiv=document.createElement('div');this.playImgDiv.title="Play";$D.addClass(this.playImgDiv,'tcc_slideShowCtrlPlay');this._tPlay=-1;var navClickHandler=function(e,o){window.clearInterval(o.self._tPlay);if(o.dir=='next'){o.self.forward();}else{o.self.backward();}};$E.on(this.playImgDiv,'click',function(e,o){o.self.forward();o.self.togglePlayback();},{self:this});$E.on(nextImgDiv,'click',navClickHandler,{self:this,dir:'next'});$E.on(prevImgDiv,'click',navClickHandler,{self:this,dir:'prev'});$E.on(closeDiv,'click',function(e,o){o.self.lightboxPanel.showImgPanel.hide();window.clearInterval(o.self._tPlay);},{self:this});$E.on(resizeDiv,'click',function(e,o){o.self.lightboxPanel.switchSize();},{self:this});$E.on(helpDiv,'click',function(e,o){o.self.lightboxPanel.toggleHelpPanel();},{self:this});$E.on(infoDiv,'click',function(e,o){o.self.lightboxPanel.toggleTooltip();},{self:this});var slideShowCtrl=new YAHOO.widget.Panel('tcc_slideShowCtrl'+this.lightboxPanel.showImgPanel.id,{visible:false,close:false,draggable:false,underlay:"none"});slideShowCtrl.appendToBody(this.playImgDiv);slideShowCtrl.appendToBody(prevImgDiv);slideShowCtrl.appendToBody(nextImgDiv);slideShowCtrl.appendToBody(closeDiv);slideShowCtrl.appendToBody(infoDiv);slideShowCtrl.appendToBody(helpDiv);slideShowCtrl.appendToBody(resizeDiv);slideShowCtrl.appendToBody(dragDiv);var ctrlDragger=new YAHOO.util.DD(slideShowCtrl.id+"_c");var showImgPanel=this.lightboxPanel.showImgPanel;ctrlDragger.endDrag=function(e){showImgPanel.sizeMask();};ctrlDragger.setHandleElId(this.lightboxPanel.showImgPanel.id+"Dragger");slideShowCtrl.render(document.body);$D.addClass(slideShowCtrl.id,'tcc_slideShowCtrl');$D.setStyle(slideShowCtrl.id+'_c','opacity',this.lightboxPanel.conf.ctrlOpacity);slideShowCtrl.bringToTop();this.slideShowCtrl=slideShowCtrl;this.dockToolbar(true);this.lightboxPanel.loadingPanel.getInstance().showEvent.subscribe(function(t,a,o){o.slideShowCtrl.hide();},this);this.lightboxPanel.loadingPanel.getInstance().hideEvent.subscribe(function(t,a,o){if(o.lightboxPanel.conf.ctrlVisible){o.slideShowCtrl.show();}},this);this.lightboxPanel.showImgPanel.showEvent.subscribe(function(t,a,o){if(o.lightboxPanel.conf.ctrlVisible){slideShowCtrl.show();slideShowCtrl.bringToTop();}},this);this.lightboxPanel.showImgPanel.hideEvent.subscribe(function(t,a,o){slideShowCtrl.hide();});this.galleryList=galleryList;if(this.lightboxPanel.conf.autoplay){this.togglePlayback();}},forward:function(){this.lightboxPanel.placeImage(this.galleryList.forward());},backward:function(){this.lightboxPanel.placeImage(this.galleryList.backward());},togglePlayback:function(){if($D.hasClass(this.playImgDiv,'tcc_slideShowCtrlPlay')){$D.removeClass(this.playImgDiv,'tcc_slideShowCtrlPlay');$D.addClass(this.playImgDiv,'tcc_slideShowCtrlPause');this._tPlay=window.setInterval(this.forward.bind(this),7000);}
else{$D.removeClass(this.playImgDiv,'tcc_slideShowCtrlPause');$D.addClass(this.playImgDiv,'tcc_slideShowCtrlPlay');window.clearInterval(this._tPlay);}},initKeyboardShortcut:function(){var showImgPanel=this.lightboxPanel.showImgPanel;var keys={};keys.escapeKey=new YAHOO.util.KeyListener(document,{keys:27},{fn:this.lightboxPanel.showImgPanel.hide,scope:this.lightboxPanel.showImgPanel,correctScope:true});showImgPanel.cfg.queueProperty("keylisteners",keys.escapeKey);keys.leftKey=new YAHOO.util.KeyListener(document,{keys:37},{fn:this.backward,scope:this,correctScope:true});showImgPanel.cfg.queueProperty("keylisteners",keys.leftKey);keys.upKey=new YAHOO.util.KeyListener(document,{keys:[38,32]},{fn:this.lightboxPanel.switchSize,scope:this.lightboxPanel,correctScope:true});showImgPanel.cfg.queueProperty("keylisteners",keys.upKey);keys.rightKey=new YAHOO.util.KeyListener(document,{keys:39},{fn:this.forward,scope:this,correctScope:true});showImgPanel.cfg.queueProperty("keylisteners",keys.rightKey);keys.downKey=new YAHOO.util.KeyListener(document,{keys:40},{fn:this.lightboxPanel.toggleTooltip,scope:this.lightboxPanel,correctScope:true});showImgPanel.cfg.queueProperty("keylisteners",keys.downKey);keys.f1Key=new YAHOO.util.KeyListener(document,{keys:112},{fn:this.lightboxPanel.toggleHelpPanel,scope:this.lightboxPanel,correctScope:true});this.navKeys=keys;showImgPanel.showEvent.subscribe(function(e,a,o){o.self.setKeyboardEnabled(true);$E.on(document,'keydown',function(e,o){$E.preventDefault(e);});},{self:this});showImgPanel.hideEvent.subscribe(function(e,a,o){o.self.setKeyboardEnabled(false);$E.purgeElement(document,false,'keydown');},{self:this});},dockToolbar:function(force){if(!this.lightboxPanel.conf.ctrlVisible){return;}
force=force==undefined?false:force;var ctrlRegion=$D.getRegion(this.slideShowCtrl.id);if(!force&&((this.lightboxPanel.pageScrollTopValue+$D.getClientHeight()>ctrlRegion.bottom+5)&&(this.lightboxPanel.pagepageScrollLeftValue+$D.getClientWidth()>ctrlRegion.right+5))){return;}
window.scroll(0,this.lightboxPanel.pageScrollTopValue);this.slideShowCtrl.cfg.setProperty("x",$D.getViewportWidth()/2-(ctrlRegion.right-ctrlRegion.left)/2);this.slideShowCtrl.center();this.slideShowCtrl.cfg.setProperty("y",$D.getViewportHeight()+$D.getDocumentScrollTop()-55);},setKeyboardEnabled:function(state){if(state==true){for(var i in this.navKeys){this.navKeys[i].enable();}}else{for(var i in this.navKeys){this.navKeys[i].disable();}}},getList:function(){return this.galleryList;}};YAHOO.com.thecodecentral.ImageGalleryList=function(dataSource,isCircular){this.list=new Array();this.curIndex=0;this.isCircular=isCircular==undefined?false:isCircular;this.dataSource=dataSource;this.doIndex();};YAHOO.com.thecodecentral.ImageGalleryList.prototype={doIndex:function(){for(var i in this.dataSource){this.list.push(i);}},getFirst:function(){return this.list[0];},getLast:function(){return this.list[this.getSize()-1];},getCurrent:function(){return this.list[this.curIndex];},getCurrentIndex:function(){return this.curIndex;},setCurrentIndex:function(index){index=parseInt(index);if(index>this.getSize()){this.curIndex=this.getSize()-1;}else if(index<0){this.curIndex=0;}else{this.curIndex=index;}},getIndexByImageId:function(imgId){for(var i in this.list){if(this.list[i]==imgId){return i;}}
return-1;},getNextIndex:function(){var i;if(this.curIndex+1<this.getSize()){i=this.curIndex+1;}else{if(this.isCircular){i=0;}else{i=this.curIndex;}}
return i;},getNext:function(){return this.list[this.getNextIndex()];},getPreviousIndex:function(){var i;if(this.curIndex>0){i=this.curIndex-1;}else{if(this.isCircular){i=this.getSize()-1;}else{i=0;}}
return i;},getPrevious:function(){return this.list[this.getPreviousIndex()];},forward:function(){this.curIndex=this.getNextIndex();return this.getCurrent();},backward:function(){this.curIndex=this.getPreviousIndex();return this.getCurrent();},getSize:function(){return this.list.length;},toString:function(){var s='';for(var i in this.list){s+=i+':'+this.list[i]+' ';}
return s;}};YAHOO.com.thecodecentral.LightboxPanel=function(conf){this.STATE_MAX=0;this.STATE_FIT=1;this.conf=conf==null?{}:conf;this.conf.hasThumbnails=conf.hasThumbnails==null?true:conf.hasThumbnails;this.conf.effect=conf.effect==null?true:conf.effect;this.conf.effectDuration=conf.effectDuration==null?1:conf.effectDuration;this.conf.ctrlVisible=conf.ctrlVisible==null?true:conf.ctrlVisible;this.conf.ctrlOpacity=conf.ctrlOpacity==null?.5:conf.ctrlOpacity;this.conf.id=conf.id==null?'tcc_showImgPanel':conf.id;this.conf.tooltip=conf.tooltip==null?true:conf.tooltip;this.conf.tooltipOpacity=conf.tooltipOpacity==null?.9:conf.tooltipOpacity;this.imgCache={};this.gallery=null;this.init();};YAHOO.com.thecodecentral.LightboxPanel.prototype={init:function(){this.preloadStartEvent=new YAHOO.util.CustomEvent("preloadStartEvent",this);this.preloadCompleteEvent=new YAHOO.util.CustomEvent("preloadCompleteEvent",this);this.preloadAllCompleteEvent=new YAHOO.util.CustomEvent("preloadAllCompleteEvent",this);this.loadingPanel=new YAHOO.com.thecodecentral.LoadingPanel();this.initLightbox();if(this.conf.hasThumbnails){this.prepareThumbnails();}
this.pageScrollTopValue=0;this.pageScrollLeftValue=0;if(this.conf.effect==true){this.imgPanelFadeIn=new YAHOO.util.Anim(this.showImgPanel.id,{opacity:{from:0,to:1}},this.conf.effectDuration,YAHOO.util.Easing.easeInOut);}
for(var i in this.conf.dataSource){if(this.conf.dataSource[i].state==undefined){this.conf.dataSource[i].state=this.STATE_FIT;}}
$D.addClass(document.body,'yui-skin-sam');},prepareThumbnails:function(){var r=this.conf.dataSource
for(var i in r){var onImgClick=function(e,o){o.self.show(o.imgId);};var imgSmall=$(i);$D.setStyle(imgSmall,'cursor','pointer');$E.on(imgSmall,'click',onImgClick,{self:this,imgId:i});}},preloadImage:function(imgId,conf,preloadOnly){preloadOnly=preloadOnly==null?false:preloadOnly;this.preloadStartEvent.fire({imageId:imgId,ds:this.conf.dataSource[imgId]});if(conf==undefined){conf={};}
if(conf.progressBar==undefined){conf.progressBar=true;}
var imgLoader=new YAHOO.com.thecodecentral.ImageLoader(this.conf.dataSource[imgId].url);imgLoader.loadEvent.subscribe(function(e,a,o){o.self.loadingPanel.hide();var img=this.getImage();o.self.imgCache[o.imgId]=img;o.self.conf.dataSource[o.imgId].width=img.width;o.self.conf.dataSource[o.imgId].height=img.height;if(!preloadOnly){o.self.show(o.imgId);}
o.self.preloadCompleteEvent.fire({imageId:o.imgId,ds:o.self.conf.dataSource[o.imgId]});if($TCC.countAsc(o.self.conf.dataSource)==$TCC.countAsc(o.self.imgCache)){o.self.preloadAllCompleteEvent.fire($TCC.countAsc(o.self.conf.dataSource));}},{self:this,imgId:imgId,conf:conf});if(conf.callback!=undefined){imgLoader.loadEvent.subscribe(conf.callback,conf.param);}
if(conf.progressBar&&!preloadOnly){this.loadingPanel.show("Loading image ...");}
imgLoader.load();},preloadAll:function(){var queue=new Array();for(var i in this.conf.dataSource){queue.push(i);}
queue.reverse();this.preloadImage(queue.pop(),null,true);this.preloadCompleteEvent.subscribe(function(e,a,o){if(queue.length>0){o.self.preloadImage(o.queue.pop(),null,true);}},{self:this,queue:queue});},setOpacity:function(percent){$D.setStyle(this.showImgPanel.id,'opacity',percent);},savePageScrollPosition:function(){this.pageScrollLeftValue=$D.getDocumentScrollLeft();this.pageScrollTopValue=$D.getDocumentScrollTop();},restorePageScrollPosition:function(){window.scroll(this.pageScrollLeftValue,this.pageScrollTopValue);},show:function(imgId){this.savePageScrollPosition();if(imgId==null){imgId=this.gallery.galleryList.getFirst();}
this.placeImage(imgId);},placeImage:function(imgId){this.gallery.dockToolbar();this.gallery.galleryList.setCurrentIndex(this.gallery.galleryList.getIndexByImageId(imgId));var image=this.imgCache[imgId];this.gallery.setKeyboardEnabled(false);if(image==undefined){this.preloadImage(imgId);return;}
this.gallery.setKeyboardEnabled(true);if(this.conf.effect==true){this.imgPanelFadeIn.stop();this.setOpacity(0);this.imgPanelFadeIn.animate();}
$TCC.empty(this._imgHolder);this.restorePageScrollPosition();$E.purgeElement(this.showImgPanel.body,false,'dblclick');$E.on(this.showImgPanel.body,'dblclick',function(e,o){o.self.restorePageScrollPosition();o.self.switchSize();},{imgId:imgId,self:this,image:image});var title;var text;var toolTipText="";var link;if(this.conf.dataSource[imgId].title==null||this.conf.dataSource[imgId].title.length==0){title='&nbsp;';}else{title=this.conf.dataSource[imgId].title;}
link=this.conf.dataSource[imgId].link;if(this.conf.dataSource[imgId].text==null||this.conf.dataSource[imgId].text.length==0){text='&nbsp;';}else{text=this.conf.dataSource[imgId].text;}
this.setTooltipText(title,text,link);this.showImgPanel.show();var imageNode=document.createElement('img');imageNode.src=image.src;this._imgHolder.appendChild(imageNode);this._autoFit(image,imgId);this.sizeMask();this.moveTooltip();},sizeMask:function(){$D.setStyle(this.showImgPanel.id+'_mask','width',$D.getClientWidth()+'px');$D.setStyle(this.showImgPanel.id+'_mask','height',$D.getClientHeight()+'px');this.showImgPanel.sizeMask();},switchSize:function(){this.gallery.dockToolbar();var imgId=this.gallery.getList().getCurrent();var image=$(this._imgHolder.id).getElementsByTagName('img')[0];if(this.conf.dataSource[imgId].state==this.STATE_MAX){this._autoFit(image,imgId);}else{this._maximize(image,imgId);}
this.sizeMask();},_autoFit:function(){var imgId=this.gallery.getList().getCurrent();this.conf.dataSource[imgId].state=this.STATE_FIT;var image=$(this._imgHolder.id).getElementsByTagName('img')[0];var iw=this.conf.dataSource[imgId].width;var ih=this.conf.dataSource[imgId].height;var vw=$D.getViewportWidth()-50;var vh=$D.getViewportHeight()-100;if(iw>vw||ih>vh){var ratioi=iw/ih;var ratiow=vw/vh;if(ratioi<=ratiow){image.height=vh;image.width=iw*(vh/ih);}else{image.width=vw;image.height=ih*(vw/iw);}}
this.showImgPanel.cfg.setProperty('width',(image.width+20)+'px');this.showImgPanel.center();},_maximize:function(){var imgId=this.gallery.getList().getCurrent();var image=$(this._imgHolder.id).getElementsByTagName('img')[0];this.conf.dataSource[imgId].state=this.STATE_MAX;image.width=this.conf.dataSource[imgId].width;image.height=this.conf.dataSource[imgId].height;this.showImgPanel.cfg.setProperty('width',(parseInt(this.conf.dataSource[imgId].width)+20)+'px');this.showImgPanel.cfg.setProperty('x',5);this.showImgPanel.center();},initLightbox:function(){var panelConf={width:'100px',visible:false,draggable:false,modal:true,close:false};if(this.conf.modal!=undefined&&this.conf.modal==false){panelConf.modal=false;}
var showImgPanel=new YAHOO.widget.Panel(this.conf.id,panelConf);var imgHolder=document.createElement('div');imgHolder.id=showImgPanel.id+'ImgHolder';$D.setStyle(imgHolder,'text-align','center');showImgPanel.setBody(imgHolder);showImgPanel.render(document.body);$D.addClass(showImgPanel.id,'tcc_showImgPanel');var isDragged=false;$E.on(showImgPanel.body,'click',function(e,o){if(!isDragged){showImgPanel.hide();}
isDragged=false;},{self:this});var imgPanelDragger=new YAHOO.util.DD(showImgPanel.id+"_c");imgPanelDragger.startDrag=function(e){isDragged=true;};imgPanelDragger.endDrag=function(e){showImgPanel.sizeMask();};$E.on(showImgPanel.id+'_mask','click',function(e,o){o.self.showImgPanel.hide();},{self:this});showImgPanel.beforeShowEvent.subscribe(function(){this.sizeMask();});showImgPanel.moveEvent.subscribe(function(){this.sizeMask();});var maskHandler=function(t,a,o){o.self.imageTooltip.bringToTop();if(o.self.conf.maskOpacity!=undefined){$D.setStyle(this.id+'_mask','opacity',o.self.conf.maskOpacity);}
if(o.self.conf.maskBgColor!=undefined){$D.setStyle(this.id+'_mask','background-color',o.self.conf.maskBgColor);}};showImgPanel.showEvent.subscribe(maskHandler,{self:this});this.loadingPanel.getInstance().showEvent.subscribe(maskHandler,{self:this});showImgPanel.beforeHideEvent.subscribe(function(t,a,o){o.self.restorePageScrollPosition();o.self._autoFit();},{self:this});showImgPanel.hideEvent.subscribe(function(t,a,o){o.self.imageTooltip.hide();o.self.helpPanel.hide();},{self:this});this._imgHolder=imgHolder;this.showImgPanel=showImgPanel;var imageTooltip=new YAHOO.widget.Dialog(this.showImgPanel.id+"Tooddtip",{width:"auto",close:false,draggable:false,visible:false});imageTooltip.setBody('&nbsp;');imageTooltip.render(document.body);$D.addClass(imageTooltip.id,'tcc_imageTooltip');$D.setStyle(imageTooltip.id,'opacity',this.conf.tooltipOpacity);var imgTooltipDragger=new YAHOO.util.DD(imageTooltip.id+"_c");imgTooltipDragger.endDrag=function(e){showImgPanel.sizeMask();};imgTooltipDragger.endDrag=function(e){showImgPanel.sizeMask();};this.imageTooltip=imageTooltip;var helpPanel=new YAHOO.widget.Panel(this.showImgPanel.id+"HelpPanel",{width:"250px",close:false,draggable:false,visible:false,fixedcenter:true,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.10}});helpPanel.setBody(' ');helpPanel.render(document.body);$D.addClass(helpPanel.id,'tcc_imageHelPanel');$E.on(helpPanel.body,'click',function(){helpPanel.hide();});this.helpPanel=helpPanel;this._setHelpPanelBody();},_setHelpPanelBody:function(){this.helpPanel.setBody('<div class="tcc_helpPanelTitle">Basic Operations:</div>'+'<strong>Click</strong> to close the lightbox<br/>'+'<strong>Drag</strong> to move the lightbox<br/>'+'<br/>'+'<div class="tcc_helpPanelTitle">Keyboard Shortcuts:</div>'+'<strong>Arrow Left</strong> - Previous photo<br/>'+'<strong>Arrow Up/Space bar</strong> - Toggle maximize/restore<br/>'+'<strong>Arrow Right</strong> - Next photo<br/>'+'<strong>Arrow Down</strong> - Toggle tooltip<br/>'+'<strong>Escape</strong> - Close gallery<br/>'+'<strong>F1</strong> - Show help<br/>'+'<br/>Click this panel to close<br/>');},moveTooltip:function(){if(this.imageTooltip.element.offsetWidth>500)this.imageTooltip.element.style.width='500px';if(this.imageTooltip.element.offsetHeight>108)this.imageTooltip.element.style.height='108px';this.imageTooltip.moveTo($D.getDocumentScrollLeft()+($D.getClientWidth()/2)-(this.imageTooltip.element.offsetWidth/2),$D.getDocumentScrollTop()+15);},toggleTooltip:function(){this.conf.tooltip=!this.conf.tooltip;if(this.imageTooltip.cfg.getProperty('visible')==true&&!this.conf.tooltip){this.imageTooltip.hide();}else{this.imageTooltip.show();this.imageTooltip.bringToTop();}},toggleHelpPanel:function(){if(this.helpPanel.cfg.getProperty('visible')==true){this.helpPanel.hide();}else{this.helpPanel.show();this.helpPanel.bringToTop();}},setTooltipText:function(title,text,link){title=(title==null||title=='&nbsp;')?'':title;text=(text==null||text=='&nbsp;')?'':text;if(title.length==0&&text.length==0){this.imageTooltip.hide();}else{if(this.conf.tooltip){this.imageTooltip.show();}
this.imageTooltip.element.style.width='auto';this.imageTooltip.element.style.height='auto';this.imageTooltip.element.style.overflow='hidden';if(link){title="<a href=\""+link+"\">"+title+"</a>";}
this.imageTooltip.setBody('<div class="tcc_imageTooltipTitle" id=".'+this.imageTooltip.id+'Title">'+title+'</div>'+'<div class="tcc_imageTooltipText" id=".'+this.imageTooltip.id+'Text">'+text+'</div>');}}};YAHOO.com.thecodecentral.Lightbox=function(dataSource,conf){this.init(dataSource,conf);};YAHOO.com.thecodecentral.Lightbox.prototype={init:function(dataSource,conf){conf=conf==null?{}:conf;conf.dataSource=dataSource;this.conf=conf;this.lightboxPanel=new YAHOO.com.thecodecentral.LightboxPanel(conf);this.imageGallery=new YAHOO.com.thecodecentral.ImageGallery(conf.dataSource,this.lightboxPanel);},show:function(imgId){this.lightboxPanel.show(imgId);},preloadAll:function(){this.lightboxPanel.preloadAll();},setDataSource:function(dataSource){this.lightboxPanel.conf.dataSource=dataSource;this.lightboxPanel.imgCache={};this.imageGallery.dataSource=dataSource;this.imageGallery.galleryList=new YAHOO.com.thecodecentral.ImageGalleryList(dataSource,true);},dispose:function(){this.lightboxPanel.showImgPanel.destroy();this.lightboxPanel.imageTooltip.destroy();this.imageGallery.slideShowCtrl.destroy();this.lightboxPanel.loadingPanel.loadingPanel.destroy();this.lightboxPanel.helpPanel.destroy();}};ccms.namespace('ams');ams.gallery=(function(){var json=null;var lightbox=null;function onRecv(response){json=response;if(!lightbox){lightbox=new YAHOO.com.thecodecentral.Lightbox(json,{maskOpacity:.8,maskBgColor:'#000',effect:true});lightbox.preloadAll();}
lightbox.show();}
function clickIntercept(e){if(json){onRecv(json);}
else{ccms.async.http({url:this.href+'/json',onSuccess:onRecv,parseJSON:true});}
return ccms.event.killEvent(e);}
return{install:function(root_element){ccms.dom.getElementsByClassName('lightbox','a',root_element).foreach(function(a){if(a.href.endswith('gallery'))
ccms.event.attach(a,'click',clickIntercept);});}}})();ccms.widgets.addInstaller('ams.gallery.clickIntercept',ams.gallery.install);ccms.namespace('ccms.widgets');ccms.html.use();ccms.widgets.Pager=function(root_element,api){var results=ccms.dom.getElementByClassName('results','div',root_element);if(!results)return null;var page=1,npages=1;var pages=[];var body=results.parentNode;ccms.dom.addClass(root_element,'ccmsWidgetsPager');ccms.dom.setStyle(results,'overflow-x','hidden');ccms.dom.setStyle(results,'overflow-y','hidden');var spinner=ccms.html.SPAN({'class':'pager-spinner'},ccms.html.SPAN('Loading'));var previous=ccms.html.SPAN({'class':'pager-button previous disabled'},ccms.html.SPAN('Back'));var next=ccms.html.SPAN({'class':'pager-button next'},ccms.html.SPAN('More'));var controls=ccms.html.DIV({'class':'pager-controls'},previous,spinner,next);body.appendChild(controls);ccms.event.on(previous,'click',goPrevious);ccms.event.on(next,'click',goNext);ccms.dom.hide(spinner);pages[page]=results.innerHTML;function goPrevious(e){if(page>1&&!ccms.dom.hasClass(previous,'disabled')){page-=1;update();}}
function goNext(e){if(!ccms.dom.hasClass(next,'disabled')){page+=1;update();}}
function update(){if(pages[page]){display();}
else{ccms.dom.addClass(previous,'disabled');ccms.dom.addClass(next,'disabled');ccms.dom.show(spinner);ccms.async.http({'url':api.href,'parameters':{'page':page},'onSuccess':onRecvData,'onFailure':onHTTPError,'parseJSON':true});}}
function onRecvData(response){pages[page]=response.html;npages=response.pages;display();}
function display(){if(typeof Animator=='function'){(new Animator({duration:200,transition:Animator.tx.easeIn,onComplete:function(){results.innerHTML=pages[page];(new Animator({duration:200,transition:Animator.tx.easeIn,onComplete:function(){ccms.dom.hide(spinner);if(page>1)ccms.dom.removeClass(previous,'disabled');else ccms.dom.addClass(previous,'disabled');if(page<npages)ccms.dom.removeClass(next,'disabled');else ccms.dom.addClass(next,'disabled');}})).addSubject(new NumericalStyleSubject(results,'opacity',0.0,1.0)).play();}})).addSubject(new NumericalStyleSubject(results,'opacity',1.0,0.0)).play();}
else{results.innerHTML=pages[page];if(page>1)ccms.dom.removeClass(previous,'disabled');else ccms.dom.addClass(previous,'disabled');if(page<npages)ccms.dom.removeClass(next,'disabled');else ccms.dom.addClass(next,'disabled');ccms.dom.hide(spinner);}}
function onHTTPError(response){ccms.dom.hide(spinner);}};ccms.widgets.Pager.install=function(root_element){ccms.ApiLinks.findWithRel(/^ccms-widgets-pager-/).foreach(function(api){var id=api.rel.substring(19);if(!ccms.widgets.get(id)){var el=$(id);if(el){ccms.widgets.add(new ccms.widgets.Pager(el,api),id);}}});};ccms.widgets.addInstaller('ccms.widgets.Pager',ccms.widgets.Pager.install);ccms.namespace('ccms.browser');var BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS";},searchString:function(data){for(var i=0;i<data.length;i++){var dataString=data[i].string;var dataProp=data[i].prop;this.versionSearchString=data[i].versionSearch||data[i].identity;if(dataString){if(dataString.indexOf(data[i].subString)!=-1)
return data[i].identity;}
else if(dataProp)
return data[i].identity;}},searchVersion:function(dataString){var index=dataString.indexOf(this.versionSearchString);if(index==-1)return;return parseFloat(dataString.substring(index+this.versionSearchString.length+1));},dataBrowser:[{string:navigator.vendor,subString:"Apple",identity:"Safari"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};BrowserDetect.init();var FlashDetect=new function(){var self=this;self.installed=false;self.major=-1;self.minor=-1;self.revision=-1;self.revisionStr="";self.activeXVersion="";var activeXDetectRules=[{"name":"ShockwaveFlash.ShockwaveFlash.7","version":function(obj){return getActiveXVersion(obj);}},{"name":"ShockwaveFlash.ShockwaveFlash.6","version":function(obj){var version="6,0,21";try{obj.AllowScriptAccess="always";version=getActiveXVersion(obj);}catch(err){}
return version;}},{"name":"ShockwaveFlash.ShockwaveFlash","version":function(obj){return getActiveXVersion(obj);}}];var getActiveXVersion=function(activeXObj){var version=-1;try{version=activeXObj.GetVariable("$version");}catch(err){}
return version;};var getActiveXObject=function(name){var obj=-1;try{obj=new ActiveXObject(name);}catch(err){}
return obj;};var parseActiveXVersion=function(str){var versionArray=str.split(",");return{"major":parseInt(versionArray[0].split(" ")[1],10),"minor":parseInt(versionArray[1],10),"revision":parseInt(versionArray[2],10),"revisionStr":versionArray[2]};};var parseRevisionStrToInt=function(str){return parseInt(str.replace(/[a-zA-Z]/g,""),10)||self.revision;};self.majorAtLeast=function(version){return self.major>=version;};self.FlashDetect=function(){if(navigator.plugins&&navigator.plugins.length>0){var type='application/x-shockwave-flash';var mimeTypes=navigator.mimeTypes;if(mimeTypes&&mimeTypes[type]&&mimeTypes[type].enabledPlugin&&mimeTypes[type].enabledPlugin.description){var desc=mimeTypes[type].enabledPlugin.description;var descParts=desc.split(' ');var majorMinor=descParts[2].split('.');self.major=parseInt(majorMinor[0],10);self.minor=parseInt(majorMinor[1],10);self.revisionStr=descParts[3];self.revision=parseRevisionStrToInt(self.revisionStr);self.installed=true;}}else if(navigator.appVersion.indexOf("Mac")==-1&&window.execScript){var version=-1;for(var i=0;i<activeXDetectRules.length&&version==-1;i++){var obj=getActiveXObject(activeXDetectRules[i].name);if(typeof obj=="object"){self.installed=true;version=activeXDetectRules[i].version(obj);if(version!=-1){var versionObj=parseActiveXVersion(version);self.major=versionObj.major;self.minor=versionObj.minor;self.revision=versionObj.revision;self.revisionStr=versionObj.revisionStr;self.activeXVersion=version;}}}}}();};FlashDetect.release="1.0.2";ccms.browser.getWMPVersion=function(){var player=null;try{if(window.ActiveXObject){player=new ActiveXObject("WMPlayer.OCX");}
else if(window.GeckoActiveXObject){player=GeckoActiveXObject("WMPlayer.OCX");}}
catch(e){if(typeof console!='undefined'&&typeof console.log!='undefined')
console.log(e);}
if(player){var WMPVer=player.versionInfo;var WMPMinor=parseFloat(WMPVer);var WMPMajor=parseInt(WMPMinor,10)
if(WMPMinor>=9)
return WMPMinor;}
return 0;}
window.quicktimeVersion=0;var quicktimeVersion_DONTKNOW=-1;ccms.browser.getQuicktimeVersion=function(){var agent=navigator.userAgent.toLowerCase();if(navigator.plugins&&navigator.plugins.length>0){for(i=0;i<navigator.plugins.length;i++){var plugin=navigator.plugins[i];if(plugin.name.indexOf("QuickTime")>-1){var v=parseFloat(plugin.name.substring(18));if(!isNaN(v))
window.quicktimeVersion=v;}}}
else{qtObj=false;execScript('on error resume next: qtObj = IsObject(CreateObject("QuickTimeCheckObject.QuickTimeCheck"))','VBScript');if(qtObj){window.quicktimeVersion=6;try{if(window.ActiveXObject){qtObj2=new ActiveXObject("QuickTimeCheckObject.QuickTimeCheck");execScript('window.quicktimeVersion = CInt(Hex(qtObj2.QuickTimeVersion) / 1000000)','VBScript');}}
catch(e){;}}}
return window.quicktimeVersion;}
ccms.browser.hasFlip4Mac=function(){if(navigator.plugins&&navigator.plugins.length>0){for(i=0;i<navigator.plugins.length;i++){var plugin=navigator.plugins[i];if(plugin.name.indexOf("Flip4Mac")>-1){return true;}}}
return false;}
ccms.browser.getWindowSize=function(){if(document&&document.body)
return{'clientWidth':document.body.clientWidth,'clientHeight':document.body.clientHeight};else
return null;}
ccms.browser.getCapabilities=function(){var caps={'browser':BrowserDetect.browser,'version':BrowserDetect.version,'os':BrowserDetect.OS,'wm':ccms.browser.getWMPVersion(),'qt':0,'java':navigator.javaEnabled(),'flash':FlashDetect.installed?FlashDetect.major:0,'flip4mac':ccms.browser.hasFlip4Mac(),'screen':new ccms.cloneOf(screen),'window':ccms.browser.getWindowSize()};if(caps.os!='Windows'||caps.wm==0){caps.qt=ccms.browser.getQuicktimeVersion();}
caps.ActiveX=false;switch(caps.browser){case'Mozilla':case'Netscape':case'Firefox':for(var i=0;i<navigator.plugins.length;++i){if(navigator.plugins[i].filename.toLowerCase()=='npmozax.dll'){caps.ActiveX=true;break;}}
break;case'Explorer':if(caps.os=='Windows')
caps.ActiveX=true;break;}
return caps;}
JSONstring={compactOutput:false,includeProtos:false,includeFunctions:false,detectCirculars:true,restoreCirculars:true,make:function(arg,restore){this.restore=restore;this.mem=[];this.pathMem=[];return this.toJsonStringArray(arg).join('');},toObject:function(x){eval("this.myObj="+x);if(!this.restoreCirculars||!alert){return this.myObj};this.restoreCode=[];this.make(this.myObj,true);var r=this.restoreCode.join(";")+";";eval('r=r.replace(/\\W([0-9]{1,})(\\W)/g,"[$1]$2").replace(/\\.\\;/g,";")');eval(r);return this.myObj},toJsonStringArray:function(arg,out){if(!out){this.path=[]};out=out||[];var u;switch(typeof arg){case'object':this.lastObj=arg;if(this.detectCirculars){var m=this.mem;var n=this.pathMem;for(var i=0;i<m.length;i++){if(arg===m[i]){out.push('"JSONcircRef:'+n[i]+'"');return out}};m.push(arg);n.push(this.path.join("."));};if(arg){if(arg.constructor==Array){out.push('[');for(var i=0;i<arg.length;++i){this.path.push(i);if(i>0)
out.push(',\n');this.toJsonStringArray(arg[i],out);this.path.pop();}
out.push(']');return out;}else if(typeof arg.toString!='undefined'){out.push('{');var first=true;for(var i in arg){if(!this.includeProtos&&arg[i]===arg.constructor.prototype[i]){continue};this.path.push(i);var curr=out.length;if(!first)
out.push(this.compactOutput?',':',\n');this.toJsonStringArray(i,out);out.push(':');this.toJsonStringArray(arg[i],out);if(out[out.length-1]==u)
out.splice(curr,out.length-curr);else
first=false;this.path.pop();}
out.push('}');return out;}
return out;}
out.push('null');return out;case'unknown':case'undefined':case'function':out.push(this.includeFunctions?arg:u);return out;case'string':if(this.restore&&arg.indexOf("JSONcircRef:")==0){this.restoreCode.push('this.myObj.'+this.path.join(".")+"="+arg.split("JSONcircRef:").join("this.myObj."));};out.push('"');var a=['\n','\\n','\r','\\r','"','\\"'];arg+="";for(var i=0;i<6;i+=2){arg=arg.split(a[i]).join(a[i+1])};out.push(arg);out.push('"');return out;default:out.push(String(arg));return out;}}}
ccms.async.when(function(){return(typeof ccms.browser.getCapabilities=='function')&&(typeof JSONstring=='object')},function(){ccms.async.http({url:'/browsercaps',method:'POST',parameters:{'json':JSONstring.make(ccms.browser.getCapabilities())},onSuccess:function(req){},onFailure:function(req){ccms.log.debugging=true;ccms.log.debug('ccmsBrowserCapabilities: '+req.status+' '+req.statusText+"\n"+req.responseText);}});if(!document.body){ccms.async.when(function(){return document.body;},function(){ccms.async.http({url:'/browsercaps',method:'POST',parameters:{'json':JSONstring.make(ccms.browser.getCapabilities())},onSuccess:function(req){},onFailure:function(req){ccms.log.debugging=true;ccms.log.debug('ccmsBrowserCapabilities: '+req.status+' '+req.statusText+"\n"+req.responseText);}});});}});ccms.addScript('http://addmysupport.com/js/3rdparty/yui/yahoo-dom-event/yahoo-dom-event.js?v=1288096241');ccms.addScript('http://addmysupport.com/js/ccms.js?v=1254241699');ccms.addScript('http://addmysupport.com/javascript/ams.js?v=1313057404');ccms.addScript('http://addmysupport.com/js/3rdparty/yui/utilities/utilities.js?v=1288096241');ccms.addScript('http://addmysupport.com/js/3rdparty/yui/container/container.js?v=1288096238');ccms.addScript('http://addmysupport.com/js/3rdparty/yui/dragdrop/dragdrop.js?v=1288096237');ccms.addScript('http://addmysupport.com/js/3rdparty/animator.js?v=1228139033');ccms.addScript('http://addmysupport.com/javascript/lightbox/Lightbox-full.js?v=1251472271');ccms.addScript('http://addmysupport.com/javascript/ams.gallery.js?v=1251375483');ccms.addScript('http://addmysupport.com/js/ccms.widgets.Pager.js?v=1246964892');ccms.addScript('http://addmysupport.com/js/ccmsBrowserCapabilities.js?v=1228139033');ccms.addScript('http://addmysupport.com/js/3rdparty/JSONstring.js?v=1228139033');ccms.addScript('http://addmysupport.com/js/ccmsBrowserCapabilityChecker.js?v=1228139033');
