function frm_validate(whichForm){

var themessage = "The required information is incomplete or contains errors:\t\t\t\t\t\n\n";


if((whichForm.first_name.value=="")){
	themessage = themessage + "\tPlease enter your first name.\n";
}

if((whichForm.last_name.value=="")){
	themessage = themessage + "\tPlease enter your last name.\n";
}

if((whichForm.school_or_lib.value=="")){
	themessage = themessage + "\tPlease enter your library or school name.\n";
}

if((whichForm.state_province.value=="")){
	themessage = themessage + "\tPlease enter your state or province.\n";
}

if((whichForm.phone.value=="")){
	themessage = themessage + "\tPlease enter your phone number.\n";
}

if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(whichForm.email.value))){
	themessage = themessage + "\tPlease enter a valid email address.\n";
}


//alert if fields are empty and cancel form submit
if (themessage == "The required information is incomplete or contains errors:\t\t\t\t\t\n\n") {
return true;
}
else {
alert(themessage);
return false;
   }
}