function checkRadio(FormObject, alertMsg)
{
	option = -1;
	for (i=0; i<FormObject.length;i++)
	{if (FormObject[i].checked)
		{option = i;}
	}
	if(option == -1)
	{alert(alertMsg);
	return false;}

return true;
}

function chkdate(objName) {
	var strDatestyle = "US"; 

//United States date style
//var strDatestyle = "EU";  
//European date style

	var strDate;
	var strDateArray;
	var strDay;
	var strMonth;
	var strYear;
	var intday;
	var intMonth;
	var intYear;
	var booFound = false;
	var datefield = objName;
	var strSeparatorArray = new Array("-"," ","/",".");
	var intElementNr;
	var err = 0;
	var strMonthArray = new Array(12);
	
	strMonthArray[0] = "Jan";
	strMonthArray[1] = "Feb";
	strMonthArray[2] = "Mar";
	strMonthArray[3] = "Apr";
	strMonthArray[4] = "May";
	strMonthArray[5] = "Jun";
	strMonthArray[6] = "Jul";
	strMonthArray[7] = "Aug";
	strMonthArray[8] = "Sep";
	strMonthArray[9] = "Oct";
	strMonthArray[10] = "Nov";
	strMonthArray[11] = "Dec";
	
	strDate = datefield.value;

	if (strDate.length < 6 ) {
	return false;
	}
	for (intElementNr = 0; intElementNr < strSeparatorArray.length; intElementNr++) 
	{	
		if (strDate.indexOf(strSeparatorArray[intElementNr]) != -1) 
		{
			strDateArray = strDate.split(strSeparatorArray[intElementNr]);
			if (strDateArray.length != 3) 
			{
				err = 1;
				return false;
			}
		else 
			{
				strDay = strDateArray[0];
				strMonth = strDateArray[1];
				strYear = strDateArray[2];
			}
		booFound = true;
   		}
	}
	if (booFound == false) 
	{
		if (strDate.length>5) 
		{
			strDay = strDate.substr(0, 2);
			strMonth = strDate.substr(2, 2);
			strYear = strDate.substr(4);
   		}
	}
	if (strYear.length == 2) 
	{
		if(parseInt(strYear, 10) < 31)	
			strYear = '20' + strYear;
		else
			strYear = '19' + strYear;
	}	

// US style
	if (strDatestyle == "US") 
	{
		strTemp = strDay;
		strDay = strMonth;
		strMonth = strTemp;
	}
	intday = parseInt(strDay, 10);

	if (isNaN(intday)) 
	{
		err = 2;
		return false;
	}
	intMonth = parseInt(strMonth, 10);

	if (isNaN(intMonth)) 
	{
		for (i = 0;i<12;i++) 
		{
			if (strMonth.toUpperCase() == strMonthArray[i].toUpperCase()) 
			{ 	intMonth = i+1;
				strMonth = strMonthArray[i];
				i = 12;
   			}
		}
		if (isNaN(intMonth)) 
		{
			err = 3;
			return false;
   		}
	}

	intYear = parseInt(strYear, 10);

	if (isNaN(intYear)) 
	{
		err = 4;
		return false;
	}
	if (intMonth>12 || intMonth<1) 
	{
		err = 5;
		return false;
	}

	var s = new Date();
	
	if(intYear>2030 || intYear <1931)
	{
		err = 10;
		return false;
	}
	
	
	if ((intMonth == 1 || intMonth == 3 || intMonth == 5 || intMonth == 7 || intMonth == 8 || intMonth == 10 || intMonth == 12) && (intday > 31 || intday < 1)) 
	{
		err = 6;
		return false;
	}

	if ((intMonth == 4 || intMonth == 6 || intMonth == 9 || intMonth == 11) && (intday > 30 || intday < 1)) 
	{
		err = 7;
		return false;
	}
	if (intMonth == 2) 
	{
		if (intday < 1) 
		{
			err = 8;
			return false;
		}
		if (LeapYear(intYear) == true) 
		{
			if (intday > 29) 
			{
				err = 9;
				return false;
			}
		}
		else 
		{
			if (intday > 28) 
			{
				err = 10;
				return false;
			}
		}
	}	

	objName.value = strMonth + "/" + strDay + "/" + strYear;
	return true;
}

function LeapYear(intYear) 
{
	if (intYear % 100 == 0) 
	{
		if (intYear % 400 == 0) 
		{ 
			return true; 
		}
	}
	else 
	{
		if ((intYear % 4) == 0) 
		{ 
			return true; 
		}
	}
	return false;
}

function doDateCheck(from, to) 
{
	if (Date.parse(from.value) > Date.parse(to.value)) 
	{
		return false;
	}
	else
		return true;
}

function setTheDate()
{
    	setDate = new Date;
	document.frmPersonal.txtAppDate.value = ((setDate.getMonth() +1) + "/" + setDate.getDate() + "/" + setDate.getFullYear());
	document.frmPersonal.txtDateEOE.value = ((setDate.getMonth()+1) + "/" + setDate.getDate() + "/" + setDate.getFullYear());
}

function DV_checkGPA(FormObject)
{

	if (FormObject.length >= 2)
		return false;

	

	for(i=0; i<FormObject.length; i++)
	{
		if(FormObject.charAt(i) != "A" && FormObject.charAt(i) != "B" && FormObject.charAt(i) != "C" && FormObject.charAt(i) != "D" && FormObject.charAt(i) != "F")
		{ return false;}
	}

	return true;
}

function checkZip(FormObject)
{
//Function checkZip will check to see if the Zip Code entered is in valid format (5 digits).
	if (FormObject.length != 5)
		return false;

	if(!DV_Integer(FormObject))
		return false;
	
	return true;
}

      
function DV_OnError(ErrorMessage)
{
//Function DV_OnError will output an alert box 
//to the screen if data is bad. 
	
	alert(ErrorMessage); 
        return false; 
} 

function DV_checkEmail(FormObject)
{
//Function DV_checkEmail will check to see if the e-mail address submiited is in the correct format.
	invalidChars = " /:,;"
	
	if (FormObject.length == 0) 
		{return true}

	for (i=0; i<invalidChars.length; i++) 
	{	// does it contain any invalid characters?
		badChar = invalidChars.charAt(i)
		if (FormObject.indexOf(badChar,0) > -1) 
		{	return false	}
	}

	atPos = FormObject.indexOf("@",1)		// there must be one "@" symbol
	if (atPos == -1) 
 		{   return false	}
	if (FormObject.indexOf("@",atPos+1) != -1) {	// and only one "@" symbol
		    return false}
	periodPos = FormObject.indexOf(".",atPos)
	if (periodPos == -1) {				// and at least one "." after the "@"
		return false}
	if (periodPos+3 > FormObject.length)	{	// must be at least 2 characters after the "."
		return false
	}
	return true

}

function DV_CheckPhone(FormObject)
{
//Function DV_CheckPhone will check to see if the Phone number submitted is in the correct format.

	var spacers = " -+.()";
	var strPhone = "";
	var checkChar;

	if (FormObject.length == 0)
	return true;

	//if (FormObject.length !=8 && FormObject.length != 13)
	if (FormObject.length !=8 && FormObject.length != 12)		
		return false;	

	if(FormObject.length == 8)
	{
		if(FormObject.charAt(3) != " " && FormObject.charAt(3) != "-")
			return false;
	}

	//if(FormObject.length == 13)
	if(FormObject.length == 12)
	{
 		//if(FormObject.charAt(0) != "(")
		if(FormObject.charAt(3) != "-")
			return false;

		//if(FormObject.charAt(4) != ")")
		if(FormObject.charAt(7) != "-")
			return false;		
		
		//if(FormObject.charAt(8) != " " && FormObject.charAt(8) != "-")		
		//	return false;
	}
	
	for (var i=0; i<FormObject.length; i++)
	{
		checkChar = spacers.indexOf(FormObject.charAt(i));
		if (checkChar < 0)
			strPhone += FormObject.substring (i,(i+1));
	}

	if (strPhone.length != 7 && strPhone.length != 10)
		return false; 
	
 	if (!DV_Integer(strPhone))
		return false;
		
	return true;

}


function DV_CheckSSN (FormObject)
{
	//Function DV_CheckSSN will check to see if the SSN submitted is in a valid format.

	var spacers = " -+.";
	var strSSN = "";
	var checkChar;

	if (FormObject.length == 0)
		return true;
	if (FormObject.length != 11)
		return false;

	if(FormObject.charAt(3) != "-" && FormObject.charAt(3) != " ")
		return false;
	if(FormObject.charAt(6) != "-" && FormObject.charAt(6) != " ")
		return false;

	for (var i = 0; i<FormObject.length; i++)
	{
		checkChar = spacers.indexOf(FormObject.charAt(i));
		if (checkChar < 0)
			strSSN += FormObject.substring (i,(i+1));
	}

	if (strSSN.length != 9)
		return false;
	
	if(!DV_Integer(strSSN))
		return false;

	return true;
}	

function DV_ValidInput(FormObject)  	
{ 
//Function DV_ValidInput will return true if input is valid. 
//Will return false if data is invalid. 

	 if(FormObject.value.length == 0) 
       	        return false; 
       else 
		return true; 
} 

function DV_Integer(value)
{
	/* Function DV_Integer will return true if the value of an object is an Integer
	   or will return false otherwise. */

	if (value.length == 0)
		return true;

	var initChar= " .+-0123456789";
	var normChar= " .0123456789";
	var checkChar;
	var decimal = false;
	var finalChar = false;
	var digits = false;
	
	checkChar = initChar.indexOf(value.charAt(0));

	if (checkChar == 1)
		decimal = true;
	else if (checkChar < 1)
		return false; 

	for (i = 1; i < value.length; i++)
	{
		checkChar = normChar.indexOf(value.charAt(i))
		if (checkChar <0)
			return false;
		else if (checkChar == 1)
		{
			if (decimal)
				return true;
			else
				decimal = false;
		}
		else if (checkChar == 0)
		{
			if (decimal || digits)
				finalChar = true;
		}
		else if (finalChar)
			return false;
		else
			digits = true;
	}
	return true;
} 


function DV_checkForm(checkThis) 
{ 
	if (!DV_ValidInput(checkThis.txtFirstName)) 
  	{ DV_OnError("Please enter your FIRST NAME."); 
	checkThis.txtFirstName.focus();
	return false; }

	if (!DV_ValidInput(checkThis.txtLastName)) 
	{DV_OnError("Please enter your LAST NAME.");
	checkThis.txtLastName.focus();
	return false; } 

	if (!DV_CheckSSN(checkThis.txtSSN.value))
	{DV_OnError("Please enter a valid SOCIAL SECURITY NUMBER, in the following format: 123-45-6789");
	checkThis.txtSSN.focus();
	checkThis.txtSSN.select();
	return false;} 

	if (!DV_ValidInput(checkThis.txtAddress)) 
	{DV_OnError("Please enter your ADDRESS."); 
	checkThis.txtAddress.focus();
	return false; } 
	
	if (!DV_ValidInput(checkThis.txtCity))
	{ DV_OnError("Please enter the name of the CITY you live in.");
	checkThis.txtCity.focus();
	return false; }
	
	if(!checkZip(checkThis.txtZipCode.value))
	{
		DV_OnError("The ZIP CODE that you have entered is invalid or has been left blank, please re-enter.");
		checkThis.txtZipCode.focus();
		checkThis.txtZipCode.select();
		return false;
	}

	if(!DV_CheckPhone(checkThis.txtPhone.value))
	{	DV_OnError("Please enter a PHONE NUMBER in the one\nof the following formats:\n\n\t(123)456-7890\n\t          or\n\t    123-4567");
		checkThis.txtPhone.focus();
		checkThis.txtPhone.select();
		return false;
	}

	if(!DV_checkEmail(checkThis.txtEMail.value))
	{
		DV_OnError("The E-MAIL ADDRESS you have entered is in the wrong format.\nPlease re-enter.");
		checkThis.txtEMail.focus();
		checkThis.txtEMail.select();
		return false;
	}

	if(!checkThis.chkFull.checked && !checkThis.chkPart.checked)
	{
		DV_OnError("Please select FULL-TIME, PART-TIME or both.");
		checkThis.chkFull.focus();
		return false;
	}
	
	if(!checkThis.chkMornings.checked && !checkThis.chkAfternoons.checked && !checkThis.chkEvenings.checked && !checkThis.chkNights.checked)
	{
		DV_OnError("Please select one or any combination of the following:\n\nMornings, Afternoons, Evenings, or Nights"); 
 		checkThis.chkMornings.focus();
		return false;
	}	

	if(!checkRadio( checkThis.rdoLength , "Please choose one of the following options:\n\n\Less Than One Year, One to Two Years, or Two or More Years"))	
	{checkThis.rdoLength[0].focus();
	return false;}

	if (checkThis.txtHours.length != 0 && !DV_Integer(checkThis.txtHours.value))
  	{ DV_OnError("Please enter the number of HOURS\n you are available to work per week."); 
		checkThis.txtHours.focus();
		checkThis.txtHours.select();
		return false; }


	if(!checkRadio(checkThis.rdoOver18, "Are you 18 years of age or older?\n\n       Yes  or  No"))
	{checkThis.rdoOver18[0].focus();
	return false;}

	if(!checkRadio(checkThis.rdoEmploy, "Are you presently employed?\n\nYes  or  No"))
	{checkThis.rdoEmploy[0].focus();
	return false;}

	if(checkThis.rdoEmploy[0].checked)
	{if(!checkRadio(checkThis.rdoEmploy2, "Please choose one of the following options:\n\nActive, Layoff, Strike, or Other"))	
		{checkThis.rdoEmploy2[0].focus();
		return false;}
	else if(checkThis.rdoEmploy2[3].checked && checkThis.txtOther.value == "")
		{
		DV_OnError("Please enter an EXPLANATION for your employment status of OTHER.");
		checkThis.txtOther.focus();
		checkThis.txtOther.select();
		return false;
		}
	}

	if(!checkRadio(checkThis.rdoLegal, "Are you legally permitted to work in the U.S.?\n\n\t  Yes  or  No"))
	{checkThis.rdoLegal[0].focus();
	return false;}

	if(!checkRadio(checkThis.rdoFelony, "Have you ever been convicted of a felony?\n\n\tYes  or  No"))
	{checkThis.rdoFelony[0].focus();
	return false;}

	if (checkThis.rdoFelony[0].checked && checkThis.txtFelony.value == "")
  	{ DV_OnError("Please enter an EXPLANATION for your felony conviction."); 
		checkThis.txtFelony.focus();
		checkThis.txtFelony.select();
		return false; }

	if(!checkRadio(checkThis.rdoPrevious, "Have you previously been employed by this company?\n\n\tYes  or  No"))
	{checkThis.rdoPrevious[0].focus();
	return false;}

	if (checkThis.rdoPrevious[0].checked)
  	{if(checkThis.txtWhere.value == "") 
		{DV_OnError("Please enter the LOCATION where you were previously employed."); 
		checkThis.txtWhere.focus();
		checkThis.txtWhere.select();
		return false; }
	 else if (checkThis.txtWhen.value == "")
  		{ DV_OnError("Please enter the dates you were previously employed with this company."); 
		checkThis.txtWhen.focus();
		checkThis.txtWhen.select();
		return false; }

	}

/*	if(!checkRadio(checkThis.rdoRelocate, "Are you willing to relocate if the opportunity arises?\n\n\tYes  or  No"))
	{checkThis.rdoRelocate[0].focus();
	return false;}
*/

	if(!checkRadio(checkThis.rdoRelative, "Do any of your friends or relatives other than your spouse work here?\n\n\tYes  or  No"))
	{checkThis.rdoRelative[0].focus();
	return false;}
	
	if (checkThis.rdoRelative[0].checked)
  	{if(checkThis.txtRelName.value == "") 
		{DV_OnError("Please enter the NAME of your friend\nor relative that works for this company.");
 		checkThis.txtRelName.focus();
		checkThis.txtRelName.select();
		return false; }
	 else if (checkThis.txtRelationship.value == "")
  		{ DV_OnError("Please enter the nature of your RELATIONSHIP to " + checkThis.txtRelName.value + "."); 
		checkThis.txtRelationship.focus();
		checkThis.txtRelationship.select();
		return false; }
	 else if (checkThis.txtLocation.value == "")
		{ DV_OnError("Please enter the LOCATION where " + checkThis.txtRelName.value + " is employed."); 
		checkThis.txtLocation.focus();
		checkThis.txtLocation.select();
		return false; }
	}

	if(!DV_ValidInput(checkThis.txtHSName))	
	{DV_OnError("Please enter the NAME of the High School that you attended.");
	checkThis.txtHSName.focus();
	return false;
	}

	if(!DV_ValidInput(checkThis.txtHSLocation))	
	{DV_OnError("Please enter the city that " + checkThis.txtHSName.value + " is located in.");
	checkThis.txtHSLocation.focus();
	return false;
	}

	HSGrade = document.frmPersonal.lstHSGrade.selectedIndex;
	if (document.frmPersonal.lstHSGrade.options[HSGrade].value == "None")
	{DV_OnError("Please select the highest grade that you completed at " + checkThis.txtHSName.value + ".");
	checkThis.lstHSGrade.focus();
	return false;
	} 
	
	if(!checkRadio(checkThis.rdoHSGrad, "Have you graduated from High School?\n\n\tYes  or  No"))
	{checkThis.rdoHSGrad[0].focus();
	return false;}


	if(checkThis.txtHSGPA.value != '')
	{
	if(!DV_Integer(checkThis.txtHSGPA.value) && !DV_checkGPA(checkThis.txtHSGPA.value))
		{DV_OnError("Please enter a GPA in the following format: 1.23\n\n\t\tor\n\none of the following letter grades: A, B, C, D, or F. ");
		checkThis.txtHSGPA.focus();
		checkThis.txtHSGPA.select();
		return false;
		}
	}

	if(DV_ValidInput(checkThis.txtColName))	
	{ 

		if(!DV_ValidInput(checkThis.txtColLocation))	
	  	{DV_OnError("Please enter the name of the city that " + checkThis.txtColName.value + " is in.");
		checkThis.txtColLocation.focus();
		return false;
		}

		College = document.frmPersonal.lstColGrade.selectedIndex;
		if (document.frmPersonal.lstColGrade.options[College].value == "None")
		{DV_OnError("Please select the highest level that you completed at " +checkThis.txtColName.value+ ".");
		checkThis.lstColGrade.focus();
		return false;
		} 
		if(College == 1)
		{
		if(!DV_ValidInput(checkThis.txtColDegree)) 
		{
		DV_OnError("Please enter the type of degree you received from " + checkThis.txtColName.value + ".");
		checkThis.txtColDegree.focus();
		return false;}
		}
	
		if(checkThis.txtColGPA.value != "")
		{if(!DV_Integer(checkThis.txtColGPA.value) && !DV_checkGPA(checkThis.txtColGPA.value))
			{	
				DV_OnError("Please enter a GPA in the following format: 1.23\n\n\t\tor\n\none of the following letter grades: A, B, C, D, or F. ");
				checkThis.txtColGPA.focus();
				checkThis.txtColGPA.select();
				return false;
			}
		}
	}
	
	if(DV_ValidInput(checkThis.txtGradName))	
	{ 

		if(!DV_ValidInput(checkThis.txtGradLocation))	
	  	{DV_OnError("Please enter the name of the city that " + checkThis.txtGradName.value + " is in.");
		checkThis.txtGradLocation.focus();
		return false;
		}

		if(!DV_ValidInput(checkThis.txtGradStudy))
		{DV_OnError("Please enter your course of study at " +checkThis.txtGradName.value+ ".");
		checkThis.txtGradStudy.focus();
		return false;
		} 
	
		if(checkThis.txtGradGPA.value != "") 
		{
		if(!DV_Integer(checkThis.txtGradGPA.value) && !DV_checkGPA(checkThis.txtGradGPA.value))
		{DV_OnError("Please enter a GPA in the following format: 1.23\n\n\t\tor\n\none of the following letter grades: A, B, C, D, or F. ");
		checkThis.txtGradGPA.focus();
		checkThis.txtGradGPA.select();
		return false;}
		}
	}
	if(DV_ValidInput(checkThis.txtBusName))	
	{ 

		if(!DV_ValidInput(checkThis.txtBusLocation))	
	  	{DV_OnError("Please enter the name of the city that " + checkThis.txtBusName.value + " is in.");
		checkThis.txtBusLocation.focus();
		return false;
		}

		if(!DV_ValidInput(checkThis.txtBusStudy))
		{DV_OnError("Please enter your course of study at " +checkThis.txtBusName.value+ ".");
		checkThis.txtBusStudy.focus();
		return false;
		} 
	
		if(checkThis.txtBusGPA.value != "") 
		{if(!DV_Integer(checkThis.txtBusGPA.value) && !DV_checkGPA(checkThis.txtBusGPA.value))
		{DV_OnError("Please enter a GPA in the following format: 1.23\n\n\t\tor\n\none of the following letter grades: A, B, C, D, or F. ");
		checkThis.txtBusGPA.focus();
		checkThis.txtBusGPA.select();
		return false;}
		}
	}


	Military = document.frmPersonal.lstMilitary.selectedIndex;
	if (document.frmPersonal.lstMilitary.options[Military].value != "None")
	{
		if(checkThis.txtEnlistedFrom.value == "")
		{
			DV_OnError("Please enter the date that you enlisted in the " + document.frmPersonal.lstMilitary.options[Military].value + ".");
			checkThis.txtEnlistedFrom.focus();
			return false;
		}
		else if(!chkdate(checkThis.txtEnlistedFrom))
		{
			DV_OnError("The DATE you entered is invalid, please re-enter\nin the following format: MM/DD/YYYY");
			checkThis.txtEnlistedFrom.focus();
			checkThis.txtEnlistedFrom.select();
			return false;
		}
		
		if(checkThis.txtEnlistTo.value == "")
		{
			DV_OnError("Please enter the date that you left the " + document.frmPersonal.lstMilitary.options[Military].value +".");
			checkThis.txtEnlistTo.focus();
			return false;
		}
		else if(!chkdate(checkThis.txtEnlistTo))
		{
			DV_OnError("The DATE you entered is invalid, please re-enter\nin the following format: MM/DD/YYYY");
			checkThis.txtEnlistTo.focus();
			checkThis.txtEnlistTo.select();
			return false;
		}

		if (checkThis.txtDischarge.value == "")
		{DV_OnError("Please enter the rank when you left the " + document.frmPersonal.lstMilitary.options[Military].value+ ".");
		checkThis.txtDischarge.focus();
		checkThis.txtDischarge.select();
		return false;
		}
	

	}

	if(DV_ValidInput(checkThis.txtEmpName1))
	{
		if(!DV_ValidInput(checkThis.txtEmpAddress1))
		{ DV_OnError("Please enter the ADDRESS of " + checkThis.txtEmpName1.value + ".");
		  checkThis.txtEmpAddress1.focus();
		  return false;
		}

		if(!DV_ValidInput(checkThis.txtEmpAddress1))
		{ DV_OnError("Please enter the ADDRESS of " + checkThis.txtEmpName1.value + ".");
		  checkThis.txtEmpAddress1.focus();
		  return false;
		}		

		if(!DV_CheckPhone(checkThis.txtEmpPhone1.value))
		{ DV_OnError("Please enter the PHONE NUMBER of " + checkThis.txtEmpName1.value + "\nin one of the following formats:\n123-4567 or (123)456-7890");
		  checkThis.txtEmpPhone1.focus();
		  return false;
		}

		if(checkThis.txtEmpFrom1.value == "")
		{
			DV_OnError("Please enter the DATE that you started working for " +checkThis.txtEmpName1.value + ".");
			checkThis.txtEmpFrom1.focus();
			return false;
		}
		else if(!chkdate(checkThis.txtEmpFrom1))
		{
			DV_OnError("The DATE you entered is invalid, please re-enter\nin the following format: MM/DD/YYYY");
			checkThis.txtEmpFrom1.focus();
			checkThis.txtEmpFrom1.select();
			return false;
		}

		if(checkThis.txtEmpTo1.value == "")
		{
			DV_OnError("Please enter the DATE that you stopped working for " +checkThis.txtEmpName1.value + ".");
			checkThis.txtEmpTo1.focus()
			return false;
		}
		else if(!chkdate(checkThis.txtEmpTo1))
		{
			DV_OnError("The DATE you entered is invalid, please re-enter\nin the following format: MM/DD/YYYY");
			checkThis.txtEmpTo1.focus();
			checkThis.txtEmpTo1.select();
			return false;
		}

		if(!DV_Integer(checkThis.txtSalaryStart1.value) || checkThis.txtSalaryStart1.value == "")
		{ DV_OnError("Please enter the SALARY or HOURLY WAGE that you earned\nwhen you started working at " + checkThis.txtEmpName1.value + ".");
		  checkThis.txtSalaryStart1.focus();
		  checkThis.txtSalaryStart1.select();
			return false;
		}

		if(!DV_Integer(checkThis.txtSalaryEnd1.value) || checkThis.txtSalaryEnd1.value == "")
		{ DV_OnError("Please enter the SALARY or HOURLY WAGE that you earned\nwhen you finished working at " + checkThis.txtEmpName1.value + ".");
		  checkThis.txtSalaryEnd1.focus();
		  checkThis.txtSalaryEnd1.select();
			return false;
		}

		if(!DV_ValidInput(checkThis.txtEmpSup1))
		{ DV_OnError("Please enter the NAME of your supervisor at " + checkThis.txtEmpName1.value + ".");
		  checkThis.txtEmpSup1.focus();
		  return false;
		}	

		if(!DV_ValidInput(checkThis.txtEmpSupTitle1))
		{ DV_OnError("Please enter the TITLE of " + checkThis.txtEmpSup1.value + " at " + checkThis.txtEmpName1.value + ".");
		  checkThis.txtEmpSupTitle1.focus();
		  return false;
		}			

		if(!DV_ValidInput(checkThis.txtEmpPosition1))
		{ DV_OnError("Please enter the TITLE you held at " + checkThis.txtEmpName1.value + ".");
		  checkThis.txtEmpPosition1.focus();
		  return false;
		}		

		if(!DV_Integer(checkThis.txtEmpNumSup1.value))
		{ DV_OnError("Please enter the number of employees that you supervised at " + checkThis.txtEmpName1.value + ".");
		  checkThis.txtEmpNumSup1.focus();
		  checkThis.txtEmpNumSup1.select();
	          return false;
		}

		if(!DV_ValidInput(checkThis.txtEmpReason1))
		{
		DV_OnError("Please enter a REASON why you left " + checkThis.txtEmpName1.value + ".");
		checkThis.txtEmpReason1.focus();
		checkThis.txtEmpReason1.select();
		return false;
		}
	}

// This is the start of the validation of the second most previous employer

	if(DV_ValidInput(checkThis.txtEmpName2))
	{
		if(!DV_ValidInput(checkThis.txtEmpAddress2))
		{ DV_OnError("Please enter the ADDRESS of " + checkThis.txtEmpName2.value + ".");
		  checkThis.txtEmpAddress2.focus();
		  return false;
		}

		if(!DV_ValidInput(checkThis.txtEmpAddress2))
		{ DV_OnError("Please enter the ADDRESS of " + checkThis.txtEmpName2.value + ".");
		  checkThis.txtEmpAddress2.focus();
		  return false;
		}		

		if(!DV_CheckPhone(checkThis.txtEmpPhone2.value))
		{ DV_OnError("Please enter the PHONE NUMBER of " + checkThis.txtEmpName2.value + "\nin one of the following formats:\n123-4567 or (123)456-7890");
		  checkThis.txtEmpPhone2.focus();
		  return false;
		}

		if(checkThis.txtEmpFrom2.value == "")
		{
			DV_OnError("Please enter the DATE that you started working for " + checkThis.txtEmpName2.value + ".");
			checkThis.txtEmpFrom2.focus();
			return false;
		}
		else if(!chkdate(checkThis.txtEmpFrom2))
		{
			DV_OnError("The DATE you entered is invalid, please re-enter\nin the following format: MM/DD/YYYY");
			checkThis.txtEmpFrom2.focus();
			checkThis.txtEmpFrom2.select();
			return false;
		}

		if(checkThis.txtEmpTo2.value == "")
		{
			DV_OnError("Please enter the DATE that you stopped working for " +checkThis.txtEmpName2.value + ".");
			checkThis.txtEmpTo2.focus()
			return false;
		}
		else if(!chkdate(checkThis.txtEmpTo2))
		{
			DV_OnError("The DATE you entered is invalid, please re-enter\nin the following format: MM/DD/YYYY");
			checkThis.txtEmpTo2.focus();
			checkThis.txtEmpTo2.select();
			return false;
		}


		if(!DV_Integer(checkThis.txtSalaryStart2.value) || checkThis.txtSalaryStart2.value == "")
		{ DV_OnError("Please enter the SALARY or HOURLY WAGE that you earned\nwhen you started working at " + checkThis.txtEmpName2.value + ".");
		  checkThis.txtSalaryStart2.focus();
		  checkThis.txtSalaryStart2.select();
		  return false;
		}

		if(!DV_Integer(checkThis.txtSalaryEnd2.value) || checkThis.txtSalaryEnd2.value == "")
		{ DV_OnError("Please enter the SALARY or HOURLY WAGE that you earned\nwhen you finished working at " + checkThis.txtEmpName2.value + ".");
		  checkThis.txtSalaryEnd2.focus();
		  checkThis.txtSalaryEnd2.select();
		  return false;
		}

		if(!DV_ValidInput(checkThis.txtEmpSup2))
		{ DV_OnError("Please enter the NAME of your supervisor at " + checkThis.txtEmpName2.value + ".");
		  checkThis.txtEmpSup2.focus();
		  return false;
		}	

		if(!DV_ValidInput(checkThis.txtEmpSupTitle2))
		{ DV_OnError("Please enter the TITLE of " + checkThis.txtEmpSup2.value + " at " + checkThis.txtEmpName2.value + ".");
		  checkThis.txtEmpSupTitle2.focus();
		  return false;
		}			

		if(!DV_ValidInput(checkThis.txtEmpPosition2))
		{ DV_OnError("Please enter the TITLE you held at " + checkThis.txtEmpName2.value + ".");
		  checkThis.txtEmpPosition2.focus();
		  return false;
		}		

		if(!DV_Integer(checkThis.txtEmpNumSup2.value))
		{ DV_OnError("Please enter the number of employees that you supervised at " + checkThis.txtEmpName2.value + ".");
		  checkThis.txtEmpNumSup2.focus();
		  checkThis.txtEmpNumSup2.select();
	          return false;
		}

		if(!DV_ValidInput(checkThis.txtEmpReason2))
		{
		DV_OnError("Please enter a REASON why you left " + checkThis.txtEmpName2.value + ".");
		checkThis.txtEmpReason2.focus();
		checkThis.txtEmpReason2.select();
		return false;
		}
	}

// Start of Data Validation for Employer #3

	if(DV_ValidInput(checkThis.txtEmpName3))
	{
		if(!DV_ValidInput(checkThis.txtEmpAddress3))
		{ DV_OnError("Please enter the ADDRESS of " + checkThis.txtEmpName3.value + ".");
		  checkThis.txtEmpAddress3.focus();
		  return false;
		}

		if(!DV_ValidInput(checkThis.txtEmpAddress3))
		{ DV_OnError("Please enter the ADDRESS of " + checkThis.txtEmpName3.value + ".");
		  checkThis.txtEmpAddress3.focus();
		  return false;
		}		

		if(!DV_CheckPhone(checkThis.txtEmpPhone3.value))
		{ DV_OnError("Please enter the PHONE NUMBER of " + checkThis.txtEmpName3.value + "\nin one of the following formats:\n123-4567 or (123)456-7890");
		  checkThis.txtEmpPhone3.focus();
		  return false;
		}

		if(checkThis.txtEmpFrom3.value == "")
		{
			DV_OnError("Please enter the DATE that you started working for " +checkThis.txtEmpName3.value + ".");
			checkThis.txtEmpFrom3.focus();
			return false;
		}
		else if(!chkdate(checkThis.txtEmpFrom3))
		{
			DV_OnError("The DATE you entered is invalid, please re-enter\nin the following format: MM/DD/YYYY");
			checkThis.txtEmpFrom3.focus();
			checkThis.txtEmpFrom3.select();
			return false;
		}

		if(checkThis.txtEmpTo3.value == "")
		{
			DV_OnError("Please enter the DATE that you stopped working for " +checkThis.txtEmpName3.value + ".");
			checkThis.txtEmpTo3.focus()
			return false;
		}
		else if(!chkdate(checkThis.txtEmpTo3))
		{
			DV_OnError("The DATE you entered is invalid, please re-enter\nin the following format: MM/DD/YYYY");
			checkThis.txtEmpTo3.focus();
			checkThis.txtEmpTo3.select();
			return false;
		}


		if(!DV_Integer(checkThis.txtSalaryStart3.value) || checkThis.txtSalaryStart3.value == "")
		{ DV_OnError("Please enter the SALARY or HOURLY WAGE that you earned\nwhen you started working at " + checkThis.txtEmpName3.value + ".");
		  checkThis.txtSalaryStart3.focus();
		  checkThis.txtSalaryStart3.select();
			return false;
		}

		if(!DV_Integer(checkThis.txtSalaryEnd3.value) || checkThis.txtSalaryEnd3.value == "")
		{ DV_OnError("Please enter the SALARY or HOURLY WAGE that you earned\nwhen you finished working at " + checkThis.txtEmpName1.value + ".");
		  checkThis.txtSalaryEnd3.focus();
		  checkThis.txtSalaryEnd3.select();
			return false;
		}

		if(!DV_ValidInput(checkThis.txtEmpSup3))
		{ DV_OnError("Please enter the NAME of your supervisor at " + checkThis.txtEmpName3.value + ".");
		  checkThis.txtEmpSup3.focus();
		  return false;
		}	

		if(!DV_ValidInput(checkThis.txtEmpSupTitle3))
		{ DV_OnError("Please enter the TITLE of " + checkThis.txtEmpSup3.value + " at " + checkThis.txtEmpName3.value + ".");
		  checkThis.txtEmpSupTitle3.focus();
		  return false;
		}			

		if(!DV_ValidInput(checkThis.txtEmpPosition3))
		{ DV_OnError("Please enter the TITLE you held at " + checkThis.txtEmpName3.value + ".");
		  checkThis.txtEmpPosition3.focus();
		  return false;
		}		

		if(!DV_Integer(checkThis.txtEmpNumSup3.value))
		{ DV_OnError("Please enter the number of employees that you supervised at " + checkThis.txtEmpName3.value + ".");
		  checkThis.txtEmpNumSup3.focus();
		  checkThis.txtEmpNumSup3.select();
	          return false;
		}

		if(!DV_ValidInput(checkThis.txtEmpReason3))
		{
		DV_OnError("Please enter a REASON why you left " + checkThis.txtEmpName3.value + ".");
		checkThis.txtEmpReason3.focus();
		checkThis.txtEmpReason3.select();
		return false;
		}
	}
// This is the start of the validation of the fourth most previous employer

	if(DV_ValidInput(checkThis.txtEmpName4))
	{
		if(!DV_ValidInput(checkThis.txtEmpAddress4))
		{ DV_OnError("Please enter the ADDRESS of " + checkThis.txtEmpName4.value + ".");
		  checkThis.txtEmpAddress4.focus();
		  return false;
		}

		if(!DV_ValidInput(checkThis.txtEmpAddress4))
		{ DV_OnError("Please enter the ADDRESS of " + checkThis.txtEmpName4.value + ".");
		  checkThis.txtEmpAddress4.focus();
		  return false;
		}		

		if(!DV_CheckPhone(checkThis.txtEmpPhone4.value))
		{ DV_OnError("Please enter the PHONE NUMBER of " + checkThis.txtEmpName4.value + "\nin one of the following formats:\n123-4567 or (123)456-7890");
		  checkThis.txtEmpPhone4.focus();
		  return false;
		}

		if(checkThis.txtEmpFrom4.value == "")
		{
			DV_OnError("Please enter the DATE that you started working for " +checkThis.txtEmpName4.value + ".");
			checkThis.txtEmpFrom4.focus();
			return false;
		}
		else if(!chkdate(checkThis.txtEmpFrom4))
		{
			DV_OnError("The DATE you entered is invalid, please re-enter\nin the following format: MM/DD/YYYY");
			checkThis.txtEmpFrom4.focus();
			checkThis.txtEmpFrom4.select();
			return false;
		}

		if(checkThis.txtEmpTo4.value == "")
		{
			DV_OnError("Please enter the DATE that you stopped working for " +checkThis.txtEmpName4.value + ".");
			checkThis.txtEmpTo4.focus()
			return false;
		}
		else if(!chkdate(checkThis.txtEmpTo4))
		{
			DV_OnError("The DATE you entered is invalid, please re-enter\nin the following format: MM/DD/YYYY");
			checkThis.txtEmpTo4.focus();
			checkThis.txtEmpTo4.select();
			return false;
		}


		if(!DV_Integer(checkThis.txtSalaryStart4.value) || checkThis.txtSalaryStart4.value == "")
		{ DV_OnError("Please enter the SALARY or HOURLY WAGE that you earned\nwhen you started working at " + checkThis.txtEmpName4.value + ".");
		  checkThis.txtSalaryStart4.focus();
		  checkThis.txtSalaryStart4.select();
		  return false;
		}

		if(!DV_Integer(checkThis.txtSalaryEnd4.value) || checkThis.txtSalaryEnd4.value == "")
		{ DV_OnError("Please enter the SALARY or HOURLY WAGE that you earned\nwhen you finished working at " + checkThis.txtEmpName4.value + ".");
		  checkThis.txtSalaryEnd4.focus();
		  checkThis.txtSalaryEnd4.select();
		  return false;
		}

		if(!DV_ValidInput(checkThis.txtEmpSup4))
		{ DV_OnError("Please enter the NAME of your supervisor at " + checkThis.txtEmpName4.value + ".");
		  checkThis.txtEmpSup4.focus();
		  return false;
		}	

		if(!DV_ValidInput(checkThis.txtEmpSupTitle4))
		{ DV_OnError("Please enter the TITLE of " + checkThis.txtEmpSup4.value + " at " + checkThis.txtEmpName4.value + ".");
		  checkThis.txtEmpSupTitle4.focus();
		  return false;
		}			

		if(!DV_ValidInput(checkThis.txtEmpPosition4))
		{ DV_OnError("Please enter the TITLE you held at " + checkThis.txtEmpName4.value + ".");
		  checkThis.txtEmpPosition4.focus();
		  return false;
		}		

		if(!DV_Integer(checkThis.txtEmpNumSup4.value))
		{ DV_OnError("Please enter the number of employees that you supervised at " + checkThis.txtEmpName4.value + ".");
		  checkThis.txtEmpNumSup4.focus();
		  checkThis.txtEmpNumSup4.select();
	          return false;
		}

		if(!DV_ValidInput(checkThis.txtEmpReason4))
		{
		DV_OnError("Please enter a REASON why you left " + checkThis.txtEmpName4.value + ".");
		checkThis.txtEmpReason4.focus();
		checkThis.txtEmpReason4.select();
		return false;
		}
	}	

	if(!DV_ValidInput(checkThis.txtPRName1))
	{DV_OnError("Please enter the NAME of a personal reference.");
	checkThis.txtPRName1.focus();
	return false;
	}

	if(!DV_ValidInput(checkThis.txtPROccup1))
	{DV_OnError("Please enter the OCCUPATION of " + checkThis.txtPRName1.value + ".");
	checkThis.txtPROccup1.focus();
	return false;
	}
	
	if(!DV_ValidInput(checkThis.txtPRYears1))
	{DV_OnError("Please enter the number of YEARS you have known " + checkThis.txtPRName1.value + ".");
	checkThis.txtPRYears1.focus();
	return false;
	}

	if(!DV_Integer(checkThis.txtPRYears1.value))
	{DV_OnError("Please enter the number of YEARS you have known " + checkThis.txtPRName1.value + ".");
	checkThis.txtPRYears1.focus();
	checkThis.txtPRYears1.select();
	return false;
	}


	if(DV_ValidInput(checkThis.txtPRName2))
	{
		if(!DV_ValidInput(checkThis.txtPROccup2))
		{DV_OnError("Please enter the OCCUPATION of " + checkThis.txtPRName2.value + ".");
		checkThis.txtPROccup2.focus();
		return false;
		}
	
		if(!DV_ValidInput(checkThis.txtPRYears2))
		{DV_OnError("Please enter the number of YEARS you have known " + checkThis.txtPRName2.value + ".");
		checkThis.txtPRYears2.focus();
		return false;
		}

		if(!DV_Integer(checkThis.txtPRYears2.value))
		{DV_OnError("Please enter the number of YEARS you have known " + checkThis.txtPRName2.value + ".");
		checkThis.txtPRYears2.focus();
		checkThis.txtPRYears2.select();
		return false;
		}
	}

	if(DV_ValidInput(checkThis.txtPRName3))
	{
		if(!DV_ValidInput(checkThis.txtPROccup3))
		{DV_OnError("Please enter the OCCUPATION of " + checkThis.txtPRName3.value + ".");
		checkThis.txtPROccup3.focus();
		return false;
		}
	
		if(!DV_ValidInput(checkThis.txtPRYears3))
		{DV_OnError("Please enter the number of YEARS you have known " + checkThis.txtPRName3.value + ".");
		checkThis.txtPRYears3.focus();
		return false;
		}

		if(!DV_Integer(checkThis.txtPRYears3.value))
		{DV_OnError("Please enter the number of YEARS you have known " + checkThis.txtPRName3.value + ".");
		checkThis.txtPRYears3.focus();
		checkThis.txtPRYears3.select();
		return false;
		}
	}
/*	if(! DV_ValidInput(checkThis.txtFNameEOE))
	{	DV_OnError("Please enter your FIRST NAME.");
		checkThis.txtFNameEOE.focus();
		checkThis.txtFNameEOE.select();
		return false;
	}
	if(! DV_ValidInput(checkThis.txtMNameEOE))
	{	DV_OnError("Please enter your MIDDLE NAME.");
		checkThis.txtMNameEOE.focus();
		checkThis.txtMNameEOE.select();
		return false;
	}	
	if(! DV_ValidInput(checkThis.txtLNameEOE))
	{	DV_OnError("Please enter your LAST NAME.");
		checkThis.txtLNameEOE.focus();
		checkThis.txtLNameEOE.select();
		return false;
	}
	if(! DV_ValidInput(checkThis.txtPositionEOE))
	{	DV_OnError("Please enter a Position to Apply For.");
		checkThis.txtPositionEOE.focus();
		checkThis.txtPositionEOE.select();
		return false;
	}
	Referral = checkThis.lstReferralEOE.selectedIndex;
	if (checkThis.lstReferralEOE.options[Referral].value == "None")
	{	
		DV_OnError("Please select a method of referral from the list box.");
		checkThis.lstReferralEOE.focus();
		return false;
	}
	if ((checkThis.lstReferralEOE.options[Referral].value == "Other") && !(DV_ValidInput(checkThis.txtReferralEOE)))	
	{
		DV_OnError("Enter the method in which you were referred.");
		checkThis.txtReferralEOE.focus();
		checkThis.txtReferralEOE.select();
		return false;
	}
	if(!checkRadio(checkThis.rdoSex, "Please select Male or Female."))
	{
		checkThis.rdoSex[0].focus();
		return false;
	}
	Race = checkThis.lstRaceEOE.selectedIndex;
	if (checkThis.lstRaceEOE.options[Race].value == "None")
	{
		DV_OnError("Please select an Ethnic Group from the list box.");
		checkThis.lstRaceEOE.focus();
		return false;
	}
	if ((checkThis.chkDisabled.checked || checkThis.chkHandicapped.checked) && !DV_ValidInput(checkThis.txtSpecialArrangements))
	{
		DV_OnError("Please list any special accommodations that you require.");
		checkThis.txtSpecialArrangements.focus();
		checkThis.txtSpecialArrangements.select();
		return false;
	}
*/
	if(confirm("Click OK to SUBMIT your application."))
		return true;
	else 
		return false;
}
