  var geoZoom = 12;
  var geoPoints = new Array();
  var geoMarkers = new Array();

  function addGeoPoint(intLatitude, intLongitude, strTitle)
  {
    var objPoint = new Object();
    objPoint.Latitude = intLatitude;
    objPoint.Longitude = intLongitude;
    if (typeof(strTitle) != "undefined")
      objPoint.Title = strTitle;
    geoPoints[geoPoints.length] = objPoint;
  }

  function setGeoZoom(intDistance)
  {
    if (intDistance > 51)
      geoZoom = 7;
    else if (intDistance > 21)
      geoZoom = 8;
    else if (intDistance > 11)
      geoZoom = 9;
    else if (intDistance > 6)
      geoZoom = 10;
    else if (intDistance > 3)
      geoZoom = 11;
  }

  function geoMapLoad()
  {
	  if (GBrowserIsCompatible())
    {
      var letteredIcon = new GIcon(G_DEFAULT_ICON, "http://maps.google.com/intl/en_uk/mapfiles/icon_green.png");
      letteredIcon.iconSize = new GSize(24, 38);
      var markerOptions = { icon:letteredIcon };

		  var map = new GMap2(document.getElementById("geo-map"));
      map.addControl(new GLargeMapControl());
      map.addControl(new GMapTypeControl());
      map.addControl(new GScaleControl());
      for (var intIdx = 0; intIdx < geoPoints.length; intIdx++)
      {
        var point = new GLatLng(geoPoints[intIdx].Latitude, geoPoints[intIdx].Longitude);
		    if (intIdx == 0)
        {
          map.setCenter(point, geoZoom);
          if (geoPoints.length > 1)
            var marker = new GMarker(point, markerOptions);
          else
            var marker = new GMarker(point);
        }
        else
          var marker = new GMarker(point);
        marker.title = geoPoints[intIdx].Title;
	      map.addOverlay(marker);
        GEvent.addListener(marker, "click", function() {
				  this.openInfoWindowHtml("<p>" + this.title + "</p>");
        });
        geoMarkers[geoMarkers.length] = marker;
      }
	  }
  }

  function findLocation(intIndex)
  {
    GEvent.trigger(geoMarkers[intIndex], "click");
  }

