
googleMap = true;

var map;
var baseIcon;
var gmarkers = [];
var htmls = [];
function ShowMap(){
	var bounds = new GLatLngBounds();

	map = new GMap2(document.getElementById("map"));
	map.setCenter(new GLatLng(53.816616,-3.024931), 6);
	map.addControl(new GLargeMapControl());

	baseIcon = new GIcon();
	baseIcon.image = "../Images/Markers/marker.png";
	baseIcon.shadow = "../Images/Markers/shadow50.png";
	baseIcon.iconSize = new GSize(20, 34);
	baseIcon.shadowSize = new GSize(37, 34);
	baseIcon.iconAnchor = new GPoint(9, 34);
	baseIcon.infoWindowAnchor = new GPoint(9, 2);
	baseIcon.infoShadowAnchor = new GPoint(18, 25);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(53.790055,-3.054789);
	bounds.extend(point);
	var marker = createMarker(point, "Blackpool Pleasure Beach", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Blackpool Pleasure Beach</b><br>Pleasure Beach, Blackpool is one of Britain's<br>top tourist attraction with over 145 rides<br>and attractions<br>", 1);
	gmarkers[0] = marker;
	htmls[0] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Blackpool Pleasure Beach</b><br>Pleasure Beach, Blackpool is one of Britain's<br>top tourist attraction with over 145 rides<br>and attractions<br>";
	map.addOverlay(marker);


	var icon = new GIcon(baseIcon);
	var point = new GLatLng(53.815513,-3.055251);
	bounds.extend(point);
	var marker = createMarker(point, "Blackpool Tower", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Blackpool Tower</b><br>There are guided lifts every five minutes<br>to the Tower Top. Arriving at 380 feet<br>there's a real panoramic view. On a<br>clear day you can see as far as North Wales,<br>the Lake District and the Isle of Man.<br>", 2);
	gmarkers[1] = marker;
	htmls[1] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Blackpool Tower</b><br>There are guided lifts every five minutes<br>to the Tower Top. Arriving at 380 feet<br>there's a real panoramic view. On a<br>clear day you can see as far as North Wales,<br>the Lake District and the Isle of Man.<br>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(53.815729,-3.010908);
	bounds.extend(point);
	var marker = createMarker(point, "Blackpool Zoo", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Blackpool Zoo</b><br>Just two miles from the famous sea-front, Blackpool<br>Zoo provides a home to over 1,500 animals<br>from all over the world.<br>", 3);
	gmarkers[2] = marker;
	htmls[2] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Blackpool Zoo</b><br>Just two miles from the famous sea-front, Blackpool<br>Zoo provides a home to over 1,500 animals<br>from all over the world.<br>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(53.780826,-3.05377);
	bounds.extend(point);
	var marker = createMarker(point, "Karting 2000", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Karting 2000</b><br>Live life in the fast lane? Take a trip<br>down to Karting 2000 on Blackpool's south<br>shore. A popular one with the kids<br>find supervision from fully qualified<br>staff and a cafe for the lesser speed lovers<br>amongst you.<br>", 4);
	gmarkers[3] = marker;
	htmls[3] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Karting 2000</b><br>Live life in the fast lane? Take a trip<br>down to Karting 2000 on Blackpool's south<br>shore. A popular one with the kids<br>find supervision from fully qualified<br>staff and a cafe for the lesser speed lovers<br>amongst you.<br>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(53.812321,-3.019116);
	bounds.extend(point);
	var marker = createMarker(point, "Blackpool Model Village & Gardens", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Blackpool Model Village & Gardens</b><br>As seen on TV, our village and gardens<br>are set into a stunningly beautiful<br>landscaped 2 and a half acres of carefully tended<br>gardens with pathways that provide full access to<br>all of our visitors.<br></p>", 5);
	gmarkers[4] = marker;
	htmls[4] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Blackpool Model Village & Gardens</b><br>As seen on TV, our village and gardens<br>are set into a stunningly beautiful<br>landscaped 2 and a half acres of carefully tended<br>gardens with pathways that provide full access to<br>all of our visitors.<br></p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(53.811984,-3.054981);
	bounds.extend(point);
	var marker = createMarker(point, "Blackpool Sea Life", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Blackpool Sea Life</b><br>Blackpool Sea Life is where you can experience<br>an underwater adventure with an amazing<br>collection of marine and freshwater<br>marine creatures.<br></p>", 6);
	gmarkers[5] = marker;
	htmls[5] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Blackpool Sea Life</b><br>Blackpool Sea Life is where you can experience<br>an underwater adventure with an amazing<br>collection of marine and freshwater<br>marine creatures.<br></p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(53.811029,-3.056602);
	bounds.extend(point);
	var marker = createMarker(point, "Central Pier", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Central Pier</b><br>The pier has been renovated over the last<br>two decades, most noticeably with the<br>construction of a ferris wheel. The<br>pier now has a funfair, a theatre, a bar,<br>and has a feel to it that epitomises the Great<br>British seaside.<br></p>", 7);
	gmarkers[6] = marker;
	htmls[6] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Central Pier</b><br>The pier has been renovated over the last<br>two decades, most noticeably with the<br>construction of a ferris wheel. The<br>pier now has a funfair, a theatre, a bar,<br>and has a feel to it that epitomises the Great<br>British seaside.<br></p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(53.817661,-3.052386);
	bounds.extend(point);
	var marker = createMarker(point, "Winter Gardens", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Winter Gardens</b><br>The Winter Gardens were originally intended to<br>provide entertainment for the people of Blackpool,<br>especially during the winter months.<br>It was built by the Victorians, and housed a<br>palm garden and an opera house. Since<br>then it has been extended and renovated several<br>times, and today houses one of the largest theatres<br>in Europe, a world - famous ballroom, and 12<br>other individual venues that are used<br>for various exhibitions and events throughout<br>the year.<br></p>", 8);
	gmarkers[7] = marker;
	htmls[7] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Winter Gardens</b><br>The Winter Gardens were originally intended to<br>provide entertainment for the people of Blackpool,<br>especially during the winter months.<br>It was built by the Victorians, and housed a<br>palm garden and an opera house. Since<br>then it has been extended and renovated several<br>times, and today houses one of the largest theatres<br>in Europe, a world - famous ballroom, and 12<br>other individual venues that are used<br>for various exhibitions and events throughout<br>the year.<br></p>";
	map.addOverlay(marker);

var icon = new GIcon(baseIcon);
	var point = new GLatLng(53.815019,-3.024566);
	bounds.extend(point);
	var marker = createMarker(point, "Stanley Park", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Stanley Park</b><br>Stanley Park is the ideal destination<br>for a lazy day out, for families,<br>couples and groups. Have a laugh<br>playing crazy golf, or brush<br>up on your skills on the 18-hole putting<br>greens.<br></p>", 9);
	gmarkers[8] = marker;
	htmls[8] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Stanley Park</b><br>Stanley Park is the ideal destination<br>for a lazy day out, for families,<br>couples and groups. Have a laugh<br>playing crazy golf, or brush<br>up on your skills on the 18-hole putting<br>greens.<br></p>";
	map.addOverlay(marker);
	
	map.setZoom(map.getBoundsZoomLevel(bounds));
	map.savePosition();
}

function createMarker(point, title, text, index){
	var icon = new GIcon(baseIcon);
	icon.image = "../images/icons/" + index + ".png";
	var marker = new GMarker(point, icon);
	marker.title = "" + title + "";
	GEvent.addListener(marker, "click", function() {
	  marker.openInfoWindowHtml("" + text + "");
	});
	return marker;
}

function myclick(i) {
	gmarkers[i].openInfoWindowHtml(htmls[i]);
}
