function ApriWin(href,nome,larghezza,altezza,tipo,barres,sinistra,sopra)
	{
		if(tipo=="centra")
		{
			if(window)
			{
				if(window.screen)
				{
					var sW=screen.availWidth;
					var sh=screen.availHeight;
					if(sW && sh)
					{
						var iX0=(sW-larghezza)/2;
						var iY0=(sh-altezza)/2;
						if(iX0>=0)
						{
							sinistra=iX0;
						}
						else
						{
							sinistra=0;
						}
						if(iY0>=0)
						{
							sopra=iY0;
						}
						else
						{
							sopra=0;
						}

					}
				}
			}
		}

		var w;

		if(barres=="y")
		{
			barres="scrollbars=yes,";
		}
		
		if(barres=="auto")
		{
			barres="scrollbars=auto,";
		}
		
		var features="";

		if(document.all || true){
			//features=barres +"location=no,resizable=yes,fullscreen =no,titlebar =no,directories=no,width=" +larghezza +"px,height=" +altezza +"px";
			
			features=barres +"width=" +larghezza +"px,resizable=yes,height=" +altezza +"px";

			if(!isNaN(sinistra))
			{
				features=features +",left=" +sinistra +"px";
			}
			if(!isNaN(sopra))
			{
				features=features +",top=" +sopra +"px";
			}
			w=window.open(href,nome,features);
			window.focus();
			
			//w.sinistra=sinistra;
			//w.sopra=sopra;
			//alert(w);
			//alert(w.onmove);
			//w.onload=vatteneAPosto;
			//alert(w.onload);
			
		}
		else
		{
			alert('Non posso aprire il dettaglio!');
		}
		if(document.layers){
			features=barres +"status=yes,width=" +larghezza +"px,height=" +larghezza +"px";
			w=window.open (href,nome,features);
		}
		

		w.focus();
		
		
	}
	function prova()
	{
		alert("Ciao");
	}
	function chiudi()
	{
		if(window.opener)
		{
			window.close();
		}
	}
	
	

		

		