var prefs = ["大阪市内","大阪府内","神戸市内","京都府内","滋賀県内","奈良県内","和歌山県内","四国内","予約センター","団体・法人","その他の専門部署"];
var cities = [
	["トラベルワンダーランド梅田","トラベルバザール東梅田","西梅田","北新地御堂筋","マップ梅田","本町","堺筋本町","トラベルバザール心斎橋","京橋駅前","トラベルバザールなんば","トラベルバザール天王寺"],
	["枚方","東大阪","堺東","茨木","高槻","千里中央","泉が丘","アリオ八尾","イオンモールりんくう泉南","イオンモール堺北花田"],
	["トラベルワンダーランド神戸","トラベルバザール阪急三宮駅","元町","御影クラッセ","アスピア明石","姫路","川西モザイクボックス","甲東園","ららぽーと甲子園"],
	["トラベルワンダーランド京都","京都ヨドバシ","四条河原町","マップ京都デスク"],
	["大津パルコ"],
	["奈良"],
	["和歌山"],
	["高松","松山","徳島","高知"],
	["関西予約センター","兵庫予約センター","奈良予約センター","滋賀予約センター","和歌山予約センター","モバイルセクション","国内旅行メディアセンター"],
	["大阪法人","大阪団体","京都法人","神戸法人","広島法人"],
	["アバンティ大阪","アバンティ神戸","アバンティ京都","エグゼクティブ","大阪NO1トラベル","スポーツ・イベントセクション","海外発券デスク"]
];

var c = [
	["./opentime.html\#トラベルワンダーランド梅田",
	 "./opentime.html\#トラベルバザール東梅田",
	 "./opentime.html\#西梅田",
	 "./opentime.html\#北新地御堂筋",
	 "./opentime.html\#マップ梅田",
	 "./opentime.html\#本町",
	 "./opentime.html\#堺筋本町",
  	 "./opentime.html\#トラベルバザール心斎橋",
	 "./opentime.html\#京橋駅前",
	 "./opentime.html\#トラベルバザールなんば",
	 "./opentime.html\#トラベルバザール天王寺"],	
	["./opentime.html\#枚方",
	 "./opentime.html\#東大阪",
	 "./opentime.html\#堺東",
	 "./opentime.html\#茨木",
	 "./opentime.html\#高槻",
	 "./opentime.html\#千里中央",
	 "./opentime.html\#泉が丘",
	 "./opentime.html\#アリオ八尾",
	 "./opentime.html\#イオンモールりんくう泉南",
	 "./opentime.html\#イオンモール堺北花田"],
	["./opentime.html\#トラベルワンダーランド神戸",
	 "./opentime.html\#トラベルバザール阪急三宮駅",
	 "./opentime.html\#元町",
	 "./opentime.html\#御影クラッセ",
	 "./opentime.html\#アスピア明石",
	 "./opentime.html\#姫路",
	 "./opentime.html\#川西モザイクボックス",
	 "./opentime.html\#甲東園",
	 "./opentime.html\#ららぽーと甲子園"],
	["./opentime.html\#トラベルワンダーランド京都",
	 "./opentime.html\#京都ヨドバシ",
	 "./opentime.html\#四条河原町",
	 "./opentime.html\#マップ京都デスク"],	
	["./opentime.html\#大津パルコ"],
	["./opentime.html\#奈良"],
	["./opentime.html\#和歌山"],
	["./opentime.html\#高松",
	 "./opentime.html\#松山",
	 "./opentime.html\#徳島",
	 "./opentime.html\#高知"],
	["./opentime.html\#関西予約センター",
	 "./opentime.html\#マップ予約センター",
	 "./opentime.html\#兵庫予約センター",
	 "./opentime.html\#奈良予約センター",
	 "./opentime.html\#奈良予約センター",
	 "./opentime.html\#奈良予約センター",
	 "./opentime.html\#モバイル予約センター",
	 "./opentime.html\#国内旅行メディアセンター"],
	["./opentime.html\#大阪法人",
	 "./opentime.html\#大阪団体",
	 "./opentime.html\#京都法人",
	 "./opentime.html\#神戸法人",
	 "./opentime.html\#広島法人"],
	["./opentime.html\#アバンティ大阪",
	 "./opentime.html\#アバンティ神戸",
	 "./opentime.html\#アバンティ京都",		 
	 "./opentime.html\#エグゼクティブ",
	 "./opentime.html\#大阪NO1トラベル",
	 "./opentime.html\#スポーツ・イベントセクション",
	 "./opentime.html\#海外発券デスク"],
];

function funcMain(ind) {
	document.kensaku.city.length = 1;
	document.kensaku.city.selectedIndex = 0;
	if (ind == 0) {
		return;
	}
	var city = cities[ind - 1];
	document.kensaku.city.length = city.length + 1;
	for (var i = 0; i < city.length; i++) {
		document.kensaku.city.options[i + 1] = new Option(city[i],i);
	}
}

function setPrice(ind) {
	if (ind == 0) {
		document.kensaku.price.value="";
		return;
	}
	document.kensaku.price.value = c[document.kensaku.pref.selectedIndex-1][ind-1];
}

function menulink(jump) {
	var che = 0;
	if (document.kensaku.price.value != "") {
		che = document.kensaku.price.value.indexOf('+');
		if (che == -1) {
			var url = jump;
			document.kensaku.pref.selectedIndex = 0;
			document.kensaku.city.selectedIndex = 0;
			document.kensaku.price.value = "";
			if (location.pathname.match(/night\.htm/)) {
				window.open(url);
			} else {
				window.location = url;
			}
		} else {
			alert("Please select your departure MONTH. ");
		}	
	} else {
		alert("（方面）と（営業所）をお選び下さい。");
	}
}
