function ValidEmail(Email){
  var LastChar = Email.length - 1;
  var CharPos = Email.indexOf("@");
  if ((CharPos < 1) || (CharPos == LastChar)) return false;
  // position of first .
  var CharPos = Email.indexOf(".");
  if (CharPos < 1) return false;
  // position of last .
  var CharPos = Email.lastIndexOf(".");
  if (CharPos == LastChar) return false;
  return true;
}

<script type="text/javascript">
function CheckSubscription(F){
  var Err = "";
  if (!F.edEmailSub.value) Err="Please fill up your email and then submit the form again";
  if (F.edEmailSub.value && !ValidEmail(F.edEmailSub.value)) Err="Please write your email in correct form and submit the form again";
  if (Err){
    alert (Err);
    F.edEmailSub.focus();
    return false
  } else return (true);
}
</script>

<script type="text/javascript">
      function testshouts(){
        if (document.msgform.vzkaz.value == ""){
          alert ("Please, write some message");
          document.msgform.vzkaz.focus();
          return false;
        }
      }
</script>
