


  <script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>


  <script type="text/javascript">window.setInterval(function(){
  $('.grid').isotope({
  itemSelector: '.grid-item'
});
}, 2000);
</script>

<script language=javascript>
function ventanaSecundaria56 (URL){
   window.open(URL,"ventana1","width=600,height=500,scrollbars=NO")
}







  </script>
  
  
  
  
      <script language="javascript">
    function PulsarTecla(event)
    {
        tecla = event.keyCode;
     
        if(tecla==113)
        {
            location.href ='nueva_venta.php';
        }
        
        
        
        
    }
     
    window.onkeydown=PulsarTecla;
    </script>
   
<!-- Modal -->
<div id="myModal" class="modal">
  <div class="modal-content">
    <span class="close">&times;</span>
    <div id="spinner" class="spinner"></div>
    <iframe id="myIframe" src="" style="width: 100%; height: 400px;"></iframe>
  </div>
</div>

<script>
  // Obtener elementos del DOM
  var modal = document.getElementById("myModal");
  var btns = document.getElementsByClassName("openModal");
  var closeBtn = document.getElementsByClassName("close")[0];
  var iframe = document.getElementById("myIframe");
  var spinner = document.getElementById("spinner");

  // Funci��n para abrir el modal y actualizar el iframe
  function openModal(url) {
    modal.style.display = "block";
    spinner.style.display = "block";
    iframe.style.display = "none";
    iframe.src = url;
  }

  // Funci��n para cerrar el modal
  function closeModal() {
    modal.style.display = "none";
    spinner.style.display = "none";
    iframe.src = "";
  }

  // Asignar eventos a los botones
  for (var i = 0; i < btns.length; i++) {
    btns[i].addEventListener("click", function() {
      var url = this.getAttribute("data-url");
      openModal(url);
    });
  }

  closeBtn.addEventListener("click", closeModal);
  window.addEventListener("click", function(event) {
    if (event.target == modal) {
      closeModal();
    }
  });

  // Evento de carga completada del iframe
  iframe.addEventListener("load", function() {
    spinner.style.display = "none";
    iframe.style.display = "block";
  });
</script>