<!--
   function CheckEmail(checkString)
   {
    var newstr = "";
    var at = false;
    var dot = false;
    var dotpos = false;
    

    // IF EMAIL ADDRESS HAS A '@' CHARACTER
    if (checkString.indexOf("@") != -1) {
      at = true;
    // IF EMAIL ADDRESS HAS A '.' CHARACTER
    } else if (checkString.indexOf(".") != -1) {
      dot = true;
    } 
    // IF EMAIL ADDRESS HAS A '.' AFTER a '@'
    if (checkString.lastIndexOf(".") > checkString.indexOf("@")) 
    {
      dotpos = true;
    }

    // PARSE REMAINDER OF STRING
    for (var i = 0; i < checkString.length; i++) {
        ch = checkString.substring(i, i + 1)
        if ((ch >= "A" && ch <= "Z") || (ch >= "a" && ch <= "z")
                || (ch == "@") || (ch == ".") || (ch == "_")
                || (ch == "-") || (ch >= "0" && ch <= "9")) {
                newstr += ch;
                if (ch == "@") {
                    at=true;
                }
                if (ch == ".") {
                    dot=true;
                }
        }
    }
    if ((at == true) && (dot == true) && (dotpos == true)) {
      return true;
    }
    else {
      return false;
    }
   }



function formValidator(thisForm)
{
	if (thisForm.email.value=="" || !CheckEmail(thisForm.email.value))
        {
        
 	 alert("Graag een geldig e-mailadres invullen");
         thisForm.email.focus();
         return (false);
        } else {
			setcookie('ingelogd','ja');
		}

}
//-->