// JavaScript Document
// Copyright 2006 Ladislav Brychta

function displayshow(what) {
  document.getElementById(what).style.display = "block";
}

function displayhide(what) {
  document.getElementById(what).style.display = "none";
}

function displayswap(what) {
  if (document.getElementById(what).style.display == "none")
    document.getElementById(what).style.display = "block";
  else
    document.getElementById(what).style.display = "none";
}

function displayinlineswap(what) {
  if (document.getElementById(what).style.display == "none")
    document.getElementById(what).style.display = "inline";
  else
    document.getElementById(what).style.display = "none";
}

function openJSWindow(url, jmeno, width, height) {
  var left = Math.round(((screen.width)/2)-(width/2));
  var top = Math.round(((screen.height)/2)-(height/2));
  Popup = window.open(url, jmeno,'toolbar=0,location=0,menubar=0,scrollbars=1,resizable=1,width='+width+',height='+height+',left='+left+',top='+top+'');
  Popup.focus()
}

function stopclock(mytimer){
  if (mytimer.running) {
    clearInterval(mytimer);
  }
  mytimer.running = false;
}

function startclock(mytimer){
  stopclock(mytimer);
  mytimer.timerid = setInterval(mytimer.func,mytimer.interval);
  mytimer.running = true;
}

function confirmquestion(question,what) {
  if (!confirm(question)) {
    what.href = location.href;
  }
}

