// JavaScript Document
function showImage(img){foto1= new Image();
foto1.src=(img);
Controlla(img);}
function Controlla(img){if((foto1.width!=0)&&(foto1.height!=0)){
viewFoto(img);}
else{funzione="Controlla('"+img+"')";
intervallo=setTimeout(funzione,20);}}
function viewFoto(img){altez=foto1.height+40;
if (altez>600){altez=600;
largh=foto1.width+60;
stringa="width="+largh+",height="+altez+",scrollbars=yes";
} else 
{largh=foto1.width+40;
stringa="width="+largh+",height="+altez+",scrollbars=no";}
title=document.title; 
finestra=window.open('about:blank',"",stringa);
finestra.document.write("<html><head><title>"+title+"</title></head><body bgcolor=#ffffff TOPMARGIN=0 LEFTMARGIN=0 RIGHTMARGIN=0 BOTTOMMARGIN=0><table border=0 cellpadding=20 cellspacing=0><tr><td><img src="+img+" border=1 alt=''></td></tr></table></body></html>");}


function Menu_Off(element) {
if (document.all[element].style.display=='') 
  {
    document.all[element].style.display='none';
  } else { 
   document.all[element].style.display='';
  }
}

function podr(loc, myWidth, myHeight)  {
    lev= (screen.width *0.5)-(myWidth*0.5);
    verh=50;
    window.open(loc, 'podr','width='+myWidth+',height='+myHeight+',top='+verh+',left='+lev+',scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no');           
}
