﻿// JScript File
    function IsClosingBrowser(e)
    {
        //capturing ALT + F4
        if (!e) var e = window.event;
        nKey = e.keyCode;
        if(nKey == undefined || nKey == null)
            nKey = e.which;
        
        if (e.altKey == true && nKey == 0 )
            return true;
        Xwidth = window.document.body.offsetWidth - e.clientX;
        YHeight = e.clientY;
        //if( Xwidth <= 30 && YHeight < 0 )
        if( Xwidth < 0 && YHeight < 0 )
            return true;
        return false;
    }
    /*function closeSession_2(e)
    {
    	var hddLastMouseEvt = document.getElementById('hddLastMouseEvt');
	    //alert("hddLastMouseEvt.value: " + hddLastMouseEvt.value);
        if(hddLastMouseEvt.value == true || hddLastMouseEvt.value == 'true' || hddLastMouseEvt.value == '1' || IsClosingBrowser(e))
        {
            window.open("/WebReportingManager/Framework/Shutdown.aspx");
            return false;
        }
        return true;
    }*/
    /*function closeSession(e)
    {
        //capturing ALT + F4
        if (!e) var e = window.event;
        nKey = e.keyCode;
        if(nKey == undefined || nKey == null)
            nKey = e.which;
        
        //if (event.altKey==true && event.keyCode==0 )
        if (e.altKey == true && nKey == 0 )
        {
            window.open("/WebReportingManager/Framework/Shutdown.aspx");
            return false;
        }
        //Xwidth = window.document.body.offsetWidth - window.event.clientX
        //YHeight = window.event.clientY
        Xwidth = window.document.body.offsetWidth - e.clientX;
        YHeight = e.clientY;
        //if( Xwidth <= 30 && YHeight < 0 )
        if( Xwidth < 0 && YHeight < 0 )
        {
            window.open("/WebReportingManager/Framework/Shutdown.aspx");
            return false;
        }
        return true;
    }*/

