/*
 * MosP - Mind Open Source Project         http://www.mosp.jp/
 * Copyright (C) 1987-2009 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.
 */
// メニューボタンID prefix
var ID_SUB_BUTTON  = "btnSub";
var ID_MAIN_BUTTON = "btnMain";

// ボタン文字色
var COLOR_MENU_NORMAL   = "black";
var COLOR_MENU_SELECTED = "red";

// サブメニューボタン名定数 
/*
var NAM_MENU_INPUT = new Array(
	"勤怠入力",
	"スケジュール",
	"有休確認",
	
	"パスワード変更"
); 

var NAM_MENU_MANAGE = new Array(
	"社員一覧",
	"承認処理"
);

var NAM_MENU_PAYROLL = new Array(
	"勤怠計算",
	"有休管理"
);

var NAM_MENU_HUMAN = new Array(
	"社員一覧",
	"社員新規登録",
	"人事アップロード"
);
var NAM_MENU_SYSTEM = new Array(
	"勤怠計算情報",
	"エクスポート"
);

var NAM_MENU_SYSTEM2 = new Array(
	"事業所マスタ保守",
	"所属マスタ保守",
	"役職マスタ保守",
	
	"勤怠情報設定",
	"各種理由設定",
	"有休情報設定",	

	"勤務形態マスタ保守",
	"祝祭日マスタ保守",
	"アカウント管理",
	
	"パスワード変更",
	"コードマスタ保守",
	"共通コード保守",
	
	"承認情報設定",
	"オプション保守"

);

// サブメニューコマンド定数
var CMD_MENU_INPUT = new Array(
	"K1010",
	"K1200",
	"K1300",
	
	"C1050"
);

var CMD_MENU_MANAGE = new Array(
	"K2010",
	"K2100"
);

var CMD_MENU_PAYROLL = new Array(
	"P1010",
	"P1110"
);

var CMD_MENU_HUMAN = new Array(
	"H1010",
	"H1020",
	"H1040"
);
var CMD_MENU_SYSTEM = new Array(
	"S1100",
	"S1200"
);
var CMD_MENU_SYSTEM2 = new Array(
	"S2010",
	"S2100",
	"S2200",
	
	"S2500",
	"S2590",
	"S2700",	

	"S2600",
	"S2710",
	"S2400",

	"C1050",	
	"S2300",
	"S2000",
	
	"S2800",
	"O9910"
);

// メインメニュー利用可否フラグ
var aryAvailableMenu;

// 選択メインメニューフラグ
var numMenuFlag = 0;

// サブメニューコマンド格納用配列
var arySubMenu;
*/

/**
 * 画面読込時追加処理
 * @param 無し
 * @return 無し
 * @throws 実行時例外
 */
function onLoadExtra() {
	// メインメニュー利用可否設定
/**	for (var i = 0; i < aryAvailableMenu.length; i++) {
		setFieldsVisibility(ID_MAIN_BUTTON + String(i), aryAvailableMenu[i]);
	}
	// メニュー設定
	setMenu();
*/
	if (MODE == 1) {
		setObjectVisibility("btnGuide" , false);
	}
}

/**
 * メニュー設定
 * @param numMenuId
 * @return 無し
 * @throws 実行時例外
 *//**
function showSubMenu(numMenuId) {
	numMenuFlag = numMenuId;
	setMenu();
	
} */

/**
 * メニュー設定
 * @param 無し
 * @return 無し
 * @throws 実行時例外
 */
function setMenu() {
	// メニューの初期化
	setFieldsInnerHtml(ID_SUB_BUTTON + "%", "");
	setFieldsVisibility(ID_SUB_BUTTON + "%", false);
	setFieldsColor(ID_MAIN_BUTTON + "%", COLOR_MENU_NORMAL);
	setFieldsColor(ID_SUB_BUTTON + "%", COLOR_MENU_NORMAL);
/**		
	// メニューの設定
	setColor(ID_MAIN_BUTTON + String(numMenuFlag - 1), COLOR_MENU_SELECTED);
	switch (numMenuFlag) {
		case 1:
			arySubMenu = CMD_MENU_INPUT;
			setMenuName(NAM_MENU_INPUT);
			break;
		case 2:
			arySubMenu = CMD_MENU_MANAGE;
			setMenuName(NAM_MENU_MANAGE);
			break;
		case 3:
			arySubMenu = CMD_MENU_PAYROLL;
			setMenuName(NAM_MENU_PAYROLL);
			break;
		case 4:
			arySubMenu = CMD_MENU_HUMAN;
			setMenuName(NAM_MENU_HUMAN);
			break;
		case 5:
			arySubMenu = CMD_MENU_SYSTEM;
			setMenuName(NAM_MENU_SYSTEM);
			break;
		case 6:
			arySubMenu = CMD_MENU_SYSTEM2;
			setMenuName(NAM_MENU_SYSTEM2);
			break;
		default:
			arySubMenu = new Array();
	}*/
}

/**
 * メニューボタン名設定
 * @param 無し
 * @return 無し
 * @throws 実行時例外
 */
function setMenuName(aryMenuName) {
/**	var strTargetId;
	for (var i = 0; i < aryMenuName.length; i++) {
		strTargetId = ID_SUB_BUTTON + String(i);
		setVisibility(strTargetId, true);
		setInnerHtml(strTargetId, aryMenuName[i]);
	} */
}
