// JavaScript Document

 function load() {
     if (GBrowserIsCompatible()) { 

      // A function to create the marker and set up the event window
      // Dont try to unroll this function. It has to be here for the function closure
      // Each instance of the function preserves the contends of a different instance
      // of the "marker" and "html" variables which will be needed later when the event triggers.    
      function createMarker(point,html) {
        var marker = new GMarker(point);
        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(html);
        });
        return marker;
      }

      // Display the map, with some controls and set the initial location 
      var map = new GMap2(document.getElementById("map"), {size:new GSize(727,  450)});
	  map.addControl(new GLargeMapControl());
	  map.setCenter(new GLatLng(42.82184711207581, -8.613967895507812), 13);
	   map.setMapType(G_HYBRID_MAP);
    
	
	window.onload=function(){window.onload;map.checkResize()}
      // Set up three markers with info windows 
    
      var point = new GLatLng(42.84298040460275,-8.580644130706787);
      var marker = createMarker(point,'<div style="width:240px; padding-left:10px; padding-bottom:10px; color:#000"><p><strong>EXPOSICIÓN</strong><br/>Rúa da Magdalena, 13<br/>15895 Milladoiro - A Coruña<br/>Tfno/Fax: 981 530 382</p></div>')
      map.addOverlay(marker);

       var point = new GLatLng(42.803930084203586,-8.638585209846497);
      var marker = createMarker(point,'<div style="width:240px; padding-left:10px; padding-bottom:10px; color:#000"><p><strong>FÁBRICA</strong><br/>Polígono de la Picaraña Nave 45<br/>15980 - Padrón- A Coruna<br/>Tfno:981 803 148<br/>Fax: 981 509 110</p></div>')
      map.addOverlay(marker);


    }
    
    // display a warning if the browser was not compatible
    else {
      alert("Sorry, the Google Maps API is not compatible with this browser");
    }
	}

    // This Javascript is based on code provided by the
    // Blackpool Community Church Javascript Team
    // http://www.commchurch.freeserve.co.uk/   
    // http://www.econym.demon.co.uk/googlemaps/

    //]>
	
