function showNote(mode) {
    // a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
    $("#note-message").dialog("destroy");
  
    $("#note-message").dialog({
      modal: true,
      width: 440,
      draggable: false,
      resizable: false,
      buttons: {
        Ok: function() {
          if('once' == mode) {
              storeUserClickChoice();
          }
          $(this).dialog('close');
        }
      }
    });
}

function storeUserClickChoice() {
  $.ajax(
  {
    url: "ajax/storeUserClickChoice.php",
    type: "POST",
    dataType: "json",
    success: function(data){
//      if("OK" == data.status) {
//      } else {
//      }
    },
    error: function (XMLHttpRequest, textStatus, errorThrown){
        console.log("NOOK!");
        console.log(errorThrown);
    }
  });  
  return false;    
}