dom-min.js revision f0d5f1e1311499f42456ae35cadd2f021a09caac
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.item)&&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(G){G.namespace("Selector");var E="compareDocumentPosition",F="ownerDocument",D="yui-tmp-",C=0;var B={_reLead:/^\s*([>+~]|:self)/,_reUnSupported:/!./g,_foundCache:[],_supportsNative:function(){return((G.UA.ie>=8||G.UA.webkit>525)&&document.querySelectorAll);},useNative:true,_toArray:function(I){var J=I,K,H;if(!I.slice){try{J=Array.prototype.slice.call(I);}catch(L){J=[];for(K=0,H=I.length;K<H;++K){J[K]=I[K];}}}return J;},_clearFoundCache:function(){var K=B._foundCache,I,H;for(I=0,H=K.length;I<H;++I){try{delete K[I]._found;}catch(J){K[I].removeAttribute("_found");}}K=[];},_compare:("sourceIndex" in document.documentElement)?function(K,J){var I=K.sourceIndex,H=J.sourceIndex;if(I===H){return 0;}else{if(I>H){return 1;}}return -1;}:(document.documentElement[E]?function(I,H){if(I[E](H)&4){return -1;}else{return 1;}}:function(L,K){var J,H,I;if(L&&K){J=L[F].createRange();J.setStart(L,0);H=K[F].createRange();H.setStart(K,0);I=J.compareBoundaryPoints(Range.START_TO_END,H);}return I;}),_sort:function(H){if(H){H=B._toArray(H);if(H.sort){H.sort(B._compare);}}return H;},_deDupe:function(I){var J=[],H=B._foundCache,K,L;for(K=0,L;L=I[K++];){if(!L._found){J[J.length]=H[H.length]=L;L._found=true;}}B._clearFoundCache();return J;},_prepQuery:function(K,J){var I=J.split(","),L=[],N=true,O=(K&&K.nodeType===9),M,H;if(K){if(!O){K.id=K.id||G.guid();for(M=0,H=I.length;M<H;++M){J="#"+K.id+" "+I[M];L.push({root:K,selector:J});}}else{L.push({root:K,selector:J});}}return L;},_nativeQuery:function(H,O,P){if(B._reUnSupported.test(H)){return G.Selector.query(H,O,P);}var L=P?null:[],M=P?"querySelector":"querySelectorAll",Q,J,I,N;O=O||G.config.doc;if(H){J=B._prepQuery(O,H);L=[];for(I=0,N;N=J[I++];){try{Q=N.root[M](N.selector);if(M==="querySelectorAll"){Q=B._toArray(Q);}L=L.concat(Q);}catch(K){}}if(J.length>1){L=B._sort(B._deDupe(L));}L=(P)?(L[0]||null):L;}return L;},filter:function(I,H){var J=[],K,L;if(I&&H){for(K=0,L;(L=I[K++]);){if(G.Selector.test(L,H)){J[J.length]=L;}}}else{}return J;},test:function(M,I){var J=false,H=I.split(","),L,K,N;if(M&&M.tagName){if(!M.id){M.id=D+C++;}for(K=0,N;N=H[K++];){N+="#"+M.id;L=G.Selector.query(N,M.ownerDocument,true);J=(L===M);if(J){break;}}}return J;}};if(G.UA.ie&&G.UA.ie<=8){B._reUnSupported=/:(?:nth|not|root|only|checked|first|last|empty)/;}if(B._supportsNative()&&B.useNative){G.Selector.query=G.Selector.query||B._nativeQuery;}G.mix(G.Selector,B,true);})(A);},"@VERSION@",{requires:["dom-base"],skinnable:false});YUI.add("selector-css2",function(C){var N="parentNode",M="tagName",I="attributes",J="combinator",G="pseudos",K="previous",L="previousSibling",E="yui-tmp-",F=0,B=[],H={},D=[],A=C.Selector,O={SORT_RESULTS:true,_children:function(R){var P=R.children||R._children,Q,S;if(!P&&R[M]){P=[];for(Q=0,S;S=R.childNodes[Q++];){if(S.tagName){P[P.length]=S;}}R._children=P;D.push(R);}return P||[];},_regexCache:{},_re:{attr:/(\[.*\])/g,pseudos:/:([\-\w]+(?:\(?:['"]?(.+)['"]?\)))*/i,urls:/^(?:href|src)/},shorthand:{"\\#(-?[_a-z]+[-\\w]*)":"[id=$1]","\\.(-?[_a-z]+[-\\w]*)":"[className~=$1]"},operators:{"":function(Q,P){return C.DOM.getAttribute(Q,P)!=="";},"~=":"(?:^|\\s+){val}(?:\\s+|$)","|=":"^{val}-?"},pseudos:{"first-child":function(P){return C.Selector._children(P[N])[0]===P;}},query:function(P,Q,S){var R=[];if(A.useNative&&A._supportsNative()&&!A._reUnSupported.test(P)){return A._nativeQuery.apply(A,arguments);}if(P){R=A._query.apply(A,arguments);}A._cleanup();return(S)?(R[0]||null):R;},_cleanup:function(){for(var P=0,Q;Q=D[P++];){delete Q._children;}D=[];},_query:function(V,b,d,T){var Y=[],S=V.split(","),P=[],c,a,U,Q,Z,R,W,X;if(S.length>1){for(W=0,X=S.length;W<X;++W){Y=Y.concat(arguments.callee(S[W],b,d,true));}Y=A._deDupe(Y);Y=A.SORT_RESULTS?A._sort(Y):Y;}else{b=b||C.config.doc;a=A._tokenize(V);if(b.tagName){if(!b.id){b.id=C.guid();}V="#"+b.id+" "+V;c=b.ownerDocument;a=A._tokenize(V);}else{c=b;}if(a[0]&&c===b&&(Q=a[0].id)&&c.getElementById(Q)){b=c.getElementById(Q);}U=a[a.length-1];if(U){Q=U.id;Z=U.className;R=U.tagName||"*";if(Q){if(c.getElementById(Q)){P=[c.getElementById(Q)];}}else{if(Z){P=b.getElementsByClassName(Z);}else{if(R){P=b.getElementsByTagName(R||"*");}}}if(P.length){Y=A._filterNodes(P,a,d);}}}return Y;},_filterNodes:function(Z,V,X){var e=0,d,f=V.length,Y=f-1,U=[],b=Z[0],k=b,g=C.Selector.getters,T,c,S,W,P,R="function",a,Q,h;for(e=0;k=b=Z[e++];){Y=f-1;W=null;testLoop:while(k&&k.tagName){S=V[Y];Q=S.tests;d=Q.length;if(d&&!P){while((h=Q[--d])){T=h[1];a=k[h[0]];if(g[h[0]]){a=g[h[0]](k,h[0]);}if((T==="="&&a!==h[2])||(T.test&&!T.test(a))||(T.call&&!T(k,h[0]))){if((k=k[W])){while(k&&(!k.tagName||(S.tagName&&S.tagName!==k.tagName))){k=k[W];}}continue testLoop;}}}Y--;if(!P&&(c=S.combinator)){W=c.axis;k=k[W];while(k&&!k.tagName){k=k[W];}if(c.direct){W=null;}}else{U.push(b);if(X){return U;}break;}}}b=k=null;return U;},_getRegExp:function(R,P){var Q=A._regexCache;P=P||"";if(!Q[R+P]){Q[R+P]=new RegExp(R,P);}return Q[R+P];},combinators:{" ":{axis:"parentNode"},">":{axis:"parentNode",direct:true},"+":{axis:"previousSibling",direct:true}},_parsers:[{name:I,re:/^\[([a-z]+\w*)+([~\|\^\$\*!=]=?)?['"]?([^\]]*?)['"]?\]/i,fn:function(R,S){var Q=R[2]||"",P=C.Selector.operators,T;if((R[1]==="id"&&Q==="=")||(R[1]==="className"&&document.getElementsByClassName&&(Q==="~="||Q==="="))){S.prefilter=R[1];
S[R[1]]=R[3];}if(Q in P){T=P[Q];if(typeof T==="string"){T=C.Selector._getRegExp(T.replace("{val}",R[3]));}R[2]=T;}if(!S.last||S.prefilter!==R[1]){return R.slice(1);}}},{name:M,re:/^((?:-?[_a-z]+[\w-]*)|\*)/i,fn:function(Q,R){var P=Q[1].toUpperCase();R.tagName=P;if(P!=="*"&&(!R.last||R.prefilter)){return[M,"=",P];}if(!R.prefilter){R.prefilter="tagName";}}},{name:J,re:/^\s*([>+~]|\s)\s*/,fn:function(P,Q){}},{name:G,re:/^:([\-\w]+)(?:\(['"]?(.+)['"]?\))*/i,fn:function(P,Q){var R=A[G][P[1]];if(R){return[P[2],R];}}}],_getToken:function(P){return{tagName:null,id:null,className:null,attributes:{},combinator:null,tests:[]};},_tokenize:function(R){R=R||"";R=A._replaceShorthand(C.Lang.trim(R));var Q=A._getToken(),W=R,V=[],X=false,T,U,S,P;outer:do{X=false;for(S=0,P;P=A._parsers[S++];){if((T=P.re.exec(R))){if(P!==J){Q.selector=R;}R=R.replace(T[0],"");if(!R.length){Q.last=true;}if(A._attrFilters[T[1]]){T[1]=A._attrFilters[T[1]];}U=P.fn(T,Q);if(U){Q.tests.push(U);}if(!R.length||P.name===J){V.push(Q);Q=A._getToken(Q);if(P.name===J){Q.combinator=C.Selector.combinators[T[1]];}}X=true;}}}while(X&&R.length);if(!X||R.length){V=[];}return V;},_replaceShorthand:function(Q){var R=A.shorthand,S=Q.match(A._re.attr),V=Q.match(A._re.pseudos),U,T,P;if(V){Q=Q.replace(A._re.pseudos,"REPLACED_PSEUDO");}if(S){Q=Q.replace(A._re.attr,"REPLACED_ATTRIBUTE");}for(U in R){if(R.hasOwnProperty(U)){Q=Q.replace(A._getRegExp(U,"gi"),R[U]);}}if(S){for(T=0,P=S.length;T<P;++T){Q=Q.replace("REPLACED_ATTRIBUTE",S[T]);}}if(V){for(T=0,P=V.length;T<P;++T){Q=Q.replace("REPLACED_PSEUDO",V[T]);}}return Q;},_attrFilters:{"class":"className","for":"htmlFor"},getters:{href:function(Q,P){return C.DOM.getAttribute(Q,P);}}};C.mix(C.Selector,O,true);C.Selector.getters.src=C.Selector.getters.rel=C.Selector.getters.href;},"@VERSION@",{requires:["selector-native"],skinnable:false});YUI.add("selector-css3",function(A){A.Selector._reNth=/^(?:([-]?\d*)(n){1}|(odd|even)$)*([-+]?\d*)$/;A.Selector._getNth=function(C,L,N,G){A.Selector._reNth.test(L);var K=parseInt(RegExp.$1,10),B=RegExp.$2,H=RegExp.$3,I=parseInt(RegExp.$4,10)||0,M=[],E;var J=C.parentNode.children||A.Selector._children(C.parentNode);if(H){K=2;E="+";B="n";I=(H==="odd")?1:0;}else{if(isNaN(K)){K=(B)?1:0;}}if(K===0){if(G){I=J.length-I+1;}if(J[I-1]===C){return true;}else{return false;}}else{if(K<0){G=!!G;K=Math.abs(K);}}if(!G){for(var D=I-1,F=J.length;D<F;D+=K){if(D>=0&&J[D]===C){return true;}}}else{for(var D=J.length-I,F=J.length;D>=0;D-=K){if(D<F&&J[D]===C){return true;}}}return false;};A.mix(A.Selector.pseudos,{"root":function(B){return B===B.ownerDocument.documentElement;},"nth-child":function(B,C){return A.Selector._getNth(B,C);},"nth-last-child":function(B,C){return A.Selector._getNth(B,C,null,true);},"nth-of-type":function(B,C){return A.Selector._getNth(B,C,B.tagName);},"nth-last-of-type":function(B){return A.Selector._getNth(B,expr,B.tagName,true);},"last-child":function(C){var B=C.parentNode.children||A.Selector._children(C.parentNode);return B[B.length-1]===C;},"first-of-type":function(B){return A.DOM._childrenByTag(B.parentNode,B.tagName)[0];},"last-of-type":function(C){var B=A.DOM._childrenByTag(C.parentNode,C.tagName);return B[B.length-1];},"only-child":function(C){var B=C.parentNode.children||A.Selector._children(C.parentNode);return B.length===1&&B[0]===C;},"only-of-type":function(B){return A.DOM._childrenByTag(B.parentNode,B.tagName).length===1;},"empty":function(B){return B.childNodes.length===0;},"not":function(B,C){return !A.Selector.test(B,C);},"contains":function(B,C){var D=B.innerText||B.textContent||"";return D.indexOf(C)>-1;},"checked":function(B){return B.checked===true;}});A.mix(A.Selector.operators,{"^=":"^{val}","$=":"{val}$","*=":"{val}"});A.Selector.combinators["~"]={axis:"previousSibling"};},"@VERSION@",{requires:["dom-base","selector-native","selector-css2"],skinnable:false});YUI.add("dom",function(A){},"@VERSION@",{skinnable:false,use:["dom-base","dom-style","dom-screen","selector-native","selector-css2"]});