var isDOM = (typeof(document.getElementsByTagName) != 'undefined' && typeof(document.createElement) != 'undefined') ? 1 : 0;
var isIE4 = (typeof(document.all) != 'undefined' && parseInt(navigator.appVersion) >= 4) ? 1 : 0;
var isNS4 = (typeof(document.layers) != 'undefined') ? 1 : 0;
var capable = (isDOM || isIE4 || isNS4) ? 1 : 0;
// Uggly fix for Opera and Konqueror 2.2 that are half DOM compliant
if (capable) {
	if (typeof(window.opera) != 'undefined') {
		capable = 0;
	} else if (typeof(navigator.userAgent) != 'undefined') {
		var browserName = ' ' + navigator.userAgent.toLowerCase();
		if (browserName.indexOf('konqueror') > 0) {
			capable = 0;
		}
	}
}

function setPointer(theRow, thePointerColor) {
	if (thePointerColor == '' || typeof(theRow.style) == 'undefined') {
		return false;
	}
	if (typeof(document.getElementsByTagName) != 'undefined') {
		var theCells = theRow.getElementsByTagName('td');
	}
	else if (typeof(theRow.cells) != 'undefined') {
		var theCells = theRow.cells;
	} else {
		return false;
    }

    var rowCellsCnt  = theCells.length;
    for (var c = 0; c < rowCellsCnt; c++) {
		theCells[c].style.backgroundColor = thePointerColor;
	}
    return true;
}

function changeCell(theRow, thePointerColor) {
	if (!isDOM && !isIE4) {
		return;
	}

	if (document.layer) {
		alert ("Netscape");
	}
	/*
	if (thePointerColor == '' || typeof(theRow.style) == 'undefined') {

		return false;
	}
	*/
	theRow.style.backgroundColor = thePointerColor;
    return true;
}