  if (top.location != self.location)
    top.location = self.location


function checkkontakt(formular)
{
    for (var i = 0; i < 3; i++)
    {
  
    if (formular.elements[i].value == '')
      {
        alert("Je nutno vyplnit všechny části formuláře. Prosím doplňte chybějící údaje.");
      formular.elements[i].focus();
      return false;
      }
    } //end for
    return true;
}

function checkanketa(formular)
{
/*  for (var i=0; i<5; i++)
  {
    if (i == 3)
      continue;
      
    if (formular.elements[i].value == '')
    {
      alert(formular.elements[i].value);
      alert("Je nutno odpovědět na všechny otázky. Prosím, odpovězte je.");
      return false;
    }  
  }
*/  
    if (formular.elements[15].value == '')
      {
        alert("Je nutno vyplnit Vaše jméno. Prosím doplňte jej.");
      formular.elements[15].focus();
      return false;
      }
    if (formular.elements[16].value == '')
      {
        alert("Je nutno vyplnit Vaše příjmení. Prosím doplňte jej.");
      formular.elements[16].focus();
      return false;
      }
    if (formular.elements[17].value == '')
      {
        alert("Je nutno vyplnit Váš věk. Prosím doplňte jej.");
      formular.elements[17].focus();
      return false;
      }
    if (formular.elements[18].value == '')
      {
        alert("Je nutno vyplnit Vaše bydliště. Prosím doplňte jej.");
      formular.elements[18].focus();
      return false;
      }
    if (formular.elements[19].value == '')
      {
        alert("Je nutno vyplnit vaše telefonní číslo. Prosím doplňte jej.");
      formular.elements[19].focus();
      return false;
      }
 vv = formular.elements[14].value;
 if ((vv.length) < 10)
  {
    alert("Napište prosím více o vaší motivaci.")
    formular.elements[14].focus();
    return false;
  }
  return true;
}
function zoom(name, s, v, text)
{
  no=window.open("","zoom","left=10,top=10,width="+s+",height="+v+","+
     "toolbar=no,location=no,directories=no,status=no,menubar=no"+
     ",scrollbars=yes,resizable=no,copyhistory=no");
  with (no.document)
  {
    open();
    writeln('<html>\n<body>');
    if (text)
      writeln('<h2 style=\"text-align:center\">'+text+'</h2>');
    
    writeln('<img src="'+name+'">');
    writeln('<p style="text-align:center" >');
    writeln('<button type="submit" accesskey="z" onclick="window.close();">');
    writeln('Zavřít okno');
    writeln('</button>');
    writeln('</p>');
    writeln('</body>\n</html>');
    close();
  }
}

