<!--GENERALI: FUNZIONE PER L'INGRANDIMENTO AL CLICK DELLA FOTO NELLA GALLERY-->
function ingrandimento(url_foto,des_foto){
addr="ingrandimento.htm?"+url_foto+"&"+escape(des_foto)
alt=180
lar=180
rszb=(document.layers)?1:0;
props='height='+alt+',width='+lar+',top='+parseInt((screen.availHeight-alt)/2)+',left='+parseInt((screen.availWidth-lar)/2)+',scrollbars=0,resizable='+rszb+',toolbar=0,menubar=0,location=0,status=0';
window.open(addr,'_blank',props);
}


<!--GENERALI: FUNZIONE PER IL REPERIMENTO DELLA GRANDEZZA DELLA FOTO E DELL'APERTURA DELLA POPUP-->
// se vuoi dare dei margini alla foto cambia questi 2 valori


w_add=0; 
h_add=0; 

ww=10; 
hh=10; 
OP=(window.opera)?1:0;
timer=false;

if(location.search) {
addr=location.search.substr(1);
addr=addr.split('&');
document.write('<title>'+unescape(addr[1])+'<\/title>');
}

b_w=function() {return ((window.innerWidth)?window.innerWidth:document.body.clientWidth)}
b_h=function() {return ((window.innerHeight)?window.innerHeight:document.body.clientHeight)}
rsz=function() {self.resizeTo(ww,hh)}

function init() {
ww=b_w()
hh=b_h()
rsz()
ww2=b_w()
hh2=b_h()
w_add+=(ww-ww2)
h_add+=(hh-hh2)
ridimensiona()
}

function ridimensiona(){
	var w_pix=(OP)?document.getElementById('pix').width:document.pix.width
	var h_pix=(OP)?document.getElementById('pix').height:document.pix.height

		if(w_pix>28 && h_pix>30){
			ww=w_pix+w_add
			hh=h_pix+h_add

			y_coord=((screen.availHeight-hh)<0)?0:parseInt((screen.availHeight-hh)/2)
			x_coord=((screen.availWidth-ww)<0)?0:parseInt((screen.availWidth-ww)/2)

			rsz()
			self.moveTo(x_coord,y_coord)
			self.focus()

			if (OP && !timer) {
				w_tmp=b_w(); h_tmp=b_h();				
				timer=setInterval('if(w_tmp!=window.innerWidth || h_tmp!=window.innerHeight){self.location.reload(true)}',1000)
			}		
		}
		else setTimeout('ridimensiona()',1000)
}