// JavaScript Document

    //<![CDATA[


	// Create our "tiny" marker icon
    var icon = new GIcon();
    icon.image = "http://labs.google.com/ridefinder/images/mm_20_red.png";
    icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
    icon.iconSize = new GSize(12, 20);
    icon.shadowSize = new GSize(22, 20);
    icon.iconAnchor = new GPoint(6, 20);
    icon.infoWindowAnchor = new GPoint(5, 1);

    // Creates a marker at the given point
    function createMarker(point, node)
    {
    	var marker = new GMarker(point);
	    GEvent.addListener(marker, "click", function() {
	        marker.openInfoWindow(node);
	      });
	    return marker;
    }

    // Creates a mini-marker at the given point
	function createMiniMarker(point, node)
	{
	    var marker = new GMarker(point,icon);
	    GEvent.addListener(marker, "click", function() {
	        marker.openInfoWindowHtml(node);
	      });
	    return marker;
    }


    function load()
    {
      if (GBrowserIsCompatible())
      {
        var map = new GMap2(document.getElementById("map"));
        map.addControl(new GSmallMapControl());
        map.addControl(new GMapTypeControl());

        map.setCenter(new GLatLng(51.8914,-1.1380), 8);

		// ** DRAW A POLYGON using club locations as points
		/**
		var points = [];
		points.push(new GLatLng(51.7573,-1.5897));
		points.push(new GLatLng(52.2154,-0.9157));
		points.push(new GLatLng(51.5752,-0.3978));
		points.push(new GLatLng(51.8260,-0.8457));
		points.push(new GLatLng(51.7573,-1.5897));

		map.addOverlay(new GPolygon(points,'#FF0000','1','0.7','#0000FF','0.3'));
		**/

		// ** CLUB LOCATIONS **
		
		// LAT & LONG can be found on various sites such as : http://www.satsig.net/maps/lat-long-finder.htm

        // Add marker to the map at Bicester Aikido Club
        var point = new GLatLng(51.8914,-1.1380);
		map.addOverlay(createMarker(point, document.getElementById("infoBicester")));
		
		// Add marker to the map at North Cotswolds Aikido Club
        var point = new GLatLng(51.9632,-1.9643);
		map.addOverlay(createMiniMarker(point, document.getElementById("infoNorthCots")));
		

		// Add mini-marker to the map at Witney and Carterton Aikido Club
        var point = new GLatLng(51.7573,-1.5897);
		map.addOverlay(createMiniMarker(point, document.getElementById("infoCarterton")));
		
		// Add mini-marker to the map at Witney and Carterton Aikido Club 2
        // var point = new GLatLng(51.7661,-1.5872);
		// map.addOverlay(createMiniMarker(point, document.getElementById("infoCarterton2")));

        // Add mini-marker to the map at Aylesbury Kai Shin Kai
        var point = new GLatLng(51.8260,-0.8457);
		map.addOverlay(createMiniMarker(point, document.getElementById("infoAylesbury")));

        // Add mini-marker to the map at Pinner Aikido Club
        var point = new GLatLng(51.5752,-0.3978);
		map.addOverlay(createMiniMarker(point, document.getElementById("infoPinner")));

        // Add mini-marker to the map at Northampton KSK
        var point = new GLatLng(52.2154,-0.9157);
		map.addOverlay(createMiniMarker(point, document.getElementById("infoNorthampton")));
		
        // Add mini-marker to the map at Northampton (Zanchin) KSK
        var point = new GLatLng(52.2524,-0.8879);
		map.addOverlay(createMiniMarker(point, document.getElementById("infoZanchin")));
		
        // Add mini-marker to the map at Towcester KSK
        var point = new GLatLng(52.1268,-0.9922);
		map.addOverlay(createMiniMarker(point, document.getElementById("infoTowcester")));
		
        // Add mini-marker to the map at Coventry Aikido (1)
        var point = new GLatLng(52.4244,-1.4722);
		map.addOverlay(createMiniMarker(point, document.getElementById("infoCoventry1")));
		
        // Add mini-marker to the map at Coventry Aikido (2)
        var point = new GLatLng(52.4348,-1.4953);
		map.addOverlay(createMiniMarker(point, document.getElementById("infoCoventry2")));
		
        // Add mini-marker to the map at Reading Ni Sen Kan
        var point = new GLatLng(51.4523,-0.9169);
		map.addOverlay(createMiniMarker(point, document.getElementById("infoNisenkan")));

        // Add mini-marker to the map at Central Berkshire Traditional Aikido Club
        var point = new GLatLng(51.4971,-0.7641);
		map.addOverlay(createMiniMarker(point, document.getElementById("infoWaltham")));
		
        // Add mini-marker to the map at Devizes Budo Club
        var point = new GLatLng(51.3556,-2.0091);
		map.addOverlay(createMiniMarker(point, document.getElementById("infoDevizes")));
		
        // Add mini-marker to the map at Chippenham Aikido Club
        var point = new GLatLng(51.4586,-2.1083);
		map.addOverlay(createMiniMarker(point, document.getElementById("infoChippenham")));

      }
    }

    //]]>

