/*
 * 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 );
	// 一覧背景色設定
	setTableColor("list");
	// 初期設定
	setFocus("");
	if (MODE == 0) {
		setVisibility("btnImport", false);
		setVisibility("btnReport", false);
	} else if (MODE == 1) {
		setVisibility("btnImport", true);
		setVisibility("btnReport", false);
	} else if (MODE == 2) {
		setVisibility("btnImport", false);
		setVisibility("btnReport", true);
	}
	setColumnWidth();
	if (TABLE == 0) {
		setObjectVisibility('list', false);
	}
}

/**
 * サーバー通信処理
 * @param 無し
 * @return 無し
 * @throws 実行時例外
 */
function submitForm(objForm, cmd) {
	doSubmitMessage(objForm, cmd, 'QC0001', '');
}

function setColumnWidth() {
	// 初期化
	setWidth('thColumn0', '100px');
	setWidth('thColumn1', '100px');
	setWidth('thColumn2', '100px');
	setWidth('thColumn3', '100px');
	setWidth('thColumn4', '100px');
	setWidth('thColumn5', '100px');
	setWidth('thColumn6', '100px');
	setWidth('thColumn7', '100px');
	setWidth('thColumn8', '100px');
	if (TABLE == 1) {
		setWidth('thColumn0', '100px');
		setWidth('thColumn1', '120px');
		setWidth('thColumn2', '115px');
		setWidth('thColumn3', '115px');
		setWidth('thColumn4', '75px');
		setWidth('thColumn5', '75px');
		setWidth('thColumn6', '75px');
		setWidth('thColumn7', '115px');
		setWidth('thColumn8', '115px');
	} else if (TABLE == 2) {
		setWidth('thColumn0', '90px');
		setWidth('thColumn1', '100px');
		setWidth('thColumn2', '90px');
		setWidth('thColumn3', '80px');
		setWidth('thColumn4', '115px');
		setWidth('thColumn5', '115px');
		setWidth('thColumn6', '115px');
		setWidth('thColumn7', '115px');
		setWidth('thColumn8', '160px');
	}
}
