Legal Framework Comparative Analysis Tool
Select a legal topic and two jurisdictions to generate a side-by-side comparison.
Analysis Configuration
Jurisdictions must be different.
Side-by-Side Comparison
Analysis Report
Key Differences Summary
Disclaimer: This tool provides a high-level comparison for informational purposes only and does not constitute legal advice. Laws are complex and subject to change. Consult a qualified attorney for advice on specific legal issues.
${jur1}: ${data.jurisdictions[jur1].Summary}
${jur2}: ${data.jurisdictions[jur2].Summary}
`; document.getElementById('summary-output').innerHTML = summaryHTML; } // --- Tab Navigation --- const tabButtons = document.querySelectorAll('.tab-button'); const tabContents = document.querySelectorAll('.tab-content'); const nextBtn = document.getElementById('next-btn'); const prevBtn = document.getElementById('prev-btn'); const errorMsg = document.getElementById('selection-error'); let currentTab = 1; const totalTabs = 3; function updateDisplay() { tabButtons.forEach(button => button.classList.toggle('active', parseInt(button.dataset.tab) === currentTab)); tabContents.forEach(content => content.classList.toggle('active', parseInt(content.id.split('-')[1]) === currentTab)); prevBtn.style.display = currentTab > 1 ? 'inline-block' : 'none'; nextBtn.style.display = currentTab < totalTabs ? 'inline-block' : 'none'; } nextBtn.addEventListener('click', () => { if (currentTab < totalTabs) { if (currentTab === 1) { if (jur1Select.value === jur2Select.value) { errorMsg.classList.remove('hidden'); return; } errorMsg.classList.add('hidden'); generateComparison(); } currentTab++; updateDisplay(); } }); prevBtn.addEventListener('click', () => { if (currentTab > 1) { currentTab--; updateDisplay(); } }); // --- PDF Download --- const downloadPdfBtn = document.getElementById('download-pdf-btn'); async function downloadPDF() { const { jsPDF } = window.jspdf; const pdfPreview = document.getElementById('pdf-preview'); const container = document.getElementById('pdf-container'); const topic = legalData[topicSelect.value].title; const comparisonContent = document.getElementById('comparison-output').innerHTML; const summaryContent = document.getElementById('summary-output').innerHTML; pdfPreview.innerHTML = `