// Java Document

 //<![CDATA[
 
 // Begin Javascript
var gmarkers = [];
var htmls = [];
function myclick(i) {
gmarkers[i].openInfoWindowHtml(htmls[i]);
}
    function onLoad() {
      // Map Overlays
      //
      
	  // This function picks up the click and opens the corresponding info window
// Creates one a small marker at the given point
function createMarker(point, attributeHTMLString, name) {
  var marker = new GMarker(point, icon);
  map.addOverlay(marker);
  GEvent.addListener(marker, "click", function() {
    marker.openInfoWindowHtml(attributeHTMLString);
  });
  // save the info we need to use later for the sidebar
  gmarkers[i] = marker;
  htmls[i] = attributeHTMLString;
  // add a line to the sidebar html
  sidebar_html += '<a href="javascript:myclick(' + i + ')">' + name + '</a><br>';
        i++;
        return marker;
}



      // Create small marker icon
var icon = new GIcon();
icon.image = "http://labs.google.com/ridefinder/images/mm_20_blue.png";
icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
icon.iconSize = new GSize(12, 20);
icon.shadowSize = new GSize(22, 20);
icon.iconAnchor = new GPoint(6, 20);
icon.infoWindowAnchor = new GPoint(5, 1);

<!--    begin pulling data    -->
	
		 		 
		 // Alexander Nevsky Lavra
	var point = new GPoint(30.388613, 59.92113);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/russia/st-petersburg-alexander-nevsky-monastery.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/russia/images/st-petersburg/thumbs/gate-cc-huxleyesque.jpg'><b>Alexander Nevsky Lavra</b></a><br><br>Founded in 1710 by Peter the Great to house the relics of the military hero-saint Prince Alexander of Novgorod, this is one of only four Russian monasteries to be given the highest rank of <em>lavra</em>.</div>","Alexander Nevsky Lavra");
	 	 
		 // Church of Savior
	var point = new GPoint(30.32866,59.940203);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/russia/st-petersburg-church-of-savior-on-blood.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/russia/images/st-petersburg/thumbs/top-cc-bigappleofmyeye.jpg'><b>Church of the Savior on Blood</b></a><br><br>This magnificent cathedral, a riot of color inside and out, was begun by Alexander III in 1883 in memory of his father, who was killed on this spot. Used as a warehouse in the Soviet era, it is now a museum. </div>","");
	
		 // Hermitage
	var point = new GPoint(30.313768, 59.940482);
	createMarker(point,"<div id=bubble><b>The Hermitage</b><br><br></div>","Hermitage");
	
		 // Peter and Paul Cathedral
	var point = new GPoint(30.316665, 59.950315);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/russia/st-petersburg-peter-and-paul-cathedral.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/russia/images/st-petersburg/thumbs/spire-cc-jimg944.jpg'><b>Peter and Paul Cathedral</b></a><br><br>Built 1712-33 in the heart of the Peter and Paul Fortress, this yellow cathedral is characterized by unique Protestant-influenced Baroque architecture. It is the oldest and second-tallest building in St. Petersburg. </div>","Peter and Paul Cathedral");
		 
		 // St. Isaac's Cathedral
	var point = new GPoint(30.306087, 59.934161);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/russia/st-petersburg-st-isaac-cathedral.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/russia/images/st-petersburg/thumbs/dome-cc-hoolypics.jpg'><b>St. Isaac\'s Cathedral</b></a><br><br>This gigantic Neoclassical cathedral was built 1818-58 under the direction of Tsar Alexander I. In Soviet times, it was turned into a museum of atheism and a Foucault pendulum was installed in place of the dove. </div>","St. Isaac\'s Cathedral");
		 
		 // Kazan Cathedral
	var point = new GPoint(30.324411, 59.934247);
	createMarker(point,"<div id=bubble><b>Kazan Cathedral</b><br><br></div>","Kazan Cathedral");
		 
		 // St. Nikolas Cathedral
	var point = new GPoint(30.300035, 59.922528);
	createMarker(point,"<div id=bubble><b>St. Nikolas Cathedral</b><br><br></div>","St. Nikolas Cathedral");
	
		 
		 // Troitsky Cathedral
	var point = new GPoint(30.3057, 59.916526);
	createMarker(point,"<div id=bubble><b>Troitsky Cathedral</b><br><br></div>","Troitsky Cathedral");
	
	
	// Create small marker icon
var icon = new GIcon();
icon.image = "http://labs.google.com/ridefinder/images/mm_20_white.png";
icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
icon.iconSize = new GSize(12, 20);
icon.shadowSize = new GSize(22, 20);
icon.iconAnchor = new GPoint(6, 20);
icon.infoWindowAnchor = new GPoint(5, 1);


		
	
	 // put the assembled sidebar_html contents into the sidebar div
    //document.getElementById("sidebar").innerHTML = sidebar_html;
    }

	//]]>
