/*
 * MosP - Mind Open Source Project    http://www.mosp.jp/
 * Copyright (C) MIND Co., Ltd.       http://www.e-mind.co.jp/
 * 
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
/**
 * 画面読込時追加処理
 * @param 無し
 * @return 無し
 * @throws 実行時例外
 */
function onLoadExtra() {
	// 項目背景色設定
	setFieldsBgColor(ARY_FIELDS_ID    , COLOR_FIELD_NORMAL);
	setFieldsBgColor(ARY_ERR_FIELDS_ID, COLOR_FIELD_ERROR );
	// 項目長設定
	setMaxLength(PRM_TXT_PRESENCE				, LEN_DOUBLE_DAYS);
	setMaxLength(PRM_TXT_PRESENCE_NUMBER 		, LEN_NUMBER);
	setMaxLength(PRM_TXT_WORK_HOUR 				, LEN_WORK_HOUR);
	setMaxLength(PRM_TXT_WORK_MIN 				, LEN_TIME);
	setMaxLength(PRM_TXT_BREAK_HOUR 			, LEN_WORK_HOUR);
	setMaxLength(PRM_TXT_BREAK_MIN 				, LEN_TIME);
	setMaxLength(PRM_TXT_OTHER 					, LEN_DOUBLE_DAYS);
	setMaxLength(PRM_TXT_LEAVE_AND_LATE 		, LEN_NUMBER);
	setMaxLength(PRM_TXT_LEAVE_AND_LATE_HOUR 	, LEN_WORK_HOUR);
	setMaxLength(PRM_TXT_LEAVE_AND_LATE_MIN 	, LEN_TIME);
	setMaxLength(PRM_TXT_OVER_HOUR 				, LEN_WORK_HOUR);
	setMaxLength(PRM_TXT_OVER_MIN 				, LEN_TIME);
	setMaxLength(PRM_TXT_WORK_ON_HOLIDAY_HOUR 	, LEN_WORK_HOUR);
	setMaxLength(PRM_TXT_WORK_ON_HOLIDAY_MIN 	, LEN_TIME);
	setMaxLength(PRM_TXT_LATE_NIGHT_HOUR 		, LEN_WORK_HOUR);
	setMaxLength(PRM_TXT_LATE_NIGHT_MIN 		, LEN_TIME);
	setMaxLength(PRM_TXT_SYOKUJI 				, LEN_NUMBER);
	setMaxLength(PRM_TXT_CYOKU1 				, LEN_NUMBER);
	setMaxLength(PRM_TXT_CYOKU2 				, LEN_NUMBER);
	setMaxLength(PRM_TXT_CYOKU3 				, LEN_NUMBER);
	setMaxLength(PRM_TXT_HOKA1 					, LEN_NUMBER);
	setMaxLength(PRM_TXT_HOKA2 					, LEN_NUMBER);
	setMaxLength(PRM_TXT_HOKA3 					, LEN_NUMBER);
	setMaxLength(PRM_TXT_HOKA4 					, LEN_NUMBER);
	setMaxLength(PRM_TXT_HOKA5 					, LEN_NUMBER);
	setMaxLength(PRM_TXT_HOUR_HOLIDAY			, LEN_NUMBER);
	
	setMaxLength(PRM_TXT_WARIMASHI_1_HOUR			, LEN_WORK_HOUR);	
	setMaxLength(PRM_TXT_WARIMASHI_1_MIN			, LEN_NUMBER);	
	setMaxLength(PRM_TXT_WEEKDAY_OVER_HOUR			, LEN_WORK_HOUR);	
	setMaxLength(PRM_TXT_WEEKDAY_OVER_MIN			, LEN_NUMBER);	
	setMaxLength(PRM_TXT_WEEK_HOLIDAY_OVER_HOUR		, LEN_WORK_HOUR);	
	setMaxLength(PRM_TXT_WEEK_HOLIDAY_OVER_MIN		, LEN_NUMBER);	
	setMaxLength(PRM_TXT_MONTHLY_OVER_HOUR			, LEN_WORK_HOUR);	
	setMaxLength(PRM_TXT_MONTHLY_OVER_MIN			, LEN_NUMBER);	
	setMaxLength(PRM_TXT_MONTHLY_WEEK_HOLIDAY_HOUR	, LEN_WORK_HOUR);	
	setMaxLength(PRM_TXT_MONTHLY_WEEK_HOLIDAY_MIN	, LEN_NUMBER);	
	setMaxLength(PRM_TXT_SUBSTITUTE_HOLIDAY			, LEN_DOUBLE_DAYS);	
	
	setMaxLength(PRM_TXT_PAID_HOLIDAY 			, LEN_DOUBLE_DAYS);
	setMaxLength(PRM_TXT_PARTICULAR_HOLIDAY		, LEN_DOUBLE_DAYS);
	setMaxLength(PRM_TXT_ABSENCE 				, LEN_DOUBLE_DAYS);
	setMaxLength(PRM_TXT_MEDICAL 				, LEN_DOUBLE_DAYS);
	setMaxLength(PRM_TXT_COMPENSATION_DAY 		, LEN_DOUBLE_DAYS);
	setMaxLength(PRM_TXT_TRANSFER 				, LEN_DOUBLE_DAYS);

	if (NAM_HOLIDAY_REASON_6 != "") {
		setMaxLength(PRM_TXT_HOLIDAY_REASON_6 	, LEN_DOUBLE_DAYS);
	}
	if (NAM_HOLIDAY_REASON_7 != "") {
		setMaxLength(PRM_TXT_HOLIDAY_REASON_7 	, LEN_DOUBLE_DAYS);
	}
	if (NAM_HOLIDAY_REASON_8 != "") {
		setMaxLength(PRM_TXT_HOLIDAY_REASON_8 	, LEN_DOUBLE_DAYS);
	}
	if (NAM_HOLIDAY_REASON_9 != "") {
		setMaxLength(PRM_TXT_HOLIDAY_REASON_9	, LEN_DOUBLE_DAYS);
	}
	
	// 編集/表示判定
	if (MODE == 1) {
		// フォーカス設定
		setFocus(PRM_TXT_PRESENCE);
	} else if (MODE == 2) {
		setVisibility("btnRegist", false);
		setWidth("btnRegist", 0);
	}

	setReadOnly(PRM_TXT_WEEKDAY_OVER_HOUR			, true);	
	setReadOnly(PRM_TXT_WEEKDAY_OVER_MIN			, true);	
	setReadOnly(PRM_TXT_WEEK_HOLIDAY_OVER_HOUR		, true);	
	setReadOnly(PRM_TXT_WEEK_HOLIDAY_OVER_MIN		, true);
	// 改正労働基準法
	if (AFTER_REFORM) {
		setReadOnly(PRM_TXT_WEEKDAY_OVER_HOUR			, false);	
		setReadOnly(PRM_TXT_WEEKDAY_OVER_MIN			, false);	
		setReadOnly(PRM_TXT_WEEK_HOLIDAY_OVER_HOUR		, false);	
		setReadOnly(PRM_TXT_WEEK_HOLIDAY_OVER_MIN		, false);
	}

	setReadOnly(PRM_TXT_HOUR_HOLIDAY				, true);
	setReadOnly(PRM_TXT_SUBSTITUTE_HOLIDAY			, true);
	setReadOnly(PRM_TXT_MONTHLY_OVER_HOUR			, true);	
	setReadOnly(PRM_TXT_MONTHLY_OVER_MIN			, true);	
	setReadOnly(PRM_TXT_MONTHLY_WEEK_HOLIDAY_HOUR	, true);	
	setReadOnly(PRM_TXT_MONTHLY_WEEK_HOLIDAY_MIN	, true);
	
	// 時間単位年休
	if (HOUR_HOLIDAY) {
		setReadOnly(PRM_TXT_HOUR_HOLIDAY, false);
	}
	// 代休
	if (SUBSTITUTE) {
		setReadOnly(PRM_TXT_SUBSTITUTE_HOLIDAY, false);
	}
	// 月60時間
	if (OVER_60_HOUR) {
		setReadOnly(PRM_TXT_MONTHLY_OVER_HOUR			, false);	
		setReadOnly(PRM_TXT_MONTHLY_OVER_MIN			, false);	
		setReadOnly(PRM_TXT_MONTHLY_WEEK_HOLIDAY_HOUR	, false);	
		setReadOnly(PRM_TXT_MONTHLY_WEEK_HOLIDAY_MIN	, false);	
	}
	// 時間外警告
	setOverTimeBgColor();
}

/**
 * サーバー通信処理
 * @param 無し
 * @return 無し
 * @throws 実行時例外
 */
function submitForm(objForm) {
	// 入力チェック
	if (validate()) {
		doSubmitMessage(objForm, 'P1047', 'QC0001', '');
	}
}

/**
 * 入力チェック
 * @param 無し
 * @return チェック結果(true：OK、false：NG)
 * @throws 実行時例外
 */
function validate() {
	// フィールド背景色設定
	setFieldsBgColor(ARY_FIELDS_ID, COLOR_FIELD_NORMAL);
	// フィールド色設定
	if (WARNING) {
		setColor(PRM_TXT_OVER_HOUR, COLOR_FONT_NORMAL);
		setColor(PRM_TXT_OVER_MIN, COLOR_FONT_NORMAL);

		setColor(PRM_TXT_MONTHLY_OVER_HOUR, COLOR_FONT_NORMAL);
		setColor(PRM_TXT_MONTHLY_OVER_MIN, COLOR_FONT_NORMAL);

		setColor(PRM_TXT_MONTHLY_WEEK_HOLIDAY_HOUR, COLOR_FONT_NORMAL);
		setColor(PRM_TXT_MONTHLY_WEEK_HOLIDAY_MIN, COLOR_FONT_NORMAL);
	}
	// 入力チェック
	var aryMessage = new Array();
	
	checkRequired(PRM_TXT_PRESENCE				, NAM_PRESENCE				, aryMessage);
	checkRequired(PRM_TXT_PRESENCE_NUMBER		, NAM_PRESENCE_NUMBER		, aryMessage);
	checkRequired(PRM_TXT_WORK_HOUR				, NAM_WORK_TIME				, aryMessage);
	checkRequired(PRM_TXT_WORK_MIN				, NAM_WORK_TIME				, aryMessage);
	checkRequired(PRM_TXT_BREAK_HOUR			, NAM_BREAK_TIME			, aryMessage);
	checkRequired(PRM_TXT_BREAK_MIN				, NAM_BREAK_TIME			, aryMessage);
	checkRequired(PRM_TXT_PAID_HOLIDAY			, ARY_HOLIDAY_REASON["0"][0]	, aryMessage);
	checkRequired(PRM_TXT_PARTICULAR_HOLIDAY	, ARY_HOLIDAY_REASON["1"][0]	, aryMessage);
	checkRequired(PRM_TXT_ABSENCE				, ARY_HOLIDAY_REASON["2"][0]	, aryMessage);
	checkRequired(PRM_TXT_MEDICAL				, ARY_HOLIDAY_REASON["3"][0]	, aryMessage);
	checkRequired(PRM_TXT_COMPENSATION_DAY		, ARY_HOLIDAY_REASON["4"][0]	, aryMessage);
	checkRequired(PRM_TXT_TRANSFER				, ARY_HOLIDAY_REASON["5"][0]	, aryMessage);
	checkRequired(PRM_TXT_OTHER					, NAM_OTHER					, aryMessage);
	checkRequired(PRM_TXT_LEAVE_AND_LATE		, NAM_LEAVE_AND_LATE		, aryMessage);
	checkRequired(PRM_TXT_LEAVE_AND_LATE_HOUR	, NAM_LEAVE_AND_LATE_TIME	, aryMessage);
	checkRequired(PRM_TXT_LEAVE_AND_LATE_MIN	, NAM_LEAVE_AND_LATE_TIME	, aryMessage);
	checkRequired(PRM_TXT_OVER_HOUR				, NAM_OVER_TIME				, aryMessage);
	checkRequired(PRM_TXT_OVER_MIN				, NAM_OVER_TIME				, aryMessage);
	checkRequired(PRM_TXT_WORK_ON_HOLIDAY_HOUR	, NAM_WORK_ON_HOLIDAY_TIME	, aryMessage);
	checkRequired(PRM_TXT_WORK_ON_HOLIDAY_MIN	, NAM_WORK_ON_HOLIDAY_TIME	, aryMessage);
	checkRequired(PRM_TXT_LATE_NIGHT_HOUR		, NAM_LATE_NIGHT_TIME		, aryMessage);
	checkRequired(PRM_TXT_LATE_NIGHT_MIN		, NAM_LATE_NIGHT_TIME		, aryMessage);
	checkRequired(PRM_TXT_SYOKUJI				, ARY_ALLOWANCE["09"][0]		, aryMessage);
	checkRequired(PRM_TXT_CYOKU1				, ARY_ALLOWANCE["10"][0]		, aryMessage);
	checkRequired(PRM_TXT_CYOKU2				, ARY_ALLOWANCE["11"][0]		, aryMessage);
	checkRequired(PRM_TXT_CYOKU3				, ARY_ALLOWANCE["12"][0]		, aryMessage);
	checkRequired(PRM_TXT_HOKA1					, ARY_ALLOWANCE["13"][0]		, aryMessage);
	checkRequired(PRM_TXT_HOKA2					, ARY_ALLOWANCE["14"][0]		, aryMessage);
	checkRequired(PRM_TXT_HOKA3					, ARY_ALLOWANCE["15"][0]		, aryMessage);
	checkRequired(PRM_TXT_HOKA4					, ARY_ALLOWANCE["16"][0]		, aryMessage);
	checkRequired(PRM_TXT_HOKA5					, ARY_ALLOWANCE["17"][0]		, aryMessage);
		
	checkNumeric(PRM_TXT_PRESENCE			, NAM_PRESENCE				, aryMessage);
	checkNumber(PRM_TXT_PRESENCE_NUMBER		, NAM_PRESENCE_NUMBER		, aryMessage);
	checkNumber(PRM_TXT_WORK_HOUR			, NAM_WORK_TIME				, aryMessage);
	checkNumber(PRM_TXT_WORK_MIN			, NAM_WORK_TIME				, aryMessage);
	checkNumber(PRM_TXT_BREAK_HOUR			, NAM_BREAK_TIME			, aryMessage);
	checkNumber(PRM_TXT_BREAK_MIN			, NAM_BREAK_TIME			, aryMessage);
	checkNumeric(PRM_TXT_PAID_HOLIDAY		, ARY_HOLIDAY_REASON["0"][0]	, aryMessage);
	checkNumeric(PRM_TXT_PARTICULAR_HOLIDAY	, ARY_HOLIDAY_REASON["1"][0]	, aryMessage);
	checkNumeric(PRM_TXT_ABSENCE			, ARY_HOLIDAY_REASON["2"][0]	, aryMessage);
	checkNumeric(PRM_TXT_MEDICAL			, ARY_HOLIDAY_REASON["3"][0]	, aryMessage);
	checkNumeric(PRM_TXT_COMPENSATION_DAY	, ARY_HOLIDAY_REASON["4"][0]	, aryMessage);
	checkNumeric(PRM_TXT_TRANSFER			, ARY_HOLIDAY_REASON["5"][0]	, aryMessage);
	checkNumeric(PRM_TXT_OTHER				, NAM_OTHER					, aryMessage);
	checkNumber(PRM_TXT_LEAVE_AND_LATE		, NAM_LEAVE_AND_LATE		, aryMessage);
	checkNumber(PRM_TXT_LEAVE_AND_LATE_HOUR	, NAM_LEAVE_AND_LATE_TIME	, aryMessage);
	checkNumber(PRM_TXT_LEAVE_AND_LATE_MIN	, NAM_LEAVE_AND_LATE_TIME	, aryMessage);
	checkNumber(PRM_TXT_OVER_HOUR			, NAM_OVER_TIME				, aryMessage);
	checkNumber(PRM_TXT_OVER_MIN			, NAM_OVER_TIME				, aryMessage);
	checkNumber(PRM_TXT_WORK_ON_HOLIDAY_HOUR, NAM_WORK_ON_HOLIDAY_TIME	, aryMessage);
	checkNumber(PRM_TXT_WORK_ON_HOLIDAY_MIN	, NAM_WORK_ON_HOLIDAY_TIME	, aryMessage);
	checkNumber(PRM_TXT_LATE_NIGHT_HOUR		, NAM_LATE_NIGHT_TIME		, aryMessage);
	checkNumber(PRM_TXT_LATE_NIGHT_MIN		, NAM_LATE_NIGHT_TIME		, aryMessage);
	checkNumber(PRM_TXT_SYOKUJI				, ARY_ALLOWANCE["09"][0]		, aryMessage);
	checkNumber(PRM_TXT_CYOKU1				, ARY_ALLOWANCE["10"][0]		, aryMessage);
	checkNumber(PRM_TXT_CYOKU2				, ARY_ALLOWANCE["11"][0]		, aryMessage);
	checkNumber(PRM_TXT_CYOKU3				, ARY_ALLOWANCE["12"][0]		, aryMessage);
	checkNumber(PRM_TXT_HOKA1				, ARY_ALLOWANCE["13"][0]		, aryMessage);
	checkNumber(PRM_TXT_HOKA2				, ARY_ALLOWANCE["14"][0]		, aryMessage);
	checkNumber(PRM_TXT_HOKA3				, ARY_ALLOWANCE["15"][0]		, aryMessage);
	checkNumber(PRM_TXT_HOKA4				, ARY_ALLOWANCE["16"][0]		, aryMessage);
	checkNumber(PRM_TXT_HOKA5				, ARY_ALLOWANCE["17"][0]		, aryMessage);

	if (NAM_HOLIDAY_REASON_6 != "") {
		checkRequired(PRM_TXT_HOLIDAY_REASON_6	, NAM_HOLIDAY_REASON_6	, aryMessage);
		checkNumeric(PRM_TXT_HOLIDAY_REASON_6	, NAM_HOLIDAY_REASON_6	, aryMessage);
	}
	if (NAM_HOLIDAY_REASON_7 != "") {
		checkRequired(PRM_TXT_HOLIDAY_REASON_7	, NAM_HOLIDAY_REASON_7	, aryMessage);
		checkNumeric(PRM_TXT_HOLIDAY_REASON_7	, NAM_HOLIDAY_REASON_7	, aryMessage);
	}
	if (NAM_HOLIDAY_REASON_8 != "") {
		checkRequired(PRM_TXT_HOLIDAY_REASON_8	, NAM_HOLIDAY_REASON_8	, aryMessage);
		checkNumeric(PRM_TXT_HOLIDAY_REASON_8	, NAM_HOLIDAY_REASON_8	, aryMessage);
	}
	if (NAM_HOLIDAY_REASON_9 != "") {
		checkRequired(PRM_TXT_HOLIDAY_REASON_9	, NAM_HOLIDAY_REASON_9	, aryMessage);
		checkNumeric(PRM_TXT_HOLIDAY_REASON_9	, NAM_HOLIDAY_REASON_9	, aryMessage);
	}
	
	checkRequired(PRM_TXT_WARIMASHI_1_HOUR			, NAM_WARIMASHI_1				, aryMessage);	
	checkRequired(PRM_TXT_WARIMASHI_1_MIN			, NAM_WARIMASHI_1				, aryMessage);	
	checkRequired(PRM_TXT_WEEKDAY_OVER_HOUR			, NAM_WEEKDAY_OVER_HOUR			, aryMessage);
	checkRequired(PRM_TXT_WEEKDAY_OVER_MIN			, NAM_WEEKDAY_OVER_MIN			, aryMessage);
	checkRequired(PRM_TXT_WEEK_HOLIDAY_OVER_HOUR	, NAM_WEEK_HOLIDAY_OVER_HOUR	, aryMessage);
	checkRequired(PRM_TXT_WEEK_HOLIDAY_OVER_MIN		, NAM_WEEK_HOLIDAY_OVER_MIN		, aryMessage);
	
	checkNumber(PRM_TXT_WARIMASHI_1_HOUR			, NAM_WARIMASHI_1				, aryMessage);	
	checkNumber(PRM_TXT_WARIMASHI_1_MIN				, NAM_WARIMASHI_1				, aryMessage);	
	checkNumber(PRM_TXT_WEEKDAY_OVER_HOUR			, NAM_WEEKDAY_OVER_HOUR			, aryMessage);
	checkNumber(PRM_TXT_WEEKDAY_OVER_MIN			, NAM_WEEKDAY_OVER_MIN			, aryMessage);
	checkNumber(PRM_TXT_WEEK_HOLIDAY_OVER_HOUR		, NAM_WEEK_HOLIDAY_OVER_HOUR	, aryMessage);
	checkNumber(PRM_TXT_WEEK_HOLIDAY_OVER_MIN		, NAM_WEEK_HOLIDAY_OVER_MIN		, aryMessage);

	checkTimeValue(PRM_TXT_WORK_HOUR				, PRM_TXT_WORK_MIN				, 999	, NAM_WORK_TIME				, aryMessage);
	checkTimeValue(PRM_TXT_BREAK_HOUR				, PRM_TXT_BREAK_MIN				, 99	, NAM_BREAK_TIME			, aryMessage);
	checkTimeValue(PRM_TXT_LEAVE_AND_LATE_HOUR		, PRM_TXT_LEAVE_AND_LATE_MIN	, 99	, NAM_LEAVE_AND_LATE_TIME	, aryMessage);
	checkTimeValue(PRM_TXT_OVER_HOUR				, PRM_TXT_OVER_MIN				, 99	, NAM_OVER_TIME				, aryMessage);
	checkTimeValue(PRM_TXT_WORK_ON_HOLIDAY_HOUR		, PRM_TXT_WORK_ON_HOLIDAY_MIN	, 99	, NAM_WORK_ON_HOLIDAY_TIME	, aryMessage);
	checkTimeValue(PRM_TXT_LATE_NIGHT_HOUR			, PRM_TXT_LATE_NIGHT_MIN		, 99	, NAM_LATE_NIGHT_TIME		, aryMessage);
	checkTimeValue(PRM_TXT_WARIMASHI_1_HOUR			, PRM_TXT_WARIMASHI_1_MIN		, 99	, NAM_WARIMASHI_1			, aryMessage);
	checkTimeValue(PRM_TXT_WEEKDAY_OVER_HOUR		, PRM_TXT_WEEKDAY_OVER_MIN		, 99	, NAM_WEEKDAY_OVER			, aryMessage);
	checkTimeValue(PRM_TXT_WEEK_HOLIDAY_OVER_HOUR	, PRM_TXT_WEEK_HOLIDAY_OVER_MIN	, 99	, NAM_WEEK_HOLIDAY_OVER		, aryMessage);

	// 時間単位年休
	if (HOUR_HOLIDAY) {
		checkRequired(PRM_TXT_HOUR_HOLIDAY			, NAM_HOUR_HOLIDAY		, aryMessage);
		checkNumber(PRM_TXT_HOUR_HOLIDAY		, NAM_HOUR_HOLIDAY		, aryMessage);
		if( ( getFormValue(PRM_TXT_HOUR_HOLIDAY) % HOUR_PAID_HOLIDAY ) != 0 ){
			setBgColor(PRM_TXT_HOUR_HOLIDAY, COLOR_FIELD_ERROR);
			aryMessage.push(getMessage("WT0001" , "" ));
		}
	}
	// 代休
	if (SUBSTITUTE) {
		checkRequired(PRM_TXT_SUBSTITUTE_HOLIDAY		, NAM_SUBSTITUTE_HOLIDAY		, aryMessage);
		checkNumeric(PRM_TXT_SUBSTITUTE_HOLIDAY			, NAM_SUBSTITUTE_HOLIDAY		, aryMessage);
	}
	// 月60時間
	if (OVER_60_HOUR) {
		checkRequired(PRM_TXT_MONTHLY_OVER_HOUR			, NAM_MONTHLY_OVER_HOUR			, aryMessage);
		checkRequired(PRM_TXT_MONTHLY_OVER_MIN			, NAM_MONTHLY_OVER_MIN			, aryMessage);	
		checkRequired(PRM_TXT_MONTHLY_WEEK_HOLIDAY_HOUR	, NAM_MONTHLY_WEEK_HOLIDAY_HOUR	, aryMessage);
		checkRequired(PRM_TXT_MONTHLY_WEEK_HOLIDAY_MIN	, NAM_MONTHLY_WEEK_HOLIDAY_MIN	, aryMessage);
		checkNumber(PRM_TXT_MONTHLY_OVER_HOUR			, NAM_MONTHLY_OVER_HOUR			, aryMessage);
		checkNumber(PRM_TXT_MONTHLY_OVER_MIN			, NAM_MONTHLY_OVER_MIN			, aryMessage);	
		checkNumber(PRM_TXT_MONTHLY_WEEK_HOLIDAY_HOUR	, NAM_MONTHLY_WEEK_HOLIDAY_HOUR	, aryMessage);
		checkNumber(PRM_TXT_MONTHLY_WEEK_HOLIDAY_MIN	, NAM_MONTHLY_WEEK_HOLIDAY_MIN	, aryMessage);
		checkTimeValue(PRM_TXT_MONTHLY_OVER_HOUR		, PRM_TXT_MONTHLY_OVER_MIN			, 99, NAM_MONTHLY_OVER			, aryMessage);
		checkTimeValue(PRM_TXT_MONTHLY_WEEK_HOLIDAY_HOUR, PRM_TXT_MONTHLY_WEEK_HOLIDAY_MIN	, 99, NAM_MONTHLY_WEEK_HOLIDAY	, aryMessage);
	}
	
	if (aryMessage.length == 0) {
		return true;
	} else {
		showMessage(aryMessage);
		return false;
	}

}

function setOverTimeBgColor() {
	// 警告
	if (CAUTION) {
		setBgColor(PRM_TXT_OVER_HOUR, 'yellow');
		setBgColor(PRM_TXT_OVER_MIN, 'yellow');
	}
	// 超過
	if (WARNING) {
		setBgColor(PRM_TXT_OVER_HOUR, '#cc0000');
		setColor(PRM_TXT_OVER_HOUR, 'white');
		setBgColor(PRM_TXT_OVER_MIN, '#cc0000');
		setColor(PRM_TXT_OVER_MIN, 'white');
		
		setBgColor(PRM_TXT_MONTHLY_OVER_HOUR, '#cc0000');
		setColor(PRM_TXT_MONTHLY_OVER_HOUR, 'white');
		setBgColor(PRM_TXT_MONTHLY_OVER_MIN, '#cc0000');
		setColor(PRM_TXT_MONTHLY_OVER_MIN, 'white');
		
		setBgColor(PRM_TXT_MONTHLY_WEEK_HOLIDAY_HOUR, '#cc0000');
		setColor(PRM_TXT_MONTHLY_WEEK_HOLIDAY_HOUR, 'white');
		setBgColor(PRM_TXT_MONTHLY_WEEK_HOLIDAY_MIN, '#cc0000');
		setColor(PRM_TXT_MONTHLY_WEEK_HOLIDAY_MIN, 'white');
	}
}
