id_nav = document.getElementById("id_nav");
id_header = document.getElementById("id_header");
id_text = document.getElementById("id_text");
id_popup_div = document.getElementById("id_popup_div");
id_popup_img = document.getElementById("id_popup_img");
id_screenshot = document.getElementById("id_screenshot");
id_popup_div.style.display = "none";

id_popup_img.addEventListener("click", () => {
  id_nav.style.display = "block";
  id_header.style.display = "block";
  id_text.style.display = "block";
  id_popup_div.style.display = "none";
  id_screenshot.scrollIntoView();
});

function showimg(img) {
  id_nav.style.display = "none";
  id_header.style.display = "none";
  id_text.style.display = "none";
  id_popup_div.style.display = "block";
  id_popup_img.src = img;
  var w = window.innerWidth;
  var h = window.innerHeight;
  if (w < h) {
    id_popup_img.style.width = (w * 3 / 4) + "px";
  } else {
    id_popup_img.style.height = (h * 3 / 4) + "px";
  }
}
