";
newHtml += "
";
newHtml += " ";
newHtml += "
";
newHtml += " "+l(rei_property.type)+" "+l("in")+" "+rei_property.city+"
"; newHtml += "€"+rei_property.price.trim().replace(/([0-9])([0-9]{3})$/, "$1,$2").replace(/([0-9])([0-9]{3})[,]/, "$1,$2,").replace(/([0-9])([0-9]{3})[,]/, "$1,$2,")+"
"; newHtml += ""+rei_property.description+"
"; newHtml += "";
newHtml += "
";
newHtml += " "+l("Location")+": "+rei_property.city+"
";
newHtml += " "+l("Ref no")+": "+rei_property.reference+"
";
newHtml += " "+l("Type")+": "+(typeof rei_property.subtype == "string" ? rei_property.subtype : rei_property.type)+"
";
newHtml += " "+l("Bedrooms")+": "+rei_property.bedrooms+"
";
newHtml += " "+l("Bathrooms")+": "+rei_property.bathrooms+"
";
newHtml += " "+l("Size")+": "+rei_property.built_area+"m²
";
newHtml += (rei_property.plot_area != undefined && rei_property.plot_area.length > 0) ? " "+l("Plot size")+": "+rei_property.plot_area+"m²
" : "";
newHtml += " ";
newHtml += "
";
if (rei_property.video != undefined && rei_property.video.length > 0) {
newHtml += " ";
newHtml += " "+l("Video")+"
"; let videoUrl = rei_property.video; if (videoUrl.match(/^https?:\/\/youtu.be\//)) newHtml += "";
else if (videoUrl.match(/^https?:\/\/youtube.com\//)) newHtml += "
";
}
if (rei_property.virtual_tour != undefined && rei_property.virtual_tour.length > 0) {
newHtml += "
"+l("Virtual Tour")+"
"; newHtml += ""; } if (rei_property.helicopter_view != undefined && rei_property.helicopter_view.length > 0) { newHtml += ""+l("360° view")+"
"; newHtml += ""; } newHtml += ""+l("Images")+"
"; newHtml += "";
rei_property.images = [];
for (imgNo = 0; imgNo < rei_property.image_urls; imgNo++) {
if (imgNo < 5)
newHtml += "";
rei_property.images.push(rei_property["image_url_"+imgNo]);
}
newHtml += "
";
newHtml += " ";
let features = rei_extract_features(rei_property);
console.log(features);
newHtml += " "+l("Property information")+"
"; if (rei_has_intval(rei_property, "construction_year")) newHtml += ""+l("Built Year")+"
"+rei_property.construction_year+"
"+l("Pool")+"
"+(features.pool ? l(features.pool) : l("Yes"))+"
"+l("Garden")+"
"+features.garden+"
"+l("Orientation")+"
"+features.orientation+"
"+l("Lift")+"
"+features.lift+"
"; if (rei_has_intval(rei_property, "community_fee")) newHtml += "
"+l("Community Fee")+"
€"+Math.round(parseInt(rei_property.community_fee)/12)+" /"+l("mon")+"
"+l("Property Tax (IBI)")+"
€"+rei_property.ibi+" /"+l("year")+"
"+l("Garbage Fee")+"
€"+rei_property.garbage_fee+" /"+l("year")+"