regex1 = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/
regex2 = /^(\w+[ ]*[\[\]\/\.\-\?\(\)\&\,\!\'\:\;\þ]*\s*\n*\r*[ ]*)+$/
regex3 = /^([A-z]+)$/
regex4 = /^(\d+)$/

function checkMsg(maxchar) {
	if (document.requestForm.Comments.value.length > maxchar) {
	alert("Please keep your message to under " + maxchar + " characters");
	document.requestForm.Comments.select();
	document.requestForm.Comments.focus();
	return false;
	}
	sendForm();
}

function sendForm() {
	var okSofar=true;

	if(document.requestForm.Comments.value.length > 0){
		if (!regex2.test(document.requestForm.Comments.value)){
		alert("What you typed is not going to work. The acceptable characters are . - ? ( ) & , ! ';:.");
		document.requestForm.Comments.select();
		document.requestForm.Comments.focus();
		okSofar=false;
		}
	}

	if(!regex1.test(document.requestForm.Email.value)){
	alert("Please enter a correct email address.");
	document.requestForm.Email.select();
	document.requestForm.Email.focus();
	okSofar=false;
	}

	if (document.requestForm.Work_Phone.value.length < 1){
	alert("Please enter a Work phone number.");
	document.requestForm.Work_Phone.select();
	document.requestForm.Work_Phone.focus();
	okSofar=false;
	}

	if (document.requestForm.Home_Phone.value.length < 1){
	alert("Please enter a Home phone number.");
	document.requestForm.Home_Phone.select();
	document.requestForm.Home_Phone.focus();
	okSofar=false;
	}

	if(document.requestForm.Name.value.length < 1){
	alert("Please enter your name.");
	document.requestForm.Name.select();
	document.requestForm.Name.focus();
	okSofar=false;
	}

	if(okSofar == true) document.requestForm.submit();
}

function checkMsg2(maxchar) {
	if (document.contForm.Regarding.value.length > maxchar) {
	alert("Please keep your message to under " + maxchar + " characters");
	document.contForm.Regarding.select();
	document.contForm.Regarding.focus();
	return false;
	}
	sendForm2();
}

function sendForm2() {
	var okSofar=true;

	if(document.contForm.Regarding.value.length > 0){
		if (!regex2.test(document.contForm.Regarding.value)){
		alert("What you typed is not going to work. The acceptable characters are . - ? ( ) & , ! ';:.");
		document.contForm.Regarding.select();
		document.contForm.Regarding.focus();
		okSofar=false;
		}
	}

	if(!regex1.test(document.contForm.Your_Email_Address.value)){
	alert("Please enter a correct email address.");
	document.contForm.Your_Email_Address.select();
	document.contForm.Your_Email_Address.focus();
	okSofar=false;
	}

	if(okSofar == true) document.contForm.submit();
}