//defino variables aux
var loc=document.location.href;
var dir;
var imglength;
var aux;

if (loc.lastIndexOf('home')!=-1)
	aux="";
else
	aux="../";	
	
	
//defino imagenes
var img= new Array();
img[0]=new Image();
img[0].off=aux+'img/menu_0a.gif';
img[0].on=aux+'img/menu_0b.gif';
img[1]=new Image();
img[1].off=aux+'img/menu_1a.gif';
img[1].on=aux+'img/menu_1b.gif';
img[2]=new Image();
img[2].off=aux+'img/menu_2a.gif';
img[2].on=aux+'img/menu_2b.gif';
img[3]=new Image();
img[3].off=aux+'img/menu_3a.gif';
img[3].on=aux+'img/menu_3b.gif';
/*
img[4]=new Image();
img[4].off=aux+'img/menu_4a.gif';
img[4].on=aux+'img/menu_4b.gif';
*/
img[5]=new Image();
img[5].off=aux+'img/menu_5a.gif';
img[5].on=aux+'img/menu_5b.gif';
img[6]=new Image();
img[6].off=aux+'img/menu_6a.gif';
img[6].on=aux+'img/menu_6b.gif';

//defino funcion de over para menus
function rollover(numero)
{
	 document.images['boton'+numero].src=img[numero].on;
}
//defino funcion de out para menus
function rollout(numero)
{
    document.images['boton'+numero].src=img[numero].off;
}
//escribo el menu()
function init() {

	document.write('<UL>');

	if ((loc.indexOf("home")==-1)) { 
		document.write('<LI><a href="'+aux+'home.html"><img name="boton0" src="'+aux+'img/menu_0a.gif" vspace="7" class="boton" title="presentación" onMouseOver="rollover(0);" onMouseOut="rollout(0);"></a></LI>');
	}else{
		document.write('<LI><a href="'+aux+'home.html"><img name="boton0" src="'+aux+'img/menu_0b.gif" vspace="7" class="boton" title="presentación"></a></LI>');
	}

	if (loc.indexOf("/exposicion/")==-1) { 
		document.write('<LI><a href="'+aux+'exposicion/index.html"><img name="boton1" src="'+aux+'img/menu_1a.gif" vspace="7" class="boton" title="la exposición" onMouseOver="rollover(1);" onMouseOut="rollout(1);"></a></LI>');
	}else{
		document.write('<LI><a href="'+aux+'exposicion/index.html"><img name="boton1" src="'+aux+'img/menu_1b.gif" vspace="7" class="boton" title="la exposición"></a></LI>');
	}
	
	if (loc.indexOf("/catalogo/")==-1) { 
		document.write('<LI><a href="'+aux+'catalogo/index.html"><img name="boton2" src="'+aux+'img/menu_2a.gif" vspace="7" class="boton" title="catálogo" onMouseOver="rollover(2);" onMouseOut="rollout(2);"></a></LI>');
	}else{
		document.write('<LI><a href="'+aux+'catalogo/index.html"><img name="boton2" src="'+aux+'img/menu_2b.gif" vspace="7" class="boton" title="catálogo"></a></LI>');
	}
	
	if (loc.indexOf("/prensa/")==-1) { 
		document.write('<LI><a href="'+aux+'prensa/index.html"><img name="boton3" src="'+aux+'img/menu_3a.gif" vspace="7" class="boton" title="sala de prensa" onMouseOver="rollover(3);" onMouseOut="rollout(3);"></a></LI>');
	}else{
		document.write('<LI><a href="'+aux+'prensa/index.html"><img name="boton3" src="'+aux+'img/menu_3b.gif" vspace="7" class="boton" title="sala de prensa"></a></LI>');
	}
	/*
	if (loc.indexOf("/taller/")==-1) { 
		document.write('<LI><a href="'+aux+'taller/index.html"><img name="boton4" src="'+aux+'img/menu_4a.gif" vspace="7" class="boton" title="visitas taller" onMouseOver="rollover(4);" onMouseOut="rollout(4);"></a></LI>');
	}else{
		document.write('<LI><a href="'+aux+'taller/index.html"><img name="boton4" src="'+aux+'img/menu_4b.gif" vspace="7" class="boton" title="visitas taller"></a></LI>');
	}
	*/
	
	if (loc.indexOf("/informacion/")==-1) { 
		document.write('<LI><a href="'+aux+'informacion/index.html"><img name="boton5" src="'+aux+'img/menu_5a.gif" vspace="7" class="boton" title="información práctica" onMouseOver="rollover(5);" onMouseOut="rollout(5);" ></a></LI>');
	}else{
		document.write('<LI><a href="'+aux+'informacion/index.html"><img name="boton5" src="'+aux+'img/menu_5b.gif" vspace="7" class="boton" title="información práctica"></a></LI>');
	}
	
	if (loc.indexOf("/enlaces/")==-1) { 
		document.write('<LI><a href="'+aux+'enlaces/index.html"><img name="boton6" src="'+aux+'img/menu_6a.gif" vspace="7" class="boton" title="enlaces" onMouseOver="rollover(6);" onMouseOut="rollout(6);" ></a></LI>');
	}else{
		document.write('<LI><a href="'+aux+'enlaces/index.html"><img name="boton6" src="'+aux+'img/menu_6b.gif" vspace="7" class="boton" title="enlaces"></a></LI>');
	}
	
	document.write('</UL>');	
	
}