function rollDie() {
  return Math.floor(1 + 6 * Math.random());
}

function findDieHolder(die, val) {
	if (document.getElementById)
	{
		x = document.getElementById(die);
		x.value = val;	
	}
	else if (document.all)
	{
		x = document.all[die];
		x.value = val;
	}
	else if (document.layers)
	{
		x = document.layers[die];
		x.value = val;
	}
	dieDomStyle = findDOM(die,1);
	dieDomStyle ['border'] = '1px solid #000';
}
function clearDice() {
	for (i=1; i < 8 + 1; i++)
	{
		if (document.getElementById)
		{
			x = document.getElementById("dice" + i);
			x.value = " ";	
		}
		else if (document.all)
		{
			x = document.all["dice" + i];
			x.value = " ";
		}
		else if (document.layers)
		{
			x = document.layers["dice" + i];
			x.value = " ";
		}
		dieDomStyle = findDOM("dice" + i,1);
		dieDomStyle ['border'] = '1px solid #DECAA7';		
	}

}