function PopupCentrata(url) {
   var w = 350;
   var h = 450;
   var l = Math.floor((screen.width-w)/2);
   var t = Math.floor((screen.height-h)/2);
      window.open(url,"","width=" + w + ",height=" + h + ",top=" + t + ",left=" + l);
 }
 
 
 function PopupFoto(imageId)
 {
    var src = document.getElementById(imageId).src;
    var src1 = src.substring(0,src.indexOf("small/"));
    var src2 = src.substring(src.indexOf("small/")+6);
    window.open(src1 + src2,'','status=no, menubar=no, toolbar=no, scrollbar=no, titlebar=no, resizable=yes');
    //popImage(src1+src2,'FOTO');

 }

function S4() {
   return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
}
function guid() {
   return (S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4());
}

function refresh(param){
	/**
	 * param = frame di destinazione
	 */
	var myFrame = document.getElementById("refreshFrame");
	
	//Provo a cambiare il frame
	if(param.length > 0){
		myFrame.src = param+"?"+guid();
	}else{
		//Altrimenti imposto quello predefinito
		myFrame.src = "";
	}
}