﻿function lMap()
{
	//<![CDATA[
	
    if (GBrowserIsCompatible()) { 
	 
	  var text = new Array('<a href="http://www.bowlandwalks.co.uk/?p=1688">Pendle Hill</a><p>Date: April 2010 <br> Distance: 4.5 miles / 2 hours</p>', 
						   '<a href="http://www.bowlandwalks.co.uk/?p=1521">Nicky Nook and Grizedale</a><p>Date: April 2010 <br> Distance: 6 miles / 2 - 3 hours</p>', 
						   '<a href="http://www.bowlandwalks.co.uk/?p=1474">Clougha Pike, Grit Fell <br> and Ward’s Stone</a><p>Date: April 2010 <br> Distance: 9 miles / 5 hours</p>', 
						   '<a href="http://www.bowlandwalks.co.uk/?p=1235">Stocks Reservoir</a><p>Date: March 2010 <br> Distance: 7 miles / 3 hours</p>',
						   '<a href="http://www.bowlandwalks.co.uk/?p=1134">The true centre of the UK?</a><p>Date: March 2010 <br> Distance: 7 miles / 4 hours</p>', 
						   '<a href="http://www.bowlandwalks.co.uk/?p=1073">Viewing the hills <br>of Chipping</a><p>Date: March 2010 <br> Distance: 7 miles / 3 hours</p>', 
						   '<a href="http://www.bowlandwalks.co.uk/?p=1038">Bleasdale Circular</a><p>Date: March 2010 <br> Distance: 4.5 miles / 2 hours</p>', 
						   '<a href="http://www.bowlandwalks.co.uk/?p=1015">Beacon Fell</a><p>Date: March 2010 <br> Distance: 1 miles / 20 mintues</p>',
						   '<a href="http://www.bowlandwalks.co.uk/?p=2010">Longridge</a><p>Date: May 2010 <br> Distance: 6 miles / 3 hours</p>',
						   '<a href="http://www.bowlandwalks.co.uk/?p=2111">Fair Snape Fell</a><p>Date: May 2010 <br> Distance: 6.25 miles / 3.5 hours</p>',
						   '<a href="http://www.bowlandwalks.co.uk/?p=2199">Hazlehurst Fell from Delph Lane</a><p>Date: June 2010 <br> Distance: 6 miles / 3 hours</p>',
						   '<a href="http://www.bowlandwalks.co.uk/?p=2161">Bleasdale</a><p>Date: June 2010 <br> Distance: 3.5 miles / 1.5 hours</p>',
						   '<a href="http://www.bowlandwalks.co.uk/?p=2425">The lonely phonebox near Chipping</a><p>Date: August 2010 <br> Distance: 2.3 miles / 1 hour</p>');
	  
	  var point = new Array(new GLatLng(53.870511,-2.283797), new GLatLng(53.934965,-2.748697), new GLatLng(54.021424,-2.720447),
					new GLatLng(54.00416,-2.410513), new GLatLng(53.960517,-2.567768), new GLatLng(53.884342,-2.57637), new GLatLng(53.895577,-2.65053),
					new GLatLng(53.880158,-2.666422), new GLatLng(53.856579,-2.549334), new GLatLng(53.893151,-2.64966), new GLatLng(53.904233,-2.692748),
					new GLatLng(53.902323, -2.650673),new GLatLng(53.909254,-2.54382));
 		 
      function createMarker(point,html) {
        var marker = new GMarker(point);
        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(html);
        });
        return marker;
      }
 	  
      // Display the map, with some controls and set the initial location 
      var map = new GMap2(document.getElementById("map"));
      map.addControl(new GLargeMapControl());
      map.addControl(new GMapTypeControl());
      map.setCenter(new GLatLng(53.982743,-2.522736),10);
    
      // Set up three markers with info windows 
    	
	  for(var i = 0 ; i < text.length; i++)
	  {
		  var marker = createMarker(point[i], text[i]);
		  map.addOverlay(marker);
	  }
		  	
	  
    }
    
    // display a warning if the browser was not compatible
    else {
      alert("Sorry, the Google Maps API is not compatible with this browser");
    }
 
    // This Javascript is based on code provided by the
    // Community Church Javascript Team
    // http://www.bisphamchurch.org.uk/   
    // http://econym.org.uk/gmap/
 
    //]]>
}
