// JavaScript Document Main Menu Layer Info
var isIE = (document.getElementById && document.all)?true:false;
var isOP = (navigator.userAgent.indexOf("Opera")!=-1)?true:false;
// variabile globale indispensabile per evitare bugs nel fade
var isMouseOut = true;
tt_obj=(isIE)?document.all.TMMIcontainer:document.getElementById("TMMIcontainer");   

function tmmshowlyr(fadein,numlink){
	if (fadein){
		//alert(isIE + " - " + isOP);
		InitInfo(numlink);
		tt_obj.style.display = "block";
		if (isIE && !isOP) {
			isMouseOut = false;
			IEfadeininfo(5);
		}else{
				isMouseOut = false;
				OTHfadeininfo(5);
			}
	}else{
		tt_obj.style.display = "none";
		if (isIE && !isOP) {
			isMouseOut = true;
			IEfadeoutinfo(1);
		}else{
				isMouseOut = true;
				OTHfadeoutinfo(1);
			}
	}	
}

function InitInfo(num){
	tt_obj.style.top= "41px";
	switch (num)
	{
		case 1: 
			frame.style.left="300px";
			break 
		case 2: 
			if (isOP)	tt_obj.style.left="420px";
			else tt_obj.style.left="380px";
			document.getElementById('xboxcontent').innerHTML ="Presentazione di tutte le attivitā quali i corsi di Avviamento, di Hockey, di Pattinaggio Artistico e gli Eventi Speciali della stagione in corso e non solo.";
			break 
		case 3: 
			if (isOP)	tt_obj.style.left="500px";
			else tt_obj.style.left="470px";
			document.getElementById('xboxcontent').innerHTML ="Volete noleggiare la Pista, festeggiare un' occasione speciale o semplicemente acquistare dei pattini? Allora questa č la sezione che fa al caso vostro.";
			break 
		case 4: 
			if (isOP)	tt_obj.style.left="560px";
			else tt_obj.style.left="550px";
			document.getElementById('xboxcontent').innerHTML ="Tutte le Informazioni utili riguardo gli orari di apertura al pubblico e dei corsi, i prezzi dei biglietti e degli abbonamenti, come contattarci ed altro ancora.";
			break 
		default: 
			break 
	}
}
function IEfadeininfo(counter){
if ((counter<85) && (!(isMouseOut))){
	tt_obj.style.filter = "alpha(opacity=" + (counter) +")";
	window.setTimeout("IEfadeininfo(" + (counter + 5) + ")",1);
	}
}

function OTHfadeininfo(counter){
if ((counter<85) && (!(isMouseOut))){
	tt_obj.style.mozopacity = ""+(counter/100);
	tt_obj.style.opacity = ""+(counter/100);
	window.setTimeout("OTHfadeininfo(" + (counter + 5) + ")",5);
	}
}

function IEfadeoutinfo(){

	tt_obj.style.filter = "alpha(opacity=0)";

}

function OTHfadeoutinfo(){

	tt_obj.style.mozopacity = "0";
	tt_obj.style.opacity = "0";

}

