
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.470883,-2.245846), 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.485064,-2.243239);
	bounds.extend(point);
	var marker = createMarker(point, "The Triangle", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>The Triangle</b><br>Created from the fine, Victorian Corn Exchange<br>buildings, close to the cathedral, it has become<br>a high class shopping centre, offering<br>some of the best shops, restaurants and bars<br>in Manchester.<br>", 1);
	gmarkers[0] = marker;
	htmls[0] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>The Triangle</b><br>Created from the fine, Victorian Corn Exchange<br>buildings, close to the cathedral, it has become<br>a high class shopping centre, offering<br>some of the best shops, restaurants and bars<br>in Manchester.<br>";
	map.addOverlay(marker);


	var icon = new GIcon(baseIcon);
	var point = new GLatLng(53.485064,-2.243239);
	bounds.extend(point);
	var marker = createMarker(point, "Manchester Art Gallery", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Manchester Art Gallery</b><br>Find an impressive neo-Grecian surrounding with<br>paintings, sculptures, ceramics and decorative arts<br>abound, including an internationally famous collection of<br>Pre-Raphaelite paintings. Landscape painters such as Stubbs,<br>Gainsborough and Turner can also be found here.<br>", 2);
	gmarkers[1] = marker;
	htmls[1] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Manchester Art Gallery</b><br>Find an impressive neo-Grecian surrounding with<br>paintings, sculptures, ceramics and decorative arts<br>abound, including an internationally famous collection of<br>Pre-Raphaelite paintings. Landscape painters such as Stubbs,<br>Gainsborough and Turner can also be found here.<br>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(53.476541,-2.246511);
	bounds.extend(point);
	var marker = createMarker(point, "G-Mex Centre", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>G-Mex Centre</b><br>Once the old Central Railway Station, the G-Mex<br>is not only an impressive exhibition and events centre,<br>but also an important local landmark mixing modern<br>architectural flair with Victorian elegance.<br>", 3);
	gmarkers[2] = marker;
	htmls[2] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>G-Mex Centre</b><br>Once the old Central Railway Station, the G-Mex<br>is not only an impressive exhibition and events centre,<br>but also an important local landmark mixing modern<br>architectural flair with Victorian elegance.<br>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(53.338138,-2.054765);
	bounds.extend(point);
	var marker = createMarker(point, "Lyme Park", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Lyme Park</b><br>This is a beautiful, 1,377-acre National<br>Trust deer park with panoramic views over much of<br>Manchester and the Peak District. There are<br>themed tours around the hall during the summer and<br>a wonderfully old-fashioned coffee shop that serves<br>cream teas at reasonable prices.<br>", 4);
	gmarkers[3] = marker;
	htmls[3] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Lyme Park</b><br>This is a beautiful, 1,377-acre National<br>Trust deer park with panoramic views over much of<br>Manchester and the Peak District. There are<br>themed tours around the hall during the summer and<br>a wonderfully old-fashioned coffee shop that serves<br>cream teas at reasonable prices.<br>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(53.476362,-2.253034);
	bounds.extend(point);
	var marker = createMarker(point, "Museum of Science & Industry", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Museum of Science & Industry</b><br>The Museum of Science & Industry has won many awards<br>for its interactive, hands-on approach. Stand<br>and look in awe at a Beyer Garratt locomotive<br>or walk through a perfect reconstruction of a<br>19th-century sewer!<br></p>", 5);
	gmarkers[4] = marker;
	htmls[4] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Museum of Science & Industry</b><br>The Museum of Science & Industry has won many awards<br>for its interactive, hands-on approach. Stand<br>and look in awe at a Beyer Garratt locomotive<br>or walk through a perfect reconstruction of a<br>19th-century sewer!<br></p>";
	map.addOverlay(marker);

var icon = new GIcon(baseIcon);
	var point = new GLatLng(53.477473,-2.246039);
	bounds.extend(point);
	var marker = createMarker(point, "Free Trade Hall", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Free Trade Hall</b><br>Recently re-opened after extensive refurbishment, this<br>iconic brick edifice is one of Manchester's most famous<br>landmarks and is a major local sightseeing<br>attraction, thanks to its rich history of hosting<br>important social and cultural events.<br></p>", 6);
	gmarkers[5] = marker;
	htmls[5] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Free Trade Hall</b><br>Recently re-opened after extensive refurbishment, this<br>iconic brick edifice is one of Manchester's most famous<br>landmarks and is a major local sightseeing<br>attraction, thanks to its rich history of hosting<br>important social and cultural events.<br></p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(53.486181,-2.241962);
	bounds.extend(point);
	var marker = createMarker(point, "Urbis", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Urbis</b><br>Urbis, known as one of the first glass buildings ever<br>built in Manchester, Urbis is famous for its exhibitions and<br>displays about seasonal events and contemporary<br>culture.<br></p>", 7);
	gmarkers[6] = marker;
	htmls[6] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Urbis</b><br>Urbis, known as one of the first glass buildings ever<br>built in Manchester, Urbis is famous for its exhibitions and<br>displays about seasonal events and contemporary<br>culture.<br></p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(53.484739,-2.244151);
	bounds.extend(point);
	var marker = createMarker(point, "Manchester Cathedral", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Manchester Cathedral</b><br>Ideally situated on Victoria Street in central Manchester,<br>Manchester Cathedral was constructed over a period of<br>600 years. It is a peaceful place that is extremely<br>popular amongst tourists in Manchester.<br></p>", 8);
	gmarkers[7] = marker;
	htmls[7] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Manchester Cathedral</b><br>Ideally situated on Victoria Street in central Manchester,<br>Manchester Cathedral was constructed over a period of<br>600 years. It is a peaceful place that is extremely<br>popular amongst tourists in Manchester.<br></p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(53.478322,-2.256403);
	bounds.extend(point);
	var marker = createMarker(point, "Granada TV Studios", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Granada TV Studios</b><br>Enjoy a two-hour tour of the Granada film studios,<br>which were opened in 1988. This glimpse of the<br>fascinating world of film and television<br>includes a visit to the properties store, cutting<br>room and various sets. It's a must see for all the<br>Coronation Street fans with you.<br></p>", 9);
	gmarkers[8] = marker;
	htmls[8] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Granada TV Studios</b></b><br>Enjoy a two-hour tour of the Granada film studios,<br>which were opened in 1988. This glimpse of the<br>fascinating world of film and television<br>includes a visit to the properties store, cutting<br>room and various sets. It's a must see for all the<br>Coronation Street fans with you.<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]);
}
