
var col = "#fff";
var tim = 2000;
var shad = "true";

var rainbowi = 0;

clr=new Array('0','9','B','D','F');
bow=new Array('red','orange','yellow','green','blue', 'cyan', 'magenta');
function randColour()
{
ri = Math.round(4*Math.random());
gi = Math.round(4*Math.random());
bi = Math.round(4*Math.random());
return "#" + clr[ri] + clr[gi] +clr[bi];
}

function mo(id)
{
if (col == "RAND")
{
	document.getElementById(id).style.background = randColour();
}
else if (col == "BOW")
{
	rainbowi =( rainbowi+1) % 7
	document.getElementById(id).style.background = bow[rainbowi];
}
else
{
	document.getElementById(id).style.background = col;
}
if (shad == "true")
{
	setTimeout("to('" + id + "')", tim);
}
setTimeout("to2('" + id + "')", tim+250);
}
function to(id)
{
document.getElementById(id).style.background = "#666";
}
function to2(id)
{
document.getElementById(id).style.background = "#111";
}

function penChange()
{
rainbowi = 0;
i = document.forms["config"].pencol.selectedIndex;
col = document.forms["config"].pencol.options[i].value;
}

function delayChange()
{
i = document.forms["config"].delay.selectedIndex;
tim = parseInt(document.forms["config"].delay.options[i].value);
}

function shadowChange()
{
i = document.forms["config"].shadow.selectedIndex;
shad = document.forms["config"].shadow.options[i].value;
}

