/*
 * Ext - JS Library 1.0 Alpha 3 - Rev 4
 * Copyright(c) 2006-2007, Jack Slocum.
 * 
 * http://www.extjs.com/license.txt
 */

(function(){var Y=YAHOO.util,_2,_3,_4=0,_5={};var ua=navigator.userAgent.toLowerCase(),_7=(ua.indexOf("opera")>-1),_8=(ua.indexOf("safari")>-1),_9=(!_7&&!_8&&ua.indexOf("gecko")>-1),_a=(!_7&&ua.indexOf("msie")>-1);var _b={HYPHEN:/(-[a-z])/i};var _c=function(_d){if(!_b.HYPHEN.test(_d)){return _d;}if(_5[_d]){return _5[_d];}while(_b.HYPHEN.exec(_d)){_d=_d.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}_5[_d]=_d;return _d;};if(document.defaultView&&document.defaultView.getComputedStyle){_2=function(el,_f){var _10=null;var _11=document.defaultView.getComputedStyle(el,"");if(_11){_10=_11[_c(_f)];}return el.style[_f]||_10;};}else{if(document.documentElement.currentStyle&&_a){_2=function(el,_13){switch(_c(_13)){case "opacity":var val=100;try{val=el.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(e){try{val=el.filters("alpha").opacity;}catch(e){}}return val/100;break;default:var _15=el.currentStyle?el.currentStyle[_13]:null;return (el.style[_13]||_15);}};}else{_2=function(el,_17){return el.style[_17];};}}if(_a){_3=function(el,_19,val){switch(_19){case "opacity":if(typeof el.style.filter=="string"){el.style.filter="alpha(opacity="+val*100+")";if(!el.currentStyle||!el.currentStyle.hasLayout){el.style.zoom=1;}}break;default:el.style[_19]=val;}};}else{_3=function(el,_1c,val){el.style[_1c]=val;};}YAHOO.util.Dom={get:function(el){if(!el){return null;}if(typeof el!="string"&&!(el instanceof Array)){return el;}if(typeof el=="string"){return document.getElementById(el);}else{var _1f=[];for(var i=0,len=el.length;i<len;++i){_1f[_1f.length]=Y.Dom.get(el[i]);}return _1f;}return null;},getStyle:function(el,_23){_23=_c(_23);var f=function(_25){return _2(_25,_23);};return Y.Dom.batch(el,f,Y.Dom,true);},setStyle:function(el,_27,val){_27=_c(_27);var f=function(_2a){_3(_2a,_27,val);};Y.Dom.batch(el,f,Y.Dom,true);},getXY:function(el){var f=function(el){if(el.parentNode===null||el.offsetParent===null||this.getStyle(el,"display")=="none"){return false;}var _2e=null;var pos=[];var box;if(el.getBoundingClientRect){box=el.getBoundingClientRect();var doc=document;if(!this.inDocument(el)&&parent.document!=document){doc=parent.document;if(!this.isAncestor(doc.documentElement,el)){return false;}}var _32=Math.max(doc.documentElement.scrollTop,doc.body.scrollTop);var _33=Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft);return [box.left+_33,box.top+_32];}else{pos=[el.offsetLeft,el.offsetTop];_2e=el.offsetParent;var _34=false;if(_2e!=el){while(_2e){pos[0]+=_2e.offsetLeft;pos[1]+=_2e.offsetTop;if(_8&&!_34&&this.getStyle(_2e,"position")=="absolute"){_34=true;}_2e=_2e.offsetParent;}}if(_8&&(_34||this.getStyle(el,"position")=="absolute")){pos[0]-=document.body.offsetLeft;pos[1]-=document.body.offsetTop;}}if(el.parentNode){_2e=el.parentNode;}else{_2e=null;}while(_2e&&_2e.tagName.toUpperCase()!="BODY"&&_2e.tagName.toUpperCase()!="HTML"){if(Y.Dom.getStyle(_2e,"display")!="inline"){pos[0]-=_2e.scrollLeft;pos[1]-=_2e.scrollTop;}if(_2e.parentNode){_2e=_2e.parentNode;}else{_2e=null;}}return pos;};return Y.Dom.batch(el,f,Y.Dom,true);},getX:function(el){var f=function(el){return Y.Dom.getXY(el)[0];};return Y.Dom.batch(el,f,Y.Dom,true);},getY:function(el){var f=function(el){return Y.Dom.getXY(el)[1];};return Y.Dom.batch(el,f,Y.Dom,true);},setXY:function(el,pos,_3d){var f=function(el){var _40=this.getStyle(el,"position");if(_40=="static"){this.setStyle(el,"position","relative");_40="relative";}var _41=this.getXY(el);if(_41===false){return false;}var _42=[parseInt(this.getStyle(el,"left"),10),parseInt(this.getStyle(el,"top"),10)];if(isNaN(_42[0])){_42[0]=(_40=="relative")?0:el.offsetLeft;}if(isNaN(_42[1])){_42[1]=(_40=="relative")?0:el.offsetTop;}if(pos[0]!==null){el.style.left=pos[0]-_41[0]+_42[0]+"px";}if(pos[1]!==null){el.style.top=pos[1]-_41[1]+_42[1]+"px";}var _43=this.getXY(el);if(!_3d&&(_43[0]!=pos[0]||_43[1]!=pos[1])){this.setXY(el,pos,true);}};Y.Dom.batch(el,f,Y.Dom,true);},setX:function(el,x){Y.Dom.setXY(el,[x,null]);},setY:function(el,y){Y.Dom.setXY(el,[null,y]);},getRegion:function(el){var f=function(el){var _4b=new Y.Region.getRegion(el);return _4b;};return Y.Dom.batch(el,f,Y.Dom,true);},getClientWidth:function(){return Y.Dom.getViewportWidth();},getClientHeight:function(){return Y.Dom.getViewportHeight();},getElementsByClassName:function(_4c,tag,_4e){var _4f=function(el){return Y.Dom.hasClass(el,_4c);};return Y.Dom.getElementsBy(_4f,tag,_4e);},hasClass:function(el,_52){var re=new RegExp("(?:^|\\s+)"+_52+"(?:\\s+|$)");var f=function(el){return re.test(el["className"]);};return Y.Dom.batch(el,f,Y.Dom,true);},addClass:function(el,_57){var f=function(el){if(this.hasClass(el,_57)){return;}el["className"]=[el["className"],_57].join(" ");};Y.Dom.batch(el,f,Y.Dom,true);},removeClass:function(el,_5b){var re=new RegExp("(?:^|\\s+)"+_5b+"(?:\\s+|$)","g");var f=function(el){if(!this.hasClass(el,_5b)){return;}var c=el["className"];el["className"]=c.replace(re," ");if(this.hasClass(el,_5b)){this.removeClass(el,_5b);}};Y.Dom.batch(el,f,Y.Dom,true);},replaceClass:function(el,_61,_62){if(_61===_62){return false;}var re=new RegExp("(?:^|\\s+)"+_61+"(?:\\s+|$)","g");var f=function(el){if(!this.hasClass(el,_61)){this.addClass(el,_62);return;}el["className"]=el["className"].replace(re," "+_62+" ");if(this.hasClass(el,_61)){this.replaceClass(el,_61,_62);}};Y.Dom.batch(el,f,Y.Dom,true);},generateId:function(el,_67){_67=_67||"yui-gen";el=el||{};var f=function(el){if(el){el=Y.Dom.get(el);}else{el={};}if(!el.id){el.id=_67+_4++;}return el.id;};return Y.Dom.batch(el,f,Y.Dom,true);},isAncestor:function(_6a,_6b){_6a=Y.Dom.get(_6a);if(!_6a||!_6b){return false;}var f=function(_6d){if(_6a.contains&&!_8){return _6a.contains(_6d);}else{if(_6a.compareDocumentPosition){return !!(_6a.compareDocumentPosition(_6d)&16);}else{var _6e=_6d.parentNode;while(_6e){if(_6e==_6a){return true;}else{if(!_6e.tagName||_6e.tagName.toUpperCase()=="HTML"){return false;}}_6e=_6e.parentNode;}return false;}}};return Y.Dom.batch(_6b,f,Y.Dom,true);},inDocument:function(el){var f=function(el){return this.isAncestor(document.documentElement,el);};return Y.Dom.batch(el,f,Y.Dom,true);},getElementsBy:function(_72,tag,_74){tag=tag||"*";_74=Y.Dom.get(_74)||document;var _75=[];var _76=_74.getElementsByTagName(tag);if(!_76.length&&(tag=="*"&&_74.all)){_76=_74.all;}for(var i=0,len=_76.length;i<len;++i){if(_72(_76[i])){_75[_75.length]=_76[i];}}return _75;},batch:function(el,_7a,o,_7c){var id=el;el=Y.Dom.get(el);var _7e=(_7c)?o:window;if(!el||el.tagName||!el.length){if(!el){return false;}return _7a.call(_7e,el,o);}var _7f=[];for(var i=0,len=el.length;i<len;++i){if(!el[i]){id=el[i];}_7f[_7f.length]=_7a.call(_7e,el[i],o);}return _7f;},getDocumentHeight:function(){var _82=(document.compatMode!="CSS1Compat")?document.body.scrollHeight:document.documentElement.scrollHeight;var h=Math.max(_82,Y.Dom.getViewportHeight());return h;},getDocumentWidth:function(){var _84=(document.compatMode!="CSS1Compat")?document.body.scrollWidth:document.documentElement.scrollWidth;var w=Math.max(_84,Y.Dom.getViewportWidth());return w;},getViewportHeight:function(){var _86=self.innerHeight;var _87=document.compatMode;if((_87||_a)&&!_7){_86=(_87=="CSS1Compat")?document.documentElement.clientHeight:document.body.clientHeight;}return _86;},getViewportWidth:function(){var _88=self.innerWidth;var _89=document.compatMode;if(_89||_a){_88=(_89=="CSS1Compat")?document.documentElement.clientWidth:document.body.clientWidth;}return _88;}};})();YAHOO.util.Region=function(t,r,b,l){this.top=t;this[1]=t;this.right=r;this.bottom=b;this.left=l;this[0]=l;};YAHOO.util.Region.prototype.contains=function(_8e){return (_8e.left>=this.left&&_8e.right<=this.right&&_8e.top>=this.top&&_8e.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return ((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(_8f){var t=Math.max(this.top,_8f.top);var r=Math.min(this.right,_8f.right);var b=Math.min(this.bottom,_8f.bottom);var l=Math.max(this.left,_8f.left);if(b>=t&&r>=l){return new YAHOO.util.Region(t,r,b,l);}else{return null;}};YAHOO.util.Region.prototype.union=function(_94){var t=Math.min(this.top,_94.top);var r=Math.max(this.right,_94.right);var b=Math.max(this.bottom,_94.bottom);var l=Math.min(this.left,_94.left);return new YAHOO.util.Region(t,r,b,l);};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(el){var p=YAHOO.util.Dom.getXY(el);var t=p[1];var r=p[0]+el.offsetWidth;var b=p[1]+el.offsetHeight;var l=p[0];return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Point=function(x,y){if(x instanceof Array){y=x[1];x=x[0];}this.x=this.right=this.left=this[0]=x;this.y=this.top=this.bottom=this[1]=y;};YAHOO.util.Point.prototype=new YAHOO.util.Region();
