<!--
function filenameOnly(InString)  {
	LastSlash=InString.lastIndexOf('/', InString.length-1);
	OutString=InString.substring(LastSlash+1, InString.length);
	return (OutString);
}

function postDataOnly(InString)  {
	LastQuestionMark=InString.lastIndexOf('?', InString.length-1);
	if (LastQuestionMark!=-1) {
	OutString=InString.substring(LastQuestionMark, InString.length);
	return (OutString);
	} else {
	return ("");
	}
}

function switchToEnglish() {
	document.location = "../english/" + filenameOnly(location.href);
}

function switchToItalian() {
	document.location = "../italiano/" + filenameOnly(location.href);
}


var ns6=(document.getElementById && !document.all)?true:false;
var ns=(document.layers)?true:false;
var ie=(document.all)?true:false;

function mousePos(){
  if(ie){
		if(window.screenLeft > -1){
			xMouse = window.screenLeft + (document.body.clientWidth/2)-420;
		} else if(navigator.appVersion.indexOf("Mac")!=-1) {
		  xMouse = (screen.availWidth/2)-386;
		} else {
			xMouse = 0;
		}
		if(navigator.appVersion.indexOf("Mac")!=-1) {
			yMouse = (screen.availHeight/2)-265;
		} else {
			yMouse = window.screenTop + (document.body.clientHeight/2)-265;
		}
	}
	if(ns || ns6){
		xMouse = window.screenX+((window.innerWidth/2)-420);
		yMouse = window.screenY+((window.innerHeight/2)-140);
	}
}

function openCenterWindow(URL,winName,winWidth,winHeight) {
	mousePos();
		if(screen.availWidth > 800){
			padX = 0;
			padY = 0;
		} else {
			padX = 0;
			padY = 0;
		}
		newX = xMouse;
		newY = yMouse;
		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');
}
//-->