//一覧へのリンク用
function search_chk(intNum) {
	var InfoPath = '';

	tempCity = get_SearchCity(document.getElementsByName('PrefCd')[0].value);
	if (tempCity != '') {
		InfoPath += '&' + tempCity;
	} else {
		return;
	}
	InfoPath += '&' + get_SearchDispCnt(intNum);
//	InfoPath += get_List_Radius();
//	InfoPath += get_List_Facility();
	if (document.getElementsByName('PropKdCd')[0].value != '') {
		InfoPath += get_PropKdCd_Hidden(1);
	} else {
		InfoPath += '&p.propKd1=1&p.propKd2=1&p.propKd3=1';
	}
//	InfoPath += get_HuRtFrom();
//	InfoPath += get_HuRtTo();
//	InfoPath += get_Layout();
//	InfoPath += get_UseSzSquFrom();
//	InfoPath += get_UseSzSquTo();
//	InfoPath += get_CompDt();
//	InfoPath += get_WalkTm();
//	InfoPath += get_PjRmEnvFrom();
//	InfoPath += get_PjRmEnvTo();
//	InfoPath += get_PjSusBit();

	if (intNum == 1) {
		document.search1.action = document.search1.action + InfoPath;
		document.search1.submit();
	} else if (intNum == 2)  {
		document.search2.action = document.search2.action + InfoPath;
		document.search2.submit();
	} else {
		return false;
	}
}

//市区郡の政令指定都市、それ以外の名称リンクをクリックした場合用
function city_category(strUrl, strId, strName, strPrefId) {
	var temp = '';
	var objCheck = document.getElementsByTagName('input');

	for (i = 0;i < objCheck.length; i++) {
		if (objCheck[i].id.indexOf(strId) >= 0) {
			temp += strPrefId + objCheck[i].value + ':';
		}
	}
	temp  = '&p.city=' + temp.substr(0, temp.length - 1);

	location.href = strUrl + temp;
}

//町名選択へのリンク用
function sel_town() {
	var InfoPath = '';

	InfoPath += get_PrefParam();
	tempCity = get_City();
	if (tempCity != '') {
		InfoPath += tempCity;
	} else {
		return;
	}

	InfoPath += get_PropKdCd_Hidden(0);

	document.town.action = document.town.action + InfoPath;
	document.town.submit();
}

// 一覧全てのチェックボックスの状態変更
function all_check(strId, strName) {
	var objCheck = document.getElementsByTagName('input');

	for (i = 0;i < objCheck.length; i++) {
		if (objCheck[i].id.indexOf(strId) >= 0) {
			if (document.getElementsByName(strName)[0].checked) {
				objCheck[i].checked = true;
			} else {
				objCheck[i].checked = false;
			}
		}
	}
}

