﻿//基本URL
baseURL = "/tour/search_d.php?p_from=EVERY&p_naigai=J&p_hatsu=104&p_bunrui=030&p_sdp=1";

//方面
var houmenAry = new Array(10);
houmenAry[0] = "&p_dest=10";
houmenAry[1] = "&p_dest=11";
houmenAry[2] = "&p_country=%93%8C%8B%9E%93s&p_country=%8D%E9%8B%CA%8C%A7&p_country=%90_%93%DE%90%EC%8C%A7&p_country=%93%C8%96%D8%8C%A7&p_country=%8CQ%94n%8C%A7&p_country=%88%EF%8F%E9%8C%A7&p_country=%90%E7%97t%8C%A7&p_country=%90%C3%89%AA%8C%A7&p_country=%8ER%97%9C%8C%A7";
houmenAry[3] = "&p_dest=15";
houmenAry[4] = "&p_dest=13&p_dest=14";
houmenAry[5] = "&p_dest=16";
houmenAry[6] = "&p_dest=17";
houmenAry[7] = "&p_dest=18";
houmenAry[8] = "&p_dest=19";
houmenAry[9] = "&p_dest=20";

//地域
erea_array = [
//０：北海道
[["▼都市を選択",""],
["北海道全域",""],
["札幌","&p_country=%96k%8AC%93%B9&p_city=01101"],
["函館","&p_country=%96k%8AC%93%B9&p_city=01001"],
["小樽","&p_country=%96k%8AC%93%B9&p_city=01010"],
["旭川","&p_country=%96k%8AC%93%B9&p_city=01201"],
["釧路","&p_country=%96k%8AC%93%B9&p_city=01304"],
["帯広","&p_country=%96k%8AC%93%B9&p_city=01308"],
["網走","&p_country=%96k%8AC%93%B9&p_city=01303"],
["千歳","&p_country=%96k%8AC%93%B9&p_city=01112"],
["北見","&p_country=%96k%8AC%93%B9&p_city=01310&p_key=%96k%8C%A9&p_encode=SJIS"],
["富良野","&p_country=%96k%8AC%93%B9&p_city=01202"],
["知床","&p_country=%96k%8AC%93%B9&p_city=01302"],
["ニセコ","&p_country=%96k%8AC%93%B9&p_city=01104"],
["登別温泉","&p_country=%96k%8AC%93%B9&p_city=01109"],
["湯の川温泉","&p_country=%96k%8AC%93%B9&p_city=01002"],
["川湯温泉","&p_country=%96k%8AC%93%B9&p_city=01307"],
["層雲峡温泉","&p_country=%96k%8AC%93%B9&p_city=01207"],
["定山渓温泉","&p_country=%96k%8AC%93%B9&p_city=01102"],
["阿寒湖畔温泉","&p_country=%96k%8AC%93%B9&p_city=01305"],
["洞爺湖温泉","&p_country=%96k%8AC%93%B9&p_city=01108"],
["屈斜路湖畔温泉","&p_country=%96k%8AC%93%B9&p_city=01306"]],

//１：東北
[["▼都市を選択",""],
["東北全域",""],
["青森","&p_country=%90%C2%90X%8C%A7"],
["秋田","&p_country=%8FH%93c%8C%A7"],
["山形","&p_country=%8ER%8C%60%8C%A7"],
["岩手","&p_country=%8A%E2%8E%E8%8C%A7"],
["宮城","&p_country=%8B%7B%8F%E9%8C%A7"],
["福島","&p_country=%95%9F%93%87%8C%A7"],
["十和田湖畔温泉","&p_country=%90%C2%90X%8C%A7&p_key=%8F%5C%98a%93c%8C%CE%94%C8%89%B7%90%F2&p_encode=SJIS"],
["深浦温泉","&p_country=%90%C2%90X%8C%A7&p_key=%90%5B%89Y%89%B7%90%F2&p_encode=SJIS"],
["田沢湖温泉郷","&p_country=%8FH%93c%8C%A7&p_key=%93c%91%F2%8C%CE%89%B7%90%F2%8B%BD&p_encode=SJIS"],
["雫石高倉温泉","&p_country=%8A%E2%8E%E8%8C%A7&p_key=%8E%B4%90%CE%8D%82%91q%89%B7%90%F2&p_encode=SJIS"],
["つなぎ温泉","&p_country=%8A%E2%8E%E8%8C%A7&p_key=%88%A4%90%5E%8A%D9&p_encode=SJIS"],
["花巻（南花巻温泉郷）","&p_country=%8A%E2%8E%E8%8C%A7&p_key=%89%D4%8A%AA&p_encode=SJIS"],
["金田一温泉","&p_country=%8A%E2%8E%E8%8C%A7&p_key=%8B%E0%93c%88%EA%89%B7%90%F2&p_encode=SJIS"],
["鶯宿温泉","&p_country=%8A%E2%8E%E8%8C%A7&p_key=%E9%F2%8Fh%89%B7%90%F2&p_encode=SJIS"],
["盛岡","&p_country=%8A%E2%8E%E8%8C%A7&p_city=03001&p_key=%90%B7%89%AA&p_encode=SJIS"],
["三陸","&p_country=%8A%E2%8E%E8%8C%A7&p_key=%8EO%97%A4&p_encode=SJIS"],
["作並温泉","&p_country=%8B%7B%8F%E9%8C%A7&p_key=%8D%EC%95%C0%89%B7%90%F2&p_encode=SJIS"],
["鳴子温泉","&p_country=%8B%7B%8F%E9%8C%A7&p_key=%96%C2%8Eq%89%B7%90%F2&p_encode=SJIS"],
["秋保温泉","&p_country=%8B%7B%8F%E9%8C%A7&p_key=%8FH%95%DB%89%B7%90%F2&p_encode=SJIS"],
["遠刈田温泉","&p_country=%8B%7B%8F%E9%8C%A7&p_key=%89%93%8A%A0%93c%89%B7%90%F2&p_encode=SJIS"],
["鬼首温泉","&p_country=%8B%7B%8F%E9%8C%A7&p_key=%8BS%8E%F1%89%B7%90%F2&p_encode=SJIS"],
["気仙沼","&p_country=%8B%7B%8F%E9%8C%A7&p_key=%8BC%90%E5%8F%C0&p_encode=SJIS"],
["仙台","&p_country=%8B%7B%8F%E9%8C%A7&p_key=%90%E5%91%E4%8Es%93%E0&p_encode=SJIS"],
["裏磐梯","&p_country=%95%9F%93%87%8C%A7&p_city=07006&p_key=%97%A0%94%D6%92%F2&p_encode=SJIS"],
["いわき（いわき湯本温泉）","&p_country=%95%9F%93%87%8C%A7&p_key=%82%A2%82%ED%82%AB&p_encode=SJIS"],
["飯坂温泉","&p_country=%95%9F%93%87%8C%A7&p_key=%94%D1%8D%E2%89%B7%90%F2&p_encode=SJIS"],
["高湯温泉","&p_country=%95%9F%93%87%8C%A7&p_key=%8D%82%93%92%89%B7%90%F2&p_encode=SJIS"],
["土湯温泉","&p_country=%95%9F%93%87%8C%A7&p_key=%93y%93%92%89%B7%90%F2&p_encode=SJIS"],
["蔵王温泉","&p_country=%8ER%8C%60%8C%A7&p_key=%91%A0%89%A4%89%B7%90%F2&p_encode=SJIS"],
["天童温泉","&p_country=%8ER%8C%60%8C%A7&p_key=%93V%93%B6%89%B7%90%F2&p_encode=SJIS"],
["かみのやま温泉","&p_country=%8ER%8C%60%8C%A7&p_key=%82%A9%82%DD%82%CC%82%E2%82%DC%89%B7%90%F2&p_encode=SJIS"]],

//２：関東伊豆箱根
[["▼都市を選択",""],
["関東伊豆箱根全域",""],
["関東","&p_dest=12"],
["伊豆箱根","&p_city=14005&p_city=22001&p_city=22003&p_city=22004&p_city=22005&p_city=22007&p_city=22006&p_city=22008&p_city=22002"],
["鬼怒川温泉","&p_country=%93%C8%96%D8%8C%A7&p_key=%8BS%93%7B%90%EC%89%B7%90%F2&p_encode=SJIS"],
["川治温泉","&p_country=%93%C8%96%D8%8C%A7&p_key=%90%EC%8E%A1%89%B7%90%F2&p_encode=SJIS"],
["那須湯本温泉","&p_country=%93%C8%96%D8%8C%A7&p_key=%93%DF%90%7B%93%92%96%7B%89%B7%90%F2&p_encode=SJIS"],
["嬬恋","&p_country=%8CQ%94n%8C%A7&p_key=%92%DA%97%F6%83v%83%8A%83%93%83X&p_encode=SJIS"],
["万座温泉","&p_country=%8CQ%94n%8C%A7&p_key=%96%9C%8D%C0%89%B7%90%F2&p_encode=SJIS"],
["猿ケ京温泉","&p_country=%8CQ%94n%8C%A7&p_key=%89%8E%83%96%8B%9E&p_encode=SJIS"],
["草津温泉","&p_country=%8CQ%94n%8C%A7&p_key=%91%90%92%C3%89%B7%90%F2&p_encode=SJIS"],
["伊香保温泉","&p_country=%8CQ%94n%8C%A7&p_key=%88%C9%8D%81%95%DB%89%B7%90%F2&p_encode=SJIS"],
["房総","&p_country=%90%E7%97t%8C%A7&p_key=%96%5B%91%8D&p_encode=SJIS"],
["石和温泉","&p_country=%8ER%97%9C%8C%A7&p_key=%90%CE%98a%89%B7%90%F2&p_encode=SJIS"],
["蓮台寺温泉","&p_country=%90%C3%89%AA%8C%A7&p_key=%98%40%91%E4%8E%9B%89%B7%90%F2&p_encode=SJIS"],
["下田温泉","&p_country=%90%C3%89%AA%8C%A7&p_key=%89%BA%93c%89%B7%90%F2&p_encode=SJIS"],
["今井浜温泉","&p_country=%90%C3%89%AA%8C%A7&p_key=%8D%A1%88%E4%95l&p_encode=SJIS"],
["熱川温泉","&p_country=%90%C3%89%AA%8C%A7&p_key=%94M%90%EC%89%B7%90%F2&p_encode=SJIS"],
["下賀茂温泉","&p_country=%90%C3%89%AA%8C%A7&p_key=%89%BA%89%EA%96%CE%89%B7%90%F2&p_encode=SJIS"],
["伊東温泉","&p_country=%90%C3%89%AA%8C%A7&p_key=%88%C9%93%8C%89%B7%90%F2&p_encode=SJIS"],
["伊豆長岡温泉","&p_country=%90%C3%89%AA%8C%A7&p_key=%88%C9%93%A4%92%B7%89%AA%89%B7%90%F2&p_encode=SJIS"]],

//３：北陸
[["▼都市を選択",""],
["北陸全域",""],
["富山","&p_country=%95x%8ER%8C%A7"],
["石川","&p_country=%90%CE%90%EC%8C%A7"],
["福井","&p_country=%95%9F%88%E4%8C%A7"],
["金沢市内","&p_country=%90%CE%90%EC%8C%A7&p_city=17001"],
["片山津温泉","&p_country=%90%CE%90%EC%8C%A7&p_key=%95%D0%8ER%92%C3%89%B7%90%F2&p_encode=SJIS"],
["和倉温泉","&p_country=%90%CE%90%EC%8C%A7&p_key=%98a%91q%89%B7%90%F2&p_encode=SJIS"],
["宇奈月温泉","&p_country=%95x%8ER%8C%A7&p_key=%89F%93%DE%8C%8E%89%B7%90%F2&p_encode=SJIS"],
["金太郎温泉","&p_country=%95x%8ER%8C%A7&p_key=%8B%E0%91%BE%98Y%89%B7%90%F2&p_encode=SJIS"]],

//４：中部
[["▼都市を選択",""],
["中部全域","&p_country=%92%B7%96%EC%8C%A7&p_country=%90V%8A%83%8C%A7&p_country=%8A%F2%95%8C%8C%A7&p_country=%90%C3%89%AA%8C%A7"],
["長野","&p_country=%92%B7%96%EC%8C%A7"],
["新潟","&p_country=%90V%8A%83%8C%A7"],
["岐阜","&p_country=%8A%F2%95%8C%8C%A7"],
["浜名湖","&p_country=%90%C3%89%AA%8C%A7&p_key=%95l%96%BC%8C%CE&p_encode=SJIS"],
["伊良湖","&p_country=%88%A4%92m%8C%A7&p_key=%88%A4%92m%8C%A7&p_encode=SJIS"],
["名古屋市内","&p_country=%88%A4%92m%8C%A7&p_key=%96%BC%8C%C3%89%AE&p_encode=SJIS"],
["新潟市内","&p_country=%90V%8A%83%8C%A7&p_key=%90V%8A%83%8Es%93%E0&p_encode=SJIS"],
["瀬波温泉","&p_country=%90V%8A%83%8C%A7&p_key=%90%A3%94g%89%B7%90%F2&p_encode=SJIS"],
["鹿教湯温泉","&p_country=%92%B7%96%EC%8C%A7&p_key=%8E%AD%8B%B3%93%92%89%B7%90%F2&p_encode=SJIS"],
["湯田中温泉","&p_country=%92%B7%96%EC%8C%A7&p_key=%93%92%93c%92%86%89%B7%90%F2&p_encode=SJIS"],
["松代温泉","&p_country=%92%B7%96%EC%8C%A7&p_key=%8F%BC%91%E3%89%B7%90%F2&p_encode=SJIS"],
["奥飛騨温泉郷","&p_country=%8A%F2%95%8C%8C%A7&p_key=%89%9C%94%F2%91%CB%89%B7%90%F2%8B%BD&p_encode=SJIS"]],

//５：関西
[["▼都市を選択",""],
["近畿南紀伊勢全域",""],
["大阪","&p_country=%91%E5%8D%E3%95%7B"],
["ﾕﾆﾊﾞｰｻﾙ･ｽﾀｼﾞｵ･ｼﾞｬﾊﾟﾝ","&p_country=%91%E5%8D%E3%95%7B&p_city=27002"],
["京都","&p_country=%8B%9E%93s%95%7B"],
["神戸","&p_country=%95%BA%8C%C9%8C%A7&p_city=28001&p_key=%90_%8C%CB&p_encode=SJIS"]],

//６：中国
[["▼都市を選択",""],
["山陰山陽全域","&p_country=%8DL%93%87%8C%A7&p_country=%92%B9%8E%E6%8C%A7&p_country=%93%87%8D%AA%8C%A7&p_country=%89%AA%8ER%8C%A7&p_country=%8ER%8C%FB%8C%A7"],
["広島県","&p_country=%8DL%93%87%8C%A7"],
["鳥取県","&p_country=%92%B9%8E%E6%8C%A7"],
["島根県","&p_country=%93%87%8D%AA%8C%A7"],
["岡山県","&p_country=%89%AA%8ER%8C%A7"],
["山口県","&p_country=%8ER%8C%FB%8C%A7"]],

//７：四国
[["▼都市を選択",""],
["四国全域","&p_country=%8D%82%92m%8C%A7&p_country=%93%BF%93%87%8C%A7&p_country=%8D%81%90%EC%8C%A7&p_country=%88%A4%95Q%8C%A7"],
["高知県","&p_country=%8D%82%92m%8C%A7"],
["徳島県","&p_country=%93%BF%93%87%8C%A7"],
["香川県","&p_country=%8D%81%90%EC%8C%A7"],
["愛媛県","&p_country=%88%A4%95Q%8C%A7"]],

//８：九州
[["▼都市を選択",""],
["九州全域",""],
["福岡県","&p_country=%95%9F%89%AA%8C%A7"],
["長崎県","&p_country=%92%B7%8D%E8%8C%A7"],
["大分県","&p_country=%91%E5%95%AA%8C%A7"],
["鹿児島県","&p_country=%8E%AD%8E%99%93%87%8C%A7"],
["熊本県","&p_country=%8CF%96%7B%8C%A7"],
["宮崎県","&p_country=%8B%7B%8D%E8%8C%A7"],
["佐賀県","&p_country=%8D%B2%89%EA%8C%A7"]],

//９：沖縄
[["▼都市を選択",""],
["沖縄全域",""],
["那覇","&p_country=%89%AB%93%EA%8C%A7&p_city=47001"],
["本島　中部エリア","&p_country=%89%AB%93%EA%8C%A7&p_city=47003,47004,47005"],
["本島　北部エリア","&p_country=%89%AB%93%EA%8C%A7&p_city=47006,47007,47008,47009"],
["本島　ビーチ・リゾート","&p_country=%89%AB%93%EA%8C%A7&p_city=47003,47004,47005&p_city=47006,47007,47008,47009&p_city=47011&p_city=47010&p_bunrui=026"],
["離島全域","&p_country=%89%AB%93%EA%8C%A7&p_bunrui=806"],
["石垣島","&p_country=%89%AB%93%EA%8C%A7&p_city=47015"],
["宮古島","&p_country=%89%AB%93%EA%8C%A7&p_city=47014"],
["久米島","&p_country=%89%AB%93%EA%8C%A7&p_city=47012&p_key=%8Bv%95%C4&p_encode=SJIS"],
["小浜島","&p_country=%89%AB%93%EA%8C%A7&p_city=47016&p_key=%8F%AC%95l&p_encode=SJIS"],
["西表島","&p_country=%89%AB%93%EA%8C%A7&p_city=47017&p_key=%90%BC%95%5C&p_encode=SJIS"]],
];

	
//日数
var dayAry = new Array(3);
dayAry[0] = "";
dayAry[1] = "&p_kikan_fr=2&p_kikan_to=2";
dayAry[2] = "&p_kikan_fr=3&p_kikan_to=3";
dayAry[3] = "&p_kikan_fr=4";
	
//目的
var mokutekiAry = new Array(6);
mokutekiAry[0] = "";
mokutekiAry[1] = "&p_bunrui=021";
mokutekiAry[2] = "&p_bunrui=040";
mokutekiAry[3] = "&p_bunrui=008";
mokutekiAry[4] = "&p_bunrui2=MIL";
mokutekiAry[5] = "&p_bunrui=814";

//都市を変更するメソッド
function selectCity(n) {
	while(document.search_form.city.options.length > 0){
		menuLength = document.search_form.city.options.length;
		for(creaCnt=0; creaCnt<menuLength; creaCnt++){
			document.search_form.city.options[creaCnt] = null;
		}
	}
	for(i=0;i<erea_array[n].length;i++){
		document.search_form.city.options[i] = new Option(erea_array[n][i][0],erea_array[n][i][0]);
		document.search_form.city.options[i].disabled=false;
	}
}
function getDest() {
	for (i=0; i<document.search_form.dest.length; i++){
		if (document.search_form.dest[i].checked)  return houmenAry[i];
	}
}
function getCity() {
	for (i=0; i<document.search_form.dest.length; i++){
		if (document.search_form.dest[i].checked){
			return erea_array[i][document.search_form.city.selectedIndex][1];
		};
	}
}
function getKikan() {
	return dayAry[document.search_form.kikan.selectedIndex];
}
function getMokuteki() {
	for (i=0; i<document.search_form.mokuteki.length; i++){
		if (document.search_form.mokuteki[i].checked){
			return mokutekiAry[i];
		};
	}
}
function getShuppatubi() {
	month = document.search_form.p_month[document.search_form.p_month.selectedIndex].value;
	day = document.search_form.p_dd.selectedIndex;
	if(day=='0') day="";
	return "&p_month="+month+"&p_dd="+day;
}
function send() {
	location.href = baseURL+getDest()+getCity()+getMokuteki()+getKikan()+getShuppatubi();
}
