var agt=navigator.userAgent.toLowerCase();
isOpera  = (agt.indexOf('opera')!=-1);

//cambios de colores en los menús de parques:
colorOver=''
function overTD1(td,color){
	colorOver=td.style.backgroundColor;
	td.style.backgroundColor=color;
}
function outTD1(td,color){
	td.style.backgroundColor=colorOver;
}

function overTD2(td,color){
	colorOver=td.style.backgroundColor;
	td.style.backgroundColor=color;
}
function outTD2(td,color){
	td.style.backgroundColor=colorOver;
}

function overTD3(td,color){
	colorOver=td.style.backgroundColor;
	td.style.cursor='hand';
  if (!document.all && document.getElementById) 
  	td.style.cursor='pointer';
  td.style.backgroundColor=color;
}
function outTD3(td,color){
	td.style.cursor='default';
	td.style.backgroundColor=colorOver;
}

/// Esto lo dejamos, pero está hecho para que cambie el color de la etiqueta de la guia
// del visitante, pero para ello, todas las páginas deberian de ser cargadas dentro del cuadrado de abajo
// DESDE AQUI
function overTD4(td,color){
	colorOver=td.style.backgroundColor;
	td.style.backgroundColor=color;
	td.style.cursor='hand';
}
function outTD4(td,color){
	td.style.backgroundColor=colorOver;
	td.style.cursor='default';
}

function chema(i){
	var j;
	for (j=1; j<=5; j++){
		if (j==i){
			aux="document.getElementById('visitante"+ j +"').className='bg2'";
			//alert(document.getelementById('visitante3').getAttribute('bgcolor'));
			eval(aux);
  	}else {
  		aux="document.getElementById('visitante"+ j + "').className='bg1'";
  		//aux=document.getElementById('visitante"+ j +"').bgcolor='blue';
  		//alert(document.getelementById('visitante2').getAttribute('bgcolor'));
  		eval(aux);		
  	}
  }
}

// HASTA AQUI

//menus flash
variableOver=false;

function mostrarCapa(capaMostrar, capaOcultar){
	if (isOpera) {
		document.getElementById(capaMostrar).style.display = (document.getElementById(capaMostrar).style.display=='block') ? 'none':'block';
		document.getElementById(capaOcultar).style.display = (document.getElementById(capaMostrar).style.display=='block') ? 'none':'block';
	} else {
		document.getElementById(capaMostrar).style.display='block';
		if (capaOcultar!=undefined) document.getElementById(capaOcultar).style.display='none';
		variableOver=true;
	}
}

function capaFuera(capa1,capa2){
	if (!isOpera) {
		variableOver=false;
		window.setTimeout('ocultarCapa("'+capa1+'","'+capa2+'")',300);
	}
}

function ocultarCapa(capa1,capa2){
	var divCapa1 = document.getElementById(capa1);
	var divCapa2 = document.getElementById(capa2);
	if (!variableOver){
		if (capa1!='') divCapa1.style.display='block';
		divCapa2.style.display='none';
	}
}
tabla=796
function recolocar(){
	ancho=(document.body.clientWidth-tabla)/2
	if (ancho<0) ancho=0
	args=recolocar.arguments
	l=args.length
	for (i=0;i<=l-3;i+=3){
		document.getElementById(args[i]).style.left=args[i+1]+ancho
		document.getElementById(args[i]).style.top=args[i+2]
	}
}
function volver () {
try {document.location.href=document.referrer;} catch (e) {history.back()}
}
function abreventana (pagina) {
	window.open(pagina,"","height=500,width=750,top=7,left=15,menubar=yes,scrollbars=yes")
};

