1var browser = navigator.userAgent; 2browser = browser.toLowerCase(); 3browser = browser.split('/'); 4var version = browser[1].split('.') 5 6 7// ******************************* 8// Inicializa el comportamiento dinámico de los menús desplegables 9// ******************************* 10function initmenu() { 11 var menu = document.getElementById('menu'); 12 var lis = menu.getElementsByTagName('li'); 13 var uls = menu.getElementsByTagName('ul'); 14 15 for ( var i=0; i<lis.length; i++) { 16 var ul = lis.item(i).getElementsByTagName('ul'); 17 18 if ( ul.item(0) ){ 19 /* para IExplorer y Opera6 */ 20 if ( document.all && browser[0]!='opera' || browser[0]=='opera' && version[0]<7 ){ 21 lis.item(i).onmouseover = visible; 22 lis.item(i).onmouseout = hidden; 23 lis.item(i).onkeyup = visible; 24 } 25 else if( document.getElementById ){ 26 lis.item(i).addEventListener("mouseover",visible,true); 27 lis.item(i).addEventListener("mouseout",hidden,true); 28 lis.item(i).addEventListener("blur",hidden,true); 29 lis.item(i).addEventListener("focus",visible,true); 30 } 31 } 32 } 33 } 34 35 36// ******************************* 37// Necesario para initmenu(). Oculta div's correspondientes a cada opción del menú 38// ******************************* 39function hidden(){ 40 var ul = this.getElementsByTagName('ul'); 41 ul.item(0).style.visibility = "hidden"; 42 43 if (( document.all && browser[0]!='opera' ) || (browser[0]=='opera' && version[0]<7 )) { 44 var mm = ul.item(0); 45 var ii = document.getElementById('iframe'); 46 ii.style.display="none"; 47 } 48} 49 50 51// ******************************* 52// Necesario para initmenu(). Muestra div's correspondientes a cada opción del menú 53// ******************************* 54function visible(){ 55 var ul = this.getElementsByTagName('ul'); 56 ul.item(0).style.visibility = "visible"; 57 58 /* Para IExplorer y Opera6 */ 59 if (( document.all && browser[0]!='opera' ) || (browser[0]=='opera' && version[0]<7 )) { 60 var mm = ul.item(0); 61 var ii = document.getElementById('iframe'); 62 ii.style.width = mm.offsetWidth; 63 ii.style.height = mm.offsetHeight; 64 ii.style.left = mm.offsetLeft; 65 ii.style.top = mm.offsetTop; 66 ii.style.display="block"; 67 } 68} 69 70 71// ******************************* 72// Obtiene la altura de un <div> especificado por su id 73// ******************************* 74function get_div_altura (id) { 75 var altura = 0; 76 if (document.getElementById(id)) { 77 var altura = document.getElementById(id).offsetHeight; 78 } 79 return altura; 80} 81 82 83// ******************************* 84// Para abrir pequeñas ventanas 85// ******************************* 86var miventana; 87 function abrewin(url) { 88 if (navigator.appName == 'Netscape') 89 miventana = window.open('','ventana','toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,height=350,width=600,screenX=10,screenY=10'); 90 else { 91 miventana = window.open('','ventana','toolbar=no,menubar=no,scrollbars=yes,resizable=yes,left=10,top=10'); 92 miventana.focus(); 93 miventana.resizeTo(600, 350); 94 } 95 96 miventana.focus(); 97 if (navigator.appName == 'Netscape') 98 miventana = window.open(url,'ventana','toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,height=350,width=600,screenX=10,screenY=10'); 99 else { 100 miventana = window.open(url,'ventana','toolbar=no,menubar=no,scrollbars=yes,resizable=yes,left=10,top=10'); 101 } 102 //return true; 103 } 104 105// **************************************************************************************************** 106// Para abrir ventanas centradas en el centro de la pantalla y de un tamaño especificado por el usuario 107// **************************************************************************************************** 108 109function NewWindow(url, myname, w, h) { 110 var winl = (screen.width - w) / 2; 111 var wint = (screen.height - h) / 2; 112 /*Location 113 (barra direcciones) 114 Menubar 115 (barra de menús) 116 Status 117 (barra de estado) 118 Titlebar 119 (la barra del título) 120 Toolbar 121 (barra de herramientas)*/ 122 opciones = ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,titlebar=no"; 123 winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+opciones; 124 win = window.open(url, myname, winprops) 125 if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); } 126} 127 128// ******************************* 129// Para ventana al clic en imagen 130// Ejemplo de uso: <img src="foto_1_ico.jpg" onclick="abreimg('foto_1_pie.jpg','248','390','Foto1','10','10');return false;" title="Haga clic en la imagen para verla maximizada. Foto1" alt="Haga clic en la imagen para verla maximizada. Foto1" /> 131// ******************************* 132 133function abreimg(imageName,imageWidth,imageHeight,title,posLeft,posTop) { 134 newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",left="+posLeft+",to
134p="+posTop); 135 newWindow.document.open(); 136 newWindow.document.write('<html><title>'+title+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 137 newWindow.document.write('<img src='+imageName+' width='+imageWidth+' height='+imageHeight+' title='+title+' />'); 138 newWindow.document.write('</body></html>'); 139 newWindow.document.close(); 140 newWindow.focus(); 141} 142 143function MOSTRAR_BLOQUE(nameDiv) 144{ 145// alert("viendo "+nameDiv +" --> "+document.getElementById(nameDiv).style.display); 146 147//if (nameDiv =="info_area1_6") 148 //alert (nameDiv +".STYLE.DISPLAY: "+document.getElementById(nameDiv).style.display); 149 if (document.getElementById(nameDiv).style.display != "block" || document.getElementById(nameDiv).style.display == "") { // No funcionaba =="none", tras asignar "display:none" al estilo general "Listados" 150 document.getElementById(nameDiv).style.display="block" 151 } 152 else if (document.getElementById(nameDiv).style.display=="block") {// Si el bloque es visible, lo ocultamos 153 document.getElementById(nameDiv).style.display="none" 154 } 155 // Detiene la propagación del evento en bloques de jerarquía superior 156} 157//------------------------------------------------------ 158function CAMBIAR_ESTILO(NombreDiv,EstiloInicial,EstiloFinal) 159// Anadida 12/11/2012: Uso genérico para cambiar el estilo de cualquier DIV definido en el documento actual. 160// Usada en 'Utilidades Aytos. para mostrar/ocultar DIV's de información adicional (con estilos replegado/desplegado) 161{ 162 if (document.getElementById(NombreDiv).className == EstiloInicial) { 163 document.getElementById(NombreDiv).className = EstiloFinal; 164 } 165 else { 166 document.getElementById(NombreDiv).className = EstiloInicial; 167 } 168} 169 170// -------------------------------- Activa un estilo declarado como alternativo -------- 171function ACTIVAR_ESTILO_ALTERNATIVO(NombreEstilo) 172{ 173 var C, Enlace; 174 for (C=0; (Enlace = document.getElementsByTagName("link")[C]); C++) 175 { 176 if(Enlace.getAttribute("rel").indexOf("style") != -1 && Enlace.getAttribute("title")) 177 { 178 Enlace.disabled = true; 179 if (Enlace.getAttribute("title") == NombreEstilo) Enlace.disabled = false; 180 } 181 } 182}
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.