
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(43.701513,7.261362), 13);
	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(43.684632,7.236214);
	bounds.extend(point);
	var marker = createMarker(point, "Promenade des Anglais", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Promenade des Anglais</b><br/>This waterfront boulevard still retains a faded charm, backed up with<br/>grand fin-de-siecle hotels on one flank and the Mediterranean on the<br/>other. Those who crave sand between their toes may want to avoid<br/>the pebbled expanse of frazzled bodies on the 'beach'. Alternatively,<br/>join the rollerbladers posing on the promenade above.</p>", 1);
	gmarkers[0] = marker;
	htmls[0] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Promenade des Anglais</b><br/>This waterfront boulevard still retains a faded charm, backed up with<br/>grand fin-de-siecle hotels on one flank and the Mediterranean on the<br/>other. Those who crave sand between their toes may want to avoid<br/>the pebbled expanse of frazzled bodies on the 'beach'. Alternatively,<br/>join the rollerbladers posing on the promenade above.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(43.697045,7.275717);
	bounds.extend(point);
	var marker = createMarker(point, "Le Vieux Nice", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Le Vieux Nice</b><br>This atmospheric old web of streets is overlooked by many day trippers heading<br/>straight for the Promenade des Anglais, a travesty as this is a great place for<br/>wandering around exploring the churches, cafes and old shops.</p>", 2);
	gmarkers[1] = marker;
	htmls[1] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Le Vieux Nice</b><br>This atmospheric old web of streets is overlooked by many day trippers heading<br/>straight for the Promenade des Anglais, a travesty as this is a great place for<br/>wandering around exploring the churches, cafes and old shops.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(43.706539,7.251256);
	bounds.extend(point);
	var marker = createMarker(point, "Musee Matisse", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Musee Matisse</b><br>Works on show by the one time Nice resident include his Blue Nude IV and Woman<br/>with Amphora. Nearby, Matisse devotees can also visit his grave in the grounds of<br/>the Monastere de Cimiez.</p>", 3);
	gmarkers[2] = marker;
	htmls[2] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Musee Matisse</b><br>Works on show by the one time Nice resident include his Blue Nude IV and Woman<br/>with Amphora. Nearby, Matisse devotees can also visit his grave in the grounds of<br/>the Monastere de Cimiez.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(43.701148,7.277831);
	bounds.extend(point);
	var marker = createMarker(point, "Musee d'Art Moderne et d'Art Contemporain", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Musee d'Art Moderne et d'Art Contemporain</b><br>Modern art in a strikingly designed gallery with the highlights the<br/>work of Warhol and Lichtenstein, as well as an array of domestic<br/>avant garde artists. Look out also for the bizarre sculpture of the<br/>Loch Ness monster.</p>", 4);
	gmarkers[3] = marker;
	htmls[3] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Musee d'Art Moderne et d'Art Contemporain</b><br>Modern art in a strikingly designed gallery with the highlights the<br/>work of Warhol and Lichtenstein, as well as an array of domestic<br/>avant garde artists. Look out also for the bizarre sculpture of the<br/>Loch Ness monster.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(43.69464,7.249711);
	bounds.extend(point);
	var marker = createMarker(point, "Musee des Beaux-Arts", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Musee des Beaux-Arts</b><br>There a number of interesting works on display in this impressive cultural<br/>oasis, which is housed in a lavish belle epoque building. Luminaries from<br/>Rodin and Von Dongens through to Degas and Monet all feature.</p>", 5);
	gmarkers[4] = marker;
	htmls[4] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Musee des Beaux-Arts</b><br>There a number of interesting works on display in this impressive cultural<br/>oasis, which is housed in a lavish belle epoque building. Luminaries from<br/>Rodin and Von Dongens through to Degas and Monet all feature.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(43.703824,7.254066);
	bounds.extend(point);
	var marker = createMarker(point, "Orthodox Cathedral", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Orthodox Cathedral</b><br>Nice's Russian orthodox cathedral, dedicated to St Nicholas, is hard<br/>to miss with its distinctive half dozen gleaming onion domes. Its<br/>17th-century appearance belies the fact that it was built at the start<br/>of the 20th century.</p>", 6);
	gmarkers[5] = marker;
	htmls[5] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Orthodox Cathedral</b><br>Nice's Russian orthodox cathedral, dedicated to St Nicholas, is hard<br/>to miss with its distinctive half dozen gleaming onion domes. Its<br/>17th-century appearance belies the fact that it was built at the start<br/>of the 20th century.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(43.696099,7.280953);
	bounds.extend(point);
	var marker = createMarker(point, "Parc du Chateau", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Parc du Chateau</b><br>This lofty park rises above the city centre and offers a cool and shady<br/>place to relax on a hot summer day. The views of Nice and the<br/>Mediterranean are worth the effort of climbing up to the spot where<br/>the Greeks first set up shop when they colonised the area.</p>", 7);
	gmarkers[6] = marker;
	htmls[6] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Parc du Chateau</b><br>This lofty park rises above the city centre and offers a cool and shady<br/>place to relax on a hot summer day. The views of Nice and the<br/>Mediterranean are worth the effort of climbing up to the spot where<br/>the Greeks first set up shop when they colonised the area.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(43.69554,7.274966);
	bounds.extend(point);
	var marker = createMarker(point, "Cours Saleya", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Cours Saleya</b><br>Cours Saleya is worth visiting for its outdoor market in the<br/>day, but at night it also comes alive with bars and cafes.</p>", 8);
	gmarkers[7] = marker;
	htmls[7] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Cours Saleya</b><br>Cours Saleya is worth visiting for its outdoor market in the<br/>day, but at night it also comes alive with bars and cafes.</p>";
	map.addOverlay(marker);
}

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]);
}
