var menuAnt = null;
var velocidad = 20;
var incremento = 3;
var ancho = 431;
var alto = 300;
var _FIREFOX_ = navigator.appName.toLowerCase().indexOf("netscape") > -1;
var _IE_ = navigator.appName.toLowerCase().indexOf("microsoft") > -1;

var __fondo__ = new Image();
__fondo__.src = "../imagenes/html/foto-hotel-tirol.png";

// Muestra / oculta la opcion del menu
function mostrarMenu(id) {
	var menu = document.getElementById("opcion"+id);

	if (menu != null) {
		if (menu == menuAnt) {
			menu.style.display = "none";
			menuAnt = null;
		} else {
			if (menuAnt != null) {
				menuAnt.style.display = "none";
			}
			menu.style.display = "block";
			menuAnt = menu;
		}
	}	
}

// Muestra con un fade el texto
function mostrarTexto(porc) {
	var obj = document.getElementById('contenedor-texto');

	if (typeof obj.style.filter != 'undefined') { // Es IE
		obj.style.filter = "alpha(opacity="+porc+")";
	} else {
		obj.style.opacity = porc/100;
	}

  	obj.style.clip = "rect(0px "+parseInt(ancho*porc/100)+"px "+parseInt(alto*porc/100)+"px 0px)";
	if (porc < 100) {
		setTimeout("mostrarTexto("+(porc+incremento)+")", velocidad);
	}

}
