// 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    -->
	
	 	 
		 // Amulet Market
	var point = new GPoint(100.489025,13.755893);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/thailand/bangkok-amulet-market.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/thailand/images/thumbs/bangkok-amulet-75.jpg'><b>Amulet Market</b></a><br><br>This is the main place in Bangkok where Thais buy amulets for a wide variety of specific purposes, from staying healthy to staving off one's mother-in-law.</div>","Amulet Market");
	
		 // Erawan Shrine
	var point = new GPoint(100.540577,13.744242);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/thailand/bangkok-erawan-shrine.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/thailand/bangkok-erawan-shrine-pictures/thumbs/shrine-w-burberry-cc-hirotomo-oi.jpg'><b>Erawan Shrine</b></a><br><br>This popular city shrine features the four-faced Hindu god Brahma. Built to appease evil spirits during the accident-prone construction of the Grand Hyatt in 1956, it still attracts worshippers day and night.</div>","Erawan Shrine");
	
		 // Sikh Temple
	var point = new GPoint(100.501102, 13.744157);
	createMarker(point,"<div id=bubble><b>Sikh Temple</b><br><br>Bangkok's Sikh temple, the Sri Guru Singh Sabha, is located in Little India.</div>","Sikh Temple");
	
		 
		 // Wat Arun (Temple of the Dawn)
	var point = new GPoint(100.489132,13.743773);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/thailand/bangkok-wat-arun.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/thailand/bangkok-wat-arun-pictures2/thumbs/from-river-cc-mykaul.jpg'><b>Wat Arun (Temple of the Dawn)</b></a><br><br>Wat Arun (Temple of the Dawn) is a beautiful Buddhist temple and landmark on the west bank of the Chao Phraya River in Bangkok.</div>","Wat Arun");
		 
		 // Wat Benjamabophit
	var point = new GPoint(100.513465,13.765959);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/thailand/bangkok-wat-benjamabophit-marble-temple.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/thailand/images/thumbs/bangkok-benjamaphobit-75.jpg'><b>Wat Benjamabophit</b></a><br><br>Named for the white Carrara marble of which it is constructed, the Marble Temple is the newest and one of the most beautiful of Bangkok\'s royal wats.</div>","Wat Benjamabophit");
		
	 // Wat Mahathat
	var point = new GPoint(100.490785,13.754788);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/thailand/bangkok-wat-mahathat-great-relic.htm'><b>Wat Mahathat</b></a><br><br>Dating from the 18th century, Wat Mahathat is one of Bangkok's oldest shrines and the headquarters for Thailand's largest monastic order.</div>","Wat Mahathat");
	
		 // Wat Pho (Temple of the Reclining Buddha)
	var point = new GPoint(100.492802,13.746399);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/thailand/bangkok-wat-pho.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/thailand/bangkok-wat-pho-pictures/thumbs/wat-pho-sx-pd-brett-jephson.jpg'><b>Wat Pho (Temple of the Reclining Buddha)</b></a><br><br>This is the oldest and largest temple in Bangkok. Construction began in 1788 on the site of an earlier temple, and it was restored and extended in the reign of King Rama III (1824-51). Wat Pho is known as the birthplace of Thai massage and as the home of the giant Reclining Buddha, who is well over 100 feet long and covered in gold plating. </div>","Wat Pho");
		 	 
		 // Wat Phra Kaeo (Emerald Buddha Temple)
	var point = new GPoint(100.492471, 13.751514);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/thailand/bangkok-wat-phra-keo-temple-of-emerald-buddha.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/thailand/bangkok-wat-phra-kaew-pictures/thumbs/view2-cc-elmar.jpg'><b>Wat Phra Kaew (Emerald Buddha Temple)</b></a><br><br>The most sacred Buddhist shrine in Thailand, this large temple complex with in the Grand Palace houses a revered statue of the Buddha made of smooth green stone.</div>","Wat Phra Kaew");
	
		 // Wat Saket (Golden Mount)
	var point = new GPoint(100.507361,13.753954);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/thailand/bangkok-wat-saket-golden-mount.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/thailand/images/thumbs/bangkok-saket-flag-cc-funkfaerie.jpg'><b>Wat Saket and the Golden Mount</b></a><br><br>Wat Saket dates from the Ayutthaya era and was restored by King Rama I. It has long been used for cremation and burials, due to its location outside the walls. But most famous is its Golden Mount, topped with a golden chedi.</div>","Wat Saket");
	
		 			 // Wat Suthat
	var point = new GPoint(100.501236,13.751023);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/thailand/bangkok-wat-suthat-and-giant-swing.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/thailand/images/thumbs/bangkok-suthet-swing-75.jpg'><b>Wat Suthat</b></a><br><br>Wat Suthat is one of the oldest and largest temples in Bangkok, famed for its beautiful roofline, huge bronze Buddha, magnificent frescoes and giant red swing out front. </div>","Wat Suthat");
	
		 // Wat Traimit
	var point = new GPoint(100.514007,13.738093);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/thailand/bangkok-wat-traimit-golden-buddha.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/thailand/images/thumbs/bangkok-golden-buddha-cc-rigmarole.jpg'><b>Wat Traimit (Temple of Golden Buddha)</b></a><br><br>Wat Traimit is home to the magnificent Golden Buddha, the largest solid-gold Buddha image in the world. Cast over 900 years ago, it was covered in plaster to disguise its value until it was uncovered by chance in 1957.</div>","Wat Traimit");
	

	
	
	// 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;
    }

	//]]>
