countOccurances(str,search)
{
    var exp = new RegExp(search, `g${document.getElementById('casesensitive').checked?"":"i"}`);
    var count = (temp.match(exp) || []).length;
    return count;
}

function togglepanel(id)
{
    const p1 = document.getElementById('panel1');
    const p2 = document.getElementById('panel2');
    const p3 = document.getElementById('panel3');
    const p4 = document.getElementById('panel4');
    const p5 = document.getElementById('panel5');
    p1.style.display =  p