function Mostrafoto(foto, title, tipo, cartella)
{
	switch (tipo)
	{
		case "orizontale":
		
			height = 400
			width = 550
			break;
		
		case "verticale":
		
			height = 550
			width = 450	
			break;
	}
	newWindow = window.open("photoview.htm", title,"height="+height+",width="+width+",menubar=no,scrolling=no,resizable=no,toolbar=no,location=no,directories=no,status=no")
	newWindow.document.write("<html><head><title>PAVIC - "+title+"</title><link rel=stylesheet href='../include/style.css' type=text/css></head><BODY onblur='window.close();'>")
	newWindow.document.write("<div align=center><img src='../photos/"+cartella+"/" + foto + ".jpg' border=0>")
	newWindow.document.write("<br><br><a href='#' onclick='self.close();'>Close</a><br><br>")
	newWindow.document.write("</div>")
	newWindow.document.write("</body></html>")		
	newWindow.document.close()
}

function Inviaform(sez,foto, maxfoto, albumindex)
{
	document.photo.sez.value = sez 
	document.photo.foto.value = foto 
	document.photo.maxfoto.value = maxfoto
	document.photo.albumindex.value = albumindex 
	document.photo.submit();
}

function Inviaform2(nome_foto)
{
	document.photo.nome_foto.value = nome_foto 
	document.photo.submit();
}