// Critique validator

// Javascript by Alexander Nietzen M... alex@webeditors.com
// Open Source


// validate the form area to make sure that they fill out all fields.
function validate() {

if (document.alumniupdate.firstname.value == "") {
	alert("Please enter your first name.");
	document.alumniupdate.firstname.focus();
	RemoveContent('bar');
	return false;
}

if (document.alumniupdate.lastname.value == "") {
	alert("Please enter your last name.");
	document.alumniupdate.lastname.focus();
	RemoveContent('bar');
	return false;
}

if (document.alumniupdate.gradyear.selectedIndex==0)
{
	alert("Please enter the year you graduated EMS.");
	document.alumniupdate.gradyear.focus();
	RemoveContent('bar');
	return false;
}

var spaced = document.alumniupdate.mycode.value;
spaced = spaced.split(' ').join('');
if (document.alumniupdate.code.value != spaced) {
	alert("Please enter the displayed security code.");
	document.alumniupdate.code.value = "";
	document.alumniupdate.code.focus();
	RemoveContent('bar');
	return false;
}

// if everything passes, submit the form.
	return true;
}//close function
