   function initialize() {
   	
      if (GBrowserIsCompatible()) {
	  	var baseIcon = new GIcon(G_DEFAULT_ICON);
		baseIcon.image = "../images/blank.png";
		
	  	function createMarker(lat, lon, name, town) {
			//alert("about to add marker for " + cname + " at lat " + lat); 
       		var letteredIcon = new GIcon(baseIcon);
			var pt = new GLatLng(lat, lon);
          	// Set up our GMarkerOptions object
			markerOptions = { icon:letteredIcon };
			var marker = new GMarker(pt, markerOptions);
			GEvent.addListener(marker, "click", function() {
        		marker.openInfoWindowHtml("<b>" + name + "<br />"+town+"</b>");
			});
			GEvent.addListener(marker, "mouseover", function() {
				marker.openInfoWindowHtml("<b>" + name + "<br />" + town+"</b>");
				});
			return marker;
        };
	  	var pt = new GLatLng(53.258806, -2.518091);
	  	var map = new GMap2(document.getElementById("map"));
		map.setCenter(pt, 10);
		//add the zoom control
		map.addControl(new GSmallMapControl());
		

		//now we need to get the lat and long of all the churches from the points field on the form
		var list = document.getElementById("points").value;

		
		//split the list at each ;
		var mySplitResult = list.split(";");
		for(i = 0; i < mySplitResult.length; i++){
			if (mySplitResult[i] != ""){
				var newPoint = mySplitResult[i];
				//create a point on the map
				var splitLat = newPoint.split(",");
				var lat = splitLat[0]; 
				var lon = splitLat[1];
				var cname = splitLat[2];
				var town = splitLat[3];
				createMarker(lat, lon, cname, town);
				map.addOverlay(createMarker(lat, lon, cname, town));
			}	
		}
      }
    }
	

