  function showReference(id, img){
    document.getElementById('img' + id).src = ' referencie/small/' + img;
    document.getElementById('href' + id).href = 'javascript: showPicture(\'referencie/' + img + '\');';
  }

  function showPicture(pict){
    var win = window.open("/window.php?picture=" + pict, "picture", "width=570,height=420,left=10,top=10,location=0,menubar=0,personalbar=0,status=0");
//    win.focus();
  }

    function checkemail(mail){
      var testresults;
      var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;

      if (filter.test(mail))
        testresults=true;
      else
        testresults=false;

      return testresults;
    }

    function validateForm(){
      pass = true;

      msg = '';

      if (document.frm_kontakt.fullname.value == '' || document.frm_kontakt.text.value == '' || document.frm_kontakt.email.value.search("@") == -1 )
        msg = "Správa nemôže byť odoslaná. Skontrolujte prosím, či je formulár kompletný a správne vyplnený."

      if (msg != ""){
        alert (msg);
        pass = false;
      }

      return pass;
    }
