function chk(email)
{
invalid = "";

if (!email)
invalid = "No email address found!  Try reloading the page then use the 'email a script' feature again.";

else {

if ( (email.indexOf("@") == -1) || (email.indexOf(".") == -1) )
invalid += "\n\nInvalid email address.  Your email address is missing an '@' sign and a '.' in the domain name (like '.com').  Please check your address then submit again.";

if (email.indexOf("Email") > -1)
invalid += "\n\nInvalid email address.  Make sure your email address included your username, the '@' sign, and the domain name (like '.com').";

if (email.indexOf("\\") > -1)
invalid += "\n\nEmail address contains an invalid back-slash (\\) character.  Remove the character and submit again.";

if (email.indexOf("/") > -1)
invalid += "\n\nEmail address contains an invalid forward-slash (/) character.  Remove the character and submit again.";

if (email.indexOf("'") > -1)
invalid += "\n\nEmail address contains an invalid apostrophe (') character.  Remove the character and submit again.";

if (email.indexOf("zaz.com.br") > -1)
invalid += "\n\nPlease do not use an email address that has an autoresponder set up for it.  Thanks.";

if (email.indexOf("!") > -1)
invalid += "\n\nEmail address contains an invalid exclamation point (!) character.  Remove the character or correct the email address then submit again.";

if ( (email.indexOf(",") > -1) || (email.indexOf(";") > -1) )
invalid += "\n\nPlease only enter one email address in the box at a time.  Remove the extra addresses and submit again.";

if (email.indexOf("?subject") > -1)
invalid += "\n\nPlease do not add '?subject=...' to your email address.  Scriptbot will send you the script with a pre-defined subject already.  Please remove the '?subject=...' from your email address and submit again.";
return(invalid);
}
}
function contact_Validator(theForm)
{  
		
  if (theForm.Name.value =="")
  {
    alert("Please enter a value for the \"name\" field.");
    theForm.Name.focus();
    return (false);
  }
  	
   if (theForm.company.value =="")
  {
    alert("Please enter a value for the \"company\" field.");
    theForm.company.focus();
    return (false);
  }
 
      if (theForm.address.value == "")
  {
    alert("Please enter a value for the \"address\" field.");
    theForm.address.focus();
    return (false);
  } 
      if (theForm.phone.value == "")
  {
    alert("Please enter a value for the \"phone\" field.");
    theForm.phone.focus();
    return (false);
  } 
  
  if (theForm.fax.value == "")
  {
    alert("Please enter a value for the \"fax\" field.");
    theForm.fax.focus();
    return (false);
  } 
    if (theForm.mobile.value == "")
  {
    alert("Please enter a value for the \"mobile\" field.");
    theForm.mobile.focus();
    return (false);
  }
  
 if (theForm.email.value == "")
  {
    alert("Please enter a value for the \"Email\" field.");
    theForm.email.focus();
    return (false);
  }
  else
  {
	theForm_invalid=chk(theForm.email.value);
	if (theForm_invalid!="")
	{
		alert(theForm_invalid);
		theForm.email.focus();
		return(false);
	}	
  }
  

      if (theForm.query.value == "")
  {
    alert("Please enter a value for the \"query\" field.");
    theForm.query.focus();
    return (false);
  } 
	
}