<script>
document.querySelectorAll(".chosen").forEach(chosen => {
    const input = chosen.querySelector("input");
    const list = chosen.querySelector("ul");
    const items = Array.from(list.children);

    input.addEventListener("focus", () => list.style.display = "block");

    input.addEventListener("keyup", () => {
        const val = input.value.toLowerCase();
        items.forEach(li => {
            li.style.display = li.textContent.toLowerCase().includes(val)
                ? "block"
                : "none";
        });
    });

    items.forEach(li => {
        li.addEventListener("click", () => {
            input.value = li.textContent;
            input.dataset.value = li.dataset.value;
            list.style.display = "none";
        });
    });

    document.addEventListener("click", e => {
        if (!chosen.contains(e.target)) {
            list.style.display = "none";
        }
    });
});
</script>


<script>
function openPopup(i) {
    document.getElementById("popup").style.display = "block";
    document.getElementById("popupFrame").src = i; // ?? external page
}

function closePopup() {
    document.getElementById("popup").style.display = "none";
    document.getElementById("popupFrame").src = "";
}
</script>
<div class="popup-overlay" id="popup" onclick="closePopup()">
    <div class="popup-box" onclick="event.stopPropagation()">
        <div class="popup-header">
            Location Details
            <span class="popup-close" onclick="closePopup()">x</span>
        </div>

        <iframe
            id="popupFrame"
            class="popup-iframe"
            src="">
        </iframe>
    </div>
</div>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">

  <tr>

    <td height="15" align="center"></td>

  </tr>

  <tr>

    <td height="35" align="center" class="link2" style="border-top:solid 1px #466c74">

    

    <table width="100%" border="0" cellspacing="0" cellpadding="0">

      <tr>

        <td width="33%">&nbsp;</td>

        <td width="33%" align="center">Developed By <a href="http://www.arnimit.com" target="_blank"><strong>Arnim IT </strong></a></td>

        <td width="34%" align="center"><strong>For Support  :</strong> 0197-2288-521 </td>

      </tr>

    </table></td>

  </tr>

</table>