// Google Map vars
var googleMap, santsHotelCoordinates, santsHotelMarker;

window.onload = function ()
{
   selectMenu ();
   Ie6replaceFooterPngByGif ();
   initializeGoogleMap ();
}

function initializeGoogleMap()
{
   if (GBrowserIsCompatible())
   {
      googleMap = new GMap2 (document.getElementById("googleMap"));
      santsHotelCoordinates = new GLatLng(41.3791271230665, 2.140789031982422);
      googleMap.setCenter (santsHotelCoordinates, 11);
      googleMap.setUIToDefault();   

      var blueIcon = new GIcon(G_DEFAULT_ICON);
      santsHotelMarker = new GMarker(santsHotelCoordinates);
      
      GEvent.addListener (santsHotelMarker, "click", function()
      {
         santsHotelMarker.openInfoWindowHtml ("<div id='googleMapInfo'><strong><a href='http://maps.google.fr/maps/ms?ie=UTF8&amp;hl=fr&amp;msa=0&amp;msid=115645136290930226942.000467a8cb9c9cf22e518&amp;ll=41.378817,2.139856&amp;spn=0.006553,0.008272&amp;z=17' title='Display larger map'>Barcel&oacute; Sants Hotel<\/a><\/strong><br \/>Pla&ccedil;a Pa&iuml;sos Catalans<br \/>Estacio de Sants<br \/>08014 Barcelona<br \/><img src='http://eu-egee.org/fileadmin/templates/egee09/images/deco/phone-icon.png' style='margin-top:2px;' \/>+34 935 035 300<\/div>");
      });
   
      googleMap.addOverlay (santsHotelMarker);
   }
}

function resetMap ()
{
   santsHotelMarker.closeInfoWindow ();
   googleMap.setCenter (santsHotelCoordinates, 11);
}

function centerMap ()
{
   santsHotelMarker.closeInfoWindow ();
   googleMap.panTo (santsHotelCoordinates);  
}

