function galleria(path,n_galleria){
pathcompleta="/vivimilano/speciali/gallerie/"+path+"/galleria/sopra.shtml?"+n_galleria
path_sin="/vivimilano/speciali/foto.shtml"
path_des="/vivimilano/speciali/vuoto.shtml"
newWin=open("","","menubar=no,location=no,toolbar=yes,status=no,scrollbars=yes,resizable=no,width=680,height=480");
newWin.document.write('<html><head><title>Galleria di immagini</title>');
newWin.document.write('</head>');
newWin.document.write('<frameset rows="45,*" border="0" frameborder="NO" framespacing="0">');
newWin.document.write('<frame src="'+pathcompleta+'" name="sopra" scrolling="NO" marginheight="5" marginwidth="5">');
newWin.document.write('<frameset cols="120,*" border="0" frameborder="NO" framespacing="0">');
newWin.document.write('<frame src="'+path_sin+'" name="sin">');
newWin.document.write('<frame src="'+path_des+'" name="des">');
newWin.document.write('</frameset></frameset>');
newWin.document.write('<noframes><body>Per visualizzare questa pagina &egrave; necessario un browser che supporti i frames</body></noframes>');
newWin.document.write('</html>');
//newWin.frames["sopra"].location.href=pathcompleta
}

// FUNZIONE POPUP SONDAGGI
function apripop_sondaggio(PATH, width, height)
{
window.open('/sondaggi/popup.jsp?xml='+PATH,'Sondaggio','height='+height+',width='+width+',toolbar=no,menubar=no,status=no,directories=no,location=no,resizable=YES,scrollbars=yes,marginwidth=0,marginheight=0,left=120,top=85')
}

function apri_finestra_sondaggi(url_pag, windowsname, dimLar, left, top, dimAlt){
			var hWnd = window.open(url_pag, windowsname, "toolbar=no,width=" + dimLar + ",height=" + dimAlt + ",left=" + left + ",top=" + top + ",directories=no,location=no,status=yes,statusbar=yes,resizable=1,menubar=no,scrollbars=yes");
			if(!hWnd.opener) hWnd.opener=self;	
			if(hWnd.focus!=null) hWnd.focus();
		}


 /*funzione per apertura link esterni */
function openlink(xlink){
	window.open("/vivimilano/speciali/openlink/openxlink.shtml?" + xlink, "xpage");
	}

function pr6(nomefile,larghezza,altezza) {
	parametri="menubar=no,location=no,toolbar=no,status=no,scrollbars=yes,resizable=no,width="
	parametri=parametri+larghezza+",height="+altezza
	newWin=open('','',parametri)
	newWin.location.href=nomefile
}

/* FUNZIONE POP UP UNIVERSALE */
function pr4(nomefile,larghezza,altezza) {
	parametri="menubar=no,location=yes,toolbar=yes,status=no,scrollbars=yes,resizable=yes,width="
	parametri=parametri+larghezza+",height="+altezza
	newWin=open('','',parametri)
	newWin.location.href=nomefile
}



function pagprec (x){
    history.go(x);

    }

 function Rimanda(quale){
    window.close()
    opener.parent.location.href=quale             
 }

 function Apri(quale){
    if (window.name=='popup')
	{
  
    window.close()
    opener.parent.location.href=quale             
    
    }
    else
    {
    document.location.href=quale             
    }
 }

<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->

