]> www.average.org Git - mkgallery.git/blobdiff - include/gallery.js
work in progress on moving it to phatfusion lightbox
[mkgallery.git] / include / gallery.js
index bf217f378663e45576594c7bdde135584cd896a7..a9d52999ae40cfb32fac05e17c386aff405abec4 100644 (file)
@@ -3,11 +3,11 @@ function showIbox(iboxid) {
  var bwidth = 400;
  var bheight = 300;
 
- var arrayPageSize = getPageSize();
- var arrayPageScroll = getPageScroll();
+ var wwidth = window.getWidth();
+ var wheight = window.getHeight();
 
- ibox.style.top = arrayPageScroll[1] + ((arrayPageSize[3] - bheight) / 2) + 'px';
- ibox.style.left = ((arrayPageSize[0] - bwidth) / 2) + "px";
+ ibox.style.top = window.getScrollTop() + ((wheight - bheight) / 2) + 'px';
+ ibox.style.left = ((wwidth - bwidth) / 2) + "px";
  ibox.style.width = bwidth + "px";
  ibox.style.height = bheight + "px";
  // alert('wwidth='+wwidth+'; bwidth='+bwidth+'; wheight='+wheight+'; bheight='+bheight);
@@ -20,3 +20,4 @@ function HideIbox(iboxid) {
  ibox.zIndex = '1000';
  ibox.style.display = 'none';
 }
+