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