 function Fader(strID, start, end, startDelay, fadeDelay){	this.enabled = false;	this.id = strID;	this.opacityStart=start;	this.opacityEnd=end;	this.startDelayMS = startDelay;	// Methods	this.checkEnabled = checkEnabled;	this.fade = fade;	this.checkEnabled();		this.fadeDelayMS = (fadeDelay) ? fadeDelay: 10;  	this.fadeStep = 2;  	if (document.getElementById) this.el = window.document.getElementById(strID);	else if (document.all) this.el = window.document.all[strID];	this.el.style.visibility='hidden'; 	if (this.isIE)	this.el.style.filter= "alpha(opacity=" + this.opacity + ")"; 	else if (this.isFF || this.isSafari || this.isOpera) this.el.style.opacity =this.opacity/100;		function fade(){	if (!this.enabled) return;		if (this.startDelayMS > 0){		var pThis = this;		var f = function(){pThis.fade();}		this.delayID =  setTimeout(f,  this.startDelayMS);		this.startDelayMS=0		return;	}		if (this.el  ){		var timer = 0;		if (this.opacityStart <  this.opacityEnd  ){			for(i = this.opacityStart; i <= this.opacityEnd; i++) { 				setTimeout("changeOpac(" + i + ",'" + this.id + "')",(timer * 20)); 				timer++; 			}		}		else{		 			for(i = this.opacityStart; i >= this.opacityEnd; i--) { 				setTimeout("changeOpac(" + i + ",'" + this.id + "')",(timer * 20)); 				timer++; 			}		}	}}function xfade(){	if (!this.enabled) return;		if (this.startDelayMS > 0){		var pThis = this;		var f = function(){pThis.fade();}		this.delayID =  setTimeout(f,  this.startDelayMS);		this.startDelayMS=0		return;	}		if (this.el  ){		if (this.isIE)	this.el.filters.alpha.opacity = this.opacity;		else if (this.isFF || this.isSafari  || this.isOpera) this.el.style.opacity=this.opacity/100;	 	this.opacity+=this.fadeStep;	 	this.el.style.visibility='visible';;	 	if ( this.opacity < this.endOpacity) {			var pThis = this;			var f = function(){pThis.fade();}			this.timerID =  setTimeout(f,  this.fadeDelayMS);		}  	}}		function checkEnabled(){	this.isIE = false;	this.isFF = false;	this.isSafari = false;	this.isOpera = false;	// convert all characters to lowercase to simplify testing	var agt=navigator.userAgent.toLowerCase();	var app=navigator.appName.toLowerCase();		 //alert( agt + '\n\n' + app);	if (app.indexOf("microsoft")!=-1 && parseInt(navigator.appVersion)>=4) {		this.enabled = true;		this.isIE = true	}	if (agt.indexOf("firefox")!=-1  ) {		this.enabled = true;		this.isFF = true	}	if (agt.indexOf("safari")!=-1  ) {		this.enabled = true;		this.isSafari = true	} 	if (agt.indexOf("opera")!=-1  ) {		this.enabled = true;		this.isOpera = true	} }}//change the opacity for different browsers function changeOpac(opacity, id) {     var object = document.getElementById(id).style; 	object.visibility='visible';;    object.opacity = (opacity / 100);     object.MozOpacity = (opacity / 100);     object.KhtmlOpacity = (opacity / 100);     object.filter = "alpha(opacity=" + opacity + ")"; } 