"),__jquery(".btn-send-email").attr("href","javascript:;"))})}function validarIdReferencia(){__jquery(".idTransaccion").keyup(function(){""!==__jquery(".idTransaccion").val()&&(parseInt(__jquery(".idTransaccion").val())>0?__jquery('span[id*="msgIdTransaccion"]').html(""):__jquery('span[id*="msgIdTransaccion"]').html("Solo permite números mayores a 0"))})}function validarTipoPago(){__jquery(".btnred");__jquery("input[id*='tipoPago:0']").is(":checked")&&(__jquery("input[id*='valorPagoParcial']").attr("readonly","true"),__jquery("input[id*='valorPagoParcial']").val(""),__jquery(".error-cero").length&&__jquery(".error-cero").hide()),__jquery("input[id*='tipoPago:1']").is(":checked")&&__jquery("input[id*='valorPagoParcial']").removeAttr("readonly")}function validarCeroFact(){var e=__jquery("input[id*='valorPagoParcial']").val();__jquery(".btnred");__jquery("input[id*='tipoPago:1']").is(":checked")&&(""!=e?mostrarMensaje("error-cero",!(parseInt(e)>0)):__jquery(".error-cero").hide())}var fechaIni,banderaLogin=!0,holaLogin=!1;function desplegarLoguin(){__jquery(".login .bloq:first-child").click(function(e){1==banderaLogin?(__jquery(".cont-login").css("display","block"),MnuValidatorShow(),banderaLogin=!1,validarFondoOscuroLogin()):(__jquery(".cont-login").css("display","none"),banderaLogin=!0,__jquery(".aDarkSidePage").css("display","none")),1!=holaLogin&&(holaLogin=!1,e.preventDefault(),e.stopPropagation())})}function noCerrarDesplegableLoguin(){__jquery(".btn-login").click(function(){__jquery(".content-captcha").length||(holaLogin=!0)}),__jquery(".cont-login").click(function(e){1!=holaLogin&&(holaLogin=!1,e.preventDefault(),e.stopPropagation())})}function CloseDesplegableLoguin(){__jquery("body").click(function(){1==banderaLogin?(__jquery(".cont-login").css("display","none"),__jquery(".cont-autenticado").length||__jquery(".aDarkSidePage").css("display","none")):(__jquery(".cont-login").css("display","none"),__jquery(".aDarkSidePage").css("display","none")),__jquery(".arrowPerfilUp").addClass("down"),__jquery(".arrowPerfilUp").removeClass("arrowPerfilUp"),banderaLogin=!0})}function captchaLogin(){var e=__jquery(".cont-login input[id*='captchaIngresado']");return 00)t=!0;else if(e.length){var i=__jquery("input[id*='captchaIngresado']").val(),t=!1;__jquery.ajax({url:a,data:{captchaIngresado:i},type:"POST",async:!1,success:function(e){"false"==e?(__jquery(".cont-loading").addClass("_hiden"),t=!1,__jquery(".error-captcha").html("El texto no coincide con la imagen."),recargaCaptcha()):(__jquery(".error-captcha").html(""),t=!0)}})}return t}catch(e){dispararExcepcion(excepcion,"common.min.js","initCaptcha()")}}function recargaCaptcha(){try{if(__jquery("input[id*='captchaIngresado']").val(""),0<__jquery("div[id*='hiddenCaptcha']").length)var e=__jquery("div[id*='hiddenCaptcha'] input[id*='path_captcha']").val();else e=__jquery("input[id*='path_captcha']").val();var r=__jquery(".imagenCaptcha");if(r.length){var a=e+"?",i=new Date;r.attr("src",a+i.getTime())}}catch(e){dispararExcepcion(excepcion,"common.min.js","recargaCaptcha()")}}function labelsHidden(){""==__jquery('label[id*="oplNomCliente"]').html()&&__jquery('label[id*="oplNomCliente"]').parent().parent().parent().hide(),""==__jquery('label[id*="oplDescripcion"]').html()&&__jquery('label[id*="oplDescripcion"]').parent().parent().parent().hide()}function ocultarRbObligaciones(){__jquery(".divReducir").css("display","none"),__jquery("input[id*='tipoPago:1']").click(function(){__jquery(".divReducir").css("display","block"),resizeMe()}),__jquery("input[id*='tipoPago:0']").click(function(){__jquery(".divReducir").css("display","none")})}function desplegarAutenticado(){var e="false";__jquery(".arrowMenuDown, .aDarkSidePage").on("click",function(){var e=__jquery(".desplegable-perfil").attr("style");void 0!==e&&-1!==e.indexOf("display: block")?(__jquery(".arrowMenuDown").css("transform","rotate(0deg)"),__jquery(".arrowMenuDown").css("transition","all 0.3s ease 0s"),__jquery(".arrowMenuDown").css("width","18px"),__jquery(".arrowMenuDown").css("height","18px")):(__jquery(".arrowMenuDown").css("transform","rotate(180deg)"),__jquery(".arrowMenuDown").css("transition","all 0.3s ease 0s"),__jquery(".arrowMenuDown").css("width","18px"),__jquery(".arrowMenuDown").css("height","18px"))}),__jquery(".head-container ").on("click",function(){var e=__jquery(".desplegable-perfil").attr("style");void 0!==e&&-1===e.indexOf("display: block")&&(__jquery(".arrowMenuDown").css("transform","rotate(0deg)"),__jquery(".arrowMenuDown").css("transition","all 0.3s ease 0s"),__jquery(".arrowMenuDown").css("width","18px"),__jquery(".arrowMenuDown").css("height","18px"))}),__jquery(".cont-autenticado .title .arrowMenuDown").click(function(r){r.preventDefault(),r.stopPropagation(),screen.width>686&&("false"==e?(__jquery(".desplegable-perfil").css("display","block"),e="true",innerWidth>686&&validarFondoOscuroLogin(),MnuValidatorShow(),__jquery(".aDarkSidePage, .logo, .icon-menu").one("click",function(){__jquery(".desplegable-perfil, .aDarkSidePage").css("display","none"),e="false"})):(__jquery(".desplegable-perfil").css("display","none"),innerWidth>686&&__jquery(".aDarkSidePage").css("display","none"),e="false"))})}function ocultarDivReducir(){__jquery('input[id*="valorPagoParcial"]').keyup(function(){var e,r,a=!1,i=__jquery(".botonPagarObligaciones");e=(e=(e=__jquery('label[id*="optValorPago"]').html()).replace(/\./g,"")).replace(/\,/g,".");var t=parseFloat(e);e="",e=(e=(e=__jquery('input[id*="valorPagoParcial"]').val()).replace(/\./g,"")).replace(/\,/g,"."),r=parseFloat(e);var o=__jquery('span[id*="254405d9"]');r==t?(__jquery(".divReducir").css("display","none"),o.html(""),a=!0):r>t?(o.addClass("error-cero"),o.css("text-transform","none"),o.css("float","left"),o.html("El valor a pagar debe ser menor al pago total"),__jquery('input[id*="valorPagoParcial"]').val("")):0==r?(o.addClass("error-cero"),o.css("text-transform","none"),o.css("float","left"),o.html("El valor a pagar debe ser mayor que cero")):""===e||null==e?a=!1:(a=!0,__jquery(".divReducir").css("display","block"),o.html("")),a?(i.removeClass("btn-disabled"),i.removeAttr("disabled")):(i.addClass("btn-disabled"),i.attr("disabled","disabled"))})}function noMostrarModalLogin(){__jquery('input[id*="mostrarLightboxLogin"]').length&&(__jquery('input[id*="mostrarLightboxLogin"]').val("false"),__jquery('input[id*="mostrarForm"]').val(null),__jquery("form[id*='form1']").submit())}function noMostrarModalRegistro(){if(__jquery(".step1").length||__jquery(".activClave").length||__jquery(".recaudosUser").length){if(__jquery('input[id*="mostrarLightbox"]').val("false"),__jquery('input[id*="mostrarForm"]').val(null),__jquery(".step1").length&&"icon-error"===__jquery("input[id*='tipoError']").val())return!1;__jquery("form[id*='formCerrarModal']").submit()}}function obligatoriedadPNombre(){__jquery(".fName").keyup(function(){try{recorreTodo(1),""==__jquery(".fName").val()?(__jquery(".spanErrorNombres").css("display","block"),__jquery(".spanErrorNombres").text("Los campos Primer Nombre y Primer Apellido son obligatorios.")):""!=__jquery(".fLNanme").val()&&""!=__jquery(".fName").val()&&(__jquery(".spanErrorNombres").css("display","none"),__jquery(".spanErrorNombres").text(""))}catch(e){dispararExcepcion(e,"common.min.js","obligatoriedadPNombre()")}})}function llamarLightboxVerifiPago(){try{setTimeout(function(){var e=__jquery("input[id*='mostrarResulLightbox']").val();if(tituloLightbox=__jquery("input[id*='tituloLightbox']").val(),cuerpoLightbox=__jquery("input[id*='cuerpoLightbox']").val(),widthLightbox=__jquery("input[id*='widhtLightbox']").val(),heightLightbox=__jquery("input[id*='heightLightbox']").val(),tipoError=__jquery("input[id*='tipoError']").val(),""==__jquery("input[id*='idTosearch']").val()?localStorage.idTosearch="0":""!=__jquery("input[id*='idTosearch']").val()&&(localStorage.idTosearch="1",__jquery("input[id*='idTosearch']").val("")),"true"==e){var r=PortalPagos.constants.MENSAJE_MODAL_CLIENTES;-1!==document.location.href.indexOf(PortalPagos.constants.CONTEX_BALOTO)&&(r=PortalPagos.constants.MENSAJE_MODAL_BALOTO),showLightbox(widthLightbox,heightLightbox,r+"?tituloLightbox="+tituloLightbox+"&cuerpoLightbox="+cuerpoLightbox,"no","",tipoError,"","","","")}},2e3)}catch(e){dispararExcepcion(e,"common.min.js","llamarLightboxVerifiPago()")}}function mostrarPopupEnvioComprobante(){validarEmailComprobante();var e=__jquery("div[name=ibmColumnContainer]")+__jquery("div[name=ibmTopContainer]")+__jquery("div[name=ibmDownContainer]"),r=__jquery("#email").val();return __jquery("#popup").fadeIn("slow"),__jquery(".popup").css("heigth",e),aplicarPlaceholder(__jquery("#serMemtb"),"Type a Location"),__jquery("#correo-comprobante").val(r),!1}function llamarlightboxComprobante(){return""!==__jquery("input[id*='correo-comprobante']").val()&&(setTimeout(function(){var e=__jquery("input[id*='mostrarLightbox']").val(),r=__jquery("input[id*='tituloLightbox']").val(),a=__jquery("input[id*='cuerpoLightbox']").val(),i=__jquery("input[id*='widhtLightbox']").val(),t=__jquery("input[id*='heightLightbox']").val();if("true"==e){var o=PortalPagos.constants.MENSAJE_MODAL_CLIENTES;-1!==document.location.href.indexOf(PortalPagos.constants.CONTEX_BALOTO)&&(o=PortalPagos.constants.MENSAJE_MODAL_BALOTO),showLightbox(i,t,o+"?tituloLightbox="+r+"&cuerpoLightbox="+a,"no")}},4e3),!0)}function validarLongitudComentario(){__jquery(".comentariosPago").keyup(function(e){__jquery(".comentariosPago").val().length>100&&__jquery(".comentariosPago").val(__jquery(".comentariosPago").val().substr(0,100))}),__jquery(".referenciaPagoFact").keypress(function(e){var r=e.currentTarget,a=__jquery(r).hasClass("referenciaemail");if(8!=e.which&&0!=e.which&&(e.which<48||e.which>57)&&!a){var i=window.e?e.keyCode:e.which;return 95!=i&&(0==i||8==i||validarTipoReferencia(__jquery(this),String.fromCharCode(i)))}}),__jquery(".confirmReferencia").keypress(function(e){if(8!=e.which&&0!=e.which&&(e.which<48||e.which>57)){var r=window.e?e.keyCode:e.which;return 95!=r&&(0==r||8==r||validarTipoReferencia(__jquery(this),String.fromCharCode(r)))}})}function validarTipoReferencia(e,r){return __jquery(e).hasClass("alfanumerico")?/^([A-Za-z0-9])+$/.test(r):__jquery(e).hasClass("numerico")?/^([0-9])+$/.test(r):/^([A-Za-z0-9_#&@+¿?!¡\:\.\-\(\)\s])+$/.test(r)}function eliminarEntradilla(){try{__jquery(".contenedor-formulario.recaudadores").length||__jquery(".contenedor-formulario.recaudo").length?__jquery('form[id*="formCambioPassTemp"]').length?__jquery(".wpthemeNarrow .component-control:nth-child(1)").css("display","none"):__jquery(".wpthemeNarrow .component-control:nth-child(2)").css("display","none"):__jquery('form[id*="formCambioPassTemp"]').length?__jquery(".wpthemeNarrow .component-control:nth-child(2)").css("display","none"):__jquery(".wpthemeNarrow .component-control:nth-child(3)").css("display","none")}catch(e){dispararExcepcion(e,"common.min.js","elminarEntradilla()")}}function validarCamposContrasenas(e){try{if(null!=e){var r=validarObligatorios(e);if(!r)return r}var a=__jquery(".coPass").val(),i=__jquery(".pass1").val(),t=__jquery(".alfanumOlvidoClave");if(a!=i&&""!=a)return removerMsgObligatorios(t),__jquery(".spanConfirmarPass1").css("display","block"),__jquery(".spanConfirmarPass1").text("Tu nueva contraseña no coincide"),__jquery(".cont-loading").addClass("_hiden"),!1;removerMsgObligatorios(t),__jquery(".spanConfirmarPass1").text(""),__jquery(".spanConfirmarPass1").css("display","none");var o=__jquery('input[id*="txtPassTemporal"]').val(),n=!1;return"click"==e.type&&""!=o&&""!=a&&""!=i&&(mostrarLoadingImg(),__jquery("._hiden").length&&__jquery(".cont-loading").removeClass("_hiden"),n=!0),n}catch(e){dispararExcepcion(e,"common.min.js","validarCamposContrasenas()")}}function validaCambioPass(){__jquery(".alfanumOlvidoClave").blur(function(e){validarCamposContrasenas()})}function removerMsgObligatorios(e){e.each(function(e,r){""!==__jquery(r).val()&&__jquery(r).parent().find(".errorObligatorio").remove()})}function habilitarBotonHistoricoPagos(){__jquery('input[id*="btnConsultarHistorico"]').click(function(e){try{return""!=__jquery('input[id*="fechaInicial"]').val()&&""!=__jquery('input[id*="fechaFinal"]').val()?(__jquery(".spanConfirmarPass2").css("display","none"),__jquery(".spanConfirmarPass2").text(""),!0):""==__jquery('input[id*="fechaInicial"]').val()?(__jquery(".spanConfirmarPass2").css("display","block"),__jquery(".spanConfirmarPass2").text("Por favor ingrese la Fecha Inicial"),!1):(__jquery(".spanConfirmarPass2").css("display","block"),__jquery(".spanConfirmarPass2").text("Por favor ingrese la Fecha Final"),!1)}catch(e){dispararExcepcion(e,"common.min.js","habilitarBotonHistoricoPagos()")}})}function readOnlyHistorico(){__jquery('input[id*="fechaInicial"]').keyup(function(e){try{__jquery('input[id*="fechaInicial"]').val("")}catch(e){dispararExcepcion(e,"common.min.js","readOnlyHistorico()")}}),__jquery('input[id*="fechaFinal"]').keyup(function(e){try{__jquery('input[id*="fechaFinal"]').val("")}catch(e){dispararExcepcion(e,"common.min.js","readOnlyHistorico()")}})}function obligatoriedadNumDocumento(){__jquery(".nDoc").keyup(function(){try{""==__jquery(".nDoc").val()?(__jquery(".ico-error-form-visible.oculAjaxDocumento").css("background-size","0"),__jquery(".oculAjaxDocumento").text(""),__jquery(".spanErrorNumDocumento").css("display","block"),__jquery(".spanErrorNumDocumento").text("Los campos Tipo Documento y Numero de Documento son obligatorios.")):""!=__jquery(".nDoc").val()&&"default"!=__jquery(".tDoc").val()&&(__jquery(".spanErrorNumDocumento").css("display","none"),__jquery(".spanErrorNumDocumento").text(""),recorreTodo(1))}catch(e){dispararExcepcion(e,"common.min.js","obligatoriedadNumDocumento()")}})}function validarEmailsRegistroCliente(){try{var e=__jquery(".eMail").val(),r=__jquery(".cEMail").val(),a="";expr=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,""!=e?expr.test(e)?""!=r&&(e===r?(__jquery(".spanErrorEmail").css("display","none"),__jquery(".spanErrorEmail").text(""),recorreTodo(1)):a="Los correos no coinciden."):a="Digita un email correcto":a="Los campos Correo Electronico y Confirmar Correo electronico son obligatorios.",""!=a&&(__jquery(".spanErrorEmail").css("display","block"),__jquery(".spanErrorEmail").text(a))}catch(e){dispararExcepcion(e,"common.min.js","validarEmailsRegistroCliente()")}}function obligatoriedadTipDocRegistro(){__jquery(".tDoc").change(function(){try{"default"!=__jquery(".tDoc").val()?""!=__jquery(".nDoc").val()&&"default"!=__jquery(".tDoc").val()&&(__jquery(".spanErrorNumDocumento").css("display","none"),__jquery(".spanErrorNumDocumento").text(""),obligatoriedadNumDocumento()):(__jquery(".ico-error-form-visible.oculAjaxDocumento").css("background-size","0"),__jquery(".oculAjaxDocumento").text(""),__jquery(".spanErrorNumDocumento").css("display","block"),__jquery(".spanErrorNumDocumento").text("Los campos Tipo Documento y Numero de Documento son obligatorios."),obligatoriedadNumDocumento())}catch(e){dispararExcepcion(e,"common.min.js","validarConfirmarEmailRegistro()")}})}function recorreTodo(e){try{var r,a,i=0,t=0,o=0,n=0;__jquery(".btnred").attr("disabled","disabled"),__jquery(".btnred").addClass("btn-disabled"),"1"==e||"3"==e?(__jquery(".formulario.step"+e+" input.required").each(function(r,a){""!=__jquery(a).val()&&i++,"1"==e?__jquery('input[id*="txtEmail"]').val()==__jquery('input[id*="txtConfirmarEmail"]').val()&&t++:t++}),__jquery(".formulario.step"+e+' span[class*="ico-error-form"]').each(function(e,r){""==__jquery(r).html()&&o++,n++})):"2"==e&&(i=0,"1"==__jquery('select[id*="listaPaises"]').val()&&"000"!=__jquery('select[id*="listaPaises"]').val()?(t=4,i+=1,""!=__jquery('select[id*="listaDep"]').val()&&null!=__jquery('select[id*="listaDep"]').val()&&""!=__jquery('select[id*="listaCiudades"]').val()&&null!=__jquery('select[id*="listaCiudades"]').val()&&(i+=2)):"1"!=__jquery('select[id*="listaPaises"]').val()&&"000"!=__jquery('select[id*="listaPaises"]').val()&&(t=2,i+=1),""!=__jquery('input:radio[id*="rb"]:checked').val()&&null!=__jquery('input:radio[id*="rb"]:checked').val()&&(i+=1)),i==t&&(r=!0),o==n&&(a=!0),1==e&&(localStorage.sesion1=1==r&&1==a),2==e&&(localStorage.sesion2=1==r&&1==a),3==e&&(localStorage.sesion3=1==r&&1==a),1==r&&1==a&&(localStorage.formularioActual=e+1,__jquery(".formulario.step"+localStorage.formularioActual).css("display","block"),resizeMe(),"3"==localStorage.formularioActual&&(localStorage.verSeccion="true",localStorage.removeItem("formularioActual"))),"true"==localStorage.sesion1&&"true"==localStorage.sesion2&&"true"==localStorage.sesion3?(__jquery(".btnred").removeAttr("disabled"),__jquery(".btnred").removeClass("btn-disabled")):(__jquery(".btnred").attr("disabled","disabled"),__jquery(".btnred").addClass("btn-disabled"))}catch(e){dispararExcepcion(e,"common.min.js","recorreTodo()")}}function ocultarLocalidadRegistro(){__jquery(".pais").change(function(){try{recorreTodo(2),errorGenero(),"1"!=__jquery(".pais").val()?(__jquery(".ocultDepartamento").css("display","none"),__jquery(".selectDespOcult").css("display","none"),__jquery(".selectCiudadOcult").css("display","none"),__jquery(".ocultCiudad").css("display","none"),__jquery(".spanErrorPais").css("margin-top","45px"),__jquery(".spanErrorPais").css("margin-left","-323px")):(__jquery(".ocultDepartamento").css("display","block"),__jquery(".selectDespOcult").css("display","block"),__jquery(".selectCiudadOcult").css("display","block"),__jquery(".ocultCiudad").css("display","block"),__jquery(".spanErrorPais").css("margin-left","0"))}catch(e){dispararExcepcion(e,"common.min.js","validarConfirmarEmailRegistro()")}})}function obligatoriedadPaisRegistro(){__jquery(".pais").change(function(){try{errorGenero(),"000"!=__jquery(".pais").val()?(__jquery(".spanErrorPais").css("display","none"),__jquery(".spanErrorPais").text("")):(__jquery(".spanErrorPais").css("display","block"),"none"==__jquery(".depa").css("display")?(__jquery(".spanErrorPais").css("margin-top","45px"),__jquery(".spanErrorPais").css("margin-left","-323px")):(__jquery(".spanErrorPais").css("margin-top","0"),__jquery(".spanErrorPais").css("margin-left","0")),__jquery(".spanErrorPais").text("El campo Pais es obligatorio"))}catch(e){dispararExcepcion(e,"common.min.js","validarConfirmarEmailRegistro()")}})}function obligatoriedadDeparRegistro(){__jquery('select[id*="listaDep"]').change(function(){recorreTodo(2);try{"1"!=__jquery(".pais").val()||("000"!=__jquery(".depa").val()?(__jquery(".spanErrorPais").css("display","none"),__jquery(".spanErrorPais").text("")):(__jquery(".spanErrorPais").css("display","block"),__jquery(".spanErrorPais").text("Los campos Pais y Departamento son obligatorios.")))}catch(e){dispararExcepcion(e,"common.min.js","validarConfirmarEmailRegistro()")}})}function obligatoriedadCiudadRegistro(){__jquery('select[id*="listaCiudades"]').change(function(){try{recorreTodo(2),"1"!=__jquery(".pais").val()||("000"!=__jquery(".ciudad").val()?(__jquery(".spanErrorCiudad").css("display","none"),__jquery(".spanErrorCiudad").text("")):(__jquery(".spanErrorCiudad").css("display","block"),__jquery(".spanErrorCiudad").text("Campo Obligatorio")))}catch(e){dispararExcepcion(e,"common.min.js","validarConfirmarEmailRegistro()")}})}function validarNumericosMovilRegistro(){__jquery(".phone").keypress(function(){try{var e=window.event?event.keyCode:event.which;return 0==e||8==e||/\d/.test(String.fromCharCode(e))}catch(e){dispararExcepcion(e,"common.min.js","validarNumericosMovilRegistro()")}})}function validarLongitudUsuario(){__jquery(".userName").blur(function(){try{__jquery(".userName").val().length<8?(__jquery(".spanUserLongitud").css("display","block"),__jquery(".spanUserLongitud").text("El usuario no es volido")):(__jquery(".spanUserLongitud").css("display","none"),__jquery(".spanUserLongitud").text(""))}catch(e){dispararExcepcion(e,"common.min.js","validarConfirmarEmailRegistro()")}})}function validarLongitudPass(){__jquery(".pass").blur(function(){try{__jquery(".pass").val().length<8?(__jquery(".spanLongitudPass").css("display","block"),__jquery(".spanLongitudPass").text("La clave no es valido")):(__jquery(".spanLongitudPass").css("display","none"),__jquery(".spanLongitudPass").text(""))}catch(e){dispararExcepcion(e,"common.min.js","validarConfirmarEmailRegistro()")}})}function obligatoriedadTipoDocumento(){__jquery(".alfanumOlvidoClave").keyup(function(e){try{limpiarMensajesEvent(e)}catch(e){dispararExcepcion(e,"common.min.js","obligatoriedadTipoDocumento()")}}),__jquery(".tDoc").change(function(e){try{limpiarMensajesEvent(e)}catch(e){dispararExcepcion(e,"common.min.js","obligatoriedadTipoDocumento()")}}),__jquery(".recaudadores").length&&(__jquery(".alfanumOlvidoClave").keyup(function(e){try{habBtnReCaptchaRec(validarReCaptcha())}catch(e){dispararExcepcion(e,"common.min.js","obligatoriedadTipoDocumento()")}}),__jquery(".numConvOlvidoClave").change(function(e){try{habBtnReCaptchaRec(validarReCaptcha())}catch(e){dispararExcepcion(e,"common.min.js","obligatoriedadTipoDocumento()")}})),__jquery(".alfanumOlvidoClave").keyup(function(e){try{habBtnReCaptcha(validarReCaptcha())}catch(e){dispararExcepcion(e,"common.min.js","obligatoriedadTipoDocumento()")}}),__jquery(".tDoc").change(function(e){try{habBtnReCaptcha(validarReCaptcha())}catch(e){dispararExcepcion(e,"common.min.js","obligatoriedadTipoDocumento()")}})}function habBtnReCaptcha(e){try{"none"!=__jquery('div[id*="container-captcha"]').css("display")?!0===e&&"0"!=__jquery(".tDoc").val()&&""!=__jquery('input[id*="txtNumDocument"]').val()&&""!=__jquery('input[id*="txtCampoNit"]').val()?__jquery("#olvidocontrasena .btnred").removeAttr("disabled").removeClass("btn-disabled"):__jquery("#olvidocontrasena .btnred").attr("disabled","true").addClass("btn-disabled"):"0"!=__jquery(".tDoc").val()&&""!=__jquery('input[id*="txtNumDocument"]').val()&&""!=__jquery('input[id*="txtCampoNit"]').val()?__jquery("#olvidocontrasena .btnred").removeAttr("disabled").removeClass("btn-disabled"):__jquery("#olvidocontrasena .btnred").attr("disabled","true").addClass("btn-disabled")}catch(e){dispararExcepcion(e,"common.min.js","obligatoriedadTipoDocumento()")}}function validarCheckReCaptcha(){var e=validarReCaptcha();try{__jquery(".recaudadores").length?habBtnReCaptchaRec(e):habBtnReCaptcha(e)}catch(e){dispararExcepcion(e,"common.min.js","obligatoriedadTipoDocumento()")}}function habBtnReCaptchaRec(e){try{"none"!=__jquery('div[id*="container-captcha"]').css("display")?!0===e&&""!=__jquery('input[id*="txtNumDocument"]').val()&&""!=__jquery('input[id*="txtCampoNit"]').val()?__jquery("#olvidocontrasena .btnred").removeAttr("disabled").removeClass("btn-disabled"):__jquery("#olvidocontrasena .btnred").attr("disabled","true").addClass("btn-disabled"):""!=__jquery('input[id*="txtNumDocument"]').val()&&""!=__jquery('input[id*="txtCampoNit"]').val()?__jquery("#olvidocontrasena .btnred").removeAttr("disabled").removeClass("btn-disabled"):__jquery("#olvidocontrasena .btnred").attr("disabled","true").addClass("btn-disabled")}catch(e){dispararExcepcion(e,"common.min.js","obligatoriedadTipoDocumento()")}}function validarCaptchaOlvido(e){var r=!0,a=!0,i=!0;return __jquery(".datosUsuario").length&&(r=validarCamposUsuarioOlvido(e)),"none"!=__jquery(".pregunta-seguridad").css("display")&&(a=validarRespuestaOlvido(e)),"none"!=__jquery("#container-captcha").css("display")&&(i=validarCamposCaptchaOlvido(e)),!!(r&&a&&i)}function borrarErrorCaptcha(){__jquery(document).delegate("input[id*='form-olvido-ctrna:captchaIngresado']","keypress",function(e){__jquery(".error-captcha").html(""),__jquery(".helperTextCaptcha").removeClass("_hiden")})}function ocultarIcoError(){__jquery(".ico-error-form-visible.oculAjaxDocumento").css("background-size","0"),setTimeout(function(){try{""==__jquery(".ico-error-form-visible.oculAjaxDocumento").text()?__jquery(".ico-error-form-visible.oculAjaxDocumento").css("background-size","0"):__jquery(".ico-error-form-visible.oculAjaxDocumento").css("background-size",""),obligatoriedadNumDocumento(),obligatoriedadTipDocRegistro()}catch(e){dispararExcepcion(e,"common.min.js","ocultarIcoError()")}},10)}function errorGenero(){"none"==__jquery(".ocultDepartamento").css("display")?__jquery(".datos-personales.genero").css("width","100%"):__jquery(".datos-personales.genero").css("width","49%")}function validaralfanumericoOlvidoClave(){__jquery(".alfanumOlvidoClave").keypress(function(){try{var e=window.event?event.keyCode:event.which;return 95!=e&&(0==e||8==e||/\w/.test(String.fromCharCode(e)))}catch(e){dispararExcepcion(e,"common.min.js","validarAlfanumericosFact()")}})}function aplicarPlaceholder(e,r){setTimeout(function(){__jquery(e).attr("placeholder",r)},2e3)}function aplicarPlaceholderCiudad(e,r){__jquery(e).attr("placeholder",r)}function tamanoAutocompletar(){var e;e=__jquery(".sin-lupa").length?46:25,__jquery(".contenedor-autocompletador").css("width",__jquery(".input-search").width()-e)}function resizeTamanoAutocompletar(){__jquery(window).resize(function(){var e;e=__jquery(".sin-lupa").length?46:25,__jquery(".contenedor-autocompletador").css("width",__jquery(".input-search").width()-e)})}function closeModal(e){return __jquery(e).fadeOut("slow"),!1}function replaceIDTrans(e){__jquery("input[id*='idTosearch']").val(e)}function validarNomPersonalizado(e){try{var r=window.event?e.keyCode:e.which;return r>=0&&r<=32||r>=35&&r<=37||r>=40&&r<=43||45==r||r>=47&&r<=57||61==r||63==r||r>=65&&r<=90||95==r||r>=97&&r<=122||193==r||201==r||205==r||211==r||218==r||225==r||233==r||237==r||243==r||250==r||130==r||191==r||209==r||241==r}catch(e){dispararExcepcion(e,"common.min.js","validarNomPersonalizado()")}}function validarAlfanumericInscripServicios(){__jquery(".inscAlfanumeric").keypress(function(){try{var e=window.event?event.keyCode:event.which;return 95!=e&&(0==e||8==e||/\w/.test(String.fromCharCode(e)))}catch(e){dispararExcepcion(e,"common.min.js","validarAlfanumericos()")}})}function validarDiasVencimiento(){try{__jquery("input[id*='msjDiasVenci']").click(function(){__jquery("input[id*='msjDiasVenci']").is(":checked")||__jquery(".errorDiasVenci").remove()})}catch(e){dispararExcepcion(e,"common.min.js","validarDiasVencimiento()")}}function aceptoCondiciones(){try{if(__jquery("input[id*='msjAceptoCondiciones']").length){var e=!0;if(__jquery('input[id*="valorPagoParcial"]').length?e=habilitarBotonPagar():__jquery(".msgRbObligatorio").length&&(e=validacionFlujoObligaciones()),!__jquery("input[id*='msjAceptoCondiciones']").is(":checked")&&e){var r=__jquery("input[id*='msgAceptoCondiciones']").val(),a=__jquery("input[id*='tituloAceptoCondiciones']").val(),i=__jquery("input[id*='widthAceptoCondiciones']").val(),t=__jquery("input[id*='heightAceptoCondiciones']").val();mostrarModal(i,t,a,r,"icon-alert","","","",""),e=!1}if(e){try{localStorage.banderaConvenios||(localStorage.banderaConvenios=!0)}catch(e){dispararExcepcion(e,"common.min.js","aceptoCondiciones()")}__jquery(".btnPagar").length>0&&__jquery(".cont-loading").removeClass("_hiden")}return e}try{localStorage.banderaConvenios||(localStorage.banderaConvenios=!0)}catch(e){dispararExcepcion(e,"common.min.js","aceptoCondiciones()")}return __jquery(".btnPagar").length>0&&__jquery(".cont-loading").removeClass("_hiden"),!0}catch(e){dispararExcepcion(e,"common.min.js","aceptoCondiciones()")}}function mostrarModal(e,r,a,i,t,o,n,c,l){""==t&&(t="icon-error");var s=PortalPagos.constants.MENSAJE_MODAL_CLIENTES;-1!==document.location.href.indexOf(PortalPagos.constants.CONTEX_BALOTO)&&(s=PortalPagos.constants.MENSAJE_MODAL_BALOTO),showLightbox(e,r,s+"/?tituloLightbox="+a+"&cuerpoLightbox="+i,"no","",t,o,n,c,l)}function hoverClassTable(){__jquery(".trInter").hover(function(){__jquery(this).prev(".contInter").addClass("hoverClass")},function(){__jquery(this).prev(".contInter").removeClass("hoverClass")})}function validarSoloNumerosOF(e){try{var r=window.event?e.keyCode:e.which;return 0==r||8==r||/\d/.test(String.fromCharCode(r))}catch(e){dispararExcepcion(e,"common.min.js","validarSoloNumerosOF()")}}function verificarReferenciaPagoOF(e,r,a,i){try{var t="."+r,o=__jquery(t).val(),n=__jquery(t="."+a).val(),c=__jquery(t="."+i),l=!1;"true"===__jquery("input[id*='existeConvenio']").val()&&""!=o&&""!=n?o===n?(c.removeAttr("disabled"),c.removeClass("btn-disabled"),mostrarMensaje(e,!1)):(mostrarMensaje(e,!0),l=!0):(mostrarMensaje(e,!1),l=!0),l&&(c.attr("disabled","disabled"),c.addClass("btn-disabled"))}catch(e){dispararExcepcion(e,"common.min.js","verificarReferenciaPagoOF()")}}function aplicarMapaCalor(){try{setTimeout(function(){var e=document.createElement("script"),r=document.getElementsByTagName("script")[0];e.src=document.location.protocol+"//dnn506yrbagrg.cloudfront.net/pages/scripts/0024/0375.js?"+Math.floor((new Date).getTime()/36e5),e.async=!0,e.type="text/javascript",r.parentNode.insertBefore(e,r)},1)}catch(e){dispararExcepcion(e,"common.min.js","aplicarMapaCalor()")}}function addHeightMenuDespliegue(){__jquery(".contInter").hover(function(){resizeMe()},function(){resizeMe()})}function habilitarBotonPagarCheckOF(e){__jquery(".msgRbObligatorio").html(""),mostrarMensaje("errorValorVacio",!1),mostrarMensaje("errorValorIncorrecto",!1),__jquery(".errorValidacion").length&&mostrarMensaje("errorValidacion",!1);try{var r="input:radio[name*="+e+"]",a=__jquery("input:radio[name*="+e+"]:checked"),i=a.val();__jquery("input[id*=hdtipoPago]").val(i);var t=__jquery("input.otroValorPagar"),o=__jquery("input.pagarOF"),n=__jquery(".col2.opcPago div span.pagoSelected");if(n.length&&n.removeClass("pagoSelected"),"OTRO"===i)t.removeAttr("disabled"),o.attr("disabled","disabled"),o.addClass("btn-disabled");else{t.val("0"),t.attr("disabled","disabled"),o.removeAttr("disabled"),o.removeClass("btn-disabled");var c=__jquery(r).index(a),l=__jquery(".col2.opcPago div");__jquery(l[c]).children("span").addClass("pagoSelected")}}catch(e){dispararExcepcion(e,"common.min.js","habilitarBotonPagarCheckOF()")}}function habilitarBotonPagarOF(){try{mostrarMensaje("errorValorIncorrecto",!1),mostrarMensaje("errorValorVacio",!1);var e,r,a,i,t=__jquery("input.otroValorPagar"),o=__jquery("input.pagarOF"),n=!1;if(e=__jquery("input[id*=hdValTotalPagar]").val(),null!=(r=t.val())&&""!=r&&"0"!=r)r=(r=r.replace(/\./g,"")).replace(/\,/g,"."),i=parseFloat(r),a=parseFloat(e),i>0&&i<=a/100*110?(n=!0,mostrarMensaje("errorValorIncorrecto",!1),mostrarMensaje("errorValorVacio",!1)):mostrarMensaje("errorValorIncorrecto",!0);else mostrarMensaje("errorValorVacio",!0);n?(o.removeAttr("disabled"),o.removeClass("btn-disabled")):(o.attr("disabled","disabled"),o.addClass("btn-disabled"))}catch(e){dispararExcepcion(e,"common.min.js","habilitarBotonPagarOF()")}}function formatNumberOF(e){__jquery(".errorValorVacio").length&&mostrarMensaje("errorValorVacio",!1),__jquery(".errorValorIncorrecto").length&&mostrarMensaje("errorValorIncorrecto",!1),__jquery(".errorValidacion").length&&mostrarMensaje("errorValidacion",!1);try{var r=e.value.replace(/\./g,"");if(!isNaN(r))return r=(r=r.toString().split("").reverse().join("").replace(/(?=\d*\.?)(\d{3})/g,"$1.")).split("").reverse().join("").replace(/^[\.]/,""),e.value=r,!0;e.value=e.value.replace(/[^\d\.]*/g,"")}catch(e){dispararExcepcion(e,"common.min.js","formatNumberOF()")}}function uncheckRadiosOF(e,r){try{__jquery("input:radio[name*="+e+"]").each(function(){__jquery(this).attr("checked",!1)}),habilitarBotonPagarCheckOF(r)}catch(e){dispararExcepcion(e,"common.min.js","uncheckRadiosOF()")}}function inicializarOF(){var e;(e=__jquery("input[id*='rdTipoConsultaTCP:3']")).length&&e.parent().addClass("lastRadio");(e=__jquery("input[id*='rdTipoConsultaTCP:2']")).length&&e.parent().addClass("nowrap");(e=__jquery("input[id*='rdTipoConsultaC:2']")).length&&e.parent().addClass("lastRadio");(e=__jquery("input[id*='rdTipoPago2:1']")).length&&e.parent().addClass("lastRadio")}function desplegableMiServicio(){__jquery(document).delegate(".ajaxDiv","click",function(e){var r=e.target.parentElement.id;console.log(e.target.parentElement),console.log(e.target.parentElement.dataset.estado),console.log("(desplegableMiServicio) El papa es: "+r),localStorage.setItem("papaClickeado",r);var a=__jquery(this);if(a.next().hasClass("visible"))a.next().css("display","none"),a.next().removeClass("visible"),a.parent().removeClass("activeDesplegable"),__jquery(".btnEliminarServiAlerta").css("pointer-events","initial"),console.log("Entra a la primera parte"),a.children("input").css("pointer-events","");else{var i=__jquery(".visible"),t=a.prev().attr("id");document.getElementById(t).click(),i.length&&(console.log("Entra a la segunda parte"),i.parent().removeClass("activeDesplegable"),i.parent().find(".ajaxDiv").children("input").css("pointer-events",""),i.css("display","none"),i.removeClass("visible")),console.log("Entra a la tercera parte y continua"),2!=e.target.parentElement.dataset.estado&&(__jquery(".btnEliminarServiAlerta").css("pointer-events","initial"),e.target.parentElement.id===r&&a.children("input").css("pointer-events","none"),a.next().css("display","block"),a.next().addClass("visible"),a.parent().addClass("activeDesplegable"))}resizeMe()})}function funcionesTableService(){__jquery(".tableWithForm tr td").each(function(e,r){__jquery(r).addClass("trPrincipal")}),__jquery(".cbTermsConditions td").each(function(e,r){__jquery(r).removeClass("trPrincipal")}),__jquery("table.tableWithForm thead").hide(),__jquery(".tableWithForm tr").each(function(e,r){__jquery(r).attr("id","trP_"&e)}),resizeMe()}function estilosTablaWhithFormSelect(){__jquery(".dataTables_length select").change(function(){funcionesTableService()})}function estilosTablaWhithForm(){__jquery(document).delegate(".paginate_button","click",function(){funcionesTableService()})}function obtenerIdEliminarConvenio(e,r,a){try{__jquery("input[id*='idConvenioSeleccionado']").val(e),__jquery("input[id*='NIESeleccionado']").val(r),__jquery(".nomServPersonalizado").text(a)}catch(e){dispararExcepcion(e,"common.min.js","obtenerIdEliminarConvenio()")}}function validarNomPersonalizadoModificar(e){try{var r=window.event?e.keyCode:e.which;return __jquery("html").hasClass("mobile")&&(e.target.value=e.target.value.replace(/[^A-Za-z0-9_#$%+=*ï¿?\-\/\(\)\s]/g,"")),r>=0&&r<=32||r>=35&&r<=37||r>=40&&r<=43||45==r||r>=47&&r<=57||61==r||63==r||r>=65&&r<=90||95==r||r>=97&&r<=122||193==r||201==r||205==r||211==r||218==r||225==r||233==r||237==r||243==r||250==r||130==r||191==r||209==r||241==r}catch(e){dispararExcepcion(e,"common.min.js","validarNomPersonalizadoModificar()")}}function obtenerDatosConvenio(e){try{if("nombrePersonalizado"==e.target.classList[0])return __jquery("input[id*='nombreConvenioSeleccionado']").val(e.target.value),validarNombreServiciosInscritos(e);if("selectVencimiento"==e.target.classList[0]&&__jquery("input[id*='diasConvenioSeleccionado']").val(e.target.value),"checkboxServicio"==e.target.classList[0]){var r=__jquery(e.target).is(":checked");__jquery("input[id*='checkConvenioSeleccionado']").val(r)}}catch(e){dispararExcepcion(e,"common.min.js","obtenerDatosConvenio()")}}function mantenerServModificado(e){try{try{localStorage.servicio=".contenedor"+e}catch(e){dispararExcepcion(e,"common.min.js","mantenerServModificado()")}}catch(e){dispararExcepcion(e,"common.min.js","mantenerServModificado()")}}function desplegarServicio(){try{__jquery("cont-form-table").css("display","none"),__jquery("cont-form-table").removeClass("visible"),__jquery("cont-form-table").parent().removeClass("activeDesplegable");var e=localStorage.servicio;__jquery(e).css("display","block"),__jquery(e).addClass("visible"),__jquery(e).parent().addClass("activeDesplegable"),localStorage.removeItem("servicio")}catch(e){dispararExcepcion(e,"common.min.js","desplegarServicio()")}}function validarNombreServiciosInscritos(e){try{return validarNomPersonalizadoModificar(e),expr=/^[^-+]([A-Z-ñÑáéíóúa-z-0-9#*¿?-_$\/+%=() ])*$/,!!expr.test(e.target.value)}catch(e){dispararExcepcion(e,"common.min.js","validarNombreServiciosInscritos()")}}function mostrarLightBox(){try{var e=__jquery("input[id*='mostrarLightbox']").val();if(tituloLightbox=__jquery("input[id*='tituloLightbox']").val(),cuerpoLightbox=__jquery("input[id*='cuerpoLightbox']").val(),widthLightbox=__jquery("input[id*='widhtLightbox']").val(),heightLightbox=__jquery("input[id*='heightLightbox']").val(),tipoError=__jquery("input[id*='tipoModal']").val(),"true"==e){var r=PortalPagos.constants.MENSAJE_MODAL_CLIENTES;-1!==document.location.href.indexOf(PortalPagos.constants.CONTEX_BALOTO)&&(r=PortalPagos.constants.MENSAJE_MODAL_BALOTO),showLightbox(widthLightbox,heightLightbox,r+"?tituloLightbox="+tituloLightbox+"&cuerpoLightbox="+cuerpoLightbox,"no","",tipoError,"","","","")}}catch(e){dispararExcepcion(e,"common.min.js","mostrarLightBox()")}}function esconderCategorias(){__jquery(".col-info-category").each(function(e,r){e>=4&&__jquery(r).hide()})}function cambiarFlechaVerMas(){__jquery(".btn-VerMas").click(function(){masServicios?(__jquery(this).find(".icon-agregar").addClass("icon-remover"),__jquery(this).find(".icon-remover").removeClass("icon-agregar"),masServicios=!1,__jquery(".col-info-category").each(function(e,r){__jquery(r).show()})):(esconderCategorias(),__jquery(this).find(".icon-remover").addClass("icon-agregar"),__jquery(this).find(".icon-agregar").removeClass("icon-remover"),masServicios=!0),resizeMe()})}function esconderBtn(){__jquery(".col-info-category").length<4&&__jquery(".btn-VerMas").hide()}function cerrarSesionCambio(){try{var e=__jquery('input[id*="url-logout"]'),r=__jquery('input[id*="url-no-logout"]'),a=__jquery('input[id*="url-logout-cliente"]'),i=__jquery('input[id*="url-no-logout-cliente"]'),t=__jquery('input[id*="msjCerrarSesion"]').val();if(0