$(document).ready(function () {

  $("#message_box_dialog").dialog({
    autoOpen: false,
    bgiframe: true,
    open: function() {
      $(this).dialog('option', 'width', msg_box.get_width());
      $(this).dialog('option', 'title', msg_box.get_title());
      $("#message_box_content").html(msg_box.get_content());
      return;
    },
    buttons: {
      Ok: function() {
        $(this).dialog('close');
      }
    },
    close: function() {
      return;
    }
  });


});

function MessageBox() {
  //Variables
  this.title = "Message Box Title";
  this.content = "Message Box Content";
  this.msg_box_width = 300;

  //Functions
  this.set_title = set_title;
  this.get_title = get_title;

  this.set_content = set_content;
  this.get_content = get_content;

  this.set_width = set_width;
  this.get_width = get_width;

  this.open_message_box = open_message_box; 
}


function get_width() {
  return this.msg_box_width;
}

function set_width(_val) {
  this.msg_box_width = _val;
}

function get_title() {
  return this.title;
}

function get_content() {
  return this.content; 
}

function set_title(_title) {
  this.title = _title;
}

function set_content(_content) {
  this.content = _content;
}

function open_message_box() {
  var content = this.content;
  $('#message_box_dialog').dialog('open');
}
