badpat = /[^a-zA-Z'\- ]/g;emailpat = /^[\._'\-\w]+@[_'\-\w]+\.([\._'\-\w]+\.)?([a-z]{2,6})$/i;phonepat = /[^0-9\(\)\- ]+/g;function checkform(theForm){	firstname = theForm.Firstname.value;	lastname = theForm.Lastname.value;	title = theForm.Title.value;	org = theForm.Organization.value;	thisEmail = theForm.Email.value;	thisPhone = theForm.Phone.value;		if(firstname.length < 2){	alert("The first name you entered appears too short to be valid.  Please check your answer for errors and try again.");	return false;	}	testresult = firstname.match(badpat);	if(testresult){	alert("The first name you entered appears to contain invalid characters.  Please check your answer for errors and try again.");	return false;	}	if(lastname.length < 2){	alert("The last name you entered appears too short to be valid.  Please check your answer for errors and try again.");	return false;	}	testresult = lastname.match(badpat);	if(testresult){	alert("The last name you entered appears to contain invalid characters.  Please check your answer for errors and try again.");	return false;	}	if(title.length < 2){	alert("The title you entered appears too short to be valid.  Please check your answer for errors and try again.");	return false;	}	testresult = title.match(badpat);	if(testresult){	alert("The title you entered appears to contain invalid characters.  Please check your answer for errors and try again.");	return false;	}	if(org.length < 4){	alert("The organization you entered appears too short to be valid.  Please check your answer for errors and try again.");	return false;	}	//testresult = org.match(badpat);	//if(testresult){	//alert("The organization you entered appears to contain invalid characters.  Please check your answer for errors and try again.");	//return false;	//}	if(thisEmail.length < 6){	alert("The email address you entered appears too short to be valid.  Please check your answer for errors and try again.");	return false;	}	testresult = thisEmail.match(emailpat);	if(!testresult){	alert("The email address you entered appears to be invalid.  Please check your answer for errors and try again.");	return false;	}		testresult = thisPhone.match(phonepat);	if(testresult){	alert("The phone number you entered appears to be invalid.  Please check your answer for errors and try again.");	return false;	}		return true;}