window.onclose = function()
	{		
		if (window.event.clientX < 0 && window.event.clientY < 0)
		 {
 		  alert("Window is closed.");
 		 }

	}