
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.791728,-1.540146), 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.896667,-1.528333);
	bounds.extend(point);
	var marker = createMarker(point, "Harewood House", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Harewood House</b><br>Designed by John Carr in 1759 for Edwin Lascelles,<br>Harewood House has been lived in by his<br>family ever since. A variety of paintings<br>are displayed, including Italian Renaissance,<br>Turner, Girtin, 18th Centuary portraits and<br>20th Centuary masterpieces. Dedicated Watercolour<br>Rooms showcase key historic works. The<br>magnificent interior, created by Robert Adam,<br>has superb ceilings and plasterwork and<br>contains what experts described as the richest<br>collection of Chippendale in the world.<br>", 1);
	gmarkers[0] = marker;
	htmls[0] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Harewood House</b><br>Designed by John Carr in 1759 for Edwin Lascelles,<br>Harewood House has been lived in by his<br>family ever since. A variety of paintings<br>are displayed, including Italian Renaissance,<br>Turner, Girtin, 18th Centuary portraits and<br>20th Centuary masterpieces. Dedicated Watercolour<br>Rooms showcase key historic works. The<br>magnificent interior, created by Robert Adam,<br>has superb ceilings and plasterwork and<br>contains what experts described as the richest<br>collection of Chippendale in the world.<br>";
	map.addOverlay(marker);


	var icon = new GIcon(baseIcon);
	var point = new GLatLng(53.824127,-1.606944);
	bounds.extend(point);
	var marker = createMarker(point, "Kirkstall Abbey", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Kirkstall Abbey</b><br>Kirkstall Abbey is one of the best-preserved<br>medieval Cistercian monasteries in the country.<br>Constructed between 1152 and 1182,<br>many of its buildings still survive virtually<br>intact up to eaves level. The abbey is<br>situated in an attractive public park.<br>", 2);
	gmarkers[1] = marker;
	htmls[1] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Kirkstall Abbey</b><br>Kirkstall Abbey is one of the best-preserved<br>medieval Cistercian monasteries in the country.<br>Constructed between 1152 and 1182,<br>many of its buildings still survive virtually<br>intact up to eaves level. The abbey is<br>situated in an attractive public park.<br>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(53.791123,-1.530468);
	bounds.extend(point);
	var marker = createMarker(point, "Royal Armouries Museum", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Royal Armouries Museum</b><br>The Royal Armouries houses 3,000 years of<br>history through over 8,000 spectacular exhibits.<br>The stunning surroundings make this<br>world famous collection of arms and armour a must-see<br>attraction. Experience an exciting combination of<br>breathtaking displays, costumed demonstrations, dramatic<br>interpretations, live action events, entertaining films,<br>interactive technology and thrilling exhibitions.<br>", 3);
	gmarkers[2] = marker;
	htmls[2] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Royal Armouries Museum</b><br>The Royal Armouries houses 3,000 years of<br>history through over 8,000 spectacular exhibits.<br>The stunning surroundings make this<br>world famous collection of arms and armour a must-see<br>attraction. Experience an exciting combination of<br>breathtaking displays, costumed demonstrations, dramatic<br>interpretations, live action events, entertaining films,<br>interactive technology and thrilling exhibitions.<br>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(53.799938,-1.54838);
	bounds.extend(point);
	var marker = createMarker(point, "Leeds City Art Gallery", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Leeds City Art Gallery</b><br>Art gallery containing British paintings,<br>sculptures, prints and drawings of the 19th/20thC.<br>Henry Moore gallery with permanent collection<br>of 20thC sculpture. Craft centre and design gallery.<br>Events and changing exhibitions all year.<br>", 4);
	gmarkers[3] = marker;
	htmls[3] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Leeds City Art Gallery</b><br>Art gallery containing British paintings,<br>sculptures, prints and drawings of the 19th/20thC.<br>Henry Moore gallery with permanent collection<br>of 20thC sculpture. Craft centre and design gallery.<br>Events and changing exhibitions all year.<br>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(53.839399,-1.50546);
	bounds.extend(point);
	var marker = createMarker(point, "Tropical World", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Tropical World</b><br>Butterfly House with over 30 types. Follow tropical<br>trail from aquarium into Amazon rainforest where<br>waterfalls tumble into jungle pools and tropical birds<br>fly through trees. Nocturnal House gives you the chance<br>to see fruit bats, owl monkeys and many other animals<br>that you would not normally see in the twilight hours.<br>Plus, cacti & succulents, small primates, insects and<br>reptiles, gift shop. Canal Gardens with extensive bedding<br>displays, rose garden, small canal with fountain and swans.<br>", 5);
	gmarkers[4] = marker;
	htmls[4] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Tropical World</b><br>Butterfly House with over 30 types. Follow tropical<br>trail from aquarium into Amazon rainforest where<br>waterfalls tumble into jungle pools and tropical birds<br>fly through trees. Nocturnal House gives you the chance<br>to see fruit bats, owl monkeys and many other animals<br>that you would not normally see in the twilight hours.<br>Plus, cacti & succulents, small primates, insects and<br>reptiles, gift shop. Canal Gardens with extensive bedding<br>displays, rose garden, small canal with fountain and swans.<br>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(53.961944,-1.081944);
	bounds.extend(point);
	var marker = createMarker(point, "York Minster", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>York Minster</b><br>York Minster is the largest Gothic cathedral<br>in northern Europe and is situated in the<br>city of York in Northern England. It is<br>the seat of the Archbishop of York, cathedral<br>for the Diocese of York, and is run by a<br>Dean and Chapter under the Dean of<br>York. Its formal title is The Cathedral and<br>Metropolitical Church of St Peter in York.<br></p>", 6);
	gmarkers[5] = marker;
	htmls[5] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>York Minster</b><br>York Minster is the largest Gothic cathedral<br>in northern Europe and is situated in the<br>city of York in Northern England. It is<br>the seat of the Archbishop of York, cathedral<br>for the Diocese of York, and is run by a<br>Dean and Chapter under the Dean of<br>York. Its formal title is The Cathedral and<br>Metropolitical Church of St Peter in York.<br></p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(53.612803,-1.573721);
	bounds.extend(point);
	var marker = createMarker(point, "Yorkshire Sculpture Park", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Yorkshire Sculpture Park</b><br>The Yorkshire Sculpture Park is an open-air<br>art organisation, showing work by UK and<br>international artists, including notably<br>Henry Moore and Barbara Hepworth.<br></p>", 7);
	gmarkers[6] = marker;
	htmls[6] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Yorkshire Sculpture Park</b><br>The Yorkshire Sculpture Park is an open-air<br>art organisation, showing work by UK and<br>international artists, including notably<br>Henry Moore and Barbara Hepworth.<br></p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(53.798686,-1.541981);
	bounds.extend(point);
	var marker = createMarker(point, "Leeds Shopping", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Leeds Shopping</b><br>The Knightsbridge of the North! Find designer<br>shops in the stylish Victorian Quarter,<br>cosmopolitan cafes, the famous Leeds indoor<br>market and more. The home of Harvey Nicholls<br>in the north brings thousands to Leeds shopping<br>every week.<br></p>", 8);
	gmarkers[7] = marker;
	htmls[7] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Leeds Shopping</b><br>The Knightsbridge of the North! Find designer<br>shops in the stylish Victorian Quarter,<br>cosmopolitan cafes, the famous Leeds indoor<br>market and more. The home of Harvey Nicholls<br>in the north brings thousands to Leeds shopping<br>every week.<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]);
}
