// This function validates the Employee Information Form
function validateInformation(){
	//Initialize variables
	var alertText = "You must enter the following information.\n";
	var setError = "0";
	var myRegExp = /[a-z\d]/i;
	var myEmailExp = /^.+@.+\..{2,3}$/;

	// Checking First Name
	if(!(myRegExp.test(document.quickApply.firstName.value))){
		alertText += "\n - First Name";
		setError = "1"; 
	}	
	
	// Checking Last Name
	if(!(myRegExp.test(document.quickApply.lastName.value))){
		alertText += "\n - Last Name";
		setError = "1"; 
	}	
	
	// Checking Contact Phone Number
	if(!(myRegExp.test(document.quickApply.contactPhoneNumber.value))){
		alertText += "\n - Contact Phone Number";
		setError = "1"; 
	}	
		
	if(setError == "1") {
		alert(alertText);
		return false; //Return false because an error was encountered 
	}
	else {
		return true; //Return true because no errors were encountered.
	}
}

function popupWindow(location) {
  window.open(location,'Popup','width=500,height=500,resizable=yes');
}

function indentificationValidate(){
	//Initialize variables
	var alertText = "You must enter the following information.\n";
	var setError = "0";
	
	if((document.indentification.gender.selectedIndex == 0) && document.indentification.genderNotAccepted.checked == false){
		alertText += "\n - Gender Option";
		setError = "1";
	}
	
	if((document.indentification.militaryStatus.selectedIndex == 0) && document.indentification.militaryNotAccepted.checked == false){
		alertText += "\n - Military Status Option";
		setError = "1";
	}
	
	if((document.indentification.ethnicGroup.selectedIndex == 0) && document.indentification.raceNotAccepted.checked == false){
		alertText += "\n - Ethnic Group Option";
		setError = "1";
	}
			
	if(setError == "1") {
		alert(alertText);
		return false; //Return false because an error was encountered 
	}
	else {
		return true; //Return true because no errors were encountered.
	}
}


