﻿
function comprobarReserva(){
 
    this.url = "";
    this.errormail = "Compruebe su mail";
    this.errorloc = "Compruebe su localizador";
     
}

comprobarReserva.prototype.comprobar = function(emailCliente, localizador) {
    var strError = ""
    if (!isEml(emailCliente)) strError = this.errormail + '\n';
    if (localizador.length == 0) strError += this.errorloc;
    if (strError != "") {
        alert(strError);
    }
    else {
        var url = this.url + "/reserva/check.aspx?accion=check";
        url += "&ResLoca=" + localizador;
        url += "&ResMail=" + emailCliente;
        window.location.href = url;
    }

}
