${$('#preview').innerHTML}\n`); w.document.close(); setTimeout(()=>{try{w.focus();w.print();}catch(e){}},300); } function doClear(){ Object.keys(state).forEach(k=>{ if(k==='empType')state.empType='ft'; else if(k==='payFreq')state.payFreq='annual'; else if(k==='probation')state.probation=3; else if(k==='hoursWeek')state.hoursWeek=40; else if(k==='noticeWeeks')state.noticeWeeks=4; else if(k==='effDate'||k==='startDate')state[k]=new Date().toISOString().slice(0,10); else state[k]=''; }); saveState(); renderForm(); renderPreview(); } function loadExample(){ state={effDate:new Date().toISOString().slice(0,10),empName:'Acme Technologies, Inc.',empAddr:'500 Market Street, Suite 400\nSan Francisco, CA 94105, USA',eeName:'John A. Smith',eeAddr:'88 Pine Avenue, Apt 12B\nSan Francisco, CA 94111, USA',jobTitle:'Senior Software Engineer',dept:'Engineering',reportsTo:'VP of Engineering',workLoc:'San Francisco, CA (hybrid, 3 days in office)',empType:'ft',startDate:new Date().toISOString().slice(0,10),probation:3,hoursWeek:40,salary:'$135,000',payFreq:'annual',benefits:'health, dental and vision insurance, 401(k) with 4% match, 20 days paid time off',duties:'',jurisdiction:'the State of California, United States of America',noticeWeeks:4}; 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/independent-contractor-agreement.html', name:'Contractor Agreement'}, {icon:'💵', href:'/text/promissory-note-generator.html', name:'Promissory Note'}, {icon:'🔒', href:'/text/nda-generator.html', name:'NDA Generator'}, ] });