<!--
emailRe = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*\.(\w{2}|(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum))$/

phoneRe = /^((\+\d{1,3}(-| )?\(?\d\)?(-| )?\d{1,3})|(\(?\d{2,3}\)?))(-| )?(\d{3,4})(-| )?(\d{4})(( x| ext)\d{1,5}){0,1}$/

function validator(theForm)
{

  if (theForm.Contact_Name.value == "")
  {
    alert("Please enter a value for the \"Contact Name\" field.");
    theForm.Contact_Name.focus();
    return (false);
  }

  if (theForm.Contact_Name.value.length < 2)
  {
    alert("Please enter at least 2 characters in the \"Contact Name\" field.");
    theForm.Contact_Name.focus();
    return (false);
  }

  if (theForm.Contact_Name.value.length > 256)
  {
    alert("Please enter at most 256 characters in the \"Contact Name\" field.");
    theForm.Contact_Name.focus();
    return (false);
  }

  if (theForm.Telephone.value == "")
  {
    alert("Please enter a value for the \"Telephone (please include area code)\" field.");
    theForm.Telephone.focus();
    return (false);
  }

  if (theForm.Telephone.value.length < 10)
  {
    alert("Please enter at least 10 characters in the \"Telephone (please include area code)\" field.");
    theForm.Telephone.focus();
    return (false);
  }

  if (theForm.Telephone.value.length > 256)
  {
    alert("Please enter at most 256 characters in the \"Telephone (please include area code)\" field.");
    theForm.Telephone.focus();
    return (false);
  }

  if (!phoneRe.test(document.getElementById('Telephone').value)){
	alert("Please enter a valid telephone in the \"Telephone\" field.");
	return (false);

  }
  if (theForm.Email.value == "")
  {
    alert("Please enter a value for the \"Email Address\" field.");
    theForm.Email.focus();
    return (false);
  }

  if (theForm.Email.value.length < 2)
  {
    alert("Please enter at least 2 characters in the \"Email Address\" field.");
    theForm.Email.focus();
    return (false);
  }

  if (theForm.Email.value.length > 256)
  {
    alert("Please enter at most 256 characters in the \"Email Address\" field.");
    theForm.Email.focus();
    return (false);
  }

  if (!emailRe.test(theForm.Email.value)){
	alert("Please enter a valid e-mail in the \"Email Address\" field.");
	return (false);

  }

  if (theForm.Street_Address.value == "")
  {
    alert("Please enter a value for the \"Street Address\" field.");
    theForm.Street_Address.focus();
    return (false);
  }

  if (theForm.Street_Address.value.length < 2)
  {
    alert("Please enter at least 2 characters in the \"Street Address\" field.");
    theForm.Street_Address.focus();
    return (false);
  }

  if (theForm.Street_Address.value.length > 256)
  {
    alert("Please enter at most 256 characters in the \"Street Address\" field.");
    theForm.Street_Address.focus();
    return (false);
  }

  if (theForm.City.value == "")
  {
    alert("Please enter a value for the \"City or Town\" field.");
    theForm.City.focus();
    return (false);
  }

  if (theForm.City.value.length < 2)
  {
    alert("Please enter at least 2 characters in the \"City or Town\" field.");
    theForm.City.focus();
    return (false);
  }

  if (theForm.City.value.length > 256)
  {
    alert("Please enter at most 256 characters in the \"City or Town\" field.");
    theForm.City.focus();
    return (false);
  }

  if (theForm.Province_State.value == "")
  {
    alert("Please enter a value for the \"Province or State\" field.");
    theForm.Province_State.focus();
    return (false);
  }

  if (theForm.Province_State.value.length < 2)
  {
    alert("Please enter at least 2 characters in the \"Province or State\" field.");
    theForm.Province_State.focus();
    return (false);
  }

  if (theForm.Province_State.value.length > 256)
  {
    alert("Please enter at most 256 characters in the \"Province or State\" field.");
    theForm.Province_State.focus();
    return (false);
  }

  if (theForm.PostalCode_Zip.value == "")
  {
    alert("Please enter a value for the \"ZIP or Postal Code\" field.");
    theForm.PostalCode_Zip.focus();
    return (false);
  }

  if (theForm.PostalCode_Zip.value.length < 5)
  {
    alert("Please enter at least 5 characters in the \"ZIP or Postal Code\" field.");
    theForm.PostalCode_Zip.focus();
    return (false);
  }

  if (theForm.PostalCode_Zip.value.length > 256)
  {
    alert("Please enter at most 256 characters in the \"ZIP or Postal Code\" field.");
    theForm.PostalCode_Zip.focus();
    return (false);
  }

  if (theForm.Country.value == "")
  {
    alert("Please enter a value for the \"Country\" field.");
    theForm.Country.focus();
    return (false);
  }

  if (theForm.Country.value.length < 2)
  {
    alert("Please enter at least 2 characters in the \"Country\" field.");
    theForm.Country.focus();
    return (false);
  }

  if (theForm.Country.value.length > 256)
  {
    alert("Please enter at most 256 characters in the \"Country\" field.");
    theForm.Country.focus();
    return (false);
  }
  return (true);
}


//-->
