YAHOO.util.Dom=new function(){this.get=function(a){if(typeof a=="string"){a=document.getElementById(a)}return a};this.getStyle=function(b,d){var c=null;var a=document.defaultView;b=this.get(b);if(d=="opacity"&&b.filters){c=1;try{c=b.filters.item("DXImageTransform.Microsoft.Alpha").opacity/100}catch(g){try{c=b.filters.item("alpha").opacity/100}catch(g){}}}else{if(b.style[d]){c=b.style[d]}else{if(b.currentStyle&&b.currentStyle[d]){c=b.currentStyle[d]}else{if(a&&a.getComputedStyle){var f="";for(i=0,len=d.length;i<len;++i){if(d.charAt(i)==d.charAt(i).toUpperCase()){f=f+"-"+d.charAt(i).toLowerCase()}else{f=f+d.charAt(i)}}if(a.getComputedStyle(b,"").getPropertyValue(f)){c=a.getComputedStyle(b,"").getPropertyValue(f)}}}}}return c};this.setStyle=function(a,b,c){a=this.get(a);switch(b){case"opacity":if(a.filters){a.style.filter="alpha(opacity="+c*100+")";if(!a.currentStyle.hasLayout){a.style.zoom=1}}else{a.style.opacity=c;a.style["-moz-opacity"]=c;a.style["-khtml-opacity"]=c}break;default:a.style[b]=c}};this.getXY=function(c){c=this.get(c);if(c.parentNode===null||this.getStyle(c,"display")=="none"){return false}var b=null;var g=[];var d;if(c.getBoundingClientRect){d=c.getBoundingClientRect();var e=document.documentElement.scrollTop||document.body.scrollTop;var f=document.documentElement.scrollLeft||document.body.scrollLeft;return[d.left+f,d.top+e]}else{if(document.getBoxObjectFor){d=document.getBoxObjectFor(c);g=[d.x,d.y]}else{g=[c.offsetLeft,c.offsetTop];b=c.offsetParent;if(b!=c){while(b){g[0]+=b.offsetLeft;g[1]+=b.offsetTop;b=b.offsetParent}}var a=navigator.userAgent.toLowerCase();if(a.indexOf("opera")!=-1||(a.indexOf("safari")!=-1&&this.getStyle(c,"position")=="absolute")){g[1]-=document.body.offsetTop}}}if(c.parentNode){b=c.parentNode}else{b=null}while(b&&b.tagName!="BODY"&&b.tagName!="HTML"){g[0]-=b.scrollLeft;g[1]-=b.scrollTop;if(b.parentNode){b=b.parentNode}else{b=null}}return g};this.getX=function(a){return this.getXY(a)[0]};this.getY=function(a){return this.getXY(a)[1]};this.setXY=function(b,f,e){b=this.get(b);var d=YAHOO.util.Dom.getXY(b);if(d===false){return false}var c=[parseInt(YAHOO.util.Dom.getStyle(b,"left"),10),parseInt(YAHOO.util.Dom.getStyle(b,"top"),10)];if(isNaN(c[0])){c[0]=0}if(isNaN(c[1])){c[1]=0}if(f[0]!==null){b.style.left=f[0]-d[0]+c[0]+"px"}if(f[1]!==null){b.style.top=f[1]-d[1]+c[1]+"px"}var a=this.getXY(b);if(!e&&(a[0]!=f[0]||a[1]!=f[1])){this.setXY(b,f,true)}return true};this.setX=function(b,a){return this.setXY(b,[a,null])};this.setY=function(a,b){return this.setXY(a,[null,b])};this.getRegion=function(a){a=this.get(a);return new YAHOO.util.Region.getRegion(a)};this.getClientWidth=function(){return(document.documentElement.offsetWidth||document.body.offsetWidth)};this.getClientHeight=function(){return(self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)}};YAHOO.util.Region=function(d,e,a,c){this.top=d;this.right=e;this.bottom=a;this.left=c};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(f){var d=Math.max(this.top,f.top);var e=Math.min(this.right,f.right);var a=Math.min(this.bottom,f.bottom);var c=Math.max(this.left,f.left);if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c)}else{return null}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top);var e=Math.max(this.right,f.right);var a=Math.max(this.bottom,f.bottom);var c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c)};YAHOO.util.Region.prototype.toString=function(){return("Region {  t: "+this.top+", r: "+this.right+", b: "+this.bottom+", l: "+this.left+"}")};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e);var d=g[1];var f=g[0]+e.offsetWidth;var a=g[1]+e.offsetHeight;var c=g[0];return new YAHOO.util.Region(d,f,a,c)};YAHOO.util.Point=function(a,b){this.x=a;this.y=b;this.top=b;this.right=a;this.bottom=b;this.left=a};YAHOO.util.Point.prototype=new YAHOO.util.Region();
