/* Alberto Calles	*/
function muestralogon()
	{
	document.getElementById("logoncapa").style.visibility="visible";
	}
/* Alberto Calles	*/

function foto(fotog,nombre,texto,dir)
	{
	var camino="../../imagenes/"+dir+"/";
	var imagen="fotogrande"+fotog;
	document.images[imagen].src=camino+nombre;
	if (fotog=="1")
		document.f1.textofoto.value=texto;
	else
		document.f2.textofoto.value=texto;
	}
/* Alberto Calles	*/	
function muestracapa (capa)
	{
	document.getElementById(capa).style.height='auto';
	}
function ocultacapa (capa)
	{
	document.getElementById(capa).style.height='0px';
	}

/* Alberto Calles	*/	
function muestracapanum (capa,maximo)
	{
	ya=0;
	for (num=1;num<maximo;num++)
		{
		capanum=capa+num;
//		alert(capanum);
		if (document.getElementById(capanum).style.height==0 && ya==0)
			{
			document.getElementById(capanum).style.height='auto';
			ya=1;
			}
		}
	}
/* Alberto Calles	*/	
function cambiaidio (idio)
	{
	//	alert (idio);
	var direccion;
	var camino;
	var getsearch;
	var pos;
	camino=window.location.pathname;
	camino=camino.substr(0,1)+idio+camino.substr(3); 
	getsearch=(window.location.search);
	pos=getsearch.indexOf("id=");
	if (pos >0)
		{
		pos=pos+3;
		getsearch=getsearch.substr(0,pos)+idio+getsearch.substr(pos+2)
		}
	if (camino.indexOf("/es/")>-1 || camino.indexOf("/en/")>-1)
		direccion="http://"+window.location.hostname+camino+getsearch+window.location.hash;
	else
		direccion="http://"+window.location.hostname+"/en/inicio/index.php";
/*		
	if (camino.indexOf("/es/")>-1 || camino.indexOf("/es/")>-1)
		direccion="http://"+window.location.hostname+camino+getsearch+window.location.hash;
	else
		direccion="http://"+window.location.hostname+"/index.php";
*/		

	window.location.href=direccion;
	
	}	
