function form_submit()
{
	confirm_dialog('この内容で送信してもよろしいですか？', function(){Dialog.closeInfo();form_submit_do();});
}
function form_submit_do()
{
	info_dialog('ファイルをアップロードしています...<br />しばらくお待ちください。', 320, 100, true)
	
	$('postform').onsubmit=null;
	$('postform').submit();
	$('postform').onsubmit=function(){ return false;};
}

function alert_dialog(msg, h) {
	if( !h ) h = 100;
	Dialog.alert(msg, {
	windowParameters: {width:320, height:h},
	className:"alphacube",
	okLabel: "OK"
	});
}
function confirm_dialog(msg, func, h) {
	if( !h ) h = 100;
	Dialog.confirm(msg, {
	windowParameters: {width:320, height:h},
	className:"alphacube",
	okLabel: "OK",
	ok:func,
	cancel:function(){Dialog.closeInfo();}
	});
}
function confirm_dialog_update(msg, data, elm, h) {
	if( !h ) h = 100;
	Dialog.confirm(msg, {
	windowParameters: {width:320, height:h},
	className:"alphacube",
	okLabel: "OK",
	ok:function(){ajax_update(data,elm);Dialog.closeInfo();},
	cancel:function(){Dialog.closeInfo();}
	});
	
}
function info_dialog(msg, w, h, progress) {
	if( !w ) w = 320;
	if( !h ) w = 100;
	if( progress !== false ) progress = true;
	Dialog.info(msg, {
	className:"alphacube",
	windowParameters: {width:w, height:h},
	showProgress:progress
	});
}
function close_dialog(msg) {
	Dialog.setInfoMessage(msg);
	setTimeout("Dialog.closeInfo()", 1500);
	setTimeout("location.replace(location.href)", 2000);
}
function set_message(msg){
	Dialog.setInfoMessage(msg);
}

