/**************************************************************************************
/   xbrowser opacity methods - v1.0   25/04/01                                        /
/   by: Michael van Ouwerkerk - mvouwerkerk@hotmail.com                               /
/   These methods are free for personal and non-commercial use as long as these       /
/   comments remain intact. Enjoy =) For all other uses, please contact the author.   /
**************************************************************************************/

make.prototype.op = 100;

make.prototype.setOpacity = function(num){
	this.css.filter='alpha(opacity='+num+')';
	this.css.MozOpacity=num+'%';this.op=num;
}

make.prototype.fadeTo = function(target, step, time, fn){
	if (!fn) fn=null;
	this.difference = Math.abs(this.op-target);
	if (this.difference<=step){
		this.setOpacity(target);
		eval(fn);
	}
	else {
		target<this.op? this.setOpacity(this.op-step):this.setOpacity(this.op+step);
		setTimeout(this.obj+'.fadeTo('+target+','+step+','+time+',\''+fn+'\')', time);
	}
}

make.prototype.changeOpacityBy = function(num){
	this.value= this.op+num<0?0:this.op+num>100?100:this.op+num;
	this.setOpacity(this.value);
}

make.prototype.fadeBy = function(num, step, time, fn){
	if (!fn) fn = null; 
	this.target= this.op+num<0?0:this.op+num>100?100:this.op+num;
	this.fadeTo(this.target, step, time, fn);
}

/*** End of opacity methods ***/