//Used for color changes in forms
var highlightcolor="#DCE9FD";
var ns6=document.getElementById&&!document.all;
var previous='';
var eventobj;
var intended=/INPUT|TEXTAREA|SELECT|OPTION/;

var isIE = false;
var isOther = false;
var isNS4 = false;
var isNS6 = false;
if(document.getElementById)
{
	if(!document.all)
	{
		isNS6=true;
	}
	if(document.all)
	{
		isIE=true;
	}
}
else
{
	if(document.layers)
	{
		isNS4=true;
	}
	else
	{
		isOther=true;
	}
}

function checkel(which){
	if (which.style&&intended.test(which.tagName)){
		if (ns6&&eventobj.nodeType==3) { eventobj=eventobj.parentNode.parentNode; }
		return true;
	} else { return false; }
}

function highlight(e){
	eventobj=ns6? e.target : event.srcElement
	if (previous!=''){
		if (checkel(previous)){	previous.style.backgroundColor=''; }
		previous=eventobj;
		if (checkel(eventobj)){	eventobj.style.backgroundColor=highlightcolor; }
	}else{
		if (checkel(eventobj)){ eventobj.style.backgroundColor=highlightcolor; }
		previous=eventobj;
	}
}