function validate(currForm){
  var x, i, tmpField, tmpLength;

  //checks for the event type
  tmpField = currForm.eventtype;
  tmpLength = tmpField.value.length;
  if(tmpField.value == "") {
    window.alert("Please select the type of event.");
    tmpField.focus();
    return false;
  }
  if(tmpField.value =="Other: ") {
	tmpField = currForm.eventOther;
	tmpLength = tmpField.value.length;
    if(tmpField.value == "") {
      window.alert("Please enter the type of event.");
      tmpField.focus();
      return false;
	}
  }
  tmpField = currForm.month;
  tmpLength = tmpField.value.length;
  if(tmpField.value == "") {
    window.alert("Please select the month");
    tmpField.focus();
    return false;
  }  
  tmpField = currForm.day;
  tmpLength = tmpField.value.length;
  if(tmpField.value == "") {
    window.alert("Please select the date");
    tmpField.focus();
    return false;
  }  
  tmpField = currForm.year;
  tmpLength = tmpField.value.length;
  if(tmpField.value == "") {
    window.alert("Please select the year");
    tmpField.focus();
    return false;
  }  
  tmpField = currForm.hour1;
  tmpLength = tmpField.value.length;
  if(tmpField.value == "") {
    window.alert("Please select the hour");
    tmpField.focus();
    return false;
  }
  tmpField = currForm.minute1;
  tmpLength = tmpField.value.length;
  if(tmpField.value == "") {
    window.alert("Please select the minutes");
    tmpField.focus();
    return false;
  }  
  tmpField = currForm.ampm1;
  tmpLength = tmpField.value.length;
  if(tmpField.value == "") {
    window.alert("Please select AM or PM");
    tmpField.focus();
    return false;
  }  
  tmpField = currForm.classname1;
  tmpLength = tmpField.value.length;
  if(tmpField.value == "") {
    window.alert("Please enter the class name");
    tmpField.focus();
    return false;
  } 
  tmpField = currForm.building;
  tmpLength = tmpField.value.length;
  if(tmpField.value == "") {
    window.alert("Please enter your Building and classroom number");
    tmpField.focus();
    return false;
  } 
  //checks for Intended Class Type
  tmpField = currForm.classtype;
  tmpLength = tmpField.value.length;
  if(tmpField.value == "") {
    window.alert("Please select the year of class.");
    tmpField.focus();
    return false;
  }  
  if(tmpField.value =="Combination: ") {
	tmpField = currForm.multiClass;
	tmpLength = tmpField.value.length;
    if(tmpField.value == "") {
      window.alert("Please enter the combination of years.");
      tmpField.focus();
      return false;
	}
  }
  //checks for Number of Attendees
  tmpField = currForm.attendees;
  tmpLength = tmpField.value.length;
  if(tmpField.value == ""){
   window.alert("Please enter the number of students.");
   tmpField.focus();
   return false;
  }  
  //checks for majors interested in
/*  tmpField = currForm.majors;
  tmpLength = tmpField.value.length;
  if(tmpField.value == "" || tmpField.value == null) {
    window.alert("Please select the major(s) you are interested in hearing about.");
    tmpField.focus();
    return false;
  }  
  if (!checkMaxSelectable(currForm.majors)) {
	tmpField.focus();
    return false;
  }  */
 //checks for Student Type
  tmpField = currForm.Domestic;
  tmpLength = tmpField.value.length;
  if(tmpField.value == "" || tmpField.value == null) {
	tmpField = currForm.International;
	tmpLength = tmpField.value.length;
	if(tmpField.value == "" || tmpField.value == null) {
       window.alert("Please select the student type.");
       tmpField.focus();
       return false;
	}
  } 
  tmpField = currForm.schoolname;
  tmpLength = tmpField.value.length;
  if(tmpField.value == "") {
    window.alert("Please enter your school name.");
    tmpField.focus();
    return false;
  }
  tmpField = currForm.department;
  tmpLength = tmpField.value.length;
  if(tmpField.value == "") {
    window.alert("Please enter your department.");
    tmpField.focus();
    return false;
  }
  tmpField = currForm.contactname;
  tmpLength = tmpField.value.length;
  if(tmpField.value == "") {
    window.alert("Please enter your contact name.");
    tmpField.focus();
    return false;
  }
  tmpField = currForm.title;
  tmpLength = tmpField.value.length;
  if(tmpField.value == "") {
    window.alert("Please enter your title.");
    tmpField.focus();
    return false;
  }  
  tmpField = currForm.address1;
  tmpLength = tmpField.value.length;
  if(tmpField.value == "") {
    window.alert("Please enter your mailing address.");
    tmpField.focus();
    return false;
  }
  tmpField = currForm.city;
  tmpLength = tmpField.value.length;
  if(tmpField.value == "") {
    window.alert("Please enter your city");
    tmpField.focus();
    return false;
  }
  tmpField = currForm.state;
  tmpLength = tmpField.value.length;
  if(tmpField.value == "") {
   window.alert("Please enter your state");
   tmpField.focus();
   return false;
  }
  tmpField = currForm.postalcode;
  tmpLength = tmpField.value.length;
  if(tmpField.value == "") {
    window.alert("Please enter your postal code");
    tmpField.focus();
    return false;
  }
  tmpField = currForm.areacode;
  tmpLength = tmpField.value.length;
  if(tmpField.value == "") {
    window.alert("Please enter your area code.");
    tmpField.focus();
    return false;
  } 
  tmpField = currForm.phone;
  tmpLength = tmpField.value.length;
  if(tmpField.value == "") {
    window.alert("Please enter your phone number.");
    tmpField.focus();
    return false;
  } 
  tmpField = currForm.email;
  tmpLength = tmpField.value.length;
  if(tmpField.value == "") {
    window.alert("Please enter your email address.");
    tmpField.focus();
    return (false);
  }
  else {
    for (i = 1; i < tmpLength; i++) {
      if (tmpField.value.charAt(i) == "@") x = 1;
      if (x == 1) break;
    }
    i += 2;
    for (i; i < tmpLength; i++) {
      if (tmpField.value.charAt(i) == ".") x += 1;
      if (x == 2) break;
    }
    i += 2;
    if (x != 2 || i >= tmpLength) {
      window.alert("Please enter a valid email address.");
      tmpField.focus();
      return (false);
    }
  } 
  currForm.submitted.value = '1';
  return true;
}

function checkMaxSelectable(multiSelect)
{
   var counter = 0;
   var maxSelectable = 3;
   for (var j = 0; j < multiSelect.options.length; j++) {
      if (multiSelect.options[j].selected == true) {
         counter++;
	  }
   }
   if (counter > maxSelectable) {
      alert("Please select no more than " + maxSelectable + " majors.");
	  multiSelect.focus();
      return false;
   }
   return true;
}