
function aaPropertyAnimation(aaObjectId,aaProperty,aaOwner){this.aaEnabled=false;this.aaOwner=aaOwner;this.aaObjectId=aaObjectId;this.aaProperty=aaProperty;this.aaSetup=aaPropertyAnimationSetup;if(aaProperty=="style.opacity")this.aaSet=aaPropertyAnimationOpacitySet;else this.aaSet=aaPropertyAnimationSet;this.aaNextStep=aaPropertyAnimationStep;this.aaLast=aaPropertyAnimationLast;this.aaDisable=aaPropertyAnimationDisable;this.aaEnable=aaPropertyAnimationEnable;}
function aaPropertyAnimationSetup(aaValue,aaCurve,aaStep,aaOpacityImportance){if(this.aaEnabled)aaPropertyAnimationDisable();try{if(this.aaProperty=="style.opacity"){this.aaStartingValue=eval('document.getElementById("'+this.aaObjectId+'").'+this.aaProperty);if(!this.aaStartingValue)this.aaStartingValue=1;else if(this.aaStartingValue==null||this.aaStartingValue=="")this.aaStartingValue=1;else this.aaStartingValue=parseFloat(this.aaStartingValue);}else this.aaStartingValue=parseInt(eval('document.getElementById("'+this.aaObjectId+'").'+this.aaProperty));}
catch(aaE){throw"err";}
this.aaValue=aaValue;this.aaCurve=aaCurve;this.aaStep=aaStep;this.aaOpacityImportance=aaOpacityImportance;this.aaPreviousAnimation=null;this.aaNextAnimation=null;}
function aaPropertyAnimationEnable(){if(this.aaEnabled)return;if(this.aaStartingValue==this.aaValue)return;this.aaPreviousAnimation=null;this.aaNextAnimation=this.aaOwner.aaPropertyAnimationFirst;this.aaOwner.aaPropertyAnimationFirst=this;if(this.aaNextAnimation!=null)this.aaNextAnimation.aaPreviousAnimation=this;this.aaEnabled=true;this.aaOwner.aaEnable();if(aaObjectAnimationTimer==null)aaObjectAnimationTimer=setInterval('aaPropertyAnimator();',aaVideosInterval);}
function aaPropertyAnimationDisable(){if(!this.aaEnabled)return;if(this.aaOwner.aaPropertyAnimationFirst==this)
this.aaOwner.aaPropertyAnimationFirst=this.aaNextAnimation;if(this.aaNextAnimation!=null)this.aaNextAnimation.aaPreviousAnimation=this.aaPreviousAnimation;if(this.aaPreviousAnimation!=null)this.aaPreviousAnimation.aaNextAnimation=this.aaNextAnimation;this.aaEnabled=false;}
function aaPropertyAnimationStep(){this.aaSet(this.aaCurve[this.aaStep]);this.aaStep++;if(this.aaStep>=this.aaCurve.length)this.aaDisable();}
function aaPropertyAnimationLast(){this.aaStep=this.aaCurve.length-1;this.aaSet(this.aaCurve[this.aaStep]);this.aaDisable();}
function aaPropertyAnimationSet(aaValue){try{aaObjectSetProperty(this.aaObjectId,this.aaProperty,this.aaStartingValue+(this.aaValue-this.aaStartingValue)*aaValue);}
catch(aaE){this.aaDisable();}}
function aaPropertyAnimationOpacitySet(aaValue){try{aaSetObjectOpacity(this.aaObjectId,this.aaStartingValue+(this.aaValue-this.aaStartingValue)*aaValue,this.aaOpacityImportance);}
catch(aaE){this.aaDisable();}}
function aaObjectSetProperty(aaObjectId,aaProperty,aaValue){try{eval('document.getElementById("'+aaObjectId+'").'+aaProperty+'='+aaValue+';');}
catch(aaE){throw"err";}}
function aaPropertyAnimator(){var aaTemp0=aaObjectAnimationFirst;if(aaTemp0==null){clearTimeout(aaObjectAnimationTimer);aaObjectAnimationTimer=null;return;}
while(aaTemp0!=null){if(aaTemp0.aaEnabled)aaTemp0.aaAnimate();else window.alert("Trying to execute a disabled animation. BUG, means animation was disabled without ending it!");aaTemp0=aaTemp0.aaNextAnimation;}}