
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(47.800933,13.048325), 12);
	map.addControl(new GLargeMapControl());
	map.addControl(new GMapTypeControl());

	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(47.762969,13.062851);
	bounds.extend(point);
	var marker = createMarker(point, "Schlo&#223; Hellbrunn und Wasserspiele", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Schlo&#223; Hellbrunn und Wasserspiele</b></p>", 1);
	gmarkers[0] = marker;
	htmls[0] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Schlo&#223; Hellbrunn und Wasserspiele</b><br />A visit to the famous trick fountains in the grounds<br /> of Hellbrunn Palace is a must in the summer.<br /> With grottoes, fountains, floating sculptures and <br />sudden spouts of water from behind bushes or trees,<br /> the Wasserspiele is a fine example of the<br /> baroque fondness for extravagance.</p>";
	map.addOverlay(marker);
	
	var icon = new GIcon(baseIcon);
	var point = new GLatLng(47.795571,13.047316);
	bounds.extend(point);
	var marker = createMarker(point, "Festung Hohensalzburg", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Festung Hohensalzburg</b><br>High Salzburg Fortress is a castle in the<br /> Austrian city of Salzburg. It sits on Festungberg hill.<br /> With a length of 250 meters and a width of 150 meters,<br /> it is one of the largest medieval castles in Europe</p>", 2);
	gmarkers[1] = marker;
	htmls[1] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Festung Hohensalzburg</b><br>High Salzburg Fortress is a castle in the<br /> Austrian city of Salzburg. It sits on Festungberg hill.<br /> With a length of 250 meters and a width of 150 meters,<br /> it is one of the largest medieval castles in Europe.</p>";
	map.addOverlay(marker);
	
	var icon = new GIcon(baseIcon);
	var point = new GLatLng(47.795571,13.047316);
	bounds.extend(point);
	var marker = createMarker(point, "Mozarts Geburtshaus", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Mozarts Geburtshaus</b><br/> The mansion now houses the Mozart Museum,<br /> which provides visitors with a fascinating insight<br /> into the life and times of one of the world's<br />  greatest composers.</p>", 3);
	gmarkers[2] = marker;
	htmls[2] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Mozarts Geburtshaus</b><br/> The mansion now houses the Mozart Museum,<br /> which provides visitors with a fascinating insight<br /> into the life and times of one of the world's<br /> greatest composers.</p>";
	map.addOverlay(marker);
	
	var icon = new GIcon(baseIcon);
	var point = new GLatLng(47.79782,13.045621);
	bounds.extend(point);
	var marker = createMarker(point, "Salzburg Domplatz", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Salzburg Domplatz</b><br />The Domplatz is the site where the &quot;Jedermann&quot;<br /> is staged during the Salzburg Festival, implementing<br /> the façade of the cathedralto use the dramatic scenery.<br />  In late November and December, it is the location <br />of the Christmas Market and draws thousands<br /> of visitors.", 4);
	gmarkers[3] = marker;
	htmls[3] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Salzburg Domplatz</b><br />The Domplatz is the site where the &quot;Jedermann&quot;<br /> is staged during the Salzburg Festival, implementing<br /> the fa&#231;ade of the cathedral to use the dramatic scenery.<br />  In late November and December, it is the location <br />of the Christmas Market and draws thousands<br />  of visitors. </p>";
	map.addOverlay(marker);
	
	var icon = new GIcon(baseIcon);
	var point = new GLatLng(47.804753,13.042531);
	bounds.extend(point);
	var marker = createMarker(point, "Mirabellgarten", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Mirabellgarten</b><br />The visitors will delight in taking a walk<br /> through the magical gardens surrounding <br />Schloss Mirabell,a fantastic pleasure palace erected <br />by Archbishop Wolf Dietrich in 1606</p>", 5);
	gmarkers[4] = marker;
	htmls[4] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Mirabellgarten</b><br />The visitors will delight in taking a walk<br /> through the magical gardens surrounding <br />Schloss Mirabell,a fantastic pleasure palace erected<br /> by Archbishop Wolf Dietrich in 1606</p>";
	map.addOverlay(marker);
	
	var icon = new GIcon(baseIcon);
	var point = new GLatLng(47.802022,13.038465);
	bounds.extend(point);
	var marker = createMarker(point, "Gstättengasse", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Gstättengasse</b><br />This narrow alley begins at the Anton-Neumayr-Platz<br /> and runs along the Mönchsberg to the Klausentor<br /> which used to be a town gate. Most of the buildings<br /> in this alley date back to the<br />  16th and 17th century</p>", 6);
	gmarkers[5] = marker;
	htmls[5] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Gst&atilde;ttengasse</b><br />This narrow alley begins at the Anton-Neumayr-Platz<br /> and runs along the M&ouml;nchsberg to the Klausentor<br /> which used to be a town gate. Most of the buildings<br /> in this alley date back to the<br />  16th and 17th century</p>";
	map.addOverlay(marker);
	
	var icon = new GIcon(baseIcon);
	var point = new GLatLng(47.758707,13.066735);
	bounds.extend(point);
	var marker = createMarker(point, "Tiergarten Hellbrunn", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Tiergarten Hellbrunn</b><br />Situated just to the south of Schlosspark Hellbrunn,<br /> Hellbrunn Zoo contains a variety of animals<br />  from all over the world.</p>", 7);
	gmarkers[6] = marker;
	htmls[6] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Tiergarten Hellbrunn</b><br />Situated just to the south of Schlosspark Hellbrunn,<br /> Hellbrunn Zoo contains a variety of animals<br />  from all over the world. </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]);
}
