    //<![CDATA[
    
    var iconAncient = new GIcon(); 
    iconAncient.image = 'http://www.isleofalbion.co.uk/images/icons/ancient.png';
    iconAncient.shadow = 'http://www.isleofalbion.co.uk/images/icons/shadow.png';
    iconAncient.iconSize = new GSize(32, 37);
    iconAncient.shadowSize = new GSize(64, 37);
    iconAncient.iconAnchor = new GPoint(16, 37);
    iconAncient.infoWindowAnchor = new GPoint(16, 0);

    var iconCircle = new GIcon(); 
    iconCircle.image = 'http://www.isleofalbion.co.uk/images/icons/circle.png';
    iconCircle.shadow = 'http://www.isleofalbion.co.uk/images/icons/shadow.png';
    iconCircle.iconSize = new GSize(32, 37);
    iconCircle.shadowSize = new GSize(64, 37);
    iconCircle.iconAnchor = new GPoint(16, 37);
    iconCircle.infoWindowAnchor = new GPoint(16, 0);

    var iconChurch = new GIcon(); 
    iconChurch.image = 'http://www.isleofalbion.co.uk/images/icons/church.png';
    iconChurch.shadow = 'http://www.isleofalbion.co.uk/images/icons/shadow.png';
    iconChurch.iconSize = new GSize(32, 37);
    iconChurch.shadowSize = new GSize(64, 37);
    iconChurch.iconAnchor = new GPoint(16, 37);
    iconChurch.infoWindowAnchor = new GPoint(16, 0);

    var iconCastle = new GIcon(); 
    iconCastle.image = 'http://www.isleofalbion.co.uk/images/icons/castle.png';
    iconCastle.shadow = 'http://www.isleofalbion.co.uk/images/icons/shadow.png';
    iconCastle.iconSize = new GSize(32, 37);
    iconCastle.shadowSize = new GSize(64, 37);
    iconCastle.iconAnchor = new GPoint(16, 37);
    iconCastle.infoWindowAnchor = new GPoint(16, 0);

    var iconHouse = new GIcon(); 
    iconHouse.image = 'http://www.isleofalbion.co.uk/images/icons/house.png';
    iconHouse.shadow = 'http://www.isleofalbion.co.uk/images/icons/shadow.png';
    iconHouse.iconSize = new GSize(32, 37);
    iconHouse.shadowSize = new GSize(64, 37);
    iconHouse.iconAnchor = new GPoint(16, 37);
    iconHouse.infoWindowAnchor = new GPoint(16, 0);

    var iconUrban = new GIcon(); 
    iconUrban.image = 'http://www.isleofalbion.co.uk/images/icons/urban.png';
    iconUrban.shadow = 'http://www.isleofalbion.co.uk/images/icons/shadow.png';
    iconUrban.iconSize = new GSize(32, 37);
    iconUrban.shadowSize = new GSize(64, 37);
    iconUrban.iconAnchor = new GPoint(16, 37);
    iconUrban.infoWindowAnchor = new GPoint(16, 0);

    var iconAbbey = new GIcon(); 
    iconAbbey.image = 'http://www.isleofalbion.co.uk/images/icons/abbey.png';
    iconAbbey.shadow = 'http://www.isleofalbion.co.uk/images/icons/shadow.png';
    iconAbbey.iconSize = new GSize(32, 37);
    iconAbbey.shadowSize = new GSize(64, 37);
    iconAbbey.iconAnchor = new GPoint(16, 37);
    iconAbbey.infoWindowAnchor = new GPoint(16, 0);

    var iconClerical = new GIcon(); 
    iconClerical.image = 'http://www.isleofalbion.co.uk/images/icons/clerical.png';
    iconClerical.shadow = 'http://www.isleofalbion.co.uk/images/icons/shadow.png';
    iconClerical.iconSize = new GSize(32, 37);
    iconClerical.shadowSize = new GSize(64, 37);
    iconClerical.iconAnchor = new GPoint(16, 37);
    iconClerical.infoWindowAnchor = new GPoint(16, 0);

    var customIcons = [];
    customIcons["circle"] = iconCircle;
    customIcons["row"] = iconAncient;
    customIcons["barrow"] = iconAncient;
    customIcons["earthwork"] = iconAncient;
    customIcons["ancientother"] = iconAncient;
    customIcons["abbey"] = iconAbbey;
    customIcons["castle"] = iconCastle;
    customIcons["church"] = iconChurch;
    customIcons["house"] = iconHouse;
    customIcons["clerical"] = iconClerical;
    customIcons["urban"] = iconUrban;

      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("guide_map_loader"));
        map.setMapType( maptype );
        map.addControl(new GLargeMapControl3D());
        map.addControl(new GMapTypeControl());
        map.setCenter(new GLatLng(lat, lng), zoom);

        GDownloadUrl("http://www.isleofalbion.co.uk/maps/data.php", function(data) {
          var xml = GXml.parse(data);
          var markers = xml.documentElement.getElementsByTagName("marker");
          for (var i = 0; i < markers.length; i++) {
            var index = markers[i].getAttribute("index");
            var link = markers[i].getAttribute("link");
            var img = markers[i].getAttribute("img");
            var name = markers[i].getAttribute("name");
            var type = markers[i].getAttribute("type");
            var typename = markers[i].getAttribute("typename");
            var rating = markers[i].getAttribute("rating");
            var county = markers[i].getAttribute("county");
            var point = new GLatLng(parseFloat(markers[i].getAttribute("lat")),
                                    parseFloat(markers[i].getAttribute("lng")));
            var marker = createMarker(point, name, type, link , img, rating, index, county, typename);
            map.addOverlay(marker);
          }
        });
      }

    function createMarker(point, name, type, link , img, rating, index, county, typename) {
      var marker = new GMarker(point, {icon:customIcons[type], title:name}); 

var html="<div class='map_bubble_left'><a class='map_thumb' title='Open Site Guide' href='" + link  + "' target='_self'><img class='map_thumb' src='http://www.isleofalbion.co.uk/images/thumbs/" + img + ".jpg' alt='" + name + "' width='100' height='66'><\/a><\/div>" + 

"<div class='map_bubble_right'><a class='map_link' title='Open Site Guide' href='" + link  + "' target='_self' title='" + name + "'>" + name + "<\/a><br>" + typename + "<br>" + county + "<br>Site Ranking: " + rating + "/5<\/div>";

      GEvent.addListener(marker, 'click', function() {
        marker.openInfoWindowHtml(html);
      });
      return marker;
    }
    //]]>
