// 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    -->
	
		 
		 // Baiyunguan Si 
	var point = new GPoint(116.337721,39.899321);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/china/beijing-baiyun-guan-white-cloud-temple.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/china/images/beijing/thumbs/statue2-cc-gene-zhang.jpg'><b>Baiyunguan Si (White Cloud Temple)</b></a><br><br>Once the most influential Taoist center in China, this recently renovated temple is now the home of 30 monks and the China Taoism Association. It is a lively place that is popular with pilgrims and devotees.</div>","Baiyun Guan");
	
		 
		 // Confucius Temple
	var point = new GPoint(116.408494,39.944991);
	createMarker(point,"<div id=bubble><b>Confucius Temple</b><br><br></div>","Confucius Temple");
		 
		 // Mausoleum of Mao
	var point = new GPoint(39.901078,116.391692);
	createMarker(point,"<div id=bubble><b>Mausoleum of Mao</b><br><br></div>","Mausoleum of Mao");
		 
		 // Forbidden City
	var point = new GPoint(116.390791, 39.916715);
	createMarker(point,"<div id=bubble><b>Forbidden City</b><br><br>The opulent home of the Chinese emperors (and their many concubines) for centuries.</div>","Forbidden City");
		 
		 // Jinshan Park
	var point = new GPoint(116.390533,39.923561);
	createMarker(point,"<div id=bubble><b>Jinshan Park</b><br><br></div>","Jinshan Park");
		 
		 // Niu Jie Mosque
	var point = new GPoint(116.358,39.8844);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/china/beijing-niu-jie-mosque.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/china/images/beijing/thumbs/view-from-minaret-cc-mikeccross.jpg'><b>Niu Jie Mosque</b></a><br><br>There are around 200,000 Muslims in Beijing. This mosque in the Muslim Quarter of Niu Jie is a colorful building in Chinese style, with text in Chinese and Arabic.</div>","Niu Jie Mosque");
	
		 // Temple of Heaven
	var point = new GPoint(116.406798,39.882376);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/china/temple-of-heaven-beijing.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/china/images/beijing/thumbs/hall-of-prayer-cc-magical-world.jpg'><b>Temple of Heaven</b></a><br><br>Completed in 1420, this magnificent temple was considered the meeting point of Earth and Heaven. For five hundred years the emperors performed sacrifices and prayed for a good harvest at the winter solstice.</div>","Temple of Heaven");
	
			 // Tian'anmen Square
	var point = new GPoint(116.391521,39.904584);
	createMarker(point,"<div id=bubble><b>Tian'anmen Square</b><br><br>The famous site of marches of loyalty and victory and, more recently, of mass protests and massacres.</div>","Tiananmen Square");
		 
		 // Yonghe Gong
	var point = new GPoint(116.411219,39.946192);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/china/beijing-yonghe-gong-lama-temple.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/china/images/beijing/thumbs/monk-cc-dbaron.jpg'><b>Yonghe Gong (Lama Temple)</b></a><br><br>This temple is fairly touristy, but well worth a visit for its colorful, 17th-century architecture. It is an active Tibetan Buddhist center, but one that is officially sponsored by the Chinese government.</div>","Yonghe Gong");
	
	
	// 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;
    }

	//]]>