function DialogBox(url, sTitle) 
{
	var Box = $('<div title=""></div>');
	Box.dialog
	({
		autoOpen: false,
		title: sTitle,
		bgiframe: false,
		modal: true,
		minWidth: 250,
		height: 250,
		maxWidth: 700,
		maxHeight: 650, 
		width: 650,
		height: 545,
		buttons: 
		{
			닫기: function() 
			{
				Box.dialog('close');
			}
		},
		close: function() {Box.dialog('destroy').remove();},
		open: function(event, ui) {$('<iframe style="width:100%; height:100%; border:0;" src="'+url+'" frameborder="0" ></iframe>').appendTo(Box);}
	});	
 
	Box.dialog('open');
 
	return false;
}
 
function MessageBox(url, sTitle) 
{
	$('<div title=""></div>').load
	(
		url,
		function(data)
		{
			$(this).dialog
			({
				title: sTitle,
				bgiframe: true,
				modal: true,
				minWidth: 250,
				height: 250,
				maxWidth: 700,
				maxHeight: 650, 
				width: 650,
				height: 545,
				buttons: 
				{
					닫기: function() 
					{
						$(this).dialog('close');
					}
				},
				close: function() {$(this).dialog('destroy').remove();}
			});
		}
	);
	
	return false;
}
 
function ViewBox(url, sTitle) 
{
	$('<div title=""></div>').load
	(
		url,
		function (data)
		{
			$(this).dialog
			({
				title: sTitle,
				bgiframe: false,
				modal: true,
				minWidth: 250,
				minHeight: 250,
//				maxWidth: 700,
//				maxHeight: 650, 
				width: 400,
				height: 500,
/*
				buttons: 
				{
					닫기: function() 
					{
						$(this).dialog('close');
					}
				},
*/
				close: function() {$(this).dialog('destroy').remove();}
			});
		}
	);
	
	return false;
}
 
function ConfirmBox(html, sTitle, func) 
{
	$('<div title="" style="line-height: 1.8em;"></div>').html(html).dialog
	({
		title: sTitle,
		bgiframe: true,
		modal: true,
		height: 150,
		maxWidth: 550,
		maxHeight: 500, 
		buttons: 
		{
			취소: function() { $(this).dialog('destroy').remove(); },
			예: function() { func(); $(this).dialog('destroy').remove(); }
		},
		close: function() {$(this).dialog('destroy').remove();}
	});
	
	return false;
}
 
function AlertCallback(html, sTitle, func) 
{
	$('<div title=""></div>').html(html).dialog
	({
		title: sTitle,
		bgiframe: true,
		modal: true,
		minWidth: 250,
		height: 250,
		maxWidth: 550,
		maxHeight: 500, 
		buttons: 
		{
			확인: function() 
			{
				func();
				$(this).dialog('close');
			}
		},
		close: function() {$(this).dialog('destroy').remove();}
	});
	
	return false;
}

function showMessage(content) 
{
	$('<div title="알림" style="line-height: 1.8em;"></div>').html(content).dialog
	({
		bgiframe: true,
		modal: true,
		buttons: 
		{
			확인: function() 
			{
				$(this).dialog('destroy').remove();
			}
		},
		close: function() {$(this).dialog('destroy').remove();}
	});
}

function AlertBox(content, sTitle) 
{
	$("<div id='alertBox'></div>").html(content).dialog
	({
		bgiframe: false,
		modal: true,
		title: sTitle,
		close: function() {$(this).dialog('destroy').remove();}
	});
}

function ShowBox(content, sTitle) 
{
	$("<div></div>").html(content).dialog
	(
		{
			bgiframe: false,
			modal: true,
			draggable: false,
			title: sTitle,
			resizable: false,
			closeOnEscape: true,
			close: function() {$(this).dialog('destroy').remove();}
		}		
	);
}

