
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(41.892566,12.475491), 14);
	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(41.890074,12.492206);
	bounds.extend(point);
	var marker = createMarker(point, "The Colosseum", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>The Colosseum</b><br/>Originally known as the Flavian Amphitheater, also referred to as<br/>the Coliseum, is an amphitheater in Rome, capable of seating 50,000<br/>spectators, which was once used for gladiatorial combat. Its<br/>construction began under the Emperor Vespasian in 72 AD and was<br/>completed by his son, Domitian, in the 80s AD. It was built at the site<br/>of Nero's enormous palace, the Domus Aurea, which had been built<br/>after the great fire of Rome in 64.</p>", 1);
	gmarkers[0] = marker;
	htmls[0] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>The Colosseum</b><br/>Originally known as the Flavian Amphitheater, also referred to as<br/>the Coliseum, is an amphitheater in Rome, capable of seating 50,000<br/>spectators, which was once used for gladiatorial combat. Its<br/>construction began under the Emperor Vespasian in 72 AD and was<br/>completed by his son, Domitian, in the 80s AD. It was built at the site<br/>of Nero's enormous palace, the Domus Aurea, which had been built<br/>after the great fire of Rome in 64.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(41.898971,12.476799);
	bounds.extend(point);
	var marker = createMarker(point, "Pantheon", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Pantheon</b><br>The Roman 'temple for all gods' turned into a church in the Middle Ages and<br/>is now one of the most prominent characteristics of Rome. Especially at night,<br/>the Pantheon is a wonderful sight.</p>", 2);
	gmarkers[1] = marker;
	htmls[1] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Pantheon</b><br>The Roman 'temple for all gods' turned into a church in the Middle Ages and<br/>is now one of the most prominent characteristics of Rome. Especially at night,<br/>the Pantheon is a wonderful sight.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(41.902149,12.454805);
	bounds.extend(point);
	var marker = createMarker(point, "St. Peters Basilica", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>St. Peters Basilica</b><br>One of four major basilicas of Rome (St. John Lateran, St. Peter's, Santa Maria<br/>Maggiore and St. Paul outside the Walls). The most prominent building inside<br/>the Vatican City and is built on the ruins of Old Saint Peter's Basilica. Its dome<br/>is also a dominant feature of the Roman skyline. This great building is the<br/>center of Christianity. The opulence of the building's interior bears testimony<br/>to the wealth of the catholic church in the 16th century.</p>", 3);
	gmarkers[2] = marker;
	htmls[2] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>St. Peters Basilica</b><br>One of four major basilicas of Rome (St. John Lateran, St. Peter's, Santa Maria<br/>Maggiore and St. Paul outside the Walls). The most prominent building inside<br/>the Vatican City and is built on the ruins of Old Saint Peter's Basilica. Its dome<br/>is also a dominant feature of the Roman skyline. This great building is the<br/>center of Christianity. The opulence of the building's interior bears testimony<br/>to the wealth of the catholic church in the 16th century.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(41.900808,12.483344);
	bounds.extend(point);
	var marker = createMarker(point, "Fontana di Trevi", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Fontana di Trevi</b><br>The Fontana di Trevi or Trevi Fountain is the most famous and arguably the<br/>most beautiful fountain in all of Rome. This impressive monument dominates<br/>the small Trevi square located in the Quirinale district. According to legend,<br/>anyone who throws a coin into the water is guaranteed to return to the<br/>Eternal City.</p>", 4);
	gmarkers[3] = marker;
	htmls[3] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Fontana di Trevi</b><br>The Fontana di Trevi or Trevi Fountain is the most famous and arguably the<br/>most beautiful fountain in all of Rome. This impressive monument dominates<br/>the small Trevi square located in the Quirinale district. According to legend,<br/>anyone who throws a coin into the water is guaranteed to return to the<br/>Eternal City.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(41.892271,12.485608);
	bounds.extend(point);
	var marker = createMarker(point, "The Forum", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>The Forum</b><br>The central area around which ancient Rome developed, in which commerce<br/>and the administration of justice took place. The communal hearth was also<br/>located here. The ruins within the forum clearly show how urban spaces were<br>utilized during the Roman Age. The Roman Forum includes a statue of the late<br/>Caesar, Zeus, and the several other major monuments, buildings, and ancient<br/>ruins.</p>", 5);
	gmarkers[4] = marker;
	htmls[4] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>The Forum</b><br>The central area around which ancient Rome developed, in which commerce<br/>and the administration of justice took place. The communal hearth was also<br/>located here. The ruins within the forum clearly show how urban spaces were<br>utilized during the Roman Age. The Roman Forum includes a statue of the late<br/>Caesar, Zeus, and the several other major monuments, buildings, and ancient<br/>ruins.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(41.893636,12.481842);
	bounds.extend(point);
	var marker = createMarker(point, "Piazza del Campidoglio", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Piazza del Campidoglio</b><br>This splendid square was conceived by Michelangelo, who also designed<br/>the two palaces on the opposite sides of the square, whoose divergence<br/>creates a widening perspective which is most effective. It is reached by the<br/>grand flight of steps known as the 'Cordonata', built to a design by<br/>Michelangelo especially for the triumphal entry of the Emperor Charles V<br/>in 1536.</p>", 6);
	gmarkers[5] = marker;
	htmls[5] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Piazza del Campidoglio</b><br>This splendid square was conceived by Michelangelo, who also designed<br/>the two palaces on the opposite sides of the square, whoose divergence<br/>creates a widening perspective which is most effective. It is reached by the<br/>grand flight of steps known as the 'Cordonata', built to a design by<br/>Michelangelo especially for the triumphal entry of the Emperor Charles V<br/>in 1536.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(41.902565,12.467358);
	bounds.extend(point);
	var marker = createMarker(point, "Castel Sant’Angelo", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Castel Sant&acute;Angelo</b><br>The Castel Sant'Angelo is a towering cylindrical building, initially commissioned<br/>by the Roman Emperor Hadrian as a mausoleum for himself and his family.<br/>Located in the rione of Borgo, the building spent over a thousand years as a<br/>fortress and castle, and is now a museum.</p>", 7);
	gmarkers[6] = marker;
	htmls[6] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Castel Sant&acute;Angelo</b><br>The Castel Sant&acute;Angelo is a towering cylindrical building, initially commissioned<br/>by the Roman Emperor Hadrian as a mausoleum for himself and his family.<br/>Located in the rione of Borgo, the building spent over a thousand years as a<br/>fortress and castle, and is now a museum.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(41.879227,12.492507);
	bounds.extend(point);
	var marker = createMarker(point, "Baths of Caracalla", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Baths of Caracalla</b><br>The Baths of Caracalla were Roman public baths, or ‘thermae’, built in Rome<br/>between 212 and 216 AD, during the reign of the Emperor Caracalla. The<br/>extensive ruins of the baths have become a popular tourist attraction.</p>", 8);
	gmarkers[7] = marker;
	htmls[7] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Baths of Caracalla</b><br>The Baths of Caracalla were Roman public baths, or &quot;thermae&quot;, built in Rome<br/>between 212 and 216 AD, during the reign of the Emperor Caracalla. The<br/>extensive ruins of the baths have become a popular tourist attraction.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(41.888796,12.481091);
	bounds.extend(point);
	var marker = createMarker(point, "Temples of the Forum Boarium", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Temples of the Forum Boarium</b><br>The Forum Boarium was the oldest forum that Rome possessed. It was located<br/>at a flat place near the Tiber between the Capitoline, the Palatine and Aventine<br/>hills. Here, too, is where the first bridges were built. The Forum Boarium was the<br/>site of the first gladiatorial contest at Rome which took place in 264 BC. The site<br/>was also a religious center housing the Temple of Hercules Victor, the Temple of<br/>Portunus, and the massive 6th or 5th century BC Great Altar of Hercules.</p>", 9);
	gmarkers[8] = marker;
	htmls[8] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Temples of the Forum Boarium</b><br>The Forum Boarium was the oldest forum that Rome possessed. It was located<br/>at a flat place near the Tiber between the Capitoline, the Palatine and Aventine<br/>hills. Here, too, is where the first bridges were built. The Forum Boarium was the<br/>site of the first gladiatorial contest at Rome which took place in 264 BC. The site<br/>was also a religious center housing the Temple of Hercules Victor, the Temple of<br/>Portunus, and the massive 6th or 5th century BC Great Altar of Hercules.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(41.904657,12.488258);
	bounds.extend(point);
	var marker = createMarker(point, "Capuchin Cemetery", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Capuchin Cemetery</b><br>The final resting place for over 4,000 Capuchin monks, who died between 1528 and 1870.<br/>The soil in the crypt was brought from Jerusalem. There are six total rooms in the crypt,<br/>each featuring a unique display of human bones.</p>", 10);
	gmarkers[9] = marker;
	htmls[9] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Capuchin Cemetery</b><br>The final resting place for over 4,000 Capuchin monks, who died between 1528 and 1870.<br/>The soil in the crypt was brought from Jerusalem. There are six total rooms in the crypt,<br/>each featuring a unique display of human bones.</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]);
}
