/*
JS Notes
Creation Date: 03/12/04
Allen Levine
*/ 


// This is used to toggle focus on form fields
function report(element, event) 
{
    var name = element.name;
	if (event == "Focus")
	{
		document.mainform[name].style.backgroundColor = "#DCDCDC";
	}
	else
	{
		document.mainform[name].style.backgroundColor = "white";
	}
}
// This function adds a bunch of event handlers to element in the form.
function addhandlers(f)
{
    for(var i = 0; i < f.elements.length; i++) 
	{
        var e = f.elements[i];

	// List the element types her to add event handlers only to the ones you want.
	if ((e.type == "text") || (e.type == "password") || (e.type == "textarea"))

	//Use switch to eliminate onFocus where needed
	switch(e.name)
	{
	case "Exclusion1":
		break;
	default:
		e.onfocus = new Function("report(this, 'Focus')");
		e.onblur = new Function("report(this, 'Blur')");
		break;
	}
	}	
}

// Put this in OnBody Load
// addhandlers(document.mainform);
