<!-- main nav image swap functions -->
<!-- BEGIN ********************************************************************************* -->
function btnSwapOn(btn) {
	document['btn_'+btn].src='images/btn'+btn+'_on.jpg';
}
function btnSwapOff(btn) {
	document['btn_'+btn].src='images/btn'+btn+'_off.jpg';
}
<!-- END *********************************************************************************** -->
<!-- Check application form for missing vars -->
<!-- BEGIN ********************************************************************************* -->
function checkForm(thisForm, img) {
	var allOK = false;
	var message = '';
	if(document[thisForm].Name_Last.value=='' || document[thisForm].Name_First.value=='' || document[thisForm].Name_Middle_Initial.value=='') {
		message+='\tYour Name\n';
		allOK = true;
	}
	if(document[thisForm].Address.value=='') {
		message+='\tYour Address\n';
		allOK = true;
	}
	if(document[thisForm].City.value=='') {
		message+='\tYour City\n';
		allOK = true;
	}
	if(document[thisForm].Province.value=='') {
		message+='\tYour Province\n';
		allOK = true;
	}
	if(document[thisForm].Postal_Code.value=='') {
		message+='\tYour Postal Code\n';
		allOK = true;
	}
	if(document[thisForm].Home_Phone.value=='') {
		message+='\tYour Phone\n';
		allOK = true;
	}
	if(document[thisForm].Email.value=='') {
		message+='\tYour Email\n';
		allOK = true;
	}
	if(document[thisForm].Signature.value=='') {
		message+='\tYour Signature\n';
		allOK = true;
	}
	if(document[thisForm].verify_ans.value=='') {
		message+='\tYour answer to the Human Verification question';
		allOK = true;
	}
	if (!allOK) {
		var ans_1 = document[thisForm].verify_ans.value;
		var email = document[thisForm].Email.value;
		validate(thisForm, img, ans_1, email);
	} else {
		alert('Please fill in...\n'+message);
	}
}
<!-- END *********************************************************************************** -->
<!-- Check contact form for missing vars -->
<!-- BEGIN ********************************************************************************* -->
function checkForm2(thisForm, img) {
	var allOK = false;
	var message = '';
	if(document[thisForm].Name.value=='') {
		message+='\tYour Name\n';
		allOK = true;
	}
	if(document[thisForm].Email.value=='') {
		message+='\tYour Email\n';
		allOK = true;
	}
	if(document[thisForm].verify_ans.value=='') {
		message+='\tYour answer to the Human Verification question';
		allOK = true;
	}
	if (!allOK) {
		var ans_1 = document[thisForm].verify_ans.value;
		var email = document[thisForm].Email.value;
		validate(thisForm, img, ans_1, email);
	} else {
		alert('Please fill in...\n'+message);
	}
}
<!-- END *********************************************************************************** -->
<!-- validation for form -->
<!-- BEGIN ********************************************************************************* -->
function validate(thisForm, img, ans_1, email) {
	// is checking for which img was displayed
	var ans_2 = 'none';
	switch (img) {
		case 0:
			ans_2 = 2;
			break;
		case 1:
			ans_2 = 4;
			break;
		case 2:
			ans_2 = 4;
			break;
		case 3:
			ans_2 = "red";
			break;
		case 4:
			ans_2 = 6;
			break;
		case 5:
			ans_2 = "yellow";
			break;
		case 6:
			ans_2 = 8;
			break;
		case 7:
			ans_2 = "blue";
			break;
		case 8:
			ans_2 = 10;
			break;
		case 9:
			ans_2 = "brown";
			break;
			
	}
	<!-- checks for valid email address and then if question was answered correctly -->
	if ((email.indexOf(".") > 2) && (email.indexOf("@") > 0)) {
		if (ans_2 == ans_1) {
			document[thisForm].verify.value = 'yes';
			document[thisForm].submit();
		} else {
			alert('The Human Verification answer you typed in was incorrect, please try again.');
		}
	} else {
		alert('Your email seems to be incorrect or missing.  Please try typing it again.');
	}
}
<!-- END *********************************************************************************** -->