
function PhotoWindow(img){
  foto1= new Image();
  foto1.src=(img);
  Controlla(img);
}
function Controlla(img){
  if((foto1.width!=0)&&(foto1.height!=0)){
    ViewPhoto(img);
  }
  else{
    funzione="Controlla('"+img+"')";
    intervallo=setTimeout(funzione,20);
  }
}
function ViewPhoto(img){
  largh=foto1.width+20;
  altez=foto1.height+30;
  stringa="width="+largh+",height="+altez;
  finestra=window.open(img,"",stringa);
}

 function show(object) {
    if (document.layers && document.layers[object] != null)
        document.layers[object].visibility = 'visible';
    else if (document.all)
        document.all[object].style.visibility = 'visible';
}
function hide(object) {
    if (document.layers && document.layers[object] != null)
        document.layers[object].visibility = 'hidden';
    else if (document.all)
        document.all[object].style.visibility = 'hidden';
}

function XShow(strObjectName)
{
	var objDiv = document.getElementByID(strObjectName);
	/* get the mouse left position */
	x = event.clientX + document.body.scrollLeft;
	/* get the mouse top position  */
	y = event.clientY + document.body.scrollTop + 35;
	/* display the pop-up */
	objDiv.style.display="block";
	/* set the pop-up's left */
	objDiv.style.left = x;
	/* set the pop-up's top */
	objDiv.style.top = y;
}
/* this function hides the pop-up when
user moves the mouse out of the link */
function XHide(strObjectName)
{
/* hide the pop-up */
	var objDiv = document.getElementByID(strObjectName);
	objDiv.style.display="none";
}
