/******************************************
* MouseOver Background Color Script
* Written by David D. for Hype consulting.
* Visit http://www.hypweb.com.au/ 
*******************************************/
<!--
function toggleDiv(id,flagit) {
if (flagit=="1"){
if (document.layers) document.layers[''+id+''].bgColor = "fde361"
else if (document.all) document.all[''+id+''].style.backgroundColor = "fde361"
else if (document.getElementById) document.getElementById(''+id+'').style.backgroundColor = "fde361"
}
else
if (flagit=="0"){
if (document.layers) document.layers[''+id+''].bgColor = "ffdb24"
else if (document.all) document.all[''+id+''].style.backgroundColor = "ffdb24"
else if (document.getElementById) document.getElementById(''+id+'').style.backgroundColor = "ffdb24"
}
}

//Highlight form element- © Dynamic Drive (www.dynamicdrive.com)
//For full source code, 100's more DHTML scripts, and TOS,
//visit http://www.dynamicdrive.com

var highlightcolor="#f3f8fc"

var ns6=document.getElementById&&!document.all
var previous=''
var eventobj

//Regular expression to highlight only form elements
var intended=/INPUT|TEXTAREA|SELECT|OPTION/

//Function to check whether element clicked is form element
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 to highlight form element
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
}
}
