IE=(navigator.appName=="Microsoft Internet Explorer");
NS=(navigator.appName=="Netscape");
MAC=(navigator.appVersion.indexOf("Mac")!=-1);
bVer=parseInt(navigator.appVersion);
xWin=null;
fWin=null;
// for centering popup windows (use JS1.2 screen object)
if (bVer>=4) {
	maxWidth=screen.availWidth;
	maxHeight=screen.availHeight;

	// normalize dimensions to fit toolbars & window handles
	if (MAC) {
		if (NS) { maxWidth -= 20; maxHeight -= 35; }
		else if (IE) { maxWidth -= 20; maxHeight -= 35; }
	} else if (navigator.userAgent.indexOf('Win')!=-1) {
		if (NS) { maxWidth -= 12; maxHeight -= 12; }
		else if (IE) { maxWidth -= 10; maxHeight -= 28; }
	}
} else {
	_top=100;
	_left=100;
	maxWidth=800;
	maxHeight=600;
}

// finestra a tutto schermo
function apri(page) {
	if ( top.location.search.indexOf("fullscreen")==-1 ) {
		if ( (bVer >= 3) && (page!=null) ) {
			var _params = "scrollbars=no,resizable=yes";
			_params += ",width="+maxWidth+",height="+maxHeight;
			if (IE) _params += ",top=0,left=0"; //,fullscreen=yes";
			else if (NS) _params += ",screenX=0,screenY=0";
			var fWin = window.open( page+"?fullscreen=1", "main", _params); 

			if(fWin.opener == null) {
				fWin.opener = window;
				fWin.opener.name = 'launchWin';
				fWin.moveTo(0,0);
			}
			if (!(IE && bVer<4)) {
				fWin.focus();
			}
		}
	}

}
//-->