//---------------------------------------------------------------------------
// トップページ地域検索用
//---------------------------------------------------------------------------
function form_area_post(apoint) {
	if (document.area_form.select_type[0].checked) {
		window.location.href="/estate/digest/?mode=buy&area="+apoint;
	} else if (document.area_form.select_type[1].checked) {
		window.location.href="/estate/digest/?mode=lease&area="+apoint;
	}
}

//---------------------------------------------------------------------------
// サイドメニュー検索用
//---------------------------------------------------------------------------
function form_word_post() {
	if (document.word_form.select_type[0].checked) {
		window.location.href="/estate/digest/?mode=buy&keyword2="+encodeURI(document.word_form.keyword2.value);
	} else if (document.word_form.select_type[1].checked) {
		window.location.href="/estate/digest/?mode=lease&keyword2="+encodeURI(document.word_form.keyword2.value);
	}
}

//---------------------------------------------------------------------------
// 画像表示ウィンドウ生成
//---------------------------------------------------------------------------
/*ZOOMPhoto*/
if (document.all && !window.opera){  // IE4以上
  myMarginX = 20; // マージン横幅
  myMarginY = 20; // マージン縦幅
}else if (document.getElementById || document.layers){ // NS4以上(OP)
  myMarginX = 16; // マージン横幅
  myMarginY = 16; // マージン縦幅
}else{  // IE3.02とする
  myMarginX = 22; // マージン横幅
  myMarginY = 6;  // マージン縦幅
}
function myGo(myJpeg,myTitle,myWidth,myHeight){
//IE6を判別
if(navigator.appName=="Microsoft Internet Explorer" &&
   navigator.userAgent.indexOf("MSIE 6.0") != -1){
   myMarginX = 20; // マージン横幅
}
 myXX=myWidth + myMarginX;	// ウィンドウ横幅
 myYY=myHeight + myMarginY;	// ウィンドウ縦幅
 myWinName = "Win";					// ウィンドウ名
 myWinSize = "status=no,resizable=no,scrollbars=no"+",width=" + myXX + ",height=" + myYY; // ウィンドウオプション
 myWin = window.open("" , myWinName , myWinSize); // ウィンドウを開く
 myWin.document.open();
 myWin.document.write('<html>');
 myWin.document.write('<head>');
 myWin.document.write('<title>'+myTitle+'<','/title>');
 myWin.document.write('<','/head>');
 myWin.document.write('<body topmargin=0 leftmargin=0>');
 myWin.document.write('<div align=\"center\">');
 myWin.document.write('<a href=\"javascript:window.close();\">');
 myWin.document.write('<img src=\"'+myJpeg+'\" border=\"0\" alt=\"'+myTitle+'\">');
 myWin.document.write('</a>');
 myWin.document.write('</div>');
 myWin.document.write('<' , '/body>');
 myWin.document.write('<' , '/html>');
 myWin.document.close();
}

//---------------------------------------------------------------------------
// GoogleMap 詳細ページ用
//---------------------------------------------------------------------------
//<![CDATA[
	function load_map(ido, keido, s_name, r_scale) {
		if (GBrowserIsCompatible()) {
			var map = new GMap2(document.getElementById("map"));
			map.addControl(new GSmallMapControl());
			map.addControl(new GScaleControl());
			//緯度経度を入力する。
			map.setCenter(new GLatLng(ido, keido), r_scale);
			// ポップアップテキスト（名称、電話番号など）
			var infoText = "<b>"+s_name+"</b>";
			var marker = new GMarker(map.getCenter());
			GEvent.addListener(marker, "click", function() {marker.openInfoWindowHtml(infoText);});
			map.addOverlay(marker);
		}
	}
//]]>

//---------------------------------------------------------------------------
// 分譲地リスト取得
//---------------------------------------------------------------------------
	function bj_list_get(pno,bno,bid,cid,typ,id) {
		ajax = false;
		// IE以外
		if(window.XMLHttpRequest) {
			ajax = new XMLHttpRequest();
		// IE用
		} else if(window.ActiveXObject) {
			try {
				ajax = new ActiveXObject("Msxml2.XMLHTTP");
			} catch(e) {
				ajax = new ActiveXObject("Microsoft.XMLHTTP");
			}
		}
		var dd = new Date();
		ajax.open("GET", "/estate/detail/bj_list_get.cfm?bj_pno="+pno+"&bj_bno="+bno+"&bj_bid="+bid+"&bj_cid="+cid+"&bj_typ="+typ+"&bj_dd="+dd, false);
		ajax.send("");
		if (ajax.readyState == 4 && (ajax.status == 200 || window.location.href.indexOf("http") == -1)) {
			document.getElementById("pun-"+id).href = 'javascript:void(0);';
			document.getElementById("bj-box").innerHTML = ajax.responseText;
		}
	}


