function waldenCheckForm(form) {
	if (form.custom1 && form.custom1.value == "") {
        alert("Please select your enrollment date.");
        return (false);
    }
    if (form.custom2 && form.custom2.value == "") {
        alert("Please select best time to call.");
        return (false);
    }
    if (form.custom3 && !form.custom3[0].checked && !form.custom3[1].checked) {
        alert("Please select best time to call (AM or PM).");
        return (false);
    }
    if (form.program && form.program.value.indexOf("NUR") >= 0 && form.current_rn && !form.current_rn[0].checked && !form.current_rn[1].checked) {
        alert("Please specify whether you have a valid RN License.");
        return (false);
    }
	if (form.program && form.program.value.indexOf("NUR") >= 0 && form.current_rn && !form.current_rn[0].checked) {
        alert("We appreciate your interest in Walden University but based on the information you provided, you do not currently meet the admission requirements for this program.");
        return (false);
    }
	if (form.educationLevel && form.educationLevel.value != "Associate" && form.educationLevel.value != "Bachelors" && form.educationLevel.value != "Masters" && form.educationLevel.value != "Doctoral") {
        alert("Based on the information you provided, you do not currently meet the application requirements for Walden University.");
        return (false);
    }
	if (form.program && form.program.value.indexOf("BS") != 0 && form.program.value != "NURSING.GEN.INTERES2" && form.program.value != "MS.W1HHS.NUR.W1ED2"	&& form.program.value != "MS.W1HHS.NUR.W1LMS2" && form.program.value != "MS.W1HHS.NUR.W1IS2" ) {
        if (form.educationLevel && form.educationLevel.value != "Bachelors" && form.educationLevel.value != "Masters" && form.educationLevel.value != "Doctoral") {
			alert("Based on the information you provided, you do not currently meet the application requirements for Walden University.");
			return (false);
		}
    }
	if (form.program && (form.program.value.indexOf("EDD") == 0 || form.program.value.indexOf("EDS") == 0 || form.program.value.indexOf("PHD") == 0 || form.program.value.indexOf("DBA") == 0 || form.program.value.indexOf("CRT.W1NUR") == 0)) {
        if (form.educationLevel && form.educationLevel.value != "Masters" && form.educationLevel.value != "Doctoral") {
			alert("Based on the information you provided, you do not currently meet the application requirements for Walden University.");
			return (false);
		}
    }
	if (form.program && form.program.value.indexOf("CRT.W1PSY") == 0) {
        if (form.educationLevel && form.educationLevel.value != "Doctoral") {
			alert("Based on the information you provided, you do not currently meet the application requirements for Walden University.");
			return (false);
		}
    }
	if (form.program.value.indexOf("BS") == 0 && form.agebs && !form.agebs[0].checked && !form.agebs[1].checked) {
		alert("Please specify whether you are at least 24 years old.");
		return (false);
    }
	if ((form.program.value.indexOf("M.E.GN") == 0 || form.program.value.indexOf("MS.W1EDU.EDU") == 0 || form.program.value.indexOf("MAT.W1EDU.EDU") == 0
		|| form.program.value.indexOf("MS.W1EDU.EIDT") == 0 || form.program.value.indexOf("MS.W1EDU.HED") == 0 || form.program.value.indexOf("EDD.W1EDU.EDU") == 0)
		&& form.teaching_certificate && !form.teaching_certificate[0].checked && !form.teaching_certificate[1].checked) {
		alert("Please specify whether you hold a current teaching certificate, have at least one year of teaching experience, or are currently teaching.");
		return (false);
    }
	if (form.program.value.indexOf("MS.W1EGR") == 0) {
		if(form.custom4 && !form.custom4[0].checked && !form.custom4[1].checked) {
			alert("Please specify whether you have an undergrad degree in Electrical/Computer Engineering or Computer Science.");
			return (false);
		}
		if(form.custom5 && !form.custom5[0].checked && !form.custom5[1].checked) {
			alert("Please specify whether you have successfully completed one year of college-level calculus and a college course in differential equations and linear algebra.");
			return (false);
		}
		if(form.custom4 && !form.custom4[0].checked && form.custom5 && !form.custom5[0].checked) {
			alert("Based on the information you provided, you do not currently meet the application requirements for the Walden University Engineering and Applied Science programs.");
			return (false);
		}
    }
    return true;
}

function waldenProgramChange(form)
{
	if (form.program.options[form.program.selectedIndex].value.indexOf("NUR") >= 0)
        document.getElementById("NURSING").style.display = "block";
    else
        document.getElementById("NURSING").style.display = "none";
	if (form.program.options[form.program.selectedIndex].value.indexOf("BS") == 0)
        document.getElementById("agebsDiv").style.display = "block";
    else
        document.getElementById("agebsDiv").style.display = "none";
	if (form.program.options[form.program.selectedIndex].value.indexOf("M.E.GN") == 0
		||form.program.options[form.program.selectedIndex].value.indexOf("MS.W1EDU.EDU") == 0
		||form.program.options[form.program.selectedIndex].value.indexOf("MAT.W1EDU.EDU") == 0
		||form.program.options[form.program.selectedIndex].value.indexOf("MS.W1EDU.EIDT") == 0
		||form.program.options[form.program.selectedIndex].value.indexOf("MS.W1EDU.HED") == 0
		||form.program.options[form.program.selectedIndex].value.indexOf("EDD.W1EDU.EDU") == 0)
        document.getElementById("educationDiv").style.display = "block";
    else
        document.getElementById("educationDiv").style.display = "none";
	if (form.program.options[form.program.selectedIndex].value.indexOf("MS.W1EGR") == 0) {
        document.getElementById("engineeringDiv1").style.display = "block";
		document.getElementById("engineeringDiv2").style.display = "block";
	}
    else {
        document.getElementById("engineeringDiv1").style.display = "none";
		document.getElementById("engineeringDiv2").style.display = "none";
	}
}
