function validEmail(email) {
	invalidChars = " /:,;"
	
	if (email == "") {// cannot be empty
				return false
	}
	for (i=0; i<invalidChars.length; i++) {	// does it contain any invalid characters?
	badChar = invalidChars.charAt(i)
		if (email.indexOf(badChar,0) > -1) {
			return false
		}
	}
	atPos = email.indexOf("@",1)			// there must be one "@" symbol
		if (atPos == -1) {
			return false
		}
		if (email.indexOf("@",atPos+1) != -1) {	// and only one "@" symbol
			return false
		}
	periodPos = email.indexOf(".",atPos)
		if (periodPos == -1) {			// and at least one "." after the "@"
			return false
		}
		if (periodPos+3 > email.length)	{	// must be at least 2 characters after the "."
			return false
		}
	return true
}

function validateMe() {
	var fname = document.frmContact.txtFirstName;
	var lname = document.frmContact.txtLastName;
	var email = document.frmContact.txtEmail;
	var address = document.frmContact.txtAddress;
	var city = document.frmContact.txtCity;
	var statename = document.frmContact.txtState;
	var zip = document.frmContact.txtZip;
	var phone = document.frmContact.txtPhone;
	var comments = document.frmContact.memComments;

	if (fname.value == "") {
		alert("Please enter your first name.");
		fname.focus();
		return false;
		}
	if (lname.value == "") {
		alert("Please enter your last name.");
		lname.focus();
		return false;
		}
	if (!validEmail(email.value)) {
	alert("Please enter a valid e-mail address")
	email.focus()
	email.select()
	return false;
	}
	if (address.value == "") {
		alert("Please enter your address.");
		address.focus();
		return false;
		}
	if (city.value == "") {
		alert("Please enter your city.");
		city.focus();
		return false;
		}
	if (statename.value == "") {
		alert("Please enter your state.");
		statename.focus();
		return false;
		}
	if (zip.value == "" || isNaN(zip.value) || zip.value.length < 5) {
		alert("Please enter a valid zip code.");
		zip.focus();
		zip.select();
		return false;
		}
	if (phone.value == "") {
		alert("Please enter your phone number.");
		phone.focus();
		return false;
		}	
	return true;	
}