


function confirmExit()
{
	var app = document.getElementById("LovelyCharts");
	try{
		if (app.hasUnsavedChanges()){
			return "Apparently, you have unsaved diagrams opened, if you close this window changes will be lost! "+
					"To save your work, press Cancel, then choose Save from the File menu. "+
					"If you don't want to save your latest changes, then you can click OK, hope to see you soon!";
		}
	} catch (e){
	
	}
}

window.onbeforeunload = confirmExit;
