confirmModalFun=function(element)
{
    clearAll();
    if(element.className.includes('logout'))
    {
        $('.headerTxt').text('Confirm logout');
        document.getElementById("bodyTxt").innerHTML='Are you sure you want to logout now?'
    }
    else if(element.className.includes('cancelStep'))
    {
        $('.headerTxt').text('Cancel this step');
        document.getElementById("bodyTxt").innerHTML='Are you sure you want to skip this step?'
    }
    else if(element.className.includes('deleteIcon'))
    {
        $('.headerTxt').text('Confirm deletion');
        document.getElementById("bodyTxt").innerHTML='Are you sure you want to delete '+'<b>'+ $(element).parent().parent().prop('textContent')+'</b>'+' ?'
    }
    else if(element.className.includes('deleteSelected'))
    {
        $('.headerTxt').text('Confirm deletion');
        document.getElementById("bodyTxt").innerHTML='Are you sure you want to delete ?'
    }
    else if(element.className.includes('acknowledgement'))
    {
        $('.headerTxt').text('Add/Edit Acknowledgement & Tags');
    }
       
}

$(document).on('show.bs.modal', '#confirmModal', function (e) {
    var $trigger = $(e.relatedTarget);
    
});

function clearAll()
{
    document.getElementById('playSound').pause();
    var id = window.setTimeout(function() {}, 0);
    while (id--) {
        window.clearTimeout(id); // will do nothing if no timeout with id is present
    }
}

function showSnackBar(response)
{
    $('#snackbar').text(response);
    var x = document.getElementById("snackbar");
    x.className = "show";
    setTimeout(function(){ x.className = x.className.replace("show", ""); }, 2300);
}