function ShowDialog(data, o)
{
	if(o == null)
		o = {h:400, w:600, t:'', submit:null, close:null};
	
	var obj;
	if(o.submit)
	{
		obj = {
			"Submit": function()
			{
                if(o.submit.run)
                    o.submit.run();
			},
			Cancel: function()
			{
				$( this ).dialog( "close" );
			}
		}
	}

	$("#dialog").html(data).dialog({
		title: o.t,
		autoOpen: true,
		height: o.h,
		width: o.w,
		modal: true,
		hide: "explode",
		zIndex:20000,
		buttons: obj,
		close: o.close
	});
	
	$("#dialog").find("button, input[type=\"submit\"], input[type=\"button\"], .Btn").button().css({"font-size":"12px", "font-weight":"bold"});
};

