//<![CDATA[
function load() 
{
    if (GBrowserIsCompatible()) 
    {
        var map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(50.33560700915242,-5.1440370082855225), 15);
        map.addControl(new GSmallMapControl());
        
        // Set up custom marker icon
        var kernowcraftIcon = new GIcon();
        kernowcraftIcon.image = "/img/site/googlemaps/dot.png";
        //kernowcraftIcon.shadow = "/img/site/googlemaps/dotshadow.png";
        kernowcraftIcon.iconSize = new GSize(32, 34);
        //kernowcraftIcon.shadowSize = new GSize(52, 34);
        kernowcraftIcon.iconAnchor = new GPoint(16, 17);
        kernowcraftIcon.infoWindowAnchor = new GPoint(26, 0);
        
        // Function to add a new marker
        function addMarker(map, point, icon) 
        {
            var marker = new GMarker(point, icon);
            map.addOverlay(marker);
            GEvent.addListener(marker, "click", function() 
            {
                marker.openInfoWindowHtml("<div style=\"white-space:nowrap\"><img style=\"border:none;\" src=\"/img/site/logo_small.gif\" /><br />We're here!</div>");
            });
            GEvent.trigger(marker,'click');
        }
        
        // Set the point at which we want our marker to appear
        var point = new GLatLng(50.33560700915242,-5.1440370082855225);
        
        addMarker(map, point, kernowcraftIcon);
    }
}
//]]>
