var IE=navigator.appName.indexOf("Microsoft")!=-1;
var NN=navigator.appName.indexOf("Netscape")!=-1;
var browserVer=parseInt(navigator.appVersion);
// popup di varie dimensioni
function apri(url,larg,alt,scrol,resiz)		
{
	if (typeof(larg)=="undefined") larg=550;
	if (typeof(alt)=="undefined") alt=450;
	if (typeof(scrol)=="undefined") scrol="no";
	if (typeof(resiz)=="undefined") resiz="no";
	posX = (screen.width/2) - (larg/2);
	posY = (screen.height/2) - (alt/2);
	var nomerandom="";
    for(nomerandom_i=0;nomerandom_i<=10;nomerandom_i++) nomerandom+=String.fromCharCode(Math.round(97+25*Math.random()));
	var siteWindowVar=window.open(url,nomerandom,"toolbar=no,status=no,menubar=no,scrollbars="+scrol+""
						+",resizable="+resiz+",location=no,directories=no,width="+larg+",height="+alt+""
						+",top="+posY+",left="+posX);
	if (NN||browserVer>=4)	{	siteWindowVar.focus();	siteWindowVar.focus();	}
}

function popupOpen(targetURL, winName, x, y, width, height, showScrollbars, canBeSizable, blockLink)
{
	var win = window.open(targetURL, winName, 'width=' + width + ',height=' + height + ',scrollbars=' + showScrollbars + ',resizable=' + canBeSizable + ',screenX=' + x + ',screenY=' + y + ',left=' + x + ',top=' + y);
	win.focus();
	return (blockLink == 'no');
}

function popupOpen_Center(targetURL, winName, width, height, showScrollbars, canBeSizable, blockLink)
{
	var x, y;
	
	x = (screen.width - width) / 2;
	y = (screen.height - height) / 2;
	
	return popupOpen(targetURL, winName, x, y, width, height, showScrollbars, canBeSizable, blockLink);
}

function popupOpen_Dialog(targetURL, winName, width, height, blockLink)
{
	return popupOpen_Center(targetURL, winName, width, height, 'no', 'no', blockLink);
}