
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(38.004279,-1.134853), 13);
	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(37.984156,-1.12833);
	bounds.extend(point);
	var marker = createMarker(point, "Murcia Cathedral", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Murcia Cathedral</b><br>The cathedral which is located at the plaza del Cardinal Belluga, got different<br/>entrance doors. All of them on their own a treasure. The main entrance, called<br/>puerta del perdon, the north door, portada de las cadenas and the portada de<br/>los apostoles lead you into the impressive capilla mayor decorated with lots of<br/>gold. When you took your tour around the cathedral of Murcia, make sure you<br/>visit the museum inside the cathedral, where many more details are explained.</p>", 1);
	gmarkers[0] = marker;
	htmls[0] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Murcia Cathedral</b><br>The cathedral which is located at the plaza del Cardinal Belluga, got different<br/>entrance doors. All of them on their own a treasure. The main entrance, called<br/>puerta del perdon, the north door, portada de las cadenas and the portada de<br/>los apostoles lead you into the impressive capilla mayor decorated with lots of<br/>gold. When you took your tour around the cathedral of Murcia, make sure you<br/>visit the museum inside the cathedral, where many more details are explained.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(37.985171,-1.132514);
	bounds.extend(point);
	var marker = createMarker(point, "Museo Ramon Gaya", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Museo Ramon Gaya</b><br>The Museum Ramon Gaya, dedicated to the artist with this same name and native of<br/>Murcia, is found in Casa Palarea in the Catalina Square. It was inaugurated in 1990<br/>when the artist was 82 years old and also includes other works of art from other artists.<br/>Ramon Gaya was influenced by famous artists such as Vazquez and Rembrandt, so you<br/>have an idea of the intense precision of his work.</p>", 2);
	gmarkers[1] = marker;
	htmls[1] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Museo Ramon Gaya</b><br>The Museum Ramon Gaya, dedicated to the artist with this same name and native of<br/>Murcia, is found in Casa Palarea in the Catalina Square. It was inaugurated in 1990<br/>when the artist was 82 years old and also includes other works of art from other artists.<br/>Ramon Gaya was influenced by famous artists such as Vazquez and Rembrandt, so you<br/>have an idea of the intense precision of his work.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(37.983031,-1.129103);
	bounds.extend(point);
	var marker = createMarker(point, "Palacia Episcopal", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Palacia Episcopal</b><br>Palacia Episcopal, the residency of the Bishop of Murcia.</p>", 3);
	gmarkers[2] = marker;
	htmls[2] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Palacia Episcopal</b><br>Palacia Episcopal, the residency of the Bishop of Murcia.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(37.98342,-1.132745);
	bounds.extend(point);
	var marker = createMarker(point, "Palacio Almudi", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Palacio Almudi</b><br>A singular building that has an impressive shape, showing a courtyard with<br/>columns that recalls the Baroque style of Murcia. The old corn deposit of the<br/>city, the building was subsequently turned into a Judicial Court, today it is<br/>the Municipal Archive, where administration documents of the city and the<br/>'Huerta' are kept since the 13th century. Also it is an Art Centre, as the<br/>impressive hall with Tuscan columns on the ground floor holds exhibitions.</p>", 4);
	gmarkers[3] = marker;
	htmls[3] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Palacio Almudi</b><br>A singular building that has an impressive shape, showing a courtyard with<br/>columns that recalls the Baroque style of Murcia. The old corn deposit of the<br/>city, the building was subsequently turned into a Judicial Court, today it is<br/>the Municipal Archive, where administration documents of the city and the<br/>'Huerta' are kept since the 13th century. Also it is an Art Centre, as the<br/>impressive hall with Tuscan columns on the ground floor holds exhibitions.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(37.981691,-1.138995);
	bounds.extend(point);
	var marker = createMarker(point, "Paseo de Malecon", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Paseo de Malecon</b><br>It is the best known Murcian esplanade in one of the most emblematic places of<br/>the city. The fight against floods has always been present, and this walkway has<br/>been fundamental in their prevention. Nowadays, it is an exceptional esplanade<br/>three metres above the ground, stretching more than 15,000 metres into the 'Huerta'<br/>or agricultural countryside. It is made up of an area for leisure and the esplanade,<br/>from which you can enjoy magnificent views.</p>", 5);
	gmarkers[4] = marker;
	htmls[4] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Paseo de Malecon</b><br>It is the best known Murcian esplanade in one of the most emblematic places of<br/>the city. The fight against floods has always been present, and this walkway has<br/>been fundamental in their prevention. Nowadays, it is an exceptional esplanade<br/>three metres above the ground, stretching more than 15,000 metres into the 'Huerta'<br/>or agricultural countryside. It is made up of an area for leisure and the esplanade,<br/>from which you can enjoy magnificent views.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(37.983961,-1.127418);
	bounds.extend(point);
	var marker = createMarker(point, "The Casino", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>The Casino</b><br>A building of great beauty, the Casino is a symbol of Murcia. The old part of the<br/>casino was planned and led by Francisco Bolarin (1852) called 'the Young' in<br/>order to differentiate him from his father, who was also an architect. The facade<br/>is a work of the architect Pedro Cerdan Martinez. It shows classical and modern<br/>motifs in its eclectic style.</p>", 6);
	gmarkers[5] = marker;
	htmls[5] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>The Casino</b><br>A building of great beauty, the Casino is a symbol of Murcia. The old part of the<br/>casino was planned and led by Francisco Bolarin (1852) called 'the Young' in<br/>order to differentiate him from his father, who was also an architect. The facade<br/>is a work of the architect Pedro Cerdan Martinez. It shows classical and modern<br/>motifs in its eclectic style.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(38.020297,-1.097517);
	bounds.extend(point);
	var marker = createMarker(point, "The Castle of Monteagudo", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>The Castle of Monteagudo</b><br>The castle of Monteagudo is located on the top of a calcareous hill, from where<br/>it dominates the whole of the northern valley of the 'Huerta' (fertile region).<br/>The village of Monteagudo is located on the slopes, just 5 km from the city of<br/>Murcia and 10km from Orihuela. It has one of the most impressive fortifications<br/>and one of the best maintained in the Region of Murcia.</p>", 7);
	gmarkers[6] = marker;
	htmls[6] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>The Castle of Monteagudo</b><br>The castle of Monteagudo is located on the top of a calcareous hill, from where<br/>it dominates the whole of the northern valley of the 'Huerta' (fertile region).<br/>The village of Monteagudo is located on the slopes, just 5 km from the city of<br/>Murcia and 10km from Orihuela. It has one of the most impressive fortifications<br/>and one of the best maintained in the Region of Murcia.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(37.986752,-1.130637);
	bounds.extend(point);
	var marker = createMarker(point, "The Romea Theatre", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>The Romea Theatre</b><br>The theatre carries the surname of the actor Julian Romea, (1813-1868), a famous<br/>Murcian actor, considered to be one of the stars of the national theatre. The<br/>building was opened in 1862. During the 19th century, the theatre suffered two<br/>spectacular fires, and reconstruction work after the fires, and the important<br/>restoration in 1985, have meant that this monumental theatre has been<br/>inaugurated on a total of four occasions.</p>", 8);
	gmarkers[7] = marker;
	htmls[7] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>The Romea Theatre</b><br>The theatre carries the surname of the actor Julian Romea, (1813-1868), a famous<br/>Murcian actor, considered to be one of the stars of the national theatre. The<br/>building was opened in 1862. During the 19th century, the theatre suffered two<br/>spectacular fires, and reconstruction work after the fires, and the important<br/>restoration in 1985, have meant that this monumental theatre has been<br/>inaugurated on a total of four occasions.</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]);
}
