X-Git-Url: http://www.average.org/gitweb/?p=mkgallery.git;a=blobdiff_plain;f=include%2Fgallery.js;h=a9d52999ae40cfb32fac05e17c386aff405abec4;hp=bf217f378663e45576594c7bdde135584cd896a7;hb=d7c0a397220f9f171f4fc677b96ea1f6655e7e02;hpb=562bb8dadead7245f944b4f9a8c4752caba651e7 diff --git a/include/gallery.js b/include/gallery.js index bf217f3..a9d5299 100644 --- a/include/gallery.js +++ b/include/gallery.js @@ -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'; } +