// 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 feedback(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);
  }
  if (theForm.name.value == ""){
    alert("Please enter your name.");
    theForm.name.focus();
    return (false);
  }
  if (String(theForm.attractiveness_of_layout_comment.value).indexOf("</a>") != -1){
	alert("Please do not enter any html in the form.");
    theForm.attractiveness_of_layout_comment.focus();
    return (false);
  }
    if (String(theForm.navigation_comment.value).indexOf("</a>") != -1){
	alert("Please do not enter any html in the form.");
    theForm.navigation_comment.focus();
    return (false);
  }
    if (String(theForm.best_features.value).indexOf("</a>") != -1){
	alert("Please do not enter any html in the form.");
    theForm.best_features.focus();
    return (false);
  }
    if (String(theForm.should_any_info_be_added.value).indexOf("</a>") != -1){
	alert("Please do not enter any html in the form.");
    theForm.should_any_info_be_added.focus();
    return (false);
  }
    if (String(theForm.layout_clear_and_understandable.value).indexOf("</a>") != -1){
	alert("Please do not enter any html in the form.");
    theForm.layout_clear_and_understandable.focus();
    return (false);
  }
    if (String(theForm.any_other_comments.value).indexOf("</a>") != -1){
	alert("Please do not enter any html in the form.");
    theForm.any_other_comments.focus();
    return (false);
  }


return true
 }
 
 
/*--Email signup*/

function emailSignup(theForm){
  if (theForm.name.value == ""){
    alert("Please enter your name.");
    theForm.name.focus();
    return (false);
  }
  if (!isEmailAddr(theForm.email.value)){
    alert("Please enter a complete email address in the form: yourname@yourdomain.com");
    theForm.email.focus();
    return (false);
  }
  if (theForm.confirm_email.value != theForm.email.value){
    alert("Your emails do not match.");
    theForm.confirm_email.focus();
    return (false);
  }
return true
}