﻿// JScript File
// JScript File

// JScript File

    function bookShowingOpenImage(inode){
            
        iOldSTop = ws_ScrollTop(document,false);
        iOldSLeft = ws_ScrollLeft(document,false);
        iOldWWidth = ws_WindowWidth();
        iOldWHeight = ws_WindowHeight();      
        document.getElementById('bookShowingimgBack').style.width = ws_WindowWidth() + 'px';        
        document.getElementById('bookShowingimgBack').style.height = ws_WindowHeight() + 'px';
        document.getElementById('bookShowingimgBack').style.left = ws_ScrollLeft(document,false) + 'px';
        document.getElementById('bookShowingimgBack').style.top = ws_ScrollTop(document,false) + 'px';
        document.getElementById('bookShowingimgBack').onclick = function anony() { bookShowingCloseImage(); };
        document.getElementById('bookShowingimgBack').style.display = 'inline';
        document.getElementById('bookShowingimgBack').style.zIndex = 998;
        //document.getElementById('bookShowingbigImage').src = inode ;//+ '&width=' + ws_WindowWidth()/4 + '&height=' + ws_WindowHeight()/3;
        document.getElementById('bookShowingimgBack').width = ws_WindowWidth()/4;
        document.getElementById('bookShowingimgBack').height = ws_WindowHeight()/3;
      
        
       // document.getElementById('bookShowingzoom').onclick = function anony() { bookShowingCloseImage(); };
        document.getElementById('bookShowingzoom').style.width = ws_WindowWidth()/2.2 + 'px';
        document.getElementById('bookShowingzoom').style.height = ws_WindowHeight()/3 + 'px';
        document.getElementById('bookShowingzoom').style.left= '' + (ws_WindowWidth()/2-(ws_WindowWidth()/4.4)+ws_ScrollLeft(document,false)) + 'px';
        document.getElementById('bookShowingzoom').style.top = '' + (ws_WindowHeight()/2-(ws_WindowHeight()/2.1)+ws_ScrollTop(document,false)) + 'px';
        document.getElementById('bookShowingzoom').style.display = 'inline';
        document.getElementById('bookShowingzoom').style.zIndex = 999;                 
        
        bookShowingChkScroll();
       
    }
    function bookShowingChkScroll(){
        scrolldelay = setTimeout('bookShowingChkScroll()',100);
        if (ws_ScrollTop(document,false)!=iOldSTop)  bookShowingCloseImage();        
        if (ws_ScrollLeft(document,false)!=iOldSLeft)bookShowingCloseImage();
        if (ws_WindowWidth()!=iOldWWidth)bookShowingCloseImage();
        if (ws_WindowHeight()!=iOldWHeight)bookShowingCloseImage();
         
    }
    function bookShowingNochkScroll() {
        clearTimeout(scrolldelay);   
    }
    function bookShowingCloseImage(){
        document.getElementById('bookShowingzoom').src = 'images/white.png';
        document.getElementById('bookShowingimgBack').style.display = 'none';
        document.getElementById('bookShowingzoom').style.display = 'none';
        bookShowingNochkScroll();
    }


