function Validator(theForm)
{

  if (theForm.clientusername.value == "")
  {
    alert("Внесите \"e-mail\" .");
    theForm.clientusername.focus();
    return (false);
  }
 if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.clientusername.value)){theForm.clientusername.focus();
	 alert("Внесите правильный email!");return (false)}
  if (theForm.clientusername.value.length < 6)
  {
    alert("Внесите правильный email!");
    theForm.clientusername.focus();
    return (false);
  }

  if (theForm.clientusername.value.length > 40)
  {
    alert("Внесите правильный email!");
    theForm.clientusername.focus();
    return (false);
  }

  if (theForm.clientpassword.value == "")
  {
    alert("Внесите пароль");
    theForm.clientpassword1.focus();
    return (false);
  }

  if (theForm.clientpassword.value.length < 5)
  {
    alert("Внесите одинаковый пароль два раза от 5 до 11 знаков!");
    theForm.clientpassword1.focus();
    return (false);
  }

  if (theForm.clientpassword.value.length > 11)
  {
    alert("Please enter at most 11 characters in the \"password\" field.");
    theForm.clientpassword1.focus();
    return (false);
  }

   return (true);
}
function FrontPage_Form1_Validator(theForm)
{

  if (theForm.name.value == "")
  {
    alert("Please enter a value for the \"name\" field.");
    theForm.name.focus();
    return (false);
  }

  if (theForm.name.value.length < 2)
  {
    alert("Please enter at least 2 characters in the \"name\" field.");
    theForm.name.focus();
    return (false);
  }

  if (theForm.name.value.length > 50)
  {
    alert("Please enter at most 50 characters in the \"name\" field.");
    theForm.name.focus();
    return (false);
  }

 
  if (theForm.Email.value == "")
  {
    alert("Please enter a value for the \"Email\" field.");
    theForm.Email.focus();
    return (false);
  }
 if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.Email.value)){theForm.Email.focus();
	 alert("Invalid E-mail Address! Please re-enter.");return (false)}
  if (theForm.Email.value.length < 5)
  {
    alert("Please enter at least 5 characters in the \"Email\" field.");
    theForm.Email.focus();
    return (false);
  }

  if (theForm.Email.value.length > 30)
  {
    alert("Please enter at most 30 characters in the \"Email\" field.");
    theForm.Email.focus();
    return (false);
  }

  if (theForm.Message.value == "")
  {
    alert("Please enter a value for the \"Message\" field.");
    theForm.Message.focus();
    return (false);
  }

  if (theForm.Message.value.length < 2)
  {
    alert("Please enter at least 2 characters in the \"Message\" field.");
    theForm.Message.focus();
    return (false);
  }
  return (true);
}