// JavaScript Document

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 validation(theForm){
  if (theForm.name.value == ""){
    alert("Please enter your name.");
    theForm.name.focus();
    return (false);
  }
  if (!isEmailAddr(theForm.email_from.value)){
    alert("Please enter a complete email address in the form: yourname@yourdomain.com");
    theForm.email_from.focus();
    return (false);
  }
return true
}

function validationEmail(theForm){
	if (theForm.name.value == "" || theForm.name.value == "Name"){
		alert("Please enter your name.");
		theForm.name.focus();
		theForm.name.select();
		return (false);
  	}
  	if (!isEmailAddr(theForm.email.value)){
		alert("Please enter a complete email address in the form: yourname@yourdomain.com");
		theForm.email.focus();
		theForm.email.select();
		return (false);
  	}
	
	return true;
}

