Skip To Content

function RoomValueSelector(self) {
console.log(“self ” + self.value)
document.getElementById(“RoomValue”).innerHTML = “If your Home is Worth $” + currencyFormat(self.value);
self.value;
document.getElementById(“saveValue”).innerText = “You Save $” + currencyFormat(((self.value / 100) * 2.5).toFixed(0));
}

function currencyFormat(no) {
var ar = (+no).toFixed(0).split(‘.’);
return [
numberFormat(ar[0] | 0)

].join(”);
}

function numberFormat(no) {
var str = no + ”;
var ar = [];
var i = str.length – 1;

while (i >= 0) {
ar.push((str[i – 2] || ”) + (str[i – 1] || ”) + (str[i] || ”));
i = i – 3;
}
return ar.reverse().join(‘,’);
}