﻿function window.onbeforeunload() {
    if (event.clientX > document.body.clientWidth && event.clientY < 0) {
        var xmlhttp;
        try {
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
            xmlhttp.open("GET", " AbandonSession.aspx", false);
            xmlhttp.send();
        }
        catch (e) {try {
                xmlHttp = new XMLHttpRequest(); xmlhttp.open("GET", "AbandonSession.aspx", false);
                xmlhttp.send();
            }
            catch (e) { return false;}
        }
    }
}




