function checkentries()
{
  /* check name */
  if (document.getElementById("name").value == '')
  {
    alert('Proszę wpisać imię i nazwisko!');
    document.getElementById("name").focus(); 
    return(false);
  }
  /* check email */
  var str = document.getElementById('email').value;
  var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
  if ((str != '') & ~(filter.test(str)))
  {
    alert('Proszę wpisać poprawny adres email albo zostawić to pole puste!');
    document.getElementById("email").focus(); 
    return(false);
  }
  /* check phone */
  if (document.getElementById("phone").value == '')
  {
    alert('Proszę wpisać numer telefonu kontaktowego!');
    document.getElementById("phone").focus(); 
    return(false);
  }
  /* check accord */
  if (!document.getElementById("accord").checked)
  {
    alert('Aby CALLAN Szkoła Języka Angielskiego mogła przyj±ć Pani/Pana zgłoszenie, musi Pan[i] wyrazić zgodę na przetwarzanie swoich danych adresowych!');
    return(false);
  }
  return true;
}

function checkdata()
{
  if (document.layers || document.getElementById || document.all)
  {
    return checkentries();
  }
  else
  {
    return true;
  }
}
