function e(id) {
	return document.getElementById(id);
}

function callFader(container,id,fadetime) {
	this.container = container;
	this.id = id;
	this.animationTimeout = null;
	this.fadeTime = fadetime;
	this.framesPerSec = 10;
	this.transparencyStep = 10 / ((this.fadeTime / 1000) * this.framesPerSec);
	this.fadeUp = true;
	this.animateForward = true;
	this.currTransparency = 0;
	
	
	this.setTransparency = function (percentage) 
	{
		var Fader = document.getElementById(this.id);
		if(!Fader){return false;}
		if (Fader.filters != null) {
			if (typeof Fader.filters == "[object]") { //if IE6+
				Fader.filters[0].opacity = percentage;
			} else { //else if IE5.5-
				Fader.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity="+percentage+")";
			}
		} else if (Fader.style.MozOpacity) {
			Fader.style.MozOpacity = percentage / 101;
		} else if (Fader.style.KhtmlOpacity) {
			Fader.style.KhtmlOpacity = percentage / 100;
		}
	}

	
	this.animateFader = function ()
	{	
		clearTimeout(obj_props);
	  	if (this.fadeUp == true) {
			e(this.id).className = "show";
			this.currTransparency += this.transparencyStep
			if (this.currTransparency >= 100) {
			  this.fadeUp = false;
			  this.currTransparency = 100;
			  clearTimeout(this.animationTimeout);	  
			}
		}
		
		this.setTransparency(this.currTransparency);
		
		
		
		if (this.currTransparency == 100) {	
			
			//var _self = this;
			//this.animationTimeout = setTimeout(function(){ _self.animateFader(); }, this.pauseTime);
			clearTimeout(this.animationTimeout);	  
			
			return;
		} else {
			var _self = this;
			this.animationTimeout = setTimeout(function(){ _self.animateFader(); }, 1000 / this.framesPerSec);
		}
	}
}
