q.send();
    }
    function selectAp(el) {
    console.log(el.id);
    // Remove the 'selected' class from previously selected row, if any
    var selectedRow = document.querySelector('.selected');
    if (selectedRow) {
        selectedRow.classList.remove('selected');
    }
    
    // Add the 'selected' class to the clicked row
    el.classList.add('selected');
    
    // Update the selectedApElement variable
    selectedApElement = el;
}


    function runAttack() {
        if(selectedApElement == -1)