function f_Page(iPage) {
	document.frmPage.page.value = iPage;
	document.frmPage.submit();
}
function f_AllCheck(sChkBox, bChk) {
	with (document) {
		var oChk = all[sChkBox];
		if (!oChk.length) {
			oChk.checked = bChk;
		} else {
			for (var iIdx = 0; iIdx < oChk.length; iIdx++) {
				oChk[iIdx].checked = bChk;
			}
		}
	}
}
function f_ChkHissuTxt(oTxt) {
	if (oTxt.value != "") return true; 
	
	oTxt.focus();
	alert('必須入力です。');
	
	return false;
}
function f_ChkHissuChk(oChk) {
	for (var iIdx = 0; iIdx < oChk.length; iIdx++) {
		if (oChk[iIdx].checked) {
			return true;
		}
	}
	
	oChk[0].focus();
	
	alert('必須入力です。');
	
	return false;
}
function f_ChkNum(oTxt) {
	if (oTxt.value == "") return true;
	if (oTxt.value.match(/^\d+$/)) return true;
	
	oTxt.focus();
	oTxt.select();
	
	alert('半角の整数値で入力してください。');
	
	return false;
}
function f_ChkFloat(oTxt) {
	if (oTxt.value == "") return true;
	if (oTxt.value.match(/^\d+(\.\d+)?$/)) return true;
	
	oTxt.focus();
	oTxt.select();
	alert('半角の数値で入力してください。');
	
	return false;
}
function f_ChkDate(oYear, oMon, oDay) {
	var sDate = oYear.value + '/' + oMon.value + '/' + oDay.value;
	var dDate = new Date(sDate);
	if (dDate.getFullYear() == Number(oYear.value) && dDate.getMonth() + 1 == Number(oMon.value) && dDate.getDate() == Number(oDay.value))
		return true;
	
	oDay.focus();
	alert('日付が正しくありません。');
	return false;
}
function f_ChkEmail(oTxt) {
	if (oTxt.value.match(/^[^@]+@[^.]+\..+$/)) return true;
	
	oTxt.focus();
	oTxt.select();
	alert('E-mailアドレスが正しくありません。');
	return false;
}
function f_Dialog(sUrl, iWidth, iHeight) {
	return showModalDialog('frame.php?url='+sUrl, null, 'dialogHeight:'+iHeight+'px;dialogWidth:'+iWidth+'px');
}

