
var formIsDirty = false;

function markPageDirty() {
  formIsDirty = true;
}

function checkDirtyPage() {
  if (formIsDirty) {
      return confirm("There are unsaved changes on this page. Continue and loose the changes?");
  } else {
    return true;
  }
}

function clearPageDirtyFlag() {
  formIsDirty = false;
}



