Federal Trade Compliance Monitor

Federal Trade Compliance Monitor

Audit your marketing practices against key FTC regulations.

Business & Product Information

Report generated on ${new Date().toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' })}

${resultsHtml}
Compliance Area Status Key Considerations

This tool provides a high-level summary based on your inputs and is for informational purposes only. It is not a substitute for legal advice from a qualified attorney regarding your specific marketing practices.

`; } function showTab(n) { if (!tabs || !tabButtons) return; tabs.forEach((tab, index) => { tab.style.display = (index === n) ? 'block' : 'none'; }); tabButtons.forEach((btn, index) => { btn.classList.toggle('active', index === n); }); if (prevBtn) prevBtn.disabled = (n === 0); if (nextBtn) nextBtn.style.display = (n === (tabs.length - 1)) ? 'none' : 'inline-block'; if (n === tabs.length - 1) { generateComplianceReport(); } currentTab = n; } function navigateTabs(n) { if(!tabs || !tabs[currentTab]) return; currentTab += n; if (currentTab >= tabs.length) { currentTab = tabs.length - 1; } else if (currentTab < 0) { currentTab = 0; } showTab(currentTab); } document.addEventListener('DOMContentLoaded', function() { // Assign elements tabs = document.querySelectorAll('.tab-content'); tabButtons = document.querySelectorAll('.tab-button'); prevBtn = document.getElementById('prevBtn'); nextBtn = document.getElementById('nextBtn'); const downloadPdfBtn = document.getElementById('downloadPdfBtn'); async function generatePdf() { const loader = document.getElementById('pdf-loader'); if (!loader || !downloadPdfBtn) return; loader.classList.remove('hidden'); downloadPdfBtn.disabled = true; const content = document.getElementById('pdf-content-area'); try { const canvas = await html2canvas(content, { scale: 2, useCORS: true, logging: false }); const imgData = canvas.toDataURL('image/png'); const { jsPDF } = window.jspdf; const pdf = new jsPDF({ orientation: 'portrait', unit: 'pt', format: 'letter' }); const pdfWidth = pdf.internal.pageSize.getWidth(); const margin = 40; const imgProps = pdf.getImageProperties(imgData); const imgWidth = pdfWidth - (margin * 2); const imgHeight = (imgProps.height * imgWidth) / imgProps.width; pdf.addImage(imgData, 'PNG', margin, margin, imgWidth, imgHeight); pdf.save('FTC-Compliance-Report.pdf'); } catch (error) { console.error("Error generating PDF:", error); } finally { loader.classList.add('hidden'); downloadPdfBtn.disabled = false; } } // --- EVENT LISTENERS --- if (downloadPdfBtn) { downloadPdfBtn.addEventListener('click', generatePdf); } // --- INITIALIZATION --- // Set default styles for tab buttons tabButtons.forEach(button => { button.classList.add('text-sm', 'sm:text-base', 'font-semibold', 'p-3', 'border-b-4', 'rounded-t-lg'); }); showTab(currentTab); });
Scroll to Top