
  function CheckValues()
  {
     blnNoValue = new Boolean();
     blnNoValue = false;
        if (check.email.value == "")
        {
            alert("Please enter your email adress, so we can send you the requested information.");
            check.email.focus();
            blnNoValue = true;
        }
        else
        {
            blnNoValue = !emailCheck(check.email.value);
            check.email.focus();
        }
     if (blnNoValue == false)
     {
        return true;
     }
     else
     {
        return false;
     }
  }

  function emailCheck (emailStr)
  {
    var emailPat      = /^(.+)@(.+)$/
    var specialChars  = "\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
    var validChars    = "\[^\\s" + specialChars + "\]"
    var quotedUser    = "(\"[^\"]*\")"
    var ipDomainPat   = /^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
    var atom          = validChars + '+'
    var word          = "(" + atom + "|" + quotedUser + ")"
    var userPat       = new RegExp("^" + word + "(\\." + word + ")*$")
    var domainPat     = new RegExp("^" + atom + "(\\." + atom + ")*$")
    var matchArray    = emailStr.match(emailPat)

    if (matchArray==null)
    {
      var errStr="Please check your email address, it seems to be incorrect!"
      alert(errStr)
      return false
    }

    var user          = matchArray[1]
    var domain        = matchArray[2]

    if (user.match(userPat)==null)
    {
      var errStr="Please check your email address, it seems to be incorrect!(the part before the @ seems to be invalid)"
      alert(errStr)
      return false
    }

    var IPArray       = domain.match(ipDomainPat)

    if (IPArray!=null)
    {
     for (var i=1;i<=4;i++)
      {
       if (IPArray[i]>255)
        {
          var errStr="Destination IP-addres is not correct!"
          alert(errStr)
        return false
       }
      }
      return true
    }

    var domainArray   = domain.match(domainPat)

    if (domainArray == null)
    {
     var errStr="Please check your email address, it seems to be incorrect!(the part after the @ seems to be invalid)"
      alert(errStr)
      return false
    }

    var atomPat       = new RegExp(atom,"g")
    var domArr        = domain.match(atomPat)
    var len           = domArr.length

    if (domArr[domArr.length-1].length < 2)
    {
     var errStr="Please check your email address, it seems to be incorrect!(the part after the @ seems to be invalid)"
      alert(errStr)
      return false
    }
    if (domArr[domArr.length-2].length < 2)
    {
      var errStr="Please check your email address, it seems to be incorrect!(the part after the @ seems to be invalid)"
      alert(errStr)
      return false
    }
    return true;
  }

