function foto(pagina, l, a)
{
	var posT;
	var posL;
	posT = (screen.height - a) / 2;
	posL = (screen.width - l) / 2;
	parent.NaviWin=window.open(pagina,'','toolbar=no,left=' + posL + ',top=' + posT + ',directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=' + l +',height=' + a);
}


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function apri_expanding(pagina, l, a)
{
	parent.NaviWin=window.open(pagina,'','toolbar=no,left=20,top=20,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=' + l +',height=' + a);
}

<!-- Begin
function CaricaFoto(img) { 

	foto1= new Image();
	foto1.src=(img);
	largh=foto1.width+30;
	altez=foto1.height+30;
	
	var win;
	var sWidth;
	var sHeight;
	var NS = (document.layers) ? 1 : 0;

	win = window.open("", "","width="+largh+",height="+altez+",menubar=no,toolbar=no,scrollbar=no");
	
	if (NS) {
		sWidth = win.innerWidth;
		sHeight = win.innerHeight;
	} else {
		sWidth = win.document.body.clientWidth;
		sHeight = win.document.body.clientHeight;
	}
	
	if(sWidth!=largh || sHeight!=altez) {
		win.close();
		setTimeout("CaricaFoto('"+img+"')", 250);
		return;
	}

	win.document.open();
	win.document.write("<html><head><title></title>");
	win.document.write("<body bgcolor='#878E96'>");
	win.document.write('<div style="position:absolute;width:'+largh+'px;height:'+altez+'px;left:13px;top:13px">');
	win.document.write("<img border='2' src="+img+"></div></body></html>");
	win.document.close();
}
//  End -->
