document.write ("  <link type='text/css' rel='stylesheet' href='css/js.css'>");
function showwindow(path,w,h){
if (screen.width <850){
  width = 760;
  height = 500;
}
else if (screen.width <1050){
  width = 1010;
  height = 700;  
}

else if (screen.width <1100){
  width = 1000;
  height = 700;  
}

else if (screen.width <1300){
  width = 1200;
  height = 950;  
}
else{
  width = 1450;
  height = 1100;
}

// w,h = img width, height
if(screen.width < w || screen.height < h){
  if (screen.width > w){
    width = w;
  }
  else if(screen.height > h){
    height = h;
  }
   var win = window.open(path,"", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width="+width+", height="+height);
}
else{
   var win = window.open(path,"", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width="+w+", height="+h);
}
 var d = win.document;
 d.writeln("<html><head>");
 d.writeln("<title>Detailní obrázek</title></head>");
 d.writeln("<body style='margin: 0px'>");
 d.writeln("<img src='"+path+"' width='"+w+"' height='"+h+"'>");
 d.writeln("</body>");
 d.writeln("</html>");
 d.close();
 win.focus();
}

function displayMenu(el, menuNum){
  var el = document.getElementById(el);
  displayValue = el.style.display;
  var str = "";
  for(var i=1; i <= menuNum; i++){
    var actualEl = "sub"+i;    // subMenu
    document.getElementById(actualEl).style.display = "none";
    str = str + document.getElementById(actualEl).style.display+"\n";
  }
  (displayValue == "block") ? el.style.display = "none" : el.style.display = "block";
}

