﻿    
    function Identificacion_Listado()
    {
        window.open('UserLogin.aspx');
    }

    function Eliminar_Alerta(id_alerta)
    {
            //Llamar por AJAX a alertasgestion.aspx con los valores de la alerta, que estan en el formulario alertasform. nuevo=1
        //la llamada debe devolver una página de error o de ok, cuyo html se recoge del response y :
        // se muestra en un div del alertasform hecho para tal efecto, y se oculta el resto del formulario
        if(confirm('¿Confirma que desea eliminar esta alerta?'))
        {
                if (window.XMLHttpRequest) //Non-IE Browsers
        	    GlobalAjaxObjectVal = new XMLHttpRequest(); //Global Variable
	    else if(window.ActiveXObject) //IE Browsers
	    GlobalAjaxObjectVal = new ActiveXObject("Msxml2.XMLHTTP");  //Global Variable
	    else
	    { //Your browsers is not compatible with AJAX
	    alert('Your browser is not supported.')
	    return; //exit
	    }
	    //Initialized the Ajax object to access the URL

	    url="AlertasGestion.aspx?delete=1&id_alerta=" + id_alerta;

	    var url_encode= encodeURI(url);

	    GlobalAjaxObjectVal.open("GET", url_encode);
	    //GlobalAjaxObject.open("POST", document.formulariohome);
	    //Sets the function that is run many times.
	    GlobalAjaxObjectVal.onreadystatechange = recoger_resultadobd;
	    //Executes the request
	    GlobalAjaxObjectVal.send(null);
    }
    }
    
    function Ofertas_Similares(params_ofertas)
    {
        window.location = 'ofertas-vuelos/ofertas.aspx?' + params_ofertas;
    }
