rei_months = ["januari", "februari", "mars", "april", "maj", "juni", "juli", "augusti", "september", "oktober", "november", "december"]; rei_marketingTypes = {"OneFamilyDetachedHouse" : "1-familjs friliggande villa","TwoFamilyDetachedHouse" : "2-familjs friliggande villa","Townhouse" : "Radhus","TerraceHouse" : "Kedjehus","TwinHouse" : "Parhus","Cottage" : "Fritidshus","Apartment" : "Bostadsrättslägenhet","Plot" : "Tomt","Farm" : "Gård","ParceledFarm" : "Avstyckad gård","Other " : "Övrig bostad","Project " : "Projekt","HorseFarm " : "Hästgård","Agriculture " : "Jordbruk","Forestry " : "Skogsbruk","ResidentialProperty " : "Bostadsfastight","OfficeProperty " : "Kontorsfastighet","RetailProperty " : "Butiksfastighet","IndustrialProperty " : "Industrifastighet","WarehouseProperty " : "Lagerfastighet","PremisesProperty " : "Lokalfastighet","Condominium " : "Ägarlägenhet","House " : "Friliggande villa","IngetBruk " : "Inget bruk "}; function rei_buildVitecLayout(callback = null) { if (typeof rei_vitecapi_property == 'undefined') { console.log("No data"); return;} let prop = rei_vitecapi_property; if (prop.type == 'utlandsfastigheter') return rei_buildVitecOverseasLayout(callback); prop.dateChangedEpoch = Date.parse(prop.dateChanged); let propertyContainer = document.getElementById("rei-property-container"); if (propertyContainer == null) { console.log("No element to insert property data!"); return;} let interestFormContainer = document.getElementById("rei-interestform-container"); propContact = document.createElement('div'); propContact.className = 'rei-property-contact'; propContact.innerHTML = ''; propContact.appendChild(interestFormContainer); var rei_vitecapi_hasMap = false; if (prop.baseInformation.objectAddress && prop.baseInformation.objectAddress.coordinate != undefined && prop.baseInformation.objectAddress.coordinate != null ) rei_vitecapi_hasMap = true; propTop = document.createElement('div'); propTop.className = 'rei-property-top'; htmlToAdd = ''; if (prop.viewings != undefined && prop.viewings != null ) { htmlToAdd += '
Typ: '+rei_marketingTypes[prop.marketedAs]+'
'; htmlToAdd += 'Objekt id: '+prop.assignment.estatenumber+'
'; // htmlToAdd += 'Upplåtelseform: '+prop.baseInformation.disposalForm+'
'; if (prop.houseInterior != undefined && prop.houseInterior != null && prop.houseInterior != 0) htmlToAdd += 'Antal rum: '+prop.houseInterior.numberOfRooms+(prop.houseInterior.numberOffBedroom != undefined ? (' varav '+prop.houseInterior.numberOffBedroom+' sovrum') : '')+'
'; if (prop.interior != undefined && prop.interior != null && prop.interior != 0) htmlToAdd += 'Antal rum: '+prop.interior.numberOfRooms+(prop.interior.numberOffBedroom != undefined ? (' varav '+prop.interior.numberOffBedroom+' sovrum') : '')+'
'; if (prop.baseInformation.livingSpace != undefined && prop.baseInformation.livingSpace != null && prop.baseInformation.livingSpace != 0) htmlToAdd += 'Boarea: '+prop.baseInformation.livingSpace+' m²'+'
'; if (prop.plot != undefined && prop.plot.area != undefined && prop.plot.area != null && prop.plot.area != 0) htmlToAdd += 'Tomtarea: '+prop.plot.area+' m²'+'
'; if (prop.baseInformation.otherSpace != undefined && prop.baseInformation.otherSpace != null && prop.baseInformation.otherSpace != 0) htmlToAdd += 'Biarea: '+prop.baseInformation.otherSpace+' m²'+'
'; if (prop.balconyPatio != undefined && prop.balconyPatio.balcony != undefined && prop.balconyPatio.balcony != null) htmlToAdd += 'Balkong: '+(prop.balconyPatio.balcony=="1" ? "Ja" : "Nej")+'
'; if (prop.floorAndElevator != undefined && prop.floorAndElevator.elevator != undefined && prop.floorAndElevator.elevator != null && (prop.floorAndElevator.elevator == "Yes" || prop.floorAndElevator.elevator == "No")) htmlToAdd += 'Hiss: '+(prop.floorAndElevator.elevator=="Yes" ? "Ja" : "Nej")+'
'; if (prop.floorAndElevator != undefined && prop.floorAndElevator.floor != undefined && prop.floorAndElevator.floor != null) { htmlToAdd += 'Våning: '+prop.floorAndElevator.floor; if (prop.floorAndElevator.totalNumberFloors != undefined && prop.floorAndElevator.totalNumberFloors != null) htmlToAdd += ' av '+prop.floorAndElevator.totalNumberFloors; htmlToAdd += '
'; } if (prop.assignment.status.name == "Till salu") { if (prop.price.startingPrice != undefined && prop.price.startingPrice != null && prop.price.startingPrice != 0) htmlToAdd += 'Pris: '+rei_vitec_priceFormat(prop.price.startingPrice)+' kr '+(prop.price.text != undefined && prop.price.text != null && prop.price.text != "" ? prop.price.text : '')+'
'; } else if (prop.price.finalPrice != undefined && prop.price.finalPrice != null && prop.price.finalPrice != 0) htmlToAdd += 'Pris: '+rei_vitec_priceFormat(prop.price.finalPrice)+' kr '+(prop.price.text != undefined && prop.price.text != null && prop.price.text != "" ? prop.price.text : '')+'
'; if (prop.baseInformation.monthlyFee != undefined && prop.baseInformation.monthlyFee != null && prop.baseInformation.monthlyFee != 0) { htmlToAdd += 'Avgift: '+prop.baseInformation.monthlyFee+' kr/mån'; if (prop.baseInformation.commentary != undefined && prop.baseInformation.commentary != null && prop.baseInformation.commentary.length > 0) htmlToAdd += ' '+prop.baseInformation.commentary; htmlToAdd += '
'; } htmlToAdd += 'Högsta bud: '+rei_vitec_priceFormat(prop.bids[0].amount)+' kr'; } htmlToAdd += 'Lägg ett bud'; if (Array.isArray(prop.bids) && prop.internetSettings != undefined && prop.internetSettings != null && prop.internetSettings.bidSetting != undefined && prop.internetSettings.bidSetting == "ShowBiddhistory") { htmlToAdd += '
"+bidTime+" | Budgivare "+prop.bids[bidNo].alias+" | "+(prop.bids[bidNo].cancelled ? '' : '')+ rei_vitec_priceFormat(prop.bids[bidNo].amount)+' kr'+(prop.bids[bidNo].cancelled ? '' : '')+" |
'+abbrTxt+'
'+(propDesc.length > abbrTxt.length ? '' : ''); if (propDesc.length > abbrTxt.length) propDescription.innerHTML += ''+propDesc+'
'; descNAgentInner.appendChild(propDescription); let rei_descToggler = document.getElementById("rei-more-desc"); if (rei_descToggler != null) rei_descToggler.addEventListener('click', function(evt) { document.getElementById("rei-long-description").className += " rei-active";document.getElementById("rei-pre-description").className += " rei-hide"; evt.target.style.display = "none"; }) propAgents = document.createElement('div'); propAgents.className = 'rei-property-agents'; propAgents.innerHTML = ''; if (prop.assignment != undefined && prop.assignment.responsibleBroker != undefined && prop.assignment.responsibleBroker.userName != undefined && prop.assignment.responsibleBroker.userName != null ) { propAgents.innerHTML += 'Ansvarig mäklare
'+prop.assignment.responsibleBroker.userName+''+
'
'+prop.assignment.responsibleBroker.title+'
'+prop.assignment.responsibleBroker.emailAddress+''+
'
'+(prop.assignment.responsibleBroker.telePhone != null ? (''+prop.assignment.responsibleBroker.telePhone+'') : '') +
((prop.assignment.responsibleBroker.telePhone != null && prop.assignment.responsibleBroker.cellPhone != null) ? ' / ' : '') +
(prop.assignment.responsibleBroker.cellPhone != null ? ''+(prop.assignment.responsibleBroker.cellPhone+'') : '')+'
Assisterande mäklare
'+prop.assignment.additionalContact.userName+''+
'
'+prop.assignment.additionalContact.title+'
'+prop.assignment.additionalContact.emailAddress+''+
'
'+(prop.assignment.additionalContact.telePhone != null ? (''+prop.assignment.additionalContact.telePhone+'') : '') +
((prop.assignment.additionalContact.telePhone != null && prop.assignment.additionalContact.cellPhone != null) ? ' / ' : '') +
(prop.assignment.additionalContact.cellPhone != null ? (''+prop.assignment.additionalContact.cellPhone+'') : '')+'
Antal rum: '+prop.houseInterior.numberOfRooms+(prop.houseInterior.numberOffBedroom != undefined ? (' varav '+prop.houseInterior.numberOffBedroom+' sovrum') : '')+'
'; if (prop.interior != undefined && prop.interior.numberOfRooms != undefined && prop.interior.numberOfRooms != null && prop.interior.numberOfRooms != 0) { tmpHtml += 'Antal rum: '+prop.interior.numberOfRooms; if (prop.interior.numberOfBedroom != undefined && prop.interior.numberOfBedroom != null) tmpHtml += ' varav '+prop.interior.numberOfBedroom+' sovrum'; if (prop.interior.kitchenType != undefined && prop.interior.kitchenType != null) tmpHtml += ' och '+prop.interior.kitchenType; tmpHtml += '
'; } if (prop.baseInformation.livingSpace != undefined && prop.baseInformation.livingSpace != null && prop.baseInformation.livingSpace != 0) { tmpHtml += 'Boarea: '+prop.baseInformation.livingSpace+' m²'; if (prop.baseInformation.areaSource != undefined && prop.baseInformation.areaSource != null) { tmpHtml += ', '+prop.baseInformation.areaSource; if (prop.baseInformation.areaSourceComment != undefined && prop.baseInformation.areaSourceComment != null) tmpHtml += ' '+prop.baseInformation.areaSourceComment; } tmpHtml += '
'; } if (prop.baseInformation.otherSpace != undefined && prop.baseInformation.otherSpace != null && prop.baseInformation.otherSpace != 0) tmpHtml += 'Biarea: '+prop.baseInformation.otherSpace+' m²'+'
'; tmpHtml += 'Byggnadstyp: '+prop.building.buildingType+'
'; if (prop.building.buildingYear != undefined && prop.building.buildingYear != null && prop.building.buildingYear != 0) tmpHtml += 'Byggnadsår: '+prop.building.buildingYear+((prop.building.commentaryForBuildingYear != undefined && prop.building.commentaryForBuildingYear != null) ? (' '+prop.building.commentaryForBuildingYear) : '')+'
'; if (prop.building.foundation != undefined && prop.building.foundation != null) tmpHtml += 'Grundläggning: '+prop.building.foundation+'
'; if (prop.building.foundationWall != undefined && prop.building.foundationWall != null) tmpHtml += 'Grundmur: '+prop.building.foundationWall+'
'; // if (prop.building.foundationWall != undefined && prop.building.foundationWall != null) tmpHtml += 'Grundmur: '+prop.building.foundationWall+'
'; if (prop.building.frame != undefined && prop.building.frame != null) tmpHtml += 'Stomme: '+prop.building.frame+'
'; if (prop.building.facade != undefined && prop.building.facade != null) tmpHtml += 'Fasad: '+prop.building.facade+'
'; if (prop.building.windows != undefined && prop.building.windows != null) tmpHtml += 'Fönster: '+prop.building.windows+'
'; if (prop.building.beam != undefined && prop.building.beam != null) tmpHtml += 'Bjälklag: '+prop.building.beam+'
'; if (prop.building.externallySheetMetalWork != undefined && prop.building.externallySheetMetalWork != null) tmpHtml += 'Utvändigt plåtarbete: '+prop.building.externallySheetMetalWork+'
'; if (prop.building.heating != undefined && prop.building.heating != null) tmpHtml += 'Uppvärmning: '+prop.building.heating+'
'; if (prop.ventilation != undefined && prop.ventilation != null && prop.ventilation.type != undefined && prop.ventilation.type != null && prop.ventilation.type != "") { tmpHtml += 'Ventilation: '+prop.ventilation.type+'
'; if (prop.ventilation.inspection != undefined && prop.ventilation.inspection != null && prop.ventilation.inspection != "") tmpHtml += 'Ventilation inspektion: '+prop.ventilation.inspection+'
'; } tmpHtml += '
Övrigt:
'+prop.building.otherAboutTheBuildning.replace(/\r?\n|\r/g, "
")+'
Övriga byggnader:
'+prop.building.otherBuildings+'
Dokument:
';
for (docNo = 0; docNo < prop.advertiseOn.documents.length-1; docNo++) {
if (prop.advertiseOn.documents[docNo+1].name < prop.advertiseOn.documents[docNo].name) {
let tmp = prop.advertiseOn.documents[docNo].name;
prop.advertiseOn.documents[docNo].name = prop.advertiseOn.documents[docNo+1].name;
prop.advertiseOn.documents[docNo+1].name = tmp;
docNo = 0;
}
}
for (docNo = 0; docNo < prop.advertiseOn.documents.length; docNo++) {
innerToAdd += ''+prop.advertiseOn.documents[docNo].name+'';
}
tmpHtml += innerToAdd + '
Avgift: '+prop.baseInformation.monthlyFee+' kr/mån'; if (prop.baseInformation.commentary != undefined && prop.baseInformation.commentary != null && prop.baseInformation.commentary.length > 0) econInner += ' '+prop.baseInformation.commentary; econInner += '
'; } if (prop.operation.personsInTheHousehold != undefined && prop.operation.personsInTheHousehold != null && prop.operation.personsInTheHousehold != 0) econInner += 'Antal personer i hushållet: '+prop.operation.personsInTheHousehold+'
'; if (prop.operation.heating != undefined && prop.operation.heating != null && prop.operation.heating != 0) econInner += 'Uppvärmningskostnad: '+rei_vitec_priceFormat(prop.operation.heating)+' kr/år
'; if (prop.operation.electricity != undefined && prop.operation.electricity != null && prop.operation.electricity != 0) econInner += 'Elkostnad: '+rei_vitec_priceFormat(prop.operation.electricity)+' kr/år
'; if (prop.operation.waterAndDrain != undefined && prop.operation.waterAndDrain != null && prop.operation.waterAndDrain != 0) econInner += 'Vatten & avlopp: '+rei_vitec_priceFormat(prop.operation.waterAndDrain)+' kr/år
'; if (prop.operation.chimneySweeping != undefined && prop.operation.chimneySweeping != null && prop.operation.chimneySweeping != 0) econInner += 'Sotning: '+rei_vitec_priceFormat(prop.operation.chimneySweeping)+' kr/år
'; if (prop.operation.roadCommunity != undefined && prop.operation.roadCommunity != null && prop.operation.roadCommunity != 0) econInner += 'Vägsamfällighet: '+rei_vitec_priceFormat(prop.operation.roadCommunity)+' kr/år
'; if (prop.operation.roadCharge != undefined && prop.operation.roadCharge != null && prop.operation.roadCharge != 0) econInner += 'Vägavgift/snöröjning: '+rei_vitec_priceFormat(prop.operation.roadCharge)+' kr/år
'; if (prop.operation.sanitation != undefined && prop.operation.sanitation != null && prop.operation.sanitation != 0) econInner += 'Renhållning: '+rei_vitec_priceFormat(prop.operation.sanitation)+' kr/år
'; if (prop.operation.insurance != undefined && prop.operation.insurance != null && prop.operation.insurance != 0) econInner += 'Försäkring: '+rei_vitec_priceFormat(prop.operation.insurance)+' kr/år
'; if (prop.operation.other != undefined && prop.operation.other != null && prop.operation.other != 0) econInner += 'Övrigt: '+rei_vitec_priceFormat(prop.operation.other)+' kr/år
'; if (prop.operation.sum != undefined && prop.operation.sum != null && prop.operation.sum != 0) econInner += 'Total driftkostnad: '+rei_vitec_priceFormat(prop.operation.sum)+' kr/år
'; if (prop.operation.commentary != undefined && prop.operation.commentary != null && prop.operation.commentary != 0) econInner += 'Kommentar: '+rei_vitec_priceFormat(prop.operation.commentary)+'
'; if (prop.electricity != undefined && prop.electricity != null && rei_has_intval(prop.electricity, "powerConsumptionKWH")) econInner += 'Elförbrukning: '+rei_vitec_priceFormat(prop.electricity.powerConsumptionKWH)+' kWh/år
'; if (rei_has_intval(prop.operation, "electricity")) econInner += 'Elkostnad: '+rei_vitec_priceFormat(prop.operation.electricity)+'
'; if (prop.energyDeclaration != undefined && prop.energyDeclaration != null) { if (prop.energyDeclaration.energyClass != undefined && prop.energyDeclaration.energyClass != null && prop.energyDeclaration.energyClass != "None" && prop.energyDeclaration.energyClass != "") econInner += 'Energiklass: '+prop.energyDeclaration.energyClass+'
'; if (prop.energyDeclaration.energyConsumption != undefined && prop.energyDeclaration.energyConsumption != null && prop.energyDeclaration.energyConsumption != "" && prop.energyDeclaration.energyConsumption != 0) econInner += 'Energiprestanda: '+prop.energyDeclaration.energyConsumption+' kWh/m²/år
'; } if (econInner.length > 0) { propEconomy = document.createElement('div'); propEconomy.className = 'rei-property-economy'; propEconomy.innerHTML = 'Fastighetsbeteckning: '+prop.baseInformation.propertyUnitDesignation+'
'; // if (prop.association != undefined && prop.association != null) { // if (prop.association.name != undefined && prop.association.name != null) tmpHtml += 'Namn: '+prop.association.name+'
'; // if (prop.association.publicContact != undefined && prop.association.publicContact != null) tmpHtml += 'Kontaktperson: '+prop.association.publicContact+'
'; // if (prop.association.phonePublicContact != undefined && prop.association.phonePublicContact != null) tmpHtml += 'Kontakttelefon: '+prop.association.phonePublicContact+'
'; // if (prop.association.email != undefined && prop.association.email != null && prop.association.email.emailAddress != undefined && prop.association.email.emailAddress != null) tmpHtml += 'Kontaktemail: '+prop.association.email.emailAddress+'
'; // if (prop.association.generalAboutAssociation != undefined && prop.association.generalAboutAssociation != null) tmpHtml += 'Allmänt om föreningen: '+prop.association.generalAboutAssociation.replace(/\r?\n|\r/g, "
")+'
Parkering/garage: '+prop.association.parking.replace(/\r?\n|\r/g, "
")+'
Bredband/TV: '+prop.association.tvAndBroadband.replace(/\r?\n|\r/g, "
")+'
Renoveringar: '+prop.association.renovations.replace(/\r?\n|\r/g, "
")+'
Ekonomi: '+prop.association.finances.replace(/\r?\n|\r/g, "
")+'
Övrigt: '+prop.association.other.replace(/\r?\n|\r/g, "
")+'
Taxeringskod: '+prop.assess.typeCode+'
'; if (prop.assess != undefined && prop.assess != null && prop.assess.totalAssessedValue != undefined && prop.assess.totalAssessedValue != null) tmpHtml += 'Taxeringsvärde: '+rei_vitec_priceFormat(prop.assess.totalAssessedValue)+' kr
'; if (prop.assess != undefined && prop.assess != null && prop.assess.taxAssessmentYear != undefined && prop.assess.taxAssessmentYear != null) tmpHtml += 'Taxeringsår: '+prop.assess.taxAssessmentYear+'
'; if (prop.waterAndDrain != undefined && prop.waterAndDrain != null && prop.waterAndDrain.info != undefined && prop.waterAndDrain.info != null && prop.waterAndDrain.info != "") tmpHtml += 'Vatten/Avlopp: '+prop.waterAndDrain.info+'
'; if (prop.enrollments != undefined && prop.enrollments != null && rei_has_strval(prop.enrollments, "preferentialAndCommunity")) tmpHtml += '
Servitut etc:
'+prop.enrollments.preferentialAndCommunity+'
Övrigt tomt:
'+prop.plot.otherPlot+'
Allmänt om området:
'+prop.surrounding.generalAboutArea+'
Närservice:
'+prop.surrounding.nearService+'
Kommunikation:
'+prop.surrounding.communication+'
Parkering:
'+prop.surrounding.parking+'
Fastighetsbeteckning: '+prop.baseInformation.propertyUnitDesignation+'
'; if (prop.association != undefined && prop.association != null) { if (prop.association.name != undefined && prop.association.name != null) tmpHtml += 'Namn: '+prop.association.name+'
'; if (prop.association.publicContact != undefined && prop.association.publicContact != null) tmpHtml += 'Kontaktperson: '+prop.association.publicContact+'
'; if (prop.association.phonePublicContact != undefined && prop.association.phonePublicContact != null) tmpHtml += 'Kontakttelefon: '+prop.association.phonePublicContact+'
'; if (prop.association.email != undefined && prop.association.email != null && prop.association.email.emailAddress != undefined && prop.association.email.emailAddress != null) tmpHtml += 'Kontaktemail: '+prop.association.email.emailAddress+'
'; if (prop.association.generalAboutAssociation != undefined && prop.association.generalAboutAssociation != null) tmpHtml += 'Allmänt om föreningen: '+prop.association.generalAboutAssociation.replace(/\r?\n|\r/g, "
")+'
Parkering/garage: '+prop.association.parking.replace(/\r?\n|\r/g, "
")+'
Bredband/TV: '+prop.association.tvAndBroadband.replace(/\r?\n|\r/g, "
")+'
Renoveringar: '+prop.association.renovations.replace(/\r?\n|\r/g, "
")+'
Ekonomi: '+prop.association.finances.replace(/\r?\n|\r/g, "
")+'
Indirekt nettoskuldsättning: '+rei_vitec_priceFormat(prop.participationAndRepairFund.indirectNetDebt)+'
'; if (prop.participationAndRepairFund.indirectNetDebtComment != undefined && prop.participationAndRepairFund.indirectNetDebtComment != null) tmpHtml += 'Kommentar till indirekt nettoskuldsättning: '+prop.participationAndRepairFund.indirectNetDebtComment.replace(/\r?\n|\r/g, "
")+'
Övrigt: '+prop.association.other.replace(/\r?\n|\r/g, "
")+'
Taxeringskod: '+prop.assess.typeCode+'
'; if (prop.assess != undefined && prop.assess != null && prop.assess.totalAssessedValue != undefined && prop.assess.totalAssessedValue != null) tmpHtml += 'Taxeringsvärde: '+rei_vitec_priceFormat(prop.assess.totalAssessedValue)+' kr
'; if (prop.assess != undefined && prop.assess != null && prop.assess.taxAssessmentYear != undefined && prop.assess.taxAssessmentYear != null) tmpHtml += 'Taxeringsår: '+prop.assess.taxAssessmentYear+'
'; if (prop.waterAndDrain != undefined && prop.waterAndDrain != null && prop.waterAndDrain.info != undefined && prop.waterAndDrain.info != null && prop.waterAndDrain.info != "") tmpHtml += 'Vatten/Avlopp: '+prop.waterAndDrain.info+'
'; if (prop.enrollments != undefined && prop.enrollments != null && rei_has_strval(prop.enrollments, "preferentialAndCommunity")) tmpHtml += '
Servitut etc:
'+prop.enrollments.preferentialAndCommunity+'
Övrigt tomt:
'+prop.plot.otherPlot+'
Typ: '+rei_marketingTypes[prop.marketedAs]+'
'; htmlToAdd += 'Ort: '+prop.baseInformation.address.city+'
'; if (prop.baseInformation.address.area != undefined && prop.baseInformation.address.area != null && typeof prop.baseInformation.address.area == "string") htmlToAdd += 'Område: '+prop.baseInformation.address.area+'
'; htmlToAdd += 'Objekt id: '+prop.assignment.estatenumber+'
'; if (prop.houseInterior != undefined && prop.houseInterior != null && prop.houseInterior != 0) htmlToAdd += 'Antal rum: '+prop.houseInterior.numberOfRooms+(prop.houseInterior.numberOffBedroom != undefined ? (' varav '+prop.houseInterior.numberOffBedroom+' sovrum') : '')+'
'; if (prop.interior != undefined && prop.interior != null && prop.interior != 0) htmlToAdd += 'Antal rum: '+prop.interior.numberOfRooms+(prop.interior.numberOfBedrooms != undefined ? (' varav '+prop.interior.numberOfBedrooms+' sovrum') : '')+'
'; if (prop.houseInterior != undefined && prop.houseInterior != null && prop.houseInterior != 0) htmlToAdd += 'Antal badrum: '+prop.houseInterior.numberOfBathrooms+'
'; if (prop.interior != undefined && prop.interior != null && prop.interior != 0) htmlToAdd += 'Antal badrum: '+prop.interior.numberOfBathrooms+'
'; if (prop.baseInformation.livingSpace != undefined && prop.baseInformation.livingSpace != null && prop.baseInformation.livingSpace != 0) htmlToAdd += 'Boarea: '+prop.baseInformation.livingSpace+' m²'+'
'; else if (prop.baseInformation.buildingArea != undefined && prop.baseInformation.buildingArea != null && prop.baseInformation.buildingArea != 0) htmlToAdd += 'Byggyta: '+prop.baseInformation.buildingArea+' m²'+'
'; if (prop.plot != undefined && prop.plot.area != undefined && prop.plot.area != null && prop.plot.area != 0) htmlToAdd += 'Tomtarea: '+prop.plot.area+' m²'+'
'; if (prop.exterior.pool != undefined && prop.exterior.pool) htmlToAdd += 'Pool: Ja'+'
'; if (prop.exterior.terrace != undefined && prop.exterior.terrace) htmlToAdd += 'Terrass: Ja'+'
'; if (prop.price.startingPrice != undefined && prop.price.startingPrice != null && prop.price.startingPrice != 0) htmlToAdd += 'Pris: '+rei_vitec_priceFormat(prop.price.startingPrice)+' € '+(prop.price.text != undefined && prop.price.text != null && prop.price.text != "" ? prop.price.text : '')+'
'; htmlToAdd += ''+abbrTxt+'
'+(propDesc.length > abbrTxt.length ? '' : ''); if (propDesc.length > abbrTxt.length) propDescription.innerHTML += ''+propDesc+'
'; descNAgentInner.appendChild(propDescription); let rei_descToggler = document.getElementById("rei-more-desc"); if (rei_descToggler != null) rei_descToggler.addEventListener('click', function(evt) { document.getElementById("rei-long-description").className += " rei-active";document.getElementById("rei-pre-description").className += " rei-hide"; evt.target.style.display = "none"; }) propImages = document.createElement('div'); propImages.className = 'rei-property-images'; propImages.innerHTML = 'Ansvarig mäklare
'+prop.assignment.responsibleBroker.userName+''+
'
'+prop.assignment.responsibleBroker.title+'
'+prop.assignment.responsibleBroker.emailAddress+''+
'
'+(prop.assignment.responsibleBroker.telePhone != null ? (''+prop.assignment.responsibleBroker.telePhone+'') : '') +
((prop.assignment.responsibleBroker.telePhone != null && prop.assignment.responsibleBroker.cellPhone != null) ? ' / ' : '') +
(prop.assignment.responsibleBroker.cellPhone != null ? ''+(prop.assignment.responsibleBroker.cellPhone+'') : '')+'
Assisterande mäklare
'+prop.assignment.additionalContact.userName+''+
'
'+prop.assignment.additionalContact.title+'
'+prop.assignment.additionalContact.emailAddress+''+
'
'+(prop.assignment.additionalContact.telePhone != null ? (''+prop.assignment.additionalContact.telePhone+'') : '') +
((prop.assignment.additionalContact.telePhone != null && prop.assignment.additionalContact.cellPhone != null) ? ' / ' : '') +
(prop.assignment.additionalContact.cellPhone != null ? (''+prop.assignment.additionalContact.cellPhone+'') : '')+'