//*************************************************************
//システム名     コア物品／発注者
//サブシステム名 発注者
/**
 * 調達案件選択(取止め)画面
 * @author NEC
 * @version 1.0, 2002.07.23, 新規作成<BR>
 *          1.1, 2003.06.19, V3-結合-038対応<BR>
 *          4.0, 2004.04.13, V4-案件検索機能の強化<BR>
 */
//*************************************************************

/* HTML読込み時の初期処理 */
function onStart() {
  /*HTMLが読み込まれた際に、初期処理用関数を呼び出す*/

  onLoad();
}

/* 検索実行 */
function submitQuery() {

  document.formHPS00101.searchProjectNumber.value = document.formProject.searchProjectNumber.value;
  document.formHPS00101.searchProjectName.value = document.formProject.searchProjectName.value;
  document.formHPS00101.tenderMethodCode.value = document.formProject.tenderMethodCode.options[document.formProject.tenderMethodCode.selectedIndex].value;
  document.formHPS00101.officeNumber.value = document.formProject.officeName.options[document.formProject.officeName.selectedIndex].value;
  document.formHPS00101.searchSubmitDateFrom.value = document.formProject.searchSubmitDateFrom.value;
  document.formHPS00101.searchSubmitDateTo.value = document.formProject.searchSubmitDateTo.value;
  document.formHPS00101.searchExecuteDateFrom.value = document.formProject.searchExecuteDateFrom.value;
  document.formHPS00101.searchExecuteDateTo.value = document.formProject.searchExecuteDateTo.value;
  document.formHPS00101.projectStatusCode.value = document.formProject.projectStatusCode.options[document.formProject.projectStatusCode.selectedIndex].value;
  document.formHPS00101.nextListStartIndex.value = "1";
  document.formHPS00101.showRange.value = document.formProject.showRange.value;

  // 処理区分に0(新規検索)を設定
  document.formHPS00101.syoriKbn.value ="0";

  // 案件表示順序selectコンポーネント設定
  /* 案件表示順序コンボBOXの何番めが選択状態かを取得 */
  var n = document.formProject.sortNo.selectedIndex;
  /* 案件表示順序のN番目のvalue値を設定 */
  document.formHPS00101.sortNo.value = document.formProject.sortNo.options[n].value;

  // 昇順･降順radioコンポーネント設定
  if (document.formProject.sortFlag[0].checked) {
    document.formHPS00101.sortFlag.value = document.formProject.sortFlag[0].value;
  }else if (document.formProject.sortFlag[1].checked) {
    document.formHPS00101.sortFlag.value = document.formProject.sortFlag[1].value;
  }

  dispatch( document.formHPS00101, "H5031HPS001" );
}

/* 「次へ」「前へ」ボタン及びページインデックスによる遷移 */
function searchIndex(argIndex)
{
  //引数を表示開始位置に設定する
  document.formHPS00101.nextListStartIndex.value = argIndex

  // 処理区分に1(セッションの検索条件で検索, 表示開始位置のみ更新)を設定
  document.formHPS00101.syoriKbn.value ="1";

  dispatch( document.formHPS00101, "H5031HPS001" );
}

/* 調達案件情報照会画面表示 */
function popProject(arg) {
  document.formHPS00102.projectNumber.value =arg;
  document.formRegist = new Object();
  document.formRegist = document.formHPS00102;
  dispatchPopup( document.formHPS00102, "H509HPR005");
}

/* 取止め確認画面表示 */
function moveStopProject(projectNumber,pluralFlag,tenderExecuteCount,estimateExecuteCount) {
  document.formHPS00102.projectNumber.value=projectNumber;
  document.formHPS00102.pluralFlag.value=pluralFlag;
  document.formHPS00102.tenderExecuteCount.value=tenderExecuteCount;
  document.formHPS00102.estimateExecuteCount.value=estimateExecuteCount;
  dispatch( document.formHPS00102, "H5034HPS002" );
}
