// JavaScript Document
function validate_form()
{
	// set flag to TRUE: default all fields correct
	var flag = true;
	// check each field in the form
	for(i=0; i<document.updateForm.elements.length; i++) {
		// check any field with an id value (required)
		if(document.updateForm.elements[i].id=='required') {
			// if the field is blank then higlight: set flag to FALSE
			if(trim(document.updateForm.elements[i].value)=='') {
				document.updateForm.elements[i].style.backgroundColor = '#CFE90B';
				flag = false;
			} else {
				document.updateForm.elements[i].style.backgroundColor = '#FFFFFF';
			}
		}
	}
	
	if(!flag) 
	{	alert("Invalid information entered, please complete the highlighted fields (*)."); }
		
	return flag;
}