// ===============================
// オプション定義配列の作成
// function DefOptions(){
//     :// ******************************
//     :// ここにオプション内容を定義する
//     :// ******************************
// }
// ===============================
options   = new DefOptions(); // オプション定義配列
loadedOpt = 0;                // 現在選択中の配列要素番号
// ======================================================
// 各オプションの定義( 実体 )
function Opt(text,value){
  this.text  = text;
  this.value = value;
}
// オプション定義変更関数( 共通 )
function loadOption(obj,n,val){
  if(n<0 || n>=options.length){
    alert('loadOption: illeagal parameter('+obj.name+','+n+')');
    return;
  }
  var ot = obj.options;
  var os = options[n];
  ot.length = os.length;
  for (var i=0; i<os.length; i++) {
    ot[i] = new Option(os[i].text,os[i].value,false,false);
    // 指定されたのオプションを選択状態にする
    if(val==os[i].value) {
      ot[i].selected=true;
    }
  }

  loadedOpt = n;
}

// ===============================
// オプション定義配列の作成
function Pref0(){
  var i=0;
  this[i++] = new Opt('▼地区を選択して下さい',    '0');
  this.length = i;
  return this;
}

function DefOptions(){
  var i=0;
  this[i++] = new Pref0();
  this[i++] = new Pref1();
  this[i++] = new Pref2();
  this[i++] = new Pref3();
  this[i++] = new Pref4();
  this[i++] = new Pref5();
  this[i++] = new Pref6();
  this[i++] = new Pref7();
  this[i++] = new Pref8();
  this[i++] = new Pref9();
  this[i++] = new Pref10();
  this[i++] = new Pref11();
  this[i++] = new Pref12();
  this[i++] = new Pref13();
  this[i++] = new Pref14();
  this[i++] = new Pref15();
  this[i++] = new Pref16();
  this[i++] = new Pref17();
  this[i++] = new Pref18();
  this[i++] = new Pref19();
  this[i++] = new Pref20();
  this[i++] = new Pref21();
  this[i++] = new Pref22();
  this[i++] = new Pref23();
  this[i++] = new Pref24();
  this[i++] = new Pref25();
  this[i++] = new Pref26();
  this[i++] = new Pref27();
  this[i++] = new Pref28();
  this[i++] = new Pref29();
  this[i++] = new Pref30();
  this[i++] = new Pref31();
  this[i++] = new Pref32();
  this[i++] = new Pref33();
  this[i++] = new Pref34();
  this[i++] = new Pref35();
  this[i++] = new Pref36();
  this[i++] = new Pref37();
  this[i++] = new Pref38();
  this[i++] = new Pref39();
  this[i++] = new Pref40();
  this[i++] = new Pref41();
  this[i++] = new Pref42();
  this[i++] = new Pref43();
  this[i++] = new Pref44();
  this[i++] = new Pref45();
  this[i++] = new Pref46();
  this[i++] = new Pref47();
  this.length = i;
  return this;
}
// ===============================
options   = new DefOptions(); // オプション定義配列

// 初期化関数
function init(){
  loadOption(document.forms('pcond').ndistid,loadedOpt,0);
}
// オプション変更関数
function changeOpt(sel,num,val){
  loadOption(sel,num,val);
}


