var X=(function(){var t=document,h=window,a=function(){return 0},b=function(){return null},n=function(){for(var d=0;d<arguments.length;++d){if(typeof(arguments[d])=="undefined"){return false}}return true},p=(function(){if((!t.compatMode||t.compatMode=="CSS1Compat")&&!h.opera&&t.documentElement&&t.documentElement.clientHeight){return function(){return t.documentElement.clientHeight}}else{if(t.body&&t.body.clientHeight){return function(){return t.body.clientHeight}}else{if(n(h.innerWidth,h.innerHeight,t.width)){return function(){var d=h.innerHeight;if(t.width>h.innerWidth){d-=16}return d}}else{return a}}}})(),v=(function(){if((!t.compatMode||t.compatMode=="CSS1Compat")&&!h.opera&&t.documentElement&&t.documentElement.clientWidth){return function(){return t.documentElement.clientWidth}}else{if(t.body&&t.body.clientWidth){return function(){return t.body.clientWidth}}else{if(n(h.innerWidth,h.innerHeight,t.height)){return function(){var d=h.innerWidth;if(t.height>h.innerHeight){d-=16}return d}}else{return a}}}})(),f=(function(){if(document.getElementById){return function(d){if(typeof(d)==="string"){return document.getElementById(d)}return d}}else{if(document.all){return function(d){if(typeof(d)==="string"){return document.all[d]}return d}}else{return b}}})(),j=function(){for(var d=0;d<arguments.length;++d){if(isNaN(arguments[d])||typeof(arguments[d])!="number"){return false}}return true},r=function(w){for(var d=0;d<arguments.length;++d){if(typeof(arguments[d])!="string"){return false}}return true},c=function(w){var x,z,d=w.split("-"),y=d[0];for(x=1;x<d.length;++x){z=d[x].charAt(0);y+=d[x].replace(z,z.toUpperCase())}return y},u=function(A,z,x){if(!(A=f(A))){return null}var y,d="undefined",w=document.defaultView;if(w&&w.getComputedStyle){y=w.getComputedStyle(A,"");if(y){d=y.getPropertyValue(z)}}else{if(A.currentStyle){d=A.currentStyle[c(z)]}else{return null}}return x?(parseInt(d,10)||0):d},m=function(A,d){var y,z,C,B,x;if(!(A=f(A))){return 0}if(j(d)){if(d<0){d=0}else{d=Math.round(d)}}else{d=-1}y=n(A.style);if(A==document||A.tagName.toLowerCase()=="html"||A.tagName.toLowerCase()=="body"){d=v()}else{if(y&&n(A.offsetWidth)&&r(A.style.width)){if(d>=0){z=0;C=0;B=0;x=0;if(document.compatMode=="CSS1Compat"){z=u(A,"padding-left",1);if(z!==null){C=u(A,"padding-right",1);B=u(A,"border-left-width",1);x=u(A,"border-right-width",1)}else{if(n(A.offsetWidth,A.style.width)){A.style.width=d+"px";z=A.offsetWidth-d}}}d-=(z+C+B+x);if(isNaN(d)||d<0){return}else{A.style.width=d+"px"}}d=A.offsetWidth}else{if(y&&n(A.style.pixelWidth)){if(d>=0){A.style.pixelWidth=d}d=A.style.pixelWidth}}}return d},g=function(A,y){var x,z,w,d,B;if(!(A=f(A))){return 0}if(j(y)){if(y<0){y=0}else{y=Math.round(y)}}else{y=-1}x=n(A.style);if(A==document||A.tagName.toLowerCase()=="html"||A.tagName.toLowerCase()=="body"){y=p()}else{if(x&&n(A.offsetHeight)&&r(A.style.height)){if(y>=0){z=0;w=0;d=0;B=0;if(document.compatMode=="CSS1Compat"){z=u(A,"padding-top",1);if(z!==null){w=u(A,"padding-bottom",1);d=u(A,"border-top-width",1);B=u(A,"border-bottom-width",1)}else{if(n(A.offsetHeight,A.style.height)){A.style.height=y+"px";z=A.offsetHeight-y}}}y-=(z+w+d+B);if(isNaN(y)||y<0){return}else{A.style.height=y+"px"}}y=A.offsetHeight}else{if(x&&n(A.style.pixelHeight)){if(y>=0){A.style.pixelHeight=y}y=A.style.pixelHeight}}}return y},s=function(y,d,x){m(y,d);g(y,x)},i=function(x,d){if(!(x=f(x))){return 0}var w=n(x.style);if(w&&r(x.style.left)){if(j(d)){x.style.left=d+"px"}else{d=parseInt(x.style.left,10);if(isNaN(d)){d=u(x,"left",1)}if(isNaN(d)){d=0}}}else{if(w&&n(x.style.pixelLeft)){if(j(d)){x.style.pixelLeft=d}else{d=x.style.pixelLeft}}}return d},o=function(w,x){if(!(w=f(w))){return 0}var d=n(w.style);if(d&&r(w.style.top)){if(j(x)){w.style.top=x+"px"}else{x=parseInt(w.style.top,10);if(isNaN(x)){x=u(w,"top",1)}if(isNaN(x)){x=0}}}else{if(d&&n(w.style.pixelTop)){if(j(x)){w.style.pixelTop=x}else{x=w.style.pixelTop}}}return x},e=function(w,d,z){i(w,d);o(w,z)},q=function(y,x){var z=0,d;if(!n(y)||x||y==document||y.tagName.toLowerCase()=="html"||y.tagName.toLowerCase()=="body"){d=window;if(x&&y){d=y}if(d.document.documentElement&&d.document.documentElement.scrollTop){z=d.document.documentElement.scrollTop}else{if(d.document.body&&n(d.document.body.scrollTop)){z=d.document.body.scrollTop}}}else{y=f(y);if(y&&j(y.scrollTop)){z=y.scrollTop}}return z},k=function(y,x){var z=0,d;if(!n(y)||x||y==document||y.tagName.toLowerCase()=="html"||y.tagName.toLowerCase()=="body"){d=window;if(x&&y){d=y}if(d.document.documentElement&&d.document.documentElement.scrollLeft){z=d.document.documentElement.scrollLeft}else{if(d.document.body&&n(d.document.body.scrollLeft)){z=d.document.body.scrollLeft}}}else{y=f(y);if(y&&j(y.scrollLeft)){z=y.scrollLeft}}return z},l=function(D,A,B){var C=v(),z=p(),d=0,E=0;D=f(D);if(D){A=A||m(D);B=B||g(D);if(C<A){A=C}else{d=(C-A)/2}if(z<B){B=z}else{E=(z-B)/2}d+=k();E+=q();e(D,d,E)}};return{clientWidth:v,clientHeight:p,getElementById:f,num:j,str:r,getComputedStyle:u,camelize:c,width:m,height:g,resizeTo:s,left:i,top:o,moveTo:e,scrollTop:q,scrollLeft:k,center:l}})();
