// Verifica campo vazio
function vazio(campo, nome) {
 if (campo.value == "") {
  alert("Alsjeblieft, vul het veld " + nome + ".");
  return(false);
 }
 return(true);
}
 
function validaEmail(email, nome) {
 valido = /^.*\@.*\..*$/i;
 if (email.search(valido) == -1) {
  alert("Por favor, vul de goede werking ervan " + nome + ".");
  return(false);
 }
 return(true);
}
 
// Verifica forms
function verifica() {
 if (vazio(document.forms[0].nome, "Name"))
 if (vazio(document.forms[0].email, "Email"))
 if (vazio(document.forms[0].telef, "Telefon"))
 if (vazio(document.forms[0].dia, "Datum: dagen"))
 if (vazio(document.forms[0].mes, "Datum: maand"))
 if (vazio(document.forms[0].zona, "Zone"))
 if (vazio(document.forms[0].refeicao, "Mahlzeit"))
 if (vazio(document.forms[0].pessoas, "Personen"))
 if (vazio(document.forms[0].hora, "Uhr"))
 if (validaEmail(document.forms[0].email.value, "Email"))
 return true;
 return false;
}

// Verifica forms
function verifica_grupos() {
 if (vazio(document.forms[1].nome, "Name"))
 if (vazio(document.forms[1].email, "Email"))
 if (vazio(document.forms[1].telef, "Telefon"))
 if (vazio(document.forms[1].dia, "Datum: dagen"))
 if (vazio(document.forms[1].mes, "Datum: maand"))
 if (vazio(document.forms[1].zona, "Zone"))
 if (vazio(document.forms[1].refeicao, "Mahlzeit"))
 if (vazio(document.forms[1].pessoas, "Personen"))
 if (vazio(document.forms[1].hora, "Uhr"))
 if (validaEmail(document.forms[1].email.value, "Email"))
 return true;
 return false;
}

