function appFormCheck(appstep) {  
	if (appstep=='2') {
		fieldstocheck = new Array("lastname","firstname","midname","address","city","zip","phone","email");
		for (i=0;i<fieldstocheck.length;i++) {
			if (document.form.elements[fieldstocheck[i]].value.length < 1) {
				alert("Please complete all required fields");
				document.form.elements[fieldstocheck[i]].focus();
				return false;
			}
		}
		return true;
	}
	else if (appstep=='3') {
		fieldstocheck = new Array("salary");
		for (i=0;i<fieldstocheck.length;i++) {
			if (document.form.elements[fieldstocheck[i]].value.length < 1) {
				alert("Please complete all required fields");
				document.form.elements[fieldstocheck[i]].focus();
				return false;
			}
		}
		return true;
	}
}

function finalConfirmation() {
	var answer = confirm("FINAL CONFIRMATION!\nThis is your last chance to make any changes.\nDo you want to submit your application now? ")
	if (answer) {
		window.location = "functions/action_reset.php";
	}
	else {
	}
}