function isEmailAddr (s){ 
	var rv = false
	if ((s == null) || (s.length == 0)) 
       	rv = false;
 	 else {
		var reEmail =/([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		//reEmail = /.+\@.+\..+$/
		
		rv = reEmail.test(s)
    }
	if(rv){
		return rv
	}else{
		return false
	}
}
 
function validateNameOrNewsletter(theForm){
	if (theForm.First_Name.value == ""){
    	alert("Please enter your First Name.");
    	theForm.First_Name.focus();
    	return (false);
  	}
	if (theForm.Last_Name.value == ""){
    	alert("Please enter your Last Name.");
    	theForm.Last_Name.focus();
    	return (false);
  	}
	if (theForm.Phone.value == "" && theForm.email_from.value == ""){
    	alert("Please enter your Phone, Email, or both.");
    	theForm.Phone.focus();
    	return (false);
  	}
  	if (!isEmailAddr(theForm.email_from.value) && theForm.email_from.value != ""){
    	alert("Please enter a complete email address in the form: yourname@yourdomain.com");
    	theForm.email_from.focus();
    	return (false);
 	}
	if (theForm.Newsletter_Name.value == ""){
    	alert("Please enter your Newsletter Name.");
    	theForm.Newsletter_Name.focus();
    	return (false);
  	}
	return (true);
}

