function addBookmark(title,url) {
	if (window.sidebar) {
		window.sidebar.addPanel(title, url,"");
	} else if( document.all ) {
		window.external.AddFavorite( url, title);
	} else if( window.opera && window.print ) {
		return true;
	}
}

function okno(soubor) {
	window.open(soubor,'')
}

function logout(sesid, timeout, lang)  {
  countdown(((timeout*60)*1000), sesid, lang);
}

function countdown(timeout, sesid, lang)  {
	timeout = timeout - 1000;
	strTimeout = timeout / 1000;
	strTimeoutMin = strTimeout / 60;
	strTimeoutMin = Math.floor(strTimeoutMin);
	strTimeoutSec = strTimeout - (strTimeoutMin*60);
	strTimeoutSec = Math.floor(strTimeoutSec);
	if (strTimeoutSec<'10') {
		strTimeoutSec = "0"+strTimeoutSec;
	}
	if (strTimeoutMin<'0') {
 		document.location=("index.php?act_login=odhlaseni&sesid="+sesid+"&odhlaseni=false")
	} else {
		document.getElementById('logout').innerHTML = 'Vaše připojení vyprší za <b>'+strTimeoutMin+':'+strTimeoutSec+'</b>.';
		timerID = setTimeout("countdown('"+timeout+"', '"+sesid+"', '"+lang+"')",1000);
	}
}

function redirectSelect(t) {
  if (t.options[t.selectedIndex].value!='-') {
    location = t.options[t.selectedIndex].value;
  }
}

function rezervace(t,t2) {
    	document.getElementById("rezervace_date").value=t;
    	document.getElementById("rezervace_date2").value=t2;
    	if (document.getElementById("rezervace_date").value!=''){
    	   document.getElementById("rezervace_submit").disabled=false;
        
      }
			
}

