<!--
function validateApplication(form) {
	if (!ValidateText("firstname", "your First Name.")) { return false; }
	
	if (!ValidateText("lastname", "your Last Name.")) { return false; }
	
	if (!ValidateText("address", "your Address.")) { return false; }
	
	if (!ValidateText("city", "your City.")) { return false; }
	
	if (!ValidateSelect("state", "your State.")) { return false; }
	
	if (!ValidateText("zip", "your 5 digit Zip Code without spaces or punctuation.")) { return false; }
	if (!ValidateLength("zip", "your 5 digit Zip Code without spaces or punctuation.",5,5)) { return false; }
	if (!ValidateNum("zip", "your 5 digit Zip Code without spaces or punctuation.")) { return false; }
	
	if (!ValidateLength("altphone", "your 10 digit Mobile Phone number without spaces or punctuation (optional).",10,10)) { return false; }
	if (!ValidateNum("altphone", "your 10 digit Mobile Phone number without spaces or punctuation (optional).")) { return false; }
	
	if (!ValidateText("homephone", "your 10 digit Home Phone number without spaces or punctuation.")) { return false; }
	if (!ValidateLength("homephone", "your 10 digit Home Phone number without spaces or punctuation.",10,10)) { return false; }
	if (!ValidateNum("homephone", "your 10 digit Home Phone number without spaces or punctuation.")) { return false; }
	
	var emailField = document.getElementById('emailaddress');
	var emailField2 = document.getElementById('emailaddress2');
	if (emailField.value != "") {
		if (!ChkEmail("emailaddress", "Email Address.")) { return false; } 
		else if (emailField.value != emailField2.value) {
			alert('Email addresses do not match.  Please enter and verify your email address.');
			form.emailaddress2.focus();
			return false;
		}
	}
	
	if (!ValidateText("available_start_date", "the date you would be available to begin work.")) { return false; }
	
	
	var hoursSelected = 0;
	if (document.getElementById('availability_lt20hours').checked == true) {
		var hoursSelected = 1;
	}
	if (document.getElementById('availability_20hours').checked == true) {
		var hoursSelected = 1;
	}
	if (document.getElementById('availability_30hours').checked == true) {
		var hoursSelected = 1;
	}
	if (document.getElementById('availability_40hours').checked == true) {
		var hoursSelected = 1;
	}
	if (hoursSelected == 0) {
		alert('Please choose the hours you are willing to work.');
		document.getElementById('availability_40hours').focus();
		return false;
	}
	
	if (document.frmApply.employed_here_before[0].checked == true){ //the 'yes' radio button is checked
		if (!ValidateText("employed_here_when", "the dates of your previous employment with the Arapahoe Library District.")) { return false;}
	}
	
	if (!ValidateText("why_interested", "why you are interested in this position (1000 characters maximum).")) { return false; }
	if (!ValidateLength("why_interested", "why you are interested in this position, but limit your entry to 1000 characters maximum.",0,1000)) { return false; }
	
	if (!ValidateSelect("one_employment_from_month", "the month you started your most recent employment.")) { return false; }
	
	if (!ValidateText("one_employment_from_year", "the 4 digit year you started your most recent employment.")) { return false; }
	if (!ValidateLength("one_employment_from_year", "the 4 digit year you started your most recent employment.",4,4)) { return false; }
	if (!ValidateNum("one_employment_from_year", "the 4 digit year you started your most recent employment.")) { return false; }
	
	if (!ValidateSelect("one_employment_to_month", "the month you ended your most recent employment, or 'present' if currently employed.")) { return false; }
	
	var emp1MonthSelInd = document.getElementById('one_employment_to_month').selectedIndex;
	if (document.getElementById('one_employment_to_month').options[emp1MonthSelInd].value != '00'){
		if (!ValidateText("one_employment_to_year", "the 4 digit year you ended your most recent employment.")) { return false;}
		if (!ValidateLength("one_employment_to_year", "the 4 digit year you ended your most recent employment.",4,4)) { return false; }
		if (!ValidateNum("one_employment_to_year", "the 4 digit year you ended your most recent employment.")) { return false; }
	}
	
	if (!ValidateText("one_employment_job_title", "the last job title you held in your most recent employment.")) { return false; }
	
	if (!ValidateText("one_employment_last_salary", "the last wage you earned (specify hourly, weekly, annually, etc.) in your most recent employment.")) { return false; }
	
	if (!ValidateText("one_employment_supervisor_name", "the name of your most recent supervisor in your most recent employment.")) { return false; }

	if (!ValidateText("one_employment_employer", "the company name of your most recent employer.")) { return false; }
	if (!ValidateText("one_employment_employer_address", "the address of your most recent employer.")) { return false; }
	if (!ValidateText("one_employment_employer_phone", "the 10 digit Phone Number of your most recent employer.")) { return false; }
	
	if (!ValidateText("one_employment_main_duties", "your primary duties in your most recent employment")) { return false; }
	
	if (!ValidateText("one_employment_reason_for_leaving", "the reason you left (or wish to leave, if currently employed) your most recent employment.")) { return false; }
	
	if (!ValidateText("reference_name1", "the Name of your First reference.")) { return false; }
	
	if (!ValidateText("reference_address1", "the address of your First reference.")) { return false; }
	
	if (!ValidateText("reference_relationship1", "your Relationship with your First reference.")) { return false; }
	
	if (!ValidateText("reference_phone1", "the 10 digit Phone Number of your first reference without spaces or punctuation.")) { return false; }
	if (!ValidateLength("reference_phone1", "the 10 digit Phone Number of your first reference without spaces or punctuation.",10,10)) { return false; }
	if (!ValidateNum("reference_phone1", "the 10 digit Phone Number of your first reference without spaces or punctuation.")) { return false; }
	
	if (!ValidateText("reference_name2", "the Name of your Second reference")) { return false; }
	
	if (!ValidateText("reference_address2", "the address of your Second reference.")) { return false; }
	
	if (!ValidateText("reference_relationship2", "your Relationship with your Second reference.")) { return false; }
	
	if (!ValidateText("reference_phone2", "the 10 digit Phone Number of your second reference without spaces or punctuation.")) { return false; }
	if (!ValidateLength("reference_phone2", "the 10 digit Phone Number of your second reference without spaces or punctuation.",10,10)) { return false; }
	if (!ValidateNum("reference_phone2", "the 10 digit Phone Number of your second reference without spaces or punctuation.")) { return false; }
	
	if (!ValidateText("reference_name3", "the Name of your Third reference.")) { return false; }
	
	if (!ValidateText("reference_address3", "the address of your Third reference.")) { return false; }
	
	if (!ValidateText("reference_relationship3", "your Relationship with your Third reference.")) { return false; }
	
	if (!ValidateText("reference_phone3", "the 10 digit Phone Number of your third reference without spaces or punctuation.")) { return false; }
	if (!ValidateLength("reference_phone3", "the 10 digit Phone Number of your third reference without spaces or punctuation.",10,10)) { return false; }
	if (!ValidateNum("reference_phone3", "the 10 digit Phone Number of your third reference without spaces or punctuation.")) { return false; }
	
	return true;
}
// -->