﻿// JScript File

// JScript File

    function emailfriendOpenImage(inode){       
        iOldSTop = ws_ScrollTop(document,false);
        iOldSLeft = ws_ScrollLeft(document,false);
        iOldWWidth = ws_WindowWidth();
        iOldWHeight = ws_WindowHeight(); 
        document.getElementById('emaifriendlimgBack').style.width = ws_WindowWidth() + 'px';
        document.getElementById('emaifriendlimgBack').style.height = ws_WindowHeight() + 'px';
        document.getElementById('emaifriendlimgBack').style.left = ws_ScrollLeft(document,false) + 'px';
        document.getElementById('emaifriendlimgBack').style.top = ws_ScrollTop(document,false) + 'px';
        document.getElementById('emaifriendlimgBack').onclick = function anony() { emailfriendCloseImage(); };
        document.getElementById('emaifriendlimgBack').style.display = 'inline';
        document.getElementById('emaifriendlimgBack').style.zIndex = 998;
      //  document.getElementById('emailbigImage').src = inode ;//+ '&width=' + ws_WindowWidth()/4 + '&height=' + ws_WindowHeight()/3;
        document.getElementById('emaifriendlimgBack').width = ws_WindowWidth()/4;
        document.getElementById('emaifriendlimgBack').height = ws_WindowHeight()/3;
      
        
       // document.getElementById('emailfriendzoom').onclick = function anony() { emailfriendCloseImage(); };
        document.getElementById('emailfriendzoom').style.width = ws_WindowWidth()/2.2 + 'px';
        document.getElementById('emailfriendzoom').style.height = ws_WindowHeight()/3 + 'px';
        document.getElementById('emailfriendzoom').style.left= '' + (ws_WindowWidth()/2-(ws_WindowWidth()/4.4)+ws_ScrollLeft(document,false)) + 'px';
        document.getElementById('emailfriendzoom').style.top = '' + (ws_WindowHeight()/2-(ws_WindowHeight()/2.5)+ws_ScrollTop(document,false)) + 'px';
        document.getElementById('emailfriendzoom').style.display = 'inline';
        document.getElementById('emailfriendzoom').style.zIndex = 999;                 
        
        emailfriendChkScroll();
       
    }
    function emailfriendChkScroll(){
     scrolldelay = setTimeout('emailfriendChkScroll()',100);      
        if (ws_ScrollTop(document,false)!=iOldSTop) emailfriendCloseImage();        
        if (ws_ScrollLeft(document,false)!=iOldSLeft)emailfriendCloseImage();
        if (ws_WindowWidth()!=iOldWWidth)emailfriendCloseImage();
        if (ws_WindowHeight()!=iOldWHeight)emailfriendCloseImage();
        
    }
    function emailfriendNochkScroll() {
        clearTimeout(scrolldelay);           
    }
    function emailfriendCloseImage(){
        document.getElementById('emailfriendzoom').src = 'images/white.png';
        document.getElementById('emaifriendlimgBack').style.display = 'none';
        document.getElementById('emailfriendzoom').style.display = 'none';
        emailfriendNochkScroll();
    }
