﻿// JScript File

    function EmailGuidopenImage(inode){
      
        iOldSTop = ws_ScrollTop(document,false);     
        iOldSLeft = ws_ScrollLeft(document,false);
        iOldWWidth = ws_WindowWidth();
        iOldWHeight = ws_WindowHeight();
        document.getElementById('firstImgBack').style.width = ws_WindowWidth() + 'px';
        document.getElementById('firstImgBack').style.height = ws_WindowHeight() + 'px';
        document.getElementById('firstImgBack').style.left = ws_ScrollLeft(document,false) + 'px';
        document.getElementById('firstImgBack').style.top = ws_ScrollTop(document,false) + 'px';
        document.getElementById('firstImgBack').onclick = function anony() { EmailGuidcloseImage(); };
        document.getElementById('firstImgBack').style.display = 'inline';
        document.getElementById('firstImgBack').style.zIndex = 998;
        document.getElementById('userGuidEmail').src = inode ;//+ '&width=' + ws_WindowWidth()/4 + '&height=' + ws_WindowHeight()/3;
        document.getElementById('firstImgBack').width = ws_WindowWidth()/4;
        document.getElementById('firstImgBack').height = ws_WindowHeight()/3;
      
        
        document.getElementById('userGuidEmail').onclick = function anony() { EmailGuidcloseImage(); };
        document.getElementById('userGuidEmail').style.width = ws_WindowWidth()/2.2 + 'px';
        document.getElementById('userGuidEmail').style.height = ws_WindowHeight()/4.0 + 'px';
        document.getElementById('userGuidEmail').style.left = '' + (ws_WindowWidth()/2-(ws_WindowWidth()/4.4)+ws_ScrollLeft(document,false)) + 'px';
        document.getElementById('userGuidEmail').style.top = '' + (ws_WindowHeight()/2-(ws_WindowHeight()/5.0)+ws_ScrollTop(document,false)) + 'px';
        document.getElementById('userGuidEmail').style.display = 'inline';
        document.getElementById('userGuidEmail').style.zIndex = 999;                 
        
        EmailGuidchkScroll();
       
    }
    function EmailGuidchkScroll(){
     scrolldelay = setTimeout('EmailGuidchkScroll()',100);
        if (ws_ScrollTop(document,false)!=iOldSTop)EmailGuidcloseImage();       
        if (ws_ScrollLeft(document,false)!=iOldSLeft)EmailGuidcloseImage();
        if (ws_WindowWidth()!=iOldWWidth)EmailGuidcloseImage();
        if (ws_WindowHeight()!=iOldWHeight)EmailGuidcloseImage();
        
    }
    function noEmailGuidchkScroll() {
        clearTimeout(scrolldelay);   
    }
    function EmailGuidcloseImage(){
        document.getElementById('userGuidEmail').src = 'images/white.png';
        document.getElementById('firstImgBack').style.display = 'none';
        document.getElementById('userGuidEmail').style.display = 'none';
        noEmailGuidchkScroll();
    }