//バナーIDも受け入れる
//市区町村、沿線、駅を複数選択

//----------------------------------------------------------------------------//
//	共通変数
//----------------------------------------------------------------------------//

var obi_url="http://www.apamanshop.com/search/RstObi.asp"			//検索結果帯
var cond_url="http://www.apamanshop.com/search/SelCond.asp";		//条件選択
var city_url="http://www.apamanshop.com/search/SelCity.asp";		//市区町村選択
var rail_url="http://www.apamanshop.com/search/SelRail.asp"			//沿線選択
var ftr_url="http://www.apamanshop.com/search/RstMtrx.asp"			//こだわり検索
var rail_url="http://www.apamanshop.com/rail/SelRouteMap.asp"		//路線図検索
var direct_url="http://www.apamanshop.com/search/SelStTime.asp"		//ダイレクト検索
var campas_url="http://www.apamanshop.com/campus/suisho/kekka_school.asp"	//キャンパス一覧

var cspl,clen,aspl


//----------------------------------------------------------------------------//
//	説明
//		フォームの値をリセット
//----------------------------------------------------------------------------//
function Form_ValReset(){
	
	//サーチ区分
	document.frm_srh.SrhKbn.value="";
	document.frm_srh.CityCd.value="";
	document.frm_srh.RailCd.value="";
	document.frm_srh.FtrKbn.value="";
	document.frm_srh.wagama_op1.value="";
	document.frm_srh.built.value="";
	document.frm_srh.situnai_op3.value="";
	document.frm_srh.situnai_op4.value="";
	document.frm_srh.situnai_op5.value="";
	document.frm_srh.okugai_op1.value="";
	document.frm_srh.okugai_op3.value="";
	document.frm_srh.okugai_op6.value="";
	document.frm_srh.okugai_op8.value="";
	document.frm_srh.ekitoho.value="";
	document.frm_srh.furo_op1.value="";
	document.frm_srh.wagama_op2.value="";
	document.frm_srh.wagama_op8.value="";
	document.frm_srh.SrhKbn.value="";
	document.frm_srh.TgtStCd.value="";
	document.frm_srh.EndRangeTime.value="";
	document.frm_srh.TgtStNm.value="";
	document.frm_srh.StCd.value="";
	document.frm_srh.StWord.value="";
	
	document.frm_srh.tinryo1.value="";
	document.frm_srh.tinryo2.value="";
	document.frm_srh.tinryo_jouken2.value="";
	document.frm_srh.shikireizero.value="";
	document.frm_srh.syubetu1.value="";
	document.frm_srh.syubetu2.value="";
	document.frm_srh.syubetu3.value="";
	document.frm_srh.syubetu4.value="";
	document.frm_srh.syubetu5.value="";
	document.frm_srh.syubetu6.value="";
	document.frm_srh.syubetu7.value="";
	document.frm_srh.madori1.value="";
	document.frm_srh.madori2.value="";
	document.frm_srh.madori3.value="";
	document.frm_srh.madori4.value="";
	document.frm_srh.madori5.value="";
	document.frm_srh.madori6.value="";
	document.frm_srh.madori7.value="";
	document.frm_srh.madori8.value="";
	document.frm_srh.madori9.value="";
	document.frm_srh.senyu1.value="";
	document.frm_srh.senyu2.value="";
	document.frm_srh.situnai_op1.value="";
	document.frm_srh.situnai_op2.value="";
	document.frm_srh.situnai_op6.value="";
	document.frm_srh.okugai_op2.value="";
	document.frm_srh.okugai_op4.value="";
	document.frm_srh.okugai_op5.value="";
	document.frm_srh.okugai_op7.value="";
	document.frm_srh.wagama_op3.value="";
	document.frm_srh.wagama_op4.value="";
	document.frm_srh.wagama_op5.value="";
	document.frm_srh.wagama_op6.value="";
	document.frm_srh.wagama_op7.value="";
	document.frm_srh.wagama_op9.value="";
	document.frm_srh.kcn_op1.value="";
	document.frm_srh.kcn_op2.value="";
	document.frm_srh.furo_op2.value="";
	document.frm_srh.furo_op3.value="";
	document.frm_srh.furo_op4.value="";

}

//----------------------------------------------------------------------------//
//	説明
//		帯(市区町村選択から)
//----------------------------------------------------------------------------//
//	引数	city_cd:	市区町村CD
//			banner_id:	ﾋﾞｼﾞｮﾅﾘｽﾄ用ﾀｸﾞ
//----------------------------------------------------------------------------//
function Srh_City(city_cd,banner_id,dtl_cond){
	
	if(banner_id==undefined){
		banner_id = "";
	}
	
	Form_ValReset();
	
	if(dtl_cond!=""){
		cspl = dtl_cond.split(":");		//詳細条件ごとに配列でわける
		clen = cspl.length
		
		for(var i = 0; i < clen; i++){
			aspl = cspl[i].split(";");		//詳細条件の関数名と引数でわける
			
			if(aspl.length==2){
				Set_Cond_Val(aspl[0],aspl[1]);
			}
		}
	}
	
	//サーチ区分
	document.frm_srh.SrhKbn.value="03";
	//選択市区町村数
	//document.frm_srh.CityCnt.value="1";
	//市区町村CD
	document.frm_srh.CityCd.value=city_cd;

	document.frm_srh.action=obi_url + "?banner_id=" + banner_id;
	document.frm_srh.submit();

}

//----------------------------------------------------------------------------//
//	説明
//		市区町村選択
//----------------------------------------------------------------------------//
//	引数	
//			banner_id:	ﾋﾞｼﾞｮﾅﾘｽﾄ用ﾀｸﾞ
//----------------------------------------------------------------------------//
function Srh_City_Top(banner_id){
	
	if(banner_id==undefined){
		banner_id = "";
	}
	
	 Form_ValReset();
	
	//サーチ区分
	document.frm_srh.SrhKbn.value="03";
	
	document.frm_srh.action=city_url + "?banner_id=" + banner_id;
	document.frm_srh.submit();
}

//----------------------------------------------------------------------------//
//	説明
//		帯(沿線選択から)
//----------------------------------------------------------------------------//
//	引数	rail_cd:	沿線CD
//			banner_id:	ﾋﾞｼﾞｮﾅﾘｽﾄ用ﾀｸﾞ
//----------------------------------------------------------------------------//
function Srh_Rail(rail_cd,banner_id,dtl_cond){
	
	
	if(banner_id==undefined){
		banner_id = "";
	}
	 Form_ValReset();
	 
	if(dtl_cond!=""){
		cspl = dtl_cond.split(":");		//それぞれの条件jsごとに配列でわける
		clen = cspl.length
		
		for(var i = 0; i < clen; i++){
			aspl = cspl[i].split(";");		//詳細条件の関数名と引数でわける
			
			if(aspl.length==2){
				Set_Cond_Val(aspl[0],aspl[1]);
			}
		}
	}
		
	//サーチ区分
	document.frm_srh.SrhKbn.value="02";
	//選択沿線数
	//document.frm_srh.RailCnt.value="1";
	//沿線CD
	document.frm_srh.RailCd.value=rail_cd;

	document.frm_srh.action=obi_url + "?banner_id=" + banner_id;
	document.frm_srh.submit();

}

//----------------------------------------------------------------------------//
//	説明
//		沿線選択
//----------------------------------------------------------------------------//
//	引数	
//			banner_id:	ﾋﾞｼﾞｮﾅﾘｽﾄ用ﾀｸﾞ
//----------------------------------------------------------------------------//
function Srh_Rail_Top(banner_id){
	
	if(banner_id==undefined){
		banner_id = "";
	}
	Form_ValReset();
	//サーチ区分
	document.frm_srh.SrhKbn.value="02";
	
	document.frm_srh.action=rail_url + "?banner_id=" + banner_id;
	document.frm_srh.submit();
}

//----------------------------------------------------------------------------//
//	説明
//		帯(駅選択)
//----------------------------------------------------------------------------//
//	引数	rail_cd		:沿線CD
//			st_cd		:駅CD
//			banner_id	:ﾋﾞｼﾞｮﾅﾘｽﾄ用ﾀｸﾞ
//----------------------------------------------------------------------------//
function Srh_Station(rail_cd,st_cd,pref_cd,banner_id,dtl_cond){
	
	if(banner_id==undefined){
		banner_id = "";
	}
	Form_ValReset();
	
	if(dtl_cond!=""){
		jspl = dtl_cond.split(":");		//それぞれの条件jsごとに配列でわける
		jlen = jspl.length
		
		for(var i = 0; i < jlen; i++){
			aspl = jspl[i].split(";");		//詳細条件の関数名と引数でわける
			
			if(aspl.length==2){
				Set_Cond_Val(aspl[0],aspl[1]);
			}
		}
	}
	
	//サーチ区分
	document.frm_srh.SrhKbn.value="01";
	
	document.frm_srh.RailCd.value=rail_cd;
	document.frm_srh.StCd.value=st_cd;
	document.frm_srh.PrefCd.value=pref_cd;
	
	document.frm_srh.action=cond_url + "?banner_id=" + banner_id;
	document.frm_srh.submit();
}

//----------------------------------------------------------------------------//
//	説明
//		帯(ダイレクト検索)
//----------------------------------------------------------------------------//
//	引数	st_cd:		駅CD
//			banner_id:	ﾋﾞｼﾞｮﾅﾘｽﾄ用ﾀｸﾞ
//----------------------------------------------------------------------------//
function Srh_Direct(st_cd,st_word,banner_id,dtl_cond){
	
	if(banner_id==undefined){
		banner_id = "";
	}
	 Form_ValReset();
	 
	if(dtl_cond!=""){
		cspl = dtl_cond.split(":");		//それぞれの条件jsごとに配列でわける
		clen = cspl.length
		
		for(var i = 0; i < clen; i++){
			aspl = cspl[i].split(";");		//詳細条件の関数名と引数でわける
			
			if(aspl.length==2){
				Set_Cond_Val(aspl[0],aspl[1]);
			}
		}
	}
	 
	//サーチ区分
	document.frm_srh.SrhKbn.value="06";
	
	document.frm_srh.StCd.value=st_cd;
	document.frm_srh.StWord.value=st_word;
	
	document.frm_srh.action=obi_url + "?banner_id=" + banner_id;
	document.frm_srh.submit();
}
//----------------------------------------------------------------------------//
//	説明
//		帯（通勤時間検索)
//----------------------------------------------------------------------------//
//	引数	st_name:	駅名
//			st_cd:		駅CD
//			st_time:	通勤時間
//			banner_id:	ﾋﾞｼﾞｮﾅﾘｽﾄ用ﾀｸﾞ
//----------------------------------------------------------------------------//
function Srh_StTime(st_name,st_cd,st_time,banner_id,dtl_cond){
	
	if(banner_id==undefined){
		banner_id = "";
	}
	 Form_ValReset();
	 
	if(dtl_cond!=""){
		cspl = dtl_cond.split(":");		//それぞれの条件jsごとに配列でわける
		clen = cspl.length
		
		for(var i = 0; i < clen; i++){
			aspl = cspl[i].split(";");		//詳細条件の関数名と引数でわける
			
			if(aspl.length==2){
				Set_Cond_Val(aspl[0],aspl[1]);
			}
		}
	}
	//サーチ区分
	document.frm_srh.SrhKbn.value="08";
	
	document.frm_srh.TgtStCd.value=st_cd;
	document.frm_srh.TgtStNm.value=st_name;
	document.frm_srh.EndRangeTime.value=st_time;
	
	document.frm_srh.action=cond_url + "?banner_id=" + banner_id;
	document.frm_srh.submit();
}
//----------------------------------------------------------------------------//
//	説明
//		通勤時間検索
//----------------------------------------------------------------------------//
//	引数
//			banner_id:	ﾋﾞｼﾞｮﾅﾘｽﾄ用ﾀｸﾞ
//----------------------------------------------------------------------------//
function Srh_StTime_Top(banner_id){
	
	if(banner_id==undefined){
		banner_id = "";
	}
	 Form_ValReset();
	//サーチ区分
	document.frm_srh.SrhKbn.value="08";
	
	document.frm_srh.action=direct_url + "?banner_id=" + banner_id;
	document.frm_srh.submit();
}
//----------------------------------------------------------------------------//
//	説明
//		こだわり検索
//----------------------------------------------------------------------------//
//	引数	fkbn:		こだわり検索区分
//			banner_id:	ﾋﾞｼﾞｮﾅﾘｽﾄ用ﾀｸﾞ
//----------------------------------------------------------------------------//
function Srh_Ftr_TOP(fkbn,banner_id){
	
	if(banner_id==undefined){
		banner_id = "";
	}
	 Form_ValReset();
	//サーチ区分
	document.frm_srh.SrhKbn.value='04';
	
	//条件値
	switch(fkbn){
		//ペット相談可
		case "1":
			document.frm_srh.wagama_op1.value="on";
		    break;
		//新築
		case "2":
		    document.frm_srh.built.value="1";
		    break;
		//安心セキュリティ（オートロック、２階以上)
		case "3":
			document.frm_srh.situnai_op5.value="on";
			document.frm_srh.okugai_op3.value="on";
			break;
		//バルコニー
		case "4":
		    document.frm_srh.okugai_op8.value="on";
		    break;
		//ロフト
		case "5":
		    document.frm_srh.situnai_op5.value="on";
		    break;
		//駐車場
		case "6":
		    document.frm_srh.okugai_op1.value="on";
		    break;
		//楽器相談可
		case "7":
		    document.frm_srh.wagama_op2.value="on";
		    break;
		//パノラマ
		case "8":
		    document.frm_srh.wagama_op8.value="on";
		    break;
		//駅徒歩５分
		case "9":
		    document.frm_srh.ekitoho.value="5";
		    break;
		//バストイレ別
		case "10":
		    document.frm_srh.furo_op1.value="on";
		    break;
		default:
	
	}
	
	document.frm_srh.FtrKbn.value=fkbn;
	document.frm_srh.action=ftr_url + "?banner_id=" + banner_id;
	document.frm_srh.submit();
}
//----------------------------------------------------------------------------//
//	説明
//		路線図検索都道府県TOP（条件付き結果）
//----------------------------------------------------------------------------//
//	引数
//			banner_id:	ﾋﾞｼﾞｮﾅﾘｽﾄ用ﾀｸﾞ
//----------------------------------------------------------------------------//
function Srh_RailMap(banner_id){
	//サーチ区分
	 Form_ValReset();
	document.frm_srh.SrhKbn.value="07";
	
	document.frm_srh.action=rail_url + "?banner_id=" + banner_id;
	document.frm_srh.submit();
}
//----------------------------------------------------------------------------//
//	説明
//		詳細条件セット呼び出し
//----------------------------------------------------------------------------//
//	引数	vkbn:		詳細条件区分
//						1.賃料設定
//						2.賃料条件設定（管理費・共益費/敷金・礼金ゼロ)
//						3.建物種別
//						4.駅徒歩条件設定
//						5.間取種別
//						6.築年数条件設定
//						7.専有面積条件設定
//						8.室内設備条件設定
//						9.室外設備条件設定
//						10.わがまま条件
//						11.ｷｯﾁﾝ条件設定
//						12.風呂条件設定
//			java_arg:	引数
//----------------------------------------------------------------------------//
function Set_Cond_Val(vkbn,java_arg){
	//変数宣言
	var jspl,jlen,jarg,sumjarg
		
	//配列化
	jspl = java_arg.split(",");
	
	switch(vkbn){
		//賃料
		case "1":
			CRent(jspl[0],jspl[1]);
			break;
		//賃料条件
		case "2":
			CRentCond(jspl[0],jspl[1]);
			break;
		//建物種別
		case "3":
			CSyubetsu(jspl[0],jspl[1],jspl[2],jspl[3],jspl[4],jspl[5],jspl[6]);
			break;
		//駅徒歩
		case "4":
			CToho(jspl[0]);
			break;
		//間取種別
		case "5":
			CMadori(jspl[0],jspl[1],jspl[2],jspl[3],jspl[4],jspl[5],jspl[6],jspl[7],jspl[8]);
			break;
		//築年数
		case "6":
			CBuilt(jspl[0]);
			break;
		//専有面積
		case "7":
			CSenyu(jspl[0],jspl[1]);
			break;
		//室内設備
		case "8":
			CSitunai(jspl[0],jspl[1],jspl[2],jspl[3],jspl[4],jspl[5]);
			break;
		//室外設備
		case "9":
			COkugai(jspl[0],jspl[1],jspl[2],jspl[3],jspl[4],jspl[5],jspl[6],jspl[7]);
			break;
		//わがまま
		case "10":
			CWagama(jspl[0],jspl[1],jspl[2],jspl[3],jspl[4],jspl[5],jspl[6],jspl[7],jspl[8]);
			break;
		//ｷｯﾁﾝ
		case "11":
			CKcn(jspl[0],jspl[1]);
			break;
		//風呂
		case "12":
			CFuro(jspl[0],jspl[1],jspl[2],jspl[3],jspl[4],jspl[5]);
			break;
	}
}
//----------------------------------------------------------------------------//
//	説明
//		1.賃料設定
//----------------------------------------------------------------------------//
function CRent(min,max){
	document.frm_srh.tinryo1.value=min;
	document.frm_srh.tinryo2.value=max;
}
//----------------------------------------------------------------------------//
//	説明
//		2.賃料条件設定（管理費・共益費/敷金・礼金ゼロ)
//----------------------------------------------------------------------------//
function CRentCond(kval,sval){
	//管理費・共益費
	if(kval==1){
	document.frm_srh.tinryo_jouken2.value="on";
	}
	//敷金礼金ゼロ
	if(sval==1){
	document.frm_srh.shikireizero.value="on";
	}
}
//----------------------------------------------------------------------------//
//	説明
//		3.建物種別
//----------------------------------------------------------------------------//
function CSyubetsu(syu1,syu2,syu3,syu4,syu5,syu6,syu7){
	//ｱﾊﾟｰﾄ
	if(syu1==1){
	document.frm_srh.syubetu1.value="on";
	}
	//ﾏﾝｼｮﾝ
	if(syu2==1){
	document.frm_srh.syubetu2.value="on";
	}
	//一戸建
	if(syu3==1){
	document.frm_srh.syubetu3.value="on";
	}
	//駐車場
	if(syu4==1){
	document.frm_srh.syubetu4.value="on";
	}
	//店舗
	if(syu5==1){
	document.frm_srh.syubetu5.value="on";
	}
	//その他
	if(syu6==1){
	document.frm_srh.syubetu6.value="on";
	}
	//ﾃﾗｽﾊｳｽ・ﾀｳﾝﾊｳｽ
	if(syu7==1){
	document.frm_srh.syubetu7.value="on";
	}
}
//----------------------------------------------------------------------------//
//	説明
//		4.駅徒歩条件設定
//----------------------------------------------------------------------------//
function CToho(val){

	document.frm_srh.ekitoho.value=val;

}
//----------------------------------------------------------------------------//
//	説明
//		5.間取種別
//----------------------------------------------------------------------------//
function CMadori(syu1,syu2,syu3,syu4,syu5,syu6,syu7,syu8,syu9){
	//1R
	
//	alert(syu1 + ":" + syu2 + ":" + syu3 + ":" + syu4+ ":" + syu5 + ":" + syu6 + ":" + syu7 + ":" + syu8 + ":" + syu9);
	
	if(syu1==1){
	document.frm_srh.madori1.value="on";
	}
	//1K/1DK
	if(syu2==1){
	document.frm_srh.madori2.value="on";
	}
	//1LDK
	if(syu3==1){
	document.frm_srh.madori3.value="on";
	}
	//2K/2DK
	if(syu4==1){
	document.frm_srh.madori4.value="on";
	}
	//2LDK
	if(syu5==1){
	document.frm_srh.madori5.value="on";
	}
	//3K/3DK
	if(syu6==1){
	document.frm_srh.madori6.value="on";
	}
	//3LDK
	if(syu7==1){
	document.frm_srh.madori7.value="on";
	}
	//4K〜
	if(syu8==1){
	document.frm_srh.madori8.value="on";
	}
	//全て
	if(syu9==1){
	document.frm_srh.madori9.value="on";
	}
}

//----------------------------------------------------------------------------//
//	説明
//		6.築年数条件設定
//----------------------------------------------------------------------------//
function CBuilt(val){

	document.frm_srh.built.value=val;

}
//----------------------------------------------------------------------------//
//	説明
//		7.専有面積条件設定
//----------------------------------------------------------------------------//
function CSenyu(sval,mval){

	document.frm_srh.senyu1.value=sval;
	document.frm_srh.senyu2.value=mval;

}
//----------------------------------------------------------------------------//
//	説明
//		8.室内設備条件設定
//----------------------------------------------------------------------------//
function CSitunai(syu1,syu2,syu3,syu4,syu5,syu6){
	//ﾌﾛｰﾘﾝｸﾞ
	if(syu1==1){
	document.frm_srh.situnai_op1.value="on";
	}
	//ｴｱｺﾝ付
	if(syu2==1){
	document.frm_srh.situnai_op2.value="on";
	}
	//ｵｰﾄﾛｯｸ
	if(syu3==1){
	document.frm_srh.situnai_op3.value="on";
	}
	//室内洗濯機置場
	if(syu4==1){
	document.frm_srh.situnai_op4.value="on";
	}
	//ﾛﾌﾄ
	if(syu5==1){
	document.frm_srh.situnai_op5.value="on";
	}
	//ｴﾚﾍﾞｰﾀ
	if(syu6==1){
	document.frm_srh.situnai_op6.value="on";
	}
}
//----------------------------------------------------------------------------//
//	説明
//		9.室外設備条件設定
//----------------------------------------------------------------------------//
function COkugai(syu1,syu2,syu3,syu4,syu5,syu6,syu7,syu8){
	//駐車場有
	if(syu1==1){
	document.frm_srh.okugai_op1.value="on";
	}
	//1階)
	if(syu2==1){
	document.frm_srh.okugai_op2.value="on";
	}
	//2階以上
	if(syu3==1){
	document.frm_srh.okugai_op3.value="on";
	}
	//高層(10階以上)
	if(syu4==1){
	document.frm_srh.okugai_op4.value="on";
	}
	//最上階
	if(syu5==1){
	document.frm_srh.okugai_op5.value="on";
	}
	//南向き
	if(syu6==1){
	document.frm_srh.okugai_op6.value="on";
	}
	//専有庭
	if(syu7==1){
	document.frm_srh.okugai_op7.value="on";
	}
	//ﾊﾞﾙｺﾆｰ
	if(syu8==1){
	document.frm_srh.okugai_op8.value="on";
	}
}

//----------------------------------------------------------------------------//
//	説明
//		10.わがまま条件
//----------------------------------------------------------------------------//
function CWagama(syu1,syu2,syu3,syu4,syu5,syu6,syu7,syu8,syu9){
	//ﾍﾟｯﾄ相談可
	if(syu1==1){
	document.frm_srh.wagama_op1.value="on";
	}
	//楽器相談可
	if(syu2==1){
	document.frm_srh.wagama_op2.value="on";
	}
	//即入居可
	if(syu3==1){
	document.frm_srh.wagama_op3.value="on";
	}
	//子供可
	if(syu4==1){
	document.frm_srh.wagama_op4.value="on";
	}
	//女性限定
	if(syu5==1){
	document.frm_srh.wagama_op5.value="on";
	}
	//間取図あり
	if(syu6==1){
	document.frm_srh.wagama_op6.value="on";
	}
	//外観写真あり
	if(syu7==1){
	document.frm_srh.wagama_op7.value="on";
	}
	//パノラマ画像あり
	if(syu8==1){
	document.frm_srh.wagama_op8.value="on";
	}
	//内装写真あり
	if(syu9==1){
	document.frm_srh.wagama_op9.value="on";
	}
}
//----------------------------------------------------------------------------//
//	説明
//		11.ｷｯﾁﾝ条件設定
//----------------------------------------------------------------------------//
function CKcn(syu1,syu2){
	//ｶﾞｽｷｯﾁﾝ
	if(syu1==1){
	document.frm_srh.kcn_op1.value="on";
	}
	//ﾊﾞｽ･ﾄｲﾚ別
	if(syu2==1){
	document.frm_srh.kcn_op2.value="on";
	}
}
//----------------------------------------------------------------------------//
//	説明
//		12.風呂条件設定
//----------------------------------------------------------------------------//
function CFuro(syu1,syu2,syu3,syu4,syu5,syu6){
	//ﾊﾞｽ･ﾄｲﾚ別
	if(syu1==1){
	document.frm_srh.furo_op1.value="on";
	}
	//追焚
	if(syu2==1){
	document.frm_srh.furo_op2.value="on";
	}
	//ｼｬﾝﾌﾟｰﾄﾞﾚｯｻ
	if(syu3==1){
	document.frm_srh.furo_op3.value="on";
	}
	//ｼｬﾜｰ
	if(syu4==1){
	document.frm_srh.furo_op4.value="on";
	}
}
//----------------------------------------------------------------------------//
//	説明
//		キャンパス都道府県TOP
//----------------------------------------------------------------------------//
function Srh_Campus(banner_id){
	
	var camp_pref = document.frm_srh.PrefCd.value
	 Form_ValReset();
	document.frm_srh.action=campas_url + "?banner_id=" + banner_id + "&tcd=" + camp_pref;
	document.frm_srh.submit();
}

//消去予定
//----------------------------------------------------------------------------//
//	説明
//		エリアCDをフォームのValueに入れる
//----------------------------------------------------------------------------//
function Get_AreaCd(pref_cd){

	if(pref_cd=="01"){
		document.frm_srh.AreaCd.value="01";
	} else if (pref_cd =="02" || pref_cd =="03" || pref_cd =="04" || pref_cd =="05" || pref_cd =="06" || pref_cd =="07"){
		document.frm_srh.AreaCd.value="02";
	} else if (pref_cd =="13" || pref_cd =="14" || pref_cd =="11" || pref_cd =="12" || pref_cd =="08" || pref_cd =="10" || pref_cd =="09" || pref_cd =="15" || pref_cd =="20" || pref_cd =="19"){
		document.frm_srh.AreaCd.value="04";
	} else if (pref_cd =="02" || pref_cd =="16" || pref_cd =="17" || pref_cd =="18"){
		document.frm_srh.AreaCd.value="03";
	} else if (pref_cd =="21" || pref_cd =="22" || pref_cd =="23" || pref_cd =="24"){
		document.frm_srh.AreaCd.value="05";
	} else if (pref_cd =="25" || pref_cd =="26" || pref_cd =="27" || pref_cd =="28" || pref_cd =="29" || pref_cd =="30"){
		document.frm_srh.AreaCd.value="06";
	} else if (pref_cd =="31" || pref_cd =="32" || pref_cd =="33" || pref_cd =="34" || pref_cd =="35" || pref_cd =="36" || pref_cd =="37" || pref_cd =="38" || pref_cd =="39"){
		document.frm_srh.AreaCd.value="07";
	} else if (pref_cd =="40" || pref_cd =="41" || pref_cd =="42" || pref_cd =="43" || pref_cd =="44" || pref_cd =="45" || pref_cd =="46" || pref_cd =="47"){
		document.frm_srh.AreaCd.value="08";
	}
}
//----------------------------------------------------------------------------//
//	説明
//		住みたい駅ランキング用暫定
//----------------------------------------------------------------------------//
//	引数	rail_cd		:沿線CD
//			st_cd		:駅CD
//			banner_id	:ﾋﾞｼﾞｮﾅﾘｽﾄ用ﾀｸﾞ
//----------------------------------------------------------------------------//
function Srh_StFromDirect(rail_cd,st_cd,pref_cd,banner_id,dtl_cond){

	//サーチ区分
	document.frm_srh.SrhKbn.value="01";

	document.frm_srh.RailCd.value=rail_cd;
	document.frm_srh.StCd.value=st_cd;
	document.frm_srh.PrefCd.value=pref_cd;

	document.frm_srh.action=cond_url;
	document.frm_srh.submit();
}

