
var larghezza;
var altezza;
var url;
var win;
var name;
var pippo;

function popUpWindow(name,url,larghezza,altezza)
	{
	if(win == null || win.closed)
		{
		win = window.open(url,name,"scrollbars=yes,status=yes,resizable=no,left=100,top=50,width=" + larghezza + ",height=" + altezza);
		win.focus();
		}
	else
		{
		win.close();
		win = window.open(url,name,"scrollbars=yes,status=yes,resizable=no,left=100,top=50,width=" + larghezza + ",height=" + altezza);
		}
	
	}


function popUpLockedWindow(name,url,larghezza,altezza)
	{
	if(win == null || win.closed)
		{
		win = window.open(url,name,"scrollbars=no,status=yes,resizable=no,left=100,top=50,width=" + larghezza + ",height=" + altezza);
		win.focus();
		}
	else
		{
		win.close();
		win = window.open(url,name,"scrollbars=no,status=yes,resizable=no,left=100,top=50,width=" + larghezza + ",height=" + altezza);
		}
	
	}

function popUpRichWindow(name,url,larghezza,altezza)
	{
	if(win == null || win.closed)
		{
		win = window.open(url,name,"menubar=yes,scrollbars=yes,status=yes,resizable=no,left=100,top=50,width=" + larghezza + ",height=" + altezza);
		win.focus();
		}
	else
		{
		win.close();
		win = window.open(url,name,"menubar=yes,scrollbars=yes,status=yes,resizable=no,left=100,top=50,width=" + larghezza + ",height=" + altezza);
		}
	
	}
function popUpRich2Window(name,url,larghezza,altezza)
	{
	if(win == null || win.closed)
		{
		win = window.open(url,name,"menubar=no,scrollbars=yes,status=yes,resizable=yes,left=100,top=50,width=" + larghezza + ",height=" + altezza);
		win.focus();
		}
	else
		{
		win.close();
		win = window.open(url,name,"menubar=no,scrollbars=yes,status=yes,resizable=yes,left=100,top=50,width=" + larghezza + ",height=" + altezza);
		}
	
	}
function conferma(pippo)
	{
	pippo.target='_top';
	pippo.ordine.value='si';
	pippo.submit();
	}

function PopupCentrata() { 
var w = 510; 
var h = 590; 
var l = Math.floor((screen.width-w)/2); 
var t = Math.floor((screen.height-h)/2); 
window.open("../IT/popup_prodotto.html","","width=" + w + ",height=" + h + ",top=" + t + ",left=" + l); 
} 