/* Basic Validation Script: This script and many more are available free online at The JavaScript Source!! http://javascript.internet.com 
Created by: wsabstract.com | http://www.wsabstract.com */

<!-- Begin

function checkrequired(which) {
var pass=true;
for (i=0;i<which.length;i++) {
var tempobj=which.elements[i];
if (tempobj.id.substring(0,8)=="required") {
if (((tempobj.type=="text"||tempobj.type=="textarea"||tempobj.type=="select"||!tempobj.type=="checked")&&
tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
tempobj.selectedIndex==0)) {
pass=false;
break;
}
}
}
if (!pass) {
shortFieldName=tempobj.id.substring(8,75).toUpperCase();
alert("The "+shortFieldName+" field is a required field.");
tempobj.focus();
return false;
} else {
return true;
}
}

function checkradio3()

{
if (!document.EZFormMailer.threeradio[0].checked && !document.EZFormMailer.threeradio[1].checked) {
alert('The question asking if you are eligible for employment is a required field.  You must choose yes or no.');
document.EZFormMailer.threeradio[0].focus();
return false;
} else {
return true;
}
}

function checkradio2()

{
if (!document.EZFormMailer.tworadio[0].checked && !document.EZFormMailer.tworadio[1].checked) {
alert('The question asking if you have been convicted of a crime is a required field.  You must choose yes or no.');
document.EZFormMailer.tworadio[0].focus();
return false;
} else {
return true;
}
}

function checkradio1()

{
if (!document.EZFormMailer.oneradio[0].checked && !document.EZFormMailer.oneradio[1].checked) {
alert('The question asking you if you have applied with us before is a required field.  You must choose yes or no.');
document.EZFormMailer.oneradio[0].focus();
return false;
} else {
return true;
}
}

//  End --> 
