var timeout = 3 ; 	   // seconds between changes
var i = timeout;
var j = 0;
var Hue = new Array;
	Hue[0] = "999999"; // Silver
	Hue[1] = "FF0000"; // Red
	Hue[2] = "FFFF00"; // Yellow
	Hue[3] = "FF00FF"; // Purple
	Hue[4] = "0000FF"; // Blue
	Hue[5] = "FFCC66"; // Beige
	Hue[6] = "00FF00"; // Green
	Hue[7] = "000000"; // Black
	Hue[8] = "FF9900"; // Saffron

/*
function RandomColor() {
	return Hue[Math.floor(Math.random() * (Hue.length + .5) )];
}
*/

function timer() 
{
	if ( i >  0 ) { i-- }
	if ( i == 0 ) {
		if ( j >  8 ) { j = 0 }
		document.getElementById("thiscell").bgColor = Hue[j];
		showPerson(j);
		j++;
		i = timeout;
		timer();
	} else {
		id=setTimeout("timer()",1000);
	}
}

function showPerson(j)
{
	var k = (j==0)?(8):(j-1);
	var txtShow = document.getElementById("person" + j);
	var txtHide = document.getElementById("person" + k);

	if (txtShow.style.display == 'none')
	{
		txtShow.style.display = '';
	}
	
	if (txtHide.style.display == '')
	{
		txtHide.style.display = 'none';
	}

}

timer();


