// (c) 2005 Infragistics - Do NOT modify the content of this file
// Version 6.1.20061.81

if(ig){function IgTimer(duration,cps,onElapse,onComplete){this.duration=duration;this.onElapse=onElapse;this.onComplete=onComplete;this.delay=40;this.duration=parseInt(this.duration);if(isNaN(this.duration)){this.duration=1000;}
cps=parseInt(cps);if(!isNaN(cps)){this.delay=1000/cps;}
this.start();}
IgTimer.prototype._onElapse=function(completion){if(!ig.isNull(this.onElapse)){this.onElapse(completion);}};IgTimer.prototype.start=function(){var d=new Date();this.startTime=d.getTime();ig.timers.addTimer(this);};IgTimer.prototype._onComplete=function(){if(!ig.isNull(this.onComplete)){this.onComplete();}};function IgTimerManager(){this.timers={};}
IgTimerManager.prototype.addTimer=function(timer){if(!ig.isNull(timer)){var timerId=ig.getUniqueId();this.timers[timerId]=timer;setTimeout("ig.timers.onTimerExpire('"+timerId+"')",timer.delay);}};IgTimerManager.prototype.onTimerExpire=function(timerId){if(ig.NaES(timerId)){var timer=this.timers[timerId];if(!ig.isNull(timer)){var d=new Date();var curTime=d.getTime();var completion=1/(timer.duration/(curTime-timer.startTime));if(completion<0){completion=0;}
else{if(completion>1){completion=1;}}
timer._onElapse(completion);if(curTime<timer.startTime+timer.duration){ig.timers.addTimer(timer);}
else{timer._onComplete();}}}};ig.timers=new IgTimerManager();function IgEffects(){}
ig.effects=new IgEffects();function IgEffect(elm,properties,transition,duration,fps,onElapse,onComplete){if(!ig.isNull(elm)){var tmp=ig.getUIElementById(elm);tmp.saveOriginalCssProperties();this.elm=elm;this.properties=properties;this.transition=transition;if(ig.isNull(this.transition)){this.transition=this.TRANSITION_FAST_SLOW;}
this._computeProperties();this.IgTimer(duration,fps,onElapse,onComplete);}}
IgEffect.prototype.TRANSITION_LINEAR=function(val){return val;};IgEffect.prototype.TRANSITION_SLOW_FAST=function(val){return((Math.pow(10,val)-1)/(10-1));};IgEffect.prototype.TRANSITION_FAST_SLOW=function(val){return Math.log(1+val*(10-1))/Math.log(10);};IgEffect.prototype.TRANSITION_PULSE=function(val){return(Math.floor(val*10)%2==0?(val*10-Math.floor(val*10)):1-(val*10-Math.floor(val*10)));};IgEffect.prototype._computeProperties=function(){if(ig.NaES(this.properties)){this._properties=new Array();var domNode=ig.getUIElementById(this.elm);var props=this.properties.split(";");for(var i=0;i<props.length;i++){var prop=props[i];if(ig.NaES(prop)){var tmp=prop.split(":");if(tmp.length==2){var propName=tmp[0];var propValue=parseFloat(tmp[1]);var curValue=domNode.getProperty(propName);var delta=propValue-curValue;var aProperty=new Object();aProperty.name=propName;aProperty.startValue=curValue;aProperty.delta=delta;aProperty.endValue=propValue;this._properties[this._properties.length]=aProperty;}}}}};IgEffect.prototype._onElapse=function(completion){if(!ig.isNull(this._properties)){var domNode=ig.getUIElementById(this.elm);var transCompletion=this.transition(completion);for(var i=0;i<this._properties.length;i++){var prop=this._properties[i];if(!ig.isNull(prop)){var newValue=prop.startValue+(prop.delta*transCompletion);var curValue=domNode.setProperty(prop.name,newValue);}}}
this.IgTimer__onElapse(completion);};IgEffect._extends(IgTimer);ig.effects={};}
