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 = "";
function init1(ar,cu,ct) {
//パラメータがあればそれをグローバル変数に保存しておく
param_homenG = ar;
param_homen1 = cu;
param_city1 = ct;
document.STSRC.homen1.options.length = 1 ;
document.STSRC.city1.options.length = 1 ;
document.STSRC.homen1.options[0].value = "";
document.STSRC.homen1.options[0].text = "方面(すべて)";
document.STSRC.city1.options[0].value= "";
document.STSRC.city1.options[0].text= "都市(すべて)";
//地域パラメータがあればそれを選択
if (param_homenG != null) {
for(i=0; i<=document.STSRC.homenG1.length; i++) {
if (document.STSRC.homenG1.options[i].value == param_homenG) {
param_homenG = null;
document.STSRC.homenG1.options[i].selected = true;
loadJS1();
break;
}
}
} else {
document.STSRC.homenG1.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.homen1.options.length = 1;
document.STSRC.city1.options.length = 1;
for( i = 0; i < houmens.length; i++ ){
document.STSRC.homen1.options[i+1] = new Option( houmens[i].name, houmens[i].value );
}
//国、エリアパラメータがあればそれを選択
if (param_homen1 != null) {
for(i=0; i<=document.STSRC.homen1.length; i++) {
if (document.STSRC.homen1.options[i].value == param_homen1) {
param_homen1 = null;
document.STSRC.homen1.options[i].selected = true;
selectHoumen1();
break;
}
}
} else {
document.STSRC.homen1.options[0].selected = true;
document.STSRC.city1.options[0].selected = true;
}
if (navigator.appName == "Netscape") {
//history.go(0);
}
}
function selectHoumen1() {
document.STSRC.city1.options.length = 1 ;
var idx = document.STSRC.homen1.options.selectedIndex;
var idx2 = document.STSRC.homenG2.options.selectedIndex;
var idx3 = document.STSRC.homenG3.options.selectedIndex;
if (idx > 0) {
document.STSRC.city1.options.length = houmens[idx-1].cities.length + 1;
for( i = 0; i < houmens[idx-1].cities.length; i++ ){
document.STSRC.city1.options[i+1] = new Option( houmens[idx-1].cities[i].name, houmens[idx-1].cities[i].value );
}
}
//都市パラメータがあればそれを選択
if (param_city1 != null) {
for(i=0; i<=document.STSRC.city1.length; i++) {
if (document.STSRC.city1.options[i].value == param_city1) {
param_city1 = null;
document.STSRC.city1.options[i].selected = true;
break;
}
}
} else {
document.STSRC.city1.options[0].selected = true;
}
}
function selectCity1()
{
var idx = document.STSRC.homen1.options.selectedIndex;
var idx2 = document.STSRC.city1.options.selectedIndex;
var idx3 = document.STSRC.homenG2.options.selectedIndex;
var idx4 = document.STSRC.homenG3.options.selectedIndex;
}
//動的に地域別jsファイルを読み込む
function loadJS1() {
if (document.STSRC.homenG1.selectedIndex > 0) {
dynamicLoad(document.STSRC.homenG1.options[document.STSRC.homenG1.selectedIndex].value,1);
} else {
document.STSRC.homen1.options.length = 1;
document.STSRC.city1.options.length = 1;
document.STSRC.homen1.options[0].selected = true;
document.STSRC.city1.options[0].selected = true;
}
}
function init2(ar,cu,ct) {
//パラメータがあればそれをグローバル変数に保存しておく
param_homenG2 = ar;
param_homen2 = cu;
param_city2 = ct;
document.STSRC.homen2.options.length = 1 ;
document.STSRC.city2.options.length = 1 ;
document.STSRC.homen2.options[0].value = "";
document.STSRC.homen2.options[0].text = "方面(すべて)";
document.STSRC.city2.options[0].value= "";
document.STSRC.city2.options[0].text= "都市(すべて)";
//地域パラメータがあればそれを選択
if (param_homenG2 != null) {
for(i=0; i<=document.STSRC.homenG2.length; i++) {
if (document.STSRC.homenG2.options[i].value == param_homenG2) {
param_homenG2 = null;
document.STSRC.homenG2.options[i].selected = true;
loadJS2();
break;
}
}
} else {
document.STSRC.homenG2.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.homen2.options.length = 1;
document.STSRC.city2.options.length = 1;
document.STSRC.homen2.options.length = houmens.length + 1;
for( i = 0; i < houmens.length; i++ ){
document.STSRC.homen2.options[i+1] = new Option( houmens[i].name, houmens[i].value );
}
//国、エリアパラメータがあればそれを選択
if (param_homen2 != null) {
for(i=0; i<=document.STSRC.homen2.length; i++) {
if (document.STSRC.homen2.options[i].value == param_homen2) {
param_homen2 = null;
document.STSRC.homen2.options[i].selected = true;
selectHoumen2();
break;
}
}
} else {
document.STSRC.homen2.options[0].selected = true;
document.STSRC.city2.options[0].selected = true;
}
if (navigator.appName == "Netscape") {
//history.go(0);
}
}
function selectHoumen2() {
document.STSRC.city2.options.length = 1 ;
var idx = document.STSRC.homen2.options.selectedIndex;
if (idx > 0) {
document.STSRC.city2.options.length = houmens[idx-1].cities.length + 1;
for( i = 0; i < houmens[idx-1].cities.length; i++ ){
document.STSRC.city2.options[i+1] = new Option( houmens[idx-1].cities[i].name, houmens[idx-1].cities[i].value );
}
}
//都市パラメータがあればそれを選択
if (param_city2 != null) {
for(i=0; i<=document.STSRC.city2.length; i++) {
if (document.STSRC.city2.options[i].value == param_city2) {
param_city2 = null;
document.STSRC.city2.options[i].selected = true;
break;
}
}
} else {
document.STSRC.city2.options[0].selected = true;
}
}
function selectCity2()
{
}
//動的に地域別jsファイルを読み込む
function loadJS2() {
if (document.STSRC.homenG2.selectedIndex > 0) {
dynamicLoad(document.STSRC.homenG2.options[document.STSRC.homenG2.selectedIndex].value,2);
} else {
document.STSRC.homen2.options.length = 1;
document.STSRC.city2.options.length = 1;
document.STSRC.homen2.options[0].selected = true;
document.STSRC.city2.options[0].selected = true;
}
}
function init3(ar,cu,ct) {
//パラメータがあればそれをグローバル変数に保存しておく
param_homenG3 = ar;
param_homen3 = cu;
param_city3 = ct;
document.STSRC.homen3.options.length = 1 ;
document.STSRC.city3.options.length = 1 ;
document.STSRC.homen3.options[0].value = "";
document.STSRC.homen3.options[0].text = "方面(すべて)";
document.STSRC.city3.options[0].value= "";
document.STSRC.city3.options[0].text= "都市(すべて)";
//地域パラメータがあればそれを選択
if (param_homenG3 != null) {
for(i=0; i<=document.STSRC.homenG3.length; i++) {
if (document.STSRC.homenG3.options[i].value == param_homenG3) {
param_homenG3 = null;
document.STSRC.homenG3.options[i].selected = true;
loadJS3();
break;
}
}
} else {
document.STSRC.homenG3.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.homen3.options.length = 1;
document.STSRC.city3.options.length = 1;
document.STSRC.homen3.options.length = houmens.length + 1;
for( i = 0; i < houmens.length; i++ ){
document.STSRC.homen3.options[i+1] = new Option( houmens[i].name, houmens[i].value );
}
//国、エリアパラメータがあればそれを選択
if (param_homen3 != null) {
for(i=0; i<=document.STSRC.homen3.length; i++) {
if (document.STSRC.homen3.options[i].value == param_homen3) {
param_homen3 = null;
document.STSRC.homen3.options[i].selected = true;
selectHoumen3();
break;
}
}
} else {
document.STSRC.homen3.options[0].selected = true;
document.STSRC.city3.options[0].selected = true;
}
if (navigator.appName == "Netscape") {
//history.go(0);
}
}
function selectHoumen3() {
document.STSRC.city3.options.length = 1 ;
var idx = document.STSRC.homen3.options.selectedIndex;
if (idx > 0) {
document.STSRC.city3.options.length = houmens[idx-1].cities.length + 1;
for( i = 0; i < houmens[idx-1].cities.length; i++ ){
document.STSRC.city3.options[i+1] = new Option( houmens[idx-1].cities[i].name, houmens[idx-1].cities[i].value );
}
}
//都市パラメータがあればそれを選択
if (param_city3 != null) {
for(i=0; i<=document.STSRC.city3.length; i++) {
if (document.STSRC.city3.options[i].value == param_city3) {
param_city3 = null;
document.STSRC.city3.options[i].selected = true;
break;
}
}
} else {
document.STSRC.city3.options[0].selected = true;
}
}
function selectCity3()
{
}
//動的に地域別jsファイルを読み込む
function loadJS3() {
if (document.STSRC.homenG3.selectedIndex > 0) {
dynamicLoad(document.STSRC.homenG3.options[document.STSRC.homenG3.selectedIndex].value,3);
} else {
document.STSRC.homen3.options.length = 1;
document.STSRC.city3.options.length = 1;
document.STSRC.homen3.options[0].selected = true;
document.STSRC.city3.options[0].selected = true;
}
}