// JavaScript Document
// Copyright 2006 Ladislav Brychta

function displayshow(what) {
  document.getElementById(what).style.display = "";
}

function displayhide(what) {
  document.getElementById(what).style.display = "none";
}

function displayswap(what) {
  if (document.getElementById(what).style.display == "none")
    document.getElementById(what).style.display = "";
  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.timerid);
  }
  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;
  }
}

function restoreCookieArr() {
  var cookieData = Array();
  var temp1 = Array();
  var temp2 = Array();
  temp1 = document.cookie.split('; ');
  for (var i=0;i<temp1.length;i++) {
    temp2 = temp1[i].split('=');
    if (temp2[0] && temp2[1]) {
      cookieData[temp2[0]] = temp2[1];
    }
  }
  return cookieData;
}

