// JavaScript Document

window.onload = function() {
	document.getElementById('employment_form').onsubmit = function () {
		return validate2(); 
	};
}

		
		 function validate2() {
					if (document.getElementById('employment_form').first_name.value.length < 1) {
                       	window.alert("Please enter your first name.");
						document.getElementById('employment_form').first_name.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').last_name.value.length < 1) {
                       	window.alert("Please enter your last name.");
						document.getElementById('employment_form').last_name.focus();
                        return false;
                        }
						
						
					if (document.getElementById('employment_form').phone.value.length < 10) {
                       	window.alert("Please enter your phone number including the area code so we may contact you.");
						document.getElementById('employment_form').phone.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').email.value.length < 1) {
                       	window.alert("Don't forget you leave your email address.");
						document.getElementById('employment_form').email.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').street_address.value.length < 1) {
                       	window.alert("Please provide your street address.");
						document.getElementById('employment_form').street_address.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').city.value.length < 1) {
                       	window.alert("Enter your city or town name.");
						document.getElementById('employment_form').city.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').state[0].selected == true) {
						window.alert("Please select a state.");
						document.getElementById('employment_form').state.focus();
						return false;
					 	}
					 
					 if (document.getElementById('employment_form').zip.value.length < 5) {
                       	window.alert("Enter your 5 digit zip code.");
						document.getElementById('employment_form').zip.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').dob.value.length < 8) {
                       	window.alert("Enter your date of birth as shown 00/00/00.");
						document.getElementById('employment_form').dob.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').hours.value.length < 1) {
                       	window.alert("Please enter the number of hours you are willing to work per week.");
						document.getElementById('employment_form').hours.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').schedule_comment.value.length < 1) {
                       	window.alert("Please explain your work schedule availability.");
						document.getElementById('employment_form').schedule_comment.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').employ1name.value.length < 1) {
                       	window.alert("Please enter your past employer's name.");
						document.getElementById('employment_form').employ1name.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').employ1phone.value.length < 10) {
                       	window.alert("Please enter your past employer's phone number including the area code.");
						document.getElementById('employment_form').employ1phone.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').employ1city.value.length < 1) {
                       	window.alert("Please enter the city your past employer was located in.");
						document.getElementById('employment_form').employ1city.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').employ1state[0].selected == true) {
						window.alert("Please select a state.");
						document.getElementById('employment_form').employ1state.focus();
						return false;
					 	}
						
					if (document.getElementById('employment_form').employ1super.value.length < 1) {
                       	window.alert("Please enter the name of your supervisor.");
						document.getElementById('employment_form').employ1super.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').employ1from1.value.length < 1) {
                       	window.alert("Please enter the start date of your employment at the specified position.");
						document.getElementById('employment_form').employ1from1.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').employ1to1.value.length < 1) {
                       	window.alert("Please enter the date you left the specified position.");
						document.getElementById('employment_form').employ1to1.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').employ1reason.value.length < 1) {
                       	window.alert("Please provide a brief reasoning for leaving this place of employment.");
						document.getElementById('employment_form').employ1reason.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').employ2name.value.length < 1) {
                       	window.alert("Please enter your past employer's name.");
						document.getElementById('employment_form').employ2name.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').employ2phone.value.length < 10) {
                       	window.alert("Please enter your past employer's phone number including the area code.");
						document.getElementById('employment_form').employ2phone.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').employ2city.value.length < 1) {
                       	window.alert("Please enter the city your past employer was located in.");
						document.getElementById('employment_form').employ2city.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').employ2state[0].selected == true) {
						window.alert("Please select a state.");
						document.getElementById('employment_form').employ2state.focus();
						return false;
					 	}
						
					if (document.getElementById('employment_form').employ2super.value.length < 1) {
                       	window.alert("Please enter the name of your supervisor.");
						document.getElementById('employment_form').employ2super.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').employ2from2.value.length < 1) {
                       	window.alert("Please enter the start date of your employment at the specified position.");
						document.getElementById('employment_form').employ2from2.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').employ2to2.value.length < 1) {
                       	window.alert("Please enter the date you left the specified position.");
						document.getElementById('employment_form').employ2to2.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').employ2reason.value.length < 1) {
                       	window.alert("Please provide a brief reasoning for leaving this place of employment.");
						document.getElementById('employment_form').employ2reason.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').employ3name.value.length < 1) {
                       	window.alert("Please enter your past employer's name.");
						document.getElementById('employment_form').employ3name.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').employ3phone.value.length < 10) {
                       	window.alert("Please enter your past employer's phone number including the area code.");
						document.getElementById('employment_form').employ3phone.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').employ3city.value.length < 1) {
                       	window.alert("Please enter the city your past employer was located in.");
						document.getElementById('employment_form').employ3city.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').employ3state[0].selected == true) {
						window.alert("Please select a state.");
						document.getElementById('employment_form').employ3state.focus();
						return false;
					 	}
						
					if (document.getElementById('employment_form').employ3super.value.length < 1) {
                       	window.alert("Please enter the name of your supervisor.");
						document.getElementById('employment_form').employ3super.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').employ3from3.value.length < 1) {
                       	window.alert("Please enter the start date of your employment at the specified position.");
						document.getElementById('employment_form').employ3from3.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').employ3to3.value.length < 1) {
                       	window.alert("Please enter the date you left the specified position.");
						document.getElementById('employment_form').employ3to3.focus();
                        return false;
                        }
						
					if (document.getElementById('employment_form').employ3reason.value.length < 1) {
                       	window.alert("Please provide a brief reasoning for leaving this place of employment.");
						document.getElementById('employment_form').employ3reason.focus();
                        return false;
                        }
						
					if (!document.getElementById('employment_form').waiver[0].checked && !document.getElementById('employment_form').waiver[1].checked) { 
						window.alert("Please make sure that you've checked YES so that you may be considered for employment.");
						return false;
						}
						
					if (document.getElementById('employment_form').waiverdate.value.length < 1) {
                       	window.alert("Please provide today's date as a part of your digital signature.");
						document.getElementById('employment_form').waiverdate.focus();
                        return false;
                        }
						
						
						
						return true;
		 }