dom-min.js revision 8b86a0d734324d75110ac5d262f6d06d48baf899
YUI.add("dom-base",function(D){var I="nodeType",N="ownerDocument",R="documentElement",C="defaultView",H="parentWindow",L="tagName",E="parentNode",B="firstChild",Q="lastChild",M="previousSibling",S="nextSibling",F="contains",J="compareDocumentPosition",O="innerText",P="textContent",K="length",T=undefined,G=/<([a-z]+)/i;D.DOM={byId:function(V,U){U=U||D.config.doc;return U.getElementById(V);},getText:function(U){var V=U?U[P]:"";if(V===T&&O in U){V=U[O];}return V||"";},firstChild:function(U,V){return D.DOM._childBy(U,null,V);},firstChildByTag:function(V,U,W){return D.DOM._childBy(V,U,W);},lastChild:function(U,V){return D.DOM._childBy(U,null,V,true);},lastChildByTag:function(V,U,W){return D.DOM._childBy(V,U,W,true);},_childrenByTag:function(){if(document[R].children){return function(X,V,Y,W){V=(V&&V!=="*")?V.toUpperCase():null;var Z=[],U=Y;if(X){if(V&&!D.UA.webkit){Z=X.children.tags(V);}else{Z=X.children;if(V){U=function(a){return a[L].toUpperCase()===V&&(!Y||Y(a));};}}Z=D.DOM.filterElementsBy(Z,U);}return Z;};}else{return function(W,V,X){V=(V&&V!=="*")?V.toUpperCase():null;var Y=[],U=X;if(W){Y=W.childNodes;if(V){U=function(Z){return Z[L].toUpperCase()===V&&(!X||X(Z));};}Y=D.DOM.filterElementsBy(Y,U);}return Y;};}}(),children:function(U,V){return D.DOM._childrenByTag(U,null,V);},previous:function(U,W,V){return D.DOM.elementByAxis(U,M,W,V);},next:function(U,W,V){return D.DOM.elementByAxis(U,S,W,V);},ancestor:function(U,W,V){return D.DOM.elementByAxis(U,E,W,V);},elementByAxis:function(U,X,W,V){while(U&&(U=U[X])){if((V||U[L])&&(!W||W(U))){return U;}}return null;},byTag:function(V,W,Z){W=W||D.config.doc;var a=W.getElementsByTagName(V),Y=[];for(var X=0,U=a[K];X<U;++X){if(!Z||Z(a[X])){Y[Y[K]]=a[X];}}return Y;},firstByTag:function(V,W,Z){W=W||D.config.doc;var a=W.getElementsByTagName(V),X=null;for(var Y=0,U=a[K];Y<U;++Y){if(!Z||Z(a[Y])){X=a[Y];break;}}return X;},filterElementsBy:function(Z,Y,X){var V=(X)?null:[];for(var W=0,U=Z[K];W<U;++W){if(Z[W][L]&&(!Y||Y(Z[W]))){if(X){V=Z[W];break;}else{V[V[K]]=Z[W];}}}return V;},contains:function(V,W){var U=false;if(!W||!V||!W[I]||!V[I]){U=false;}else{if(V[F]){if(D.UA.opera||W[I]===1){U=V[F](W);}else{U=D.DOM._bruteContains(V,W);}}else{if(V[J]){if(V===W||!!(V[J](W)&16)){U=true;}}}}return U;},inDoc:function(U,V){V=V||D.config.doc;return D.DOM.contains(V.documentElement,U);},insertBefore:function(V,U){if(!V||!U||!U[E]){YAHOO.log("insertAfter failed: missing or invalid arg(s)","error","DOM");return null;}return U[E].insertBefore(V,U);},insertAfter:function(V,U){if(!V||!U||!U[E]){YAHOO.log("insertAfter failed: missing or invalid arg(s)","error","DOM");return null;}if(U[S]){return U[E].insertBefore(V,U[S]);}else{return U[E].appendChild(V);}},create:function(X,b,a){b=b||D.config.doc;var V=G.exec(X),W=D.DOM._create,Z=D.DOM.creators,U,Y;if(V&&Z[V[1]]){if(typeof Z[V[1]]==="function"){W=Z[V[1]];}else{U=Z[V[1]];}}Y=W(X,b,U);return Y;},CUSTOM_ATTRIBUTES:(!document.documentElement.hasAttribute)?{"for":"htmlFor","class":"className"}:{"htmlFor":"for","className":"class"},setAttribute:function(V,U,W){if(V&&V.setAttribute){U=D.DOM.CUSTOM_ATTRIBUTES[U]||U;V.setAttribute(U,W);}},getAttribute:function(W,U){var V="";if(W&&W.getAttribute){U=D.DOM.CUSTOM_ATTRIBUTES[U]||U;if(U==="value"&&!document.documentElement.hasAttribute){V=W.getAttributeNode(U);V=V?V.value:"";}else{V=W.getAttribute(U,2);}if(V===null){V="";}}return V;},srcIndex:(document.documentElement.sourceIndex)?function(U){return(U&&U.sourceIndex)?U.sourceIndex:null;}:function(U){return(U&&U[N])?[].indexOf.call(U[N].getElementsByTagName("*"),U):null;},isWindow:function(U){return U.alert&&U.document;},_create:function(V,W,U){U=U||"div";var X=W.createElement(U);X.innerHTML=D.Lang.trim(V);return X.removeChild(X[B]);},insertHTML:function(Y,X,V,Z){var U,W=D.DOM.create(X);switch(V){case"innerHTML":Y.innerHTML=X;W=Y;break;case"beforeBegin":D.DOM.insertBefore(W,Y);break;case"afterBegin":D.DOM.insertBefore(W,Y[B]);break;case"afterEnd":D.DOM.insertAfter(W,Y);break;default:Y.appendChild(W);}if(Z){if(W.nodeName.toUpperCase()==="SCRIPT"&&!D.UA.gecko){U=[W];}else{U=W.getElementsByTagName("script");}D.DOM._execScripts(U);}else{D.DOM._stripScripts(W);}return W;},_stripScripts:function(X){var U=X.getElementsByTagName("script");for(var W=0,V;V=U[W++];){V.parentNode.removeChild(V);}},_execScripts:function(U,Y){var W;Y=Y||0;for(var X=Y,V;V=U[X++];){W=V.ownerDocument.createElement("script");V.parentNode.replaceChild(W,V);if(V.text){W.text=V.text;}else{if(V.src){W.src=V.src;if(typeof W.onreadystatechange!=="undefined"){W.onreadystatechange=function(){if(/loaded|complete/.test(V.readyState)){event.srcElement.onreadystatechange=null;setTimeout(function(){D.DOM._execScripts(U,X++);},0);}};}else{W.onload=function(Z){Z.target.onload=null;D.DOM._execScripts(U,X++);};}return;}}}},_bruteContains:function(U,V){while(V){if(U===V){return true;}V=V.parentNode;}return false;},_getRegExp:function(V,U){U=U||"";D.DOM._regexCache=D.DOM._regexCache||{};if(!D.DOM._regexCache[V+U]){D.DOM._regexCache[V+U]=new RegExp(V,U);}return D.DOM._regexCache[V+U];},_getDoc:function(U){U=U||{};return(U[I]===9)?U:U[N]||U.document||D.config.doc;},_getWin:function(U){var V=D.DOM._getDoc(U);return V[C]||V[H]||D.config.win;},_childBy:function(Y,U,a,W){var X=null,V,Z;if(Y){if(W){V=Y[Q];Z=M;}else{V=Y[B];Z=S;}if(D.DOM._testElement(V,U,a)){X=V;}else{X=D.DOM.elementByAxis(V,Z,a);}}return X;},_testElement:function(V,U,W){U=(U&&U!=="*")?U.toUpperCase():null;return(V&&V[L]&&(!U||V[L].toUpperCase()===U)&&(!W||W(V)));},creators:{},_IESimpleCreate:function(U,V){V=V||D.config.doc;return V.createElement(U);}};(function(){var Y=D.DOM.creators,U=D.DOM.create,X=/(?:\/(?:thead|tfoot|tbody|caption|col|colgroup)>)+\s*<tbody/,W="<table>",V="</table>";if(D.UA.gecko||D.UA.ie){D.mix(Y,{option:function(Z,a){var b=U("<select>"+Z+"</select>");return b[B];},tr:function(Z,a){var b=Y.tbody("<tbody>"+Z+"</tbody>",a);return b[B];},td:function(Z,a){var b=Y.tr("<tr>"+Z+"</tr>",a);return b[B];},tbody:function(Z,a){var b=U(W+Z+V,a);
return b[B];},legend:"fieldset"});Y.col=Y.tbody;}if(D.UA.ie){Y.col=Y.link=D.DOM._IESimpleCreate;D.mix(Y,{tbody:function(a,b){var c=U(W+a+V,b),Z=c.children.tags("tbody")[0];if(c.children[K]>1&&Z&&!X.test(a)){Z[E].removeChild(Z);}return c;},script:function(Z,a){var b=a.createElement("div");b.innerHTML="-"+Z;return b.removeChild(b[B][S]);}});}if(D.UA.gecko||D.UA.ie){D.mix(Y,{th:Y.td,thead:Y.tbody,tfoot:Y.tbody,caption:Y.tbody,colgroup:Y.tbody,col:Y.tbody,optgroup:Y.option});}})();var A="className";D.mix(D.DOM,{hasClass:function(W,V){var U=D.DOM._getRegExp("(?:^|\\s+)"+V+"(?:\\s+|$)");return U.test(W[A]);},addClass:function(V,U){if(!D.DOM.hasClass(V,U)){V[A]=D.Lang.trim([V[A],U].join(" "));}},removeClass:function(V,U){if(U&&D.DOM.hasClass(V,U)){V[A]=D.Lang.trim(V[A].replace(D.DOM._getRegExp("(?:^|\\s+)"+U+"(?:\\s+|$)")," "));if(D.DOM.hasClass(V,U)){D.DOM.removeClass(V,U);}}},replaceClass:function(V,U,W){D.DOM.addClass(V,W);D.DOM.removeClass(V,U);},toggleClass:function(V,U){if(D.DOM.hasClass(V,U)){D.DOM.removeClass(V,U);}else{D.DOM.addClass(V,U);}}});},"@VERSION@",{requires:["event"],skinnable:false});YUI.add("dom-style",function(B){var i="documentElement",X="defaultView",N="ownerDocument",k="style",f="float",C="cssFloat",R="styleFloat",S="transparent",m="visible",G="width",Z="height",J="borderTopWidth",d="borderRightWidth",D="borderBottomWidth",c="borderLeftWidth",l="getComputedStyle",F=B.config.doc,a=undefined,b=/color$/i;B.mix(B.DOM,{CUSTOM_STYLES:{},setStyle:function(p,Y,q,e){e=p[k],CUSTOM_STYLES=B.DOM.CUSTOM_STYLES;if(e){if(q===null){q="";}if(Y in CUSTOM_STYLES){if(CUSTOM_STYLES[Y].set){CUSTOM_STYLES[Y].set(p,q,e);return;}else{if(typeof CUSTOM_STYLES[Y]==="string"){Y=CUSTOM_STYLES[Y];}}}e[Y]=q;}},getStyle:function(q,Y){var p=q[k],e=B.DOM.CUSTOM_STYLES,r="";if(p){if(Y in e){if(e[Y].get){return e[Y].get(q,Y,p);}else{if(typeof e[Y]==="string"){Y=e[Y];}}}r=p[Y];if(r===""){r=B.DOM[l](q,Y);}}return r;},setStyles:function(Y,e){B.each(e,function(p,q){B.DOM.setStyle(Y,q,p);},B.DOM);},getComputedStyle:function(e,Y){var q="",p=e[N];if(e[k]){q=p[X][l](e,"")[Y];}return q;}});if(F[i][k][C]!==a){B.DOM.CUSTOM_STYLES[f]=C;}else{if(F[i][k][R]!==a){B.DOM.CUSTOM_STYLES[f]=R;}}if(B.UA.opera){B.DOM[l]=function(p,e){var Y=p[N][X],q=Y[l](p,"")[e];if(b.test(e)){q=B.Color.toRGB(q);}return q;};}if(B.UA.webkit){B.DOM[l]=function(p,e){var Y=p[N][X],q=Y[l](p,"")[e];if(q==="rgba(0, 0, 0, 0)"){q=S;}return q;};}var A="toString",Q=parseInt,P=RegExp;B.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(Y){if(!B.Color.re_RGB.test(Y)){Y=B.Color.toHex(Y);}if(B.Color.re_hex.exec(Y)){Y="rgb("+[Q(P.$1,16),Q(P.$2,16),Q(P.$3,16)].join(", ")+")";}return Y;},toHex:function(q){q=B.Color.KEYWORDS[q]||q;if(B.Color.re_RGB.exec(q)){var p=(P.$1.length===1)?"0"+P.$1:Number(P.$1),e=(P.$2.length===1)?"0"+P.$2:Number(P.$2),Y=(P.$3.length===1)?"0"+P.$3:Number(P.$3);q=[p[A](16),e[A](16),Y[A](16)].join("");}if(q.length<6){q=q.replace(B.Color.re_hex3,"$1$1");}if(q!=="transparent"&&q.indexOf("#")<0){q="#"+q;}return q.toLowerCase();}};var E="clientTop",T="clientLeft",L="parentNode",h="right",U="hasLayout",n="px",I="filter",g="filters",O="opacity",W="auto",M="currentStyle";if(document[i][k][O]===a&&document[i][g]){B.DOM.CUSTOM_STYLES[O]={get:function(p){var r=100;try{r=p[g]["DXImageTransform.Microsoft.Alpha"][O];}catch(q){try{r=p[g]("alpha")[O];}catch(Y){}}return r/100;},set:function(e,q,Y){var p;if(q===""){p=e.currentStyle.opacity;q=p;if(q===undefined){q=1;}}if(typeof Y[I]=="string"){Y[I]="alpha("+O+"="+q*100+")";if(!e[M]||!e[M][U]){Y.zoom=1;}}}};}try{document.createElement("div").style.height="-1px";}catch(j){B.DOM.CUSTOM_STYLES.height={set:function(e,p,Y){if(parseInt(p,10)>=0){Y["height"]=p;}else{}}};B.DOM.CUSTOM_STYLES.width={set:function(e,p,Y){if(parseInt(p,10)>=0){Y["width"]=p;}else{}}};}var V=/^width|height$/,H=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i;var o={CUSTOM_STYLES:{},get:function(Y,p){var e="",q=Y[M][p];if(p===O){e=B.DOM.CUSTOM_STYLES[O].get(Y);}else{if(!q||(q.indexOf&&q.indexOf(n)>-1)){e=q;}else{if(B.DOM.IE.COMPUTED[p]){e=B.DOM.IE.COMPUTED[p](Y,p);}else{if(H.test(q)){e=o.getPixel(Y,p)+n;}else{e=q;}}}}return e;},getOffset:function(p,u){var r=p[M][u],Y=u.charAt(0).toUpperCase()+u.substr(1),s="offset"+Y,e="pixel"+Y,q="";if(r===W){var t=p[s];if(t===a){q=0;}q=t;if(V.test(u)){p[k][u]=t;if(p[s]>t){q=t-(p[s]-t);}p[k][u]=W;}}else{if(r.indexOf("%")>-1){r=p.clientWidth-o.getPixel(p,"paddingRight")-o.getPixel(p,"paddingLeft");}if(!p[k][e]&&!p[k][u]){p[k][u]=r;}q=p[k][e];}return q+n;},getBorderWidth:function(Y,p){var e=null;if(!Y[M][U]){Y[k].zoom=1;}switch(p){case J:e=Y[E];break;case D:e=Y.offsetHeight-Y.clientHeight-Y[E];break;case c:e=Y[T];break;case d:e=Y.offsetWidth-Y.clientWidth-Y[T];break;}return e+n;},getPixel:function(e,Y){var q=null,r=e[M][h],p=e[M][Y];e[k][h]=p;q=e[k].pixelRight;e[k][h]=r;return q;},getMargin:function(e,Y){var p;if(e[M][Y]==W){p=0;}else{p=o.getPixel(e,Y);}return p+n;},getVisibility:function(e,Y){var p;while((p=e[M])&&p[Y]=="inherit"){e=e[L];}return(p)?p[Y]:m;},getColor:function(e,Y){var p=e[M][Y];if(!p||p===S){B.DOM.elementByAxis(e,L,null,function(q){p=q[M][Y];if(p&&p!==S){e=q;return true;}});}return B.Color.toRGB(p);},getBorderColor:function(e,Y){var p=e[M];var q=p[Y]||p.color;return B.Color.toRGB(B.Color.toHex(q));}};var K={};K[G]=K[Z]=o.getOffset;K.color=K.backgroundColor=o.getColor;K[J]=K[d]=K[D]=K[c]=o.getBorderWidth;K.marginTop=K.marginRight=K.marginBottom=K.marginLeft=o.getMargin;K.visibility=o.getVisibility;K.borderColor=K.borderTopColor=K.borderRightColor=K.borderBottomColor=K.borderLeftColor=o.getBorderColor;if(!B.config.win[l]){B.DOM[l]=o.get;
}B.namespace("DOM.IE");B.DOM.IE.COMPUTED=K;B.DOM.IE.ComputedStyle=o;},"@VERSION@",{requires:["dom-base"],skinnable:false});YUI.add("dom-screen",function(E){var N="offsetTop",W="documentElement",M="compatMode",D="offsetLeft",a="offsetParent",P="position",U="fixed",c="relative",O="left",S="top",b="scrollLeft",X="scrollTop",Z="BackCompat",R="medium",Q="height",H="width",F="borderLeftWidth",G="borderTopWidth",C="getBoundingClientRect",B="getComputedStyle",d=/^t(?:able|d|h)$/i;E.mix(E.DOM,{winHeight:function(e){var Y=E.DOM._getWinSize(e)[Q];return Y;},winWidth:function(e){var Y=E.DOM._getWinSize(e)[H];return Y;},docHeight:function(e){var Y=E.DOM._getDocSize(e)[Q];return Math.max(Y,E.DOM._getWinSize(e)[Q]);},docWidth:function(e){var Y=E.DOM._getDocSize(e)[H];return Math.max(Y,E.DOM._getWinSize(e)[H]);},docScrollX:function(Y){var e=E.DOM._getDoc(Y);return Math.max(e[W][b],e.body[b]);},docScrollY:function(Y){var e=E.DOM._getDoc(Y);return Math.max(e[W][X],e.body[X]);},getXY:function(){if(document[W][C]){return function(g){if(!g){return false;}var h=E.DOM.docScrollX(g),e=E.DOM.docScrollY(g),i=g[C](),m=E.DOM._getDoc(g),n=[Math.floor(i[O]),Math.floor(i[S])];if(E.UA.ie){var l=2,k=2,j=m[M],Y=E.DOM[B](m[W],F),f=E.DOM[B](m[W],G);if(E.UA.ie===6){if(j!==Z){l=0;k=0;}}if((j==Z)){if(Y!==R){l=parseInt(Y,10);}if(f!==R){k=parseInt(f,10);}}n[0]-=l;n[1]-=k;}if((e||h)){n[0]+=h;n[1]+=e;}n[0]=Math.floor(n[0]);n[1]=Math.floor(n[1]);return n;};}else{return function(e){var g=[e[D],e[N]],Y=e,i=((E.UA.gecko||E.UA.webkit>519)?true:false);while((Y=Y[a])){g[0]+=Y[D];g[1]+=Y[N];if(i){g=E.DOM._calcBorders(Y,g);}}if(E.DOM.getStyle(e,P)!=U){Y=e;var f,h;while((Y=Y.parentNode)){f=Y[X];h=Y[b];if(E.UA.gecko&&(E.DOM.getStyle(Y,"overflow")!=="visible")){g=E.DOM._calcBorders(Y,g);}if(f||h){g[0]-=h;g[1]-=f;}}g[0]+=E.DOM.docScrollX(e);g[1]+=E.DOM.docScrollY(e);}else{if(E.UA.opera){g[0]-=E.DOM.docScrollX(e);g[1]-=E.DOM.docScrollY(e);}else{if(E.UA.webkit||E.UA.gecko){g[0]+=E.DOM.docScrollX(e);g[1]+=E.DOM.docScrollY(e);}}}g[0]=Math.floor(g[0]);g[1]=Math.floor(g[1]);return g;};}}(),getX:function(Y){return E.DOM.getXY(Y)[0];},getY:function(Y){return E.DOM.getXY(Y)[1];},setXY:function(e,h,k){var j=E.DOM.getStyle(e,P),f=E.DOM.setStyle,i=[parseInt(E.DOM[B](e,O),10),parseInt(E.DOM[B](e,S),10)];if(j=="static"){j=c;f(e,P,j);}var g=E.DOM.getXY(e);if(g===false){return false;}if(isNaN(i[0])){i[0]=(j==c)?0:e[D];}if(isNaN(i[1])){i[1]=(j==c)?0:e[N];}if(h[0]!==null){f(e,O,h[0]-g[0]+i[0]+"px");}if(h[1]!==null){f(e,S,h[1]-g[1]+i[1]+"px");}if(!k){var Y=E.DOM.getXY(e);if((h[0]!==null&&Y[0]!=h[0])||(h[1]!==null&&Y[1]!=h[1])){E.DOM.setXY(e,h,true);}}},setX:function(e,Y){return E.DOM.setXY(e,[Y,null]);},setY:function(Y,e){return E.DOM.setXY(Y,[null,e]);},_calcBorders:function(f,g){var e=parseInt(E.DOM[B](f,G),10)||0,Y=parseInt(E.DOM[B](f,F),10)||0;if(E.UA.gecko){if(d.test(f.tagName)){e=0;Y=0;}}g[0]+=Y;g[1]+=e;return g;},_getWinSize:function(g){var j=E.DOM._getDoc(),i=j.defaultView||j.parentWindow,k=j[M],f=i.innerHeight,e=i.innerWidth,Y=j[W];if(k&&!E.UA.opera){if(k!="CSS1Compat"){Y=j.body;}f=Y.clientHeight;e=Y.clientWidth;}return{height:f,width:e};},_getDocSize:function(e){var f=E.DOM._getDoc(),Y=f[W];if(f[M]!="CSS1Compat"){Y=f.body;}return{height:Y.scrollHeight,width:Y.scrollWidth};}});var J="offsetWidth",A="offsetHeight",S="top",K="right",I="bottom",O="left",T="tagName";var L=function(g,f){var i=Math.max(g[S],f[S]),j=Math.min(g[K],f[K]),Y=Math.min(g[I],f[I]),e=Math.max(g[O],f[O]),h={};h[S]=i;h[K]=j;h[I]=Y;h[O]=e;return h;};var V=V||E.DOM;E.mix(V,{region:function(f){var Y=V.getXY(f),e=false;if(Y){e={"0":Y[0],"1":Y[1],top:Y[1],right:Y[0]+f[J],bottom:Y[1]+f[A],left:Y[0],height:f[A],width:f[J]};}return e;},intersect:function(f,Y,h){var e=h||V.region(f),g={};var j=Y;if(j[T]){g=V.region(j);}else{if(E.Lang.isObject(Y)){g=Y;}else{return false;}}var i=L(g,e);return{top:i[S],right:i[K],bottom:i[I],left:i[O],area:((i[I]-i[S])*(i[K]-i[O])),yoff:((i[I]-i[S])),xoff:(i[K]-i[O]),inRegion:V.inRegion(f,Y,false,h)};},inRegion:function(g,Y,e,i){var h={},f=i||V.region(g);var k=Y;if(k[T]){h=V.region(k);}else{if(E.Lang.isObject(Y)){h=Y;}else{return false;}}if(e){return(f[O]>=h[O]&&f[K]<=h[K]&&f[S]>=h[S]&&f[I]<=h[I]);}else{var j=L(h,f);if(j[I]>=j[S]&&j[K]>=j[O]){return true;}else{return false;}}},inViewportRegion:function(e,Y,f){return V.inRegion(e,V.viewportRegion(e),Y,f);},viewportRegion:function(e){e=e||E.config.doc.documentElement;var Y={};Y[S]=V.docScrollY(e);Y[K]=V.winWidth(e)+V.docScrollX(e);Y[I]=(V.docScrollY(e)+V.winHeight(e));Y[O]=V.docScrollX(e);return Y;}});},"@VERSION@",{requires:["dom-base","dom-style"],skinnable:false});YUI.add("selector",function(C){C.namespace("Selector");var L="parentNode",D="length",I={_reLead:/^\s*([>+~]|:self)/,_reUnSupported:/!./,_foundCache:[],_supportsNative:function(){return((C.UA.ie>=8||C.UA.webkit>525)&&document.querySelectorAll);},_toArray:function(O){var P=O;if(!O.slice){try{P=Array.prototype.slice.call(O);}catch(R){P=[];for(var Q=0,N=O[D];Q<N;++Q){P[Q]=O[Q];}}}return P;},_clearFoundCache:function(){var Q=I._foundCache;for(var O=0,N=Q[D];O<N;++O){try{delete Q[O]._found;}catch(P){Q[O].removeAttribute("_found");}}Q=[];},_sort:function(N){if(N){N=I._toArray(N);if(N.sort){N.sort(function(P,O){return C.DOM.srcIndex(P)-C.DOM.srcIndex(O);});}}return N;},_deDupe:function(O){var P=[],N=I._foundCache;for(var Q=0,R;R=O[Q++];){if(!R._found){P[P[D]]=N[N[D]]=R;R._found=true;}}I._clearFoundCache();return P;},_prepQuery:function(Q,P){var O=P.split(","),R=[],T=(Q&&Q.nodeType===9);if(Q){if(!T){Q.id=Q.id||C.guid();for(var S=0,N=O[D];S<N;++S){P="#"+Q.id+" "+O[S];R.push({root:Q.ownerDocument,selector:P});}}else{R.push({root:Q,selector:P});}}return R;},_query:function(N,U,V){if(I._reUnSupported.test(N)){return C.Selector._brute.query(N,U,V);}var R=V?null:[],S=V?"querySelector":"querySelectorAll",W,P;U=U||C.config.doc;if(N){P=I._prepQuery(U,N);R=[];for(var O=0,T;T=P[O++];){try{W=T.root[S](T.selector);if(S==="querySelectorAll"){W=I._toArray(W);}R=R.concat(W);}catch(Q){}}if(P[D]>1){R=I._sort(I._deDupe(R));
}R=(!V)?R:R[0]||null;}return R;},_filter:function(O,N){var P=[];if(O&&N){for(var Q=0,R;(R=O[Q++]);){if(C.Selector._test(R,N)){P[P[D]]=R;}}}else{}return P;},_test:function(S,O){var P=false,N=O.split(","),R;if(S&&S[L]){S.id=S.id||C.guid();S[L].id=S[L].id||C.guid();for(var Q=0,T;T=N[Q++];){T+="#"+S.id;R=C.Selector.query(T,null,true);P=(R===S);if(P){break;}}}return P;}};if(C.UA.ie&&C.UA.ie<=8){I._reUnSupported=/:(?:nth|not|root|only|checked|first|last|empty)/;}C.mix(C.Selector,I,true);if(I._supportsNative()){C.Selector.query=I._query;}C.Selector.test=I._test;C.Selector.filter=I._filter;var L="parentNode",K="tagName",F="attributes",G="combinator",E="pseudos",H="previous",J="previousSibling",D="length",B=[],A=C.Selector,M={SORT_RESULTS:true,_children:function(P){var N=P.children;if(!N&&P[K]){N=[];for(var O=0,Q;Q=P.childNodes[O++];){if(Q.tagName){N[N.length]=Q;}}B[B.length]=P;P.children=N;}return N||[];},_regexCache:{},_re:{attr:/(\[.*\])/g,urls:/^(?:href|src)/},shorthand:{"\\#(-?[_a-z]+[-\\w]*)":"[id=$1]","\\.(-?[_a-z]+[-\\w]*)":"[className~=$1]"},operators:{"":function(O,N){return C.DOM.getAttribute(O,N[0])!=="";},"=":"^{val}$","~=":"(?:^|\\s+){val}(?:\\s+|$)","|=":"^{val}-?"},pseudos:{"first-child":function(N){return C.Selector._children(N[L])[0]===N;}},_brute:{query:function(N,O,Q){var P=[];if(N){P=A._query(N,O,Q);}A._cleanup();return(Q)?(P[0]||null):P;}},some:function(){return(Array.prototype.some)?function(N,P,O){return Array.prototype.some.call(N,P,O);}:function(N,Q,P){for(var O=0,R;R=N[O++];){if(Q.call(P,R,O,N)){return true;}}return false;};}(),_cleanup:function(){for(var N=0,O;O=B[N++];){delete O.children;}B=[];},_query:function(R,W,X,P){var U=[],O=R.split(","),N=[],V,Q;if(O[D]>1){for(var S=0,T=O[D];S<T;++S){U=U.concat(arguments.callee(O[S],W,X,true));}U=A.SORT_RESULTS?A._sort(U):U;A._clearFoundCache();}else{W=W||C.config.doc;if(W.nodeType!==9){if(!W.id){W.id=C.guid();}R="#"+W.id+" "+R;W=W.ownerDocument;}V=A._tokenize(R);Q=V.pop();if(Q){if(P){Q.deDupe=true;}if(V[0]&&V[0].id){W=W.getElementById(V[0].id);}if(W&&!N[D]&&Q.prefilter){N=Q.prefilter(W,Q);}if(N[D]){if(X){A.some(N,A._testToken,Q);}else{C.Array.each(N,A._testToken,Q);}}U=Q.result;}}return U;},_testToken:function(O,S,N,P){var P=P||this,U=P.tag,R=P[H],V=P.result,Q=0,T=R&&R[G]?A.combinators[R[G]]:null;if((U==="*"||U===O[K])&&!(O._found)){while((attr=P.tests[Q])){Q++;test=attr.test;if(test.test){if(!test.test(C.DOM.getAttribute(O,attr.name))){return false;}}else{if(!test(O,attr.match)){return false;}}}if(T&&!T(O,P)){return false;}V[V.length]=O;if(P.deDupe){O._found=true;A._foundCache.push(O);}return true;}return false;},_getRegExp:function(P,N){var O=A._regexCache;N=N||"";if(!O[P+N]){O[P+N]=new RegExp(P,N);}return O[P+N];},combinators:{" ":function(P,N){var Q=A._testToken,O=N[H];while((P=P[L])){if(Q(P,null,null,O)){return true;}}return false;},">":function(O,N){return A._testToken(O[L],null,null,N[H]);},"+":function(P,O){var N=P[J];while(N&&N.nodeType!==1){N=N[J];}if(N&&C.Selector._testToken(N,null,null,O[H])){return true;}return false;}},_parsers:[{name:K,re:/^((?:-?[_a-z]+[\w-]*)|\*)/i,fn:function(O,N){O.tag=N[1].toUpperCase();O.prefilter=function(P){return P.getElementsByTagName(O.tag);};return true;}},{name:F,re:/^\[([a-z]+\w*)+([~\|\^\$\*!=]=?)?['"]?([^\]]*?)['"]?\]/i,fn:function(P,O){var Q=O[3],N=!(O[2]&&Q)?"":O[2],R=A.operators[N];if(typeof R==="string"){R=A._getRegExp(R.replace("{val}",Q));}if(O[1]==="id"&&Q){P.id=Q;P.prefilter=function(S){var U=S.nodeType===9?S:S.ownerDocument,T=U.getElementById(Q);return T?[T]:[];};}else{if(document.documentElement.getElementsByClassName&&O[1].indexOf("class")===0){if(!P.prefilter){P.prefilter=function(S){return S.getElementsByClassName(Q);};R=true;}}}return R;}},{name:G,re:/^\s*([>+~]|\s)\s*/,fn:function(O,N){O[G]=N[1];return !!A.combinators[O[G]];}},{name:E,re:/^:([\-\w]+)(?:\(['"]?(.+)['"]?\))*/i,fn:function(O,N){return A[E][N[1]];}}],_getToken:function(N){return{previous:N,combinator:" ",tag:"*",prefilter:function(O){return O.getElementsByTagName("*");},tests:[],result:[]};},_tokenize:function(P){P=P||"";P=A._replaceShorthand(C.Lang.trim(P));var O=A._getToken(),U=P,T=[],V=false,S,R;outer:do{V=false;for(var Q=0,N;N=A._parsers[Q++];){if((R=N.re.exec(P))){S=N.fn(O,R);if(S){if(S!==true){O.tests.push({name:R[1],test:S,match:R.slice(1)});}V=true;P=P.replace(R[0],"");if(!P[D]||N.name===G){T.push(O);O=A._getToken(O);}}else{V=false;break outer;}}}}while(V&&P.length);if(!V||P.length){T=[];}return T;},_replaceShorthand:function(O){var P=A.shorthand,Q=O.match(A._re.attr);if(Q){O=O.replace(A._re.attr,"REPLACED_ATTRIBUTE");}for(var S in P){if(P.hasOwnProperty(S)){O=O.replace(A._getRegExp(S,"gi"),P[S]);}}if(Q){for(var R=0,N=Q[D];R<N;++R){O=O.replace("REPLACED_ATTRIBUTE",Q[R]);}}return O;}};C.mix(C.Selector,M,true);if(!C.Selector._supportsNative()){C.Selector.query=A._brute.query;}},"@VERSION@",{requires:["dom-base"],skinnable:false});YUI.add("dom",function(A){},"@VERSION@",{use:["dom-base","dom-style","dom-screen","selector"],skinnable:false});