This code will work only in IE.
Try this,
javascript:
function fnOnunLoad() {
if (window.event.clientX < 0 || window.event.clientY < 0) {
document.getElementById("ctl00_lnkLogout").click();
}
}
Then in body tag use this,
<body onunload="fnOnunLoad()">
If you written the session.Abondon() code in logout button click, then that javascript will call this logout click function.