
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(54.544588,-5.908585), 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(54.604053,-5.931104);
	bounds.extend(point);
	var marker = createMarker(point, "Belfast Cathedral", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Belfast Cathedral</b><br>The main section of the Hiberno-Romanesque<br>building was consecrated in 1904. Various<br>parts have been added since then and a<br>spire is scheduled for early 2006. The Cathedral<br>has the largest Celtic Cross in Ireland, and<br>mosaics and stained glass on<br>Celtic themes.<br>", 1);
	gmarkers[0] = marker;
	htmls[0] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Belfast Cathedral</b><br>The main section of the Hiberno-Romanesque<br>building was consecrated in 1904. Various<br>parts have been added since then and a<br>spire is scheduled for early 2006. The Cathedral<br>has the largest Celtic Cross in Ireland, and<br>mosaics and stained glass on<br>Celtic themes.<br>";
	map.addOverlay(marker);


	var icon = new GIcon(baseIcon);
	var point = new GLatLng(54.643893,-5.823698);
	bounds.extend(point);
	var marker = createMarker(point, "Ulster Folk & Transport Museum", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Ulster Folk & Transport Museum</b><br>The Ulster Folk and Transport Museum is<br>one of Ireland's foremost visitor attractions<br>illustrating the way of life and traditions<br>of the people of the North of Ireland.<br>", 2);
	gmarkers[1] = marker;
	htmls[1] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Ulster Folk & Transport Museum</b><br>The Ulster Folk and Transport Museum is<br>one of Ireland's foremost visitor attractions<br>illustrating the way of life and traditions<br>of the people of the North of Ireland.<br>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(54.596459,-5.827303);
	bounds.extend(point);
	var marker = createMarker(point, "Parliament Buildings Stormont", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Parliament Buildings Stormont</b><br>Stormont is a public park which remains<br>open until 7.30pm. Pedestrians can walk from<br>the main gates to the statue of Carson,<br>along the Prince of Wales Avenue and can<br>also enjoy the glen walk and visit the<br>excellent facilities at the children's<br>playground. Visitors to Parliament Buildings are<br>welcome to view the Great Hall however guided<br>visits for groups must be sponsored,<br>in advance, by an Assembly Member.<br>", 3);
	gmarkers[2] = marker;
	htmls[2] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Parliament Buildings Stormont</b><br>Stormont is a public park which remains<br>open until 7.30pm. Pedestrians can walk from<br>the main gates to the statue of Carson,<br>along the Prince of Wales Avenue and can<br>also enjoy the glen walk and visit the<br>excellent facilities at the children's<br>playground. Visitors to Parliament Buildings are<br>welcome to view the Great Hall however guided<br>visits for groups must be sponsored,<br>in advance, by an Assembly Member.<br>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(54.38132,-5.548997);
	bounds.extend(point);
	var marker = createMarker(point, "Exploris Aquarium", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Exploris Aquarium</b><br>Exploris is Northern Ireland's only public<br>Aquarium and seal sanctuary. It is located<br>in Portaferry, on the shores of the<br>Marine Nature Reserve of Strangford Lough. The<br>Aquarium presents the wonders of the Irish Sea<br>through an enjoyable and interactive<br>experience.<br>", 4);
	gmarkers[3] = marker;
	htmls[3] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Exploris Aquarium</b><br>Exploris is Northern Ireland's only public<br>Aquarium and seal sanctuary. It is located<br>in Portaferry, on the shores of the<br>Marine Nature Reserve of Strangford Lough. The<br>Aquarium presents the wonders of the Irish Sea<br>through an enjoyable and interactive<br>experience.<br>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(54.540779,-5.980918);
	bounds.extend(point);
	var marker = createMarker(point, "International Rose Garden", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>International Rose Garden</b><br>Sir Thomas and Lady Dixon Park lies on<br>the southern outskirts of Belfast and is<br>one of the outstanding areas within the Lagan<br>Valley Regional Park consisting of one hundred<br>and twenty eight acres of meadows, copses,<br>woodland and gardens. See the International Rose<br>Garden and the rhododendron displays, listen<br>to a band concert, use the children's playground<br>or simply to relax in the tranquil surroundings.<br></p>", 5);
	gmarkers[4] = marker;
	htmls[4] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>International Rose Garden</b><br>Sir Thomas and Lady Dixon Park lies on<br>the southern outskirts of Belfast and is<br>one of the outstanding areas within the Lagan<br>Valley Regional Park consisting of one hundred<br>and twenty eight acres of meadows, copses,<br>woodland and gardens. See the International Rose<br>Garden and the rhododendron displays, listen<br>to a band concert, use the children's playground<br>or simply to relax in the tranquil surroundings.<br></p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(54.592406,-5.93472);
	bounds.extend(point);
	var marker = createMarker(point, "Grand Opera House", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Grand Opera House</b><br>Northern Ireland's Premier Theatre, the Grand<br>Opera House reopened after a &pound;10M extension<br>and development programme and presents<br>a programme of the very best in live<br>theatrical performances and entertainment<br>to satisfy the widest possible range of<br>tastes and ages.<br></p>", 6);
	gmarkers[5] = marker;
	htmls[5] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Grand Opera House</b><br>Northern Ireland's Premier Theatre, the Grand<br>Opera House reopened after a &pound;10M extension<br>and development programme and presents<br>a programme of the very best in live<br>theatrical performances and entertainment<br>to satisfy the widest possible range of<br>tastes and ages.<br></p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(54.592406,-5.93472);
	bounds.extend(point);
	var marker = createMarker(point, "Belfast Waterfront Hall", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Belfast Waterfront Hall</b><br>Northern Ireland's premier conference and concert<br>centre. The flexible seating (capacity 2,235),<br>highly praised acoustics and warm atmosphere<br>make the Main Auditorium perfect for world<br>class shows, award ceremonies, gala dinners<br>and conferences, while the Studio provides<br>an intimate setting for music, comedy, theatre<br>and corporate events.<br></p>", 7);
	gmarkers[6] = marker;
	htmls[6] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Belfast Waterfront Hall</b><br>Northern Ireland's premier conference and concert<br>centre. The flexible seating (capacity 2,235),<br>highly praised acoustics and warm atmosphere<br>make the Main Auditorium perfect for world<br>class shows, award ceremonies, gala dinners<br>and conferences, while the Studio provides<br>an intimate setting for music, comedy, theatre<br>and corporate events.<br></p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(54.529848,-5.699501);
	bounds.extend(point);
	var marker = createMarker(point, "Castle Espie", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Castle Espie</b><br>At Castle Espie (The Wildfowl and Wetlands Trust),<br>the wild world has the power to touch,<br>thrill and inspire. All year round<br>Castle Espie's unique beauty is full of the<br>sights and sounds of nature.<br></p>", 8);
	gmarkers[7] = marker;
	htmls[7] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Castle Espie</b><br>At Castle Espie (The Wildfowl and Wetlands Trust),<br>the wild world has the power to touch,<br>thrill and inspire. All year round<br>Castle Espie's unique beauty is full of the<br>sights and sounds of nature.<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]);
}
