function trim(stringToTrim) {
	return stringToTrim.replace(/^\s+|\s+$/g,"");
}

function validateForm(){
	theForm = document.frmEmployeeAlumni;
	
	//check all fields are entered
	if (trim(theForm.firstname.value) == ''){
		alert('First Name is required.');
		return false;
	}
	if (trim(theForm.lastname.value) == ''){
		alert('Last Name is required.');
		return false;
	}
	if (trim(theForm.gradhighschool.value) == ''){
		alert('High School of Graduation is required.');
		return false;
	}
	if (trim(theForm.gradyear.value) == ''){
		alert('Graduation Year is required.');
		return false;
	}
	if (trim(theForm.worksite.value) == ''){
		alert('Dept./School Site is required.');
		return false;
	}
	return true;
}