// Set global vars
var NS4 = false;
var IE = false;
var Mozilla = false;

// test for Mac
var Mac = (navigator.userAgent.indexOf("Mac") != -1);

// Browser needs to be at least version 4 or better
if (parseInt(navigator.appVersion) >= 4) {
	if (document.all) {
		// Internet Explorer
		IE = true;
	}
	else if (document.getElementById) {
		// Netscape 6 and Mozilla
		Mozilla = true;
	}
	else if (document.layers) {
		// Netscape 4.x
		NS4 = true;
	}
}

// create vars to set layer visibility property correctly for each browser
var VISIBLE = (NS4) ? 'show' : 'visible';
var HIDDEN = (NS4) ? 'hide' : 'hidden';

// returns valid reference to object
function getObject(obj) {
	if (IE) {
		var theObj = eval("document.all."+obj + ".style");
	}
	else if (Mozilla) {
		var theObj = eval('document.getElementById("'+obj+'").style');
	}
	else if (NS4) {
		var theObj = eval("document."+obj);
	}
	return theObj;
}

function hilite(frm, fontColor, bgColor) {
	frm.style.backgroundColor = bgColor;
	frm.style.color = fontColor;
	showHand(frm);
}

function restore(frm, fontColor, bgColor) {
	frm.style.backgroundColor = bgColor;
	frm.style.color = fontColor;
	hideHand(frm);
}

function showHand(frm) {
	frm.style.cursor = (IE) ? 'hand' : 'pointer';
}

function hideHand(frm) {
	frm.style.cursor = '';
}
