function EstateWeb_Newsletter_Validate(theForm)
{
	if ( theForm.Title_1.value.length == 0 ){
			alert("Please select an appropriate salutation");
			theForm.Title_1.focus();
			return false;
		}
		
  if (theForm.Name_2.value == "")
  {
    alert("Please enter your name");
    theForm.Name_2.focus();
    return (false);
  }

  if (theForm.Name_2.value.length < 2)
  {
    alert("Please enter your name");
    theForm.Name_2.focus();
    return (false);
  }

  if (theForm.Name_2.value.length > 30)
  {
    alert("Please enter at most 30 characters for your name");
    theForm.Name_2.focus();
    return (false);
  }

  if (theForm.Email_Address_3.value == "")
  {
    alert("Please enter a valid email address");
    theForm.Email_Address_3.focus();
    return (false);
  }

  if (theForm.Email_Address_3.value.length < 5)
  {
    alert("Please enter a valid email address");
    theForm.Email_Address_3.focus();
    return (false);
  }

  if (theForm.Email_Address_3.value.length > 60)
  {
    alert("Please enter at most 60 characters for your email address");
    theForm.Email_Address_3.focus();
    return (false);
  }
  
	if (theForm.Email_Address_3.value.indexOf("@")==-1 || theForm.Email_Address_3.value.indexOf("@")==0 || theForm.Email_Address_3.value.indexOf("@")==theForm.Email_Address_3.value.length-1){
    alert("Please enter a valid email address");
    theForm.Email_Address_3.focus();
    return (false);
	}
	
	if (theForm.Email_Address_3.value.indexOf(".")==-1 || theForm.Email_Address_3.value.indexOf(".")==0 || theForm.Email_Address_3.value.indexOf(".")==theForm.Email_Address_3.value.length-1){
    alert("Please enter a valid email address");
    theForm.Email_Address_3.focus();
    return (false);
	}		  

	if (theForm.PostCode_5.value.length < 4)
	{
		alert("Please provide your postcode");
		theForm.PostCode_5.focus();
		return (false);
	}

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.-@";
  var checkStr = theForm.Email_Address_3.value;
  var allValid = true;
  var validGroups = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }

  if (!allValid)
  {
    alert("The email address you have entered appears to be invalid \n If you know it be correct yet this message persists \n please contact us by telephone");
    theForm.Email_Address_3.focus();
    return (false);
  }
}
