var currentCellName = "";
var currentTextName = "";
var classNames = new Array();
classNames[0] = new Array();
classNames[0][0] = 'topItemsOver';
classNames[0][1] = 'topItems';
classNames[1] = new Array();
classNames[1][0] = 'leftItemBulletOver';
classNames[1][1] = 'leftItemBullet';

var colorBlack = '#000000';
var colorRed = '#DD2222';

function switchCellBackground(cellID, dir, index)
{
	var cell = document.getElementById(cellID);
	if (cell != null)
	{
		cell.className = (dir == 'over' ? classNames[index][0] : 
			(cellID != currentCellName ? classNames[index][1] : classNames[index][0]));
	}	
	return true;
}

function switchTextColor(textID, dir)
{
	var text = document.getElementById(textID);
	if (text != null)
	{
		text.style.color = (dir == 'over' ? colorRed : 
			(textID != currentTextName ? colorBlack : colorRed));
	}	
}

function setCurrentCellAndText(cellName, textName)
{
	currentCellName = cellName;
	currentTextName = textName;
	switchTextColor(textName, 'over'); 
    switchCellBackground(cellName, 'over', 1);
}