function initInputs() {
	// grab elements to process
	inputs = document.getElementsByTagName("input");
	txtareas = document.getElementsByTagName("textarea");
	selects = document.getElementsByTagName("select");
	// assign events to elements
	for (i=0; i<inputs.length; i++) {
		if (inputs[i].getAttribute("type") == "text") {
			inputs[i].onfocus = hiliteInput; 
			inputs[i].onblur = diliteInput;
		}
		/*if (inputs[i].className == "submit") {
			inputs[i].onmouseover = hiliteSubmit; 
			inputs[i].onmouseout = diliteSubmit;
		}*/
	}
	for (t=0; t<txtareas.length; t++) {
		txtareas[t].onfocus = hiliteTextarea; 
		txtareas[t].onblur = diliteTextarea;
	}
	for (s=0; s<selects.length; s++) {
		selects[s].onfocus = hiliteInput; 
		selects[s].onblur = diliteInput;
	}
	
}

function hiliteInput() {
	if(this.className == "REQUIRED") this.className = "REQUIRED RF";
	if(this.className == "FIELD") this.className = "FIELD FF";
	if(this.className == "ERROR") this.className = "ERROR EF";
	if(this.className == "CMS") this.className = "CMS F";
	//alert(this.className);
}

function diliteInput() { // no, "dilite" is not a word
	if(this.className == "REQUIRED RF") this.className = "REQUIRED";
	if(this.className == "FIELD FF") this.className = "FIELD";
	if(this.className == "ERROR EF") this.className = "ERROR";
	if(this.className == "CMS F") this.className = "CMS";
}

/*
function hiliteSubmit() {
this.className = "submitF";
}

function diliteSubmit() { // no, "dilite" is not a word
this.className = "submit";
}
*/

function hiliteTextarea() {
	if(this.className == "REQUIRED") this.className = "REQUIRED RF";
	if(this.className == "FIELD") this.className = "FIELD FF";
	if(this.className == "ERROR") this.className = "ERROR EF";
}

function diliteTextarea() { // no, "dilite" is not a word
	if(this.className == "REQUIRED RF") this.className = "REQUIRED";
	if(this.className == "FIELD FF") this.className = "FIELD";
	if(this.className == "ERROR EF") this.className = "ERROR";
}

//function init2() {initInputs();}
//onload = initInputs;	