// JavaScript Document


function funcSubmit() { 
   if (document.formMain.pref.selectedIndex == 0 && document.formMain.city.selectedIndex == 0) { 
       window.alert("物件種目と地域を選択してください"); 
       return false; 
   } else if (document.formMain.pref.selectedIndex == 0) { 
       window.alert("物件種目を選択してください"); 
       return false; 
   } else if (document.formMain.city.selectedIndex == 0) { 
       window.alert("地域を選択してください"); 
       return false; 
   } else { 
       return true; 
   } 
} 

function funcMain(b) { 
   if (document.formMain.pref.selectedIndex == 0) { 
       document.formMain.city.length = 1; 
       document.formMain.city.selectedIndex = 0; 
   } else { 
       if (b) { 
           document.formMain.city.length = 1; 
           document.formMain.city.selectedIndex = 0; 
       } 
       var city = cities[document.formMain.pref.selectedIndex - 1]; 
       document.formMain.city.length = city.length + 1; 
       for (var i = 0; i < city.length; i++) {  
           document.formMain.city.options[i + 1].text = city[i];
       } 

   } 
} 

function myGo(b) {
		
		
		var mySelect = document.formMain.pref.options[document.formMain.pref.selectedIndex].text; 
		var mySelect_2 = document.formMain.city.options[document.formMain.city.selectedIndex].text; 
		switch(mySelect){
			case "住居":
				switch(mySelect_2){
					case "神宮前":
						location.href = "http://estateservice.co.jp/tokusyuu/zyuukyo/zinguumae/01.html";
						break;
					case "千駄ヶ谷":
						location.href = "http://estateservice.co.jp/tokusyuu/zyuukyo/sendagaya/01.html";
						break;
					case "青山":
						location.href = "http://estateservice.co.jp/tokusyuu/zyuukyo/aoyama/01.html";
						break;
					case "その他":
						location.href = "http://estateservice.co.jp/tokusyuu/zyuukyo/sonota/01.html";
						break;
					defalt:
						location.href = "";
						break;
					}
				break;
			case "事務所":
				switch(mySelect_2){
					case "神宮前":
						location.href = "http://estateservice.co.jp/tokusyuu/zimusyo/zinguumae/01.html";
						break;
					case "千駄ヶ谷":
						location.href = "http://estateservice.co.jp/tokusyuu/zimusyo/sendagaya/01.html";
						break;
					case "青山":
						location.href = "http://estateservice.co.jp/tokusyuu/zimusyo/aoyama/01.html";
						break;
					case "その他":
						location.href = "http://estateservice.co.jp/tokusyuu/zimusyo/sonota/01.html";
						break;
					defalt:
						location.href = "";
						break;
					}
				break;
			case "店舗":
				switch(mySelect_2){
					case "神宮前":
						location.href = "http://estateservice.co.jp/tokusyuu/tenpo/zinguumae/01.html";
						break;
					case "千駄ヶ谷":
						location.href = "http://estateservice.co.jp/tokusyuu/tenpo/sendagaya/01.html";
						break;
					case "青山":
						location.href = "http://estateservice.co.jp/tokusyuu/tenpo/aoyama/01.html";
						break;
					case "その他":
						location.href = "http://estateservice.co.jp/tokusyuu/tenpo/sonota/01.html";
						break;
					defalt:
						location.href = "";
						break;
					}
				break;
			case "売物件":
				switch(mySelect_2){
					case "神宮前":
						location.href = "http://estateservice.co.jp/tokusyuu/sale/zinguumae/01.html";
						break;
					case "千駄ヶ谷":
						location.href = "http://estateservice.co.jp/tokusyuu/sale/sendagaya/01.html";
						break;
					case "青山":
						location.href = "http://estateservice.co.jp/tokusyuu/sale/aoyama/01.html";
						break;
					case "その他":
						location.href = "http://estateservice.co.jp/tokusyuu/sale/sonota/01.html";
						break;
					defalt:
						location.href = "";
						break;
					}
				break;
		}

	 
} 

var cities = new Array(4); 
cities[0] = new Array("神宮前", "千駄ヶ谷","青山", "その他"); 
cities[1] = new Array("神宮前", "千駄ヶ谷","青山", "その他"); 
cities[2] = new Array("神宮前", "千駄ヶ谷","青山", "その他"); 
cities[3] = new Array("神宮前", "千駄ヶ谷","青山", "その他"); 

 

