<!-- //hide script from old browsers
delay=20;//1000 = 1 second, 60000 = 1 minute
increment=1;//integer between 1 and 255
var refs=new Array();

function colorFade(subject,targetColor){
	for(i=0;i<refs.length;i++){
		if(refs[i]==subject){
			refs[i]=null;
			break;
		}
	}
	refs=refs.concat(subject);
	recurse((refs.length-1),targetColor);
}
function recurse(subIndex, targetColor){
	if(refs[parseInt(subIndex)]!=null){
		sub=refs[parseInt(subIndex)];
		currentColor=sub.style.backgroundColor;
		stepColor=step(currentColor,targetColor);
		sub.style.backgroundColor=stepColor; 
		if(stepColor.toLowerCase()!=targetColor.toLowerCase()){
			setTimeout ("recurse('" + subIndex + "', '" + targetColor + "')", delay);
		}
	}

}
function step(from,target){
	from=strip(from);
	target=strip(target);
	fromR=hexToDec(from.substr(0,2));
	fromG=hexToDec(from.substr(2,2));
	fromB=hexToDec(from.substr(4,2));
	targetR=hexToDec(target.substr(0,2));
	targetG=hexToDec(target.substr(2,2));
	targetB=hexToDec(target.substr(4,2));
	R=addZero(decToHex(inc(fromR,targetR)));
	G=addZero(decToHex(inc(fromG,targetG)));
	B=addZero(decToHex(inc(fromB,targetB)));
	return("#"+R+G+B);
}
function strip(victim){
	if(victim.charAt(0)=="#"){
		return(victim.substr(1));
	}else if(victim.charAt(0)=="r"){
		vicArray=victim.split(",");
		vicArray[0]=vicArray[0].substr(4);
		vicArray[2]=vicArray[2].substr(0,vicArray[2].length-1);
		victim=decToHex(vicArray[0])+decToHex(vicArray[1])+decToHex(vicArray[2]);
		return (victim);
	}else{
		return(victim);
	}
}
function decToHex(d){
	d=parseInt(d,10);
	h=d.toString(16);
	return(h);
}
function hexToDec(hex){
	return(parseInt(hex,16));
}
function inc(s,t){
	s=parseInt(s,10);
	t=parseInt(t,10);
	if(s>t+increment){
		return(s-increment+"");
	}else if(s<t-increment){
		return(s+increment+"");
	}else{
		return(t+"");
	}
}
function addZero(subject){
	subject=subject+"";
	if(subject.length<2){
		return("0"+subject);
	}else{
		return(subject);
	}
}

//end hiding script from old browsers  -->