var param_ar1 = ""; var param_cu1 = ""; var param_ct1 = ""; var param_ar2 = ""; var param_cu2 = ""; var param_ct2 = ""; var param_ar3 = ""; var param_cu3 = ""; var param_ct3 = ""; var param_al = ""; var param_htl = ""; function init(ar,cu,ct) { //パラメータがあればそれをグローバル変数に保存しておく param_ar1 = ar; param_cu1 = cu; param_ct1 = ct; document.STSRC.homen.options.length = 1 ; document.STSRC.city.options.length = 1 ; if ( document.STSRC.brand_cd.value == "SJ" ){ document.STSRC.homen.options[0].value = ""; document.STSRC.homen.options[0].text = "都道府県(すべて)"; document.STSRC.city.options[0].value= ""; document.STSRC.city.options[0].text= "市区町村(すべて)"; }else{ document.STSRC.homen.options[0].value = ""; document.STSRC.homen.options[0].text = "方面(すべて)"; document.STSRC.city.options[0].value= ""; document.STSRC.city.options[0].text= "都市(すべて)"; } //地域パラメータがあればそれを選択 if (param_ar1 != '') { for(i=0; i<=document.STSRC.homenG.length; i++) { if (document.STSRC.homenG.options[i].value == param_ar1) { param_ar1 = null; document.STSRC.homenG.options[i].selected = true; loadJS1(); break; } } } else { document.STSRC.homenG.options[0].selected = true; //document.STSRC.cu.options[0].selected = true; //document.STSRC.ct.options[0].selected = true; } } function Houmen1(name, value, cities, num , airlines, airnum , hotels, htlnum ) { this.name = name ; this.value = value ; this.cities = cities; this.num = num; this.airlines = airlines; this.airnum = airnum; this.hotels = hotels; this.htlnum = htlnum; } function City1(name, value , cityname1 , cityname2 ) { this.name = name; this.value = value; this.cityname1 = cityname1; this.cityname2 = cityname2; } function Air(name, value) { this.name = name; this.value = value; } function Hotel(name, value , cityname ) { this.name = name; this.value = value; this.cityname = cityname; } function selectHoumenG1() { document.STSRC.homen.options.length = 1; document.STSRC.city.options.length = 1; document.STSRC.homen.options.length = houmens.length + 1; for( i = 0; i < houmens.length; i++ ){ document.STSRC.homen.options[i+1] = new Option( houmens[i].name, houmens[i].value ); } //国、エリアパラメータがあればそれを選択 if (param_cu1 != null) { for(i=0; i<=document.STSRC.homen.length; i++) { if (document.STSRC.homen.options[i].value == param_cu1) { param_cu1 = null; document.STSRC.homen.options[i].selected = true; selectHoumen1(); break; } } } else { document.STSRC.homen.options[0].selected = true; document.STSRC.city.options[0].selected = true; } if (navigator.appName == "Netscape") { //history.go(0); } } function selectHoumen1() { document.STSRC.city.options.length = 1 ; var idx = document.STSRC.homen.options.selectedIndex; if (idx > 0) { document.STSRC.city.options.length = houmens[idx-1].cities.length + 1; for( i = 0; i < houmens[idx-1].cities.length; i++ ){ document.STSRC.city.options[i+1] = new Option( houmens[idx-1].cities[i].name, houmens[idx-1].cities[i].value ); } } //都市パラメータがあればそれを選択 if (param_ct1 != null) { for(i=0; i<=document.STSRC.city.length; i++) { if (document.STSRC.city.options[i].value == param_ct1) { param_ct1 = null; document.STSRC.city.options[i].selected = true; break; } } } else { document.STSRC.city.options[0].selected = true; } } function selectCity1() { document.STSRC.htl.options.length = 1 ; var idx = document.STSRC.homen.options.selectedIndex; var idx2 = document.STSRC.city.options.selectedIndex; var idx3 = document.STSRC.ar2.options.selectedIndex; var idx4 = document.STSRC.ar3.options.selectedIndex; if ( idx3 == 0 && idx4 == 0 ){ if (idx2 > 0) { var cityname1 = houmens[idx-1].cities[idx2-1].cityname1; var cityname2 = houmens[idx-1].cities[idx2-1].cityname2; document.STSRC.htl.options.length = houmens[idx-1].hotels.length + 1; c = 0; for( i = 0; i < houmens[idx-1].hotels.length; i++ ){ if ( cityname1 == houmens[idx-1].hotels[i].cityname || cityname2 == houmens[idx-1].hotels[i].cityname ){ document.STSRC.htl.options[c+1] = new Option( houmens[idx-1].hotels[i].name, houmens[idx-1].hotels[i].value ); c++; } } document.STSRC.htl.options.length = c + 1; }else{ document.STSRC.htl.options.length = houmens[idx-1].hotels.length + 1; for( i = 0; i < houmens[idx-1].hotels.length; i++ ){ document.STSRC.htl.options[i+1] = new Option( houmens[idx-1].hotels[i].name, houmens[idx-1].hotels[i].value ); } } } } //動的に地域別jsファイルを読み込む function loadJS1() { //if (document.STSRC.homenG.selectedIndex > 0) { if ( document.STSRC.homenG.options[document.STSRC.homenG.selectedIndex].value ){ dynamicLoad(document.STSRC.homenG.options[document.STSRC.homenG.selectedIndex].value,1); } else { document.STSRC.homen.options.length = 1; document.STSRC.city.options.length = 1; document.STSRC.homen.options[0].selected = true; document.STSRC.city.options[0].selected = true; } } function init2(ar,cu,ct) { //パラメータがあればそれをグローバル変数に保存しておく param_ar2 = ar; param_cu2 = cu; param_ct2 = ct; document.STSRC.cu2.options.length = 1 ; document.STSRC.ct2.options.length = 1 ; document.STSRC.cu2.options[0].value = ""; document.STSRC.cu2.options[0].text = "方面(すべて)"; document.STSRC.ct2.options[0].value= ""; document.STSRC.ct2.options[0].text= "都市(すべて)"; //地域パラメータがあればそれを選択 if (param_ar2 != null) { for(i=0; i<=document.STSRC.ar2.length; i++) { if (document.STSRC.ar2.options[i].value == param_ar2) { param_ar2 = null; document.STSRC.ar2.options[i].selected = true; loadJS2(); break; } } } else { document.STSRC.ar2.options[0].selected = true; //document.STSRC.cu.options[0].selected = true; //document.STSRC.ct.options[0].selected = true; } } function Houmen2(name, value, cities, num ) { this.name = name ; this.value = value ; this.cities = cities; this.num = num; } function City2(name, value , cityname1 , cityname2 ) { this.name = name; this.value = value; this.cityname1 = cityname1; this.cityname2 = cityname2; } function selectHoumenG2() { document.STSRC.cu2.options.length = 1; document.STSRC.ct2.options.length = 1; document.STSRC.cu2.options.length = houmens.length + 1; for( i = 0; i < houmens.length; i++ ){ document.STSRC.cu2.options[i+1] = new Option( houmens[i].name, houmens[i].value ); } //国、エリアパラメータがあればそれを選択 if (param_cu2 != null) { for(i=0; i<=document.STSRC.cu2.length; i++) { if (document.STSRC.cu2.options[i].value == param_cu2) { param_cu2 = null; document.STSRC.cu2.options[i].selected = true; selectHoumen2(); break; } } } else { document.STSRC.cu2.options[0].selected = true; document.STSRC.ct2.options[0].selected = true; } if (navigator.appName == "Netscape") { //history.go(0); } } function selectHoumen2() { document.STSRC.ct2.options.length = 1 ; var idx = document.STSRC.cu2.options.selectedIndex; if (idx > 0) { document.STSRC.ct2.options.length = houmens[idx-1].cities.length + 1; for( i = 0; i < houmens[idx-1].cities.length; i++ ){ document.STSRC.ct2.options[i+1] = new Option( houmens[idx-1].cities[i].name, houmens[idx-1].cities[i].value ); } } //都市パラメータがあればそれを選択 if (param_ct2 != null) { for(i=0; i<=document.STSRC.ct2.length; i++) { if (document.STSRC.ct2.options[i].value == param_ct2) { param_ct2 = null; document.STSRC.ct2.options[i].selected = true; break; } } } else { document.STSRC.ct2.options[0].selected = true; } } function selectCity2() { } //動的に地域別jsファイルを読み込む function loadJS2() { if (document.STSRC.ar2.selectedIndex > 0) { dynamicLoad(document.STSRC.ar2.options[document.STSRC.ar2.selectedIndex].value,2); } else { document.STSRC.cu2.options.length = 1; document.STSRC.ct2.options.length = 1; document.STSRC.cu2.options[0].selected = true; document.STSRC.ct2.options[0].selected = true; } } function init3(ar,cu,ct) { //パラメータがあればそれをグローバル変数に保存しておく param_ar3 = ar; param_cu3 = cu; param_ct3 = ct; document.STSRC.cu3.options.length = 1 ; document.STSRC.ct3.options.length = 1 ; document.STSRC.cu3.options[0].value = ""; document.STSRC.cu3.options[0].text = "方面(すべて)"; document.STSRC.ct3.options[0].value= ""; document.STSRC.ct3.options[0].text= "都市(すべて)"; //地域パラメータがあればそれを選択 if (param_ar3 != null) { for(i=0; i<=document.STSRC.ar3.length; i++) { if (document.STSRC.ar3.options[i].value == param_ar3) { param_ar3 = null; document.STSRC.ar3.options[i].selected = true; loadJS3(); break; } } } else { document.STSRC.ar3.options[0].selected = true; //document.STSRC.cu.options[0].selected = true; //document.STSRC.ct.options[0].selected = true; } } function Houmen3(name, value, cities, num) { this.name = name ; this.value = value ; this.cities = cities; this.num = num; } function City3(name, value , cityname1 , cityname2 ) { this.name = name; this.value = value; this.cityname1 = cityname1; this.cityname2 = cityname2; } function selectHoumenG3() { document.STSRC.cu3.options.length = 1; document.STSRC.ct3.options.length = 1; document.STSRC.cu3.options.length = houmens.length + 1; for( i = 0; i < houmens.length; i++ ){ document.STSRC.cu3.options[i+1] = new Option( houmens[i].name, houmens[i].value ); } //国、エリアパラメータがあればそれを選択 if (param_cu3 != null) { for(i=0; i<=document.STSRC.cu3.length; i++) { if (document.STSRC.cu3.options[i].value == param_cu3) { param_cu3 = null; document.STSRC.cu3.options[i].selected = true; selectHoumen3(); break; } } } else { document.STSRC.cu3.options[0].selected = true; document.STSRC.ct3.options[0].selected = true; } if (navigator.appName == "Netscape") { //history.go(0); } } function selectHoumen3() { document.STSRC.ct3.options.length = 1 ; var idx = document.STSRC.cu3.options.selectedIndex; if (idx > 0) { document.STSRC.ct3.options.length = houmens[idx-1].cities.length + 1; for( i = 0; i < houmens[idx-1].cities.length; i++ ){ document.STSRC.ct3.options[i+1] = new Option( houmens[idx-1].cities[i].name, houmens[idx-1].cities[i].value ); } } //都市パラメータがあればそれを選択 if (param_ct3 != null) { for(i=0; i<=document.STSRC.ct3.length; i++) { if (document.STSRC.ct3.options[i].value == param_ct3) { param_ct3 = null; document.STSRC.ct3.options[i].selected = true; break; } } } else { document.STSRC.ct3.options[0].selected = true; } } function selectCity3() { } //動的に地域別jsファイルを読み込む function loadJS3() { if (document.STSRC.ar3.selectedIndex > 0) { dynamicLoad(document.STSRC.ar3.options[document.STSRC.ar3.selectedIndex].value,3); } else { document.STSRC.cu3.options.length = 1; document.STSRC.ct3.options.length = 1; document.STSRC.cu3.options[0].selected = true; document.STSRC.ct3.options[0].selected = true; } }