var appVer = navigator.appVersion.toLowerCase();
var is_minor = parseFloat(appVer);
var is_major = parseInt(is_minor);
var iePos = appVer.indexOf('msie');

if (iePos !=-1) {
	is_minor = parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos)))
	is_major = parseInt(is_minor);
}

var is_ie = (iePos!=-1);
var is_ie4 = (is_ie && is_major == 4);
var is_ie4up = (is_ie && is_minor >= 4.5);
var is_ie5up = (is_ie && is_major >= 5);

function highlight(what,color) {
   what.style.background=color
}

function highlight_on(e, colour) {
	if (is_ie4 || is_ie4up || is_ie5up) {
		if (document.all)
			cell=event.srcElement;
		else if (document.getElementById)
			cell=e.target;
		if (cell.className=="hiLiteRow") {
			highlight(cell, colour);
		} else {
			while(cell.tagName!="TABLE") {
			cell=document.getElementById? cell.parentNode : cell.parentElement
			if (cell.className=="hiLiteRow")
				highlight(cell, colour);
			}
		}
	}
}

function highlight_off(e, colour) {   
	if (is_ie4 || is_ie4up || is_ie5up) {
		if (document.all)
			cell=event.srcElement;
		else if (document.getElementById)
			cell=e.target;
		if (cell.className=="hiLiteRow") {
			highlight(cell, colour);
		} else {
			while(cell.tagName!="TABLE") {
			cell=document.getElementById? cell.parentNode : cell.parentElement
			if (cell.className=="hiLiteRow")
				highlight(cell, colour);
			}
		}
	}
}		
