primerNivel=new Array();
primerNivel[0]=new Array("PRESENTACIÓN",segundoNivel_0=new Array(),"01-presentacion.asp");
segundoNivel_0[0]=new Array("Introducción","01-presentacion2.asp");

//
primerNivel[1]=new Array("PLAN GENERAL","02-plan-general.asp");
//
primerNivel[2]=new Array("PLANES ESTRATÉGICOS","02-planes-estrategicos.asp");
//
primerNivel[3]=new Array("COOPERACIÓN DESARROLLO",segundoNivel_3=new Array(),"coopdesarrollo.asp");
segundoNivel_3[0]=new Array("ONG Participantes","coopdesarrollo3.asp");
segundoNivel_3[1]=new Array ("ONG Subvencionadas","coopdesarrollo2b.asp");
segundoNivel_3[2]=new Array ("Seguimiento de Proyectos","coopdesarrollo8.asp");
segundoNivel_3[3]=new Array ("Recursos Económicos",tercerNivel_3_3=new Array(),"coopdesarrollo4.asp");
tercerNivel_3_3[0]=new Array ("Según Presupuesto","coopdesarrollo4-presupuesto.asp");
tercerNivel_3_3[1]=new Array ("Según Área Geográfica","coopdesarrollo4-geografia.asp");
tercerNivel_3_3[2]=new Array ("Según Sector de Población","coopdesarrollo4-poblacion.asp");
tercerNivel_3_3[3]=new Array ("Según Área Actuación","coopdesarrollo4-actuacion.asp");


//
primerNivel[4]=new Array("CODESARROLLO",segundoNivel_4=new Array(),"coodesarrollo.asp");
segundoNivel_4[0]=new Array("ONG Participantes","coodesarrollo1.asp");
segundoNivel_4[1]=new Array ("ONG Subvencionadas","coodesarrollo2.asp");
segundoNivel_4[2]=new Array ("Seguimiento de Proyectos","coodesarrollo3.asp");
segundoNivel_4[3]=new Array ("Recursos Económicos",tercerNivel_4_3=new Array(),"coodesarrollo4.asp");
tercerNivel_4_3[0]=new Array ("Según Presupuesto","coodesarrollo4-presupuesto.asp");
tercerNivel_4_3[1]=new Array ("Según Área Geográfica","coodesarrollo4-geografia.asp");
tercerNivel_4_3[2]=new Array ("Según Área Actuación","coodesarrollo4-actuacion.asp");

//
primerNivel[5]=new Array("COOPERACIÓN DIRECTA",segundoNivel_5=new Array(),"coopdirecta01.asp");
segundoNivel_5[0]=new Array("Coop. Integral Productiva","coopdirecta02.asp");


//
primerNivel[6]=new Array("EDUCAC. Y SENSIBILIZAC.","sensibilizaeduca.asp");


//
primerNivel[7]=new Array("AYUDA HUMANITARIA",segundoNivel_7=new Array(),"ayudahumanitaria.asp");
segundoNivel_7[0]=new Array("Ong Subvencionadas","ayudahumanitaria1.asp");
segundoNivel_7[1]=new Array("Recursos Económicos","ayudahumanitaria2.asp");


//
primerNivel[8]=new Array("CONSEJO DE COOPERACIÓN","consejo.asp");
//
primerNivel[9]=new Array("CONVOCATORIAS",segundoNivel_9=new Array(),"05-convocatoria.asp");
segundoNivel_9[0]=new Array("Ordenanzas","05-convoca1.asp");
segundoNivel_9[1]=new Array("Bases y Formularios","05-convoca2.asp");
segundoNivel_9[2]=new Array("Resoluciones","05-convoca5.asp");
segundoNivel_9[3]=new Array("Otros","05-convoca6.asp");

//
primerNivel[10]=new Array("PUBLICACIONES",segundoNivel_10=new Array(),"06-publicaciones.asp");

//
primerNivel[11]=new Array("GALERÍA VÍDEOS",segundoNivel_11=new Array(),"07-videos.asp");
segundoNivel_11[0]=new Array("África","07-videos-africa.asp");
segundoNivel_11[1]=new Array("Asia","07-videos-asia.asp");
segundoNivel_11[2]=new Array("Iberoamérica","07-videos-iberoamerica.asp");
segundoNivel_11[3]=new Array("Centroamérica","07-videos-centroamerica.asp");
segundoNivel_11[4]=new Array("Madrid","07-videos-madrid.asp");
//
primerNivel[12]=new Array("GALERÍA DE FOTOS",segundoNivel_12=new Array(),"08-fotos.asp");
segundoNivel_12[0]=new Array("África","08-fotos-africa.asp");
segundoNivel_12[1]=new Array("Asia","08-fotos-asia.asp");
segundoNivel_12[2]=new Array("Iberoamérica","08-fotos-iberoamerica.asp");
segundoNivel_12[3]=new Array("Centroamérica","08-fotos-centroamerica.asp");
//
primerNivel[13]=new Array("DIRECTORIOS",segundoNivel_13=new Array(),"09-directorios.asp");
segundoNivel_13[0]=new Array("Directorio Cooperación","09-direct-gral.asp");
segundoNivel_13[1]=new Array("ONGS Directorio","09-direct-ong.asp");
segundoNivel_13[2]=new Array("Consultoras","09-direct-apoyo.asp");
//
primerNivel[14]=new Array("ENLACES",segundoNivel_14=new Array(),"10-enlace.asp");
segundoNivel_14[0]=new Array("Enlaces de Cooperación","10-enlace-coopera.asp");
segundoNivel_14[1]=new Array("Enlaces Institucionales","10-enlace-institucion.asp");
//
//
//JS MENU By Kikolin 2005
//
ultimo="";
ultimo2="";
//
function intercambio(objeto1, objeto2){
	objeto1.style.display = 'none'; 
	objeto2.style.display = 'block'; 
}
function destacadosMenu(valores){
//id='Alink"+a+"_"+b+"'
buscado=new Array();
//
switch (valores.length){
case 1: 
buscado[0]="Alink"+valores[0];
buscado[1]="Blink"+valores[0];
break;
case 2: 
buscado[0]="Alink"+valores[0]+"_"+valores[1];
buscado[1]="Blink"+valores[0]+"_"+valores[1]
break;
case 3: 
buscado[0]="Alink"+valores[0]+"_"+valores[1];
buscado[1]="Alink"+valores[0]+"_"+valores[1]+"_"+valores[2];
break;
}
for(x=0; x<buscado.length;x++){
var objAmarillo = document.getElementById(buscado[x]);
if(objAmarillo!=null){
objAmarillo.style.backgroundColor="#EAC269";
}
}
}
function desplegar(valores){
//
contenido1='capa'+valores[0]+"_";
var obj_inicio_1A = document.getElementById(contenido1+"A");
var obj_inicio_1B = document.getElementById(contenido1+"B");
if(obj_inicio_1A!=null && obj_inicio_1B!=null){
intercambio( obj_inicio_1A, obj_inicio_1B);
ultimo=contenido1;
//
if (valores.length>1){
contenido2='capa'+valores[0]+'_'+valores[1]+"_";
var obj_inicio_2A = document.getElementById(contenido2+"A");
var obj_inicio_2B = document.getElementById(contenido2+"B");
if(obj_inicio_2A!=null && obj_inicio_2B!=null){
intercambio( obj_inicio_2A, obj_inicio_2B);
ultimo2=contenido2;
}
}
}
destacadosMenu(valores);
}
//
function cambiaVisibilidad(capa){
	numero1=capa.indexOf("_");
	numero2=capa.lastIndexOf("_");
	//
	capas=capa.substring(0,capa.length-1);
	capita=capa.substring(capa.length-1);
	var obj = document.getElementById(capa); 

if(capita=="A"){
	// PROCESO DE APERTURA
	if(numero1==numero2){
	//ES DE PRIMER NIVEL	
	if(ultimo !=""){
	//CERRAMOS SEGUNDO SI LO HUBIERA!!!!!!!!
	if(ultimo2 !=""){
	var objUltimo2A = document.getElementById(ultimo2+"A");
	var objUltimo2B = document.getElementById(ultimo2+"B");
	intercambio(objUltimo2B, objUltimo2A);
	}
	ultimo2="";	
	//CERRAMOS ULTIMO
	var objUltimoA = document.getElementById(ultimo+"A");
	var objUltimoB = document.getElementById(ultimo+"B");
	intercambio(objUltimoB, objUltimoA);
	}
	ultimo=capas;
	
	
	
	}else{
	//ES DE SEGUNDO NIVEL
	if(ultimo2 !=""){
	var objUltimo2A = document.getElementById(ultimo2+"A");
	var objUltimo2B = document.getElementById(ultimo2+"B");
	intercambio(objUltimo2B, objUltimo2A);
	}
	if(ultimo2==capas){
	ultimo="";
	}else{
	ultimo2=capas;
	}
	ultimo2=capas;
	}
	//
	//
	var obj2 = document.getElementById(capas+"B");
	//
	//
}else{
	//CIERRA
	var obj2 = document.getElementById(capas+"A");
	if(numero1==numero2){
	if(ultimo==capas){
	ultimo="";
	}
	}else{
		if(ultimo2==capas){
	ultimo2="";
	}
	}
	//
}
	intercambio(obj, obj2);
}
//
function dibujaMenu(arrayValores){
valoresIniciales=new Array();
valoresIniciales=arrayValores;
//
document.write("<table width='186'  border='0' cellpadding='0' cellspacing='1' bgcolor='#1A88B7'>");
//
// PRIMER BUCLE
for (a=0; a<primerNivel.length;a++){
document.write("<tr><td>");	

// PRIMER IF
if(typeof(primerNivel[a][1])=="string"){
texto="<a id='Alink"+a+"' href='"+primerNivel[a][1]+"' class=menu1><img src='img_menu/esqN1.gif' width='7' height='21' hspace='0' vspace='0' border='0' align='absmiddle'>"+primerNivel[a][0]+"</a>";
//SOLO HACE FUNCION DE LLAMADA PQ ES UNA STRING!!!!!!!!!!
document.write("<div id='capa"+a+"' style='position:relative; left:0px; top:0px;width: 186; display: block'>"+texto+"</div>");
//
//CIERRE PRIMER IF
}else{
//APERTURA PRIMER ELSE			
//DIBUJA LA CAPA A
if(a==valoresIniciales[0] && valoresIniciales.length<2){
	texto="<a id='Alink"+a+"' href=\"javascript:;\" onclick=\"cambiaVisibilidad('capa"+a+"_A');\" class=\"menu1\"><img id='img1_"+a+"' name='img1_"+a+"' src='img_menu/esqN1.gif' width='7' height='21' hspace='0' vspace='0' border='0' align='absmiddle'>"+primerNivel[a][0]+"</a>";
}else{
texto="<a id='Alink"+a+"' href='"+primerNivel[a][2]+"' class='menu1'><img id='img1_"+a+"' name='img1_"+a+"' src='img_menu/esqN1.gif' width='7' height='21' hspace='0' vspace='0' border='0' align='absmiddle'>"+primerNivel[a][0]+"</a>";
}
document.write("<div id='capa"+a+"_A' style='position:relative; left:0px; top:0px;width: 186; display: block'>"+texto+"</div>");
//DIBUJA LA CAPA B
//
texto="<table border='0' cellpadding='0' cellspacing='0' bgcolor='#1A88B7' width='186'><tr bgcolor='#3399CC'><td bgcolor='#FFFFFF'>";
if(a==valoresIniciales[0] && valoresIniciales.length<2){
	texto+="<a id='Blink"+a+"' href=\"javascript:;\" onclick=\"cambiaVisibilidad('capa"+a+"_B');\" class=\"menu1\"><img src='img_menu/esqN1.gif' width='7' height='21' hspace='0' vspace='0' border='0' align='absmiddle'>"+primerNivel[a][0]+"</a>";
}else{
	texto+="<a id='Blink"+a+"' href='"+primerNivel[a][2]+"' class='menu1'><img src='img_menu/esqN1.gif' width='7' height='21' hspace='0' vspace='0' border='0' align='absmiddle'>"+primerNivel[a][0]+"</a>";
}
texto+="</td></tr><tr><td><img src='img_menu/pixel.gif' width='1' height='1'></td></tr>";
valorTope=eval('segundoNivel_'+a+'.length');
//
//
//SEGUNDO BUCLE
for (b=0; b<valorTope;b++){
dato1=eval('segundoNivel_'+a+'['+b+'][0]');
texto+="<tr><td align='left' valign='top'>";

//SEGUNDO IF
if(typeof(eval('segundoNivel_'+a+'['+b+'][1]'))=="string"){
dato2=eval('segundoNivel_'+a+'['+b+'][1]');
//
texto+="<a id='Alink"+a+"_"+b+"' href='"+dato2+"' class='menu2'><img src='img_menu/esqN2.gif' width='15' height='21' hspace='0' vspace='0' border='0' align='absmiddle'> "+dato1+"</a>";
//
//CIERRE SEGUNDO IF
}
else{
//SEGUNDO ELSE
// NO TOCAR POR ARRIBA
dato2=eval('segundoNivel_'+a+'['+b+'][2]');
texto+="<div id='capa"+a+"_"+b+"_A'>";
//texto+="<a id='Alink"+a+"_"+b+"' href='javascript:;' onclick=\"cambiaVisibilidad('capa"+a+"_"+b+"_A')\" class='menu2'><img src='img_menu/esqN2.gif' width='15' height='21' hspace='0' vspace='0' border='0' align='absmiddle'>"+dato1+"</a></div>";
//
//
//CAMBIOOOOOOOOO AQUIIIIIII
//
if(b==valoresIniciales[1] && valoresIniciales.length<3){
texto+="<a id='Alink"+a+"_"+b+"' href='javascript:;' onclick=\"cambiaVisibilidad('capa"+a+"_"+b+"_A')\" class='menu2'><img src='img_menu/esqN2.gif' width='15' height='21' hspace='0' vspace='0' border='0' align='absmiddle'>"+dato1+"</a></div>";
}else{
texto+="<a id='Alink"+a+"_"+b+"' href='"+dato2+"' onclick=\"cambiaVisibilidad('capa"+a+"_"+b+"_A')\" class='menu2'><img src='img_menu/esqN2.gif' width='15' height='21' hspace='0' vspace='0' border='0' align='absmiddle'>"+dato1+"</a></div>";
}
//
//FINAL CAMBIOOOOOO
//
//
valorTope2=eval('tercerNivel_'+a+'_'+b+'.length');
//CAPA B NIVEL 2!!!!!!!!!!!!!!!!!!!!!!!!!
texto+="<div id='capa"+a+"_"+b+"_B' style='width: 186; display: none'>";
texto+="<table border='0' cellpadding='0' cellspacing='0' bgcolor='#1A88B7' width='186'>";
texto+="<tr><td align='left' valign='top'>";
if(b==valoresIniciales[1] && valoresIniciales.length<3){
texto+="<a id='Blink"+a+"_"+b+"' href='javascript:;' onclick=\"cambiaVisibilidad('capa"+a+"_"+b+"_B')\" class='menu2'>";
}else{
texto+="<a id='Blink"+a+"_"+b+"' href="+dato2+" onclick=\"cambiaVisibilidad('capa"+a+"_"+b+"_B')\" class='menu2'>";
}
texto+="<img src='img_menu/esqN2.gif' width='15' height='21' hspace='0' vspace='0' border='0' align='absmiddle'>"+dato1+"</a></div></td></tr>";
texto+="<tr><td align='left' valign='top'><img src='img_menu/pixel.gif' width='1' height='1'></td></tr>";
//JJJJJJ
for (c=0; c<valorTope2;c++){

texto+="<tr><td>";
dato1B=eval('tercerNivel_'+a+'_'+b+'['+c+'][0]');
dato2B=eval('tercerNivel_'+a+'_'+b+'['+c+'][1]');
//
//Cambio
if(c==valoresIniciales[2]){
texto+="<a id='Alink"+a+"_"+b+"_"+c+"' href='javascript:;' class='menu3'><img src='img_menu/esqN3.gif' width='26' height='21' hspace='0' vspace='0' border='0' align='absmiddle'>"+dato1B+"</a>";
}else{
texto+="<a id='Alink"+a+"_"+b+"_"+c+"' href="+dato2B+" class='menu3'><img src='img_menu/esqN3.gif' width='26' height='21' hspace='0' vspace='0' border='0' align='absmiddle'>"+dato1B+"</a>";
}
//finCambio
texto+="</td></tr>";
//LINEA CIERRE
if(c<valorTope2-1){

texto+="<tr><td align='left' valign='top'><img src='img_menu/pixel.gif' width='1' height='1'></td></tr>";
}
//FINAL Tercer Bucle
}
texto+="</table>";
texto+="</div>";
//
//
//FINAL SEGUNDO ELSE
}
texto+="</td></tr>";
//GAP de segundo nivel
if(b<valorTope-1){
texto+="<tr><td align='left' valign='top'><img src='img_menu/pixel.gif' width='1' height='1'></td></tr>";
}
// NO TOCAR POR DEBAJOOOOOOOOOOOO
//CIERRE
texto+="</td></tr>";
//FINAL BUCLE 2
}
texto+="</table>";
document.write("<div id='capa"+a+"_B' style='position:relative; left:0px; top:0px;width: 186; display: none'>"+texto+"</div>");

//
//
//
//FIN ELSE 1
}
document.write("</td></tr>");
//FIN BUCLE 1
}
document.write("</table>");
//
desplegar(valoresIniciales);
//FIN FUNCION
}