]> www.average.org Git - mkgallery.git/blob - include/gallery.js
3c2e1f3d2445326ec22164102ca839dcd6b602fb
[mkgallery.git] / include / gallery.js
1 function showIbox(iboxid) {
2  var ibox = document.getElementById(iboxid);
3  var wwidth;
4  var wheight;
5  var bwidth = 400;
6  var bheight = 300;
7  if (self.innerWidth)
8  {
9   wwidth = self.innerWidth;
10   wheight = self.innerHeight;
11  }
12  else if (document.documentElement && document.documentElement.clientWidth)
13  {
14   wwidth = document.documentElement.clientWidth;
15   wheight = document.documentElement.clientHeight;
16  }
17  else if (document.body)
18  {
19   wwidth = document.body.clientWidth;
20   wheight = document.body.clientHeight;
21  }
22  ibox.style.width = bwidth + "px";
23  ibox.style.height = bheight + "px";
24  ibox.style.left = ((wwidth - bwidth) / 2) + "px";
25  ibox.style.top = ((wheight - bheight) / 2) + "px";
26  // alert('wwidth='+wwidth+'; bwidth='+bwidth+'; wheight='+wheight+'; bheight='+bheight);
27  ibox.zIndex = '0';
28  ibox.style.display = 'block';
29  return false;
30 }
31 function HideIbox(iboxid) {
32  var ibox = document.getElementById(iboxid);
33  ibox.zIndex = '1000';
34  ibox.style.display = 'none';
35 }