//Javascript

function opf(url_imagen,titulo,ancho,alto){

 	var img = new Image();

 	img.src = url_imagen;
	win=window.open('','','width='+ancho+',height='+alto+',scrollbars=no,resizable=1,toolbar=0');
	win.document.write ('<html>\n');
	win.document.write (' <head>\n');
	win.document.write ('  <title>'+titulo+'</title>\n');
	win.document.write (' </head>\n');
	win.document.write (' <body onclick="return window.close();" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">\n');
	win.document.write ('  <img src="' + url_imagen + '" />\n');
	win.document.write (' </body>\n');
	win.document.write ('</html>\n');
	
}

function nuevoAjax(){
	var xmlhttp=false; 
	try { 
		// Creación del objeto ajax para navegadores diferentes a Explorer 
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); 
	} catch (e) { 
		// o bien 
		try { 
			// Creación del objet ajax para Explorer 
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { 
			xmlhttp = false; 
		} 
	} 

	if (!xmlhttp && typeof XMLHttpRequest!='undefined') { 
		xmlhttp = new XMLHttpRequest(); 
	}
	
	return xmlhttp; 
}





/*Aqui el menu contractil!!*/
function ocultaItems(id){
  listado = document.getElementById('listaMenu')
  contenedores = listado.getElementsByTagName('strong')
  contenedores1 = listado.getElementsByTagName('ul')
  numContenedores = contenedores.length

  for(m=0; m < numContenedores; m++){
	  elemento = contenedores[m].parentNode.getElementsByTagName('ul')[0]
	  
	  if(contenedores[m].parentNode.getAttribute('id')==id) continue;
	  
	  elemento.style.display = elemento.style.display == 'none' ? 'block' : 'none'
  }
}

function Menu(el){
   elemento = el.parentNode.getElementsByTagName('ul')[0]
   elemento.style.display = elemento.style.display == 'none' ? 'block' : 'none'
}

