/*****************************
* Function checkToDisplayControl
* Check box (radio) checked or unchecked
* then show or hide control
*
* @param 	strCheckControlId ... id of control to check
* 			strTargetControlId ... id of control to hide or show
* 			strClearControlId ... id of control to delete value
* 			booShowCondition ... hide(or show) when checked or unchecked
*****************************/
function checkToDisplayControl(strCheckControlId, strTargetControlId, strClearControlId, booShowCondition)
{
	var objCheckControl = document.getElementById(strCheckControlId);
	var objTargetControl = document.getElementById(strTargetControlId);
	if (booShowCondition == null) {
		booShowCondition = true;
	}
	if (objCheckControl != null && objTargetControl != null) {
		if (objCheckControl.checked == booShowCondition) {
			objTargetControl.style.display = '';
		} else {
			objTargetControl.style.display = 'none';
			if (strClearControlId != null) {
				if (document.getElementById(strClearControlId).type == "text") {
					document.getElementById(strClearControlId).value = '';
				} else {
					uncheckCheckboxRecursive($(strClearControlId));
				}
			}
		}
	}
}

function uncheckCheckboxRecursive(objParent) {
	if (objParent.type == "checkbox") {
		objParent.checked = false;
	} else {
		if (objParent.tagName == "DIV" || objParent.tagName == "SPAN") {
			objParent.hide();
		}
		var aryChild = objParent.childElements();
		for(var intIndex = 0; intIndex < aryChild.length; intIndex++) {
			uncheckCheckboxRecursive(aryChild[intIndex]);
		}
	}
}

/*****************************
* Function append_event
* イベントハンドラ登録用関数
*
* @param  ele  ... element
*         type ... event name
*         func ... function name
*****************************/
function append_event( ele, type, func )
{
	if (ele.addEventListener) {
		ele.addEventListener(type, func, false);
	} else {
		ele.attachEvent('on' + type, func);
	}
}

/*****************************
* Function set cookie
*
* @param  c_name  ... cookie name
*         value ... value
*         expiredays ... expire time in days
*         path ... path
*****************************/
function setCookie(c_name, value, expiredays, path)
{
	var exdate = new Date();
	exdate.setDate(exdate.getDate() + expiredays);
	document.cookie = c_name+ "=" + escape(value) + ((expiredays == null) ? "" : ";expires=" + exdate.toUTCString()) + ((path == null) ? "" : ";path=" + path);
}

/*****************************
* Function get cookie
*
* @param  c_name  ... cookie name
* @return value of cookie
*****************************/
function getCookie(c_name)
{
	if (document.cookie.length > 0) {
		c_start=document.cookie.indexOf(c_name + "=");
		if (c_start != -1) {
			c_start = c_start + c_name.length + 1;
			c_end = document.cookie.indexOf(";", c_start);
			if (c_end == -1) {
				c_end = document.cookie.length;
			}
			return unescape(document.cookie.substring(c_start, c_end));
		}
	}
	return "";
}

/*****************************
* Function updateJpDate
* Change date in format yyyy/mm/dd to jp date
*
* @param strElementValue ... id of hidden element
* @param strElementResult ... id of element to display
* @param strPrefix ... the string added before value
* @param strSubfix ... the string added behind value
*****************************/
function updateJpDate(strElementValue, strElementResult, strPrefix, strSubfix)
{
	var objItem = document.getElementById(strElementResult);
	var objValue = document.getElementById(strElementValue);
	if(objItem && objValue) {
		if (objValue.value != "") {
			// Create JpCalendar object
			var objJpCalendar = new myJpCalendar();
			var strResult = objJpCalendar.changeJPDate(objValue.value, false);
			if (strPrefix != null) {
				strResult = strPrefix + strResult;
			}
			if (strSubfix != null) {
				strResult += strSubfix;
			}
			if (objItem.tagName == 'INPUT') {
				objItem.value = strResult;
			} else {
				objItem.innerHTML = strResult;
			}
		}
	}
}

/*****************************
* Function printJpDate
* Print date in JP format
*
* @param strDate ... date in format yyyy/mm/dd
*****************************/
function printJpDate(strDate)
{
	// Create JpCalendar object
	var objJpCalendar = new myJpCalendar();
	strDate = objJpCalendar.formatDate(strDate);
	if (objJpCalendar.checkValidDate(strDate)) {
		document.write(objJpCalendar.changeJPDate(strDate));
	}
}

/*****************************
* Function changeJpDateInputIntoNormal
* Get date value of a item in JP format
* copy into another item then change into normal format date
*
* @param strSourceName ... name of item contains jp date
* @param strTargetName ... name of item will be updated value
*****************************/
function changeJpDateInputIntoNormal(strSourceName, strTargetName)
{
	// Create JpCalendar object
	var objJpCalendar = new myJpCalendar();

	// Get elements
	var objSource = document.getElementById(strSourceName);
	var objTarget = document.getElementById(strTargetName);

	// Trim all input
	objSource.value = objSource.value.trimAll();

	// Change input from jp calendar to format yyyy/mm/dd
	var strInputValue = objJpCalendar.formatExceptFullDate(objSource.value);
	strInputValue = objJpCalendar.formatDate(strInputValue);
	if (objJpCalendar.checkValidDate(strInputValue)) {
		objTarget.value = strInputValue;
	} else {
		objTarget.value = "";
	}
}

/*****************************
* prototype trim
* Trim space 1 and 2 bytes
*****************************/
String.prototype.trim = function()
{
	return this.replace(/^[\s\u3000]+|[\s\u3000]+$/g, '');
}

/*****************************
* Function updateDisplayToShowJpDate
* Update link that contains jpdate
*
* @param intCount ... number of records
* @param strSpanId ... name of item contain date in normal format
* @param strSpanId ... name of item link
*****************************/
function updateDisplayToShowJpDate(intCount, strSpanId, strLinkId)
{
	// Create JpCalendar object
	var objJpCalendar = new myJpCalendar();

	for (var intIndex = 1; intIndex <= intCount; intIndex++ ) {
		var objSpan = document.getElementById(strSpanId + intIndex);

		if (objSpan) {
			var strDateValue = objSpan.innerHTML;
			if (objJpCalendar.checkValidDate(strDateValue)) {
				strDateValue = objJpCalendar.changeJPDate(strDateValue);
				objSpan.innerHTML = strDateValue + "&nbsp;&nbsp;";
				if (strLinkId) {
					var objLink = document.getElementById(strLinkId + intIndex);
					objLink.title = strDateValue + "  " + objLink.title;
				}
			} else {
				objSpan.innerHTML = "";
			}
		} else {
			return;
		}
	}
}

/*****************************
* Function getFloatingSize
* Calculate the size for floating window
*
*****************************/
function getFloatingSize()
{
	// for Internet Explorer
	if (document.all) {
		if ( document.documentElement ) {
			pos = document.documentElement;
		} else {
			pos = document.body;
		}
		var floatHeight = pos.clientHeight - 100;
		var floatWidth = pos.clientWidth - 300;
	// for Netscape 6.*
	} else if (document.getElementById) {
		var floatHeight = window.innerHeight - 100;
		var floatWidth = window.innerWidth - 300;
	}

	return new Array(floatHeight, floatWidth);
}

/*****************************
* Function createFloatingWindow
* Create new floating window
*
* @param intWidth ... width
* @param intHeight ... height
*****************************/
function createFloatingWindow(intWidth, intHeight)
{
	if (intWidth == null) {
		intWidth = 300;
	}
	if (intHeight == null) {
		intHeight = 200;
	}
	var objFloating = new Window({className: "dialog", url: "",
		minimizable: false, maximizable: false, closable: true, width: intWidth, height: intHeight, zIndex: 100,
		showEffect: Element.show, hideEffect: Element.hide, resizable: false, title: "", draggable: false, wiredDrag: false});
	var objStatus = document.getElementById(objFloating.getId() + '_bottom');
	if (objStatus) {
		objStatus.innerHTML = '';
	}
	return objFloating;
}

/*****************************
* Function floatingWindowTabKeyDown
* Move within window when press tab key
*
* @param 	strFirstControl ... id of first control
* 			strLastControl ... id of last control
*****************************/
function floatingWindowTabKeyDown(strFirstControl, strLastControl)
{
	setTimeout("doWindowTabKeyDown('" + strFirstControl +  "','" + strLastControl + "')", 50, "Javascript");
}

function doWindowTabKeyDown(strFirstControl, strLastControl)
{
	// Init gloabal variable
	document.myActiveElement = null;
	var strFirstControlId = strFirstControl;

	// Declare function handler key down event
	function keypressHandler(event){
		var key;
		if (window.event) {
			//it's IE
			key = window.event.keyCode;
		} else {
			key = event.which;
		}
		// Press TAB key and the last control is focused
		if (key == 9 && document.myActiveElement) {
			if (document.myActiveElement.id == strLastControl) {
				document.getElementById(strFirstControlId).focus();
				document.myActiveElement = null;
				return false;
			}
		}
		document.myActiveElement = null;
	}
	document.onkeydown = function(event) {
		return keypressHandler(event);
	}
	var objLast = document.getElementById(strLastControl)
	objLast.onfocus = new Function ("document.myActiveElement=this;");

	document.getElementById(strFirstControlId).focus();
}

/*****************************
* Function trimElementValue
* Trim value of element
*
* @param strId ... id of element
*****************************/
function trimElementValue(strId)
{
	var objElement = document.getElementById(strId);
	objElement.value = objElement.value.trim();
}


/*****************************
* Function select checkbox
* Check or uncheck a element
*
* @param strId ...id of element
* @param strIdBottom ... id of element
*****************************/
function selectCheckBox(strId, strIdBottom)
{
	if (strIdBottom == 'radRent') {
		if (strId) {
			for (var intI = 0; intI <= 6 ; intI++) {
				if (strId == 'aryLeft_radRent_' + intI) {
					document.getElementById('aryBottom_radRent_' + intI).checked = true;
					break;
				}
			}
		}
	} else if (strIdBottom == 'radArea') {
		for (var intI = 0; intI <= 6 ; intI++) {
			if (strId == 'aryLeft_radArea_' + intI) {
				document.getElementById('aryBottom_radArea_' + intI).checked = true;
				break;
			}
		}
	} else {
		var objElement = document.getElementById(strId);
		var objElementBottom = document.getElementById(strIdBottom);
		if (objElement.checked == false) {
			objElementBottom.checked = false;
		} else {
			objElementBottom.checked = true;
		}
	}
}

/*****************************
*
* Function get parameter from left menu
*
*****************************/
function getParamFromLeftMenu()
{
	strParam = '';

	if ($('aryBottom_fid') && $('aryBottom_fid').value != '') {
		strParam += '/fid/' + $('aryBottom_fid').value ;
	}


	// 賃料
	for (var intI = 0; intI <= 6; intI++) {
		if ($('aryLeft_radRent_' + intI).checked == true) {
			strParam += '/radRent/'+ intI;
			break;
		}
	}
	// キャンペーン有り
	if ($('aryLeft_chkCampaign').checked == true) {
		strParam += '/chkCampaign/1';
	}
	// 広さ
	for (var intI = 0; intI <= 6; intI++) {
		if ($('aryLeft_radArea_' + intI).checked == true) {
			strParam += '/radArea/'+ intI;
			break;
		}
	}
	// ご希望の地域
	var strArea = '';
	var chkObj = document.getElementsByName('chkDist');
	if (chkObj) {
		var chkLength = chkObj.length;
		if (chkLength) {
			for(var i = 0; i < chkLength; i++) {
				if(chkObj[i].checked == true) {
					strArea += "_" + chkObj[i].value;
				}
			}
		}
	}
	if (strArea != '') {
		strParam += '/chkDist/' + strArea + "_";
	}
	strArea = '';


	var chkObj = document.getElementsByName('chkPref');
	if (chkObj) {
		var chkLength = chkObj.length;
		if (chkLength) {
			for(var i = 0; i < chkLength; i++) {
				if(chkObj[i].checked == true) {
					strArea += "_" + chkObj[i].value;
				}
			}
		}
	}
	if (strArea != '') {
		strParam += '/chkPref/' + strArea + "_";
	}
	strArea = '';

	var chkObj = document.getElementsByName('chkCity');
	if (chkObj) {
		var chkLength = chkObj.length;
		if (chkLength) {
			for(var i = 0; i < chkLength; i++) {
				if(chkObj[i].checked == true) {
					strArea += "_" + chkObj[i].value;
				}
			}
		}
	}
	if (strArea != '') {
		strParam += '/chkCity/' + strArea + "_";
	}

/*	var strArea = '';
	if ($('aryLeft_chkHokkaido_1').checked == true) {
		strArea += "a1p1";
		var chkObj = document.getElementsByName('aryLeft[chkCityOfHokkaido][]');
		if (chkObj) {
			var chkLength = chkObj.length;
			if (chkLength) {
				for(var i = 0; i < chkLength; i++) {
					if(chkObj[i].checked == true) {
						strArea += "c" + chkObj[i].value;
					}
				}
			}
		}
	}
	if ($('aryLeft_chkNorthEastArea_1').checked == true) {
		strArea += "a2";
		strArea += getPreCity('aryLeft[chkAomori][]', 'aryLeft[chkCityOfAomori][]');

		strArea += getPreCity('aryLeft[chkIwate][]', 'aryLeft[chkCityOfIwate][]');

		strArea += getPreCity('aryLeft[chkMiyagi][]', 'aryLeft[chkCityOfMiyagi][]');

		strArea += getPreCity('aryLeft[chkAkita][]', 'aryLeft[chkCityOfAkita][]');

		strArea += getPreCity('aryLeft[chkYamagata][]', 'aryLeft[chkCityOfYamagata][]');

		strArea += getPreCity('aryLeft[chkFukushima][]', 'aryLeft[chkCityOfYFukushima][]');
	}
	if ($('aryLeft_chkKanToArea_1').checked == true) {
		strArea += "a3";
		strArea += getPreCity('aryLeft[chkIbaraki][]', 'aryLeft[chkCityOfIbaraki][]');

		strArea += getPreCity('aryLeft[chkTochigi][]', 'aryLeft[chkCityOfTochigi][]');

		strArea += getPreCity('aryLeft[chkGunma][]', 'aryLeft[chkCityOfGunma][]');

		strArea += getPreCity('aryLeft[chkSaitama][]', 'aryLeft[chkCityOfSaitama][]');

		strArea += getPreCity('aryLeft[chkChiba][]', 'aryLeft[chkCityOfChiba][]');

		strArea += getPreCity('aryLeft[chkTokyo][]', 'aryLeft[chkCityOfTokyo][]');

		strArea += getPreCity('aryLeft[chkKanagawa][]', 'aryLeft[chkCityOfKanagawa][]');
	}
	if ($('aryLeft_chkHokurikuArea_1').checked == true) {
		strArea += "a4";
		strArea += getPreCity('aryLeft[chkNiigata][]', 'aryLeft[chkCityOfNiigata][]');

		strArea += getPreCity('aryLeft[chkToyama][]', 'aryLeft[chkCityOfToyama][]');

		strArea += getPreCity('aryLeft[chkIshikawa][]', 'aryLeft[chkCityOfIshikawa][]');

		strArea += getPreCity('aryLeft[chkFukui][]', 'aryLeft[chkCityOfFukui][]');

		strArea += getPreCity('aryLeft[chkYamanashi][]', 'aryLeft[chkCityOfYamanashi][]');

		strArea += getPreCity('aryLeft[chkNagano][]', 'aryLeft[chkCityOfNagano][]');
	}
	if ($('aryLeft_chkEastSeaArea_1').checked == true) {
		strArea += "a5";
		strArea += getPreCity('aryLeft[chkGifu][]', 'aryLeft[chkCityOfGifu][]');

		strArea += getPreCity('aryLeft[chkShizuoka][]', 'aryLeft[chkCityOfShizuoka][]');

		strArea += getPreCity('aryLeft[chkAichi][]', 'aryLeft[chkCityOfAichi][]');

		strArea += getPreCity('aryLeft[chkMie][]', 'aryLeft[chkCityOfMie][]');
	}
	if ($('aryLeft_chkKansaiArea_1').checked == true) {
		strArea += "a6";
		strArea += getPreCity('aryLeft[chkShiga][]', 'aryLeft[chkCityOfShiga][]');

		strArea += getPreCity('aryLeft[chkKyoto][]', 'aryLeft[chkCityOfKyoto][]');

		strArea += getPreCity('aryLeft[chkOsaka][]', 'aryLeft[chkCityOfOsaka][]');

		strArea += getPreCity('aryLeft[chkHyogo][]', 'aryLeft[chkCityOfHyogo][]');

		strArea += getPreCity('aryLeft[chkNARA][]', 'aryLeft[chkCityOfNARA][]');

		strArea += getPreCity('aryLeft[chkWakayama][]', 'aryLeft[chkCityOfWakayama][]');
	}
	if ($('aryLeft_chkChinaArea_1').checked == true) {
		strArea += "a7";
		strArea += getPreCity('aryLeft[chkTottori][]', 'aryLeft[chkCityOfTottori][]');

		strArea += getPreCity('aryLeft[chkShimane][]', 'aryLeft[chkCityOfShimane][]');

		strArea += getPreCity('aryLeft[chkOkayama][]', 'aryLeft[chkCityOfOkayama][]');

		strArea += getPreCity('aryLeft[chkHiroshima][]', 'aryLeft[chkCityOfHiroshima][]');

		strArea += getPreCity('aryLeft[chkYamaguchi][]', 'aryLeft[chkCityOfYamaguchi][]');
	}
	if ($('aryLeft_chkShikokuArea_1').checked == true) {
		strArea += "a8";
		strArea += getPreCity('aryLeft[chkTokushima][]', 'aryLeft[chkCityOfTokushima][]');

		strArea += getPreCity('aryLeft[chkKagawa][]', 'aryLeft[chkCityOfKagawa][]');

		strArea += getPreCity('aryLeft[chkEhime][]', 'aryLeft[chkCityOfEhime][]');

		strArea += getPreCity('aryLeft[chkKochi][]', 'aryLeft[chkCityOfKochi][]');
	}
	if ($('aryLeft_chkKyushuArea_1').checked == true) {
		strArea += "a9";
		strArea += getPreCity('aryLeft[chkFukuoka][]', 'aryLeft[chkCityOfFukuoka][]');

		strArea += getPreCity('aryLeft[chkSaga][]', 'aryLeft[chkCityOfSaga][]');

		strArea += getPreCity('aryLeft[chkNagasaki][]', 'aryLeft[chkCityOfNagasaki][]');

		strArea += getPreCity('aryLeft[chkKumamoto][]', 'aryLeft[chkCityOfKumamoto][]');

		strArea += getPreCity('aryLeft[chkOita][]', 'aryLeft[chkCityOfOita][]');

		strArea += getPreCity('aryLeft[chkMiyazaki][]', 'aryLeft[chkCityOfMiyazaki][]');

		strArea += getPreCity('aryLeft[chkKagoshima][]', 'aryLeft[chkCityOfKagoshima][]');
	}
	if ($('aryLeft_chkOkinawa_47').checked == true) {
		strArea += "a10p47";
		var chkObj = document.getElementsByName('aryLeft[chkOkinawa][]');
		if (chkObj) {
			var chkLength = chkObj.length;
			if (chkLength) {
				for(var i = 0; i < chkLength; i++) {
					if(chkObj[i].checked == true) {
						strArea += "c" + chkObj[i].value;
					}
				}
			}
		}
	}

	*/
	// タイプ
	if ($('aryLeft_chkIsIndoor').checked == true) {
		strParam += '/chkIsIndoor/1';
	}
	if ($('aryLeft_chkIsOutdoor').checked == true) {
		strParam += '/chkIsOutdoor/1';
	}
	if ($('aryLeft_chkServiceCarryingDelivery').checked == true) {
		strParam += '/chkServiceCarryingDelivery/1';
	}
	if ($('aryLeft_chkServicePossibleCarryingByCar').checked == true) {
		strParam += '/chkServicePossibleCarryingByCar/1';
	}
	if ($('aryLeft_chkService24hoursOut').checked == true) {
		strParam += '/chkService24hoursOut/1';
	}
	if ($('aryLeft_chkServiceHumidityControl').checked == true) {
		strParam += '/chkServiceHumidityControl/1';
	}
	if ($('aryLeft_chkServiceTemperatureControl').checked == true) {
		strParam += '/chkServiceTemperatureControl/1';
	}
	if ($('aryLeft_chkServiceSecuritySystem').checked == true) {
		strParam += '/chkServiceSecuritySystem/1';
	}
	if ($('aryLeft_chkServiceSecurityCamera').checked == true) {
		strParam += '/chkServiceSecurityCamera/1';
	}
	if ($('aryLeft_chkServiceContractSecurityCompany').checked == true) {
		strParam += '/chkServiceContractSecurityCompany/1';
	}
	if ($('aryLeft_chkServiceHaveInsurance').checked == true) {
		strParam += '/chkServiceHaveInsurance/1';
	}
	if ($('aryLeft_chkServiceAcceptValuables').checked == true) {
		strParam += '/chkServiceAcceptValuables/1';
	}
	// 預けるもの
	if ($('aryLeft_chkTrunkLeaveFurniture').checked == true) {
		strParam += '/chkTrunkLeaveFurniture/1';
	}
	if ($('aryLeft_chkTrunkLeaveAppliance').checked == true) {
		strParam += '/chkTrunkLeaveAppliance/1';
	}
	if ($('aryLeft_chkTrunkLeaveBike').checked == true) {
		strParam += '/chkTrunkLeaveBike/1';
	}
	if ($('aryLeft_chkTrunkLeaveCar').checked == true) {
		strParam += '/chkTrunkLeaveCar/1';
	}
	if ($('aryLeft_chkTrunkLeaveOutdoor').checked == true) {
		strParam += '/chkTrunkLeaveOutdoor/1';
	}
	if ($('aryLeft_chkTrunkLeaveSports').checked == true) {
		strParam += '/chkTrunkLeaveSports/1';
	}
	if ($('aryLeft_chkTrunkLeaveGolf').checked == true) {
		strParam += '/chkTrunkLeaveGolf/1';
	}
	if ($('aryLeft_chkTrunkLeaveSeason').checked == true) {
		strParam += '/chkTrunkLeaveSeason/1';
	}
	if ($('aryLeft_chkTrunkLeaveClothing').checked == true) {
		strParam += '/chkTrunkLeaveClothing/1';
	}
	if ($('aryLeft_chkTrunkLeaveBedding').checked == true) {
		strParam += '/chkTrunkLeaveBedding/1';
	}
	if ($('aryLeft_chkTrunkLeaveEvent').checked == true) {
		strParam += '/chkTrunkLeaveEvent/1';
	}
	if ($('aryLeft_chkTrunkLeaveBook').checked == true) {
		strParam += '/chkTrunkLeaveBook/1';
	}
	if ($('aryLeft_chkTrunkLeaveRecord').checked == true) {
		strParam += '/chkTrunkLeaveRecord/1';
	}
	if ($('aryLeft_chkTrunkLeavePiano').checked == true) {
		strParam += '/chkTrunkLeavePiano/1';
	}
	if ($('aryLeft_chkTrunkLeaveInstrument').checked == true) {
		strParam += '/chkTrunkLeaveInstrument/1';
	}
	if ($('aryLeft_chkTrunkLeaveWood').checked == true) {
		strParam += '/chkTrunkLeaveWood/1';
	}
	if ($('aryLeft_chkTrunkLeaveTool').checked == true) {
		strParam += '/chkTrunkLeaveTool/1';
	}
	if ($('aryLeft_chkTrunkLeaveOa').checked == true) {
		strParam += '/chkTrunkLeaveOa/1';
	}
	if ($('aryLeft_chkTrunkLeaveWine').checked == true) {
		strParam += '/chkTrunkLeaveWine/1';
	}
	if ($('aryLeft_chkTrunkLeaveFur').checked == true) {
		strParam += '/chkTrunkLeaveFur/1';
	}
	if ($('aryLeft_chkTrunkLeaveGem').checked == true) {
		strParam += '/chkTrunkLeaveGem/1';
	}
	if ($('aryLeft_chkTrunkLeavePapers').checked == true) {
		strParam += '/chkTrunkLeavePapers/1';
	}
	if ($('aryLeft_chkTrunkLeaveAntique').checked == true) {
		strParam += '/chkTrunkLeaveAntique/1';
	}
	if ($('isMap').value == "1") {
		strParam += '/map/1';
	}
	return strParam;
}

/*****************************
*
* Function get prefecture and city
* if have checked
*
*****************************/
function getPreCity(strPreName, strCityName)
{
	var strArea = '';
	var chkObj = document.getElementsByName(strPreName);
	if (chkObj) {
		if(chkObj[0].checked == true) {
			strArea += "p" + chkObj[0].value;
			var chkObjCity = document.getElementsByName(strCityName);
			if (chkObjCity) {
				var chkLength = chkObjCity.length;
				if (chkLength) {
					for(var i = 0; i < chkLength; i++) {
						if(chkObjCity[i].checked == true) {
							strArea += "c" + chkObjCity[i].value;
						}
					}
				}
			}
		}
	}
	return strArea;
}

/*****************************
*
* Function get parameter from left menu
*
*****************************/
function getParamFromBottomForm()
{
	strParam = '';

	if ($('aryBottom_fid') && $('aryBottom_fid').value != '') {
		strParam += '/fid/' + $('aryBottom_fid').value ;
	}
	// 賃料
	for (var intI = 0; intI <= 6; intI++) {
		if ($('aryBottom_radRent_' + intI).checked == true) {
			strParam += '/radRent/'+ intI;
			break;
		}
	}
	// キャンペーン有り
	if ($('aryBottom_chkCampaign').checked == true) {
		strParam += '/chkCampaign/1';
	}
	// 広さ
	for (var intI = 0; intI <= 6; intI++) {
		if ($('aryBottom_radArea_' + intI).checked == true) {
			strParam += '/radArea/'+ intI;
			break;
		}
	}
	// ご希望の地域
	var strArea = '';
	var chkObj = document.getElementsByName('chkDist');
	if (chkObj) {
		var chkLength = chkObj.length;
		if (chkLength) {
			for(var i = 0; i < chkLength; i++) {
				if(chkObj[i].checked == true) {
					strArea += "_" + chkObj[i].value;
				}
			}
		}
	}
	if (strArea != '') {
		strParam += '/chkDist/' + strArea + "_";
	}
	strArea = '';


	var chkObj = document.getElementsByName('chkPref');
	if (chkObj) {
		var chkLength = chkObj.length;
		if (chkLength) {
			for(var i = 0; i < chkLength; i++) {
				if(chkObj[i].checked == true) {
					strArea += "_" + chkObj[i].value;
				}
			}
		}
	}
	if (strArea != '') {
		strParam += '/chkPref/' + strArea + "_";
	}
	strArea = '';

	var chkObj = document.getElementsByName('chkCity');
	if (chkObj) {
		var chkLength = chkObj.length;
		if (chkLength) {
			for(var i = 0; i < chkLength; i++) {
				if(chkObj[i].checked == true) {
					strArea += "_" + chkObj[i].value;
				}
			}
		}
	}
	if (strArea != '') {
		strParam += '/chkCity/' + strArea + "_";
	}

	// タイプ
	if ($('aryBottom_chkIsIndoor').checked == true) {
		strParam += '/chkIsIndoor/1';
	}
	if ($('aryBottom_chkIsOutdoor').checked == true) {
		strParam += '/chkIsOutdoor/1';
	}
	if ($('aryBottom_chkServiceCarryingDelivery').checked == true) {
		strParam += '/chkServiceCarryingDelivery/1';
	}
	if ($('aryBottom_chkServicePossibleCarryingByCar').checked == true) {
		strParam += '/chkServicePossibleCarryingByCar/1';
	}
	if ($('aryBottom_chkService24hoursOut').checked == true) {
		strParam += '/chkService24hoursOut/1';
	}
	if ($('aryBottom_chkServiceHumidityControl').checked == true) {
		strParam += '/chkServiceHumidityControl/1';
	}
	if ($('aryBottom_chkServiceTemperatureControl').checked == true) {
		strParam += '/chkServiceTemperatureControl/1';
	}
	if ($('aryBottom_chkServiceSecuritySystem').checked == true) {
		strParam += '/chkServiceSecuritySystem/1';
	}
	if ($('aryBottom_chkServiceSecurityCamera').checked == true) {
		strParam += '/chkServiceSecurityCamera/1';
	}
	if ($('aryBottom_chkServiceContractSecurityCompany').checked == true) {
		strParam += '/chkServiceContractSecurityCompany/1';
	}
	if ($('aryBottom_chkServiceHaveInsurance').checked == true) {
		strParam += '/chkServiceHaveInsurance/1';
	}
	if ($('aryBottom_chkServiceAcceptValuables').checked == true) {
		strParam += '/chkServiceAcceptValuables/1';
	}
	// 預けるもの
	if ($('aryBottom_chkTrunkLeaveFurniture').checked == true) {
		strParam += '/chkTrunkLeaveFurniture/1';
	}
	if ($('aryBottom_chkTrunkLeaveAppliance').checked == true) {
		strParam += '/chkTrunkLeaveAppliance/1';
	}
	if ($('aryBottom_chkTrunkLeaveBike').checked == true) {
		strParam += '/chkTrunkLeaveBike/1';
	}
	if ($('aryBottom_chkTrunkLeaveCar').checked == true) {
		strParam += '/chkTrunkLeaveCar/1';
	}
	if ($('aryBottom_chkTrunkLeaveOutdoor').checked == true) {
		strParam += '/chkTrunkLeaveOutdoor/1';
	}
	if ($('aryBottom_chkTrunkLeaveSports').checked == true) {
		strParam += '/chkTrunkLeaveSports/1';
	}
	if ($('aryBottom_chkTrunkLeaveGolf').checked == true) {
		strParam += '/chkTrunkLeaveGolf/1';
	}
	if ($('aryBottom_chkTrunkLeaveSeason').checked == true) {
		strParam += '/chkTrunkLeaveSeason/1';
	}
	if ($('aryBottom_chkTrunkLeaveClothing').checked == true) {
		strParam += '/chkTrunkLeaveClothing/1';
	}
	if ($('aryBottom_chkTrunkLeaveBedding').checked == true) {
		strParam += '/chkTrunkLeaveBedding/1';
	}
	if ($('aryBottom_chkTrunkLeaveEvent').checked == true) {
		strParam += '/chkTrunkLeaveEvent/1';
	}
	if ($('aryBottom_chkTrunkLeaveBook').checked == true) {
		strParam += '/chkTrunkLeaveBook/1';
	}
	if ($('aryBottom_chkTrunkLeaveRecord').checked == true) {
		strParam += '/chkTrunkLeaveRecord/1';
	}
	if ($('aryBottom_chkTrunkLeavePiano').checked == true) {
		strParam += '/chkTrunkLeavePiano/1';
	}
	if ($('aryBottom_chkTrunkLeaveInstrument').checked == true) {
		strParam += '/chkTrunkLeaveInstrument/1';
	}
	if ($('aryBottom_chkTrunkLeaveWood').checked == true) {
		strParam += '/chkTrunkLeaveWood/1';
	}
	if ($('aryBottom_chkTrunkLeaveTool').checked == true) {
		strParam += '/chkTrunkLeaveTool/1';
	}
	if ($('aryBottom_chkTrunkLeaveOa').checked == true) {
		strParam += '/chkTrunkLeaveOa/1';
	}
	if ($('aryBottom_chkTrunkLeaveWine').checked == true) {
		strParam += '/chkTrunkLeaveWine/1';
	}
	if ($('aryBottom_chkTrunkLeaveFur').checked == true) {
		strParam += '/chkTrunkLeaveFur/1';
	}
	if ($('aryBottom_chkTrunkLeaveGem').checked == true) {
		strParam += '/chkTrunkLeaveGem/1';
	}
	if ($('aryBottom_chkTrunkLeavePapers').checked == true) {
		strParam += '/chkTrunkLeavePapers/1';
	}
	if ($('aryBottom_chkTrunkLeaveAntique').checked == true) {
		strParam += '/chkTrunkLeaveAntique/1';
	}
	if ($('isMap').value == "1") {
		strParam += '/map/1';
	}
	return strParam;
}
