function openWin(url, winWidth, winHeight, winRes) {
  if (winRes==1) { stat="resizable=1,scrollbars=1"; }
            else { stat="resizable=0,scrollbars=0"; };
  // calculate centered window position
  winLeft = Math.round((screen.width-winWidth)/2);
  winTop  = Math.round((screen.availHeight-winHeight)/2);
  winDef = "left="+winLeft+",top="+winTop+",height="+winHeight+",width="+winWidth+",directories=no,location=no,menubar=no,status=no,toolbar=no,"+stat;
  window.open(url, "", winDef);
  return true;
  }

function zobraz(eida, eidb) {
  X = document.getElementById(eida);
  Y = document.getElementById(eidb);
  if (X) {
    if (X.style.display == "block") {
      X.style.display = "none";
      if (Y) {
        Y.style.display = "none";
      }
    }
    else {
      X.style.display = "block";
      if (Y) {
        Y.style.display = "block";
      }
    }
  }
}

function zobrazvsediskuze(odi, doi) {
  var i;
  for (i = odi; i <= doi; i++) {
    if (document.getElementById('a'+i)) {
      zobraz('a'+i, 'b'+i);
    }
  }
}

function zabalvsediskuze(odi, doi) {
  var i;
  for (i = odi; i <= doi; i++) {
    if (document.getElementById('a'+i)) {
      zabal('a'+i, 'b'+i);
    }
  }
}

function zabal(eida, eidb) {
  X = document.getElementById(eida);
  Y = document.getElementById(eidb);
  if (X) {
    if (X.style.display == "none") {
      X.style.display = "block";
      if (Y) {
        Y.style.display = "block";
      }
    }
    else {
      X.style.display = "none";
      if (Y) {
        Y.style.display = "none";
      }
    }
  }
}



function showImg(src, w, h) {
  window.open('ukazfoto.php?bezlist=1&src='+src, 'img', 'width='+w+' height='+h+' resizable=yes');
}

function prepni(kam){
 window.location.href=kam;
}
