function vcGetMap() {

//<![CDATA[
var map_base_id=18;
var map_base_lat=55.138454;
var map_base_lng=-3.439166;
var map_base_zoom=5;

// Create a base icon for all of our markers that specifies the
// shadow, icon dimensions, etc.

var baseIcon = new GIcon(G_DEFAULT_ICON);
baseIcon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
baseIcon.iconSize = new GSize(12,20);
baseIcon.shadowSize = new GSize(20,20);
baseIcon.iconAnchor = new GPoint(4,20);
baseIcon.infoWindowAnchor = new GPoint(6,2);
if (GBrowserIsCompatible()) {
	// A function to create the marker and set up the event window
	function createMarker(point,html,type,index) {
        var mapIcon = new GIcon(baseIcon);
		mapIcon.image = "http://labs.google.com/ridefinder/images/mm_20_red.png";
        if(type == 4) {
			mapIcon.image = "http://labs.google.com/ridefinder/images/mm_20_green.png";
        }
		if(type == 9) {
            mapIcon.image = "http://labs.google.com/ridefinder/images/mm_20_blue.png";
        }
		// Set up our GMarkerOptions object
		markerOptions = { icon:mapIcon };
        var marker = new GMarker(point,markerOptions);
        GEvent.addListener(marker, "click", function() {
			marker.openInfoWindowHtml(html);
        });
        return marker;
    }
	var map = new GMap2(document.getElementById("map"));
	map.addControl(new GSmallMapControl());
	map.addControl(new GMapTypeControl());
	map.setCenter(new GLatLng(map_base_lat,map_base_lng), map_base_zoom);
	GDownloadUrl('http://www.vineyardchurches.org.uk/getMappings.php', function(data) {
		var i = 0;
		$(data.replace('<?xml version="1.0"?>','')).find("marker").each(function(){
			if ($(this).attr("lat") != '' && $(this).attr("lng") != '') {
				var name = $(this).attr("church_name");
				var address = $(this).attr("address");
	            var link = $(this).attr("link");
	            var type = $(this).attr("type");
	            var point = new GLatLng(parseFloat($(this).attr("lat")),parseFloat($(this).attr("lng")));
	            var html = '<div class="map_info_text"><h3 class="info_name">' + name + '</h3><h4>Sunday Service</h4><p class="info_address">' + address + '</p><p><a href="http://www.vineyardchurches.org.uk/churches/church/' + link + '.html">Click here to find out more about this church &gt;</a></div>';
	            // create the marker
				var marker = createMarker(point,html,type,i);
	            map.addOverlay(marker);
	            i++;
			}
        });
    });
}
//]]>

}
