/**
 *  Codigo javascript para inicializar el mapa de google maps, adaptado por Marc Garcia [ at ] iws [ dot ] es :º]
 **/

function GLoad() {
 if (GBrowserIsCompatible()) {
 
 /* var nLat = 41.619613;
  var nLong = 0.636392; */
  
  var nLat =  41.619703;
  var nLong = 0.636000;
  
 
  var map = new GMap2(document.getElementById("map"));
  map.addControl(new GSmallMapControl());
  map.addControl(new GMapTypeControl());
  map.setCenter(new GLatLng(nLat, nLong), 16);

  // Creates a marker at the given point with the given number label
  function createMarker(point, number) {
    var marker = new GMarker(point);
    GEvent.addListener(marker, "click", function() {
      marker.openInfoWindowHtml("Aspid<br />Roger de Ll&uacute;ria, 2-4<br />25005 Lleida");
    });
    return marker;
  }

  var point = new GLatLng( nLat, nLong );
  map.addOverlay(createMarker(point, 1));
 };
};


window.onload =  GLoad;
window.onunload = GUnload;
