//<![CDATA[
// Creates a marker at the given point with the given number label
function createMarker(point, number) {
  // Create our "tiny" marker icon
  var icon = new GIcon();
  icon.image = "images/cabin-thumb.png";
  icon.iconSize = new GSize(50, 50);
  icon.iconAnchor = new GPoint(25, 50);
  icon.infoWindowAnchor = new GPoint(5, 1);
  var marker = new GMarker(point, icon);
  GEvent.addListener(marker, "click", function() {
    marker.openInfoWindowHtml(number);
  });
  return marker;
}

    function load() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        var milnthorpe = new GLatLng(54.226708, -2.768555);
        var omagh = new GLatLng(54.600305, -7.298402);
		var bonnybridge = new GLatLng(55.995907, -3.888419);
		var newchurch = new GLatLng(50.665023, -1.208324);
        var clowne = new GLatLng(53.27589,-1.262741);
        var doncaster = new GLatLng(53.523041,-1.133762);
		var ceredigion = new GLatLng(52.416032,-4.083824);
        map.addControl(new GLargeMapControl());
        map.addControl(new GScaleControl());
        map.addControl(new GMapTypeControl());
        map.addControl(new GOverviewMapControl());
        map.setCenter(new GLatLng(53.347029, -2.300000), 5);
        map.addOverlay(createMarker(milnthorpe, '<h3 class="blackText">Milnthorpe, Cumbria</h3><p class="blackText">Contact: Paul Dunn</p><form action="http://maps.google.co.uk/maps" target="vp"><input value="milnthorpe,cumbria @54.226708,-2.768555" name="daddr" type="hidden"/><div class="label"><p class="blackText">Enter your start address for directions</p></div><div><input class="inpt" id="iwdaddr" name="saddr" type="text" value=""/></div><div><input type="submit" value="Get Directions"/></div></form>'));
		map.addOverlay(createMarker(omagh, '<h3 class="blackText">Omagh, Northern Ireland</h3><p class="blackText">Contact: Austin Shortt</p><form action="http://maps.google.co.uk/maps" target="vp"><input value="omagh,northern ireland @54.600305,-7.298402" name="daddr" type="hidden"/><div class="label"><p class="blackText">Enter your start address for directions</p></div><div><input class="inpt" id="iwdaddr" name="saddr" type="text" value=""/></div><div><input type="submit" value="Get Directions"/></div></form>'));
		map.addOverlay(createMarker(newchurch, '<h3 class="blackText">Newchurch, Isle of Wight</h3><p class="blackText">Contact: David Hughes</p><form action="http://maps.google.co.uk/maps" target="vp"><input value="newchurch,isle of wight @50.665023,-1.208324" name="daddr" type="hidden"/><div class="label"><p class="blackText">Enter your start address for directions</p></div><div><input class="inpt" id="iwdaddr" name="saddr" type="text" value=""/></div><div><input type="submit" value="Get Directions"/></div></form>'));
		map.addOverlay(createMarker(bonnybridge, '<h3 class="blackText">Bonnybridge, Falkirk</h3><p class="blackText">Contact: Virginia Lucey</p><form action="http://maps.google.co.uk/maps" target="vp"><input value="bonnybridge, falkirk @55.995907,-3.888419" name="daddr" type="hidden"/><div class="label"><p class="blackText">Enter your start address for directions</p></div><div><input class="inpt" id="iwdaddr" name="saddr" type="text" value=""/></div><div><input type="submit" value="Get Directions"/></div></form>'));
		map.addOverlay(createMarker(clowne, '<h3 class="blackText">Clowne, Derbyshire</h3><p class="blackText">Contact: Andrew Cooling</p><form action="http://maps.google.co.uk/maps" target="vp"><input value="clowne,derbyshire @53.27589,-1.262741" name="daddr" type="hidden"/><div class="label"><p class="blackText">Enter your start address for directions</p></div><div><input class="inpt" id="iwdaddr" name="saddr" type="text" value=""/></div><div><input type="submit" value="Get Directions"/></div></form>'));
		map.addOverlay(createMarker(doncaster, '<h3 class="blackText">Doncaster, South Yorkshire</h3><p class="blackText">Contact: Pete Dunstan</p><form action="http://maps.google.co.uk/maps" target="vp"><input value="doncaster,south yourkshire @53.523041,-1.133762" name="daddr" type="hidden"/><div class="label"><p class="blackText">Enter your start address for directions</p></div><div><input class="inpt" id="iwdaddr" name="saddr" type="text" value=""/></div><div><input type="submit" value="Get Directions"/></div></form>'));
		map.addOverlay(createMarker(ceredigion, '<h3 class="blackText">Ceredigion, Wales</h3><p class="blackText">Contact: Ken Roberts</p><form action="http://maps.google.co.uk/maps" target="vp"><input value="ceredigion,wales @52.416032,-4.083824" name="daddr" type="hidden"/><div class="label"><p class="blackText">Enter your start address for directions</p></div><div><input class="inpt" id="iwdaddr" name="saddr" type="text" value=""/></div><div><input type="submit" value="Get Directions"/></div></form>'));
      }
    }
//]]>