function Animator(bm){this.bm=bm;this.animations={};this.bn=0;this.ie=document.all? true:false;this.win=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)? true:false;}Animator.prototype={start:function(by,bz){var bA=bz? 1:(this.bo(by.attribute)? by.attribute.length:1);for(var i=0;i<bA;i++){if(bz)var ba=by;else{var ba={};ba.theElement=by.element;ba.theAttribute=this.bo(by.attribute)? by.attribute[i]:by.attribute;ba.theTarget=this.bo(by.target)? by.target[i]:by.target;ba.theDelay=by.delay?(this.bo(by.delay)? by.delay[i]:by.delay):0;ba.theDuration=(this.bo(by.duration)? by.duration[i]:by.duration)+ba.theDelay;ba.theStartCode=by.bw?(this.bo(by.bw)? by.bw[i]:(i==0? by.bw:"")):"";ba.theEndCode=by.endCode?(this.bo(by.endCode)? by.endCode[i]:""):"";ba.theProfile=by.profile?(this.bo(by.profile)? by.profile[i]:by.profile):"DEFAULT";ba.theLoops=by.loops?(this.bo(by.loops)? by.loops[i]:by.loops):0;ba.theAmplitude=10;ba.isAnimating=false;}ba.theSource=this.getValue(ba.theElement,ba.theAttribute);ba.theStartTime=(new Date).getTime();if(ba.theAttribute.substr(0,1)=='x')continue;if((!this.bp(bb))||(ba.theDuration >= bb.theDuration))var bb=ba;if(i==bA-1)bb.theEndCode=by.endCode?(this.bo(by.endCode)? "":by.endCode):"";this.bq(ba);if(ba.theSource!=ba.theTarget)this.animations[++this.bn]= ba;}if(!this.br)this.bs();},bu:function(by){var bc={};for(var attribute in by){bc[attribute]= by[attribute];}return bc;},bs:function(){this.br=false;for(var i in this.animations){var bd=this.animations[i];var el=bd.theElement;bd.theNowTime=(new Date).getTime();if(!bd.isAnimating){if(bd.theDelay > 0){if(bd.theNowTime >(bd.theStartTime+bd.theDelay)){bd.theDuration -= bd.theDelay;bd.theDelay=0;bd.theStartTime=bd.theNowTime;}}else{bd.isAnimating=true;if(bd.bw)eval(bd.bw);}}else this.setValue(bd.theElement,bd.theAttribute,this.bt(bd));if(this.getValue(bd.theElement,bd.theAttribute)!=bd.theTarget)this.br=true;else{if(bd.theEndCode)eval(bd.theEndCode);if(bd.theLoops-- > 0){var be=this.bu(bd);be.theTarget=bd.theSource;be.theSource=bd.theTarget;delete this.animations[i];this.start(be,true);}else delete this.animations[i];}}if(this.br)setTimeout("animator.bs();",this.bm);},setValue:function(theElement,theAttribute,bx){theElement.style[theAttribute]= Math.round(bx)+"px";},getValue:function(theElement,theAttribute){try{bx=(this.ie? theElement.currentStyle[theAttribute]:document.defaultView.getComputedStyle(theElement,"").getPropertyValue(theAttribute)).replace(/[^\d\-]/gi,'')* 1;}catch(e){}return bx;},bt:function(by){var bf=by.theSource;var bg=by.theTarget;var bh=(by.theNowTime - by.theStartTime)/ by.theDuration;var bi=5;var bj=false;if(Math.abs(bh)< 0.01)bh=0.01;switch(by.theProfile.toUpperCase()){case "LINEAR":break;case "SNAP":bj=true;var bk=1 - bh * bh * bh;bh=bi * Math.PI * bh * bh;bh=1 - bk * Math.sin(bh)/ bh;break;case "ACCELERATE":bh *= bh;break;case "DECELERATE":bh=(2 - bh)*bh;break;case "DEFAULT":if(bh > 1){bh=1;break}bh=(1 - Math.cos(bh * Math.PI))/ 2;break;}var bl=1 * bf+bh *(bg - bf);if(!bj&&(((by.theSource < by.theTarget)&&(bl > by.theTarget))||((by.theSource > by.theTarget)&&(bl < by.theTarget)))||(bk <0)){bl=by.theTarget;}return bl;},bq:function(by){for(var i in this.animations){var bd=this.animations[i];if((bd.theElement==by.theElement)&&(bd.theAttribute==by.theAttribute))delete this.animations[i];}},setInterval:function(bm){this.bm=bm;},bo:function(a){return((a!=null)&&(typeof(a)=="object")&&a.constructor&&(a.constructor==Array));},bp:function(o){return((o!=null)&&(typeof(o)=="object")&&o.constructor&&(o.constructor==Object));}};
var animator = new Animator(25);
