(function(){var h=YAHOO.util,j,J,k={},r={},q=window.document;YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.env.ua.opera,B=YAHOO.env.ua.webkit,D=YAHOO.env.ua.gecko,R=YAHOO.env.ua.ie;var c={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i,OP_SCROLL:/^(?:inline|table-row)$/i};var P=function(p){if(!c.HYPHEN.test(p)){return p;}if(k[p]){return k[p];}var N=p;while(c.HYPHEN.exec(N)){N=N.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}k[p]=N;return N;};var Z=function(N){var p=r[N];if(!p){p=new RegExp("(?:^|\\s+)"+N+"(?:\\s+|$)");r[N]=p;}return p;};if(q.defaultView&&q.defaultView.getComputedStyle){j=function(p,l){var u=null;if(l=="float"){l="cssFloat";}var N=p.ownerDocument.defaultView.getComputedStyle(p,"");if(N){u=N[P(l)];}return p.style[l]||u;};}else{if(q.documentElement.currentStyle&&R){j=function(p,u){switch(P(u)){case "opacity":var v=100;try{v=p.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(l){try{v=p.filters("alpha").opacity;}catch(l){}}return v/100;case "float":u="styleFloat";default:var N=p.currentStyle?p.currentStyle[u]:null;return (p.style[u]||N);}};}else{j=function(p,N){return p.style[N];};}}if(R){J=function(p,N,u){switch(N){case "opacity":if(YAHOO.lang.isString(p.style.filter)){p.style.filter="alpha(opacity="+u*100+")";if(!p.currentStyle||!p.currentStyle.hasLayout){p.style.zoom=1;}}break;case "float":N="styleFloat";default:p.style[N]=u;}};}else{J=function(p,N,u){if(N=="float"){N="cssFloat";}p.style[N]=u;};}var X=function(p,N){return p&&p.nodeType==1&&(!N||N(p));};YAHOO.util.Dom={get:function(u){if(u&&(u.nodeType||u.item)){return u;}if(YAHOO.lang.isString(u)||!u){return q.getElementById(u);}if(u.length!==undefined){var l=[];for(var N=0,p=u.length;N<p;++N){l[l.length]=h.Dom.get(u[N]);}return l;}return u;},getStyle:function(p,u){u=P(u);var N=function(l){return j(l,u);};return h.Dom.batch(p,N,h.Dom,true);},setStyle:function(p,u,l){u=P(u);var N=function(v){J(v,u,l);};h.Dom.batch(p,N,h.Dom,true);},getXY:function(p){var N=function(u){if((u.parentNode===null||u.offsetParent===null||this.getStyle(u,"display")=="none")&&u!=u.ownerDocument.body){return false;}return m(u);};return h.Dom.batch(p,N,h.Dom,true);},getX:function(p){var N=function(u){return h.Dom.getXY(u)[0];};return h.Dom.batch(p,N,h.Dom,true);},getY:function(p){var N=function(u){return h.Dom.getXY(u)[1];};return h.Dom.batch(p,N,h.Dom,true);},setXY:function(p,l,u){var N=function(s){var f=this.getStyle(s,"position");if(f=="static"){this.setStyle(s,"position","relative");f="relative";}var W=this.getXY(s);if(W===false){return false;}var o=[parseInt(this.getStyle(s,"left"),10),parseInt(this.getStyle(s,"top"),10)];if(isNaN(o[0])){o[0]=(f=="relative")?0:s.offsetLeft;}if(isNaN(o[1])){o[1]=(f=="relative")?0:s.offsetTop;}if(l[0]!==null){s.style.left=l[0]-W[0]+o[0]+"px";}if(l[1]!==null){s.style.top=l[1]-W[1]+o[1]+"px";}if(!u){var v=this.getXY(s);if((l[0]!==null&&v[0]!=l[0])||(l[1]!==null&&v[1]!=l[1])){this.setXY(s,l,true);}}};h.Dom.batch(p,N,h.Dom,true);},setX:function(N,p){h.Dom.setXY(N,[p,null]);},setY:function(p,N){h.Dom.setXY(p,[null,N]);},getRegion:function(p){var N=function(u){if((u.parentNode===null||u.offsetParent===null||this.getStyle(u,"display")=="none")&&u!=u.ownerDocument.body){return false;}var l=h.Region.getRegion(u);return l;};return h.Dom.batch(p,N,h.Dom,true);},getClientWidth:function(){return h.Dom.getViewportWidth();},getClientHeight:function(){return h.Dom.getViewportHeight();},getElementsByClassName:function(v,W,f,s){W=W||"*";f=(f)?h.Dom.get(f):null||q;if(!f){return [];}var N=[],p=f.getElementsByTagName(W),o=Z(v);for(var u=0,l=p.length;u<l;++u){if(o.test(p[u].className)){N[N.length]=p[u];if(s){s.call(p[u],p[u]);}}}return N;},hasClass:function(u,N){var p=Z(N);var l=function(v){return p.test(v.className);};return h.Dom.batch(u,l,h.Dom,true);},addClass:function(N,p){var u=function(l){if(this.hasClass(l,p)){return false;}l.className=YAHOO.lang.trim([l.className,p].join(" "));return true;};return h.Dom.batch(N,u,h.Dom,true);},removeClass:function(u,N){var p=Z(N);var l=function(v){if(!N||!this.hasClass(v,N)){return false;}var f=v.className;v.className=f.replace(p," ");if(this.hasClass(v,N)){this.removeClass(v,N);}v.className=YAHOO.lang.trim(v.className);return true;};return h.Dom.batch(u,l,h.Dom,true);},replaceClass:function(l,N,p){if(!p||N===p){return false;}var u=Z(N);var v=function(f){if(!this.hasClass(f,N)){this.addClass(f,p);return true;}f.className=f.className.replace(u," "+p+" ");if(this.hasClass(f,N)){this.replaceClass(f,N,p);}f.className=YAHOO.lang.trim(f.className);return true;};return h.Dom.batch(l,v,h.Dom,true);},generateId:function(p,u){u=u||"yui-gen";var N=function(l){if(l&&l.id){return l.id;}var v=u+YAHOO.env._id_counter++;if(l){l.id=v;}return v;};return h.Dom.batch(p,N,h.Dom,true)||N.apply(h.Dom,arguments);},isAncestor:function(p,N){p=h.Dom.get(p);N=h.Dom.get(N);if(!p||!N){return false;}if(p.contains&&N.nodeType&&!B){return p.contains(N);}else{if(p.compareDocumentPosition&&N.nodeType){return !!(p.compareDocumentPosition(N)&16);}else{if(N.nodeType){return !!this.getAncestorBy(N,function(u){return u==p;});}}}return false;},inDocument:function(p){return this.isAncestor(q.documentElement,p);},getElementsBy:function(o,N,u,v){N=N||"*";u=(u)?h.Dom.get(u):null||q;if(!u){return [];}var l=[],s=u.getElementsByTagName(N);for(var f=0,p=s.length;f<p;++f){if(o(s[f])){l[l.length]=s[f];if(v){v(s[f]);}}}return l;},batch:function(v,W,s,u){v=(v&&(v.tagName||v.item))?v:h.Dom.get(v);if(!v||!W){return false;}var l=(u)?s:window;if(v.tagName||v.length===undefined){return W.call(l,v,s);}var f=[];for(var N=0,p=v.length;N<p;++N){f[f.length]=W.call(l,v[N],s);}return f;},getDocumentHeight:function(){var N=(q.compatMode!="CSS1Compat")?q.body.scrollHeight:q.documentElement.scrollHeight;var p=Math.max(N,h.Dom.getViewportHeight());return p;},getDocumentWidth:function(){var N=(q.compatMode!="CSS1Compat")?q.body.scrollWidth:q.documentElement.scrollWidth;var p=Math.max(N,h.Dom.getViewportWidth());return p;},getViewportHeight:function(){var p=self.innerHeight;var N=q.compatMode;if((N||R)&&!e){p=(N=="CSS1Compat")?q.documentElement.clientHeight:q.body.clientHeight;}return p;},getViewportWidth:function(){var p=self.innerWidth;var N=q.compatMode;if(N||R){p=(N=="CSS1Compat")?q.documentElement.clientWidth:q.body.clientWidth;}return p;},getAncestorBy:function(p,N){while(p=p.parentNode){if(X(p,N)){return p;}}return null;},getAncestorByClassName:function(N,p){N=h.Dom.get(N);if(!N){return null;}var u=function(l){return h.Dom.hasClass(l,p);};return h.Dom.getAncestorBy(N,u);},getAncestorByTagName:function(N,p){N=h.Dom.get(N);if(!N){return null;}var u=function(l){return l.tagName&&l.tagName.toUpperCase()==p.toUpperCase();};return h.Dom.getAncestorBy(N,u);},getPreviousSiblingBy:function(p,N){while(p){p=p.previousSibling;if(X(p,N)){return p;}}return null;},getPreviousSibling:function(p){p=h.Dom.get(p);if(!p){return null;}return h.Dom.getPreviousSiblingBy(p);},getNextSiblingBy:function(p,N){while(p){p=p.nextSibling;if(X(p,N)){return p;}}return null;},getNextSibling:function(p){p=h.Dom.get(p);if(!p){return null;}return h.Dom.getNextSiblingBy(p);},getFirstChildBy:function(p,u){var N=(X(p.firstChild,u))?p.firstChild:null;return N||h.Dom.getNextSiblingBy(p.firstChild,u);},getFirstChild:function(p,N){p=h.Dom.get(p);if(!p){return null;}return h.Dom.getFirstChildBy(p);},getLastChildBy:function(p,u){if(!p){return null;}var N=(X(p.lastChild,u))?p.lastChild:null;return N||h.Dom.getPreviousSiblingBy(p.lastChild,u);},getLastChild:function(p){p=h.Dom.get(p);return h.Dom.getLastChildBy(p);},getChildrenBy:function(N,l){var u=h.Dom.getFirstChildBy(N,l);var p=u?[u]:[];h.Dom.getNextSiblingBy(u,function(v){if(!l||l(v)){p[p.length]=v;}return false;});return p;},getChildren:function(p){p=h.Dom.get(p);if(!p){}return h.Dom.getChildrenBy(p);},getDocumentScrollLeft:function(p){p=p||q;return Math.max(p.documentElement.scrollLeft,p.body.scrollLeft);},getDocumentScrollTop:function(p){p=p||q;return Math.max(p.documentElement.scrollTop,p.body.scrollTop);},insertBefore:function(N,p){N=h.Dom.get(N);p=h.Dom.get(p);if(!N||!p||!p.parentNode){return null;}return p.parentNode.insertBefore(N,p);},insertAfter:function(N,p){N=h.Dom.get(N);p=h.Dom.get(p);if(!N||!p||!p.parentNode){return null;}if(p.nextSibling){return p.parentNode.insertBefore(N,p.nextSibling);}else{return p.parentNode.appendChild(N);}},getClientRegion:function(){var u=h.Dom.getDocumentScrollTop(),N=h.Dom.getDocumentScrollLeft(),v=h.Dom.getViewportWidth()+N,p=h.Dom.getViewportHeight()+u;return new h.Region(u,v,p,N);}};var m=function(){if(q.documentElement.getBoundingClientRect){return function(N){var u=N.getBoundingClientRect();var p=N.ownerDocument;return [u.left+h.Dom.getDocumentScrollLeft(p),u.top+h.Dom.getDocumentScrollTop(p)];};}else{return function(u){var l=[u.offsetLeft,u.offsetTop];var N=u.offsetParent;var p=(B&&h.Dom.getStyle(u,"position")=="absolute"&&u.offsetParent==u.ownerDocument.body);if(N!=u){while(N){l[0]+=N.offsetLeft;l[1]+=N.offsetTop;if(!p&&B&&h.Dom.getStyle(N,"position")=="absolute"){p=true;}N=N.offsetParent;}}if(p){l[0]-=u.ownerDocument.body.offsetLeft;l[1]-=u.ownerDocument.body.offsetTop;}N=u.parentNode;while(N.tagName&&!c.ROOT_TAG.test(N.tagName)){if(N.scrollTop||N.scrollLeft){if(!c.OP_SCROLL.test(h.Dom.getStyle(N,"display"))){if(!e||h.Dom.getStyle(N,"overflow")!=="visible"){l[0]-=N.scrollLeft;l[1]-=N.scrollTop;}}}N=N.parentNode;}return l;};}}();})();YAHOO.util.Region=function(e,X,D,h){this.top=e;this[1]=e;this.right=X;this.bottom=D;this.left=h;this[0]=h;};YAHOO.util.Region.prototype.contains=function(D){return (D.left>=this.left&&D.right<=this.right&&D.top>=this.top&&D.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return ((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(c){var e=Math.max(this.top,c.top);var X=Math.min(this.right,c.right);var D=Math.min(this.bottom,c.bottom);var h=Math.max(this.left,c.left);if(D>=e&&X>=h){return new YAHOO.util.Region(e,X,D,h);}else{return null;}};YAHOO.util.Region.prototype.union=function(c){var e=Math.min(this.top,c.top);var X=Math.max(this.right,c.right);var D=Math.max(this.bottom,c.bottom);var h=Math.min(this.left,c.left);return new YAHOO.util.Region(e,X,D,h);};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(X){var R=YAHOO.util.Dom.getXY(X);var e=R[1];var c=R[0]+X.offsetWidth;var D=R[1]+X.offsetHeight;var h=R[0];return new YAHOO.util.Region(e,c,D,h);};YAHOO.util.Point=function(D,h){if(YAHOO.lang.isArray(D)){h=D[1];D=D[0];}this.x=this.right=this.left=this[0]=D;this.y=this.top=this.bottom=this[1]=h;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.5.1",build:"984"});