function initInputs() {
	// grab elements to process
	inputs = document.getElementsByTagName("input");
	txtareas = document.getElementsByTagName("textarea");
	
	// 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;
	}
	
}

function hiliteInput() {
this.className = "focus";
}

function diliteInput() { // no, "dilite" is not a word
this.className = "off";
}

function hiliteSubmit() {
this.className = "submit_focus";
}

function diliteSubmit() { // no, "dilite" is not a word
this.className = "submit_off";
}

function hiliteTextarea() {
this.className = "txt_focus";
}

function diliteTextarea() { // no, "dilite" is not a word
this.className = "txt_off";
}

function init2() {initInputs();}
onload = init2;


	
