dom-min.js revision 7f301ced05415668ede239d3d16fe4a4199754e6
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){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=X.createDocumentFragment();while(S.length){T.appendChild(S[0]);}}F.DOM._cloneCache[V]=T.cloneNode(true);return T;},CUSTOM_ATTRIBUTES:(!document.documentElement.hasAttribute)?{"for":"htmlFor","class":"className"}:{"htmlFor":"for","className":"class"},setAttribute:function(R,Q,S){if(R&&R.setAttribute){Q=F.DOM.CUSTOM_ATTRIBUTES[Q]||Q;R.setAttribute(Q,S);}},getAttribute:function(S,Q){var R="";if(S&&S.getAttribute){Q=F.DOM.CUSTOM_ATTRIBUTES[Q]||Q;R=S.getAttribute(Q,2);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(U,T,R,V){T=F.Lang.trim(T);var Q,S=F.DOM._cloneCache[T];if(S){S=S.cloneNode(true);}else{if(T.nodeType){S=T;}else{S=F.DOM.create(T);}}if(R){if(R.nodeType){R.parentNode.insertBefore(S,R);}else{switch(R){case"replace":while(U.firstChild){U.removeChild(U.firstChild);}U.appendChild(S);break;case"before":U.parentNode.insertBefore(S,U);break;case"after":if(U.nextSibling){U.parentNode.insertBefore(S,U.nextSibling);}else{U.parentNode.appendChild(S);}break;default:U.appendChild(S);}}}else{U.appendChild(S);}if(V){if(S.tagName.toUpperCase()==="SCRIPT"&&!F.UA.gecko){Q=[S];}else{Q=S.getElementsByTagName("script");}F.DOM._execScripts(Q);}else{if(T.nodeType||T.indexOf("<script")>-1){F.DOM._stripScripts(S);}}return S;},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:["event"],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(I){I=E.Color.KEYWORDS[I]||I;if(E.Color.re_RGB.exec(I)){var H=(C.$1.length===1)?"0"+C.$1:Number(C.$1),G=(C.$2.length===1)?"0"+C.$2:Number(C.$2),F=(C.$3.length===1)?"0"+C.$3:Number(C.$3);I=[H[D](16),G[D](16),F[D](16)].join("");}if(I.length<6){I=I.replace(E.Color.re_hex3,"$1$1");}if(I!=="transparent"&&I.indexOf("#")<0){I="#"+I;}return I.toLowerCase();}};})(A);(function(E){var C="clientTop",J="clientLeft",Z="hasLayout",L="px",M="filter",B="filters",V="opacity",N="auto",K="borderTopWidth",R="borderRightWidth",X="borderBottomWidth",H="borderLeftWidth",I="width",P="height",S="transparent",U="visible",D="getComputedStyle",b=undefined,a=document.documentElement,T=/^width|height$/,Q=/^(\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;},O={CUSTOM_STYLES:{},get:function(Y,d){var c="",e;if(Y){e=F(Y)[d];if(d===V){c=E.DOM.CUSTOM_STYLES[V].get(Y);}else{if(!e||(e.indexOf&&e.indexOf(L)>-1)){c=e;}else{if(E.DOM.IE.COMPUTED[d]){c=E.DOM.IE.COMPUTED[d](Y,d);}else{if(Q.test(e)){c=O.getPixel(Y,d)+L;}else{c=e;}}}}}return c;},getOffset:function(d,i){var f=F(d)[i],Y=i.charAt(0).toUpperCase()+i.substr(1),g="offset"+Y,c="pixel"+Y,h,e="";if(f===N){h=d[g];if(h===b){e=0;}e=h;if(T.test(i)){d.style[i]=h;if(d[g]>h){e=h-(d[g]-h);}d.style[i]=N;}}else{if(f.indexOf("%")>-1){f=d.clientWidth-O.getPixel(d,"paddingRight")-O.getPixel(d,"paddingLeft");
}if(!d.style[c]&&!d.style[i]){d.style[i]=f;}e=d.style[c];}return e+L;},getBorderWidth:function(Y,d){var c=null;if(!Y.currentStyle||!Y.currentStyle[Z]){Y.style.zoom=1;}switch(d){case K:c=Y[C];break;case X:c=Y.offsetHeight-Y.clientHeight-Y[C];break;case H:c=Y[J];break;case R:c=Y.offsetWidth-Y.clientWidth-Y[J];break;}return c+L;},getPixel:function(d,Y){var f=null,c=F(d),g=c.right,e=c[Y];d.style.right=e;f=d.style.pixelRight;d.style.right=g;return f;},getMargin:function(d,Y){var e,c=F(d);if(c[Y]==N){e=0;}else{e=O.getPixel(d,Y);}return e+L;},getVisibility:function(c,Y){var d;while((d=c.currentStyle)&&d[Y]=="inherit"){c=c.parentNode;}return(d)?d[Y]:U;},getColor:function(c,Y){var d=F(c)[Y];if(!d||d===S){E.DOM.elementByAxis(c,"parentNode",null,function(e){d=F(e)[Y];if(d&&d!==S){c=e;return true;}});}return E.Color.toRGB(d);},getBorderColor:function(c,Y){var d=F(c),e=d[Y]||d.color;return E.Color.toRGB(E.Color.toHex(e));}},G={};if(a.style[V]===b&&a[B]){E.DOM.CUSTOM_STYLES[V]={get:function(c){var f=100;try{f=c[B]["DXImageTransform.Microsoft.Alpha"][V];}catch(d){try{f=c[B]("alpha")[V];}catch(Y){}}return f/100;},set:function(c,f,Y){var e,d;if(f===""){d=F(c);e=(V in d)?d[V]:1;f=e;}if(typeof Y[M]=="string"){Y[M]="alpha("+V+"="+f*100+")";if(!c.currentStyle||!c.currentStyle[Z]){Y.zoom=1;}}}};}try{document.createElement("div").style.height="-1px";}catch(W){E.DOM.CUSTOM_STYLES.height={set:function(c,d,Y){if(parseInt(d,10)>=0){Y.height=d;}else{}}};E.DOM.CUSTOM_STYLES.width={set:function(c,d,Y){if(parseInt(d,10)>=0){Y.width=d;}else{}}};}G[I]=G[P]=O.getOffset;G.color=G.backgroundColor=O.getColor;G[K]=G[R]=G[X]=G[H]=O.getBorderWidth;G.marginTop=G.marginRight=G.marginBottom=G.marginLeft=O.getMargin;G.visibility=O.getVisibility;G.borderColor=G.borderTopColor=G.borderRightColor=G.borderBottomColor=G.borderLeftColor=O.getBorderColor;if(!E.config.win[D]){E.DOM[D]=O.get;}E.namespace("DOM.IE");E.DOM.IE.COMPUTED=G;E.DOM.IE.ComputedStyle=O;})(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",function(D){(function(N){N.namespace("Selector");var M={_reLead:/^\s*([>+~]|:self)/,_reUnSupported:/!./,_foundCache:[],_supportsNative:function(){return((N.UA.ie>=8||N.UA.webkit>525)&&document.querySelectorAll);},_toArray:function(P){var Q=P,R,O;if(!P.slice){try{Q=Array.prototype.slice.call(P);}catch(S){Q=[];for(R=0,O=P.length;R<O;++R){Q[R]=P[R];}}}return Q;},_clearFoundCache:function(){var R=M._foundCache,P,O;for(P=0,O=R.length;P<O;++P){try{delete R[P]._found;}catch(Q){R[P].removeAttribute("_found");}}R=[];},_sort:function(O){if(O){O=M._toArray(O);if(O.sort){O.sort(function(Q,P){return N.DOM.srcIndex(Q)-N.DOM.srcIndex(P);});}}return O;},_deDupe:function(P){var Q=[],O=M._foundCache,R,S;for(R=0,S;S=P[R++];){if(!S._found){Q[Q.length]=O[O.length]=S;S._found=true;}}M._clearFoundCache();return Q;},_prepQuery:function(R,Q){var P=Q.split(","),S=[],U=(R&&R.nodeType===9),T,O;if(R){if(!U){R.id=R.id||N.guid();for(T=0,O=P.length;T<O;++T){Q="#"+R.id+" "+P[T];S.push({root:R.ownerDocument,selector:Q});}}else{S.push({root:R,selector:Q});}}return S;},_query:function(O,V,W){if(M._reUnSupported.test(O)){return N.Selector._brute.query(O,V,W);}var S=W?null:[],T=W?"querySelector":"querySelectorAll",X,Q,P,U;V=V||N.config.doc;if(O){Q=M._prepQuery(V,O);S=[];for(P=0,U;U=Q[P++];){try{X=U.root[T](U.selector);if(T==="querySelectorAll"){X=M._toArray(X);}S=S.concat(X);}catch(R){}}if(Q.length>1){S=M._sort(M._deDupe(S));}S=(!W)?S:S[0]||null;}return S;},_filter:function(P,O){var Q=[],R,S;if(P&&O){for(R=0,S;(S=P[R++]);){if(N.Selector._test(S,O)){Q[Q.length]=S;}}}else{}return Q;},_test:function(T,P){var Q=false,O=P.split(","),V,S,R,U;if(T&&T.tagName){T.id=T.id||N.guid();for(R=0,U;U=O[R++];){U+="#"+T.id;S=N.Selector.query(U,null,true);Q=(S===T);if(Q){break;}}}return Q;}};if(N.UA.ie&&N.UA.ie<=8){M._reUnSupported=/:(?:nth|not|root|only|checked|first|last|empty)/;}N.mix(N.Selector,M,true);if(M._supportsNative()){N.Selector.query=M._query;}N.Selector.test=M._test;N.Selector.filter=M._filter;})(D);var K="parentNode",J="tagName",F="attributes",G="combinator",E="pseudos",H="previous",I="previousSibling",C="length",B=[],A=D.Selector,L={SORT_RESULTS:true,_children:function(O){var M=O.children,N,P;if(!M&&O[J]){M=[];for(N=0,P;P=O.childNodes[N++];){if(P.tagName){M[M.length]=P;}}B[B.length]=O;O.children=M;}return M||[];},_regexCache:{},_re:{attr:/(\[.*\])/g,urls:/^(?:href|src)/},shorthand:{"\\#(-?[_a-z]+[-\\w]*)":"[id=$1]","\\.(-?[_a-z]+[-\\w]*)":"[className~=$1]"},operators:{"":function(N,M){return D.DOM.getAttribute(N,M[0])!=="";},"=":"^{val}$","~=":"(?:^|\\s+){val}(?:\\s+|$)","|=":"^{val}-?"},pseudos:{"first-child":function(M){return D.Selector._children(M[K])[0]===M;}},_brute:{query:function(M,N,P){var O=[];if(M){O=A._query(M,N,P);}A._cleanup();return(P)?(O[0]||null):O;}},_cleanup:function(){for(var M=0,N;N=B[M++];){delete N.children;}B=[];},_query:function(Q,V,W,O){var T=[],N=Q.split(","),M=[],U,P,R,S;if(N.length>1){for(R=0,S=N.length;R<S;++R){T=T.concat(arguments.callee(N[R],V,W,true));}T=A.SORT_RESULTS?A._sort(T):T;A._clearFoundCache();}else{V=V||D.config.doc;if(V.nodeType!==9){if(!V.id){V.id=D.guid();}if(V.ownerDocument.getElementById(V.id)){Q="#"+V.id+" "+Q;V=V.ownerDocument;}}U=A._tokenize(Q,V);P=U.pop();if(P){if(O){P.deDupe=true;}if(U[0]&&U[0].id&&V.nodeType===9&&V.getElementById(U[0].id)){V=V.getElementById(U[0].id);}if(V&&!M.length&&P.prefilter){M=P.prefilter(V,P);}if(M.length){if(W){D.Array.some(M,A._testToken,P);}else{D.Array.each(M,A._testToken,P);}}T=P.result;}}return T;},_testToken:function(N,R,M,O){var O=O||this,V=O.tag,Q=O[H],W=O.result,P=0,U=Q&&Q[G]?A.combinators[Q[G]]:null,T,S;if((V==="*"||V===N[J])&&!(O.last&&N._found)){while((S=O.tests[P])){P++;T=S.test;if(T.test){if(!T.test(D.DOM.getAttribute(N,S.name))){return false;}}else{if(!T(N,S.match)){return false;}}}if(U&&!U(N,O)){return false;}if(O.root&&O.root.nodeType!==9&&!D.DOM.contains(O.root,N)){return false;}W[W.length]=N;if(O.deDupe&&O.last){N._found=true;A._foundCache.push(N);}return true;}return false;},_getRegExp:function(O,M){var N=A._regexCache;M=M||"";if(!N[O+M]){N[O+M]=new RegExp(O,M);}return N[O+M];},combinators:{" ":function(O,M){var P=A._testToken,N=M[H];while((O=O[K])){if(P(O,null,null,N)){return true;}}return false;},">":function(N,M){return A._testToken(N[K],null,null,M[H]);},"+":function(O,N){var M=O[I];while(M&&M.nodeType!==1){M=M[I];}if(M&&D.Selector._testToken(M,null,null,N[H])){return true;}return false;}},_parsers:[{name:J,re:/^((?:-?[_a-z]+[\w-]*)|\*)/i,fn:function(N,M){N.tag=M[1].toUpperCase();N.prefilter=function(O){return O.getElementsByTagName(N.tag);};return true;}},{name:F,re:/^\[([a-z]+\w*)+([~\|\^\$\*!=]=?)?['"]?([^\]]*?)['"]?\]/i,fn:function(O,N){var P=N[3],M=!(N[2]&&P)?"":N[2],Q=A.operators[M];if(typeof Q==="string"){Q=A._getRegExp(Q.replace("{val}",P));}if(N[1]==="id"&&P){O.id=P;O.prefilter=function(R){var T=R.nodeType===9?R:R.ownerDocument,S=T.getElementById(P);return S?[S]:[];};}else{if(document.documentElement.getElementsByClassName&&N[1].indexOf("class")===0){if(!O.prefilter){O.prefilter=function(R){return R.getElementsByClassName(P);};Q=true;}}}return Q;}},{name:G,re:/^\s*([>+~]|\s)\s*/,fn:function(N,M){N[G]=M[1];return !!A.combinators[N[G]];}},{name:E,re:/^:([\-\w]+)(?:\(['"]?(.+)['"]?\))*/i,fn:function(N,M){return A[E][M[1]];}}],_getToken:function(M){return{previous:M,combinator:" ",tag:"*",prefilter:function(N){return N.getElementsByTagName("*");
},tests:[],result:[]};},_tokenize:function(O,U){O=O||"";O=A._replaceShorthand(D.Lang.trim(O));var N=A._getToken(),T=O,S=[],V=false,R,Q,P,M;outer:do{V=false;for(P=0,M;M=A._parsers[P++];){if((Q=M.re.exec(O))){R=M.fn(N,Q);if(R){if(R!==true){N.tests.push({name:Q[1],test:R,match:Q.slice(1)});}V=true;O=O.replace(Q[0],"");if(!O.length||M.name===G){N.root=U;S.push(N);N=A._getToken(N);}}else{V=false;break outer;}}}}while(V&&O.length);if(!V||O.length){S=[];}else{if(S.length){S[S.length-1].last=true;}}return S;},_replaceShorthand:function(N){var O=A.shorthand,P=N.match(A._re.attr),R,Q,M;if(P){N=N.replace(A._re.attr,"REPLACED_ATTRIBUTE");}for(R in O){if(O.hasOwnProperty(R)){N=N.replace(A._getRegExp(R,"gi"),O[R]);}}if(P){for(Q=0,M=P.length;Q<M;++Q){N=N.replace("REPLACED_ATTRIBUTE",P[Q]);}}return N;}};D.mix(D.Selector,L,true);if(!D.Selector._supportsNative()){D.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"]});