window.onload = function() {
	resetPage();
}
function resetPage(){

	reValue();
	if(document.UserForm.SOURCE.value != ""){
		if(document.UserForm.MILITARY && document.UserForm.MILITARY.value ==""){
			document.UserForm.MILITARY.value = "0";
		}
	}
	document.UserForm.ZIP.focus();
}

function popupEduMeg(){
	var schid = document.UserForm.SCHOOLID.value;
	var schname = document.UserForm.SCHOOLNAME.value;
	switch(parseInt(schid)){
		case 110:
		case 115:
			return "Based on the information you provided, Capella University is not the best fit for your educational goals. Best wishes in exploring your educational options.";
		default:
			return "Based on the information you provided, you do not currently meet the application requirements for "+schname+".";
	}
}

function checkEduLevel(obj){
	if(obj.value =='-1'){
		alert(popupEduMeg());
		obj.value ="";
		obj.focus();
		return false;
	}
	return true;
}

function validateForm1(form){

	if(checkzip(form.ZIP.value) == 0){
		alert("Please enter a valid zip code");
		form.ZIP.focus();
		return false;
	}
	if(form.DEGREELEVEL.value ==''){
		alert("Please select the hightest level of education you have completed");
		form.DEGREELEVEL.focus();
		return false;
	}
	else if(checkEduLevel(form.DEGREELEVEL) == false){
		return false;
	}

	if(document.UserForm.MILITARY.value ==""){
		var questxt = getQuestionText("Military");
		if(questxt != ""){
			alert(questxt);
		}
		else{
			alert("Please indicate whether you are associated with the U.S. military");
		}
		form.MILITARY.focus();
		return false;
	}

	if(form.ONLINECAMPUS){
		if(checkGeneralEmpty("ONLINECAMPUS",
			"Please indicate whether you are interested in online or campus-based learning.")){
			return false;
		}
	}

	return true;
}
