//Copy From http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/overview/browserdetection.asp
// Returns the version of Internet Explorer or a -1
// (indicating the use of another browser).
//function getInternetExplorerVersion() {
//	var rv = -1; // Return value assumes failure
//	if (navigator.appName == 'Microsoft Internet Explorer') {
//		var ua = navigator.userAgent;
//		var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
//		if (re.exec(ua) != null) {
//			rv = parseFloat( RegExp.$1 );
//		}
//	}
//	return rv;
//}

/* 3.8.6.1 (2006/10/20) IE Close(X) event : <body еее onUnload="ie_X(event);" /> */
function ie_X(evt) {
	var evt = (evt) ? evt : ((window.event) ? window.event : null);
	if (evt) {
		var ver = getInternetExplorerVersion();
		if( ( ver >= 7 && evt.clientY <= -70 ) ||
			( evt.clientX<=-8000 && evt.clientY<=-8000 ) ) {
				alert( "Session Logout" );
				document.location.href="../menu/logout.jsp" ;
		}
	}
}
