dom-min.js revision b55b141ccc709c4288c8b28cf63eb829101418e3
YUI.add("dom-base",function(C){var H="nodeType",L="ownerDocument",P="documentElement",B="defaultView",G="parentWindow",J="tagName",D="parentNode",A="firstChild",O="lastChild",K="previousSibling",Q="nextSibling",E="contains",I="compareDocumentPosition",M="innerText",N="textContent",R=undefined,F=/<([a-z]+)/i;C.DOM={byId:function(T,S){S=S||C.config.doc;return S.getElementById(T);},getText:function(S){var T=S?S[N]:"";if(T===R&&M in S){T=S[M];}return T||"";},firstChild:function(S,T){return C.DOM._childBy(S,null,T);},firstChildByTag:function(T,S,U){return C.DOM._childBy(T,S,U);},lastChild:function(S,T){return C.DOM._childBy(S,null,T,true);},lastChildByTag:function(T,S,U){return C.DOM._childBy(T,S,U,true);},_childrenByTag:function(){if(document[P].children){return function(V,T,W,U){T=(T&&T!=="*")?T.toUpperCase():null;var X=[],S=W;if(V){if(T&&!C.UA.webkit){X=V.children.tags(T);}else{X=V.children;if(T){S=function(Y){return Y[J].toUpperCase()===T&&(!W||W(Y));};}}X=C.DOM.filterElementsBy(X,S);}return X;};}else{return function(U,T,V){T=(T&&T!=="*")?T.toUpperCase():null;var W=[],S=V;if(U){W=U.childNodes;if(T){S=function(X){return X[J].toUpperCase()===T&&(!V||V(X));};}W=C.DOM.filterElementsBy(W,S);}return W;};}}(),children:function(S,T){return C.DOM._childrenByTag(S,null,T);},previous:function(S,U,T){return C.DOM.elementByAxis(S,K,U,T);},next:function(S,U,T){return C.DOM.elementByAxis(S,Q,U,T);},ancestor:function(S,U,T){return C.DOM.elementByAxis(S,D,U,T);},elementByAxis:function(S,V,U,T){while(S&&(S=S[V])){if((T||S[J])&&(!U||U(S))){return S;}}return null;},byTag:function(T,U,X){U=U||C.config.doc;var Y=U.getElementsByTagName(T),W=[],V,S;for(V=0,S=Y.length;V<S;++V){if(!X||X(Y[V])){W[W.length]=Y[V];}}return W;},firstByTag:function(T,U,X){U=U||C.config.doc;var Y=U.getElementsByTagName(T),V=null,W,S;for(W=0,S=Y.length;W<S;++W){if(!X||X(Y[W])){V=Y[W];break;}}return V;},filterElementsBy:function(X,W,V){var T=(V)?null:[],U,S;for(U=0,S=X.length;U<S;++U){if(X[U][J]&&(!W||W(X[U]))){if(V){T=X[U];break;}else{T[T.length]=X[U];}}}return T;},contains:function(T,U){var S=false;if(!U||!T||!U[H]||!T[H]){S=false;}else{if(T[E]){if(C.UA.opera||U[H]===1){S=T[E](U);}else{S=C.DOM._bruteContains(T,U);}}else{if(T[I]){if(T===U||!!(T[I](U)&16)){S=true;}}}}return S;},inDoc:function(S,T){T=T||S[L];var U=S.id;if(!U){U=S.id=C.guid();}return !!(T.getElementById(U));},insertBefore:function(U,S){var T=null,V;if(U&&S&&(V=S.parentNode)){if(typeof U==="string"){U=C.DOM.create(U);}T=V.insertBefore(U,S);}else{}return T;},insertAfter:function(T,S){if(!T||!S||!S[D]){return null;}if(typeof T==="string"){T=C.DOM.create(T);}if(S[Q]){return S[D].insertBefore(T,S[Q]);}else{return S[D].appendChild(T);}},create:function(X,Z){Z=Z||C.config.doc;var T=F.exec(X),W=C.DOM._create,Y=C.DOM.creators,V=null,S,U;if(T&&Y[T[1]]){if(typeof Y[T[1]]==="function"){W=Y[T[1]];}else{S=Y[T[1]];}}U=W(X,Z,S).childNodes;if(U.length===1){V=U[0].parentNode.removeChild(U[0]);}else{V=Z.createDocumentFragment();while(U.length){V.appendChild(U[0]);}}return V;},CUSTOM_ATTRIBUTES:(!document.documentElement.hasAttribute)?{"for":"htmlFor","class":"className"}:{"htmlFor":"for","className":"class"},setAttribute:function(T,S,U){if(T&&T.setAttribute){S=C.DOM.CUSTOM_ATTRIBUTES[S]||S;T.setAttribute(S,U);}},getAttribute:function(U,S){var T="";if(U&&U.getAttribute){S=C.DOM.CUSTOM_ATTRIBUTES[S]||S;T=U.getAttribute(S,2);if(T===null){T="";}}return T;},srcIndex:(document.documentElement.sourceIndex)?function(S){return(S&&S.sourceIndex)?S.sourceIndex:null;}:function(S){return(S&&S[L])?[].indexOf.call(S[L].getElementsByTagName("*"),S):null;},isWindow:function(S){return S.alert&&S.document;},_fragClones:{div:document.createElement("div")},_create:function(T,U,S){S=S||"div";var V=C.DOM._fragClones[S];if(V){V=V.cloneNode(false);}else{V=C.DOM._fragClones[S]=U.createElement(S);}V.innerHTML=T;return V;},_removeChildNodes:function(S){while(S.firstChild){S.removeChild(S.firstChild);}},addHTML:function(W,V,T,X){var S,U=(V.nodeType)?V:C.DOM.create(V);if(T&&T.nodeType){W.insertBefore(U,T);}else{switch(T){case"replace":while(W.firstChild){W.removeChild(W.firstChild);}W.appendChild(U);break;case"before":W.parentNode.insertBefore(U,W);break;case"after":if(W.nextSibling){W.parentNode.insertBefore(U,W.nextSibling);}else{W.parentNode.appendChild(U);}break;default:W.appendChild(U);}}if(X){if(U.tagName.toUpperCase()==="SCRIPT"&&!C.UA.gecko){S=[U];}else{S=U.getElementsByTagName("script");}C.DOM._execScripts(S);}else{if(V.nodeType||V.indexOf("<script")>-1){C.DOM._stripScripts(U);}}return U;},VALUE_SETTERS:{},VALUE_GETTERS:{},getValue:function(U){var T="",S;if(U&&U[J]){S=C.DOM.VALUE_GETTERS[U[J].toLowerCase()];if(S){T=S(U);}else{T=U.value;}}return(typeof T==="string")?T:"";},setValue:function(S,T){var U;if(S&&S[J]){U=C.DOM.VALUE_SETTERS[S[J].toLowerCase()];if(U){U(S,T);}else{S.value=T;}}},_stripScripts:function(V){var S=V.getElementsByTagName("script"),U,T;for(U=0,T;T=S[U++];){T.parentNode.removeChild(T);}},_execScripts:function(S,W){var U,V,T;W=W||0;for(V=W,T;T=S[V++];){U=T.ownerDocument.createElement("script");T.parentNode.replaceChild(U,T);if(T.text){U.text=T.text;}else{if(T.src){U.src=T.src;if(typeof U.onreadystatechange!=="undefined"){U.onreadystatechange=function(){if(/loaded|complete/.test(T.readyState)){event.srcElement.onreadystatechange=null;setTimeout(function(){C.DOM._execScripts(S,V++);},0);}};}else{U.onload=function(X){X.target.onload=null;C.DOM._execScripts(S,V++);};}return;}}}},_bruteContains:function(S,T){while(T){if(S===T){return true;}T=T.parentNode;}return false;},_getRegExp:function(T,S){S=S||"";C.DOM._regexCache=C.DOM._regexCache||{};if(!C.DOM._regexCache[T+S]){C.DOM._regexCache[T+S]=new RegExp(T,S);}return C.DOM._regexCache[T+S];},_getDoc:function(S){S=S||{};return(S[H]===9)?S:S[L]||S.document||C.config.doc;},_getWin:function(S){var T=C.DOM._getDoc(S);return T[B]||T[G]||C.config.win;},_childBy:function(W,S,Y,U){var V=null,T,X;if(W){if(U){T=W[O];X=K;}else{T=W[A];X=Q;}if(C.DOM._testElement(T,S,Y)){V=T;
}else{V=C.DOM.elementByAxis(T,X,Y);}}return V;},_batch:function(V,Z,Y,U,T,X){Z=(typeof name==="string")?C.DOM[Z]:Z;var S,W=[];if(Z&&V){C.each(V,function(a){if((S=Z.call(C.DOM,a,Y,U,T,X))!==undefined){W[W.length]=S;}});}return W.length?W:V;},_testElement:function(T,S,U){S=(S&&S!=="*")?S.toUpperCase():null;return(T&&T[J]&&(!S||T[J].toUpperCase()===S)&&(!U||U(T)));},creators:{},_IESimpleCreate:function(S,T){T=T||C.config.doc;return T.createElement(S);}};(function(){var W=C.DOM.creators,S=C.DOM.create,V=/(?:\/(?:thead|tfoot|tbody|caption|col|colgroup)>)+\s*<tbody/,U="<table>",T="</table>";if(C.UA.gecko||C.UA.ie){C.mix(W,{option:function(X,Y){return S("<select>"+X+"</select>",Y);},tr:function(X,Y){return S("<tbody>"+X+"</tbody>",Y);},td:function(X,Y){return S("<tr>"+X+"</tr>",Y);},tbody:function(X,Y){return S(U+X+T,Y);},legend:"fieldset"});W.col=W.tbody;}if(C.UA.ie){C.mix(W,{tbody:function(Y,Z){var a=S(U+Y+T,Z),X=a.children.tags("tbody")[0];if(a.children.length>1&&X&&!V.test(Y)){X[D].removeChild(X);}return a;},script:function(X,Y){var Z=Y.createElement("div");Z.innerHTML="-"+X;Z.removeChild(Z[A]);return Z;}},true);C.mix(C.DOM.VALUE_GETTERS,{button:function(X){return(X.attributes&&X.attributes.value)?X.attributes.value.value:"";}});C.mix(C.DOM.VALUE_SETTERS,{button:function(Y,Z){var X=Y.attributes.value;if(!X){X=Y[L].createAttribute("value");Y.setAttributeNode(X);}X.value=Z;}});}if(C.UA.gecko||C.UA.ie){C.mix(W,{th:W.td,thead:W.tbody,tfoot:W.tbody,caption:W.tbody,colgroup:W.tbody,col:W.tbody,optgroup:W.option});}C.mix(C.DOM.VALUE_GETTERS,{option:function(Y){var X=Y.attributes;return(X.value&&X.value.specified)?Y.value:Y.text;},select:function(Y){var Z=Y.value,X=Y.options;if(X&&Z===""){if(Y.multiple){}else{Z=C.DOM.getValue(X[Y.selectedIndex],"value");}}return Z;}});})();C.mix(C.DOM,{hasClass:function(U,T){var S=C.DOM._getRegExp("(?:^|\\s+)"+T+"(?:\\s+|$)");return S.test(U.className);},addClass:function(T,S){if(!C.DOM.hasClass(T,S)){T.className=C.Lang.trim([T.className,S].join(" "));}},removeClass:function(T,S){if(S&&C.DOM.hasClass(T,S)){T.className=C.Lang.trim(T.className.replace(C.DOM._getRegExp("(?:^|\\s+)"+S+"(?:\\s+|$)")," "));if(C.DOM.hasClass(T,S)){C.DOM.removeClass(T,S);}}},replaceClass:function(T,S,U){C.DOM.addClass(T,U);C.DOM.removeClass(T,S);},toggleClass:function(T,S){if(C.DOM.hasClass(T,S)){C.DOM.removeClass(T,S);}else{C.DOM.addClass(T,S);}}});},"@VERSION@",{requires:["event"],skinnable:false});YUI.add("dom-style",function(A){var g="documentElement",V="defaultView",M="ownerDocument",i="style",c="float",B="cssFloat",P="styleFloat",Q="transparent",k="visible",F="width",W="height",I="borderTopWidth",b="borderRightWidth",C="borderBottomWidth",a="borderLeftWidth",j="getComputedStyle",E=A.config.doc,X=undefined,Z=/color$/i;A.mix(A.DOM,{CUSTOM_STYLES:{},setStyle:function(o,Y,p){var n=o[i],e=A.DOM.CUSTOM_STYLES;if(n){if(p===null){p="";}if(Y in e){if(e[Y].set){e[Y].set(o,p,n);return;}else{if(typeof e[Y]==="string"){Y=e[Y];}}}n[Y]=p;}},getStyle:function(o,Y){var n=o[i],e=A.DOM.CUSTOM_STYLES,p="";if(n){if(Y in e){if(e[Y].get){return e[Y].get(o,Y,n);}else{if(typeof e[Y]==="string"){Y=e[Y];}}}p=n[Y];if(p===""){p=A.DOM[j](o,Y);}}return p;},setStyles:function(Y,e){A.each(e,function(o,p){A.DOM.setStyle(Y,p,o);},A.DOM);},getComputedStyle:function(e,Y){var o="",n=e[M];if(e[i]){o=n[V][j](e,null)[Y];}return o;}});if(E[g][i][B]!==X){A.DOM.CUSTOM_STYLES[c]=B;}else{if(E[g][i][P]!==X){A.DOM.CUSTOM_STYLES[c]=P;}}if(A.UA.opera){A.DOM[j]=function(n,e){var Y=n[M][V],o=Y[j](n,"")[e];if(Z.test(e)){o=A.Color.toRGB(o);}return o;};}if(A.UA.webkit){A.DOM[j]=function(n,e){var Y=n[M][V],o=Y[j](n,"")[e];if(o==="rgba(0, 0, 0, 0)"){o=Q;}return o;};}(function(){var n="toString",Y=parseInt,e=RegExp;A.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(o){if(!A.Color.re_RGB.test(o)){o=A.Color.toHex(o);}if(A.Color.re_hex.exec(o)){o="rgb("+[Y(e.$1,16),Y(e.$2,16),Y(e.$3,16)].join(", ")+")";}return o;},toHex:function(s){s=A.Color.KEYWORDS[s]||s;if(A.Color.re_RGB.exec(s)){var q=(e.$1.length===1)?"0"+e.$1:Number(e.$1),p=(e.$2.length===1)?"0"+e.$2:Number(e.$2),o=(e.$3.length===1)?"0"+e.$3:Number(e.$3);s=[q[n](16),p[n](16),o[n](16)].join("");}if(s.length<6){s=s.replace(A.Color.re_hex3,"$1$1");}if(s!=="transparent"&&s.indexOf("#")<0){s="#"+s;}return s.toLowerCase();}};})();var D="clientTop",R="clientLeft",K="parentNode",f="right",S="hasLayout",l="px",H="filter",d="filters",N="opacity",U="auto",L="currentStyle",O=function(Y){return Y[L]||Y[i];};if(document[g][i][N]===X&&document[g][d]){A.DOM.CUSTOM_STYLES[N]={get:function(n){var p=100;try{p=n[d]["DXImageTransform.Microsoft.Alpha"][N];}catch(o){try{p=n[d]("alpha")[N];}catch(Y){}}return p/100;},set:function(e,p,Y){var o,n;if(p===""){n=O(e);o=(N in n)?n[N]:1;p=o;}if(typeof Y[H]=="string"){Y[H]="alpha("+N+"="+p*100+")";if(!e[L]||!e[L][S]){Y.zoom=1;}}}};}try{document.createElement("div").style.height="-1px";}catch(h){A.DOM.CUSTOM_STYLES.height={set:function(e,n,Y){if(parseInt(n,10)>=0){Y.height=n;}else{}}};A.DOM.CUSTOM_STYLES.width={set:function(e,n,Y){if(parseInt(n,10)>=0){Y.width=n;}else{}}};}var T=/^width|height$/,G=/^(\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={CUSTOM_STYLES:{},get:function(Y,n){var e="",o;if(Y){o=O(Y)[n];if(n===N){e=A.DOM.CUSTOM_STYLES[N].get(Y);}else{if(!o||(o.indexOf&&o.indexOf(l)>-1)){e=o;}else{if(A.DOM.IE.COMPUTED[n]){e=A.DOM.IE.COMPUTED[n](Y,n);}else{if(G.test(o)){e=m.getPixel(Y,n)+l;}else{e=o;}}}}}return e;},getOffset:function(n,s){var p=O(n)[s],Y=s.charAt(0).toUpperCase()+s.substr(1),q="offset"+Y,e="pixel"+Y,r,o="";if(p===U){r=n[q];if(r===X){o=0;}o=r;if(T.test(s)){n[i][s]=r;if(n[q]>r){o=r-(n[q]-r);
}n[i][s]=U;}}else{if(p.indexOf("%")>-1){p=n.clientWidth-m.getPixel(n,"paddingRight")-m.getPixel(n,"paddingLeft");}if(!n[i][e]&&!n[i][s]){n[i][s]=p;}o=n[i][e];}return o+l;},getBorderWidth:function(Y,n){var e=null;if(!Y[L]||!Y[L][S]){Y[i].zoom=1;}switch(n){case I:e=Y[D];break;case C:e=Y.offsetHeight-Y.clientHeight-Y[D];break;case a:e=Y[R];break;case b:e=Y.offsetWidth-Y.clientWidth-Y[R];break;}return e+l;},getPixel:function(n,Y){var p=null,e=O(n),q=e[f],o=e[Y];n[i][f]=o;p=n[i].pixelRight;n[i][f]=q;return p;},getMargin:function(n,Y){var o,e=O(n);if(e[Y]==U){o=0;}else{o=m.getPixel(n,Y);}return o+l;},getVisibility:function(e,Y){var n;while((n=e[L])&&n[Y]=="inherit"){e=e[K];}return(n)?n[Y]:k;},getColor:function(e,Y){var n=O(e)[Y];if(!n||n===Q){A.DOM.elementByAxis(e,K,null,function(o){n=O(o)[Y];if(n&&n!==Q){e=o;return true;}});}return A.Color.toRGB(n);},getBorderColor:function(e,Y){var n=O(e),o=n[Y]||n.color;return A.Color.toRGB(A.Color.toHex(o));}},J={};J[F]=J[W]=m.getOffset;J.color=J.backgroundColor=m.getColor;J[I]=J[b]=J[C]=J[a]=m.getBorderWidth;J.marginTop=J.marginRight=J.marginBottom=J.marginLeft=m.getMargin;J.visibility=m.getVisibility;J.borderColor=J.borderTopColor=J.borderRightColor=J.borderBottomColor=J.borderLeftColor=m.getBorderColor;if(!A.config.win[j]){A.DOM[j]=m.get;}A.namespace("DOM.IE");A.DOM.IE.COMPUTED=J;A.DOM.IE.ComputedStyle=m;},"@VERSION@",{skinnable:false,requires:["dom-base"]});YUI.add("dom-screen",function(D){var S="documentElement",K="compatMode",M="position",Q="fixed",U="relative",L="left",O="top",T="BackCompat",N="medium",E="borderLeftWidth",F="borderTopWidth",A="getBoundingClientRect",C="getComputedStyle",V=/^t(?:able|d|h)$/i;D.mix(D.DOM,{winHeight:function(X){var W=D.DOM._getWinSize(X).height;return W;},winWidth:function(X){var W=D.DOM._getWinSize(X).width;return W;},docHeight:function(X){var W=D.DOM._getDocSize(X).height;return Math.max(W,D.DOM._getWinSize(X).height);},docWidth:function(X){var W=D.DOM._getDocSize(X).width;return Math.max(W,D.DOM._getWinSize(X).width);},docScrollX:function(W){var X=D.DOM._getDoc(W);return Math.max(X[S].scrollLeft,X.body.scrollLeft);},docScrollY:function(W){var X=D.DOM._getDoc(W);return Math.max(X[S].scrollTop,X.body.scrollTop);},getXY:function(){if(document[S][A]){return function(Z){var h=null,a,X,f,b,e,d,W,Y,c,g;if(Z){if(D.DOM.inDoc(Z)){a=D.DOM.docScrollX(Z);X=D.DOM.docScrollY(Z);b=Z[A]();g=D.DOM._getDoc(Z);h=[b.left,b.top];if(D.UA.ie){e=2,d=2;c=g[K];W=D.DOM[C](g[S],E);Y=D.DOM[C](g[S],F);if(D.UA.ie===6){if(c!==T){e=0;d=0;}}if((c==T)){if(W!==N){e=parseInt(W,10);}if(Y!==N){d=parseInt(Y,10);}}h[0]-=e;h[1]-=d;}if((X||a)){h[0]+=a;h[1]+=X;}}else{h=D.DOM._getOffset(Z);}}return h;};}else{return function(Y){var a=null,W,b,Z,X;if(Y){if(D.DOM.inDoc(Y)){a=[Y.offsetLeft,Y.offsetTop];W=Y;b=((D.UA.gecko||D.UA.webkit>519)?true:false);while((W=W.offsetParent)){a[0]+=W.offsetLeft;a[1]+=W.offsetTop;if(b){a=D.DOM._calcBorders(W,a);}}if(D.DOM.getStyle(Y,M)!=Q){W=Y;while((W=W.parentNode)){Z=W.scrollTop;scrollLeft=W.scrollLeft;if(D.UA.gecko&&(D.DOM.getStyle(W,"overflow")!=="visible")){a=D.DOM._calcBorders(W,a);}if(Z||scrollLeft){a[0]-=scrollLeft;a[1]-=Z;}}a[0]+=D.DOM.docScrollX(Y);a[1]+=D.DOM.docScrollY(Y);}else{a[0]+=D.DOM.docScrollX(Y);a[1]+=D.DOM.docScrollY(Y);}}else{a=D.DOM._getOffset(Y);}}return a;};}}(),_getOffset:function(W){var Y,X=null;if(W){Y=D.DOM.getStyle(W,M);X=[parseInt(D.DOM[C](W,L),10),parseInt(D.DOM[C](W,O),10)];if(isNaN(X[0])){X[0]=parseInt(D.DOM.getStyle(W,L),10);if(isNaN(X[0])){X[0]=(Y===U)?0:W.offsetLeft||0;}}if(isNaN(X[1])){X[1]=parseInt(D.DOM.getStyle(W,O),10);if(isNaN(X[1])){X[1]=(Y===U)?0:W.offsetTop||0;}}}return X;},getX:function(W){return D.DOM.getXY(W)[0];},getY:function(W){return D.DOM.getXY(W)[1];},setXY:function(X,a,d){var Y=D.DOM.setStyle,c,b,W,Z;if(X&&a){c=D.DOM.getStyle(X,M);b=D.DOM._getOffset(X);if(c=="static"){c=U;Y(X,M,c);}Z=D.DOM.getXY(X);if(a[0]!==null){Y(X,L,a[0]-Z[0]+b[0]+"px");}if(a[1]!==null){Y(X,O,a[1]-Z[1]+b[1]+"px");}if(!d){W=D.DOM.getXY(X);if(W[0]!==a[0]||W[1]!==a[1]){D.DOM.setXY(X,a,true);}}}else{}},setX:function(X,W){return D.DOM.setXY(X,[W,null]);},setY:function(W,X){return D.DOM.setXY(W,[null,X]);},_calcBorders:function(Y,Z){var X=parseInt(D.DOM[C](Y,F),10)||0,W=parseInt(D.DOM[C](Y,E),10)||0;if(D.UA.gecko){if(V.test(Y.tagName)){X=0;W=0;}}Z[0]+=W;Z[1]+=X;return Z;},_getWinSize:function(Z){var b=D.DOM._getDoc(),a=b.defaultView||b.parentWindow,c=b[K],Y=a.innerHeight,X=a.innerWidth,W=b[S];if(c&&!D.UA.opera){if(c!="CSS1Compat"){W=b.body;}Y=W.clientHeight;X=W.clientWidth;}return{height:Y,width:X};},_getDocSize:function(X){var Y=D.DOM._getDoc(),W=Y[S];if(Y[K]!="CSS1Compat"){W=Y.body;}return{height:W.scrollHeight,width:W.scrollWidth};}});var H="offsetWidth",B="offsetHeight",O="top",I="right",G="bottom",L="left",P="tagName";var J=function(Z,Y){var c=Math.max(Z[O],Y[O]),d=Math.min(Z[I],Y[I]),W=Math.min(Z[G],Y[G]),X=Math.max(Z[L],Y[L]),a={};a[O]=c;a[I]=d;a[G]=W;a[L]=X;return a;};var R=R||D.DOM;D.mix(R,{region:function(X){var Y=R.getXY(X),W=false;if(X&&Y){W=R._getRegion(Y[1],Y[0]+X[H],Y[1]+X[B],Y[0]);}return W;},intersect:function(Y,W,a){var X=a||R.region(Y),Z={};var c=W;if(c[P]){Z=R.region(c);}else{if(D.Lang.isObject(W)){Z=W;}else{return false;}}var b=J(Z,X);return{top:b[O],right:b[I],bottom:b[G],left:b[L],area:((b[G]-b[O])*(b[I]-b[L])),yoff:((b[G]-b[O])),xoff:(b[I]-b[L]),inRegion:R.inRegion(Y,W,false,a)};},inRegion:function(Z,W,X,b){var a={},Y=b||R.region(Z);var d=W;if(d[P]){a=R.region(d);}else{if(D.Lang.isObject(W)){a=W;}else{return false;}}if(X){return(Y[L]>=a[L]&&Y[I]<=a[I]&&Y[O]>=a[O]&&Y[G]<=a[G]);}else{var c=J(a,Y);if(c[G]>=c[O]&&c[I]>=c[L]){return true;}else{return false;}}},inViewportRegion:function(X,W,Y){return R.inRegion(X,R.viewportRegion(X),W,Y);},_getRegion:function(Y,Z,W,X){var a={};a[O]=a[1]=Y;a[L]=a[0]=X;a[G]=W;a[I]=Z;a.width=a[I]-a[L];a.height=a[G]-a[O];return a;},viewportRegion:function(X){X=X||D.config.doc.documentElement;var W=false,Z,Y;if(X){Z=R.docScrollX(X);Y=R.docScrollY(X);W=R._getRegion(Y,R.winWidth(X)+Z,Y+R.winHeight(X),Z);
}return W;}});},"@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.id=S.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;}},_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();}if(W.ownerDocument.getElementById(W.id)){R="#"+W.id+" "+R;W=W.ownerDocument;}}V=A._tokenize(R,W);Q=V.pop();if(Q){if(P){Q.deDupe=true;}if(V[0]&&V[0].id&&W.nodeType===9&&W.getElementById(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){C.Array.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,V=P.tag,R=P[H],W=P.result,Q=0,U=R&&R[G]?A.combinators[R[G]]:null,T;if((V==="*"||V===O[K])&&!(P.last&&O._found)){while((T=P.tests[Q])){Q++;test=T.test;if(test.test){if(!test.test(C.DOM.getAttribute(O,T.name))){return false;}}else{if(!test(O,T.match)){return false;}}}if(U&&!U(O,P)){return false;}if(P.root&&P.root.nodeType!==9&&!C.DOM.contains(P.root,O)){return false;}W[W.length]=O;if(P.deDupe&&P.last){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,V){P=P||"";P=A._replaceShorthand(C.Lang.trim(P));var O=A._getToken(),U=P,T=[],W=false,S,R;outer:do{W=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)});}W=true;P=P.replace(R[0],"");if(!P[D]||N.name===G){O.root=V;T.push(O);O=A._getToken(O);}}else{W=false;break outer;}}}}while(W&&P.length);if(!W||P.length){T=[];}else{if(T[D]){T[T[D]-1].last=true;}}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@",{skinnable:false,use:["dom-base","dom-style","dom-screen","selector"]});