KIEEPC
Domestic EPCFixed pricing
Commercial EPCQuote on survey
Kieran Bradnock · DEA & NDEA · PAS2035 Retrofit Assessor · Wolverhampton · info@kieepc.co.uk
Accredited by Elmhurst Energy, Quidos & ECMK · Privacy Policy · © 2026 KIEEPC
// ── Hamburger ──
const hamburger = document.getElementById('hamburger');
const navMenu = document.getElementById('nav-menu');
hamburger.addEventListener('click', () => {
hamburger.classList.toggle('open');
navMenu.classList.toggle('open');
});
document.querySelectorAll('#nav-menu a').forEach(link => {
link.addEventListener('click', () => {
hamburger.classList.remove('open');
navMenu.classList.remove('open');
});
});
// ── Tab switcher ──
function switchTab(tab) {
const wrap = document.getElementById('form-panel-wrap');
// Lock height during transition to prevent page jump
wrap.style.minHeight = wrap.offsetHeight + 'px';
document.querySelectorAll('.form-panel').forEach(p => p.classList.remove('active'));
document.getElementById('panel-' + tab).classList.add('active');
const domBtn = document.getElementById('tab-domestic');
const comBtn = document.getElementById('tab-commercial');
if (tab === 'domestic') {
domBtn.classList.remove('inactive');
domBtn.setAttribute('aria-pressed', 'true');
comBtn.classList.remove('active');
comBtn.setAttribute('aria-pressed', 'false');
} else {
domBtn.classList.add('inactive');
domBtn.setAttribute('aria-pressed', 'false');
comBtn.classList.add('active');
comBtn.setAttribute('aria-pressed', 'true');
}
setTimeout(() => { wrap.style.minHeight = ''; }, 400);
}
// ── Phone or email — at least one required ──
function addContactValidation(formId, phoneId, emailId, errorId) {
const form = document.getElementById(formId);
const errorEl = document.getElementById(errorId);
if (!form) return;
form.addEventListener('submit', function(e) {
const phone = document.getElementById(phoneId).value.trim();
const email = document.getElementById(emailId).value.trim();
if (!phone && !email) {
e.preventDefault();
errorEl.style.display = 'block';
errorEl.scrollIntoView({ behavior: 'smooth', block: 'center' });
} else {
errorEl.style.display = 'none';
}
});
[phoneId, emailId].forEach(id => {