function openOnNewWindow(url, title) {
	var win = window.open(url, title, 'status,resizable,toolbar,menubar,location,scrollbars');
	win.focus();
}

// トップページ・IDの代入
function ateEstId(id) {
	document.forms[0].id.value = id;
}

function forcusSelectedListBox() {

	var selected = $("#hiddenCount").val();
	var select = $('.listAmount').each(function(){
		if (selected == 10) {
			$(this).val(10);
		} else if(selected == 20) {
			$(this).val(20);
		} else if (selected == 50) {
			$(this).val(50);
		}
	});
}

function orderSetting(){
	document.getElementById("priceSetting").className;

}

function jump(count) {
	document.selectForm.submit();
}

function jump2(count) {
	document.selectForm2.submit();
}

function setSearchInput(){
	var bottomPrice = $("#hidBotmPrice").val();
	var topPrice = $("#hideTopPrice").val();
	var area = $("#hidArea").val()
	var dateType = $("#hidDateType").val();
	var publicFlag = $("#hidPublicFlag").val();
	var privateFlag = $("#hidPrivateFlag").val();
	var structure = $("#hidStructure").val();

	var areaList = area.substr(1, area.length -2).replace(/\s/g,"").split(",");
	var structureList = structure.substr(1, structure.length -2).replace(/\s/g,"").split(",");
	
	$('#bottomPriceSelect').each(function(){
		$(this).val(bottomPrice);
	});

	$('#topPriceSelect').each(function(){
		$(this).val(topPrice);
	});

	$('#dateTypeSelect').each(function(){
		$(this).val(dateType);
	});

	if(publicFlag == "On"){
		$('.publicSelect').attr("checked", "checked");
	}

	if(privateFlag == "On"){
		$('.privateSelect').attr("checked", "checked");
	}
	
	$(".area").each(function(){
		for ( var i = 0; i < areaList.length; i++) {
			if ($(this).val() == areaList[i]) {
				$(this).attr("checked", "checked");
			}
		}
	});
	
	$(".structure").each(function(){
		for ( var i = 0; i < structureList.length; i++) {
			if ($(this).val() == structureList[i]) {
				$(this).attr("checked", "checked");
			}
		}
	});
}

// 検討リスト画面で検討物件を削除した際にメッセージを表示する処理
function messageDisplay(deleteFlg){
	if(deleteFlg == 'true'){
		$.jGrowl('検討リストから外しました。');
	}
}

function showMap(path) {
	var options = "width=720px,height=625px,location=no,scrollbars=yes,resizable=yes";
	var newwin = window.open(path, "newwin", options);
	newwin.focus();
}
function showScore(path) {
	var options = "width=720px,height=690px,location=no,scrollbars=yes,resizable=yes";
	var newwin = window.open(path, "newwin", options);
	newwin.focus();
}