
function _submit(frm, mode, keydata, gflg)
{
	switch (mode)
	{
		case	'list':
				if (gflg)
				{
					frm.action	= 'list' + frm.page.value + '.html';
				}
				else
				{
					frm.action	= './index.php';
				}
				frm.submit();
				break;
		case	'search':
				if (gflg)
				{
					frm.action	= 'list' + frm.page.value + '.html';
				}
				else
				{
					frm.action	= './index.php';
				}
				frm.submit();
				break;
		case	'page':
				if (gflg)
				{
					frm.action	= 'list' + keydata + '.html';
				}
				else
				{
					frm.action	= './index.php';
				}
				frm.page.value			= keydata;
				frm.submit();
				break;
		case	'detail':
				if (gflg)
				{
					frm.action	= 'detail' + keydata + '.html';
				}
				else
				{
					frm.action	= './detail.php';
				}
				frm.target_did.value	= keydata;
				frm.submit();
				break;
		case	'inquiry':
				frm.target_did.value	= keydata;
				frm.action				= './inquiry.php';
				frm.submit();
				break;
		case	'inquiry-r':
				check_result	= "以下の項目が未入力または正しくありません。\n";
				check_flg		= 0;

				if (frm.fixed_item_1.value == '')
				{
					check_result	= check_result + '□ ' + frm.fixed_item_title_1.value + 'が入力されていません。\n';
					check_flg		= 1;
				}

				if (frm.fixed_item_2.value != '')
				{
					if (!frm.fixed_item_2.value.match(/^[a-zA-Z~]+[0-9a-zA-Z\-_.~\/:?]*@[0-9a-zA-Z\-_.~\/:?]*$/))
					{
						check_result	= check_result + '□ ' + frm.fixed_item_title_2.value + 'が正しく入力されていません。\n(' + frm.fixed_item_title_2.value + 'は半角の英数字、記号でお願いします)\n';
						check_flg		= 1;
					}
				}
				else
				{
					check_result	= check_result + '□ ' + frm.fixed_item_title_2.value + 'が入力されていません。\n';
					check_flg		= 1;
				}

				if (check_flg == 0)
				{
					if (confirm('お問い合わせを行います。\nよろしいですか？'))
					{
						frm.target_did.value	= keydata;
						frm.d_mode.value		= 'sendmail';
						frm.action				= './inquiry.php';
						frm.submit();
					}
				}
				else
				{
					alert(check_result);
				}
				break;
	}

	return false;
}
