function Crossfader(text, fadetime, delay ) {	
	
	if (text.length <= 1)
		return;
	
	this.aText = text;
	this.begin = 0;
	this.nDur = fadetime;
	this.nDelay = delay;
	this.Interval = Math.round(this.nDur / 100);
	var op = 1;
	document.getElementById("test_fade").style.visibility = "visible";
	document.getElementById("test_fade").style.opacity = 1;
	document.getElementById("test_fade").style.filter = "alpha(opacity=100)";
	setTimeout("fade_loss("+op+")",this.nDelay);
}

function fade_loss(op) {
	
	op = op - 0.01;
	opp = op * 100;
	document.getElementById("test_fade").style.opacity = op;
	document.getElementById("test_fade").style.filter = "alpha(opacity="+opp+")";	
	
	if(op > 0.01){
		setTimeout("fade_loss("+op+")",this.Interval);
	}
	else{
		clearTimeout();
		this.begin++;
		if(!this.aText[this.begin]) this.begin = 0;
		document.getElementById("test_fade").innerHTML = this.aText[this.begin];
		fade_up(op)	
	}
	
}
function fade_up(op) {
	
	op = op + 0.01;
	opp = op * 100;
	document.getElementById("test_fade").style.opacity = op;
	document.getElementById("test_fade").style.filter = "alpha(opacity="+opp+")";	
	
	if(op < 0.99){
		setTimeout("fade_up("+op+")",this.Interval);
	}
	else {
		clearTimeout();
		setTimeout("fade_loss("+op+")",this.nDelay);
	}
	
}