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