function checkform(thisform) {
	var em=thisform.email.value;
	var emc=thisform.emailcheck.value;
	
	if (thisform.namepers.value==null || thisform.namepers.value=="") {
		alert ("Please enter your name.");
		thisform.namepers.focus();
		thisform.namepers.select();
		return false;
	}
	if (em==null || em=="") {
		alert ("Please enter your email address.");
		thisform.email.focus();
		thisform.email.select();
		return false;
	} else {
		var first=em.indexOf("@");
		var last=em.lastIndexOf(".");
		if (first<1 || last-first<2) {
			alert ("Invalid email address.");
			thisform.email.focus();
			thisform.email.select();
			return false;
		}
	}
	if (emc==null || emc=="") {
		alert ("Please verify your email address.");
		thisform.emailcheck.focus();
		thisform.emailcheck.select();
		return false;
	}	
	if (em!==emc) {
		alert ("Email addresses do not match. Please try again.");
		thisform.email.focus();
		thisform.email.select();
		return false;
	}
	if (thisform.phone1.value!=""){
		var ph1=thisform.phone1.value;
		if (isNaN(ph1)) {
			alert ("Invalid day telephone number. Incorrect values.");
			thisform.phone1.focus();
			thisform.phone1.select();
			return false;
		} else if(ph1.length!=10){
			alert ("Invalid day telephone number. Incorrect number of digits. (" + ph1.length + ")");
			thisform.phone1.focus();
			thisform.phone1.select();
			return false;
			
		}
	}
	if (thisform.phone2.value!=""){
		var ph2=thisform.phone2.value;
		if (isNaN(ph2)) {
			alert ("Invalid evening telephone number. Incorrect values.");
			thisform.phone2.focus();
			thisform.phone2.select();
			return false;
		} else if(ph2.length!=10){
			alert ("Invalid evening telephone number. Incorrect number of digits. (" + ph2.length + ")");
			thisform.phone2.focus();
			thisform.phone2.select();
			return false;
		}
	}
	if (thisform.phone3.value!=""){
		var ph3=thisform.phone3.value;
		if (isNaN(ph3)) {
			alert ("Invalid other telephone number. Incorrect values.");
			thisform.phone3.focus();
			thisform.phone3.select();
			return false;
		} else if(ph3.length!=10){
			alert ("Invalid other telephone number. Incorrect number of digits. (" + ph3.length + ")");
			thisform.phone3.focus();
			thisform.phone3.select();
			return false;
		}
	}
	if (thisform.message.value==null || thisform.message.value==""){
		alert ("You have not entered a message.\nScroll up to message box.");
		thisform.message.focus();
		thisform.message.select();
		return false;
	}
	if (thisform.verno.value==null || thisform.verno.value==""){
		alert ("You have not entered the verification number.");
		thisform.verno.focus();
		thisform.verno.select();
		return false;
	}
}
