var viewSiteToUser = new JackBeView(); viewSiteToUser.responseHandlers = { inicializaClienteAfilResp : function(resp) { if(resp.error.clave == "OK") { siteToUser.enroll.cargaValores(); } else { alert(resp.error.message); } }, fondoSiteToUser : function(resp) { if(resp.error.clave == "OK") { siteToUser.enroll.configuraFondoSTU(resp.dto); } }, validaNipEnrolamiento : function(resp) { if(resp.error.clave == "OK") { siteToUser.enroll.cargaValores(); } else { //ocultamos ventana de enrolamiento utils.dialogHandler.showDialog(false); if(siteToUser.flujoSupernet=="MICRO"){ loginMicrositio.exito(resp); } else { viewLogin.responseHandlers.validaUsuarioS2U(resp); } } }, iniCliEnroll : function(resp) { if(resp.error.clave == "OK") { if(siteToUser.flujoSupernet=="MICRO"){ loginMicrositio.goClienteOK(resp.dto); } else { LoginUsuario.entrarSupernet(); } } else { alert(resp.error.message); } }, consultaCampania : function(resp){ //Si esta en campana pantalla enrolamiento //Si no pantalla nip if(resp.error.clave == "OK") { if(siteToUser.flujoSupernet=="MICRO"){ loginMicrositio.iniNipS2U(); } else { LoginUsuario.ingresoNipS2U(); } } else if(resp.error.clave == "SITETOUSER-CLIENTE-CAMPANIA") { //enrolamiento siteToUser.enroll.ini(); } else { alert(resp.error.message); if(siteToUser.flujoSupernet=="MICRO"){ loginMicrositio.iniNipS2U(); } else { LoginUsuario.ingresoNipS2U(); } } }, consultaCampaniaMicro : function(resp){ //Si esta en campana pantalla enrolamiento //Si no pantalla nip if(resp.error.clave == "OK") { loginMicrositio.iniNipS2U(); } else if(resp.error.clave == "SITETOUSER-CLIENTE-CAMPANIA") { //enrolamiento siteToUser.enroll.ini(); } else { alert(resp.error.message); } }, personalizaImagen : function(resp) { stuBean = resp.dto.stuBean; if(resp.error.clave == "OK") { if (stuBean.flujoSupernet == "AFILIACION"){ siteToUser.enroll.iniAfil(); } else if(stuBean.flujoSupernet == "PREAFILIACION"){ preafilCon.irPaso2ContrasenaSinRSA(); } else { siteToUser.enroll.enrolarPaso2(); } } else if(resp.error.clave == "SITETOUSER-AFILIA-VERIFIED"){ Afil.AfterActDat(); } else { alert(resp.error.message); if (stuBean.flujoSupernet == "AFILIACION"){ Afil.AfterActDat(); } else { siteToUser.enroll.iniCliEnroll(); } } }, obtenerImagenes : function(resp) { if(resp.error.clave == "OK") { stuBean.altImagen = resp.dto.stuBean.altImagen; stuBean.nmImagen = resp.dto.stuBean.nmImagen; siteToUser.enroll.refrescarImagenes(); } else { alert(resp.error.message); } }, registroExitosoEnroll : function(resp) { if(resp.error.clave == "OK" && OTPMagica.rsa_otp){ preafilOTP.tieneRSA = true; preafilOTP.enrolamientoRSAExitosa(); }else{ if(resp.error.clave == "OK") { switch(resp.dto.mensaje) { case "AFILIACION": Afil.AfterActDat(); break; default: siteToUser.enroll.iniCliEnroll(); break; } } else if(resp.error.clave == "SITETOUSER-BLACK-LIST") { alert(resp.error.message); switch(resp.dto.mensaje) { case "AFILIACION": siteToUser.enroll.iniRegresoAfil(); break; default: siteToUser.enroll.redirectLogin(); } } else { alert(resp.error.message); switch(resp.dto.mensaje) { case "AFILIACION": Afil.AfterActDat(); break; default: siteToUser.enroll.iniCliEnroll(); } } } }, iniRenovarPreguntaResp : function(resp) { if(resp.error.clave == "OK") { stuBean = resp.dto.stuBean; siteToUser.enroll.renovarPregunta(); } else { alert(resp.error.message); } }, actualizacionPreguntaExitosa : function(resp) { if(resp.error.clave == "OK") { siteToUser.enroll.exitoPreguntaActualizar(resp.dto); } else { alert(resp.error.message); } }, fraseLoginResp : function(resp) { if(resp.error.clave == "OK") { if(siteToUser.flujoSupernet=="MICRO"){ loginMicrositio.loginS2U(resp); }else{ LoginUsuario.loginS2U(resp); } }else if (resp.error.clave == "EA003"){ LoginUsuario.rsaOff=0; loginMicrositio.ini(); }else if (resp.error.clave == "PLATAFORM-ERROR"){ LoginUsuario.rsaOff = 0; if(siteToUser.flujoSupernet=="MICRO"){ loginMicrositio.ini(); }else{ LoginUsuario.ingresoNipS2U(); } } else { alert(resp.error.message); } }, getPreguntasRetoResp : function(resp) { if(resp.error.clave == "OK") { stuBean = resp.dto.stuBean; siteToUser.enroll.muestraPreguntaReto(); } else { alert(resp.error.message); } }, validaPreguntasRetoResp : function(resp) { if(resp.error.clave == "OK"){ siteToUser.enroll.preguntasReto(); } else if (resp.error.clave == "DEVICE"){ siteToUser.enroll.guardaDispositivo(); } else if (resp.error.clave == "SAVE"){ siteToUser.enroll.intentosFallidosResp(resp); } else if(resp.error.clave == "TIME-OUT"){ siteToUser.enroll.preguntasRetoTimeOut(); } else if(resp.error.clave == ""){ LO(D,"http://www.santander.com.mx"); } else { alert(resp.error.message); LO(D,"http://www.santander.com.mx"); } }, finValidacionRetoResp : function(resp) { if(resp.error.clave == "OK"){ if(siteToUser.flujoSupernet=="MICRO"){ loginMicrositio.iniLoginS2U(); }else{ LoginUsuario.iniLoginS2U(); } } else { alert(resp.error.message); if(siteToUser.flujoSupernet=="MICRO"){ loginMicrositio.iniLoginS2U(); }else{ LoginUsuario.iniLoginS2U(); } } }, validarOTPcbc : function(resp) { if(resp.error.clave == "VAL_OTP_OK"){ preafilOTP.irPaso2Resp(); } else if(resp.error.clave == "SESS_INVALID"){ alert("Sesion invalida" ); LO(D, window.location.pathname.substring(0, window.location.pathname.indexOf("/",2))); } else if(resp.error.clave == "VAL_OTP_OK_VENC"){ preafilOTP.irPaso2RespVenc(); } else if(resp.error.clave == "VAL_OTP_BLOQ"){ A("Se ha excedido el limite de intentos permitidos. Su OTP ha sido bloqueado. Redirige a flujo de Afiliaci\u00f3n"); LO(D, window.location.pathname.substring(0, window.location.pathname.indexOf("/",2)) + "/AfiliacionSupernet"); } else { A("El Folio de Afililaci\u00f3n Sucursal consta de 4 d\355gitos y el Electr\u00f3nico de 8." ); } }, iniciaPersonalizaImagenResp : function(resp) { if(resp.error.clave == "OK") { stuBean = resp.dto.stuBean; preafilOTP.irPaso1RSAResp(); } else { alert(resp.error.message); } }, afiliaPreAfilcbc : function(resp) { if(resp.error.clave == "OK"){ preafilOTP.enrolamientoRSAExitosa(); } else if(resp.error.clave == "SESS_INVALID"){ alert("Sesion invalida" ); LO(D, window.location.pathname.substring(0, window.location.pathname.indexOf("/",2))); } else if(resp.error.clave == "AFIL-BLOQ"){ A("Se ha excedido el limite de intentos permitidos. Su contrase\u00f1a ha sido bloqueada. Redirige a flujo de Afiliaci\u00f3n"); LO(D, window.location.pathname.substring(0, window.location.pathname.indexOf("/",2)) + "/AfiliacionSupernet"); } else if(resp.error.clave == "ENROL-ERROR"){ A("Por el momento no se puede realizar el enrolamiento en RSA, intente mas tarde..."); LO(D, window.location.pathname.substring(0, window.location.pathname.indexOf("/",2))); } else { alert(resp.error.message); } } , reestablecerVencimientoOTP : function(resp){ if(resp.error.clave == "OK"){ preafilOTP.preafMsjOTPGenerado(); } else if(resp.error.clave == "SESS_INVALID"){ alert("Sesion invalida" ); LO(D, window.location.pathname.substring(0, window.location.pathname.indexOf("/",2))); } else if(resp.error.clave == "REG_LIM"){ A("Se ha alcanzado limite de regeneraciones. Favor de afiliarse."); LO(D, window.location.pathname.substring(0, window.location.pathname.indexOf("/",2)) + "/AfiliacionSupernet"); } else { alert("No se pudo reestablecer el OTP. Intente de nuevo mas tarde" ); } }, iniciaPersonalizaImagenRespContrasena : function(resp) { if(resp.error.clave == "OK") { stuBean = resp.dto.stuBean; preafilCon.iniciaPersonalizaImagenRespContrasena(); } else { alert(resp.error.message); } }, validarContrasenacbc : function(resp) { if(resp.error.clave == "VAL_OK"){ preafilCon.irPaso2ContrasenaSinRSA(); } else if(resp.error.clave == "VAL_CON_BLOQ"){ preafilCon.iniContrBloqueada(resp); } else { alert(resp.error.message); } }, afiliaPreAfilContrasenacbc : function(resp) { if(resp.error.clave == "OK"){ preafilCon.enrolamientoRSAContrasenaExitosa(); } else if(resp.error.clave == "SESS_INVALID"){ alert("Sesion invalida" ); LO(D, window.location.pathname.substring(0, window.location.pathname.indexOf("/",2))); } else if(resp.error.clave == "AFIL-BLOQ"){ preafilCon.iniContrBloqueada(resp); } else if(resp.error.clave == "MEDIOS_FAL"){ A("Medios de notificacion faltantes"); } else { alert(resp.error.message); } }, validaNipTelefonicoResp : function (resp){ if(resp.error.clave == "OK"){ preafilCon.paso3ContrBloqueada(); } else { //alert("Validacion de NIP Telef\u00F3nico Erronea: " + resp.error.message); A(resp.error.message); } }, validarCCNvaAfilResp : function (resp){ if(resp.error.clave == "OK"){ nvaAfil.irPaso2Resp(resp); } else { if(resp.error.clave == "RMTK-001" || resp.error.clave == "AFIL-16"){ nvaAfil.errorPaso2Resp(resp.error.clave); } alert(resp.error.message); } }, validaNipTCResp : function(resp) { utils.loading.hide (); if(resp.error.clave == "OK"){ nvaAfil.registro.paso1(); nvaAfil.intentos = 0; } else{ nvaAfil.intentos = nvaAfil.intentos + 1; if(nvaAfil.intentos > 2){ resp.error.message = "Por su seguridad, le solicitamos llamar a Super L\355nea opci\363n 4 Internet al tel\351fono:" + " desde Cd. de México y Area Metropolitana al 5169-4300, desde el interior de la Rep\372blica 0155 51694300,"+ " donde un ejecutivo le atender\341 con gusto "; //A(resp.error.message); utils.mostrarAlerta("Dato no v\341lido",resp.error.message); Afil.redirectLogin(); }else{ utils.mostrarAlerta("Dato no v\341lido",resp.error.message); if(beanValidaProd.opcionAfil == "2" ){ BNI('applet','B'); GI('afili').limpiarCampos(); } try{ GI('txtTarjeta_TDD').value= ""; }catch(ecv){;} } } }, registrarNipAccesoResp : function (resp){ if(resp.error.clave == "OK"){ nvaAfil.registro.irEnrolaRSA(); } else if(resp.error.clave == "OK_ENROLADO"){ preafilOTP.enrolamientoRSAExitosa(); } else if(resp.error.clave == "HIST0099" || resp.error.clave == "PERSONALIZADO" ){ if(resp.error.clave == "HIST0099"){ utils.mostrarAlerta("Contrase\u00f1a de acceso ya utilizada.","Ingrese su nueva contrase\u00f1a de acceso diferente a las utilizadas anteriormente, por favor intente de nuevo. \n \n Para cualquier duda o aclaraci\u00f3n comun\u00edquese a SuperL\u00ednea opci\u00f3n 4 SuperNet SuperM\u00f3vil."); }else{ A(resp.error.message); } DR("contrasenia","d"); DR("confContrasenia","d"); AV("contrasenia",""); AV("confContrasenia",""); } else { alert(resp.error.message); } }, validaNipCCTradResp : function (resp){ if(resp.error.clave == "OK"){ desBloqConNormal.paso3ContrBloqueada(); utils.loading.hide(); } else { utils.mostrarAlerta("Dato no v\341lido",resp.error.message); } }, recuperarBotonesResp : function (resp){ if(resp.error.clave == "OK"){ var numeroObjetos = resp.dto.length; var codigoTabla = "
"; codigoTabla =codigoTabla +"
"; for(i=0;i<10;i++){ var datos = resp.dto[i]; codigoTabla += "
',1); }else{ IJF('divLlaveGralNip2', '
',1); } GI("applet").innerHTML= codigoTabla + "
"; } else { utils.mostrarAlerta("Error Servicio",resp.error.message); } }, desbloquearCliente : function (resp){ if(resp.error.clave == "OK"){ desBloqConNormal.desBloqOK(); } else if(resp.error.clave == "SESS_INVALID"){ alert("Sesion invalida" ); LO(D, window.location.pathname.substring(0, window.location.pathname.indexOf("/",2))); } else if(resp.error.clave == "AFIL-BLOQ"){ A("Se ha excedido el limite de intentos permitidos. Su contrase\u00f1a ha sido bloqueada. Redirige a flujo de Afiliaci\u00f3n"); LO(D, window.location.pathname.substring(0, window.location.pathname.indexOf("/",2)) + "/AfiliacionSupernet"); } else { if(!preafilCon.banderaPreafil){ if(resp.error.clave == "HIST0099"){ utils.mostrarAlerta("Contrase\u00f1a de acceso ya utilizada.","Ingrese su nueva contrase\u00f1a de acceso diferente a las utilizadas anteriormente, por favor intente de nuevo. \n \n Para cualquier duda o aclaraci\u00f3n comun\u00edquese a SuperL\u00ednea opci\u00f3n 4 SuperNet SuperM\u00f3vil."); }else{ utils.mostrarAlerta("Error Servicio",resp.error.message); } }else{ A(resp.error.message); } } }, getGeneraOTPMagica : function(resp){ if(resp.error.clave != "OK"){ utils.dialogHandler.showDialog(false); if(resp.error.clave == "LIM-OTPM"){ utils.mostrarAlerta("L\355mite m\341ximo de reenv\355os",resp.error.message); }else{ utils.mostrarAlerta("Error servicio",resp.error.message); } OTPMagica.nvaAfil_paso3(resp); }else{ OTPMagica.nvaAfil_paso3(resp); utils.dialogHandler.showDialog(false); } }, validarOtpMagica : function(resp){ utils.loading.hide (); if(resp.error.clave == "OK"){ nvaAfil.registro.paso1(); nvaAfil.intentos = 0; } else{ nvaAfil.intentos = nvaAfil.intentos + 1; if(nvaAfil.intentos > 2){ resp.error.message = "Por su seguridad, le solicitamos llamar a Super L\355nea opci\363n 4 Internet al tel\351fono:" + " desde Cd. de México y Area Metropolitana al 5169-4300, desde el interior de la Rep\372blica 0155 51694300,"+ " donde un ejecutivo le atender\341 con gusto "; utils.mostrarAlerta("Dato no v\341lido",resp.error.message); Afil.redirectLogin(); }else{ utils.mostrarAlerta("Dato no v\341lido",resp.error.message); /*if(beanValidaProd.opcionAfil == "2" ){ BNI('applet','B'); GI('afili').limpiarCampos(); } try{ GI('txtTarjeta_TDD').value= ""; }catch(ecv){;}*/ } } }, validarOtpMagicaDes : function(resp){ if(resp.error.clave == "OK"){ GI("irPaso2").style.display = "none"; GI("otro_medio").style.display = "none"; GI("reenviar_otp").style.display = "none"; GI("i6").style.display = "none"; DR("otp_magica", "D"); DR("fechaNac_otp", "D"); desBloqConNormal.paso3ContrBloqueada(); GI("divCuentasM1").style.top = "200px"; } else { utils.mostrarAlerta("Dato no v\341lido",resp.error.message); } }, getGeneraOTPMagicaDes : function(resp){ if(resp.error.clave != "OK"){ utils.dialogHandler.showDialog(false); if(resp.error.clave == "LIM-OTPM"){ utils.mostrarAlerta("L\355mite m\341ximo de reenv\355os",resp.error.message); }else{ utils.mostrarAlerta("Error servicio",resp.error.message); } OTPMagica.paso2ContrBloqueadaOTPM(resp); }else{ OTPMagica.paso2ContrBloqueadaOTPM(resp); utils.dialogHandler.showDialog(false); } }, getDatosClienteAfil : function(resp){ nvaAfil.registro.paso1_2(resp); }, getDatosClienteAfilDes : function(resp){ if(resp.error.clave == "OK"){ desBloqConNormal.statusToken = resp.dto.statusToken; } }, validaTkn : function(resp){ if(resp.error.clave == "OK"){ if(BrowserDetect.browser == "Explorer"){ GI("numero_celular").style.display = "none"; GI("compania_tel").style.display = "none"; GI("correo_label").style.display = "none"; GI("c_selectTelefono").style.display = "block"; GI("label_telefono").style.top = "80px"; GI("i24").style.top = "135px"; }else{ GI("c_numero_celular").style.display = "none"; GI("c_compania_tel").style.display = "none"; GI("c_correo_label").style.display = "none"; GI("c_label_telefono").style.top = "80px"; GI("c_i24").style.top = "135px"; } GI("c_selectTelefono").style.top = "105px"; GI("c_email_2").style.top = "160px"; GI("telefono_2").placeholder = "10 d\u00edgitos"; GI("requiero_actualizar").style.display = "none"; GI("selectTelefono").style.display = "block"; GI("c_telefono_2").style.display = "block"; GI("telefono_2").style.display = "block"; GI("c_email_2").style.display = "block"; GI("email_2").style.display = "block"; nvaAfil.registro.requiereActualizar = true; AV("telefono_2", GV("numero_celular")); // Llenado de valores de los campos requiere actualizaar AV("email_2", GV("correo_label")); GI("selectTelefono").options[0] = null; for(i = 0; i < GI("selectTelefono").options.length; i++){ if(GI("selectTelefono").options[i].text == GV("compania_tel")){ GI("selectTelefono").options[i].selected = true; } } beanTeclasTel = { caracteres:"1234567890", // Solo permite estos caracteres mensaje:"" }; AE("telefono_2","onkeypress", function (event){ utils.valTeclas(this, beanTeclasTel, event); } ); GI("afilIdentificar").innerHTML = "Actualizaci\u00f3n de datos personales"; GI("afilNum").innerHTML = ""; GI("afilUno").innerHTML = ""; GI("afilDivNum").style.display = "none"; GI("afilBarra").style.width="0%"; }else{ utils.mostrarAlerta("Dato no v\341lido",resp.error.message); } }, validaTknDes : function(resp){ if(resp.error.clave == "OK"){ if(BrowserDetect.browser == "Explorer"){ GI("c_afilFechaNacDesSTK").style.left = "400px"; } var datos = {}; datos.fechaNac = GI("afilFechaNacDesSTK").value; datos.claveCliente = desBloqConNormal.cCliente; cfgSiteToUser.invoke("validaFechaNac", datos, viewSiteToUser.responseHandlers.validaNipCCTradResp); /*DR("afilFechaNacDesSTK", "d"); RIC("afilFechaNacDesSTK"); AV("afilFechaNacDesSTK",utils.getFechaOTP()); GI("segundaParteDesSTK").style.display="block"; GI("segundaParteDesTDD").style.display="none"; GI("segundaParteDesTDC").style.display="none"; GI("segundaParteDesNBT").style.display="none";*/ }else{ utils.mostrarAlerta("Dato no v\341lido",resp.error.message); } }, getCredencialesTealiumResp : function(resp){ nvaAfil.cuentaTealium = resp.dto.cuentaTealium; nvaAfil.perfilTealium = resp.dto.perfilTealium; nvaAfil.ambienteTagueo = resp.dto.ambienteTagueo; nvaAfil.inicio(); }, getCredencialesTealiumLoginResp : function(resp) { LoginUsuario.cuentaTealium = resp.dto.cuentaTealium; LoginUsuario.perfilTealium = resp.dto.perfilTealium; LoginUsuario.ambienteTagueo = resp.dto.ambienteTagueo; LoginUsuario.inicioLogin(); } }