﻿// JScript File

    function EmailfriendGuidopenImage(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() { EmailfriendGuidcloseImage(); };
        document.getElementById('firstImgBack').style.display = 'inline';
        document.getElementById('firstImgBack').style.zIndex = 998;
        document.getElementById('userGuidEmailfriend').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('userGuidEmailfriend').onclick = function anony() { EmailfriendGuidcloseImage(); };
        document.getElementById('userGuidEmailfriend').style.width = ws_WindowWidth()/2.2 + 'px';
        document.getElementById('userGuidEmailfriend').style.height = ws_WindowHeight()/4.0 + 'px';
        document.getElementById('userGuidEmailfriend').style.left = '' + (ws_WindowWidth()/2-(ws_WindowWidth()/4.4)+ws_ScrollLeft(document,false)) + 'px';
        document.getElementById('userGuidEmailfriend').style.top = '' + (ws_WindowHeight()/2-(ws_WindowHeight()/5.0)+ws_ScrollTop(document,false)) + 'px';
        document.getElementById('userGuidEmailfriend').style.display = 'inline';
        document.getElementById('userGuidEmailfriend').style.zIndex = 999;                 
        
        EmailfriendGuidchkScroll();
       
    }
    function EmailfriendGuidchkScroll(){
     scrolldelay = setTimeout('EmailfriendGuidchkScroll()',100);
        if (ws_ScrollTop(document,false)!=iOldSTop)EmailfriendGuidcloseImage();       
        if (ws_ScrollLeft(document,false)!=iOldSLeft)EmailfriendGuidcloseImage();
        if (ws_WindowWidth()!=iOldWWidth)EmailfriendGuidcloseImage();
        if (ws_WindowHeight()!=iOldWHeight)EmailfriendGuidcloseImage();
        
    }
    function noEmailfriendGuidchkScroll() {
        clearTimeout(scrolldelay);   
    }
    function EmailfriendGuidcloseImage(){
        document.getElementById('userGuidEmailfriend').src = 'images/white.png';
        document.getElementById('firstImgBack').style.display = 'none';
        document.getElementById('userGuidEmailfriend').style.display = 'none';
        noEmailfriendGuidchkScroll();
    }