function PrevFoto(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,100);
  }
}

function viewFoto(img){
  largh=foto1.width+20+"px";
  altez=foto1.height+25+"px";
  stringa="width="+largh+",height="+altez;
  finestra=window.open(img,"",stringa);
}

function showMap() {                                                                                                     
	if (GBrowserIsCompatible()) {                                                                                          
    // Ottiene l'elemento della pagina chiamato "map" (il DIV)                                                           
    //   e crea la mappa utilizzandolo come contenitore.                                                                 
    var map = new GMap2(document.getElementById("map"));                                                                 
                                                                                                                         
    map.addMapType(G_PHYSICAL_MAP) ;                                                                                     
                                                                                                                         
    // Aggiunge dei controlli per lo zoom e lo spostamento                                                               
    map.addControl(new GLargeMapControl());                                                                              
    //map.addControl(new GMenuMapTypeControl());                                                                         
                                                                                                                         
    // Centra la mappa su Roma, con uno zoom di 5                                                                        
    map.setCenter(new GLatLng(40.62221,15.089303), 15);                                                                 
                                                                                                                         
  }                                                                                                                      
  
  var description = "<form action='http://maps.google.it/maps' method='get' target='new' class='formmappasr'>" +
        		        "<p>Ottieni le indicazioni stradali per raggiungere lo studio.</p>" +
        		        "<p>Indirizzo di partenza: "+                 
        		        "<input type='text' class='inputbox' size='28' name='saddr' id='saddr' value='' /></p>"+
        		        "<p style='text-align:center;'><button class='button_GMAP' type='submit'>Ottieni Indicazioni</button></p>" +
        		        "<input type='hidden' name='daddr' value='40.62221, 15.089303'/>" +
        	          "</form>";
                                                                                                                         
  var marker = new GMarker(new GLatLng(40.62221,15.089303));                                                            
  map.addOverlay(marker);                                                                                                
  marker.openInfoWindowHtml(description);                                                                                
                                                                                                                         
  GEvent.addListener(marker, "click", function() {                                                                       
    marker.openInfoWindowHtml(description);                                                                              
  });                                                                                                                    
}                                                                                                                        
