document.write("<div id='simplemodal'><div class='header'><span class='title'></span></div><div class='message'></div></div>");
function confirm(message, callback) {
	jQuery('#simplemodal').modal({
		closeHTML: "<a href='#' title='Close' class='modal-close'>x</a>",
		position: ["20%",],
		overlayId: 'simplemodal-overlay',
		containerId: 'simplemodal-container', 
		onShow: function (dialog) {
			jQuery('.message', dialog.data[0]).append(message);

			// if the user clicks "yes"
			jQuery('.yes', dialog.data[0]).click(function () {
				// call the callback
				if ($.isFunction(callback)) {
					callback.apply();
				}
				// close the dialog
				jQuery.modal.close();
			});
		}
	});
}
function simple_message(height, width, title, message) {
	jQuery('#simplemodal').modal({
		closeHTML: "<a href='#' title='Close' class='modal-close'>x</a>",
		position: ["20%",],
		overlayId: 'simplemodal-overlay',
		containerId: 'simplemodal-container', 
		onShow: function (dialog) {
			jQuery('#simplemodal-container').height(height);
			jQuery('#simplemodal-container').width(width);
			jQuery('.message', dialog.data[0]).append(message);
			jQuery('.title', dialog.data[0]).append(title);
		}
	});
}
