//<![CDATA[/*	jerom, August 12, 2003, minor improvements - October 29, 2003	comments and improvements to:	http://forums.devshed.com/showthread.php?s=&threadid=75627	inspired by and partly based on: http://eto.com/JavaScript/*/var iId = nullvar sr, sg, sbvar er, eg, ebvar interval = 1var stepvar steps = 16var colorstart, colorendvar daElvar timerRunning = falsevar hexa = new Array()for (var i = 0; i < 16; i++) {	hexa[i] = i.toString(16)}function hex(i) {	if (i < 0)	  return "00";	else if (i > 255) return "ff";	return "" + hexa[Math.floor(i/16)] + hexa[i%16];}function hextodec(daHex) {	return parseInt('0x' + daHex)}function setColor(r,g,b) {	var hr = hex(r); var hg = hex(g); var hb = hex(b);	var daColor = "#"+hr+hg+hb	daEl.style.backgroundColor = daColor	if (daColor == colorend.toLowerCase()) {		clearInterval(iId)		iId = null		timerRunning = false	}}function fade() {	step++	setColor(		Math.floor(sr * ((steps-step)/steps) + er * (step/steps)),		Math.floor(sg * ((steps-step)/steps) + eg * (step/steps)),		Math.floor(sb * ((steps-step)/steps) + eb * (step/steps))		);}function myfade(el,cs,ce,iv,st) {	daEl = el	colorstart = cs	colorend = ce	interval = iv	steps = st	step = 0	if (timerRunning) {		clearInterval(iId)		iId = null	}	var myRe = /#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})/i	if (colorstart.match(myRe)) {		sr = hextodec(RegExp.$1)		sg = hextodec(RegExp.$2)		sb = hextodec(RegExp.$3)	}	if (colorend.match(myRe)) {		er = hextodec(RegExp.$1)		eg = hextodec(RegExp.$2)		eb = hextodec(RegExp.$3)	}	timerRunning = false;	iId = setInterval("fade()",interval)	timerRunning = true;}function cellover(table_cell) {	// play around with these values	// element, from_color, to_color, interval(milliseconds), transition steps	// make sure to change the end color in cellout()	myfade(table_cell,'#FFFFFF','#EDEDED',14,32)}function cellout(table_cell) {	if (timerRunning) {		clearInterval(iId)		iId = null	}	table_cell.style.backgroundColor = '#FFFFFF'}//]]>