function CONTACT(theForm)
{
  if (theForm.rec.value == "")
  	{alert("Please select an office to receive this message.");
    theForm.rec.focus();
    return (false);}
  if (theForm.name.value == "")
  	{alert("Please type your name.");
    theForm.name.focus();
    return (false);}
  if (theForm.email.value == "")
  	{alert("Please enter your email address.");
    theForm.email.focus();
    return (false);}

  if (!isEmailAddr(theForm.email.value))
  { alert("Sorry, the email address you entered is invalid!\n\ne.g.:     yourname@yourdomain.com");
    theForm.email.focus();
    return (false);}
 
 if (theForm.company.value == "")
  	{alert("Please type the company name.");
    theForm.company.focus();
    return (false);}
 if (theForm.address.value == "")
  	{alert("Please type the address.");
    theForm.address.focus();
    return (false);}
 if (theForm.city.value == "")
  	{alert("Please type the city.");
    theForm.city.focus();
    return (false);}
 if (theForm.state.value == "")
  	{alert("Please type the state.");
    theForm.state.focus();
    return (false);}
 if (theForm.zip.value == "")
  	{alert("Please type the zip code.");
    theForm.zip.focus();
    return (false);}
 if (theForm.Country.value == "")
  	{alert("Please type the country.");
    theForm.country.focus();
    return (false);}
 if (theForm.phone.value == "")
  	{alert("Please type the phone number.");
    theForm.phone.focus();
    return (false);}

  if (theForm.comments.value == "")
  	{alert("Please type your message.");
    theForm.comments.focus();
    return (false);}
  if (theForm.accesscode.value == "")
  	{alert("Please type the access code.");
    theForm.accesscode.focus();
    return (false);}
    
  return (true);
}
