Biweekly Mortgage Calculator
Compare monthly vs. biweekly payments · See interest savings & early payoff
Embed this calculator on your site
`;
}window.toggleEmbedPanel = function() {
if (embedPanel.style.display === 'none' || embedPanel.style.display === '') {
generateEmbedCode();
embedPanel.style.display = 'block';
} else { embedPanel.style.display = 'none'; }
};window.copyEmbedCode = function() {
embedCodeTextarea.select();
navigator.clipboard?.writeText(embedCodeTextarea.value).then(() => alert('Embed code copied!')).catch(() => alert('Press Ctrl+C'));
};document.addEventListener('DOMContentLoaded', ()=>{
populateCurrency();
calculateBiweekly();
['loanAmount','interestRate','loanTerm'].forEach(id => document.getElementById(id).addEventListener('input', calculateBiweekly));
document.getElementById('currencySelect').addEventListener('change', e => { currentCurrency = currencies.find(c=>c.code===e.target.value); calculateBiweekly(); });
});
})();