var nome=(navigator.appName=='Netscape')?true:false;

function popup(img) 
{
	showPopup();
       	if(nome)
	{
        	var overdivh = pageYOffset;
        }
	else
	{
        	var overdivh = document.body.scrollTop;
        }

	text = '<form><table border=0 cellspacing=0 cellpadding=0 bgcolor=#FFFFFF><tr><td width=10 height=10 background=PANNELLO/struttura/corner1.gif><img src=PANNELLO/struttura/clearpixel.gif height=1 width=1></td><td background=PANNELLO/struttura/border1.gif><img src=PANNELLO/struttura/clearpixel.gif height=1 width=10></td><td width=10 background=PANNELLO/struttura/corner2.gif><img src=PANNELLO/struttura/clearpixel.gif height=1 width=1></td></tr><tr><td width=10 background=PANNELLO/struttura/border4.gif><img src=PANNELLO/struttura/clearpixel.gif height=1 width=10></td><td align=center bgcolor=#FFFFFF style="font-family: verdana; font-size:14pt;">'+'<br><center><br><input type="button" name="cl2" onclick="ndexe(); return false;" value="CHIUDI" style="color: #666666;background-color: #ddeeff; border-color: #ccddee; font-family: verdana; font-size: 8pt;font-weight: bold"><br><br><IMG SRC="'+img+'" border="0" hspace=0 vspace=0><br></td><td width=10 background=PANNELLO/struttura/border2.gif><img src=PANNELLO/struttura/clearpixel.gif height=1 width=10></td></tr><tr><td width=10 background=PANNELLO/struttura/corner4.gif><img src=PANNELLO/struttura/clearpixel.gif height=1 width=1></td><td background=PANNELLO/struttura/border3.gif height=10><img src=PANNELLO/struttura/clearpixel.gif height=1 width=1></td><td background=PANNELLO/struttura/corner3.gif><img src=PANNELLO/struttura/clearpixel.gif height=1 width=1></td></tr></form></table>';

        return overlib(text,FIXY,overdivh,FIXX,15,BACKGROUND,'#FFFFFF',TEXTSIZE,2,BORDER,2);
}

function popupFotoDidasc(img,titolo,didascalia) 
{
	showPopup();
       	if(nome)
	{
        	var overdivh = pageYOffset;
        }
	else
	{
        	var overdivh = document.body.scrollTop;
        }

	text = '<form><table border=0 cellspacing=0 cellpadding=0 bgcolor=#FFFFFF><tr><td width=10 height=10 background=PANNELLO/struttura/corner1.gif><img src=PANNELLO/struttura/clearpixel.gif height=1 width=1></td><td background=PANNELLO/struttura/border1.gif><img src=PANNELLO/struttura/clearpixel.gif height=1 width=10></td><td width=10 background=PANNELLO/struttura/corner2.gif><img src=PANNELLO/struttura/clearpixel.gif height=1 width=1></td></tr><tr><td width=10 background=PANNELLO/struttura/border4.gif><img src=PANNELLO/struttura/clearpixel.gif height=1 width=10></td><td align=center bgcolor=#FFFFFF style="font-family: verdana; font-size:14pt;">'+'<br>Galleria Fotografica<br>'+titolo+'<center><br><input type="button" name="cl2" onclick="ndexe(); return false;" value="CHIUDI" style="color: #666666;background-color: #ddeeff; border-color: #ccddee; font-family: verdana; font-size: 8pt;font-weight: bold"><br><br><IMG SRC="'+img+'" border="0" hspace=0 vspace=0><br><font style="font-family: verdana; font-size:10pt;">'+didascalia+'<br></td><td width=10 background=PANNELLO/struttura/border2.gif><img src=PANNELLO/struttura/clearpixel.gif height=1 width=10></td></tr><tr><td width=10 background=PANNELLO/struttura/corner4.gif><img src=PANNELLO/struttura/clearpixel.gif height=1 width=1></td><td background=PANNELLO/struttura/border3.gif height=10><img src=PANNELLO/struttura/clearpixel.gif height=1 width=1></td><td background=PANNELLO/struttura/corner3.gif><img src=PANNELLO/struttura/clearpixel.gif height=1 width=1></td></tr></form></table>';

        return overlib(text,FIXY,overdivh,FIXX,15,BACKGROUND,'#FFFFFF',TEXTSIZE,2,BORDER,2);
}

function popupFoto(imago,Comando,Sequenza,Didascalia,urlaction) 
{
	//var str = '@SlAsHn@';
	var Didascalia = Didascalia.replace(/@SlAsHn@/g, '\n');

	if(imago==0)
	{
		img="";
	}
	else
	{
		img='<IMG SRC="'+imago+'" border="0" hspace=0 vspace=0><br>';
	}

	Campi ='<input type="hidden" name="dir" value="">';
	Campi+='<input type="hidden" name="url" value="FotoGallery">';
	Campi+='<input type="hidden" name="paramid" value="">';
	Campi+='<input type="hidden" name="makeaction" value="">';
	Campi+='<input type="hidden" name="FT" value="">';
	Campi+='<input type="file" name="MiaImg"><br>Didascalia<br><textarea name=didas>'+Didascalia+'</textarea><br>';

	showPopup();
       	if(nome)
	{
        	var overdivh = pageYOffset;
        }
	else
	{
        	var overdivh = document.body.scrollTop;
        }

	text = '<form name=Foto method=post action="'+urlaction+'" ENCTYPE="multipart/form-data"><table border=0 cellspacing=0 cellpadding=0 bgcolor=#FFFFFF><tr><td width=10 height=10 background=PANNELLO/struttura/corner1.gif><img src=PANNELLO/struttura/clearpixel.gif height=1 width=1></td><td background=PANNELLO/struttura/border1.gif><img src=PANNELLO/struttura/clearpixel.gif height=1 width=10></td><td width=10 background=PANNELLO/struttura/corner2.gif><img src=PANNELLO/struttura/clearpixel.gif height=1 width=1></td></tr><tr><td width=10 background=PANNELLO/struttura/border4.gif><img src=PANNELLO/struttura/clearpixel.gif height=1 width=10></td><td align=center bgcolor=#FFFFFF style="font-family: verdana; font-size:14pt;" nowrap>'+'<center><b>'+Comando+'</b><br><br>'+img+Campi+'<input type="button" name="cl2" onclick="ndexe(); return false;" value="CHIUDI" style="color: #666666;background-color: #ddeeff; border-color: #ccddee; font-family: verdana; font-size: 8pt;font-weight: bold">&nbsp;&nbsp;<input type="button" name="cl2" onclick="document.Foto.submit(); return false;" value="'+Comando+'" style="color: #666666;background-color: #ddeeff; border-color: #ccddee; font-family: verdana; font-size: 8pt;font-weight: bold"></td><td width=10 background=PANNELLO/struttura/border2.gif><img src=PANNELLO/struttura/clearpixel.gif height=1 width=10></td></tr><tr><td width=10 background=PANNELLO/struttura/corner4.gif><img src=PANNELLO/struttura/clearpixel.gif height=1 width=1></td><td background=PANNELLO/struttura/border3.gif height=10><img src=PANNELLO/struttura/clearpixel.gif height=1 width=1></td><td background=PANNELLO/struttura/corner3.gif><img src=PANNELLO/struttura/clearpixel.gif height=1 width=1></td></tr></form></table>';

        return overlib(text,FIXY,overdivh,FIXX,15,BACKGROUND,'#FFFFFF',TEXTSIZE,2,BORDER,2);
}




function ndexe() 
{
	hidePopup();
        return nd();
}

function hidePopup() 
{
	if (nome)
	{
		if (navigator.appVersion.substring(0,3) < 5.0)
		{ 
			document.RifPopup.visibility="show"
		}
	}
	else
	{
		RifPopup.style.visibility="visible";	
	}
}

function showPopup() 
{
	if (nome)
	{
		if (navigator.appVersion.substring(0,3) < 5.0)
		{
			document.RifPopup.visibility="hide"
		}
	}
	else
	{
		RifPopup.style.visibility="hidden";
	}
}
