function tisk() {
window.print();
}

function vynulovat(hodnota) {arr = document.getElementById('form_hledat_cr');
if(hodnota != 1) arr['kraj'].value = 0;
if(hodnota != 2) arr['okres'].value = 0;
if(hodnota != 3) arr['region'].value = 0;
if(hodnota != 4) arr['obec'].value = 0;return;}

function vynulovat_ka(hodnota) {arr = document.getElementById('form_hledat_ka');
if(hodnota != 1) arr['kraj'].value = 0;
if(hodnota != 2) arr['okres'].value = 0;
if(hodnota != 3) arr['region'].value = 0;
if(hodnota != 4) arr['obec'].value = 0;return;}

function validate(formular){
	if (formular.jmeno.value==""){
		alert("Vyplňte kolonku jméno.");
		formular.jmeno.focus();
		return false;
		}
	if (formular.email.value==""){
		alert("Vyplňte kolonku email.");
		formular.email.focus();
		return false;
		}
	else 
		{
    return true;
    }
  }

function ZobrazEmailBox(){
var oEmailBox = document.getElementById('EmailBox');
oEmailBox.className = "emailBox2";
}

function SchovatEmailBox(){
var oEmailBox = document.getElementById('EmailBox');
oEmailBox.className = "emailBox";
}

function previoLoadPriceList() {
    var selectSeason = document.getElementById("selectSeason");
    selectSeason.style.visibility = "visible";

    var showSelected = function() {
        for (var i = 0; i < selectSeason.options.length; ++i) {
            var id = selectSeason.options[i].value;
            var element = document.getElementById(id);
            element.style.display = id == selectSeason.value ? "block" : "none";
        }
    }

    showSelected();
    
    selectSeason.onchange = showSelected;
}


function AddFavorite(linkObj,addUrl,addTitle)
{
  if (document.all && !window.opera)
  {
    window.external.AddFavorite(addUrl,addTitle);
    return false;
  }
  else if (window.opera && window.print)
  {
    linkObj.title = addTitle;
    return true;
  }
  else if ((typeof window.sidebar == 'object') && (typeof window.sidebar.addPanel == 'function'))
  {
    if (window.confirm('Přidat oblíbenou stránku jako nový panel?'))
    {
      window.sidebar.addPanel(addTitle,addUrl,'');
      return false;
    }
  }
  window.alert('Po potvrzení stiskněte CTRL-D,\nstránka bude přidána k vašim oblíbeným odkazům.');
  return false;
} 
