/* Ficheros con los botones  
Tener en cuenta que ningun grafico acabe en b.jpg o dara problemas */
var graficos = new Array( "nav00b.gif", "nav01b.gif", "nav02b.gif", "nav03b.gif", "nav04b.gif", "nav7bb", "" );

/* Extension de los graficos ( p.ej: ".gif" ) */
extension = ".gif"

/* Que boton esta marcado */
activo = 0;
activa = new Image();

/* Margenes que queremos dar a una ventana (de las que usamos para contener fotos) */
margenx = 10;
margeny = 8;

/* Esta encendido o no un fichero */
function NoActivo( fichero )
{
	letra = fichero.substr( fichero.length - 1, 1 );
	/* Tener en cuenta que ningun grafico acabe en b.jpg o dara problemas */
	if ( letra == 'b' )
		return( 0 );
		
	return ( 1 );
}

/* Enciende un boton */
function Enciende( img ) 
{
	fichero = img.src;
	fichero = fichero.substring( 0, fichero.length - 4 );
	
	/* Le a&ntilde;ado la terminacion */
	if ( NoActivo( fichero ) )
	{
		fichero = fichero + "b" + extension;
		img.src = fichero;
	}
}

function Apaga( img )
{
	if ( activa != img )
	{
		fichero = img.src
		fichero = fichero.substring( 0, fichero.length - 5 );
		fichero = fichero + extension
		img.src = fichero;
	}
}

function off( img )
{
	fichero = img.src
	fichero = fichero.substring( 0, fichero.length - 5 );
	fichero = fichero + extension
	img.src = fichero;
}

function marca( img )
{
	if ( ( activo ) && ( activa != img ) )
		off( activa );

	activo = 1;
	activa = img;
}

/* Funcion para sacar una ventana conteniendo un html
	del tama-o indicado */
function ventana( fichero, ancho, alto )
{
	ancho = ancho + margenx;
	alto = alto + margeny;
	cadena = "width=" + ancho + ",height=" + alto;
	oldPop = window.open( fichero, '_popIt', cadena );
} 

/* 	-----------------------------
	Funciones especificas 
	-----------------------------
*/

function Presenta()
{
	top.frames["abajo"].location = "apresent.html" 
	top.frames["lateral"].location = "lpresent.php"
}

function AsiSomos()
{
	top.frames["abajo"].location = "aasisomo.html" 
	top.frames["lateral"].location = "lpresent.php"
}

function Estudios()
{
	top.frames["abajo"].location = "aestudio.html" 
	top.frames["lateral"].location = "lestudio.html"
}

function Eurhodip()
{
	top.frames["abajo"].location = "aeurhodi.html" 
	top.frames["lateral"].location = "lpresent.php"
}

function Menu()
{
	top.frames["abajo"].location = "amenu.html"
	top.frames["lateral"].location = "lpresent.php" 
}

function Carta()
{
	top.frames["abajo"].location = "acarta.html" 
	top.frames["lateral"].location = "lpresent.php"
}
