(function(){var C=YAHOO.util,b,h,S=0,R={};var x=navigator.userAgent.toLowerCase(),f=(x.indexOf("opera")>-1),e=(x.indexOf("safari")>-1),A=(!f&&!e&&x.indexOf("gecko")>-1),v=(!f&&x.indexOf("msie")>-1);var L={HYPHEN:/(-[a-z])/i};var D=function(m){if(!L.HYPHEN.test(m)){return m;}if(R[m]){return R[m];}while(L.HYPHEN.exec(m)){m=m.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}R[m]=m;return m;};if(document.defaultView&&document.defaultView.getComputedStyle){b=function(m,T){var V=null;var c=document.defaultView.getComputedStyle(m,"");if(c){V=c[D(T)];}return m.style[T]||V;};}else{if(document.documentElement.currentStyle&&v){b=function(m,V){switch(D(V)){case "opacity":var Z=100;try{Z=m.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(T){try{Z=m.filters("alpha").opacity;}catch(T){}}return Z/100;break;default:var c=m.currentStyle?m.currentStyle[V]:null;return (m.style[V]||c);}};}else{b=function(m,c){return m.style[c];};}}if(v){h=function(m,c,V){switch(c){case "opacity":if(typeof m.style.filter=="string"){m.style.filter="alpha(opacity="+V*100+")";if(!m.currentStyle||!m.currentStyle.hasLayout){m.style.zoom=1;}}break;default:m.style[c]=V;}};}else{h=function(m,c,V){m.style[c]=V;};}YAHOO.util.Dom={get:function(V){if(!V){return null;}if(typeof V!="string"&&!(V instanceof Array)){return V;}if(typeof V=="string"){return document.getElementById(V);}else{var T=[];for(var c=0,m=V.length;c<m;++c){T[T.length]=C.Dom.get(V[c]);}return T;}return null;},getStyle:function(m,V){V=D(V);var c=function(T){return b(T,V);};return C.Dom.batch(m,c,C.Dom,true);},setStyle:function(m,V,T){V=D(V);var c=function(Z){h(Z,V,T);};C.Dom.batch(m,c,C.Dom,true);},getXY:function(m){var c=function(T){if(T.parentNode===null||T.offsetParent===null||this.getStyle(T,"display")=="none"){return false;}var V=null;var z=[];var Z;if(T.getBoundingClientRect){Z=T.getBoundingClientRect();var y=document;if(!this.inDocument(T)&&parent.document!=document){y=parent.document;if(!this.isAncestor(y.documentElement,T)){return false;}}var i=Math.max(y.documentElement.scrollTop,y.body.scrollTop);var U=Math.max(y.documentElement.scrollLeft,y.body.scrollLeft);return [Z.left+U,Z.top+i];}else{z=[T.offsetLeft,T.offsetTop];V=T.offsetParent;if(V!=T){while(V){z[0]+=V.offsetLeft;z[1]+=V.offsetTop;V=V.offsetParent;}}if(e&&this.getStyle(T,"position")=="absolute"){z[0]-=document.body.offsetLeft;z[1]-=document.body.offsetTop;}}if(T.parentNode){V=T.parentNode;}else{V=null;}while(V&&V.tagName.toUpperCase()!="BODY"&&V.tagName.toUpperCase()!="HTML"){if(C.Dom.getStyle(V,"display")!="inline"){z[0]-=V.scrollLeft;z[1]-=V.scrollTop;}if(V.parentNode){V=V.parentNode;}else{V=null;}}return z;};return C.Dom.batch(m,c,C.Dom,true);},getX:function(m){var c=function(V){return C.Dom.getXY(V)[0];};return C.Dom.batch(m,c,C.Dom,true);},getY:function(m){var c=function(V){return C.Dom.getXY(V)[1];};return C.Dom.batch(m,c,C.Dom,true);},setXY:function(m,T,V){var c=function(y){var i=this.getStyle(y,"position");if(i=="static"){this.setStyle(y,"position","relative");i="relative";}var z=this.getXY(y);if(z===false){return false;}var U=[parseInt(this.getStyle(y,"left"),10),parseInt(this.getStyle(y,"top"),10)];if(isNaN(U[0])){U[0]=(i=="relative")?0:y.offsetLeft;}if(isNaN(U[1])){U[1]=(i=="relative")?0:y.offsetTop;}if(T[0]!==null){y.style.left=T[0]-z[0]+U[0]+"px";}if(T[1]!==null){y.style.top=T[1]-z[1]+U[1]+"px";}if(!V){var Z=this.getXY(y);if((T[0]!==null&&Z[0]!=T[0])||(T[1]!==null&&Z[1]!=T[1])){this.setXY(y,T,true);}}};C.Dom.batch(m,c,C.Dom,true);},setX:function(c,m){C.Dom.setXY(c,[m,null]);},setY:function(m,c){C.Dom.setXY(m,[null,c]);},getRegion:function(m){var c=function(V){var T=new C.Region.getRegion(V);return T;};return C.Dom.batch(m,c,C.Dom,true);},getClientWidth:function(){return C.Dom.getViewportWidth();},getClientHeight:function(){return C.Dom.getViewportHeight();},getElementsByClassName:function(V,m,c){var T=function(Z){return C.Dom.hasClass(Z,V);};return C.Dom.getElementsBy(T,m,c);},hasClass:function(V,c){var m=new RegExp("(?:^|\\s+)"+c+"(?:\\s+|$)");var T=function(Z){return m.test(Z["className"]);};return C.Dom.batch(V,T,C.Dom,true);},addClass:function(c,m){var V=function(T){if(this.hasClass(T,m)){return ;}T["className"]=[T["className"],m].join(" ");};C.Dom.batch(c,V,C.Dom,true);},removeClass:function(V,c){var m=new RegExp("(?:^|\\s+)"+c+"(?:\\s+|$)","g");var T=function(Z){if(!this.hasClass(Z,c)){return ;}var i=Z["className"];Z["className"]=i.replace(m," ");if(this.hasClass(Z,c)){this.removeClass(Z,c);}};C.Dom.batch(V,T,C.Dom,true);},replaceClass:function(T,c,m){if(c===m){return false;}var V=new RegExp("(?:^|\\s+)"+c+"(?:\\s+|$)","g");var Z=function(i){if(!this.hasClass(i,c)){this.addClass(i,m);return ;}i["className"]=i["className"].replace(V," "+m+" ");if(this.hasClass(i,c)){this.replaceClass(i,c,m);}};C.Dom.batch(T,Z,C.Dom,true);},generateId:function(m,V){V=V||"yui-gen";m=m||{};var c=function(T){if(T){T=C.Dom.get(T);}else{T={};}if(!T.id){T.id=V+S++;}return T.id;};return C.Dom.batch(m,c,C.Dom,true);},isAncestor:function(c,V){c=C.Dom.get(c);if(!c||!V){return false;}var m=function(Z){if(c.contains&&!e){return c.contains(Z);}else{if(c.compareDocumentPosition){return !!(c.compareDocumentPosition(Z)&16);}else{var T=Z.parentNode;while(T){if(T==c){return true;}else{if(!T.tagName||T.tagName.toUpperCase()=="HTML"){return false;}}T=T.parentNode;}return false;}}};return C.Dom.batch(V,m,C.Dom,true);},inDocument:function(m){var c=function(V){return this.isAncestor(document.documentElement,V);};return C.Dom.batch(m,c,C.Dom,true);},getElementsBy:function(U,c,V){c=c||"*";var T=[];if(V){V=C.Dom.get(V);if(!V){return T;}}else{V=document;}var y=V.getElementsByTagName(c);if(!y.length&&(c=="*"&&V.all)){y=V.all;}for(var Z=0,m=y.length;Z<m;++Z){if(U(y[Z])){T[T.length]=y[Z];}}return T;},batch:function(Z,m,T,V){var c=Z;Z=C.Dom.get(Z);var P=(V)?T:window;if(!Z||Z.tagName||!Z.length){if(!Z){return false;}return m.call(P,Z,T);}var U=[];for(var y=0,z=Z.length;y<z;++y){if(!Z[y]){c=Z[y];}U[U.length]=m.call(P,Z[y],T);}return U;},getDocumentHeight:function(){var c=(document.compatMode!="CSS1Compat")?document.body.scrollHeight:document.documentElement.scrollHeight;var m=Math.max(c,C.Dom.getViewportHeight());return m;},getDocumentWidth:function(){var c=(document.compatMode!="CSS1Compat")?document.body.scrollWidth:document.documentElement.scrollWidth;var m=Math.max(c,C.Dom.getViewportWidth());return m;},getViewportHeight:function(){var m=self.innerHeight;var c=document.compatMode;if((c||v)&&!f){m=(c=="CSS1Compat")?document.documentElement.clientHeight:document.body.clientHeight;}return m;},getViewportWidth:function(){var m=self.innerWidth;var c=document.compatMode;if(c||v){m=(c=="CSS1Compat")?document.documentElement.clientWidth:document.body.clientWidth;}return m;}};})();YAHOO.util.Region=function(C,f,A,x){this.top=C;this[1]=C;this.right=f;this.bottom=A;this.left=x;this[0]=x;};YAHOO.util.Region.prototype.contains=function(A){return (A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return ((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(L){var C=Math.max(this.top,L.top);var f=Math.min(this.right,L.right);var A=Math.min(this.bottom,L.bottom);var x=Math.max(this.left,L.left);if(A>=C&&f>=x){return new YAHOO.util.Region(C,f,A,x);}else{return null;}};YAHOO.util.Region.prototype.union=function(L){var C=Math.min(this.top,L.top);var f=Math.max(this.right,L.right);var A=Math.max(this.bottom,L.bottom);var x=Math.min(this.left,L.left);return new YAHOO.util.Region(C,f,A,x);};YAHOO.util.Region.prototype.toString=function(){return ("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(f){var v=YAHOO.util.Dom.getXY(f);var C=v[1];var L=v[0]+f.offsetWidth;var A=v[1]+f.offsetHeight;var x=v[0];return new YAHOO.util.Region(C,L,A,x);};YAHOO.util.Point=function(A,C){if(A instanceof Array){C=A[1];A=A[0];}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=C;};YAHOO.util.Point.prototype=new YAHOO.util.Region();