function dialog(id, options) {
  if(!options) {
    options = { height: "200px", width: "500px" };
  }

  // figure out the top location (I am assuming it will never be greater than 999 or less than 100)
  height = parseInt(((options.height) ? options.height : "200px").substring(0, 3));
  positionTop = (document.documentElement.clientHeight - height) / 2 + "px";
  $('#' + id).modal({
    close: false,
    position: [positionTop,],
    overlayId: 'confirmModalOverlay',
    containerId: 'confirmModalContainer',
    onOpen: function(dialog) {
      dialog.container.css("width", (options.width) ? options.width : "500px");
			this.setPosition();
      $('#confirmModalContainer .simplemodal-wrap').append("<div class='loading'><span>Loading...</span></div>");
      dialog.overlay.fadeIn(500, function () {
        dialog.container.fadeIn(200, function () {
          dialog.container.animate({ height: (options.height) ? options.height : "200px" }, 500, "linear", function () {
            $('#confirmModalContainer .simplemodal-wrap .loading').hide();
            dialog.data.fadeIn(200, function () {
              dialog.data.find('.yes').focus();
            });
          });
        });
      });
    },
    onClose: function (dialog) {
      dialog.data.fadeOut(200, function () {
        dialog.container.animate({ height: 30 }, 500, "linear", function () {
          dialog.container.fadeOut(200, function () {
            dialog.overlay.fadeOut(500, function () {
              $.modal.close();
            });
          });
        });
      });
    }
  });
  return false;
}