//window.onresize = onWindowResize;

String.prototype.trim = function() {
	return this.replace(/^\s+|\s+$/g, '');
}


// ************************************************************************************
//  グローバル変数の定義
// ************************************************************************************

var bg_color = "";
var to_xpos = 0;
var to_ypos = 0;
var cur_xpos = 0;
var cur_ypos = 0;
var count = 0;
var cur_page_mode = "top";
var pre_page_mode = "";
var percent = percent2 = 0;
var obj_height = 0;
var cur_sort = "";
var cur_time = "";
var cur_user = "";
var cur_hpcolor = "";
var cur_bukken_type = "";
var new_bukken_type = "";
var cur_send_mode = "";
var bukken_type_array = new Array("land_sell","house_sell","mansion_sell","profit_sell","mansion_rent","house_rent","office_rent","land_rent","parking_rent");
var count_buff = new Array();
var	item = "";
var image_buff;
var bgimage_count = 0;	// 登録されている背景画像の数
var menu_count;			// リンクページの表示数
var body_bg_color;

// ************************************************************************************
//  ロード時に実行する
// ************************************************************************************
function onLoad(){


	get_para();

	if( arg['page'] == "detail" ){

		document.body.style.backgroundColor = "#FFF";

		$("bgBLK").style.display = "none";
		$("bg2BLK").style.display = "none";
		$("menuBLK").style.display = "none";
//		$("copyrightBLK").style.display = "none";
		$("wrapperBLK").style.width = "650px";			//
		$("wrapperBLK").style.height = "auto";
		$("mainBLK").style.width = "650px";				//
		$("mainBLK").style.height = "auto";
		$("wrapperBLK").style.display = "block";


//		$("bgBLK").style.display = "none";		// ***
//		$("bg2BLK").style.display = "none";		// ***
//		$("logoBLK").style.marginLeft = "0px";
//		$("logoBLK").style.width = "650px";
//		$("logoBLK").style.display = "none";

//		$("bukkenDetailTitleBLK").style.width = "650px";
//		$("bukkenDetailContentsBLK").style.width = "650px";
//		$("bukkenDetailContentsBLK").style.marginLeft = "0px";
//		$("bukkenDetailContentsBLK").style.marginTop = "50px";
//		$("bukkenDetailPhotoBLK").style.width = "650px";
//		$("bukkenDetailPhotoBLK").style.height = "auto";
//		$("bukkenDetailPhotoBLK").style.marginLeft = "0px";

//		$("logoBLK").style.display = "none";
//		$("toBukkenListBLK").style.display = "none";
//		$("bukkenDetailTitleBLK").style.display = "none";

//		$("bukkenDetailContentsBLK").style.overflow = "hidden";	//
//		$("bukkenDetailPhotoBLK").style.overflow = "hidden";	//

//		$("printNoticeBLK").style.display = "block";


//		$("bgBLK").style.width = "650px";		// ***
//		$("bg2BLK").style.width = "650px";		// ***

		getBukkenDetail(arg['id'],arg['btype'],1);

//		showContents();
		return;
	}

    onWindowResize();

	var i = Math.ceil(Math.random() * bgimage_count);
	$("bgImage").src = "./images/" + "bg-0" + i + ".jpg";

	$("bgImage2").src = "../sp-/images/" + "bg_frame" + body_bg_color + ".png";

	if( body_bg_color == 1 ){
		$("telop").style.color = "#000";
		document.body.style.backgroundColor = "#FFF";
	}
	else if( body_bg_color == 2 ){
		$("telop").style.color = "#EEE";
		document.body.style.backgroundColor = "#000";
	}

	$("wrapperBLK").style.display = "block";

	$("menuBLK").style.marginLeft = (900 - (menu_count * 91) - ((menu_count - 1) * 10)) / 2 + "px";

//	$("printNoticeBLK").style.display = "none"; //

	showContents();

window.onresize = onWindowResize;

}


// ************************************************************************************
//  ページを切り替える
// ************************************************************************************

function chgPage(mode){

	pre_page_mode = cur_page_mode;
	cur_page_mode = mode;

	$("notDataBLK").style.display = "none";
	$("topBLK").style.display = "none";
	$("companyBLK").style.display = "none";
	$("whatsnewBLK").style.display = "none";
	$("bukkenListBLK").style.display = "none";
	$("bukkenDetailBLK").style.display = "none";
	$("bukkenSearchBLK").style.display = "none";
	$("linkBLK").style.display = "none";
	$("inquireBLK").style.display = "none";

//	$("bukkenListContentsBLK").innerHTML = "";

	var i = Math.ceil(Math.random() * bgimage_count);
	$("bgImage").src = "./images/" + "bg-0" + i + ".jpg";

	if( mode == "company" ){
	}
	else if( mode == "bukkenList" ){

		getBukkenList("");

		for(var i=0;i<9;i++){
			if( count_buff[i] != 0 ){
				var type = bukken_type_array[i];
				getBukkenList(type);
				break;
			}
		}
		return;
	}
	else if( mode == "inquire" ){
		$("inquireConfBLK_inq").style.display = "none";
		$("inquireSuccessBLK_inq").style.display = "none";
		$("inquireErrorBLK_inq").style.display = "none";
		$("inquireContentsBLK_inq").style.display = "block";
		$("inquireContentsBGBLK").style.display = "block";

		$("name_inq").value = "";
		$("mail_inq").value = "";
		$("zip_code_inq").value = "";
		$("address1_inq").value = "";
		$("address2_inq").value = "";
		$("tel_inq").value = "";
		$("fax_inq").value = "";
		$("contents_inq").value = "";
		$("fax_inq").value = "";
		$("henshin_tel_inq").checked = false;
		$("henshin_fax_inq").checked = false;
		$("henshin_yubin_inq").checked = false;
	}
	else if( mode == "bukkenSearch" ){
		$("searchList").style.display = "none";
		$("inquireConfBLK_sea").style.display = "none";
		$("inquireSuccessBLK_sea").style.display = "none";
		$("inquireErrorBLK_sea").style.display = "none";
		$("inquireContentsBLK_sea").style.display = "block";

		$("name_sea").value = "";
		$("mail_sea").value = "";
		$("zip_code_sea").value = "";
		$("address1_sea").value = "";
		$("address2_sea").value = "";
		$("tel_sea").value = "";
		$("fax_sea").value = "";
		$("contents_sea").value = "";
		$("fax_sea").value = "";
		$("henshin_tel_sea").checked = false;
		$("henshin_fax_sea").checked = false;
		$("henshin_yubin_sea").checked = false;

		// 物件探していますのお問い合わせを非表示
		$("bukkenSearchContentsBLK").scrollTop = 0;
		$("inquireContentsBLK_sea").style.display = "none";
		$("inquireConfBLK_sea").style.display = "none";

		getBukkenSearch();
		return;
	}
	else if( mode == "whatsnew" ){
		getWhatsnew();
		return;
	}

	percent = 90; percent2 = 100;
//	percent = percent2 = 0;
	showContents();

	if( mode == "company" ){

		obj_height = $("endCompanyInfo").offsetTop;
		if( obj_height < 320 ){
			if( $("companyPhotoBackBLK") && $("companyPhotoBLK") ){
				$("companyPhotoBackBLK").style.marginTop 	= obj_height + 160 + 3 + "px";
				$("companyPhotoBLK").style.marginTop 		= obj_height + 160 + 3 + "px";
			}
		}
	}

}


function showContents(){

	if( percent <= 90 ){
		if( cur_page_mode == "comapny" && $("companyPhotoBackBLK") ){
			$("companyPhotoBackBLK").style.filter  = "alpha(opacity="+percent+")";
			$("companyPhotoBackBLK").style.MozOpacity = percent/100;
			$("companyPhotoBackBLK").style.opacity = percent/100;
		}
		else if( cur_page_mode == "bukkenDetail" ){
			$("bukkenDetailPhotoBackBLK").style.filter  = "alpha(opacity="+percent+")";
			$("bukkenDetailPhotoBackBLK").style.MozOpacity = percent/100;
			$("bukkenDetailPhotoBackBLK").style.opacity = percent/100;
		}
		else if( cur_page_mode == "inquire" ){
/*
			$("inquireBackBLK").style.filter  = "alpha(opacity="+percent+")";
			$("inquireBackBLK").style.MozOpacity = percent/100;
			$("inquireBackBLK").style.opacity = percent/100;
*/
		}
		else if( cur_page_mode == "link" ){
			$("linkBackBLK").style.filter  = "alpha(opacity="+percent+")";
			$("linkBackBLK").style.MozOpacity = percent/100;
			$("linkBackBLK").style.opacity = percent/100;
		}
		percent  += 20;
//		percent  += 10;
	}

	$(cur_page_mode+"ContentsBLK").style.filter  = "chroma(color=#444499) alpha(opacity="+percent2+") ";
	$(cur_page_mode+"ContentsBLK").style.MozOpacity = percent2/100;
	$(cur_page_mode+"ContentsBLK").style.opacity = percent2/100;

	if( cur_page_mode == "top" ){

		if( $("topNewsBLK") ){
			$("topNewsBLK").style.filter  = "chroma(color=#444499) alpha(opacity="+percent2+") ";
			$("topNewsBLK").style.MozOpacity = percent2/100;
			$("topNewsBLK").style.opacity = percent2/100;
		}

		if( $("topNewBukkenBLK") ){
			$("topNewBukkenBLK").style.filter  = "chroma(color=#444499) alpha(opacity="+percent2+") ";
			$("topNewBukkenBLK").style.MozOpacity = percent2/100;
			$("topNewBukkenBLK").style.opacity = percent2/100;
		}

//		if( $("topPhotoBLK") ){
//			$("topPhotoBLK").style.filter  = "chroma(color=#444499)";
//		}
	}

//	if( percent2 == 0 ){
		$(cur_page_mode+"BLK").style.display = "block";
//	}

	percent2 += 20;
//	percent2 += 10;

	if( percent2 <= 100 ){
		setTimeout("showContents()", 30);
	}
}

// ************************************************************************************
//  お問い合わせページをスクロールしながら表示する
// ************************************************************************************

function onInquire(id,idx){

	cur_send_mode = id;

	if( id == "sea" ){
		var str;
		str  = "<table cellspacing=1 class='search'>";
		str += "	<tr class='titleRow' bgcolor='" + bg_color + "'>";
		str += "		<td class='dataCol1'>" + item[idx]["title"] + "</td>";
		str += "		<td class='dataCol2'>" + item[idx]["date"] + "</td>";
		str += "	</tr>";
		str += "	<tr class='contentsRow'>";
		str += "		<td colspan='2' class='dataCol1'>" + item[idx]["contents"].replace("\n","<br />");
		str += "		</td>";
		str += "	</tr>";
		str += "</table>";

		$("bukkenSearchStrBLK").innerHTML = str;
		$("searchList").style.display = "block";

		// メール送信のためのデータをセット
		$("form_sea_bbs_title").value	= item[idx]["title"];
		$("form_sea_bbs_contents").value = item[idx]["contents"];
	}
	else if( id == "buk" ){
		$("toInquireBLK").style.display = "none";
		$("bukkenDetailContentsBLK").style.height = "390px";

		$("bukkenDetailPhotoBackBLK").style.marginTop 	= "494px";
		$("bukkenDetailPhotoBLK").style.marginTop 		= "494px";
	}

	$("inquireContentsBLK_"+id).style.display = "block";
	obj_height = $("inquireContentsBLK_"+id).offsetTop;

	setTimeout("scrollPage()", 100);
}

function scrollPage(){
	if( cur_send_mode == "buk" ){
		var obj = $("bukkenDetailContentsBLK");
		var sTop = obj.scrollTop;
	}
	else if( cur_send_mode == "sea" ){
		var obj = $("bukkenSearchContentsBLK");
		var sTop = obj.scrollTop;
	}

	var height = Math.ceil((obj_height - sTop) / 2);
	obj.scrollTop = sTop + height;

	if( sTop != obj.scrollTop && obj.scrollTop < obj_height ){

		setTimeout("scrollPage()", 70);
	}
}

// ************************************************************************************
//  お問い合わせページの入力チェックを行う
// ************************************************************************************

function checkItem(id){

	var errStr = "";
	if( document.forms["form_"+id].name.value == "" )		{ errStr = "氏名が入力されていません。<br />"; }
	if( document.forms["form_"+id].mail.value == "" )		{ errStr += "E-Mailが入力されていません。<br />"; }
	if( document.forms["form_"+id].zip_code.value == "" )	{ errStr += "郵便番号が入力されていません。<br />"; }
	if( document.forms["form_"+id].address1.value == "" )	{ errStr += "住所が入力されていません。<br />"; }
	if( document.forms["form_"+id].tel.value == "" )		{ errStr += "電話番号が入力されていません。<br />"; }
	if( document.forms["form_"+id].contents.value == "" )	{ errStr += "お問い合わせ内容が入力されていません。<br />"; }

	// 入力エラーを表示
	$("errorBLK_"+id).innerHTML = errStr;

	$("conf_name_"+id).innerHTML = $("name_"+id).value;
	$("conf_name2_"+id).value = $("name_"+id).value;

	$("conf_mail_"+id).innerHTML = $("mail_"+id).value;
	$("conf_mail2_"+id).value = $("mail_"+id).value;

	$("conf_zip_"+id).innerHTML = $("zip_code_"+id).value;
	$("conf_zip2_"+id).value = $("zip_code_"+id).value;

	$("conf_address1_"+id).innerHTML = $("address1_"+id).value;
	$("conf_address12_"+id).value = $("address1_"+id).value;

	$("conf_address2_"+id).innerHTML = $("address2_"+id).value;
	$("conf_address22_"+id).value = $("address2_"+id).value;

	$("conf_tel_"+id).innerHTML = $("tel_"+id).value;
	$("conf_tel2_"+id).value = $("tel_"+id).value;

	$("conf_fax_"+id).innerHTML = $("fax_"+id).value;
	$("conf_fax2_"+id).value = $("fax_"+id).value;

	$("conf_contents_"+id).innerHTML = $("contents_"+id).value;
	$("conf_contents2_"+id).value = $("contents_"+id).value;

	$("inquireContentsBLK_"+id).style.display = "none";
	$("inquireConfBLK_"+id).style.display = "block";

	var henshinStr = "";
	if( $("henshin_tel_"+id).checked ){ henshinStr = "電話 "; }
	if( $("henshin_fax_"+id).checked ){ henshinStr += "FAX "; }
	if( $("henshin_yubin_"+id).checked ){ henshinStr += "郵送"; }
	$("conf_henshin_"+id).innerHTML = henshinStr;
	$("conf_henshin2_"+id).value = henshinStr;

	// エラーの表示
	if( errStr ){ $("errorBLK_"+id).style.display = "block"; }
	else{ $("errorBLK_"+id).style.display = "none"; }

	// コメントの表示
	if( errStr ){ $("confStrBLK_"+id).style.display = "none"; }
	else{ $("confStrBLK_"+id).style.display = "block"; }

	// 送信ボタンの表示
	if( errStr ){
		$("btnSend_"+id).style.display = "none";
		$("btnRevise_"+id).style.marginLeft = "270px";
	}
	else{
		$("btnSend_"+id).style.display = "block";
		$("btnRevise_"+id).style.marginLeft = "230px";
	}

	return false;
}

// 修正ボタンがクリックされた時の処理
function reviseForm(id){
	$("inquireConfBLK_"+id).style.display = "none";
	$("inquireContentsBLK_"+id).style.display = "block";

	if( id == "buk" ){
		$("bukkenDetailContentsBLK").scrollTop = obj_height;
	}
	else if( id == "sea" ){
		$("bukkenSearchContentsBLK").scrollTop = obj_height;
	}
}

// メール送信ボタンがクリックされた時の処理
function sendItem(id){
	cur_send_mode = id;
	new Ajax.Request("../sp-/mail.php",{method:"post",parameters:Form.serialize("form_conf_"+id),onComplete: onCompleteMail});
	return false;
}

function onCompleteMail(obj){

	$("inquireConfBLK_"+cur_send_mode).style.display = "none";
//	$("inquireContentsBLK_"+cur_send_mode).style.display = "none";

	if( cur_send_mode == "buk" ){
		$("bukkenDetailStrBLK").style.display = "none";
		$("bukkenDetailPhotoBackBLK").style.display = "none";
		$("bukkenDetailPhotoBLK").style.display = "none";
	}
	else if( cur_send_mode == "sea" ){
		$("bukkenSearchStrBLK").style.display = "none";
	}
	else if( cur_send_mode == "inq" ){
		$("inquireContentsBGBLK").style.display = "none";
	}

	var result = obj.responseText;
	result = result.trim();

//alert(result);

	if( result == "1" ){
		$("inquireSuccessBLK_"+cur_send_mode).style.display = "block";
	}
	else{
		$("inquireErrorBLK_"+cur_send_mode).style.display = "block";
	}
}


// ************************************************************************************
//  ヘルプチップの表示
// ************************************************************************************

//	document.onmousemove=moveHelp;

var curID = "";
function onHelp(x,y){

	$(curID).style.display = "block";
	if(document.all){

		$(curID).style.left = event.x + document.documentElement.scrollLeft + 15 + "px";
		$(curID).style.top  = event.y + document.documentElement.scrollTop + 15 +"px";
	}
	else{
		$(curID).style.left = e.pageX + 15 + "px";
		$(curID).style.top  = e.pageY + 15 + "px";
	}
}

function offHelp(){
	$(curID).style.display = "none";
	curID = "";
}

function moveHelp(e){
	if( !curID ){ return; }
	if(document.all){
		$(curID).style.left = event.x + document.documentElement.scrollLeft + 15 + "px";
		$(curID).style.top  = event.y + document.documentElement.scrollTop + 15 +"px";
	}
	else{
		$(curID).style.left = e.pageX + 15 + "px";
		$(curID).style.top  = e.pageY + 15 + "px";
	}
}

// ************************************************************************************
//  物件一覧のデータ取得
// ************************************************************************************
/*
function getNewBukkenList(type){

	$("waitingBLK").style.display = "block";

	cur_bukken_type = type;
	var date = new Date();
	var time = date.getTime();
	var fname = "../getNewBukkenList2.php?t=" + time + "&user="+cur_user;
	new Ajax.Request(fname,{method:"get",onComplete: onGetNewBukkenList});
	return false;
}

function onGetNewBukkenList(obj){

	$("waitingBLK").style.display = "none";

	var result = obj.responseText;
	result = result.trim();

	if( result ){
		var line = new Array();
		line = result.split("\n");

		item = new Array();
		var idx = 0;

		for(var i=0;i<line.length;i++){

			item[idx] = new Array();

			line[i] = line[i].trim();
			if( !line[i] ){ continue; }

			var data = line[i].split("<>")
			for(var j=0;j<data.length;j++){
				var data2 = data[j].split("==");
				var key = data2[0];
				key = key.trim();
				item[idx][key] = data2[1];
			}
			idx++;
		}


		disp_bukken_list();

		percent = 90; percent2 = 100;
//		percent = percent2 = 0;
		showContents();

	}
	else{
		$("bukkenListContentsBLK").innerHTML = "";
	}

}
*/




// ************************************************************************************
//  物件一覧のデータ取得
// ************************************************************************************

function getBukkenList(type){

	$("waitingBLK").style.display = "block";

	new_bukken_type = "";
	cur_bukken_type = type;
	var date = new Date();
	var time = date.getTime();
	var fname = "../getBukkenList2.php?t=" + time + "&user="+cur_user+"&type="+type;
	new Ajax.Request(fname,{method:"get",onComplete: onGetBukkenList});
	return false;
}

function onGetBukkenList(obj){

	$("waitingBLK").style.display = "none";

	var result = obj.responseText;
	result = result.trim();

//alert(result);

	if( result ){
		var line = new Array();
		line = result.split("\n");
		var tmp = line.shift();
		tmp = tmp.trim();
		count_buff = tmp.split("<>");

		if( !cur_bukken_type ){ return; }

		var linkStr   = new Array();
		var linkStr2 = new Array();

		for(var i=0;i<9;i++){
			if( count_buff[i] != 0 ){
				type = bukken_type_array[i];
				linkStr[i]  = "<a href='' onclick=\"getBukkenList('" + type + "'); return false;\">";
				linkStr2[i] = "</a>";
				count_buff[i] = " <span class='color:#333'>(" + count_buff[i] + ")</span>";
			}
			else{
				linkStr[i] = linkStr2[i] = "";
				count_buff[i] = " (" + count_buff[i] + ")";
			}
		}

		if( cur_bukken_type == "" || cur_bukken_type == "land_sell" )	{ linkStr[0] = "<strong>"; linkStr2[0] = "</strong>"; }
		else if( cur_bukken_type == "house_sell" )			{ linkStr[1] = "<strong>"; linkStr2[1] = "</strong>"; }
		else if( cur_bukken_type == "mansion_sell" )		{ linkStr[2] = "<strong>"; linkStr2[2] = "</strong>"; }
		else if( cur_bukken_type == "profit_sell" )			{ linkStr[3] = "<strong>"; linkStr2[3] = "</strong>"; }
		else if( cur_bukken_type == "mansion_rent" )		{ linkStr[4] = "<strong>"; linkStr2[4] = "</strong>"; }
		else if( cur_bukken_type == "house_rent" )			{ linkStr[5] = "<strong>"; linkStr2[5] = "</strong>"; }
		else if( cur_bukken_type == "office_rent" )			{ linkStr[6] = "<strong>"; linkStr2[6] = "</strong>"; }
		else if( cur_bukken_type == "land_rent" )			{ linkStr[7] = "<strong>"; linkStr2[7] = "</strong>"; }
		else if( cur_bukken_type == "parking_rent" )		{ linkStr[8] = "<strong>"; linkStr2[8] = "</strong>"; }


        str  = "<table class='bukkenMenu' style='margin-bottom:1px;'>";
        str += "  <tr>";
        str += "    <th align=center bgcolor='" + bg_color + "' width='11%'>売り物件</th>";
        str += "    <td width='20%'>" + linkStr[0] + "土　地" + linkStr2[0] + count_buff[0] + "</td>";
        str += "    <td width='26%'>" + linkStr[1] + "建物付き土地" + linkStr2[1] + count_buff[1] + "</td>";
        str += "    <td width='25%'>" + linkStr[2] + "分譲マンション" + linkStr2[2] + count_buff[2] + "</td>";
        str += "    <td width='18%'>" + linkStr[3] + "収益物件" + linkStr2[3] + count_buff[3] + "</td>";
        str += "  </tr>";
        str += "</table>";

        str += "<table class='bukkenMenu'>";
        str += "  <tr>";
        str += "    <th bgcolor='" + bg_color + "' width='11%'>賃貸物件</th>";
        str += "    <td align='center' width='27%' >" + linkStr[4] + "アパート・マンション" + linkStr2[4] + count_buff[4] + "</td>";
        str += "    <td align='center' width='15%' >" + linkStr[5] + "一戸建て" + linkStr2[5] + count_buff[5] + "</td>";
        str += "    <td align='center' width='25%' >" + linkStr[6] + "事務所・店舗・倉庫" + linkStr2[6] + count_buff[6] + "</td>";
        str += "    <td align='center' width='10%' >" + linkStr[7] + "土地" + linkStr2[7] + count_buff[7] + "</td>";
        str += "    <td align='center' width='12%' >" + linkStr[8] + "駐車場" + linkStr2[8] + count_buff[8] + "</td>";
        str += "  </tr>";
        str += "</table>";

		$("bukkenCatrgoryBLK").innerHTML = str;


		item = new Array();
		var idx = 0;

		for(var i=0;i<line.length;i++){

			item[idx] = new Array();

			line[i] = line[i].trim();
//alert(line[i]);
			if( !line[i] ){ continue; }

			var data = line[i].split("\t")
			for(var j=0;j<data.length;j++){
				var data2 = data[j].split("==");
				var key = data2[0];
				key = key.trim();
				item[idx][key] = data2[1];

//alert("idx=" + idx + "/key=" + key + "/" + data2[1]);

			}
			idx++;
		}

//		item.sort(cmp_id);

		cur_sort = "id";
		disp_bukken_list();

		percent = 90; percent2 = 100;
//		percent = percent2 = 0;
		showContents();

	}
	else{
		$("bukkenListContentsBLK").innerHTML = "";
	}

}

function disp_bukken_list(){

	var str  = "<table class='bukkenList'>";

	switch (cur_bukken_type){

		case "land_sell":

			var link1_s = "<a href='' onclick=\"sortBukken('id'); return false;\">";
			var link1_e = "</a>";
			var link2_s = "<a href='' onclick=\"sortBukken('address'); return false;\">";
			var link2_e = "</a>";
			var link3_s = "<a href='' onclick=\"sortBukken('price'); return false;\">";
			var link3_e = "</a>";
			var link4_s = "<a href='' onclick=\"sortBukken('area'); return false;\">";
			var link4_e = "</a>";
			var link5_s = "<a href='' onclick=\"sortBukken('type'); return false;\">";
			var link5_e = "</a>";

			if( cur_sort == "id" )			{ link1_s = "<strong>"; link1_e = "</strong>"; }
			else if( cur_sort == "address" ){ link2_s = "<strong>"; link2_e = "</strong>"; }
			else if( cur_sort == "price" )	{ link3_s = "<strong>"; link3_e = "</strong>"; }
			else if( cur_sort == "area" )	{ link4_s = "<strong>"; link4_e = "</strong>"; }
			else if( cur_sort == "type" )	{ link5_s = "<strong>"; link5_e = "</strong>"; }

			str += "<tr id='tr_land_sell' bgcolor='" + bg_color + "'>";
			str += "<th class='dataCol1'>No.</th>";
			str += "<th class='dataCol2'>" + link1_s + "物件ID" + link1_e + "</th>";
			str += "<th class='dataCol3'>" + link2_s + "住　　所" + link2_e + "</th>";
			str += "<th class='dataCol4'>" + link3_s + "価　　格" + link3_e + "</th>";
			str += "<th class='dataCol5'>" + link4_s + "土地面積" + link4_e + "</th>";
			str += "<th class='dataCol6'>" + link5_s + "種　別" + link5_e + "</th>";
			str += "<th class='dataCol7'></th>";
			str += "</tr>";
			break;

		case "house_sell":

			var link1_s = "<a href='' onclick=\"sortBukken('id'); return false;\">";
			var link1_e = "</a>";
			var link2_s = "<a href='' onclick=\"sortBukken('address'); return false;\">";
			var link2_e = "</a>";
			var link3_s = "<a href='' onclick=\"sortBukken('price'); return false;\">";
			var link3_e = "</a>";
			var link4_s = "<a href='' onclick=\"sortBukken('layout'); return false;\">";
			var link4_e = "</a>";
			var link5_s = "<a href='' onclick=\"sortBukken('area'); return false;\">";
			var link5_e = "</a>";
			var link6_s = "<a href='' onclick=\"sortBukken('floors_area'); return false;\">";
			var link6_e = "</a>";
			var link7_s = "<a href='' onclick=\"sortBukken('type'); return false;\">";
			var link7_e = "</a>";

			if( cur_sort == "id" )				{ link1_s = "<strong>"; link1_e = "</strong>"; }
			else if( cur_sort == "address" )	{ link2_s = "<strong>"; link2_e = "</strong>"; }
			else if( cur_sort == "price" )		{ link3_s = "<strong>"; link3_e = "</strong>"; }
			else if( cur_sort == "layout" )		{ link4_s = "<strong>"; link4_e = "</strong>"; }
			else if( cur_sort == "area" )		{ link5_s = "<strong>"; link5_e = "</strong>"; }
			else if( cur_sort == "floors_area" ){ link6_s = "<strong>"; link6_e = "</strong>"; }
			else if( cur_sort == "type" )		{ link7_s = "<strong>"; link7_e = "</strong>"; }

			str += "<tr id='tr_house_sell' bgcolor='" + bg_color + "'>";
			str += "<th class='dataCol1'>No.</th>";
			str += "<th class='dataCol2'>" + link1_s + "物件ID" + link1_e + "</th>";
			str += "<th class='dataCol3'>" + link2_s + "住　　所" + link2_e + "</th>";
			str += "<th class='dataCol4' style='font-size:11px;'>" + link3_s + "価格" + link3_e + "/" + link4_s + "間取り" + link4_e + "</th>";
			str += "<th class='dataCol5' style='font-size:11px;'>" + link5_s + "敷地" + link5_e + "/" + link6_s + "総床面積" + link6_e + "</th>";
			str += "<th class='dataCol6'>" + link7_s + "種　別" + link7_e + "</th>";
			str += "<th class='dataCol7'></th>";
			str += "</tr>";
			break;

		case "mansion_sell":

			var link1_s = "<a href='' onclick=\"sortBukken('id'); return false;\">";
			var link1_e = "</a>";
			var link2_s = "<a href='' onclick=\"sortBukken('address'); return false;\">";
			var link2_e = "</a>";
			var link3_s = "<a href='' onclick=\"sortBukken('price'); return false;\">";
			var link3_e = "</a>";
			var link4_s = "<a href='' onclick=\"sortBukken('layout'); return false;\">";
			var link4_e = "</a>";
			var link5_s = "<a href='' onclick=\"sortBukken('floors_area'); return false;\">";
			var link5_e = "</a>";
			var link6_s = "<a href='' onclick=\"sortBukken('type'); return false;\">";
			var link6_e = "</a>";

			if( cur_sort == "id" )				{ link1_s = "<strong>"; link1_e = "</strong>"; }
			else if( cur_sort == "address" )	{ link2_s = "<strong>"; link2_e = "</strong>"; }
			else if( cur_sort == "price" )		{ link3_s = "<strong>"; link3_e = "</strong>"; }
			else if( cur_sort == "layout" )		{ link4_s = "<strong>"; link4_e = "</strong>"; }
			else if( cur_sort == "floors_area" ){ link5_s = "<strong>"; link5_e = "</strong>"; }
			else if( cur_sort == "type" )		{ link6_s = "<strong>"; link6_e = "</strong>"; }

			str += "<tr id='tr_mansion_sell' bgcolor='" + bg_color + "'>";
			str += "<th class='dataCol1'>No.</th>";
			str += "<th class='dataCol2'>" + link1_s + "物件ID" + link1_e + "</th>";
			str += "<th class='dataCol3'>" + link2_s + "住　所" + link2_e + " / 物件名</th>";
			str += "<th class='dataCol4' style='font-size:11px;'>" + link3_s + "価格" + link3_e + "/" + link4_s + "間取り" + link4_e + "</th>";
			str += "<th class='dataCol5'>" + link5_s + "専有面積" + link5_e + "</th>";
			str += "<th class='dataCol6'>" + link6_s + "種　別" + link6_e + "</th>";
			str += "<th class='dataCol7'></th>";
			str += "</tr>";
			break;

		case "profit_sell":

			var link1_s = "<a href='' onclick=\"sortBukken('id'); return false;\">";
			var link1_e = "</a>";
			var link2_s = "<a href='' onclick=\"sortBukken('address'); return false;\">";
			var link2_e = "</a>";
			var link3_s = "<a href='' onclick=\"sortBukken('price'); return false;\">";
			var link3_e = "</a>";

			if( cur_sort == "id" )				{ link1_s = "<strong>"; link1_e = "</strong>"; }
			else if( cur_sort == "address" )	{ link2_s = "<strong>"; link2_e = "</strong>"; }
			else if( cur_sort == "price" )		{ link3_s = "<strong>"; link3_e = "</strong>"; }

			str += "<tr id='tr_profit_sell' bgcolor='" + bg_color + "'>";
			str += "<th class='dataCol1'>No.</th>";
			str += "<th class='dataCol2'>" + link1_s + "物件ID" + link1_e + "</th>";
			str += "<th class='dataCol3'>" + link2_s + "住　所" + link2_e + " / 物件名</th>";
			str += "<th class='dataCol4'>" + link3_s + "価　格" + link3_e + "</th>";
			str += "<th class='dataCol5'>間取り</th>";
			str += "<th class='dataCol6'>種　別</th>";
			str += "<th class='dataCol7'></th>";
			str += "</tr>";
			break;

		case "mansion_rent":

			var link1_s = "<a href='' onclick=\"sortBukken('id'); return false;\">";
			var link1_e = "</a>";
			var link2_s = "<a href='' onclick=\"sortBukken('address'); return false;\">";
			var link2_e = "</a>";
			var link3_s = "<a href='' onclick=\"sortBukken('price2'); return false;\">";
			var link3_e = "</a>";
			var link4_s = "<a href='' onclick=\"sortBukken('layout'); return false;\">";
			var link4_e = "</a>";
			var link5_s = "<a href='' onclick=\"sortBukken('type'); return false;\">";
			var link5_e = "</a>";

			if( cur_sort == "id" )				{ link1_s = "<strong>"; link1_e = "</strong>"; }
			else if( cur_sort == "address" )	{ link2_s = "<strong>"; link2_e = "</strong>"; }
			else if( cur_sort == "price2" )		{ link3_s = "<strong>"; link3_e = "</strong>"; }
			else if( cur_sort == "layout" )		{ link4_s = "<strong>"; link4_e = "</strong>"; }
			else if( cur_sort == "type" )		{ link5_s = "<strong>"; link5_e = "</strong>"; }

			str += "<tr id='tr_mansion_rent' bgcolor='" + bg_color + "'>";
			str += "<th class='dataCol1'>No.</th>";
			str += "<th class='dataCol2'>" + link1_s + "物件ID" + link1_e + "</th>";
			str += "<th class='dataCol3'>" + link2_s + "住　所" + link2_e + "</th>";
			str += "<th class='dataCol4'>" + link3_s + "賃　料" + link3_e + "</th>";
			str += "<th class='dataCol5'>" + link4_s + "間取り" + link4_e + "</th>";
			str += "<th class='dataCol6'>" + link5_s + "種　別" + link5_e + "</th>";
			str += "<th class='dataCol7'></th>";
			str += "</tr>";
			break;

		case "house_rent":

			var link1_s = "<a href='' onclick=\"sortBukken('id'); return false;\">";
			var link1_e = "</a>";
			var link2_s = "<a href='' onclick=\"sortBukken('address'); return false;\">";
			var link2_e = "</a>";
			var link3_s = "<a href='' onclick=\"sortBukken('price2'); return false;\">";
			var link3_e = "</a>";
			var link4_s = "<a href='' onclick=\"sortBukken('layout'); return false;\">";
			var link4_e = "</a>";

			if( cur_sort == "id" )				{ link1_s = "<strong>"; link1_e = "</strong>"; }
			else if( cur_sort == "address" )	{ link2_s = "<strong>"; link2_e = "</strong>"; }
			else if( cur_sort == "price2" )		{ link3_s = "<strong>"; link3_e = "</strong>"; }
			else if( cur_sort == "layout" )		{ link4_s = "<strong>"; link4_e = "</strong>"; }

			str += "<tr id='tr_house_rent' bgcolor='" + bg_color + "'>";
			str += "<th class='dataCol1'>No.</th>";
			str += "<th class='dataCol2'>" + link1_s + "物件ID" + link1_e + "</th>";
			str += "<th class='dataCol3'>" + link2_s + "住　所" + link2_e + "</th>";
			str += "<th class='dataCol4'>" + link3_s + "賃　料" + link3_e + "</th>";
			str += "<th class='dataCol5'>" + link4_s + "間取り" + link4_e + "</th>";
			str += "<th class='dataCol6'>種　別</th>";
			str += "<th class='dataCol7'></th>";
			str += "</tr>";
			break;

		case "office_rent":

			var link1_s = "<a href='' onclick=\"sortBukken('id'); return false;\">";
			var link1_e = "</a>";
			var link2_s = "<a href='' onclick=\"sortBukken('address'); return false;\">";
			var link2_e = "</a>";
			var link3_s = "<a href='' onclick=\"sortBukken('price2'); return false;\">";
			var link3_e = "</a>";
			var link4_s = "<a href='' onclick=\"sortBukken('floors_area'); return false;\">";
			var link4_e = "</a>";
			var link5_s = "<a href='' onclick=\"sortBukken('type'); return false;\">";
			var link5_e = "</a>";

			if( cur_sort == "id" )				{ link1_s = "<strong>"; link1_e = "</strong>"; }
			else if( cur_sort == "address" )	{ link2_s = "<strong>"; link2_e = "</strong>"; }
			else if( cur_sort == "price2" )		{ link3_s = "<strong>"; link3_e = "</strong>"; }
			else if( cur_sort == "floors_area" ){ link4_s = "<strong>"; link4_e = "</strong>"; }
			else if( cur_sort == "type" )		{ link5_s = "<strong>"; link5_e = "</strong>"; }

			str += "<tr id='tr_office_rent' bgcolor='" + bg_color + "'>";
			str += "<th class='dataCol1'>No.</th>";
			str += "<th class='dataCol2'>" + link1_s + "物件ID" + link1_e + "</th>";
			str += "<th class='dataCol3'>" + link2_s + "住　所" + link2_e + "</th>";
			str += "<th class='dataCol4'>" + link3_s + "賃　料" + link3_e + "</th>";
			str += "<th class='dataCol5'>" + link4_s + "総床面積" + link4_e + "</th>";
			str += "<th class='dataCol6'>" + link5_s + "種　別" + link5_e + "</th>";
			str += "<th class='dataCol7'></th>";
			str += "</tr>";
			break;

		case "land_rent":

			var link1_s = "<a href='' onclick=\"sortBukken('id'); return false;\">";
			var link1_e = "</a>";
			var link2_s = "<a href='' onclick=\"sortBukken('address'); return false;\">";
			var link2_e = "</a>";
			var link3_s = "<a href='' onclick=\"sortBukken('price2'); return false;\">";
			var link3_e = "</a>";
			var link4_s = "<a href='' onclick=\"sortBukken('area'); return false;\">";
			var link4_e = "</a>";

			if( cur_sort == "id" )				{ link1_s = "<strong>"; link1_e = "</strong>"; }
			else if( cur_sort == "address" )	{ link2_s = "<strong>"; link2_e = "</strong>"; }
			else if( cur_sort == "price2" )		{ link3_s = "<strong>"; link3_e = "</strong>"; }
			else if( cur_sort == "area" )		{ link4_s = "<strong>"; link4_e = "</strong>"; }

			str += "<tr id='tr_land_rent' bgcolor='" + bg_color + "'>";
			str += "<th class='dataCol1'>No.</th>";
			str += "<th class='dataCol2'>" + link1_s + "物件ID" + link1_e + "</th>";
			str += "<th class='dataCol3'>" + link2_s + "住　所" + link2_e + "</th>";
			str += "<th class='dataCol4'>" + link3_s + "賃　料" + link3_e + "</th>";
			str += "<th class='dataCol5'>" + link4_s + "土地面積" + link4_e + "</th>";
			str += "<th class='dataCol6'>種　別</th>";
			str += "<th class='dataCol7'></th>";
			str += "</tr>";
			break;

		case "parking_rent":

			var link1_s = "<a href='' onclick=\"sortBukken('id'); return false;\">";
			var link1_e = "</a>";
			var link2_s = "<a href='' onclick=\"sortBukken('address'); return false;\">";
			var link2_e = "</a>";
			var link3_s = "<a href='' onclick=\"sortBukken('price2'); return false;\">";
			var link3_e = "</a>";

			if( cur_sort == "id" )				{ link1_s = "<strong>"; link1_e = "</strong>"; }
			else if( cur_sort == "address" )	{ link2_s = "<strong>"; link2_e = "</strong>"; }
			else if( cur_sort == "price2" )		{ link3_s = "<strong>"; link3_e = "</strong>"; }

			str += "<tr id='tr_parking_rent' bgcolor='" + bg_color + "'>";
			str += "<th class='dataCol1'>No.</th>";
			str += "<th class='dataCol2'>" + link1_s + "物件ID" + link1_e + "</th>";
			str += "<th class='dataCol3'>" + link2_s + "住　所" + link2_e + " / 物件名</th>";
			str += "<th class='dataCol4'>" + link3_s + "賃　料" + link3_e + "</th>";
			str += "<th class='dataCol5'></th>";
			str += "<th class='dataCol6'>種　別</th>";
			str += "<th class='dataCol7'></th>";
			str += "</tr>";
			break;
	}


//	var date = new Date();
//	var time = date.getTime();

	for(var i=0;i<item.length;i++){

//alert(cur_time + "/" + item[i]["time"]);

		var newStr = "";
		if( cur_time - item[i]["time"] < 604800 ){ newStr = "<img class='iconImage' src='../sp-/images/icon_new.png' width='29' height='11' class='iepngfix'>"; }

		switch (cur_bukken_type){

			case "land_sell":
				str += "<tr>";
				str += "<td class='dataCol1'>" + (i+1) + "</td>";
				str += "<td class='dataCol2'>" + item[i]["id"] +"</td>";
				str += "<td class='dataCol3'>" + item[i]["ad"] + newStr + "</td>";
				str += "<td class='dataCol4'>" + print_price2(item[i]) + "</td>";
				str += "<td class='dataCol5' style='padding-right:20px;'>" + print_area2(item[i]) + "</td>";
				str += "<td class='dataCol6'>" + item[i]["ty2"] + "</td>";
				str += "<td class='dataCol7'><a href='' onclick=\"getBukkenDetail('" + item[i]["id"].substring(3) + "','" + item[i]["ty"] + "',0); return false;\" title='詳細'><img src='../sp-/images/btn_detail.png' width='59' height='21' class='iepngfix'></a></td>";
				str += "</tr>";
				break;

			case "house_sell":
				str += "<tr>";
				str += "<td class='dataCol1'>" + (i+1) + "</td>";
				str += "<td class='dataCol2'>" + item[i]["id"] +"</td>";
				str += "<td class='dataCol3'>" + item[i]["ad"] + newStr + "</td>";
				str += "<td class='dataCol4'>" + print_price2(item[i]) + "&nbsp<br />" + item[i]["layout"] + "&nbsp</td>";
				str += "<td class='dataCol5' style='padding-right:20px;'>" + print_area2(item[i]) + "&nbsp<br />" + print_floors_area2(item[i]) + "&nbsp</td>";
				str += "<td class='dataCol6'>" + item[i]["ty2"] + "</td>";
				str += "<td class='dataCol7'><a href='' onclick=\"getBukkenDetail('" + item[i]["id"].substring(3) + "','" + item[i]["ty"] + "',0); return false;\" title='詳細'><img src='../sp-/images/btn_detail.png' width='59' height='21' class='iepngfix'></a></td>";
				str += "</tr>";
				break;

			case "mansion_sell":
				str += "<tr>";
				str += "<td class='dataCol1'>" + (i+1) + "</td>";
				str += "<td class='dataCol2'>" + item[i]["id"] +"</td>";
				str += "<td class='dataCol3'>" + item[i]["ad"] + newStr + "&nbsp<br />"+item[i]["b_name"]+"&nbsp</td>";
				str += "<td class='dataCol4'>" + print_price2(item[i]) + "&nbsp<br />" + item[i]["layout"] + "&nbsp</td>";
				str += "<td class='dataCol5' style='padding-right:20px;'>" + print_floors_area2(item[i]) + "</td>";
				str += "<td class='dataCol6'>" + item[i]["ty2"] + "</td>";
				str += "<td class='dataCol7'><a href='' onclick=\"getBukkenDetail('" + item[i]["id"].substring(3) + "','" + item[i]["ty"] + "',0); return false;\" title='詳細'><img src='../sp-/images/btn_detail.png' width='59' height='21' class='iepngfix'></a></td>";
				str += "</tr>";
				break;

			case "profit_sell":
				str += "<tr>";
				str += "<td class='dataCol1'>" + (i+1) + "</td>";
				str += "<td class='dataCol2'>" + item[i]["id"] +"</td>";
				str += "<td class='dataCol3'>" + item[i]["ad"] + newStr + "<br />" + item[i]["b_name"]+"</td>";
				str += "<td class='dataCol4'>" + print_price2(item[i]) + "</td>";
				str += "<td class='dataCol5' style='text-align:left;padding:0 10px;'>" + print_layout2(item[i]) + "</td>";
				str += "<td class='dataCol6'>" + item[i]["ty2"] + "</td>";
				str += "<td class='dataCol7'><a href='' onclick=\"getBukkenDetail('" + item[i]["id"].substring(3) + "','" + item[i]["ty"] + "',0); return false;\" title='詳細'><img src='../sp-/images/btn_detail.png' width='59' height='21' class='iepngfix'></a></td>";
				str += "</tr>";
				break;


			case "mansion_rent":

				var newFlagStr = "";
				if( item[i]["new"] == 1 ){ newFlagStr = "<img class='iconImage' src='../sp-/images/icon_shinchiku.png' width='25' height='13' class='iepngfix'>"; }

				str += "<tr>";
				str += "<td class='dataCol1'>" + (i+1) + "</td>";
				str += "<td class='dataCol2'>" + item[i]["id"] +"</td>";
				str += "<td class='dataCol3'>" + item[i]["ad"] + newStr + newFlagStr + "</td>";
				str += "<td class='dataCol4'>" + print_rental_price2(item[i]) + "</td>";
				str += "<td class='dataCol5' style='padding-right:20px;'>" + item[i]["layout"] + "</td>";
				str += "<td class='dataCol6'>" + item[i]["ty2"] + "</td>";
				str += "<td class='dataCol7'><a href='' onclick=\"getBukkenDetail('" + item[i]["id"].substring(3) + "','" + item[i]["ty"] + "',0); return false;\" title='詳細'><img src='../sp-/images/btn_detail.png' width='59' height='21' class='iepngfix'></a></td>";
				str += "</tr>";
				break;

			case "house_rent":

				var newFlagStr = "";
				if( item[i]["new"] == 1 ){ newFlagStr = "<img class='iconImage' src='../sp-/images/icon_shinchiku.png' width='25' height='13' class='iepngfix'>"; }

				str += "<tr>";
				str += "<td class='dataCol1'>" + (i+1) + "</td>";
				str += "<td class='dataCol2'>" + item[i]["id"] +"</td>";
				str += "<td class='dataCol3'>" + item[i]["ad"] + newStr + newFlagStr + "</td>";
				str += "<td class='dataCol4'>" + print_rental_price2(item[i]) + "</td>";
				str += "<td class='dataCol5' style='padding-right:20px;'>" + item[i]["layout"] +"</td>";
				str += "<td class='dataCol6'>" + item[i]["ty2"] + "</td>";
				str += "<td class='dataCol7'><a href='' onclick=\"getBukkenDetail('" + item[i]["id"].substring(3) + "','" + item[i]["ty"] + "',0); return false;\" title='詳細'><img src='../sp-/images/btn_detail.png' width='59' height='21' class='iepngfix'></a></td>";
				str += "</tr>";
				break;

			case "office_rent":

				var newFlagStr = "";
				if( item[i]["new"] == 1 ){ newFlagStr = "<img class='iconImage' src='../sp-/images/icon_shinchiku.png' width='25' height='13' class='iepngfix'>"; }

				str += "<tr>";
				str += "<td class='dataCol1'>" + (i+1) + "</td>";
				str += "<td class='dataCol2'>" + item[i]["id"] +"</td>";
				str += "<td class='dataCol3'>" + item[i]["ad"] +newStr + newFlagStr + "</td>";
				str += "<td class='dataCol4'>" + print_rental_price2(item[i]) + "</td>";
				str += "<td class='dataCol5' style='padding-right:20px;'>" + print_floors_area2(item[i]) + "</td>";
				str += "<td class='dataCol6'>" + item[i]["ty2"] + "</td>";
				str += "<td class='dataCol7'><a href='' onclick=\"getBukkenDetail('" + item[i]["id"].substring(3) + "','" + item[i]["ty"] + "',0); return false;\" title='詳細'><img src='../sp-/images/btn_detail.png' width='59' height='21' class='iepngfix'></a></td>";
				str += "</tr>";
				break;

			case "land_rent":
				str += "<tr>";
				str += "<td class='dataCol1'>" + (i+1) + "</td>";
				str += "<td class='dataCol2'>" + item[i]["id"] +"</td>";
				str += "<td class='dataCol3'>" + item[i]["ad"] + newStr + "</td>";
				str += "<td class='dataCol4'>" + print_rental_price2(item[i]) + "</td>";
				str += "<td class='dataCol5' style='padding-right:20px;'>" + print_area2(item[i]) + "</td>";
				str += "<td class='dataCol6'>" + item[i]["ty2"] + "</td>";
				str += "<td class='dataCol7'><a href='' onclick=\"getBukkenDetail('" + item[i]["id"].substring(3) + "','" + item[i]["ty"] + "',0); return false;\" title='詳細'><img src='../sp-/images/btn_detail.png' width='59' height='21' class='iepngfix'></a></td>";
				str += "</tr>";
				break;

			case "parking_rent":
				str += "<tr>";
				str += "<td class='dataCol1'>" + (i+1) + "</td>";
				str += "<td class='dataCol2'>" + item[i]["id"] +"</td>";
				str += "<td class='dataCol3'>" + item[i]["ad"] + newStr + "&nbsp<br />" + item[i]["b_name"] + "&nbsp</td>";
				str += "<td class='dataCol4'>" + print_rental_price2(item[i]) + "</td>";
				str += "<td class='dataCol5' style='padding-right:20px;'></td>";
				str += "<td class='dataCol6'>" + item[i]["ty2"] + "</td>";
				str += "<td class='dataCol7'><a href='' onclick=\"getBukkenDetail('" + item[i]["id"].substring(3) + "','" + item[i]["ty"] + "',0); return false;\" title='詳細'><img src='../sp-/images/btn_detail.png' width='59' height='21' class='iepngfix'></a></td>";
				str += "</tr>";
				break;

		}
	}
	str += "</table>";

	$("bukkenListContentsBLK").innerHTML = str;

	// 物件種別の表示
	$("bukken_type_img").src = "../sp-/images/title_" + cur_bukken_type + ".png";

}

function sortBukken(sort){

	cur_sort = sort;

	switch (sort){
		case "id":
			sort_cmp = cmp_id;
			break;

		case "price":
			sort_cmp = cmp_price;
			break;

		case "price2":
			sort_cmp = cmp_price2;
			break;

		case "layout":
			sort_cmp = cmp_layout;
			break;

		case "address":
			sort_cmp = cmp_address;
			break;

		case "area":
			sort_cmp = cmp_area;
			break;

		case "floors_area":
			sort_cmp = cmp_floors_area;
			break;

		case "type":
			sort_cmp = cmp_type;
			break;
	}

	item.sort(sort_cmp);

	disp_bukken_list();
}

function cmp_id(a, b){
	if(a["id"] < b["id"])	  	{ return 1; }
	else if(a["id"] > b["id"])	{ return -1; }
	else						{ return 0; }

//	if(a["id"] > b["id"])	  	{ return 1; }
//	else if(a["id"] < b["id"])	{ return -1; }
//	else						{ return 0; }
}

function cmp_price(a, b){
	if(parseInt(a["price"]) > parseInt(b["price"]))	  	{ return 1; }
	else if(parseInt(a["price"]) < parseInt(b["price"]) ){ return -1; }
	else							{ return 0; }
}

function cmp_price2(a, b){
	if(parseInt(a["rental_price"]) > parseInt(b["rental_price"]))	  	{ return 1; }
	else if(parseInt(a["rental_price"]) < parseInt(b["rental_price"]) )	{ return -1; }
	else																{ return 0; }
}

function cmp_layout(a, b){
	if(a["layout"] > b["layout"])	  	{ return 1; }
	else if(a["layout"] < b["layout"])	{ return -1; }
	else								{ return 0; }
}

function cmp_address(a, b){
	if(a["ad"] > b["ad"])	  	{ return 1; }
	else if(a["ad"] < b["ad"])	{ return -1; }
	else						{ return 0; }
}

function cmp_area(a, b){
	if(parseFloat(a["area"]) > parseFloat(b["area"]))	  	{ return 1; }
	else if(parseFloat(a["area"]) < parseFloat(b["area"]) ){ return -1; }
	else							{ return 0; }
}

function cmp_floors_area(a, b){
	if(parseFloat(a["floors_area"]) > parseFloat(b["floors_area"]))	  	 { return 1; }
	else if(parseFloat(a["floors_area"]) < parseFloat(b["floors_area"]) ){ return -1; }
	else							{ return 0; }
}

function cmp_type(a, b){
	if(a["ty2"] > b["ty2"])	  	{ return 1; }
	else if(a["ty2"] < b["ty2"]){ return -1; }
	else						{ return 0; }
}

// ************************************************************************************
//  物件一覧ページを表示する
// ************************************************************************************

function backBukkenList(){

	pre_page_mode = "bukkenDetail";
	cur_page_mode = "bukkenList";

//	$(pre_page_mode+"BLK").style.display = "none";
	$("topBLK").style.display = "none";
	$("companyBLK").style.display = "none";
	$("whatsnewBLK").style.display = "none";
	$("bukkenListBLK").style.display = "none";
	$("bukkenDetailBLK").style.display = "none";
	$("bukkenSearchBLK").style.display = "none";
	$("linkBLK").style.display = "none";
	$("inquireBLK").style.display = "none";

	if( new_bukken_type ){
		getBukkenList(new_bukken_type);
		return;
	}

	percent = 90; percent2 = 100;
//	percent = percent2 = 0;
	showContents();
}

// ************************************************************************************
//  物件詳細ページを出力する
// ************************************************************************************

var cur_mode = "";
function getBukkenDetail(id,type,printMode){

	$("waitingBLK").style.display = "block";

	cur_bukken_type = type;
	cur_mode = printMode;

	id = id-0;
	var date = new Date();
	var time = date.getTime();
	var fname = "../getBukkenDetail2.php?t=" + time + "&user="+cur_user+"&bukken_type="+type+"&id="+id;
	new Ajax.Request(fname,{method:"get",onComplete: onGetBukkenDetail});
	return false;
}

function onGetBukkenDetail(obj){

	$("waitingBLK").style.display = "none";

	var result = obj.responseText;
	result = result.trim();

//alert(result);

	image_buff = new Array();
	item = new Array();

	if( result ){

		var tmp = result.split("<>");
		image_buff = tmp[0].split(",");

		if( image_buff.length == 1 ){
			if( image_buff[0].trim() == "" ){ image_buff.shift(); }
		}

		for(var i=1;i<tmp.length;i++){
			tmp[i] = tmp[i].trim();
			if( tmp[i] ){
				var data = tmp[i].split("==");
				key = data[0];
				key = key.trim();

//alert("i="+i+"/key="+key+"/data="+data[1]);

				item[key] = data[1];
			}
		}

		disp_bukken_detail();
	}
	else{
		$("bukkenDetailStrBLK").innerHTML = "";
	}
}

function disp_bukken_detail(){

	var map_link = "";

	if( item["map_link"] ){
		map_link = "<a href='" + item["map_link"] + "' target='_blank' title='地図'><img src='../sp-/images/btn_map.png' width='59' height='21' class='iepngfix'></a>";
	}

	var str  = "<table class='bukken'>";

//alert(item['bukken_type']);

//	switch (cur_bukken_type){
	switch (item['bukken_type']){

		case "general-land":
		case "commerce-land":
		case "agricultural-land":
		case "parcels-land":

				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>種　別</td>";
				str += "	<td class='dataCol2'>" + item["bukken_type_name"] + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>物件番号</td>";
				str += "	<td class='dataCol2'>" + item["bukken_id"] + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>所在地</td>";
				str += "	<td class='dataCol3' colspan='3'>" + item["address"] + "</div>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>価　格</td>";
				str += "	<td class='dataCol2'>" + print_price(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>坪単価</td>";
				str += "	<td class='dataCol2'>" + item["tsubotanka"] + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>土地面積</td>";
				str += "	<td class='dataCol3' colspan='3'>" + print_area(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>都市計画</td>";
				str += "	<td class='dataCol2'>" + print_purpose(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>建蔽/容積率</td>";
				str += "	<td class='dataCol2'>" + print_kenpei_yoseki(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>地　目</td>";
				str += "	<td class='dataCol2'>" + print_chimoku(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>現　況</td>";
				str += "	<td class='dataCol2'>" + item["genkyo"] + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>接　道</td>";
				str += "	<td class='dataCol3' colspan='3'>" + print_setsudo(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>交　通</div>";
				str += "	<td class='dataCol2'>" + print_kotu(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>学校区</div>";
				str += "	<td class='dataCol2'>" + print_gakkouku(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>その他</td>";
				str += "	<td class='dataCol2'>" + map_link + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>取引</td>";
				str += "	<td class='dataCol2'>" + item["taiyo"] + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>Ｐ　Ｒ</div>";
				str += "	<td class='dataCol3' colspan='3'>" + item["pr"].replace("\n","<br />") + "</td>";
				str += "</tr>";
				break;

		case "set-house":

				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>種　別</td>";
				str += "	<td class='dataCol2'>" + item["bukken_type_name"] + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>物件番号</td>";
				str += "	<td class='dataCol2'>" + item["bukken_id"] + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>所在地</td>";
				str += "	<td class='dataCol3' colspan='3'>" + item["address"] + "</div>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>価　格</td>";
				str += "	<td class='dataCol2'>" + print_price(item) + "></td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>間取り</td>";
				str += "	<td class='dataCol2'>" + print_layout(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>敷地面積</td>";
				str += "	<td class='dataCol3' colspan='3'>" + print_area(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>延床面積</td>";
				str += "	<td class='dataCol3' colspan='3'>" + print_floors_area(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>各階面積</td>";
				str += "	<td class='dataCol3' colspan='3'>" + print_each_floors_area(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>都市計画</td>";
				str += "	<td class='dataCol2'>" + print_purpose(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>建蔽/容積率</td>";
				str += "	<td class='dataCol2'>" + print_kenpei_yoseki(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>地　目</td>";
				str += "	<td class='dataCol2'>" + print_chimoku(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>駐車場</td>";
				str += "	<td class='dataCol2'>" + print_parking(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>土地価格</td>";
				str += "	<td class='dataCol2'>" + print_land_price(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>坪単価</td>";
				str += "	<td class='dataCol2'>" + item["tsubotanka"] + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>接　道</td>";
				str += "	<td class='dataCol3' colspan='3'>" + print_setsudo(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>交　通</div>";
				str += "	<td class='dataCol2'>" + print_kotu(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>学校区</div>";
				str += "	<td class='dataCol2'>" + print_gakkouku(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>その他</td>";
				str += "	<td class='dataCol2'>" + map_link + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>取　引</td>";
				str += "	<td class='dataCol2'>" + item["taiyo"] + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>Ｐ　Ｒ</div>";
				str += "	<td class='dataCol3' colspan='3'>" + item["pr"].replace("\n","<br />") + "</td>";
				str += "</tr>";
				break;

		case "new-house":
		case "used-house":
		case "shop-and-house":
		case "office-and-house":
		case "shop-house":
		case "office-house":
		case "store-house":
		case "other-house":

				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>種　別</td>";
				str += "	<td class='dataCol2'>" + item["bukken_type_name"] + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>物件番号</td>";
				str += "	<td class='dataCol2'>" + item["bukken_id"] + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>所在地</td>";
				str += "	<td class='dataCol3' colspan='3'>" + item["address"] + "</div>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>価　格</td>";
				str += "	<td class='dataCol3' colspan='3'>" + print_price(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>敷地面積</td>";
				str += "	<td class='dataCol3' colspan='3'>" + print_area(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>延床面積</td>";
				str += "	<td class='dataCol3' colspan='3'>" + print_floors_area(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>各階面積</td>";
				str += "	<td class='dataCol3' colspan='3'>" + print_each_floors_area(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>構　造</td>";
				str += "	<td class='dataCol2'>" + print_structure(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>間取り</td>";
				str += "	<td class='dataCol2'>" + print_layout(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>建築年</td>";
				str += "	<td class='dataCol2'>" + print_build_year(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>駐車場</td>";
				str += "	<td class='dataCol2'>" + print_parking(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>都市計画</td>";
				str += "	<td class='dataCol3' colspan='3'>" + print_purpose(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>地　目</td>";
				str += "	<td class='dataCol2'>" + print_chimoku(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>建蔽/容積率</td>";
				str += "	<td class='dataCol2'>" + print_kenpei_yoseki(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>接　道</td>";
				str += "	<td class='dataCol3' colspan='3'>" + print_setsudo(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>交　通</div>";
				str += "	<td class='dataCol2'>" + print_kotu(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>学校区</div>";
				str += "	<td class='dataCol2'>" + print_gakkouku(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>その他</td>";
				str += "	<td class='dataCol2'>" + map_link + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>取　引</td>";
				str += "	<td class='dataCol2'>" + item["taiyo"] + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>Ｐ　Ｒ</div>";
				str += "	<td class='dataCol3' colspan='3'>" + item["pr"].replace("\n","<br />") + "</td>";
				str += "</tr>";
				break;

		case "new-mansion":
		case "used-mansion":

				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>種　別</td>";
				str += "	<td class='dataCol2'>" + item["bukken_type_name"] + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>物件番号</td>";
				str += "	<td class='dataCol2'>" + item["bukken_id"] + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>所在地</td>";
				str += "	<td class='dataCol3' colspan='3'>" + item["address"] + "</div>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>物件名</td>";
				str += "	<td class='dataCol3' colspan='3'>" + item["bukken_name"] + "</div>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>価　格</td>";
				str += "	<td class='dataCol2'>" + print_price(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>建築年</td>";
				str += "	<td class='dataCol2'>" + print_build_year(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>構　造</td>";
				str += "	<td class='dataCol2'>" + print_structure2(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>規　模</td>";
				str += "	<td class='dataCol2'>" + print_scale(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>専有面積</td>";
				str += "	<td class='dataCol3' colspan='3'>" + print_floors_area(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>バルコニー</td>";
				str += "	<td class='dataCol3' colspan='3'>" + print_balcony_area(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>間取り</td>";
				str += "	<td class='dataCol2'>" + print_layout(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>部屋向き</td>";
				str += "	<td class='dataCol2'>" + print_room_direction(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>交　通</div>";
				str += "	<td class='dataCol2'>" + print_kotu(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>学校区</div>";
				str += "	<td class='dataCol2'>" + print_gakkouku(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>駐車場</td>";
				str += "	<td class='dataCol2'>" + print_parking(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>管理費</td>";
				str += "	<td class='dataCol2'>" + print_cost1(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>駐車場費</td>";
				str += "	<td class='dataCol2'>" + print_parking_price(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>修繕積立金</td>";
				str += "	<td class='dataCol2'>" + print_cost2(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>その他</td>";
				str += "	<td class='dataCol2'>" + map_link + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>取　引</td>";
				str += "	<td class='dataCol2'>" + item["taiyo"] + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>Ｐ　Ｒ</div>";
				str += "	<td class='dataCol3' colspan='3'>" + item["pr"].replace("\n","<br />") + "</td>";
				str += "</tr>";
				break;

		case "profit-mansion":

				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>種　別</td>";
				str += "	<td class='dataCol2'>" + item["bukken_type_name"] + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>物件番号</td>";
				str += "	<td class='dataCol2'>" + item['bukken_id'] + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>所在地</td>";
				str += "	<td class='dataCol3' colspan='3'>" + item["address"] + "</div>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>物件名</td>";
				str += "	<td class='dataCol3' colspan='3'>" + item["bukken_name"] + "</div>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>価　格</td>";
				str += "	<td class='dataCol2'>" + print_price(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>建築年</td>";
				str += "	<td class='dataCol2'>" + print_build_year(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>敷地面積</td>";
				str += "	<td class='dataCol3' colspan='3'>" + print_area(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>総床面積</td>";
				str += "	<td class='dataCol3' colspan='3'>" + print_floors_area(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>間取り</td>";
				str += "	<td class='dataCol3' colspan='3'>" + print_layout2(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>構　造</td>";
				str += "	<td class='dataCol2'>" + print_structure2(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>規　模</td>";
				str += "	<td class='dataCol2'>" + print_scale(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>都市計画</td>";
				str += "	<td class='dataCol2'>" + print_purpose(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>部屋向き</td>";
				str += "	<td class='dataCol2'>" + print_room_direction(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>地　目</td>";
				str += "	<td class='dataCol2'>" + print_chimoku(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>建蔽/容積率</td>";
				str += "	<td class='dataCol2'>" + print_kenpei_yoseki(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>接　道</td>";
				str += "	<td class='dataCol3' colspan='3'>" + print_setsudo(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>交　通</div>";
				str += "	<td class='dataCol2'>" + print_kotu(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>学校区</div>";
				str += "	<td class='dataCol2'>" + print_gakkouku(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>駐車場</td>";
				str += "	<td class='dataCol2'>" + print_parking(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>現　況</td>";
				str += "	<td class='dataCol2'>" + item["genkyo"] + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>年収益</div>";
				str += "	<td class='dataCol3' colspan='3'>" + print_profit(item) + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>その他</td>";
				str += "	<td class='dataCol2'>" + map_link + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>取　引</td>";
				str += "	<td class='dataCol2'>" + item["taiyo"] + "</td>";
				str += "</tr>";
				str += "<tr class='bukkenDetailRow'>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>Ｐ　Ｒ</div>";
				str += "	<td class='dataCol3' colspan='3'>" + item["pr"].replace("\n","<br />") + "</td>";
				str += "</tr>";
				break;

		case "apart-rental":
		case "mansion-rental":

				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>種　別</td>";
				str += "	<td class='dataCol2'>" + item["bukken_type_name"] + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>物件番号</td>";
				str += "	<td class='dataCol2'>" + item["bukken_id"] + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>所在地</td>";
				str += "	<td class='dataCol3' colspan='3'>" + item["address"] + "</div>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>物件名</td>";
				str += "	<td class='dataCol3' colspan='3'>" + item["bukken_name"] + "</div>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>間取り</td>";
				str += "	<td class='dataCol3' colspan='3'>" + print_layout(item) + "</div>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>構　造</td>";
				str += "	<td class='dataCol2'>" + print_structure2(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>建築年</td>";
				str += "	<td class='dataCol2'>" + print_build_year(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>賃　料</td>";
				str += "	<td class='dataCol2'>" + print_rental_price(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>部屋向き</td>";
				str += "	<td class='dataCol2'>" + print_room_direction(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>敷金（保証金）</td>";
				str += "	<td class='dataCol2'>" + print_shikikin(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>規　模</td>";
				str += "	<td class='dataCol2'>" + print_scale(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>礼　金</td>";
				str += "	<td class='dataCol2'>" + print_reikin(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>共益費　</td>";
				str += "	<td class='dataCol2'>" + print_cost(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>駐車場</td>";
				str += "	<td class='dataCol2'>" + print_parking(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>CATV費</td>";
				str += "	<td class='dataCol2'>" + print_catv(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>駐車場費</td>";
				str += "	<td class='dataCol2'>" + print_parking_price(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>その他費用</td>";
				str += "	<td class='dataCol2'>" + item["cost_other"].replace("\n","<br />") + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>交　通</div>";
				str += "	<td class='dataCol2'>" + print_kotu(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>学校区</div>";
				str += "	<td class='dataCol2'>" + print_gakkouku(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>設　備</td>";
				str += "	<td class='dataCol3' colspan='3'>" + print_setsubi(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>その他</td>";
				str += "	<td class='dataCol2'>" + map_link + "</td>";
				str += "	</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>取　引</td>";
				str += "	<td class='dataCol2'>" + item["taiyo"] + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>Ｐ　Ｒ</div>";
				str += "	<td class='dataCol3' colspan='3'>" + item["pr"].replace("\n","<br />") + "</td>";
				str += "</tr>";
				break;

		case "office-rental":
		case "shop-rental":
		case "store-rental":

				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>種　別</td>";
				str += "	<td class='dataCol2'>" + item["bukken_type_name"] + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>物件番号</td>";
				str += "	<td class='dataCol2'>" + item["bukken_id"] + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>所在地</td>";
				str += "	<td class='dataCol3' colspan='3'>" + item["address"] + "</div>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>物件名</td>";
				str += "	<td class='dataCol3' colspan='3'>" + item["bukken_name"] + "</div>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>床面積</td>";
				str += "	<td class='dataCol2'>" + print_floors_area(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>建築年</td>";
				str += "	<td class='dataCol2'>" + print_build_year(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>構　造</td>";
				str += "	<td class='dataCol2'>" + print_structure2(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>規　模</td>";
				str += "	<td class='dataCol2'>" + print_scale(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>賃　料</td>";
				str += "	<td class='dataCol2'>" + print_rental_price(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>共益費</td>";
				str += "	<td class='dataCol2'>" + print_cost(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>敷金（保証金）</td>";
				str += "	<td class='dataCol2'>" + print_shikikin(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>CATV費</td>";
				str += "	<td class='dataCol2'>" + print_catv(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>礼　金</td>";
				str += "	<td class='dataCol2'>" + print_reikin(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>その他費用</td>";
				str += "	<td class='dataCol2'>" + item["cost_other"].replace("\n","<br />") + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>駐車場</td>";
				str += "	<td class='dataCol2'>" + print_parking(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>駐車場費</td>";
				str += "	<td class='dataCol2'>" + print_parking_price(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>接　道</td>";
				str += "	<td class='dataCol3' colspan='3'>" + print_setsudo(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>交　通</td>";
				str += "	<td class='dataCol3' colspan='3'>" + print_kotu(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>設　備</div>";
				str += "	<td class='dataCol3' colspan='3'>" + print_setsubi(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>その他</td>";
				str += "	<td class='dataCol2'>" + map_link + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>取　引</td>";
				str += "	<td class='dataCol2'>" + item["taiyo"] + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>Ｐ　Ｒ</div>";
				str += "	<td class='dataCol3' colspan='3'>" + item["pr"].replace("\n","<br />") + "</td>";
				str += "</tr>";
				break;

		case "land-rental":

				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>種　別</td>";
				str += "	<td class='dataCol2'>" + item["bukken_type_name"] + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>物件番号</td>";
				str += "	<td class='dataCol2'>" + item["bukken_id"] + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>所在地</td>";
				str += "	<td class='dataCol3' colspan='3'>" + item["address"] + "</div>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>賃　料</td>";
				str += "	<td class='dataCol2'>" + print_rental_price(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>礼　金</td>";
				str += "	<td class='dataCol2'>" + print_reikin(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>敷金（保証金）</td>";
				str += "	<td class='dataCol2'>" + print_shikikin(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>その他費用</td>";
				str += "	<td class='dataCol2'>" + item["cost_other"].replace("\n","<br />") + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>土地面積</td>";
				str += "	<td class='dataCol3' colspan='3'>" + print_area(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>都市計画</td>";
				str += "	<td class='dataCol2'>" + print_purpose(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>建蔽/容積率</td>";
				str += "	<td class='dataCol2'>" + print_kenpei_yoseki(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>地　目</td>";
				str += "	<td class='dataCol2'>" + print_chimoku(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>現　況</td>";
				str += "	<td class='dataCol2'>" + item["genkyo"] + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>接　道</td>";
				str += "	<td class='dataCol3' colspan='3'>" + print_setsudo(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>交　通</div>";
				str += "	<td class='dataCol3' colspan='3'>" + print_kotu(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>その他</td>";
				str += "	<td class='dataCol2'>" + map_link + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>取引</td>";
				str += "	<td class='dataCol2'>" + item["taiyo"] + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>Ｐ　Ｒ</div>";
				str += "	<td class='dataCol3' colspan='3'>" + item["pr"].replace("\n","<br />") + "</td>";
				str += "</tr>";
				break;

		case "parking-rental":

				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>種　別</td>";
				str += "	<td class='dataCol2'>" + item["bukken_type_name"] + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>物件番号</td>";
				str += "	<td class='dataCol2'>" + item["bukken_id"] + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>所在地</td>";
				str += "	<td class='dataCol3' colspan='3'>" + item["address"] + "</div>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>物件名</td>";
				str += "	<td class='dataCol3' colspan='3'>" + item["bukken_name"] + "</div>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>賃　料</td>";
				str += "	<td class='dataCol2'>" + print_rental_price(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>礼　金</td>";
				str += "	<td class='dataCol2'>" + print_reikin(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>敷金（保証金）</td>";
				str += "	<td class='dataCol2'>" + print_shikikin(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>その他費用</td>";
				str += "	<td class='dataCol2'>" + item["cost_other"].replace("\n","<br />") + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>その他</td>";
				str += "	<td class='dataCol2'>" + map_link + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>取　引</td>";
				str += "	<td class='dataCol2'>" + item["taiyo"] + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>Ｐ　Ｒ</div>";
				str += "	<td class='dataCol3' colspan='3'>" + item["pr"].replace("\n","<br />") + "</td>";
				str += "</tr>";
				break;

		case "house-rental":

				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>種　別</td>";
				str += "	<td class='dataCol2'>" + item["bukken_type_name"] + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>物件番号</td>";
				str += "	<td class='dataCol2'>" + item["bukken_id"] + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>所在地</td>";
				str += "	<td class='dataCol3' colspan='3'>" + item["address"] + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>物件名</td>";
				str += "	<td class='dataCol3' colspan='3'>" + item["bukken_name"] + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>間取り</td>";
				str += "	<td class='dataCol3' colspan='3'>" + print_layout(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>構　造</td>";
				str += "	<td class='dataCol3' colspan='3'>" + print_structure(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>建築年</td>";
				str += "	<td class='dataCol2'>" + print_build_year(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>駐車場</td>";
				str += "	<td class='dataCol2'>" + print_parking(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>賃　料</td>";
				str += "	<td class='dataCol2'>" + print_rental_price(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>礼　金</td>";
				str += "	<td class='dataCol2'>" + print_reikin(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>敷金（保証金）</td>";
				str += "	<td class='dataCol2'>" + print_shikikin(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>その他費用</td>";
				str += "	<td class='dataCol2'>" + item["cost_other"].replace("\n","<br />") + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>交　通</td>";
				str += "	<td class='dataCol2'>" + print_kotu(item) + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>学校区</div>";
				str += "	<td class='dataCol2'>" + print_gakkouku(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>設　備</div>";
				str += "	<td class='dataCol3' colspan='3'>" + print_setsubi(item) + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>その他</td>";
				str += "	<td class='dataCol2'>" + map_link + "</td>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>取　引</td>";
				str += "	<td class='dataCol2'>" + item["taiyo"] + "</td>";
				str += "</tr>";
				str += "<tr>";
				str += "	<td class='dataCol1' bgcolor='" + bg_color + "'>Ｐ　Ｒ</div>";
				str += "	<td class='dataCol3' colspan='3'>" + item["pr"].replace("\n","<br />") + "</td>";
				str += "</tr>";
				break;

	}

	str += "</table><span id='endBukkenDetailInfo'></span>";

	// 物件詳細情報の表示
	$("bukkenDetailStrBLK").innerHTML = str;
	$("bukkenDetailStrBLK").style.display = "block";
	$("bukkenDetailPhotoBackBLK").style.display = "block";
	$("bukkenDetailPhotoBLK").style.display = "block";

	// メール送信のためのデータをセット
	id = item["bukken_id"].substring(3) - 0;
	$("form_buk_bukken_id").value 	= item["bukken_id"];
	$("form_buk_id").value 			= id;
	$("form_buk_bukken_type").value = item["bukken_type"];

	// 画像ファイルの表示
	if( image_buff.length >= 1 ){
		str = "";
		for( var i=0;i<image_buff.length;i++ ){

			if( image_buff[i].trim() ){
				var filename = "./images/" + image_buff[i];
				str += "<a href='" + filename + "' rel='lightbox[bukken]'><img src='" + filename + "'></a>";
			}
		}
		$("bukkenDetailPhotoArea").innerHTML = str;
	}
	else{
		$("bukkenDetailPhotoArea").innerHTML = "<p>画像ファイルはありません。</p>";
	}


	// 資料請求ボタンの表示
	if( !cur_mode ){
		$("toInquireBLK").style.display = "block";
		$("bukkenDetailContentsBLK").style.height = "346px";
	}
	else{
		$("toInquireBLK").style.display = "none";
//		$("bukkenDetailContentsBLK").style.height = "auto";		// *****
	}


	// メニュー・会社名・コピーライトを非表示
//	$("menuBLK").style.display = "none";
//	$("logoBLK").style.display = "none";
//	$("copyrightBLK").style.display = "none";

	pre_page_mode = cur_page_mode;
	cur_page_mode = "bukkenDetail";

	// 物件資料請求を初期化&非表示
	$("name_buk").value = "";
	$("mail_buk").value = "";
	$("zip_code_buk").value = "";
	$("address1_buk").value = "";
	$("address2_buk").value = "";
	$("tel_buk").value = "";
	$("fax_buk").value = "";
	$("contents_buk").value = "";
	$("fax_buk").value = "";
	$("henshin_tel_buk").checked = false;
	$("henshin_fax_buk").checked = false;
	$("henshin_yubin_buk").checked = false;

	// 物件資料請求を非表示
	$("bukkenDetailContentsBLK").scrollTop = 0;
	$("inquireContentsBLK_buk").style.display = "none";
	$("inquireConfBLK_buk").style.display = "none";
	$("inquireSuccessBLK_buk").style.display = "none";
	$("inquireErrorBLK_buk").style.display = "none";

	// 物件一覧ページを非表示
//	$(pre_page_mode+"BLK").style.display = "none";
	$("topBLK").style.display = "none";
	$("companyBLK").style.display = "none";
	$("whatsnewBLK").style.display = "none";
	$("bukkenListBLK").style.display = "none";
	$("bukkenDetailBLK").style.display = "none";
	$("bukkenSearchBLK").style.display = "none";
	$("linkBLK").style.display = "none";
	$("inquireBLK").style.display = "none";


	percent = 90; percent2 = 100;
//	percent = percent2 = 0;
	showContents();

	// 画像表示位置の変更
	var obj_height = $("endBukkenDetailInfo").offsetTop;
	if( !cur_mode ){	// 通常時
		if( obj_height < 350 ){
			$("bukkenDetailPhotoBLK").style.marginTop 		= obj_height + 100 + 4 + "px";
			$("bukkenDetailPhotoBackBLK").style.marginTop 	= obj_height + 100 + 4 + "px";
			$("toInquireBLK").style.marginTop 				= obj_height + 100 + 4 + 70 + 4 + "px";
		}
		else{
			$("bukkenDetailPhotoBLK").style.marginTop 		= "450px";
			$("bukkenDetailPhotoBackBLK").style.marginTop 	= "450px";
			$("toInquireBLK").style.marginTop 				= "524px";
		}

		$("toBukkenListBLK").style.display = "block";
		$("bukkenDetailPrintBLK").innerHTML = "<a href='' onclick=\"window.open('?page=detail&id=" + id + "&btype=" + item['bukken_type'] + "','','width=820,height=580,menubar=yes,resizable=yes,scrollbars=yes,status=yes'); return false;\"><img src='../sp-/images/btn_print.png' width='189' height='36' class='iepngfix'></a>";
	}
	else{	// 印刷時

		$("bukkenDetailPhotoBackBLK").style.display = "none";

//		$("bukkenDetailPhotoBLK").style.marginTop 	= obj_height + 50 + 4 + "px";		// *****
//		$("bukkenDetailPhotoBackBLK").style.marginTop 	= obj_height + 50 + 4 + "px";	// *****
	}



	// アクセスログの出力
	var date = new Date();
	var time = date.getTime();
	var fname = "../setBukkenAccess.php?t=" + time + "&user="+cur_user+"&bukken_type="+item['bukken_type']+"&id="+id;
	new Ajax.Request(fname,{method:"get",onComplete: onSetBukkenAccess});

}

function onSetBukkenAccess(obj){

	var result = obj.responseText;
	result = result.trim();

//alert(result);

}

// ************************************************************************************
//  各種表示形式を出力する
// ************************************************************************************

function print_kotu(item){

	var str = "";

	if( item["bus"] != "" && item["bus_time"] != "" ){
		str = item["bus"] + "バス停から徒歩 " + item["bus_time"] + "分<br />";
	}
	if( item["jr"] != "" && item["jr_time"] != "" ){
		str += "JR " + item["jr"] + "駅から徒歩 " + item["jr_time"] + "分";
	}
	return str;
}

function print_setsudo(item){

	var str = "";

	if( !(item["load_direction"] == "" && item["load_width"] == "" && item["load_touch"] == "") ){
		if( item["load_direction"] != "" )	{ str  = item["load_direction"] + "向き "; }
		if( item["load_width"] != "" )		{ str += item["load_width"] + "m幅道路"; }
		if( item["load_touch"] != "" )		{ str += "に" + item["load_touch"] + "m接面"; }
		str += "<br />";
	}
	if( !(item["load_direction2"] == "" && item["load_width2"] == "" && item["load_touch2"] == "") ){
		if( item["load_direction2"] != "" )	{ str += item["load_direction2"] + "向き "; }
		if( item["load_width2"] != "" )		{ str += item["load_width2"] + "m幅道路"; }
		if( item["load_touch2"] != "" )	 	{ str += "に" + item["load_touch2"] + "m接面"; }
		str += "<br />";
	}
	if( item["load_direction_other"] ){ str += "※" + item["load_direction_other"].replace("\n","<br />"); }
	return str;
}

function print_gakkouku(item){

	var str = "";
	if( item["school"] != "" )   { str += item["school"] +"小学校<br />"; }
	if( item["jh_school"] != "" ){ str += item["jh_school"] + "中学校"; }
	return str;
}

function print_area(item){

	var str = "";
	if( item["area"] != "" && item["area"] != 0 ) {
		item["area"] = item["area"].replace(",",".");
		tubo = item["area"] * 0.3025;
		tubo = Math.floor(tubo * 100)  / 100;
//		tubo = Math.round(tubo * 100)  / 100;
//		tubo = sprintf("%.2f",tubo);
		str += item["area"] + "m<sup>2</sup> （" + tubo + "坪）";
	}
	if( item["area_other"] ){ str += "※" + item["area_other"].replace("\n","<br />"); }
	return str;
}

function print_area2(item){

	var str = "";
	if( item["area"] != "" && item["area"] != 0 ) {
		str = item["area"] +"m<sup>2</sup>";
	}
	return str;
}

function print_floors_area(item){

	var str = "";
	if( item["floors_area"] != "" && item["floors_area"] != 0 ) {
		item["floors_area"] = item["floors_area"].replace(",",".");
		tubo = item["floors_area"] * 0.3025;
		tubo = Math.floor(tubo * 100)  / 100;
//		tubo = sprintf("%.2f",tubo);
		str += item["floors_area"] + "m<sup>2</sup> （" + tubo +"坪）";
	}
	return str;
}

function print_floors_area2(item){

	var str = "";
	if( item["floors_area"] != "" && item["floors_area"] != 0 ) {
		str += item["floors_area"] + "m<sup>2</sup>";
	}
	return str;
}

function print_each_floors_area(item){


	var str = "";
	if( item["floor1_area"] != "" ) {
		item["floor1_area"] = item["floor1_area"].replace(",",".");
		tubo = item["floor1_area"] * 0.3025;
		tubo = Math.floor(tubo * 100)  / 100;
//		tubo = sprintf("%.2f",tubo);
		str += "1F ： " + item["floor1_area"] +"m<sup>2</sup> （" + tubo + "坪）";
	}
	if( item["floor2_area"] != "" ) {
		item["floor2_area"] = item["floor2_area"].replace(",",".");
		tubo = item["floor2_area"] * 0.3025;
		tubo = Math.floor(tubo * 100)  / 100;
//		tubo = sprintf("%.2f",tubo);
		str += " / 2F ： " + item["floor2_area"] +"m<sup>2</sup> （" + tubo + "坪）";
	}
	if( item["floor3_area"] != "" ) {
		item["floor3_area"] = item["floor3_area"].replace(",",".");
		tubo = item["floor3_area"] * 0.3025;
		tubo = Math.floor(tubo * 100)  / 100;
//		tubo = sprintf("%.2f",tubo);
		str += " / 3F ： " + item["floor3_area"] +"m<sup>2</sup> （" + tubo + "坪）";
	}
	if( item["floor4_area"] != "" ) {
		str += " / " + item["floor4_area"];
	}
	return str;
}

function print_balcony_area(item){

	var str = "";
	if( item["balcony_area"] != "" && item["balcony_area"] != 0 ) {
		item["balcony_area"] = item["balcony_area"].replace(",",".");
		tubo = item["balcony_area"] * 0.3025;
		tubo = Math.floor(tubo * 100)  / 100;
//		tubo = sprintf("%.2f",tubo);
		str += item["balcony_area"] + "m<sup>2</sup> （" + tubo + "坪）";
	}
	return str;
}

function print_kenpei_yoseki(item){

	var str = "";
	if( item["kenpei"] != "" ) {
		str += item["kenpei"] + "%";
	}
	if( item["yoseki"] != "" ) {
		str += " ／ " + item["yoseki"] + "%";
	}
	return str;
}

function print_room_direction(item){

	var str = "";
	if( item["room_direction"] != "" ) {
		str += item["room_direction"] +"向き";
	}
	return str;
}

function print_layout(item){

	var str = "";
	str += item["layout"];
	if( item["layout_other"] ){ str += "　※" + item["layout_other"]; }
	return str;
}

function print_layout2(item){

	var str = "";
	if( item["layout_num"] )    { str += item["layout"] + "×" + item["layout_num"] + "戸　"; }
	if( item["layout2_num"] )   { str += item["layout2"] +"×" + item["layout2_num"] +" 戸　"; }
	if( item["layout_all_num"] ){ str += "全 " + item["layout_all_num"] + "戸<br>"; }
	if( item["layout_other"] )  { str += item["layout_other"]; }
	return str;
}

function print_chimoku(item){

	var str = "";
	str += item["chimoku"];
	if( item["chimoku_other"] ){ str += "　※" + item["chimoku_other"].replace("\n","<br />"); }
	return str;
}

function print_purpose(item){

	var str = "";
	str += item["purpose"];
	if( item["purpose_other"] ){ str += "　※" + item["purpose_other"].replace("\n","<br />"); }
	return str;
}

function print_structure(item){

	var str = "";
	if( item["structure"] != "" && item["structure"] != "その他" ){ str += item["structure"] + "　"; }
	if( item["roof"]      != "" && item["roof"]      != "その他" ){ str += item["roof"] + "葺　"; }
	if( item["floors"]    != "" ){ str += item["floors"] + "階建"; }

	if( item["structure_other"] ){ str += "　※" + item["structure_other"]; }
	return str;
}

function print_structure2(item){

	var str = "";
	if( item["structure"] != "" && item["structure"] != "その他" ){ str += item["structure"]; }
	if( item["structure_other"] ){ str += "　※" + item["structure_other"]; }
	return str;
}

function print_scale(item){

	var str = "";
	if( item["scale1"] != "" ){ str += "地上 " + item["scale1"] + "階　"; }
	if( item["scale2"] != "" ){ str += "地下 " + item["scale2"] + "階　"; }
	if( item["scale3"] != undefined && item["scale3"] != "" ){ str += item["scale3"] + "階部分";}
	return str;
}

function print_price(item){

	var str = "";
	if( item["price"] != "" ) {
		price = addComma(item["price"]);
		str = "<span class='price'>" + price + "</span> 万円";
	}
	return str;
}

function print_price2(item){

	var str = "";
	if( item["price"] != "" ) {
		price = addComma(item["price"]);
		str = price + "万円";
	}
	return str;
}

function print_land_price(item){

	var str = "";
	if( item["land_price"] != "" ) {
		land_price = addComma(item["land_price"]);
		str = land_price +"万円";
	}
	return str;
}

function print_rental_price(item){

	var str = "";
	if( item["rental_price"] != "" ) {
		rental_price = addComma(item["rental_price"]);
		str = "月額 <span class='price'>" + rental_price + "</span> 円";
	}
	return str;
}

function print_rental_price2(item){

	var str = "";
	if( item["rental_price"] != "" ) {
		rental_price = addComma(item["rental_price"]);
		str = rental_price + "円";
	}
	return str;
}

function print_profit(item){

	var str = "";
	if( item["profit_year"] != "" ) {
		profit_year = addComma(item["profit_year"]);
		str = profit_year + "万円";
	}
	return str;
}

function print_cost(item){

	var str = "";
	if( item["cost1_komi_flag"] == "1" ){
		str += "月額 込み";
	}
	else if( item["cost1"] != "" ) {
		cost1 = addComma(item["cost1"]);
		str += "月額" + cost1 + "円";
	}
	return str;
}

function print_shikikin(item){

	var str = "";
	if( item["hosho"] != "" ) {
		hosho = addComma(item["hosho"]);
		str += "月額" + hosho + "円";
	}
	return str;
}

function print_reikin(item){

	var str = "";
	if( item["reikin"] != "" ) {
		reikin = addComma(item["reikin"]);
		str += "月額" + reikin + "円";
	}
	return str;
}

function print_catv(item){

	var str = "";
	if( item["catv_komi_flag"] == "1" ){
		str += "月額 込み";
	}
	else if( item["catv"] != "" ) {
		catv = addComma(item["catv"]);
		str += "月額" + catv + "円";
	}
	return str;
}

function print_build_year(item){

	var str = "";
	if( item["new_flag"] == 1 ) { str += "<img class='iconImage' style='margin-right:5px' src='../sp-/images/icon_shinchiku.png' width='25' height='13' class='iepngfix'>"; }

	if( item["build_year"] != "" ) {
		str += item["build_nengo"] + item["build_year"] + "年建築";
	}
	return str;
}

function print_parking(item){

	var str = "";
	str += item["parking"];
	if( item["parking_other"] ){ str += "　※" + item["parking_other"]; }
	return str;
}

function print_parking_price(item){

	var str = "";
	if( item["parking1_price"] != "" ) {
		parking1_price = addComma(item["parking1_price"]);
		str += "月額　1台目 " + parking1_price + "円　";
	}
	if( item["parking2_price"] != "" ) {
		parking2_price = addComma(item["parking2_price"]);
		str += "2台目以降" + parking2_price + "円";
	}
	return str;
}

function print_cost1(item){

	var str = "";
	if( item["cost1"] != "" ) {
		cost1 = addComma(item["cost1"]);
		str += "月額 " + cost1 + "円";
	}
	return str;
}

function print_cost2(item){

	var str = "";
	if( item["cost2"] != "" ) {
		cost2 = addComma(item["cost2"]);
		str += "月額 " + cost2 +"円";
	}
	return str;
}

function print_setsubi(item){

	var str = "";
	var kugiri = "";
	var br = "";

	if( item["aircon_flag"] == 1 )	{ str += "エアコン"; kugiri="/"; br="<br />"; }
	if( item["flooring_flag"] == 1 ){ str += kugiri + "フローリング"; kugiri="/"; br="<br />"; }
	if( item["bath_flag"] == 1 )	{ str += kugiri + "バス・トイレ別"; kugiri="/"; br="<br />"; }
	if( item["oidaki_flag"] == 1 )	{ str += kugiri + "追炊き風呂"; kugiri="/"; br="<br />"; }
	if( item["dresser_flag"] == 1 )	{ str += kugiri + "シャンプードレッサー"; kugiri="/"; br="<br />"; }
	if( item["system_flag"] == 1 )	{ str += kugiri + "システムキッチン"; kugiri="/"; br="<br />"; }
	if( item["autolock_flag"] == 1 ){ str += kugiri + "オートロック"; kugiri="/"; br="<br />"; }
	if( item["catv_flag"] == 1 )	{ str += kugiri + "ＣＡＴＶ"; kugiri="/"; br="<br />"; }
	if( item["bs_flag"] == 1 )		{ str += kugiri + "ＢＳアンテナ"; kugiri="/"; br="<br />"; }
	if( item["loft_flag"] == 1 )	{ str += kugiri + "ロフト"; kugiri="/"; br="<br />"; }
	if( item["mezzo_flag"] == 1 )	{ str += kugiri + "メゾネット"; br="<br />"; }

	str += "<br />" + item["setsubi_other"].replace("\n","<br />");
	return str;
}


// ************************************************************************************
//  こんな物件探しています
// ************************************************************************************

function getBukkenSearch(){
	var date = new Date();
	var time = date.getTime();
	var fname = "../getBukkenLooking2.php?t=" + time + "&user="+cur_user;
	new Ajax.Request(fname,{method:"get",onComplete: onGetBukkenSearch});
	return false;
}

function onGetBukkenSearch(obj){

	var result = obj.responseText;
	result=result.trim();

	if( !result ){ return; }

//alert(result);

	result = result.trim();
	var line = result.split("\n");
	var count = line.shift();

	if( count == 0 ){
		$("notDataBLK").style.display = "block";
	}

	item = new Array();
	var idx = 0;

	for(var i=0;i<line.length;i++){

		item[idx] = new Array();

		line[i] = line[i].trim();
		if( !line[i] ){ continue; }

		var data = line[i].split("\t")
		for(var j=0;j<data.length;j++){
			var data2 = data[j].split("==");
			var key = data2[0];
			key = key.trim();
			item[idx][key] = data2[1];
		}
		idx++;
	}

	str = "";
	for(var i=0;i<item.length;i++){

		str += "<table cellspacing=1 class='search'>";
		str += "	<tr class='titleRow' bgcolor='" + bg_color + "'>";
		str += "		<td class='dataCol1'>" + item[i]["title"] + "</td>";
		str += "		<td class='dataCol2'>" + item[i]["date"] + "</td>";
		str += "	</tr>";
		str += "	<tr class='contentsRow'>";
		str += "		<td colspan='2' class='dataCol1'>" + item[i]["contents"].replace("\n","<br />");
		str += "			<div class='inquire'><a href='' title='お問い合わせ'><img src='../sp-/images/btn_inquire2.png' width='91' height='21' class='iepngfix' onclick=\"onInquire('sea'," + i + "); return false;\"></a></div>";
		str += "		</td>";
		str += "	</tr>";
		str += "</table>";


	}

//alert(str);

	// 一覧の表示
	$("bukkenSearchStrBLK").innerHTML = str;
	$("bukkenSearchStrBLK").style.display = "block";

	percent = 90; percent2 = 100;
//	percent = percent2 = 0;

	showContents();
}


// ************************************************************************************
//  トピックス
// ************************************************************************************

function getWhatsnew(){
	var date = new Date();
	var time = date.getTime();
	var fname = "../getWhatsnew2.php?t=" + time + "&user="+cur_user;
	new Ajax.Request(fname,{method:"get",onComplete: onGetWhatsnew});
	return false;
}

function onGetWhatsnew(obj){

	var result = obj.responseText;
	result=result.trim();

	if( !result ){ return; }

//alert(result);

	result = result.trim();
	var line = result.split("\n");
	var count = line.shift();

	if( count == 0 ){
		$("notDataBLK").style.display = "block";
	}

	item = new Array();
	var idx = 0;

	for(var i=0;i<line.length;i++){

		item[idx] = new Array();

		line[i] = line[i].trim();
		if( !line[i] ){ continue; }

		var data = line[i].split("\t")
		for(var j=0;j<data.length;j++){
			var data2 = data[j].split("==");
			var key = data2[0];
			key = key.trim();
			item[idx][key] = data2[1];
		}
		idx++;
	}

	str = "";
	for(var i=0;i<item.length;i++){

		str += "<table cellspacing=1 class='search'>";
		str += "	<tr class='titleRow' bgcolor='" + bg_color + "'>";
		str += "		<td class='dataCol1'>" + item[i]["title"] + "</td>";
		str += "		<td class='dataCol2'>" + item[i]["date"] + "</td>";
		str += "	</tr>";
		str += "	<tr class='contentsRow'>";
		str += "		<td colspan='2' class='dataCol1'>" + item[i]["contents"].replace("\n","<br />");
		str += "		</td>";
		str += "	</tr>";
		str += "</table>";
	}


	// 一覧の表示
	$("whatsnewContentsBLK").innerHTML = str;

	percent = 90; percent2 = 100;
//	percent = percent2 = 0;

	showContents();
}










// ******************************************************************************************************************************
// フォームの入力チェック
// id   = チェックするフォームのID
// mode = 0:数字のみ / 1: 数字,カンマ / 2: 数字,-（電話番号）/ 3:日付（数字,/）/ 4:メールアドレス(@.-)
// len  = 入力可能な文字数
// 8="Backspace" / 9="tab" / 37="←" / 39="→" / 46="delete" / 109 or 189 = "-" / 111 or 191="/" / 188="," / 190="." / 192="@"
// ******************************************************************************************************************************

function onKeyDownCheck(id,mode,len){

//alert(event.keyCode);
	if( mode == 0 ){

		if( !((event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 46 || event.keyCode == 37 || event.keyCode == 39) ||
			(((48 <= event.keyCode && event.keyCode <= 57) || (96 <= event.keyCode && event.keyCode <= 105)) && $F(id).length < len)) ){

			Event.stop(event);
		}
	}
	else if( mode == 1 ){
		if( !((event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 46 || event.keyCode == 37 || event.keyCode == 39) ||
			(((48 <= event.keyCode && event.keyCode <= 57) || (96 <= event.keyCode && event.keyCode <= 105) || (!event.shiftKey && event.keyCode == 188) ) && $F(id).length < len)) ){

			Event.stop(event);
		}
	}
	else if( mode == 2 ){

		if( !((event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 46 || event.keyCode == 37 || event.keyCode == 39) ||
			(((48 <= event.keyCode && event.keyCode <= 57) || (96 <= event.keyCode && event.keyCode <= 105) || (!event.shiftKey && event.keyCode == 189) || event.keyCode == 109) && $F(id).length < len)) ){

			Event.stop(event);
		}
	}
	else if( mode == 3 ){
		if( !((event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 46 || event.keyCode == 37 || event.keyCode == 39) ||
			(((48 <= event.keyCode && event.keyCode <= 57) || (96 <= event.keyCode && event.keyCode <= 105) || event.keyCode == 111 || (!event.shiftKey && event.keyCode == 191) ) && $F(id).length < len)) ){

			Event.stop(event);
		}
	}
	else if( mode == 4 ){

		if( !((event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 46 || event.keyCode == 37 || event.keyCode == 39) ||
			  (!event.shiftKey && event.keyCode == 190) ||
			  (!event.shiftKey && event.keyCode == 192) ||
			  (event.keyCode == 109) || 
			  (event.shiftKey && event.keyCode == 226) ||
			  (!event.shiftKey && event.keyCode == 189) ||
			  (65 <= event.keyCode && event.keyCode <= 90) ||
			(((48 <= event.keyCode && event.keyCode <= 57) || (96 <= event.keyCode && event.keyCode <= 105) ) )) ){

			Event.stop(event);
		}
	}

}

// ******************************************************************************************************************************
// 都道府県
// ******************************************************************************************************************************

function select_pref(){

	var arr = new Array("北海道","青森県","岩手県","宮城県","秋田県","山形県","福島県","茨城県","栃木県","群馬県","埼玉県","千葉県","東京都","神奈川県","新潟県","富山県","石川県","福井県","山梨県","長野県","岐阜県","静岡県","愛知県","三重県","滋賀県","京都府","大阪府","兵庫県","奈良県","和歌山県","鳥取県","島根県","岡山県","広島県","山口県","徳島県","香川県","愛媛県","高知県","福岡県","佐賀県","長崎県","熊本県","大分県","宮崎県","鹿児島県","沖縄県");

	document.write("<select class='pref' id='pref' name='pref'><option value='' selected></option>");

	for( var i=0;i<arr.length;i++ ){
		document.write("<option value='" + arr[i] + "'>" + arr[i] + "</option>");
	}
	document.write("</select>");
}

// ******************************************************************************************************************************
// ウィンドウリサイズ時に表示位置を変更する
// ******************************************************************************************************************************

function onWindowResize(){

	if( document.documentElement.clientHeight ){
		var window_height = document.documentElement.clientHeight;
		var window_width = document.documentElement.clientWidth;

		var top = (window_height - 675) / 2;
		if( top < 0 ){ top = 0; }
		$("wrapperBLK").style.marginTop  = top + "px";
//		$("bgBLK").style.marginTop  = top + "px";

		var left = (window_width - 900) / 2;
		if( left < 0 ){ left = 0; }
		$("wrapperBLK").style.marginLeft  = left + "px";


	}
}

// ******************************************************************************************************************************
// パラメータの取得
// ******************************************************************************************************************************

var arg = new Array();
function get_para(){

	var para = unescape(window.location.search);
	para = para.substr(1);
	var a = para.split("&");

	for( var i=0;i<a.length;i++ ){
		var b = a[i].split("=");
		var key = b[0];
		arg[key] = b[1];
	}
}

// ******************************************************************************************************************************
// 3桁区切り
// ******************************************************************************************************************************

function addComma(val)
{
	str = ""+val;
	cnt = 0;
	n = "";
	for (i=str.length-1; i>=0; i--){
		n = str.charAt(i) + n;
		cnt++;
		if (((cnt % 3) == 0) && (i != 0)) n = ","+n;
	}
	return n;
}
