מחשבון תוספת עלות – ממ"ד במבנה קיים
בניין חדש יחסית (ללא חיזוק יסודות משמעותי) מבנה ותיק בינוני (נדרש חיזוק קל) מבנה ישן / קרקע חלשה (חיזוק יסודות נרחב)
(function () {
'use strict';
/* ===== הגדרות מחיר – ניתן לעדכן כאן =====
fixed = רכיב קבוע: מהנדס קונסטרוקציה, היתרים, התארגנות
perSqm = תוספת עבודות חיזוק לכל מ"ר */
var COSTS = {
easy: { fixed: 5000, perSqm: 400, label: 'חיזוק קל' },
medium: { fixed: 10000, perSqm: 1200, label: 'חיזוק בינוני' },
hard: { fixed: 18000, perSqm: 2800, label: 'חיזוק יסודות נרחב' }
};
var RANGE = { low: 0.90, high: 1.15 }; /* טווח אי-ודאות סביב ההערכה */
var areaInput = document.getElementById('areaExist');
var areaVal = document.getElementById('areaExistVal');
var condSelect = document.getElementById('existCondition');
var resultEl = document.getElementById('existCostResult');
var detailEl = document.getElementById('existCostDetail');
if (!areaInput || !areaVal || !condSelect || !resultEl || !detailEl) { return; }
function fmt(n) { return Math.round(n).toLocaleString('he-IL'); }
function update() {
var area = parseFloat(areaInput.value) || 0;
areaVal.textContent = area + ' מ"ר';
var c = COSTS[condSelect.value] || COSTS.medium;
var work = area * c.perSqm;
var total = c.fixed + work;
resultEl.textContent = '₪ ' + fmt(total * RANGE.low) + ' – ' + fmt(total * RANGE.high);
detailEl.textContent = c.label + ' · תכנון והיתרים ≈ ₪ ' + fmt(c.fixed) + ' + עבודות חיזוק ≈ ₪ ' + fmt(work);
}
areaInput.addEventListener('input', update);
condSelect.addEventListener('change', update);
update();
})();



