${$('#preview').innerHTML}\n`); w.document.close(); setTimeout(()=>{try{w.focus();w.print();}catch(e){}},300); } function doClear(){ state={type:'general',effDate:new Date().toISOString().slice(0,10),principal:'',principalAddr:'',agent:'',agentAddr:'',agentPhone:'',scope:'',startDate:new Date().toISOString().slice(0,10),endDate:'',jurisdiction:'',compensation:'none',successor:''}; saveState(); renderForm(); renderPreview(); } function loadExample(){ state={type:'durable',effDate:new Date().toISOString().slice(0,10),principal:'Robert A. Johnson',principalAddr:'789 Oakwood Drive\nAustin, TX 78701, USA',agent:'Emily K. Johnson',agentAddr:'420 Cedar Lane\nAustin, TX 78704, USA',agentPhone:'+1 (512) 555-0188',scope:'Manage all bank and investment accounts, file taxes, sign contracts, and handle real estate transactions on my behalf.',startDate:new Date().toISOString().slice(0,10),endDate:'',jurisdiction:'the State of Texas, United States of America',compensation:'none',successor:'Michael D. Johnson (brother)'}; saveState(); renderForm(); renderPreview(); } loadState(); renderForm(); renderPreview(); $('#toolbar').innerHTML = ``; GZ.renderToolPage({ category: 'text', titleKey: 'toolTitle', descKey: 'toolDesc', howToSteps: ['step1','step2','step3','step4'], related: [ {icon:'🏠', href:'/text/lease-agreement.html', name:'Lease Agreement'}, {icon:'🔒', href:'/text/nda-generator.html', name:'NDA Generator'}, {icon:'📜', href:'/text/will-generator.html', name:'Will Generator'}, {icon:'💼', href:'/text/employment-contract.html', name:'Employment Contract'}, ] });