//チョイ見せ概要テーブルの設定
function changeKoumoku(dbName, chinryou, chinryou_unit, chinryou_post, price, price_unit, price_post, shikikin, shikikin_unit, reikin, reikin_unit, madoriheyakazu, madoritype, hensai, hensai_unit) {

	var price_flg = 0;
	var hensai_flg = 0;

	var chinryou_flg = 0;
	var madori_flg = 0;

	var table_flg = 0;

	if((dbName=="M11_SALE_TOCHI")||(dbName=="M12_SALE_KODATE")||(dbName=="M13_SALE_MANSION")||(dbName=="M14_SALE_ALLBUILDING")||(dbName=="M15_SALE_PARTBUILDING")){

		if (price != "" && price != " - ") {
			price_flg = 1;
			table_flg = 1;
		}

		if (hensai != "" && hensai != " - ") {
			hensai_flg = 1;
			table_flg = 1;
		}

	}else{

		if (chinryou != "" && chinryou != " - ") {
			chinryou_flg = 1;
			table_flg = 1;
		}

		if (madoriheyakazu != "" && madoriheyakazu != " - ") {
			madori_flg = 1;
			table_flg = 1;
		}

	}

	if (table_flg == 1) {

		

		if (price_flg == 1) {
			document.write ("<tr>");
			document.write ("<td class='koumoku'>価格</td>");
			document.write ("<td class='value'>"+price+" "+price_unit+"</td>");
			document.write ("</tr>");
		}
		if (hensai_flg == 1) {
			document.write ("<tr>");
			document.write ("<td class='koumoku'>月々の支払額</td>");
			document.write ("<td class='value'>毎月 "+hensai+" "+hensai_unit+"</td>");
			document.write ("</tr>");
		}

		if (chinryou_flg == 1) {
			document.write ("<tr>");
			document.write ("<td class='koumoku'>賃料</td>");
			document.write ("<td class='value'>"+chinryou+" "+chinryou_unit+"</td>");
			document.write ("</tr>");
		}
		if (madori_flg == 1) {
			document.write ("<tr>");
			document.write ("<td class='koumoku'>間取り</td>");
			document.write ("<td class='value'>"+madoriheyakazu+" "+madoritype+"</td>");
			document.write ("</tr>");
		}

		

	}

}

//ガジェット用の種類名に切り替える
function changeDBName(dbName) {
	if(dbName=="M11_SALE_TOCHI"){
		return "SALETOCHI";
	}else if(dbName=="M12_SALE_KODATE"){
		return "SALEKODATE";
	}else if(dbName=="M13_SALE_MANSION"){
		return "SALEMANSION";
	}else if(dbName=="M14_SALE_ALLBUILDING"){
		return "SALEALLBUILDING";
	}else if(dbName=="M15_SALE_PARTBUILDING"){
		return "SALEPARTBUILDING";
	}else if(dbName=="M16_RENT_RESIDENCE"){
		return "RENTRESIDENCE";
	}else if(dbName=="M17_RENT_BUSINESS"){
		return "RENTBUSINESS";
	}
}

//ガジェットで価格を表示するか賃料を表示するかの判定
function changePriceChinryou(dbName) {
	if((dbName=="M11_SALE_TOCHI")||(dbName=="M12_SALE_KODATE")||(dbName=="M13_SALE_MANSION")||(dbName=="M14_SALE_ALLBUILDING")||(dbName=="M15_SALE_PARTBUILDING")){
		return "Price";
	}else{
		return "Chinryou";
	}
}

