function getColor(start, end, percent) {
	function hex2dec(hex){return(parseInt(hex,16));}
	function dec2hex(dec){return (dec < 16 ? "0" : "") + dec.toString(16);}
	var r1 = hex2dec(start.slice(0,2)), g1=hex2dec(start.slice(2,4)), b1=hex2dec(start.slice(4,6));
	var r2 = hex2dec(end.slice(0,2)),   g2=hex2dec(end.slice(2,4)),   b2=hex2dec(end.slice(4,6));
	var pc = percent/100;
	var r  = Math.floor(r1+(pc*(r2-r1)) + .5), g=Math.floor(g1+(pc*(g2-g1)) + .5), b=Math.floor(b1+(pc*(b2-b1)) + .5);
	return("#" + dec2hex(r) + dec2hex(g) + dec2hex(b));
}

var colors = new Array("2c7645", "f8f1d8", "2c7645", "6ac88a");
var start  = colors[0];
var end    = colors[0];
var index  = 0;
var cindex = 0;
var faderObj = new Array();

function fadeSpan() {
	if(index == 0)
	{
		start = end;
		end = colors[ cindex = (cindex+1) % colors.length ];
	}

//	document.getElementById("fadingText").style.color = getColor(start, end, index);
	for(var i=0 ; i<faderObj.length ; i++)
		faderObj[i].style.color = getColor(start, end, index);

	index = (index+5) % 100;

	setTimeout("fadeSpan()", 20);
}

function fadeAll() {
	for(var i=0 ; i<arguments.length ; i++)
		faderObj[i] = document.getElementById(arguments[i]);

	fadeSpan();
}

function JSFX_StartEffects() {
	fadeAll("blurb1","blurb2");
}
