function validateForm() {
  var theForm = document.contactForm;
  
  if (theForm.first_name.value == "") {
    alert("Please enter a value for the \"First Name\" field.");
    return false;
  }
  
    if (theForm.last_name.value == "") {
    alert("Please enter a value for the \"Last Name\" field.");
    return false;
  }
  
    if (theForm.street.value == "") {
    alert("Please enter a value for the \"Street\" field.");
    return false;
 }
  
    if (theForm.city.value == "") {
    alert("Please enter a value for the \"City\" field.");
    return false;
  }
  
      if (theForm.state.value == "") {
    alert("Please enter a value for the \"State-Providence\" field.");
    return false;
  }  
  
  if (theForm.00N800000034rwy.value == "") {
    alert("Please enter a valid \"Day Phone\" number.");
     return false;
  }
  
  if (theForm.00N800000034rwU.value == "") {
    alert("Please enter a valid \"Cell Phone or Evening \" number.");
      return false;
  } 
  
  if (theForm.email.value == "") {
    alert("Please enter a value for the \"Email\" field.");
    return false;
  } 
  
  if (validateEmail(theForm.email.value) == false) {
    alert("Please enter a valid \"Email\" address.");
    return false;
  }
  
  return true;
}

function validateEmail(email) {
   return (email.indexOf(".") > 2) && (email.indexOf("@") > 0);
}

function notEmpty(elem, helperMsg){
	var campusEntry = document.getElementsByClassName("campus");
	var programEntry = document.getElementsByClassName("program");
	var zipEntry = document.getElementsByClassName("zip");
	
		if(elem.campusEntry.length == 0){
		alert("Please select an available option for the \"Campus\" field.");
		elem.focus(); // set the focus to this input
		return false;
	}
	
	if(elem.programEntry.length == 0){
		alert("Please select an available option for the \"Program of Interest\" field.");
		elem.focus(); // set the focus to this input
		return false;
	}
		if(elem.zipEntry.length == 0){
		alert("Please enter your \"Zip - Postal Code\" field.");
		elem.focus(); // set the focus to this input
		return false;
	}	
	
	return true;
}
