1 2function muestraFacturacion(muestra){ 3 //muestra || ( muestra = -1 ); 4 if (muestra == -1){ 5 //alert('1') 6 if (document.getElementById('div_datos_facturacion').style.display == 'none') 7 document.getElementById('div_datos_facturacion').style.display = 'block'; 8 else 9 document.getElementById('div_datos_facturacion').style.display = 'none'; 10 } else if (muestra == 1) document.getElementById('div_datos_facturacion').style.display = 'block'; 11 else document.getElementById('div_datos_facturacion').style.display = 'none'; 12 13} 14 15function muestraInscripcion(){ 16 document.getElementById('div_contenido_inscripcion').style.display = 'block'; 17} 18 19function muestraColetillaEmpresa(){ 20 document.getElementById('fac_emp').style.display = 'block'; 21 document.getElementById('fac_insc').style.display = 'none'; 22} 23 24function muestraColetillaInscrito(){ 25 document.getElementById('fac_emp').style.display = 'none'; 26 document.getElementById('fac_insc').style.display = 'block'; 27} 28 29function borraFacturacion(){ 30 document.getElementById('i_empresa_nombre').value = ''; 31 document.getElementById('i_empresa_cif').value = ''; 32 document.getElementById('i_empresa_direccion').value = ''; 33 document.getElementById('i_empresa_localidad').value = ''; 34 document.getElementById('i_empresa_cp').value = ''; 35 document.getElementById('i_empresa_provincia').value = ''; 36 document.getElementById('i_empresa_telefono').value = ''; 37 document.getElementById('i_empresa_email').value = ''; 38 document.getElementById('i_empresa_contacto').value = ''; 39 document.getElementById('i_empresa_observaciones').value = ''; 40 41} 42 43function copiaFacturacion(){ 44 document.getElementById('i_empresa_nombre').value = document.getElementById('i_nombre').value+' '+document.getElementById('i_apellidos').value; 45 document.getElementById('i_empresa_cif').value = document.getElementById('i_dni').value; 46 document.getElementById('i_empresa_direccion').value = document.getElementById('i_direccion').value; 47 document.getElementById('i_empresa_localidad').value = document.getElementById('i_localidad').value; 48 document.getElementById('i_empresa_cp').value = document.getElementById('i_cp').value; 49 document.getElementById('i_empresa_provincia').value = document.getElementById('i_provincia').value; 50 document.getElementById('i_empresa_telefono').value = document.getElementById('i_telefono').value; 51 document.getElementById('i_empresa_email').value = document.getElementById('i_email').value; 52 document.getElementById('i_empresa_contacto').value = ''; 53} 54 55function compruebaDatos(){ 56 /*Cuota marcada*/ 57 conCuota = false; 58 jQuery(".es_cuota").each(function(){ 59 conCuota = (conCuota || jQuery(this).prop('checked')) //Uno marcado cumplirá los requisitos de cuota 60 }); 61 /*Hotel marcado*/ 62 conHotel = false; 63 jQuery("sl-checkbox[name^=i_hotel]").each(function(){ 64 conHotel = (conHotel || jQuery(this).prop('checked')); 65 }); 66 /*Dependencias satisfechas*/ 67 conDependencias = true; 68 jQuery('sl-checkbox[name^="i_cuota"]').each(function(){ 69 if (jQuery(this).prop('checked')){ 70 //alert(jQuery(this).prop('name')) 71 var auxDependencia = false; 72 var i = 0; 73 jQuery(".dependencia_"+jQuery(this).val()).each(function(){ 74 //alert(jQuery(this).prop('name')) 75 auxDependencia = (auxDependencia || jQuery(this).prop('checked')); //Uno marcado cumplirá las dependencias 76 i++; 77 }) 78 if (i>0){ 79 conDependencias = (conDependencias && auxDependencia); //se ha de cumplir todas las dependencias; 80 } 81 } 82 }); 83 /*Grupos de cutas requeridos, al menos una cuota de ese grupo debe de estar marcada*/ 84 var requerido = true; 85 jQuery(".requerido").each(function(){ 86 //var clave = jQuery(this).val().split("-"); 87 var grupo = jQuery(this).val().split("-")[0]; 88 var auxRequerido = false; 89 jQuery(".grupo_requerido_"+grupo).each(function(){ 90 auxRequerido = (auxRequerido || jQuery(this).prop('checked')) //Uno marcado cumplirá los requisitos 91 }) 92 requerido = (requerido && auxRequerido); //se ha de cumplir todos los grupos requeridos; 93 }); 94 95 if (!requerido){ 96 alert('Debe marcar una opción dentro de los grupos requeridos') 97 return false;
98 } 99 100 if (!conDependencias){ 101 alert('Debe marcar una opción dentro de la cuota') 102 return false; 103 } 104 105 if ((conCuota == false)&&(conHotel == false)) { 106 alert('Debe seleccionar al menos una cuota de inscripcion o el alojamiento') 107 return false; 108 } 109 110 if (conHotel){ 111 if ((jQuery("[name=h_entrada]").val()==0)||(jQuery("[name=h_salida]").val()==0)){ 112 alert('Debe seleccionar fechas de entrada y salida') 113 return false; 114 } 115 } 116 117 if ((jQuery("[name=h_entrada]").val() !=0)&&(jQuery("[name=h_salida]").val()!=0)){ 118 if ((parseInt(jQuery("[name=h_entrada]").val()))>=(parseInt(jQuery("[name=h_salida]").val()))){ 119 alert('La fecha de entrada no puede ser igual o superior a la de salida') 120 return false; 121 } 122 if (conHotel == false) { 123 alert('Debe seleccionar el tipo de habitacion') 124 return false; 125 } 126 } 127 128 var obligatorios = ["i_nombre","i_apellidos","i_dni","i_direccion","i_localidad","i_cp","i_provincia","i_telefono","i_email"]; 129 if (document.getElementById('div_datos_facturacion').style.display != 'none'){ 130 obligatorios.concat(["i_empresa_nombre","i_empresa_cif","i_empresa_direccion","i_empresa_localidad","i_empresa_cp","i_empresa_provincia","i_empresa_email","i_empresa_contacto"]); 131 } 132 for (var i = 0; i < obligatorios.length; i++) { 133 if (document.getElementById(obligatorios[i]).value==''){ 134 alert('El campo '+obligatorios[i].substr(2)+' debe tener valor'); 135 return false; 136 } 137 } 138 if (((jQuery('#i_especialidad').val() == '10')||(jQuery('#i_especialidad').val() == '16')||(jQuery('#i_especialidad').val() == '23')||(jQuery('#i_especialidad').val() == '31'))&&(jQuery('#i_especialidad').val() == '')){ 139 alert('Debe indicar la especialidad'); 140 return false; 141 } 142 143} 144 145function habilita_especialidad(id){ 146 document.getElementById('i_especialidad_otros').disabled = ((id!="10")&&(id!="16")&&(id!="23")&&(id!="31")); 147} 148 149function habilita_cursos(){ 150 document.getElementById('curso').disabled = !document.getElementById('i_curso').checked; 151} 152 153function habilita_msp_medicos(){ 154 var resultado="ninguno"; 155 156 var porNombre=document.getElementsByName("i_cuota"); 157 // Recorremos todos los valores del radio button para encontrar el 158 // seleccionado 159 for(var i=0;i<porNombre.length;i++) 160 { 161 if(porNombre[i].checked) 162 resultado=porNombre[i].value; 163 } 164 document.getElementById('msp_medicos').disabled = !(resultado == 12); 165} 166 167function habilita_msp_enfermeria(){ 168 var resultado="ninguno"; 169 170 var porNombre=document.getElementsByName("i_cuota"); 171 // Recorremos todos los valores del radio button para encontrar el 172 // seleccionado 173 for(var i=0;i<porNombre.length;i++) 174 { 175 if(porNombre[i].checked) 176 resultado=porNombre[i].value; 177 } 178 document.getElementById('msp_enfermeria').disabled = !(resultado == 14); 179} 180 181function habilita_envio_insc(){ 182 //document.getElementById('btn_enviar').disabled = !document.getElementById('acepta').checked; 183 if ((jQuery('#acepta').is(':checked'))&&(jQuery('#acepta_pol').is(':checked'))){ 184 jQuery('#btn_enviar').css('background','#1e70bf'); 185 jQuery('#btn_enviar').attr("disabled", false); 186 } else{ 187 jQuery('#btn_enviar').css('background','darkgrey'); 188 jQuery('#btn_enviar').attr("disabled", true); 189 } 190}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.