const mobileScreen = window.matchMedia("(max-width: 990px )");
$(document).ready(function () {
    $(".dashboard-nav-dropdown-toggle").click(function () {
        $(this).closest(".dashboard-nav-dropdown")
            .toggleClass("show")
            .find(".dashboard-nav-dropdown")
            .removeClass("show");
        $(this).parent()
            .siblings()
            .removeClass("show");
    });

    $(".menu-toggle").click(function () {
        if (mobileScreen.matches) {
            $(".dashboard-nav").toggleClass("mobile-show");
        } else {
            $(".dashboard").toggleClass("dashboard-compact");
        }
    });
});


function openForm() {
    document.getElementById("myForm").style.display = "block";
  }
  
  function closeForm() {
    document.getElementById("myForm").style.display = "none";
  }

  function openForm2(numContacto) {
    document.getElementById("myFormContacto" + numContacto).style.display = "block";
  }

  function closeForm2(numContacto) {
    document.getElementById("myFormContacto" + numContacto).style.display = "none";
  }


  function openForm3() {
    document.getElementById("myFormContactoCrear").style.display = "block";
  }
  
  function closeForm3() {
    document.getElementById("myFormContactoCrear").style.display = "none";
  }


  function openFormCrear() {
    document.getElementById("myFormCrear").style.display = "block";
  }
  
  function closeFormCrear() {
    document.getElementById("myFormCrear").style.display = "none";
  }
  