βοΈ Select a Tool to Draft
βοΈ
CriminalSmart Bail Generator
Auto-draft Post-Arrest (497) & Pre-Arrest (498) CrPC petitions with 30 legal grounds.
π
Criminal22-A / 22-B Petition
Justice of Peace petition for FIR registration & police inaction.
π
CivilStay Order (Order 39)
Temporary injunction application for urgent civil disputes.
π
CivilWritten Statement
Draft a complete written statement / jawab dawa for civil suits.
π
CriminalAcquittal Petition
Session/High Court acquittal application under CrPC.
π
CivilEviction / Ejection Suit
Rent Controller or Civil Court eviction suit drafting.
π Draft Bail Petition (Sec. 497 / 498 CrPC)
βοΈ Select Legal Grounds for Bail (tick jo applicable hoon)
Selected: 0 / 30 grounds
Drafting Legal Documentβ¦
Compiling petition with selected grounds.
Please wait a moment.
β
Bail Petition Ready!
Your court-ready document has been generated successfully.
β Copied to clipboard!
';
var blob = new Blob([wordHtml],{type:'application/msword'});
var url = URL.createObjectURL(blob);
var a = document.createElement('a');
a.href = url;
a.download = 'Bail_Petition_'+accused.replace(/\s+/g,'_')+'_'+firNo.replace(/\//g,'-')+'.doc';
document.body.appendChild(a); a.click();
document.body.removeChild(a); URL.revokeObjectURL(url);
}function copyText(){
navigator.clipboard.writeText(petitionText).then(function(){
var toast = document.getElementById('toast');
toast.classList.add('show');
setTimeout(function(){ toast.classList.remove('show'); }, 2500);
}).catch(function(){ alert('Copy failed. Please select text manually.'); });
}function openBailModal(){
document.getElementById('bailModal').classList.add('open');
resetModal();
}function closeModal(){ document.getElementById('bailModal').classList.remove('open'); }function resetModal(){
document.getElementById('formState').style.display = 'block';
document.getElementById('loadingState').style.display = 'none';
document.getElementById('successState').style.display = 'none';
selectedGrounds.clear();
document.querySelectorAll('.ground-item').forEach(function(el){ el.classList.remove('checked'); });
updateCount();
}function filterCat(cat, btn){
document.querySelectorAll('.nav-btn').forEach(function(b){ b.classList.remove('active'); });
btn.classList.add('active');
document.querySelectorAll('.card').forEach(function(c){
c.style.display = (cat==='all'||c.classList.contains(cat)) ? 'block' : 'none';
});
}function searchTools(q){
var f = q.toLowerCase();
document.querySelectorAll('.card').forEach(function(c){
c.style.display = c.innerText.toLowerCase().indexOf(f) !== -1 ? 'block' : 'none';
});
}function comingSoon(){ alert('π§ This tool is coming soon in the next update!'); }document.getElementById('bailModal').addEventListener('click',function(e){
if(e.target === this) closeModal();
});buildGrounds();