function xAniSize(xa,w,h,tt,at,qc,oed,oea,oef){var a=xa.init(xa.e,at,qc,tt,onRun,onRun,oed,oea,oef);a.x1=xWidth(a.e);a.y1=xHeight(a.e);a.x2=w;a.y2=h;if(a.as)a.start();return a;function onRun(o){xResizeTo(o.e,Math.round(o.x),Math.round(o.y));}};
function xAniScroll(xa,x,y,tt,at,oed,oea,oef){var a=xa.init(xa.e,at,1,tt,onRun,onRun,oed,oea,oef);a.x1=xScrollLeft(a.e,1);a.y1=xScrollTop(a.e,1);a.x2=x;a.y2=y;if(a.as&&a.e.scrollTo)a.start();return a;function onRun(o){o.e.scrollTo(Math.round(o.x),Math.round(o.y));}};
function xAniOpacity(xa,o,tt,at,qc,oed,oea,oef){var a=xa.init(xa.e,at,qc,tt,onRun,onRun,oed,oea,oef);a.x1=xOpacity(a.e);a.x2=o;if(a.as)a.start();return a;function onRun(o){xOpacity(o.e,o.x);}};
function xAnimation(e,at,qc,tt,orf,otf,oed,oea,oef){this.init(e,at,qc,tt,orf,otf,oed,oea,oef);var a=xAnimation.instances;var i;for(i=0;i<a.length;++i){if(!a[i])break;}a[i]=this;this.idx=i;};xAnimation.instances=[];xAnimation.prototype.init=function(e,at,qc,tt,orf,otf,oed,oea,oef){this.e=xGetElementById(e);this.at=at||2;this.qc=qc||1;this.tt=tt;this.orf=orf;this.otf=otf;this.oed=oed;this.oea=oea;this.oef=oef;this.to=20;this.as=true;return this;};xAnimation.prototype.start=function(){var a=this;if(a.at==1){a.ap=1/a.tt;}else{a.ap=a.qc*(Math.PI/(2*a.tt));}if(xDef(a.x1)){a.xm=a.x2-a.x1;}if(xDef(a.y1)){a.ym=a.y2-a.y1;}if(!(a.qc%2)){if(xDef(a.x1))a.x2=a.x1;if(xDef(a.y1))a.y2=a.y1;}if(!a.tmr){var d=new Date();a.t1=d.getTime();a.tmr=setTimeout('xAnimation.run('+a.idx+')',1);}};xAnimation.run=function(i){var a=xAnimation.instances[i];if(!a){return;}var d=new Date();a.et=d.getTime()-a.t1;if(a.et<a.tt){a.tmr=setTimeout('xAnimation.run('+i+')',a.to);a.af=a.ap*a.et;if(a.at==2){a.af=Math.abs(Math.sin(a.af));}else if(a.at==3){a.af=1-Math.abs(Math.cos(a.af));}if(xDef(a.x1))a.x=a.xm*a.af+a.x1;if(xDef(a.y1))a.y=a.ym*a.af+a.y1;a.orf(a);}else{var rep=false;if(xDef(a.x2))a.x=a.x2;if(xDef(a.y2))a.y=a.y2;a.tmr=null;a.otf(a);if(xDef(a.oef)){if(a.oed)setTimeout(a.oef,a.oed);else if(xStr(a.oef)){rep=eval(a.oef);}else{rep=a.oef(a,a.oea);}}if(rep){a.resume(true);}}};xAnimation.prototype.pause=function(){var s=false;if(this.tmr){clearTimeout(this.tmr);this.tmr=null;s=true;}return s;};xAnimation.prototype.resume=function(fromStart){var s=false;if(!this.tmr){var d=new Date();this.t1=d.getTime();if(!fromStart)this.t1-=this.et;this.tmr=setTimeout('xAnimation.run('+this.idx+')',this.to);s=true;}return s;};xAnimation.prototype.kill=function(){this.pause();xAnimation.instances[this.idx]=null;};
function xScrollLeft(e,bWin){var offset=0;if(!xDef(e)||bWin||e==document||e.tagName.toLowerCase()=='html'||e.tagName.toLowerCase()=='body'){var w=window;if(bWin&&e)w=e;if(w.document.documentElement&&w.document.documentElement.scrollLeft)offset=w.document.documentElement.scrollLeft;else if(w.document.body&&xDef(w.document.body.scrollLeft))offset=w.document.body.scrollLeft;}else{e=xGetElementById(e);if(e&&xNum(e.scrollLeft))offset=e.scrollLeft;}return offset;};
function xScrollTop(e,bWin){var offset=0;if(!xDef(e)||bWin||e==document||e.tagName.toLowerCase()=='html'||e.tagName.toLowerCase()=='body'){var w=window;if(bWin&&e)w=e;if(w.document.documentElement&&w.document.documentElement.scrollTop)offset=w.document.documentElement.scrollTop;else if(w.document.body&&xDef(w.document.body.scrollTop))offset=w.document.body.scrollTop;}else{e=xGetElementById(e);if(e&&xNum(e.scrollTop))offset=e.scrollTop;}return offset;};
function xOpacity(e,o){var set=xDef(o);if(!(e=xGetElementById(e)))return 2;if(xStr(e.style.opacity)){if(set)e.style.opacity=o+'';else o=parseFloat(e.style.opacity);}else if(xStr(e.style.filter)){if(set)e.style.filter='alpha(opacity='+(100*o)+')';else if(e.filters&&e.filters.alpha){o=e.filters.alpha.opacity/100;}}else if(xStr(e.style.MozOpacity)){if(set)e.style.MozOpacity=o+'';else o=parseFloat(e.style.MozOpacity);}else if(xStr(e.style.KhtmlOpacity)){if(set)e.style.KhtmlOpacity=o+'';else o=parseFloat(e.style.KhtmlOpacity);}return isNaN(o)?1:o;};
function xResizeTo(e,w,h){xWidth(e,w);xHeight(e,h);};
function xClientHeight(){var v=0,d=document,w=window;if(d.compatMode=='CSS1Compat'&& !w.opera&&d.documentElement&&d.documentElement.clientHeight){v=d.documentElement.clientHeight;}else if(d.body&&d.body.clientHeight){v=d.body.clientHeight;}else if(xDef(w.innerWidth,w.innerHeight,d.width)){v=w.innerHeight;if(d.width>w.innerWidth)v-=16;}return v;};
function xWidth(e,w){if(!(e=xGetElementById(e)))return 0;if(xNum(w)){if(w<0)w=0;else w=Math.round(w);}else w= -1;var css=xDef(e.style);if(e==document||e.tagName.toLowerCase()=='html'||e.tagName.toLowerCase()=='body'){w=xClientWidth();}else if(css&&xDef(e.offsetWidth)&&xStr(e.style.width)){if(w>=0){var pl=0,pr=0,bl=0,br=0;if(document.compatMode=='CSS1Compat'){var gcs=xGetComputedStyle;pl=gcs(e,'padding-left',1);if(pl!==null){pr=gcs(e,'padding-right',1);bl=gcs(e,'border-left-width',1);br=gcs(e,'border-right-width',1);}else if(xDef(e.offsetWidth,e.style.width)){e.style.width=w+'px';pl=e.offsetWidth-w;}}w-=(pl+pr+bl+br);if(isNaN(w)||w<0)return;else e.style.width=w+'px';}w=e.offsetWidth;}else if(css&&xDef(e.style.pixelWidth)){if(w>=0)e.style.pixelWidth=w;w=e.style.pixelWidth;}return w;};
function xHeight(e,h){if(!(e=xGetElementById(e)))return 0;if(xNum(h)){if(h<0)h=0;else h=Math.round(h);}else h= -1;var css=xDef(e.style);if(e==document||e.tagName.toLowerCase()=='html'||e.tagName.toLowerCase()=='body'){h=xClientHeight();}else if(css&&xDef(e.offsetHeight)&&xStr(e.style.height)){if(h>=0){var pt=0,pb=0,bt=0,bb=0;if(document.compatMode=='CSS1Compat'){var gcs=xGetComputedStyle;pt=gcs(e,'padding-top',1);if(pt!==null){pb=gcs(e,'padding-bottom',1);bt=gcs(e,'border-top-width',1);bb=gcs(e,'border-bottom-width',1);}else if(xDef(e.offsetHeight,e.style.height)){e.style.height=h+'px';pt=e.offsetHeight-h;}}h-=(pt+pb+bt+bb);if(isNaN(h)||h<0)return;else e.style.height=h+'px';}h=e.offsetHeight;}else if(css&&xDef(e.style.pixelHeight)){if(h>=0)e.style.pixelHeight=h;h=e.style.pixelHeight;}return h;};
function xPageY(e){var y=0;e=xGetElementById(e);while(e){if(xDef(e.offsetTop))y+=e.offsetTop;e=xDef(e.offsetParent)?e.offsetParent:null;}return y;};
function xPageX(e){var x=0;e=xGetElementById(e);while(e){if(xDef(e.offsetLeft))x+=e.offsetLeft;e=xDef(e.offsetParent)?e.offsetParent:null;}return x;};
function xParent(e,bNode){if(!(e=xGetElementById(e)))return null;var p=null;if(!bNode&&xDef(e.offsetParent))p=e.offsetParent;else if(xDef(e.parentNode))p=e.parentNode;else if(xDef(e.parentElement))p=e.parentElement;return p;};
function xGetElementById(e){if(typeof(e)!='string')return e;if(document.getElementById)e=document.getElementById(e);else if(document.all)e=document.all[e];else e=null;return e;};
function xNum(){for(var i=0;i<arguments.length;++i){if(isNaN(arguments[i])||typeof(arguments[i])!='number')return false;}return true;};
function xDef(){for(var i=0;i<arguments.length;++i){if(typeof(arguments[i])=='undefined')return false;}return true;};
function xStr(s){for(var i=0;i<arguments.length;++i){if(typeof(arguments[i])!='string')return false;}return true;};
function xGetComputedStyle(oEle,sProp,bInt){var s,p='undefined';var dv=document.defaultView;if(dv&&dv.getComputedStyle){s=dv.getComputedStyle(oEle,'');if(s)p=s.getPropertyValue(sProp);}else if(oEle.currentStyle){var a=sProp.split('-');sProp=a[0];for(var i=1;i<a.length;++i){c=a[i].charAt(0);sProp+=a[i].replace(c,c.toUpperCase());}p=oEle.currentStyle[sProp];}else return null;return bInt?(parseInt(p)||0):p;}