<!--//
function menuCheck(theField){ 
	n = theField.selectedIndex;
	if (theField.selectedIndex == 0){
   		return false;   
  	}
	else{
		return true;
	}
}

function isNumber(theField)
{
   for(var i = 0; i < theField.value.length; i++)
   {
       var ch = theField.value.substring(i, i+1);
    if ((ch < "0" || "9" < ch) && (ch != "-") &&(ch != " "))
    {  
       return false;
    }
   }
   return true;
}


function phoneCheck(theField, theLabel){
	j = theField.value.length;
	k = 0;
	for(var i = 0; i < j; i++){
		var ch = theField.value.substring(i, i+1);
		if ((ch < "0" || "9" < ch) && (ch != "-") &&(ch != " ")){
			alert('Your '+ theLabel +' should contain numerals only.');
			theField.focus();
			theField.select();
			i = j;
			k = 1;
			return false;
		}
	}
	if(k == 0){
		return true;
	} else {
		return false;
	}
}

function radiocheck(theField){
	typecheck = "no";
	o = 0;
	while(theField[o]){
		if(theField[o].checked){
			typecheck = "yes";
		}
		o++;
	}
	if(typecheck == "no"){
		return false;
	} else {
		return true;
	}
}

function checkboxcheck(theField){
	typecheck = "no";
	if(theField.checked){
		typecheck = "yes";
	}
	if(typecheck == "no"){
		return false;
	} else {
		return true;
	}
}



function isFieldBlank(theField){
	if(theField.value.length == 0)		
		return true;		
	else			
		return false;	
}

function verify_form(form){
	
		if(isFieldBlank(form.first_name)){
			alert('Please enter your first name');
			form.first_name.focus();
		} else if(isFieldBlank(form.last_name)){
			alert('Please enter your last name');
			form.last_name.focus();
		} else if(isFieldBlank(form.email_address)){
			alert('Please enter your e-mail address');
			form.email_address.focus();
		} else if(isFieldBlank(form.present_address)){
			alert('Please enter your present street address');
			form.present_address.focus();
		} else if(isFieldBlank(form.present_city)){
			alert('Please enter the city of your present address');
			form.present_city.focus();
		} else if(isFieldBlank(form.present_state)){
			alert('Please enter the state of your present address');
			form.present_state.focus();
		} else if(isFieldBlank(form.present_zip)){
			alert('Please enter the zipcode of your present address');
			form.present_zip.focus();
		} else if(!isNumber(form.present_zip)){
			alert('Your zipcode should contain numerals only');
			form.present_zip.select();
			form.present_zip.focus();
		} else if(isFieldBlank(form.phone)){
			alert('Please enter your phone number');
			form.phone.focus();
		}else if(!phoneCheck(form.phone,'telephone number')){
			return;
		} else if (!menuCheck(form.start_month)){
   			alert("Please select the month you can start");
   			form.start_month.focus();
		} else if (!menuCheck(form.start_date)){
   			alert("Please select the date you can start");
   			form.start_date.focus();
		} else if (!menuCheck(form.start_year)){
   			alert("Please select the year you can start");
   			form.start_year.focus();
		} else if (!checkboxcheck(form.agreedstatement01) || !checkboxcheck(form.agreedstatement02) || !checkboxcheck(form.agreedstatement03) || !checkboxcheck(form.agreedstatement04) || !checkboxcheck(form.agreedstatement05) || !checkboxcheck(form.agreedstatement06) || !checkboxcheck(form.agreedstatement07) || !checkboxcheck(form.agreedstatement08)){
   			alert("Please check each of the boxes indicating that you have read and agree to each paragraph of the statement of employment policies");
   			form.agreedstatement.focus();






		} else {
			form.submit();
		}

}


// -->
