/*
	Copyright (c) 2008 Perceptual Media Works (www.PerceptualMediaWorks.com)
*/
function Animator(_a,_b,_c){var _d=this;_d._a=_a;_d._b=_b;_d._e=_c;_d._f=null;_d._g=null;_d._h=null;_d._i=0;_d._j=null;_d._k=true;_d.owner=null;}Animator.prototype.start=function(_l,_f){var _d=this;if(_d._j){clearInterval(_d._j);_d._j=null;}if(_l){_d._g=_d._b;}else{_d._g=_d._a;}_d._f=_f?_f:500;_d._i=(new Date).getTime();_d._h=_d._e;_d._k=false;_d._j=setInterval(_d.owner.animate,20);};Animator.prototype.animate=function(){var t,e,_d=this;var _m=_d._f;var _n=(new Date).getTime()-_d._i;t=_n<0?0:(_n>_m?_m:_n);if(t>=_m){clearInterval(_d._j);_d._j=null;_d._e=_d._g;_d._k=true;}else{e=0.5-(0.5*Math.cos(Math.PI*t/_m));_d._e=_d._h+(_d._g-_d._h)*e;}_d.owner.update(_d._e);if(_d._k){if(_d.owner.onFinished){_d.owner.onFinished();}}};Animator.prototype.abort=function(){var _d=this;if(_d._j){clearInterval(_d._j);_d._j=null;}};Animator.prototype.isComplete=function(){return(this._k);};