<script language='javascript'>

  var session="blueprint";

  function get_session() {

    var xmlhttp = new XMLHttpRequest();

    xmlhttp.onreadystatechange = function() {

      if (this.readyState == 4 && this.status == 200) {

        session= this.responseText;

        if(session=="1")

        {

          // var n = location.href.includes("login");

          // if (!n) {

          // alert(location.href);

          window.location='../home';         

          // }

        }else{

          // alert('La session esta muerta');

        }    

      }

    }  

    xmlhttp.open("GET", "../onstar_finish.php?Token_appquadrata=UkKA1590", true);

    xmlhttp.send();

  }

  

  function Queen_Guard() {

    get_session();

    setTimeout(Queen_Guard, 1000);          

  }

</script> 

