// JavaScript Document
function checkform(f) {
if(!f.strF_name.value){
	alert("Please provide your first name!"); 
	f.strF_name.focus();
	return false;
	}

if(!f.strL_name.value){
	alert("Please provide your last name!"); 
	f.strL_name.focus();
	return false;
	}
if(!f.strStreet_Addr.value){
	alert("Please provide your street address!"); 
	f.strStreet_Addr.focus();
	return false;
	}
if(!f.strCity.value){
	alert("Please provide your city!"); 
	f.strCity.focus();
	return false;
	}
if(!f.strZip.value){
	alert("Please provide your Zip/postal code!"); 
	f.strZip.focus();
	return false;
	}
if(!f.strCountryID.value){
	alert("Please select your country!"); 
	f.strCountryID.focus();
	return false;
	}
if(!f.strCitizenshipID.value){
	alert("Please select your citizenship!"); 
	f.strCitizenshipID.focus();
	return false;
	}
	
if(!f.strEmail.value){
	alert("Please provide your email address!"); 
	f.strEmail.focus();
	return false;
	}
if(!f.strVerifyEmail.value){
	alert("Please verify your email address!"); 
	f.strVerifyEmail.focus();
	return false;
	}	
	
if((f.strEmail.value)!=(f.strVerifyEmail.value)){
	alert("email addresses do not match"); 
	f.strEmail.focus();
	return false;
	}
	
	if(!isValidEmail(f.strEmail.value)){
	alert("Please provide a valid email address!"); 
	f.strEmail.focus();
	return false;
	}
	
if(!f.strBDmonth.value){
	alert("Please select your birth month!"); 
	f.strBDmonth.focus();
	return false;
	}
if(!f.strBDday.value){
	alert("Please select your birth day!"); 
	f.strBDday.focus();
	return false;
	}
if(!f.strBDyear.value){
	alert("Please select your birth year!"); 
	f.strBDyear.focus();
	return false;
	}

	
if(!((f.strStudentTypeID[0].checked)||(f.strStudentTypeID[1].checked))) {
	alert("Please select your expected enrollment type!"); 
	f.strStudentTypeID[0].focus();
	return false;
	}
if(!f.strHighSchool.value){
	alert("Please provide your High School!"); 
	f.strHighSchool.focus();
	return false;
	}
if(!f.strHSCity.value){
	alert("Please provide your High School city!"); 
	f.strHSCity.focus();
	return false;
	}
if(!f.strHSState.value){
	alert("Please provide your High School state!"); 
	f.strHSState.focus();
	return false;
	}
f.strHSCode.disabled=false;
if(!f.strHSCode.value){
	alert("Please use the wizard to look up your High School CEEB code!"); 
	//f.strHSCode.focus();
	openWizard();
	//f.strHSCode.disabled=true;
	return false;
	}	

if(!f.strGraduation.value){
	alert("Please provide your high school graduation year!"); 
	f.strGraduation.focus();
	return false;
	}
	
if(!f.strEntryYear.value){
	alert("Please select your expected year of entry!"); 
	f.strEntryYear.focus();
	return false;
	}
if(!f.verificationcode.value){
	alert("Please enter the verification code. If you can't read the image, refresh the page to try a differerent one."); 
	f.verificationcode.focus();
	return false;
	}

if(f.verificationcode.value!==vcode){
	alert("The code you entered did not match the image. Please try again. If you can't read the image, refresh the page to try a differerent one.");
	f.verificationcode.focus();
	return false;
	}
 	/**/
return true;
}

function isValidEmail(str) {
  return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
}
