// Personal information section
// ----------------------------------------------------------------------

function isFname() {
if (document.forms[0].first_name.value == "") {
alert ("The First Name field is blank.\n\nPlease enter your first name.")
document.forms[0].first_name.focus();
return false;
}
return true;
}

function isLname() {
if (document.forms[0].last_name.value == "") {
alert ("The Last Name field is blank.\n\nPlease enter your last name.")
document.forms[0].last_name.focus();
return false;
}
return true;
}

function isEmail() {
if (document.forms[0].email.value == "") {
alert ("The Email field is blank.\n\nPlease enter your email address.")
document.forms[0].email.focus();
return false;
}

if (document.forms[0].email.value.indexOf ('@',0) == -1 ||
document.forms[0].email.value.indexOf ('.',0) == -1) {
alert ("The Email field requires a \"@\" and a \".\"be used.\n\nPlease re-enter your email address.")
document.forms[0].email.select();
document.forms[0].email.focus();
return false;
}
return true;
}

function isEmailcheck() {
if (document.forms[0].email_check.value == "") {
alert ("The Confirmation Email field is blank.\n\nPlease confirm your email address.")
document.forms[0].email_check.focus();
return false;
}

if (document.forms[0].email_check.value != document.forms[0].email.value) {
alert ("The Confirmation Email address does not match the Email address.\n\nPlease re-enter it.")
document.forms[0].email.select();
document.forms[0].email.focus();
return false;
}
return true;
}

function isEmailalt() {
if (document.forms[0].email_alt.value != "") {
	if (document.forms[0].email_alt.value.indexOf ('@',0) == -1 ||
	document.forms[0].email_alt.value.indexOf ('.',0) == -1) {
	alert ("The Alternate Email field requires a \"@\" and a \".\"be used.\n\nPlease re-enter your email address.")
	document.forms[0].email_alt.select();
	document.forms[0].email_alt.focus();
	return false;
	}
}
return true;
}

function isAddress() {
if (document.forms[0].street_address.value == "") {
alert ("The Street Address field is blank.\n\nPlease enter your street address.")
document.forms[0].street_address.focus();
return false;
}
return true;
}

function isCity() {
if (document.forms[0].city.value == "") {
alert ("The City field is blank.\n\nPlease enter your City.")
document.forms[0].city.focus();
return false;
}
return true;
}

function isState() {
if (document.forms[0].state.value == "") {
alert ("The State field is blank.\n\nPlease select your State.")
document.forms[0].state.focus();
return false;
}
return true;
}

function isZip() {
if (document.forms[0].zip_code.value == "") {
alert ("The Zip code field is blank.\n\nPlease enter your Zip code.")
document.forms[0].zip_code.focus();
return false;
}
if (isNaN(document.forms[0].zip_code.value)) {
alert ("The Zip code field should contain only numbers.")
document.forms[0].zip_code.select();
document.forms[0].zip_code.focus();
return false;
}
return true;
}

function isStay() {
if (document.forms[0].stay_years.value == "" && document.forms[0].stay_months.value == "") {
alert ("The Length at Address fields are blank.\n\nPlease enter how long you have lived at this address.")
document.forms[0].stay_years.focus();
return false;
}
return true;
}

function isPhone() {
// Check if the phone field is blank
	if (document.forms[0].home_phone.value == "") {
	alert ("The Home Phone field is blank.\n\nPlease enter the phone number.")
	document.forms[0].home_phone.focus();
	return false;
	}
// Strip out non-numeric characters
	var stripped = document.forms[0].home_phone.value.replace( /[\(\)\.\-\ ]/g, '' );
	if (isNaN(stripped)) {
	alert ("The phone number should contain only numbers.")
	document.forms[0].home_phone.select();
	document.forms[0].home_phone.focus();
	return false;
	}
// Verify length of phone field
	if (stripped.length != 10) {
	alert ("The Home Phone field is incorrect.\n\nPlease re-enter the phone number.")
	document.forms[0].home_phone.select();
	document.forms[0].home_phone.focus();
	return false;
	}
// Reformat phone field
var newString = stripped.substring(0,3) + "-" + stripped.substring(3,6) + "-" + stripped.substring(6,10)
document.forms[0].home_phone.value = newString;
return true;
}

function isCell() {
if (document.forms[0].cell_phone.value != "") {
// Strip out non-numeric characters
	var stripped = document.forms[0].cell_phone.value.replace( /[\(\)\.\-\ ]/g, '' );
	if (isNaN(stripped)) {
	alert ("The phone number should contain only numbers.")
	document.forms[0].cell_phone.select();
	document.forms[0].cell_phone.focus();
	return false;
	}
// Verify length of phone field
	if (stripped.length != 10) {
	alert ("The Cell Phone \/ Pager field is incorrect.\n\nPlease re-enter the phone number.")
	document.forms[0].cell_phone.select();
	document.forms[0].cell_phone.focus();
	return false;
	}
// Reformat phone field
var newString = stripped.substring(0,3) + "-" + stripped.substring(3,6) + "-" + stripped.substring(6,10)
document.forms[0].cell_phone.value = newString;
}
return true;
}

function isFax() {
if (document.forms[0].fax_phone.value != "") {
// Strip out non-numeric characters
	var stripped = document.forms[0].fax_phone.value.replace( /[\(\)\.\-\ ]/g, '' );
	if (isNaN(stripped)) {
	alert ("The phone number should contain only numbers.")
	document.forms[0].fax_phone.select();
	document.forms[0].fax_phone.focus();
	return false;
	}
// Verify length of phone field
	if (stripped.length != 10) {
	alert ("The Fax Phone field is incorrect.\n\nPlease re-enter the phone number.")
	document.forms[0].fax_phone.select();
	document.forms[0].fax_phone.focus();
	return false;
	}
// Reformat phone field
var newString = stripped.substring(0,3) + "-" + stripped.substring(3,6) + "-" + stripped.substring(6,10)
document.forms[0].fax_phone.value = newString;
}
return true;
}


// Employment information section
// ----------------------------------------------------------------------

function isEmployer() {
if (document.forms[0].employer.value == "") {
alert ("The Employer field is blank.\n\nPlease enter your employers name.")
document.forms[0].employer.focus();
return false;
}
return true;
}

function isPosition() {
if (document.forms[0].position.value == "") {
alert ("The Position field is blank.\n\nPlease enter your position or title.")
document.forms[0].position.focus();
return false;
}
return true;
}

function isWAddress() {
if (document.forms[0].work_address.value == "") {
alert ("The Work Address field is blank.\n\nPlease enter your work address.")
document.forms[0].work_address.focus();
return false;
}
return true;
}

function isWCity() {
if (document.forms[0].work_city.value == "") {
alert ("The Work City field is blank.\n\nPlease enter your work city.")
document.forms[0].work_city.focus();
return false;
}
return true;
}

function isWState() {
if (document.forms[0].work_state.value == "") {
alert ("The Work State field is blank.\n\nPlease select your work state.")
document.forms[0].work_state.focus();
return false;
}
return true;
}

function isWZip() {
if (document.forms[0].work_zip_code.value == "") {
alert ("The Work Zip code field is blank.\n\nPlease enter your work zip code.")
document.forms[0].work_zip_code.focus();
return false;
}
return true;
}

function isWPhone() {
// Check if the phone field is blank
	if (document.forms[0].work_phone.value == "") {
	alert ("The Work Phone field is blank.\n\nPlease enter the phone number.")
	document.forms[0].work_phone.focus();
	return false;
	}
// Strip out non-numeric characters
	var stripped = document.forms[0].work_phone.value.replace( /[\(\)\.\-\ ]/g, '' );
	if (isNaN(stripped)) {
	alert ("The phone number should contain only numbers.")
	document.forms[0].work_phone.select();
	document.forms[0].work_phone.focus();
	return false;
	}
// Verify length of phone field
	if (stripped.length != 10) {
	alert ("The Work Phone field is incorrect.\n\nPlease re-enter the phone number.")
	document.forms[0].work_phone.select();
	document.forms[0].work_phone.focus();
	return false;
	}
// Reformat phone field
var newString = stripped.substring(0,3) + "-" + stripped.substring(3,6) + "-" + stripped.substring(6,10)
document.forms[0].work_phone.value = newString;
return true;
}

function isWExt() {
if (document.forms[0].work_ext.value != "") {
	if (isNaN(document.forms[0].work_ext.value)) {
	alert ("The Extension field should contain only numbers.")
	document.forms[0].work_ext.select();
	document.forms[0].work_ext.focus();
	return false;
	}
}
return true;
}

function isWFax() {
if (document.forms[0].work_fax.value != "") {
// Strip out non-numeric characters
	var stripped = document.forms[0].work_fax.value.replace( /[\(\)\.\-\ ]/g, '' );
	if (isNaN(stripped)) {
	alert ("The phone number should contain only numbers.")
	document.forms[0].work_fax.select();
	document.forms[0].work_fax.focus();
	return false;
	}
// Verify length of phone field
	if (stripped.length != 10) {
	alert ("The Work Fax field is incorrect.\n\nPlease re-enter the phone number.")
	document.forms[0].work_fax.select();
	document.forms[0].work_fax.focus();
	return false;
	}
// Reformat phone field
var newString = stripped.substring(0,3) + "-" + stripped.substring(3,6) + "-" + stripped.substring(6,10)
document.forms[0].work_fax.value = newString;
}
return true;
}

function isVerPhone() {
// Check if the phone field is blank
	if (document.forms[0].verify_phone.value == "") {
	alert ("The Number to Verify Employment field is blank.\n\nPlease enter the phone number to verify your employment.")
	document.forms[0].verify_phone.focus();
	return false;
	}
// Strip out non-numeric characters
	var stripped = document.forms[0].verify_phone.value.replace( /[\(\)\.\-\ ]/g, '' );
	if (isNaN(stripped)) {
	alert ("The phone number should contain only numbers.")
	document.forms[0].verify_phone.select();
	document.forms[0].verify_phone.focus();
	return false;
	}
// Verify length of phone field
	if (stripped.length != 10) {
	alert ("The Number to Verify Employment field is incorrect.\n\nPlease re-enter the phone number.")
	document.forms[0].verify_phone.select();
	document.forms[0].verify_phone.focus();
	return false;
	}
// Reformat phone field
var newString = stripped.substring(0,3) + "-" + stripped.substring(3,6) + "-" + stripped.substring(6,10)
document.forms[0].verify_phone.value = newString;
return true;
}

function isEmployed() {
if (document.forms[0].emp_years.value == "" && document.forms[0].emp_months.value == "") {
alert ("The Length of Employment fields are blank.\n\nPlease enter how long you have worked at this company.")
document.forms[0].emp_years.focus();
return false;
}
return true;
}

function isPaycheck() {
if (document.forms[0].paycheck.value == "") {
alert ("The Average Paycheck field is blank.\n\nPlease enter your average paycheck amount.")
document.forms[0].paycheck.focus();
return false;
}
if (isNaN(document.forms[0].paycheck.value)) {
alert ("The Average Paycheck field should contain only numbers.")
document.forms[0].paycheck.select();
document.forms[0].paycheck.focus();
return false;
}
return true;
}

function isPayCycle() {
if (document.forms[0].pay_cycle.value == "") {
alert ("The Pay Cycle field is blank.\n\nPlease select how often you get paid.")
document.forms[0].pay_cycle.focus();
return false;
}
return true;
}

function isPayDay() {
if (document.forms[0].pay_day.value == "") {
alert ("The Pay Day field is blank.\n\nPlease select the day of week usually paid.")
document.forms[0].pay_day.focus();
return false;
}
return true;
}

function isPayDays() {
if (document.forms[0].payday_month1.value == "" || document.forms[0].payday_day1.value == "" || document.forms[0].payday_year1.value == "") {
alert ("The Next Payday fields are blank.\n\nPlease enter your first payday.")
document.forms[0].payday_month1.focus();
return false;
}
if (document.forms[0].payday_month2.value == "" || document.forms[0].payday_day2.value == "" || document.forms[0].payday_year2.value == "") {
alert ("The Next Payday fields are blank.\n\nPlease enter your second payday.")
document.forms[0].payday_month2.focus();
return false;
}
return true;
}

function isDirectDep() {
if (document.forms[0].direct_dep.value == "") {
alert ("The Direct Deposit field is blank.\n\nPlease select whether or not your paycheck is directly deposited.")
document.forms[0].direct_dep.focus();
return false;
}
return true;
}


// Bank information section
// ----------------------------------------------------------------------

function isBank() {
if (document.forms[0].bank_name.value == "") {
alert ("The Bank Name field is blank.\n\nPlease enter your bank name.")
document.forms[0].bank_name.focus();
return false;
}
return true;
}

function isAccNum() {
if (document.forms[0].bank_account_number.value == "") {
alert ("The Account Number field is blank.\n\nPlease enter your account number.")
document.forms[0].bank_account_number.focus();
return false;
}
if (isNaN(document.forms[0].bank_account_number.value)) {
alert ("The Account Number field should contain only numbers.")
document.forms[0].bank_account_number.select();
document.forms[0].bank_account_number.focus();
return false;
}
return true;
}

function isRouting() {
if (document.forms[0].bank_routing_number.value == "") {
alert ("The Routing Number field is blank.\n\nPlease enter your bank routing number.")
document.forms[0].bank_routing_number.focus();
return false;
}
if (isNaN(document.forms[0].bank_routing_number.value)) {
alert ("The Routing Number field should contain only numbers.")
document.forms[0].bank_routing_number.select();
document.forms[0].bank_routing_number.focus();
return false;
}
return true;
}

function isAccType() {
if (document.forms[0].bank_account_type.value == "") {
alert ("The Account Type field is blank.\n\nPlease select the type of bank account you have.")
document.forms[0].bank_account_type.focus();
return false;
}
return true;
}

function isBPhone() {
// Check if the phone field is blank
	if (document.forms[0].bank_phone.value == "") {
	alert ("The Bank Phone field is blank.\n\nPlease enter the phone number.")
	document.forms[0].bank_phone.focus();
	return false;
	}
// Strip out non-numeric characters
	var stripped = document.forms[0].bank_phone.value.replace( /[\(\)\.\-\ ]/g, '' );
	if (isNaN(stripped)) {
	alert ("The phone number should contain only numbers.")
	document.forms[0].bank_phone.select();
	document.forms[0].bank_phone.focus();
	return false;
	}
// Verify length of phone field
	if (stripped.length != 10) {
	alert ("The Bank Phone field is incorrect.\n\nPlease re-enter the phone number.")
	document.forms[0].bank_phone.select();
	document.forms[0].bank_phone.focus();
	return false;
	}
// Reformat phone field
var newString = stripped.substring(0,3) + "-" + stripped.substring(3,6) + "-" + stripped.substring(6,10)
document.forms[0].bank_phone.value = newString;
return true;
}

function isAccHeld() {
if (document.forms[0].account_held_years.value == "" && document.forms[0].account_held_months.value == "") {
alert ("The Account Held fields are blank.\n\nPlease enter how long you have had this account.")
document.forms[0].account_held_years.focus();
return false;
}
return true;
}

function isNSF() {
if (document.forms[0].nsf.value == "") {
alert ("The NSF field is blank.\n\nPlease select the number of NSF's you have had.")
document.forms[0].nsf.focus();
return false;
}
return true;
}


// References section
// ----------------------------------------------------------------------

function isRef1Name() {
if (document.forms[0].ref1.value == "") {
alert ("The Reference 1 Name field is blank.\n\nPlease enter the name of your first reference.")
document.forms[0].ref1.focus();
return false;
}
return true;
}

function isRef1Type() {
if (document.forms[0].ref1_type.value == "") {
alert ("The Reference 1 Relationship field is blank.\n\nPlease enter the relationship of your first reference.")
document.forms[0].ref1_type.focus();
return false;
}
return true;
}

function isRef1Phone() {
// Check if the phone field is blank
	if (document.forms[0].ref1_phone.value == "") {
	alert ("The Reference 1 Phone field is blank.\n\nPlease enter the phone number of your first reference.")
	document.forms[0].ref1_phone.focus();
	return false;
	}
// Strip out non-numeric characters
	var stripped = document.forms[0].ref1_phone.value.replace( /[\(\)\.\-\ ]/g, '' );
	if (isNaN(stripped)) {
	alert ("The phone number should contain only numbers.")
	document.forms[0].ref1_phone.select();
	document.forms[0].ref1_phone.focus();
	return false;
	}
// Verify length of phone field
	if (stripped.length != 10) {
	alert ("The Reference 1 Phone field is incorrect.\n\nPlease re-enter the phone number.")
	document.forms[0].ref1_phone.select();
	document.forms[0].ref1_phone.focus();
	return false;
	}
// Reformat phone field
var newString = stripped.substring(0,3) + "-" + stripped.substring(3,6) + "-" + stripped.substring(6,10)
document.forms[0].ref1_phone.value = newString;
return true;
}

function isRef2Name() {
if (document.forms[0].ref2.value == "") {
alert ("The Reference 2 Name field is blank.\n\nPlease enter the name of your second reference.")
document.forms[0].ref2.focus();
return false;
}
return true;
}

function isRef2Type() {
if (document.forms[0].ref2_type.value == "") {
alert ("The Reference 2 Relationship field is blank.\n\nPlease enter the relationship of your second reference.")
document.forms[0].ref2_type.focus();
return false;
}
return true;
}

function isRef2Phone() {
// Check if the phone field is blank
	if (document.forms[0].ref2_phone.value == "") {
	alert ("The Reference 2 Phone field is blank.\n\nPlease enter the phone number of your second reference.")
	document.forms[0].ref2_phone.focus();
	return false;
	}
// Strip out non-numeric characters
	var stripped = document.forms[0].ref2_phone.value.replace( /[\(\)\.\-\ ]/g, '' );
	if (isNaN(stripped)) {
	alert ("The phone number should contain only numbers.")
	document.forms[0].ref2_phone.select();
	document.forms[0].ref2_phone.focus();
	return false;
	}
// Verify length of phone field
	if (stripped.length != 10) {
	alert ("The Reference 2 Phone field is incorrect.\n\nPlease re-enter the phone number.")
	document.forms[0].ref2_phone.select();
	document.forms[0].ref2_phone.focus();
	return false;
	}
// Reformat phone field
var newString = stripped.substring(0,3) + "-" + stripped.substring(3,6) + "-" + stripped.substring(6,10)
document.forms[0].ref2_phone.value = newString;
return true;
}

function isRef3Name() {
if (document.forms[0].ref3.value == "") {
alert ("The Reference 3 Name field is blank.\n\nPlease enter the name of your third reference.")
document.forms[0].ref3.focus();
return false;
}
return true;
}

function isRef3Type() {
if (document.forms[0].ref2_type.value == "") {
alert ("The Reference 2 Relationship field is blank.\n\nPlease enter the relationship of your third reference.")
document.forms[0].ref2_type.focus();
return false;
}
return true;
}

function isRef3Phone() {
// Check if the phone field is blank
	if (document.forms[0].ref3_phone.value == "") {
	alert ("The Reference 3 Phone field is blank.\n\nPlease enter the phone number of your third reference.")
	document.forms[0].ref3_phone.focus();
	return false;
	}
// Strip out non-numeric characters
	var stripped = document.forms[0].ref3_phone.value.replace( /[\(\)\.\-\ ]/g, '' );
	if (isNaN(stripped)) {
	alert ("The phone number should contain only numbers.")
	document.forms[0].ref3_phone.select();
	document.forms[0].ref3_phone.focus();
	return false;
	}
// Verify length of phone field
	if (stripped.length != 10) {
	alert ("The Reference 3 Phone field is incorrect.\n\nPlease re-enter the phone number.")
	document.forms[0].ref3_phone.select();
	document.forms[0].ref3_phone.focus();
	return false;
	}
// Reformat phone field
var newString = stripped.substring(0,3) + "-" + stripped.substring(3,6) + "-" + stripped.substring(6,10)
document.forms[0].ref3_phone.value = newString;
return true;
}


// Security information section
// ----------------------------------------------------------------------

function isSSN() {
// Check if the phone field is blank
	if (document.forms[0].ssn.value == "") {
	alert ("The Social Security Number field is blank.\n\nPlease enter your social security number.")
	document.forms[0].ssn.focus();
	return false;
	}
// Strip out non-numeric characters
	var stripped = document.forms[0].ssn.value.replace( /[\(\)\.\-\ ]/g, '' );
	if (isNaN(stripped)) {
	alert ("The social security number should contain only numbers.")
	document.forms[0].ssn.select();
	document.forms[0].ssn.focus();
	return false;
	}
// Verify length of phone field
	if (stripped.length != 9) {
	alert ("The Social Security Number field is incorrect.\n\nPlease re-enter your social security number number.")
	document.forms[0].ssn.select();
	document.forms[0].ssn.focus();
	return false;
	}
// Reformat phone field
var newString = stripped.substring(0,3) + "-" + stripped.substring(3,5) + "-" + stripped.substring(5,9)
document.forms[0].ssn.value = newString;
return true;
}

function isBday() {
if (document.forms[0].bday_month.value == "" || document.forms[0].bday_day.value == "" || document.forms[0].bday_year.value == "") {
alert ("The Birthday fields are blank.\n\nPlease enter your birthday.")
document.forms[0].bday_month.focus();
return false;
}
return true;
}

function isDLnum() {
if (document.forms[0].dl_number.value == "") {
alert ("The Driver's License Number field is blank.\n\nPlease enter your driver's license number.")
document.forms[0].dl_number.focus();
return false;
}
return true;
}

function isDLstate() {
if (document.forms[0].dl_state.value == "") {
alert ("The State Issued field is blank.\n\nPlease select the state where your license was issued.")
document.forms[0].dl_state.focus();
return false;
}
return true;
}

function isMadName() {
if (document.forms[0].mothers_maiden_name.value == "") {
alert ("The Mother's Maiden Name field is blank.\n\nPlease enter your mother's maiden name.")
document.forms[0].mothers_maiden_name.focus();
return false;
}
return true;
}


// More questions
// ----------------------------------------------------------------------

function isPrevious() {
if (document.forms[0].used_payday.value == "") {
alert ("The Payday Question field is blank.\n\nPlease select your answer.")
document.forms[0].used_payday.focus();
return false;
}
return true;
}

function isOutstanding() {
if (document.forms[0].outstanding.value == "") {
alert ("The Payday Question field is blank.\n\nPlease select your answer.")
document.forms[0].outstanding.focus();
return false;
}
if (document.forms[0].outstanding.value == "Yes" && document.forms[0].loans_outstanding.value == "") {
alert ("The Payday Question field is blank.\n\nPlease enter the number of outstanding payday advances.")
document.forms[0].loans_outstanding.focus();
return false;
}
if (document.forms[0].outstanding.value == "Yes" && isNaN(document.forms[0].loans_outstanding.value)) {
alert ("The Number of Loans Outstanding field should contain only numbers.")
document.forms[0].loans_outstanding.select();
document.forms[0].loans_outstanding.focus();
return false;
}
return true;
}

function isBounced() {
if (document.forms[0].bounced_checks.value == "") {
alert ("The Bounced Checks Question field is blank.\n\nPlease select your answer.")
document.forms[0].bounced_checks.focus();
return false;
}
return true;
}

function isReferred() {
var pick = false;
for (counter = 0; counter < document.forms[0].referred.length; counter++)
	{
	if (document.forms[0].referred[counter].checked)
	pick = true; 
	}
if (!pick) {
alert ("The Referred By field is blank.\n\nPlease tell us how you heard about our company.")
return false;
}
if (document.forms[0].friend_name.value == "" && document.forms[0].engine_name.value == "" && document.forms[0].other_name.value == "") {
alert ("The Referred By field is blank.\n\nPlease specify where you heard about our company.")
return false;
}
return true;
}


// Advance Request section
// ----------------------------------------------------------------------

function isADVbank() {
if (document.forms[0].ADV_name.value == "") {
alert ("The Bank Name field is blank.\n\nPlease enter your bank name.")
document.forms[0].ADV_name.focus();
return false;
}
return true;
}

function isADVnumber() {
if (document.forms[0].ADV_number.value == "") {
alert ("The Check Number field is blank.\n\nPlease enter the check number.")
document.forms[0].ADV_number.focus();
return false;
}
if (isNaN(document.forms[0].ADV_number.value)) {
alert ("The Check Number field should contain only numbers.")
document.forms[0].ADV_number.select();
document.forms[0].ADV_number.focus();
return false;
}
return true;
}

function isADVamount() {
if (document.forms[0].ADV_amount.value == "") {
alert ("The Amount field is blank.\n\nPlease select the mount of your advance.")
document.forms[0].ADV_amount.focus();
return false;
}
return true;
}

function isADVdate() {
if (document.forms[0].ADV_month.value == "" || document.forms[0].ADV_day.value == "" || document.forms[0].ADV_year.value == "") {
alert ("The Next Payday fields are blank.\n\nPlease enter your next payday.")
document.forms[0].ADV_month.focus();
return false;
}
return true;
}

function isADVaccount() {
if (document.forms[0].ADV_account.value == "") {
alert ("The Account Number field is blank.\n\nPlease enter your account number.")
document.forms[0].ADV_account.focus();
return false;
}
if (isNaN(document.forms[0].ADV_account.value)) {
alert ("The Account Number field should contain only numbers.")
document.forms[0].ADV_account.select();
document.forms[0].ADV_account.focus();
return false;
}
return true;
}

function isADVsign() {
if (document.forms[0].ADV_sign.value == "") {
alert ("The Signature field is blank.\n\nPlease enter your signature.")
document.forms[0].ADV_sign.focus();
return false;
}
return true;
}


// Final Acknowledgement
// ----------------------------------------------------------------------

function isAGREE() {
if (document.forms[0].CONFIRM_AGREEMENT.value == "") {
alert ("The Application Acknowledgment field is blank.\n\nPlease confirm that you have read the agreement.")
document.forms[0].CONFIRM_AGREEMENT.focus();
return false;
}
return true;
}


// Additional Fields
// ----------------------------------------------------------------------

function isTrackNo() {
//if (document.forms[0].tracking.value != "") {
//	if (isNaN(document.forms[0].tracking.value)) {
//	alert ("The Tracking Number field should contain only numbers.")
//	document.forms[0].tracking.select();
//	document.forms[0].tracking.focus();
//	return false;
//	}
//}
return true;
}

function isDateStart() {
if (document.forms[0].change_month.value == "" || document.forms[0].change_day.value == "" || document.forms[0].change_year.value == "") {
alert ("The Date Changes Take Effect fields are blank.\n\nPlease enter the start date.")
document.forms[0].change_month.focus();
return false;
}
return true;
}


// Update Info Fields
// ----------------------------------------------------------------------

function isNewEmail() {
	if (document.forms[0].email.value != "") {
	return isEmail();
	}
return true;
}

function isNewEmailcheck() {
	if (document.forms[0].email_check.value != "") {
	return isEmailcheck();
	}
return true;
}

function isNewAddress() {
	if (document.forms[0].street_address.value != "") {
	return isAddress();
	}
return true;
}

function isNewCity() {
	if (document.forms[0].city.value != "") {
	return isCity();
	}
return true;
}

function isNewState() {
	if (document.forms[0].state.value != "") {
	return isState();
	}
return true;
}

function isNewZip() {
	if (document.forms[0].zip_code.value != "") {
	return isZip();
	}
return true;
}

function isNewPhone() {
	if (document.forms[0].home_phone.value != "") {
	return isPhone();
	}
return true;
}

// ----------------------------------------------------------------------

function isNewEmployer() {
	if (document.forms[0].employer.value != "") {
	return isEmployer();
	}
return true;
}

function isNewPosition() {
	if (document.forms[0].position.value != "") {
	return isPosition();
	}
return true;
}

function isNewWAddress() {
	if (document.forms[0].work_address.value != "") {
	return isWAddress();
	}
return true;
}

function isNewWCity() {
	if (document.forms[0].work_city.value != "") {
	return isWCity();
	}
return true;
}

function isNewWState() {
	if (document.forms[0].work_state.value != "") {
	return isWState();
	}
return true;
}

function isNewWZip() {
	if (document.forms[0].work_zip_code.value != "") {
	return isWZip();
	}
return true;
}

function isNewWPhone() {
	if (document.forms[0].work_phone.value != "") {
	return isWPhone();
	}
return true;
}

function isNewWExt() {
	if (document.forms[0].work_ext.value != "") {
	return isWExt();
	}
return true;
}

function isNewPaycheck() {
	if (document.forms[0].paycheck.value != "") {
	return isPaycheck();
	}
return true;
}

function isNewPayCycle() {
	if (document.forms[0].pay_cycle.value != "") {
	return isPayCycle();
	}
return true;
}

function isNewPayDays() {
	if (document.forms[0].payday_month1.value != "" || document.forms[0].payday_day1.value != "" || document.forms[0].payday_year1.value != "" ||
		document.forms[0].payday_month2.value != "" || document.forms[0].payday_day2.value != "" || document.forms[0].payday_year2.value != "") {
	return PayDays();
	}
return true;
}

function isNewDirectDep() {
	if (document.forms[0].direct_dep.value != "") {
	return isDirectDep();
	}
return true;
}

// ----------------------------------------------------------------------

function isNewBank() {
	if (document.forms[0].bank_name.value != "") {
	return isBank();
	}
return true;
}

function isNewBPhone() {
	if (document.forms[0].bank_phone.value != "") {
	return isBPhone();
	}
return true;
}

function isNewAccNum() {
	if (document.forms[0].bank_account_number.value != "") {
	return isAccNum();
	}
return true;
}

function isNewRouting() {
	if (document.forms[0].bank_routing_number.value != "") {
	return isRouting();
	}
return true;
}

function isNewAccType() {
	if (document.forms[0].bank_account_type.value != "") {
	return isAccType();
	}
return true;
}

