function right(e) {
if (navigator.appName == 'Netscape' && 
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' && 
(event.button == 2 || event.button == 3)) {
alert("Funzione disabilitata!");
return false;
}
return true;
}
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;

function popup(url, name, width, height)
{
settings=
"toolbar=no,location=no,directories=no,"+
"status=no,menubar=no,scrollbars=no,"+
"resizable=yes,width="+width+",height="+height;
MyNewWindow=window.open("gfx/"+url,name,settings);
}

function popup1(url, name, width, height)
{
settings=
"toolbar=no,location=no,directories=no,"+
"status=no,menubar=no,scrollbars=no,"+
"resizable=yes,width="+width+",height="+height;
finester=window.open("gfx/"+url,name,settings);
finester.moveTo('0','0')
}

function popupA(url, name, width, height)
{
settings=
"toolbar=no,location=no,directories=no,"+
"status=no,menubar=no,scrollbars=no,"+
"resizable=yes,width="+width+",height="+height;
finester=window.open("gfx/"+url,name,settings);
finester.moveTo('0','0')
}

var larghezza=screen.width;
var altezza=screen.height;
var sinistra=(larghezza-500)/2;
var alto=(altezza-354)/2;

function centraFinestra(url)
{
fineStrina=window.open(url,'grande','height=354,width=500,toolbar=no,menubar=no,status=no,directories=no,location=no,resizable=no');
fineStrina.moveTo(sinistra,alto)
}

var larghezza1=screen.width;
var altezza1=screen.height;

function centraFinestraM(url, width1, height1)
{
var sinistra1=(larghezza1-width1)/2;
var alto1=(altezza1-height1)/2;
settings=
"toolbar=no,location=no,directories=no,"+
"status=no,menubar=no,scrollbars=no,"+
"resizable=yes,width="+width1+",height="+height1;
finester=window.open(url,'matrimonio',settings);
finester.moveTo(sinistra1,alto1)
}


function zoom(windowWidth,windowHeight,targetWidth,targetHeight,widthMod,heightMod,fullScreen)
 {
	if (fullScreen)
	 {
		targetWidth = 780;
		targetHeight = screen.availHeight-10;
	 }

	if (windowWidth < targetWidth) windowWidth += widthMod;
	if (windowHeight < targetHeight) windowHeight += heightMod;

	windowLeft = ((screen.availWidth - targetWidth) / 2)-7;
	windowTop = 0;

	top.window.resizeTo(windowWidth,windowHeight);
	top.window.moveTo(windowLeft,windowTop);

	if (windowWidth < targetWidth || windowHeight < targetHeight)
		setTimeout('zoom(' + windowWidth + ', ' + windowHeight + ', ' + targetWidth + ', ' + targetHeight + ', ' + widthMod + ', ' + heightMod + ', ' + fullScreen + ');',10);
 }

