window.onbeforeunload = confirmExit;
 
function confirmExit()
{
  var flexApp = FABridge.flex.root();
	if(flexApp.getWarnUser())
  	{
    	return flexApp.getWarningMessage();
  	}
}

