1function textoMaximo(campo,valor,faltan) { 2 var campo_texto=document.getElementById(campo); 3 var quedan=document.getElementById(faltan); 4 valor_limit=valor-1; 5 if (campo_texto.value.length > valor) { 6 alert('Máximo '+valor+' caracteres'); 7 campo_texto.value = campo_texto.value.substring(0,valor_limit); 8 } 9 quedan.innerHTML=160-campo_texto.value.length; 10} 11 12 13 14 15 16function confirmarEnvioForm(mensaje,nombre_formulario) { 17 if ( confirm(mensaje) ) { 18 var formulario=document.getElementById(nombre_formulario); 19 formulario.submit(); 20 } 21 else { 22 return false; 23 } 24} 25 26 27function setInputValue(campo,valor) { 28 var input=document.getElementById(campo); 29 if (input) { 30 input.value=valor; 31 } 32 else { 33 return false; 34 } 35} 36 37 38function irA(destino) { 39 if (destino!='') { 40 self.location =destino; 41 } 42} 43 44 45 46function mostrarCapa(id) { 47 document.getElementById(id).style.display = ''; 48} 49 50function ocultarCapa(id) { 51 document.getElementById(id).style.display = 'none'; 52} 53 54function mostrarOcultarCapa(id) { 55 if (document.getElementById(id).style.display == '') 56 document.getElementById(id).style.display = 'none'; 57 else 58 document.getElementById(id).style.display = ''; 59} 60 61 62function confirma(mensaje,destino) { 63 if ( confirm(mensaje) ) { 64 self.location =destino; 65 } 66} 67 68function borrarInput(id) { 69 document.getElementById(id).value=''; 70} 71 72 73 74/* 75 Funcion que borra el elemento seleccionado de un select 76 Argumento[0] Select 77*/ 78function borrarDeSelect(selectDe) { 79 if (document.getElementById(selectDe).selectedIndex!=-1) { 80 document.getElementById(selectDe).options[document.getElementById(selectDe).selectedIndex]=null; 81 } 82} 83 84/**** 85 Muestra o oculta un span o div con ID. 86 Solo para IE. Respeta el texto. Tablas completas. 87*****/ 88 89 90 function cambiafondo(obj) 91 { obj.bgColor = '#DC9102'; } 92 function restaurafondo(obj, color) 93 { obj.bgColor = ''; } 94 95 96 97function hideAll() { 98 hideData('submenu01'); 99 hideData('submenu02'); 100 hideData('submenu03'); 101 hideData('submenu04'); 102 hideData('submenu05'); 103 hideData('submenu06'); 104 105 cambiarFondo('pestana01','#425E14'); 106 cambiarColorFuente('link_pestana01','#FFFFFF'); 107 108 cambiarFondo('pestana02','#425E14'); 109 cambiarColorFuente('link_pestana02','#FFFFFF'); 110 111 cambiarFondo('pestana03','#425E14'); 112 cambiarColorFuente('link_pestana03','#FFFFFF'); 113 114 cambiarFondo('pestana04','#425E14'); 115 cambiarColorFuente('link_pestana04','#FFFFFF'); 116 117 cambiarFondo('pestana05','#425E14'); 118 cambiarColorFuente('link_pestana05','#FFFFFF'); 119 120 cambiarFondo('pestana06','#425E14'); 121 cambiarColorFuente('link_pestana06','#FFFFFF'); 122} 123 124 125 126/* 127muestras el texto en las capas ocultas 128*/ 129 130function cambiarFondo(nombreCapa,color) 131{ 132document.getElementById(nombreCapa).style.background=color; 133} 134 135function cambiarColorFuente(nombreCapa,color) 136{ 137 document.getElementById(nombreCapa).style.color=color; 138 document.getElementById(nombreCapa).style.textDecoration='underline'; 139} 140 141function subrayar(nombreCapa) 142{ 143 document.getElementById(nombreCapa).style.textDecoration='underline'; 144} 145 146 147function mostrar(nombreCapa) 148{ 149 document.getElementById(nombreCapa).style.visibility="visible"; 150} 151function ocultar(nombreCapa) 152{ 153 document.getElementById(nombreCapa).style.visibility="hidden"; 154} 155 156function showHideData(id) { 157 if (document.getElementById(id).style.display == '') 158 document.getElementById(id).style.display = 'none' 159 else 160 document.getElementById(id).style.display = ''; 161} 162 163function showData(id) { 164 document.getElementById(id).style.display = ''; 165} 166 167function hideData(id) { 168 document.getElementById(id).style.display = 'none'; 169} 170 171 172function openWinClean(fichero,nombre,tam) { 173 ventana=window.open(fichero,nombre,tam+",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes"); 174 return ventana; 175} 176function openWinScroll(fichero,nombre,tam) { 177 ventana=window.open(fichero,nombre,tam+",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars,resizable=no,copyhistory=ye
177s"); 178 return ventana; 179} 180 181function openWin(fichero,nombre,tam) { 182 ventana=window.open(fichero,nombre,tam+",toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes"); 183 return ventana; 184} 185 186 187function esVacio(campo) 188{ return ((campo == null) || (campo.length == 0)) 189} 190 191//Campo vacio o lleno de espacios 192function esBlanco(campo) 193{ 194 var cadena = new String(campo.value); 195 if(esVacio(campo)) 196 return true; 197 else 198 for (var i=0;i<cadena.length;i++) 199 if (cadena.charAt(i)!=" ") return false; 200 return true; 201} 202 203 204function cargaGaleria() { 205 if(document.getElementById("galeriaID").value==0) { 206 window.location.href = "index.php?s=galeria&id=1"; 207 } else { 208 window.location.href = "index.php?s=galeria&id="+document.getElementById("galeriaID").value; 209 } 210} 211 212 213 214 215function muestra_menu(id) { 216 217 if (document.getElementById) { 218 menu = document.getElementById(id); 219 menu.className="on"; 220 } 221 222} 223
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.