function winopen(url, thumb, w, h) {
    x = screen.availWidth;
    y = screen.availHeight;
    res = "scrollbars=1";
    if ((w+50 > x) || (h+50 > y) ) {
      wr = x-50;
      hr = y-50;
    } else {
      wr = w+50;
      hr = h+50;
    }
    if (thumb == true) {
      settings = "toolbar=0,location=0,"+res+",resizable=1,status=0,width="+wr+",height="+hr+"";
    } else {
      settings = ""; 
    }
    win = window.open(url, "", settings);
    return (typeof(win)=='object') ? false : true;
}

function CheckForm(formular) {
   if (formular['FormTelefon'].value == '') {
      alert('Zadejte prosím svůj telefon.');
      formular['FormTelefon'].focus();
      return false;
   }
   if (formular['FormEmail'].value == '') {
      alert('Zadejte prosím svůj e-mail nebo proškrtněte pomlčkami, pokud e-mail nemáte.');
      formular['FormEmail'].focus();
      return false;
   }
}

function dotaznikSubmitForm(e) {
    if (typeof e != 'undefined' && !enter_key_trap(e)) {
        return;
    }
    if (document.dotaznikForm.dotaznikJmeno.value == "") {
        alert('Prosím zadejte své jméno.');
        document.dotaznikForm.dotaznikJmeno.focus();
        return false;
    } else if (document.dotaznikForm.dotaznikTelefon.value == "" && (document.dotaznikForm.dotaznikEmail.value == "@" || document.dotaznikForm.dotaznikEmail.value == "")) {
        alert('Prosím zadejte svůj Telefon nebo E-mail, abychom se Vám měli kam ozvat.');
        document.dotaznikForm.dotaznikTelefon.focus();
        return false;
    } else if (document.dotaznikForm.dotaznikZprava.value == "") {
        alert('Vyplňte prosím Zprávu.');
        document.dotaznikForm.dotaznikTelefon.focus();
        return false;
    } else {
        document.dotaznikForm.submit();
        return true;
    }
}

try {
  document.execCommand("BackgroundImageCache", false, true);
} catch(err) {}
