


	<script>
document.addEventListener('DOMContentLoaded', function() {
  const ratePerSqFt = 18.75;
  const installFee = 180;

  const lengthEl = document.getElementById('length');
  const widthEl = document.getElementById('width');
  const priceEl = document.getElementById('cf7_price');
  const hiddenEl = document.getElementById('estimated_total'); // hidden field

  function calculatePrice() {
    let length = parseFloat(lengthEl.value) || 0;
    let width = parseFloat(widthEl.value) || 0;

    if(length <= 0 || width <= 0) {
      priceEl.textContent = "$0.00 CAD";
      hiddenEl.value = "0.00";
      return;
    }

    // Round to nearest square inch
    const squareInches = Math.round(length * width);
    const squareFeet = squareInches / 144;
    const materialCost = squareFeet * ratePerSqFt;
    const total = materialCost + installFee;

    const totalFormatted = total.toFixed(2);

    priceEl.textContent = "$" + totalFormatted + " CAD";
    hiddenEl.value = totalFormatted; // update hidden field
  }

  lengthEl.addEventListener('input', calculatePrice);
  widthEl.addEventListener('input', calculatePrice);
});
</script>	<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://coolguyz.ca/wp-sitemap.xsl" ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url><loc>https://coolguyz.ca/category/uncategorized/</loc></url><url><loc>https://coolguyz.ca/category/ac-repairing/</loc></url><url><loc>https://coolguyz.ca/category/ac-servicing/</loc></url><url><loc>https://coolguyz.ca/category/tips-tricks/</loc></url></urlset>
