// JavaScript Document
<!--
/********************************************************************
 *  外部変数
 *******************************************************************/
var submitFlg = 0;			// 二度押し禁止用フラグ

/********************************************************************
 *  function : 共通サブミット処理
 *  引数：	action						遷移先のプログラム名
/*******************************************************************/
function submitForm (action)
{
    // Safariブラウザでの空POST防止
    if (action == null) {
        return false;
    }

    if (submitFlg == 0) {
        submitFlg = 1;
        document.hnbs_form.action = action;
        document.hnbs_form.submit();

    }
}

/********************************************************************
 *  function : 共通サブミット処理
 *  引数：	action						遷移先のプログラム名
 *  引数：	name						受け渡し情報
/*******************************************************************/
function submitFormSelId (action, name)
{
    // Safariブラウザでの空POST防止
    if (action == null) {
        return false;
    }

    document.hnbs_form.sel_id.value = name;
    submitForm(action);

}


/********************************************************************
 *  function : 一覧ボタン選択チェック
 *  引数：    name                       フォーム名
/*******************************************************************/
function checkSelectList (name) {
    var i;
    var object = document.hnbs_form.elements[name];

    if (object == null) {
        return false;
    }

    var proc_flg = false;

    // 複数行の場合
    if (object.length) {
        for (i = 0; i < object.length; i++) {
            if (object[i].checked == true) {
                // 処理実行
                proc_flg = true;
                break;
            }
        }
    // 1行の場合
    } else {
        if (object.checked == true) {
            // 処理実行
            proc_flg = true;
        }
    }

    return proc_flg;
}

/********************************************************************
 *  function : 一覧削除ボタン押下処理
 *  引数：    name                       フォーム名
 *  引数：    action                     遷移先のプログラム名
/*******************************************************************/
function submitListDelete (name, action)
{
    var proc_flg = checkSelectList(name);

    // チェック有りの場合のみサブミット
    if (proc_flg) {
        submitForm(action);
    }
}

/********************************************************************
 *  function : テキストエリアにセレクトボックスの値を追加
 *  引数：    item                       選択されたセレクトボックスの値
 *  戻り値：  value                      テキストボックスに表示する値
/*******************************************************************/
function setTextArea ()
{

mySelect = document.hnbs_form.hnbs_select.selectedIndex
replace_str = document.hnbs_form.hnbs_select.options[mySelect].value;

document.hnbs_form.f_body.value += replace_str; 
    
}




//////////////////////////////////////////////////////////////////////////////
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}








//-->