function jiuCheckForm(form) {	
	if (form.country && form.country.value == "") {
		alert("Please select your country.");
		return (false);
	}
	if (form.country && form.country.value == "Other") {
		alert("Your Student Information Form indicates that you do not meet the admissions requirements.");
		return (false);
	}
	if (form.state && (form.state.value == "VA" || form.state.value == "MI")) {
      alert("We're sorry but JIU does not currently accept students from your state.");
      return (false);
    }
	if (form.gradYear && form.gradYear.value == "") {
        alert("Please specify high school graduation Year.");
        return (false);
    }
	if (form.gradYear && form.gradYear.value > '2010') {
       alert("You are not qualified for admission based on your information.");
       return (false);
    }
	if(form.program && (form.program.value.indexOf("D")==0||form.program.value.indexOf("E")==0)) {
		if (form.custom2 && !form.custom2[0].checked && !form.custom2[1].checked) {
			alert("Please specify whether you have completed the GRE or GMAT.");
			return (false);
		}
	}
	if (form.custom1 && form.custom1.value == "") {
		alert("Please specify your availability.");
		return (false);
	}
	if (form.educationLevel && form.program) {	
		if(form.program.value.indexOf("B")==0) {
			if(form.educationLevel.value == "Masters" || form.educationLevel.value == "Doctoral") {
				alert("Your Student Information Form indicates that you do not meet the admissions requirements.");
				return (false);
			}
		}
		if(form.program.value.indexOf("M")==0) {
			if(form.educationLevel.value != "Bachelors" && form.educationLevel.value != "Masters") {
				alert("Your Student Information Form indicates that you do not meet the admissions requirements.");
				return (false);
			}
		}
		if(form.program.value.indexOf("D")==0||form.program.value.indexOf("E")==0||form.program.value.indexOf("NBPTS")==0) {
			if(form.educationLevel.value != "Masters" && form.educationLevel.value != "Doctoral") {
				alert("Your Student Information Form indicates that you do not meet the admissions requirements.");
				return (false);
			}
		}
    }		
	if (form.program && (form.program.value=="EDD"||form.program.value=="EDS"||form.program.value=="MEDELAPL") 
		&& form.state 
		&& (form.state.value == "AL"||form.state.value == "GA"||form.state.value == "TN")) {
		alert("We're sorry but this program is not available in your state.");
		return (false);
    }		
	if (form.program && (form.program.value.indexOf("ME")==0||form.program.value=="MBASCIAT"||form.program.value.indexOf("ED")==0) 
		&& form.state 
		&& (form.state.value == "AR"||form.state.value == "KY")) {
		alert("We're sorry but this program is not available in your state.");
		return (false);
    }	
	if (form.contactRequest && !form.contactRequest.checked) {
        alert("To request more information, request that a JIU representative contact me to discuss my program selection.");
        return (false);
    }
    return true;
}

function jiuProgramChange(form)
{
	if (form.program.value.indexOf("D")==0||form.program.value.indexOf("E")==0) {
		document.getElementById("PhdDiv").style.display = "block";
    }
    else {
		document.getElementById("PhdDiv").style.display = "none";
    }
}
