// JavaScript Document



//	Colors del menu
var tdColor="#000000";		// color del texto de los elementos del menu
var tdBgColor="#BBDDFF";	// color de fondo de los elementos del menu
var hlColor="BBDDFF";		// color texto cuando puntero encima
var hlBgColor="#000000";	// color fondo cuando punetor encima


// Definicio del menu



//1  BENVINGUDA
td_1 ="BIENVENIDOS"
url_1 = "0index.php"
	
	td_1_1 ="QUIEN SOMOS?"
	url_1_1 = "0somos.php"
	td_1_2 = "PATROCINADORES"
	url_1_2 = "0patrocinadores.php"
	td_1_3 = "INICIO"
	url_1_3 = "0index.php"
	// td_1_2 = "ON ESTEM"
	// url_1_2 = "donde.php"
	// td_1_4 = "MIEMBROS ONG's"
	// url_1_4 = "asociaciones.php"
	// td_1_5 = "DISTRIBUIDORES"
	// url_1_5 = "distribuidores.php"
	// td_1_6 = "ECODEPUR"
	// url_1_6 = "ecodepur.php"
	// td_1_7 = "COLABORADORES"
	// url_1_7 = "colaboradores.php"
	// td_1_8 ="CONFIDENCIALIDAD"
	// url_1_8 = "confidencial.php"
	// td_1_9 ="INICIO"
	// url_1_9 = "index.php"
	
//2  ON ESTEM
td_2 ="DONDE ESTAMOS"
url_2 = "0donde.php"
	td_2_1 ="DONDE ESTAMOS"
	url_2_1 = "0donde.php"
	td_2_2 = "CONTACTAR"
	url_2_2 = "0contactar.php"
	// 	td_2_2_1 ="INFORMACIÓN"
	// 	url_2_2_1 ="info_beber.php"
	// td_2_2_2 ="OSMOSIS"
	// 	url_2_2_2 ="osmosis.php"
	// 	td_2_2_3 ="DESTILADORES"
	// 	url_2_2_3 ="destiladores.php"
	// 	td_2_2_4 ="CARBÓN (DECLORADORES)"
	// 	url_2_2_4 ="carbon.php"
		
	// td_2_3 = "CAL EN CASA"
	// url_2_3 = "info_cal.php"
	// 	td_2_3_1 ="INFORMACIÓN"
	// 	url_2_3_1 ="info_cal.php"
	// 	td_2_3_2 ="DESCALCIFICADORES"
	// 	url_2_3_2 ="descalcificadores.php"
	// 	td_2_3_2_1 ="INSTALACIÓN"
	// 	url_2_3_2_1 = "des_ins.php"
	// 	td_2_3_3 ="ANTIINCRUSTANTES"
	// 	url_2_3_3 ="antiincrustantes.php"
	
	// td_2_4 =" EN LA DUCHA"
	// url_2_4 ="ducha.php"
	
	
	//3  ACTIVITASTS
	td_3 ="ACTIVIDADES"
	url_3 = "0info_aula.php"
		td_3_1 ="INFORMACION"
		url_3_1 = "0info_aula.php"
		td_3_2 = "PROGRAMACION"
		url_3_2 = "0programacio_aula.php"
		td_3_3 = "OTROS CURSOS"
		url_3_3 = "0otros_cursos.php"
		// td_3_3 = "DUCHAS"
		// url_3_3 = "duchas.php"
		// td_3_4 = "CISTERNAS"
	// 	url_3_4 = "cisternas.php"
	// 	td_3_5 = "JARDINERAS"
	// 	url_3_5 = "jardineras.php"
	// 	td_3_6 = "CONTROL FUGAS"
	// 	url_3_6 = "fugas.php"
		
		
	//4  SERVICIOS
		td_4 = "SERVICIOS"
		url_4 = "0serveis.php"
		  td_4_1 = "FORMACION A MEDIDA"
		  url_4_1 = "0formacion_medida.php"
		  td_4_2 = "CENTRO DOCUMENTACION"
		  url_4_2 = "0centro_doc.php"
		  td_4_3 = "ARTÍCULOS Y VÍDEOS"
		  url_4_3 = "0articulos.php"
		
	//5  ENLLAÇOS
	td_5 ="LUGARES DE INTERES"
	url_5 = "0enlaces.php"
	// 	td_4_1 ="INFORMACIÓN"
	// 	url_4_1 = "info_aprov.php"
	// 	td_4_2 = "LLUVIA"
	// 	url_4_2 = "lluvia.php"
	// 	td_4_3 = "GRISES"
	// 	url_4_3 = "grises.php"
	// 	td_4_4 = "RESIDUALES"
	// 	url_4_4 = "residuales.php"


	//5 serveis
	// td_5 ="SERVICIOS"
	// url_5 = "servicios.php"
	// 	td_5_1 ="ANÁLISIS"
	// 	url_5_1 = "info_analisis.php"
	// 		td_5_1_1 ="INFORMACIÓN"
	// 		url_5_1_1 ="info_analisis.php"
	// 		td_5_1_2 ="ANÁLISIS"
	// 		url_5_1_2 ="analisis.php"
	// 		td_5_1_3 ="KITS DE ANÁLISIS"
	// 		url_5_1_3 ="kits.php"
	// 	td_5_2 = "AUDITORIA"
	// 	url_5_2 = "auditoria.php"
	// 	td_5_3 = "SERVICIO TÉCNICO"
	// 	url_5_3 = "servicio.php"
	// 	td_5_4 = "MANTENIMIENTO"
	// 	url_5_4 = "mantenimiento.php"
	// 	td_5_5 = "PROYECTOS"
	// 	url_5_5 = "proyectos.php"
	// 	td_5_6 = "FORMACIÓN"
	// 	url_5_6 = "formacion.php"

		
	//6  cultura
	// td_6 ="CULTURA"
	// url_6 = "cultura.php"
	// 	td_6_1 ="L'AULA DE L'AIGUA"
	// 	url_6_1 = "info_aula.php"
	// 	td_6_1_1 ="INFORMACIÓN"
	// 	url_6_1_1 ="info_aula.php"
	// 	td_6_1_2 ="PROGRAMACIÓN"
// 		url_6_1_2 ="programacio_aula.php"
// 		td_6_2 = "OTROS CURSOS"
// 		url_6_2 = "otros_cursos.php"
// 		td_6_3 = "CENTRO DOCUMENT."
// 		url_6_3 = "centro_doc.php"
// 		td_6_4 = "LIBROS"
// 		url_6_4 = "libros.php"
		//td_6_5 = "PRENSA"
		//url_6_5 = "prensa.php"
// 	td_6_6 = "ENLACES"
// 	url_6_6 = "enlaces.php"
// 		//td_6_7 = "EVENTOS"
// 		//url_6_7 = "eventos.php"
// 		td_6_5 = "AMIGOS DEL AGUA"
// 		url_6_5 = "amigos.php"
		
		
//6  h2o point
td_6 ="LIBROS"
url_6 = "0libros.php"


td_7 ="  . . . . . . . . . . . . . . "
//url_7 = "index.php"

		
		
var md=250;
var ti=-1;
var oTd=new Object;
oTd=null;

function doMenu(td){
	clearTimeout(ti);
	td.style.backgroundColor=hlBgColor;
	td.style.color=hlColor;
	var i;
	var sT="";
	var tda=new Array();
	tda=td.id.split("_");
	if(oTd!=null){
		var tdo=new Array();
		tdo=oTd.id.split("_");
		for(i=1;i<tdo.length;i++){
			sT+="_"+tdo[i];
			if(tdo[i]!=tda[i]){
				document.getElementById("td"+sT).style.backgroundColor=tdBgColor;
				document.getElementById("td"+sT).style.color=tdColor;
				if(document.getElementById("tbl"+sT)!=null)
					document.getElementById("tbl"+sT).style.visibility="hidden";
			}
		}			
	}
	oTd=td;
	sT="tbl";
	for(i=1;i<tda.length;i++)
		sT+="_"+tda[i];
	if(document.getElementById(sT)!=null)
		document.getElementById(sT).style.visibility="visible";

}

function clearMenu(){
	if(oTd!=null){
		var tdo=new Array();
		tdo=oTd.id.split("_");
		var sT="";
		for(var i=1;i<tdo.length;i++){
			sT+="_"+tdo[i];
			document.getElementById("td"+sT).style.backgroundColor=tdBgColor;
			document.getElementById("td"+sT).style.color=tdColor;
			if(document.getElementById("tbl"+sT)!=null)
				document.getElementById("tbl"+sT).style.visibility="hidden";
		}
		oTd=null;			
	}
}

function runMenu(strURL){
	location.href=strURL;
}

var tt="";
var sT="";
var pT=new Array();
var tA=new Array();

function getCoord(st){
	tA=st.split("_");
	if(tA.length>2){
		tA=tA.slice(0,-1);
		tt=tA.join("_");
		return (document.getElementById("tbl"+tt).offsetTop+document.getElementById("td"+st).offsetTop+4)+"px;left:"+
			(document.getElementById("tbl"+tt).offsetLeft+document.getElementById("td"+st).offsetWidth-2)+"px\">";
	}
	return (document.getElementById("mainmenu").offsetTop+document.getElementById("td"+st).offsetHeight-2)+"px;left:"+
		  (document.getElementById("mainmenu").offsetLeft+document.getElementById("td"+st).offsetLeft+5)+"px\">";
}