if(navigator.appVersion.match("MSIE") == "MSIE" && navigator.appVersion.match("MSIE 7") == null)	// se siamo su Explorer 6 o inferiore
	document.write("\n<link rel=\"stylesheet\" type=\"text/css\" href=\"intro/css/presentazioneIE6.css\"/>");
else
	document.write("\n<link rel=\"stylesheet\" type=\"text/css\" href=\"intro/css/presentazione.css\"/>");	// altrimenti


var innerContainer;
var tempWidth = 136;

var filmatino;
var logo2;
var lingue;


function apriTende() {
	if(tempWidth < 868) {
		tempWidth += 20;
		innerContainer.style.width = tempWidth+"px";
		innerContainer.style.marginLeft = (tempWidth % 2 != 0) ? (-(tempWidth-1)/2)+"px" : (-(tempWidth/2))+"px";
		setTimeout("apriTende()", 40);
	}
	else {
		tempWidth = 4;
		mostra('logo2', true);
		setTimeout("showVideo()", 1000);
		setTimeout("mostra('lingue', true)", 1200);
	}
}

function mostra(layerId, show) {
	if(show) {
		document.getElementById(layerId).style.display = "block";
		fadeIn(layerId, 0);
	}
	else {
		fadeOut(layerId, 100);
		setOpacity(document.getElementById(layerId), 0);
	}
}

function showVideo() {
	if(tempWidth < 140) {
		tempWidth += 14;
		filmatino.style.height = tempWidth+"px";
		setTimeout("showVideo()", 40);
	}
/*	else {
		ajaxUpdater("filmatino", escape("intro/script/_filmato.html"));
	}*/
}


window.onload = function() {
	innerContainer = document.getElementById("innerContainer");
	filmatino = document.getElementById("filmatino");
	logo2 = document.getElementById("logo2");
	lingue = document.getElementById("lingue");
	setOpacity(logo2, 0);
	setOpacity(lingue, 0);
	apriTende();
}
