// *********** BOTONES

image1 = new Image();
image1.src = "imagenes/b1on.gif";
image2 = new Image();
image2.src = "imagenes/b2on.gif";
image3 = new Image();
image3.src = "imagenes/b3on.gif";
image4 = new Image();
image4.src = "imagenes/b4on.gif";
image5 = new Image();
image5.src = "imagenes/b5on.gif";

if (top.location != self.location) {
	top.location = self.location.href
}

// *********** POP UP

function AbrirVentana(mypage,myname,w,h,menubar,scroll){
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/3 : 0;
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',menubar='+menubar+',scrollbars='+scroll+',resizable=no'
	win = window.open(mypage,myname,settings)
}

// *********** LINKS DE NAVEGACION

function favoritos(url, titulo){
	window.external.addFavorite(url, titulo);
}

function paginadeinicio(src, url){
	src.style.behavior='url(#default#homepage)';
	src.setHomePage(url);
}

// *********** MANEJAR CAPAS

function ReloadNav4(init) {  //reloads the window if Nav4 resized
	if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)){
	document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_ReloadNav4; }}
	else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

ReloadNav4(true);

ie4=(document.all)? true:false
ns4=(document.layers)? true:false

var LayerActivo
var Mostrar
var Ocultar

function SeleccionarLayer(NombreLayer){
	if (ie4){LayerActivo = document.all[NombreLayer].style; Mostrar = "visible"; Ocultar = "hidden"}
	else
	if (ns4){LayerActivo = document.layers[NombreLayer]; Mostrar = "show"; Ocultar = "hide";}
	return LayerActivo;
}
function MuestraLayer(NombreLayer){
	OcultarTodos();
	(SeleccionarLayer(NombreLayer)).visibility = Mostrar
}
function OcultaLayer(NombreLayer){
	(SeleccionarLayer(NombreLayer)).visibility = Ocultar
}
function OcultarTodos(){
	for (i=1; i<=3 ; i++){OcultaLayer("Capa"+i)}
}
function MostrarTodos(){
	for (i=1; i<=3 ; i++){MuestraLayer("Capa"+i)}
}