var buttonAry = new Array();
function buttonPreload(theButtonList)
{
	for (i in theButtonList)
	{
		var theImage = new Image();
		theImage.src = "images/button_" + theButtonList[i] + "_on.png";
		buttonAry[i] = theImage;
	}
}

function buttonOver(whichImg)
{
  var theId=document.getElementById(whichImg);
  var theName = theId.src;
  var theTLA = theName.substr(theName.length-4,4);
  var theMode = theName.substr(theName.length-7,3);
  var theBase = theName.substr(0, theName.length-7);
  if (theMode == "off")
    {
      theMode = "on";
      theId.src = theBase + theMode + theTLA;
    } else
    {
      theMode = "_off";
      theId.src = theBase + theMode + theTLA;
    }
}

var colour_off = "#ffffff";
var colour_on = "#000000";
function cellOver(whichCell)
{
	whichTD = document.getElementById(whichCell);
	theBgColor = whichTD.style.backgroundColor;
	if (!theBgColor) { theBgColor = whichTD.bgColor }
	
	if (theBgColor == colour_on)
	{
		whichTD.style.backgroundColor = colour_off;
	}
	else
	{
		whichTD.style.backgroundColor = colour_on;
	}
}
