
function wagmp_map_1() {
  if(GBrowserIsCompatible()) {
    if(!document.getElementById('wagmp_map_1')) return false;
    var map = new GMap2(document.getElementById('wagmp_map_1'));
    map.enableContinuousZoom();
    map.enableDoubleClickZoom();
    map.addControl(new GLargeMapControl());
    map.addControl(new GScaleControl());
    var geocoder = new GClientGeocoder();
    
    var fromAddress = {
      enabled: false,
      street: '',
      city: '',
      state: '',
      zip: '',
      country: '',
      full: ''
    };

    var icon_0 = new GIcon();
    icon_0.image = 'http://google.webassist.com/google/markers/traditionalflat/pacifica.png';
    icon_0.shadow = 'http://google.webassist.com/google/markers/traditionalflat/shadow.png';
    icon_0.iconSize = new GSize(34,35);
    icon_0.shadowSize = new GSize(34,35);
    icon_0.iconAnchor = new GPoint(9,23);
    icon_0.infoWindowAnchor = new GPoint(19,0);
    icon_0.printImage = 'http://google.webassist.com/google/markers/traditionalflat/pacifica.gif';
    icon_0.mozPrintImage = 'http://google.webassist.com/google/markers/traditionalflat/pacifica_mozprint.png';
    icon_0.printShadow = 'http://google.webassist.com/google/markers/traditionalflat/shadow.gif';
    icon_0.transparent = 'http://google.webassist.com/google/markers/traditionalflat/pacifica_transparent.png';
    
    var address_0 = {
      street: '',
      city: '',
      state: '',
      zip: '',
      country: '',
      infowindow: 'default',
      infowindowtext: '<span style="font: 12px Verdana, Arial, Helvetica, sans-serif; color: black;"><strong>The Famous Bein Inn</strong><br>Glenfarg<br>Perth &amp; Kinross<br>Scotland<br><br>Tel: +44 (0) 1577 830216<br>Fax: +44 (0) 1577 830211</span>',
      full: '56.303396,-3.358126',
      isdefault: false,
      addressType: 'coordinates',
      loop: '',
      latitude: '56.303396',
      longitude: '-3.358126',
      markerStyle: 'Google Traditional (flat)',
      markerColor: 'Pacifica'      
    };
    
    geocoder.getLatLng (
      address_0.full,
      function(point) {
        if(point) {
          var marker = new GMarker(point, icon_0);
          GEvent.addListener(marker, 'click', function() {
            marker.openInfoWindowHtml(address_0.infowindowtext);
          });
          if(!fromAddress.enabled || 'address_0' != 'address_0') {
            map.setCenter(point, 13);
            map.addOverlay(marker);
          }
        }
        else {
          map.setCenter(new GLatLng(37.4419, -122.1419), 13);
        }
      }
    );

    var icon_1 = new GIcon();
    icon_1.image = 'http://google.webassist.com/google/markers/traditionalflat/pacifica.png';
    icon_1.shadow = 'http://google.webassist.com/google/markers/traditionalflat/shadow.png';
    icon_1.iconSize = new GSize(34,35);
    icon_1.shadowSize = new GSize(34,35);
    icon_1.iconAnchor = new GPoint(9,23);
    icon_1.infoWindowAnchor = new GPoint(19,0);
    icon_1.printImage = 'http://google.webassist.com/google/markers/traditionalflat/pacifica.gif';
    icon_1.mozPrintImage = 'http://google.webassist.com/google/markers/traditionalflat/pacifica_mozprint.png';
    icon_1.printShadow = 'http://google.webassist.com/google/markers/traditionalflat/shadow.gif';
    icon_1.transparent = 'http://google.webassist.com/google/markers/traditionalflat/pacifica_transparent.png';
    
    var address_1 = {
      street: '',
      city: '',
      state: '',
      zip: '',
      country: '',
      infowindow: 'default',
      infowindowtext: '<span style="font: 12px Verdana, Arial, Helvetica, sans-serif; color: black;"><strong>Glenfarg Hotel</strong><br>Main Street<br>Glenfarg<br>Perth<br>PH2 9NU<br><br>Tel: 01577 830 241</span>',
      full: '56.279508,-3.398702',
      isdefault: true,
      addressType: 'coordinates',
      loop: '',
      latitude: '56.279508',
      longitude: '-3.398702',
      markerStyle: 'Google Traditional (flat)',
      markerColor: 'Pacifica'      
    };
    
    geocoder.getLatLng (
      address_1.full,
      function(point) {
        if(point) {
          var marker = new GMarker(point, icon_1);
          GEvent.addListener(marker, 'click', function() {
            marker.openInfoWindowHtml(address_1.infowindowtext);
          });
          if(!fromAddress.enabled || 'address_1' != 'address_0') {
            map.setCenter(point, 10);
            map.addOverlay(marker);
            // marker.openInfoWindowHtml(address_1.infowindowtext);
          }
        }
        else {
          map.setCenter(new GLatLng(37.4419, -122.1419), 10);
        }
      }
    );



    var icon_2 = new GIcon();
    icon_2.image = 'http://google.webassist.com/google/markers/traditionalflat/pacifica.png';
    icon_2.shadow = 'http://google.webassist.com/google/markers/traditionalflat/shadow.png';
    icon_2.iconSize = new GSize(34,35);
    icon_2.shadowSize = new GSize(34,35);
    icon_2.iconAnchor = new GPoint(9,23);
    icon_2.infoWindowAnchor = new GPoint(19,0);
    icon_2.printImage = 'http://google.webassist.com/google/markers/traditionalflat/pacifica.gif';
    icon_2.mozPrintImage = 'http://google.webassist.com/google/markers/traditionalflat/pacifica_mozprint.png';
    icon_2.printShadow = 'http://google.webassist.com/google/markers/traditionalflat/shadow.gif';
    icon_2.transparent = 'http://google.webassist.com/google/markers/traditionalflat/pacifica_transparent.png';
    
    var address_2 = {
      street: '',
      city: '',
      state: '',
      zip: '',
      country: '',
      infowindow: 'default',
      infowindowtext: '<span style="font: 12px Verdana, Arial, Helvetica, sans-serif; color: black;"><strong>The Inn at Lathones</strong><br>By Largoward<br>St. Andrews<br>Fife<br>KY9 1JE<br><br>Tel: 01334 840 494</span>',
      full: '56.268047,-2.848678',
      isdefault: true,
      addressType: 'coordinates',
      loop: '',
      latitude: '56.268047',
      longitude: '-2.848678',
      markerStyle: 'Google Traditional (flat)',
      markerColor: 'Pacifica'      
    };
    
    geocoder.getLatLng (
      address_2.full,
      function(point) {
        if(point) {
          var marker = new GMarker(point, icon_2);
          GEvent.addListener(marker, 'click', function() {
            marker.openInfoWindowHtml(address_2.infowindowtext);
          });
          if(!fromAddress.enabled || 'address_2' != 'address_0') {
            // map.setCenter(point, 9);
			// force map centre to where we want it
			map.setCenter(new GLatLng(56.274624,-3.139343), 10)
            map.addOverlay(marker);
            // marker.openInfoWindowHtml(address_2.infowindowtext);
          }
        }
        else {
          map.setCenter(new GLatLng(56.308920,-3.128357), 10);
        }
      }
    );


  }
}
