<!--

var fadeColors= new Array("#fff", "#eee", "#ddd", "#ccc", "#bbb", "#aaa", "#999", "#888", "#777", "#666", "#555", "#333");
var quote = 0;
var fadeId;
var interval = 7000;
var pause = (fadeColors.length * 100);
var speed = 100;

function startFade(id) {
	fadeId = id;
	setTimeout("startFadeOut()", interval);
}

function startFadeOut() {
	fade('out', fadeColors.length - 1);
	setTimeout("startFadeIn()", pause)
}

function startFadeIn() {
	if (quote > quotes.length - 1) {
		quote = 0;
	}
	document.getElementById(fadeId).innerHTML = quotes[quote];
	fade('in', 1);
   quote ++;
	startFade(fadeId);
}

function fade(in_out, currentColor) {
	if (currentColor >= 1) {
		document.getElementById(fadeId).style.color = fadeColors[currentColor];
		if (currentColor > 1) {
			in_out == "out" ? currentColor -= 1 : currentColor += 1;
			setTimeout("fade('" + in_out + "', " + currentColor + ")", speed);
		}
		else {
			in_out == "out" ? currentColor -= 1 : currentColor += 1;
			setTimeout("fade('" + in_out + "', " + currentColor + ")", speed);
			document.getElementById(fadeId).style.color = "#fff";
		}
	}
}

//-->