/*
	Copyright (c) 2008 Perceptual Media Works (www.PerceptualMediaWorks.com)
*/
function Fader(_a,_b,_c){var _d=this;_d._e=null;_d.setFadeElement(_a);_d._f=new Animator(_d,(_b?_b:0.0),(_c?_c:1.0),_d._e);_d.animate=function(){_d._f.animate();}}Fader.FADE_IN=true;Fader.FADE_OUT=false;Fader.prototype.toggle=function(_g){var _d=this;if(_d._h){_d.fadeIn(_g);}else{_d.fadeOut(_g);}};Fader.prototype.setFadeElement=function(_a){var _d=this;_d._a=_a;if(_d._a){_d._a.style.opacity=getStyle(_d._a,'opacity');_d._e=parseFloat(_d._a.style.opacity);_d._h=(_d._e==0.0);}};Fader.prototype._i=function(_j,_g){this._f.start(_j,_g);};Fader.prototype.fadeIn=function(_g,_k){var _d=this;_d.onFinished=(_k?_k:null);_d._h=false;_d._i(Fader.FADE_IN,_g);};Fader.prototype.fadeOut=function(_g,_k){var _d=this;_d.onFinished=(_k?_k:null);_d._h=true;_d._i(Fader.FADE_OUT,_g);};Fader.prototype.update=function(_l){var _m=this._a;var _n=_m.style;try{if(_m&&_m.filters){_m.filters.alpha.opacity=Math.round(_l*100);}else{_n.opacity=_l;}}catch(e){}};Fader.prototype.getFadeElement=function(){return this._a;};Fader.prototype.abort=function(){this._f.abort();};Fader.prototype.isComplete=function(){return(this._f.isComplete());};