  function Form_Validator(theForm) {
  
    if (theForm.newsletter.value == "") {
    
      alert("Du måste fylla i din e-post adress.");
      theForm.newsletter.focus();
      return (false);
    }

    var checkEmail = "@.";
    var checkStr = theForm.newsletter.value;
    var EmailValid = false;
    var EmailAt = false;
    var EmailPeriod = false;
    
    for (i = 0;  i < checkStr.length;  i++) {
      
      ch = checkStr.charAt(i);
      
      for (j = 0;  j < checkEmail.length;  j++) {
        if (ch == checkEmail.charAt(j) && ch == "@") EmailAt = true;
        if (ch == checkEmail.charAt(j) && ch == ".") EmailPeriod = true;
        if (EmailAt && EmailPeriod) break;
        if (j == checkEmail.length) break;
      }

      if (EmailAt && EmailPeriod) {
        EmailValid = true
        break;
      }
    }
    
    if (!EmailValid) {
      alert("Skriv in en giltig e-post adress");
      theForm.newsletter.focus();
      return (false);
    }

    if (theForm.newsletter.value.length < 8) {
      alert("Skriv in en giltig e-post adress");
      theForm.newsletter.focus();
      return (false);
    }
  
  return (true);
  }
