var notify_on_unload = true;

window.onbeforeunload = function(e)
{
	var alert_string = 'The current page has not finished loading yet. Please hit CANCEL and let the page load correctly.'
	var e = e || window.event;
	if(notify_on_unload)
	{
		// For IE and Firefox
		if(e)
		{
			e.returnValue = alert_string;
		}
		
		return alert_string;
	}
};

