// JavaScript Document
<!--
// funzioni per il cambio della lingua - inizio
ns6=(document.getElementById && !document.all)?true:false;
ns=(document.layers)?true:false;
ie=(document.all)?true:false;

function filenameOnly(InString) {
	LastSlash=InString.lastIndexOf('/', InString.length-1)
	OutString=InString.substring(LastSlash+1, InString.length)
	return (OutString);
}

function switchToEn() {
	document.location = "../en/" + filenameOnly(location.href);
}

function switchToIt() {
	document.location = "../it/" + filenameOnly(location.href);
}
// funzioni per il cambio della lingua - fine


// funzioni per l'apertura di una finestra centrata - inizio
function mousePos(){
	if(ie){
		if(window.screenLeft > -1){
			x = window.screenLeft + (document.body.clientWidth/2)-420;
		} else if(navigator.appVersion.indexOf("Mac")!=-1) {
			x = (screen.availWidth/2)-386;
		} else {
			x = 0;
		}
		if(navigator.appVersion.indexOf("Mac")!=-1) {
			y = (screen.availHeight/2)-265;
		} else {
			y = window.screenTop + (document.body.clientHeight/2)-265;
		}
	}
	if(ns || ns6){
		x = window.screenX+((window.innerWidth/2)-420);
		y = window.screenY+((window.innerHeight/2)-140);
	}
}

function openCenterWindow(URL,winName,winWidth,winHeight) {
	if(screen.availWidth > 800){
		padX = 0;
		padY = 0;
	} else {
		padX = 0;
		padY = 0;
	}
	newX = x;
	newY = y;
	window.open(URL,winName,'width='+(winWidth+padX)+',height='+(winHeight+padY)+',status=no,location=no,left='+newX+',screenX='+newX+',top='+newY+',screenY='+newY+',scrollbars=no,resizable=no,menubar=no,toolbar=no');
}
// funzioni per l'apertura di una finestra centrata - fine

//-->
