var ActiveRow=null;
function rowBG(theRow, theColor){	
    if (theRow == ActiveRow || typeof(theRow.style) == 'undefined') {
        return false;
    }
    if (typeof(theRow.cells) != 'undefined') {
        var theCells = theRow.cells;
    }
    else if (typeof(document.getElementsByTagName) != 'undefined') {
        var theCells = theRow.children;
    }
    else {
        return false;
    }
    var rowCellsCnt  = theCells.length;
    for (var c = 0; c < rowCellsCnt; c++) {
        theCells[c].style.backgroundColor = theColor;
    }
    return true;
} // end of the 'rowBG()' function

function cellBG(theCell, theColor){	
    theCell.style.backgroundColor = theColor;
    return true;
} // end of the 'cellBG()' function

function rowA(element){
	var wasActive;
	if(ActiveRow){
		wasActive=ActiveRow;
		ActiveRow=null;
		rowBG(wasActive,'');
	}
	rowBG(element,'#f5f5f0');
	ActiveRow=element;
}