// 北海道エリア
// XMLHttpRequestオブジェクトの作成
function requestData ( ) {
	if ( window.ActiveXObject ) {	//for IE
		try {
			var xmlHttp = new
			ActiveXObject ("Msxml2.XMLHTTP");
		}
		catch ( e ) {
			var xmlHttp = new
			ActiveXObject ("Microsoft.XMLHTTP");
		}
	} else if ( window.XMLHttpRequest ) {	//for IE以外
		var xmlHttp = new XMLHttpRequest ();
	} else {
		return false;
	}
	xmlHttp.open ("GET", "txt/shop.txt", "false");	//ファイルを読み込む
	xmlHttp.onreadystatechange = function() {	//コールバック関数
		if ((xmlHttp.readyState == 4) && (xmlHttp.status == 200)) {	//通信完了
			//処理の開始
			//都道府県ページ内リンク
			var dataset = eval ( xmlHttp.responseText );
			var area_output = '<form name="areaform" action="">';
			area_output += '<select name="linkmenu" size="1" >';
			area_output += '<option selected="selected" value="#">- 都道府県</option>';
			area_output += '<option class="group" value="http://www.toko-toko-web.net/test01/shop/hokkaido.html">【北海道】</option>';
			if (dataset[1].length == 1) {
				area_output += '<option disabled="disabled">なし</option>';
			} else {
				for ( var a = 1; a <= 1; a++) {
					if ( dataset[a].length > 1 ) {
						area_output += '<option value="http://www.toko-toko-web.net/test01/shop/hokkaido.html#shop_'+ dataset[a][0][0] +'">'+ dataset[a][0][1] +'</option>';
					}
				}
			}
			area_output += '<option class="group" value="http://www.toko-toko-web.net/test01/shop/tohoku.html">【東北】</option>';
			if ((dataset[2].length == 1) && (dataset[3].length == 1) && (dataset[4].length == 1) && (dataset[5].length == 1) && (dataset[6].length == 1) && (dataset[7].length == 1)) {
				area_output += '<option disabled="disabled">なし</option>';
			} else {
				for ( var b = 2; b <= 7; b++) {
					if ( dataset[b].length > 1 ) {
						area_output += '<option value="http://www.toko-toko-web.net/test01/shop/tohoku.html#shop_'+ dataset[b][0][0] +'">'+ dataset[b][0][1] +'</option>';
					}
				}
			}
			area_output += '<option class="group" value="http://www.toko-toko-web.net/test01/shop/kanto.html">【関東】</option>';
			if ((dataset[8].length == 1) && (dataset[9].length == 1) && (dataset[10].length == 1) && (dataset[11].length == 1) && (dataset[12].length == 1) && (dataset[13].length == 1) && (dataset[14].length == 1)) {
				area_output += '<option disabled="disabled">なし</option>';
			} else {
				for ( var c = 8; c <= 14; c++) {
					if ( dataset[c].length > 1 ) {
						area_output += '<option value="http://www.toko-toko-web.net/test01/shop/kanto.html#shop_'+ dataset[c][0][0] +'">'+ dataset[c][0][1] +'</option>';
					}
				}
			}
			area_output += '<option class="group" value="http://www.toko-toko-web.net/test01/shop/hokuriku.html">【北陸・中部】</option>';
			if ((dataset[15].length == 1) && (dataset[16].length == 1) && (dataset[17].length == 1) && (dataset[18].length == 1) && (dataset[19].length == 1) && (dataset[20].length == 1) && (dataset[21].length == 1) && (dataset[22].length == 1) && (dataset[23].length == 1)) {
				area_output += '<option disabled="disabled">なし</option>';
			} else {
				for ( var i = 15; i <= 23; i++) {
					if ( dataset[i].length > 1 ) {
						area_output += '<option value="http://www.toko-toko-web.net/test01/shop/hokuriku.html#shop_'+ dataset[i][0][0] +'">'+ dataset[i][0][1] +'</option>';
					}
				}
			}
			area_output += '<option class="group" value="http://www.toko-toko-web.net/test01/shop/kansai.html">【関西】</option>';
			if ((dataset[24].length == 1) && (dataset[25].length == 1) && (dataset[26].length == 1) && (dataset[27].length == 1) && (dataset[28].length == 1) && (dataset[29].length == 1) && (dataset[30].length == 1)) {
				area_output += '<option disabled="disabled">なし</option>';
			} else {
				for ( var i = 24; i <= 30; i++) {
					if ( dataset[i].length > 1 ) {
						area_output += '<option value="http://www.toko-toko-web.net/test01/shop/kansai.html#shop_'+ dataset[i][0][0] +'">'+ dataset[i][0][1] +'</option>';
					}
				}
			}
			area_output += '<option class="group" value="http://www.toko-toko-web.net/test01/shop/kyusyu.html">【九州】</option>';
			if ((dataset[31].length == 1) && (dataset[32].length == 1) && (dataset[33].length == 1) && (dataset[34].length == 1) && (dataset[35].length == 1) && (dataset[36].length == 1) && (dataset[37].length == 1) && (dataset[38].length == 1) && (dataset[39].length == 1) && (dataset[40].length == 1) && (dataset[41].length == 1) && (dataset[42].length == 1) && (dataset[43].length == 1) && (dataset[44].length == 1) && (dataset[45].length == 1) && (dataset[46].length == 1) && (dataset[47].length == 1)) {
				area_output += '<option disabled="disabled">なし</option>';
			} else {
				for ( var i = 31; i <= 47; i++) {
					if ( dataset[i].length > 1 ) {
						area_output += '<option value="http://www.toko-toko-web.net/test01/shop/kyusyu.html#shop_'+ dataset[i][0][0] +'">'+ dataset[i][0][1] +'</option>';
					}
				}
			}
			area_output += '</select>';
			area_output += '<input type="button" value="検索" onClick="menuLink(document.areaform.linkmenu.options [ document.areaform.linkmenu.selectedIndex ] .value)" />';
			area_output += '</form>';			
			//処理の終了
		} else if ((xmlHttp.readyState == 4) && (xmlHttp.status == 404)) {	//URLなし
			var area_output = "データが見つかりませんでした";
		} else {
			var area_output = "データ取得中";
		}
		var area_outputdiv = document.getElementById("formBox")
		area_outputdiv.innerHTML = area_output;
	};
	xmlHttp.send ( null );	//リクエストを送信
}