function EstateWeb_ClientRegister_Validate(theForm)
{

  if (theForm.Title_1.selectedIndex == 0)
  {
    alert("Please choose 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);
	}		  

  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 (theForm.PostCode_4.value.length < 3)
  {
    alert("Please provide your postcode");
    theForm.PostCode_4.focus();
    return (false);
  }
  
   if (theForm.Telephone_Number_5.value.length < 10)
  {
    alert("Please provide your telephone number");
    theForm.Telephone_Number_5.focus();
    return (false);
  }

 if (theForm.Property_to_sell_7.value.length==0)
  {
    alert("Please specify if you have a property to sell/let");
    theForm.Property_to_sell_7.focus();
    return (false);
  }

  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);
  }
}
