/********************************************************************
 *	Title: InputFields.js          									*
 *	Author: Meredith Kench                            				*
 *	Date: 9/19/2005                                   				*
 *	Description: highlights input fields when selected		   		*
 ********************************************************************/

 //when a field comes into focus it outlines the box with a new color
function fieldFocus(field) {
	if (field.type == 'select-one'){
		field.style.backgroundColor = '#7FC31C';
	}
	if ( (field.type == "radio") || (field.type == "checkbox") ){
		field.style.backgroundColor = '#7FC31C';
	}
	if( (field.type != "radio") && (field.type != "checkbox") ) {
		field.style.borderColor = '#7FC31C'; /* BrightGreeen */
	}
}

//when a field goes out of focus the colors go back to their original state
function fieldBlur(field) {
 		field.style.borderColor = document.body.style.backgroundColor; //when field blurs field goes back to regular style - this works ONLY in IE
		//field.style.borderColor = '#ADADAD'; //when field blurs field goes back to regular style - hard coding in the the color will make it work in Netscape 6 and IE
	if (field.type == 'select-one'){
		field.style.backgroundColor = '#ffffff';
		field.style.borderColor = 'ffffff';
	}
	if ( (field.type == "radio") || (field.type == "checkbox") ){
		field.style.backgroundColor = '';
	}
}