// JavaScript Document
function checkForm() {
	  
	 var valid = true;
	 var errors = '';
	 
	 if (document.sendAgain.pwdrecovery.value == "") {
		 valid = false;
		 errors = '- Gebruikersnaam is verpliglik';
	 } else {
		 valid = true;
	 }
	 if (errors) {
		alert(errors); 
	 }
	 return valid;
}

function checkLogin(f)
{
  var emailRegex = new RegExp(/^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/);	 
  var valid = true;
  
  var email = f.user_username;
  var password = f.user_password;
  
  if (!emailRegex.test(email.value))
  {
	  alert('Email address is required, and must ba a valid email address.');
	  valid = false;
	  email.focus();
	  return valid;
	  
  }
   if (!password.value)
  {
	  alert('Password is required.');
	  valid = false;
	  password.focus();
	  return valid;
  }
	
  return valid;
}