   //<![CDATA[

    if (GBrowserIsCompatible()) {            

	  // this variable will collect the html which will eventually be placed in the side_bar
      var side_bar_html = "";
    
      // arrays to hold copies of the markers and html used by the side_bar
      // because the function closure trick doesnt work there
      var gmarkers = [];
      var i = 0;

      var lastlinkid;
	  
	  	// CHANGE THE DEFAULT ICONS
	  var blueIcon = new GIcon(G_DEFAULT_ICON);
	  blueIcon.image = "../maps/mapimages/blue-dot.png"; 
	  blueIcon.shadow = "../maps/mapimages/mm_20_shadow.png";
	  blueIcon.iconSize = new GSize(15, 15);
	  blueIcon.shadowSize = new GSize(20, 20); 
	  blueIcon.iconAnchor = new GPoint(5, 5);
	  blueIcon.infoWindowAnchor = new GPoint(290, 270);
	   
	  // Set up our GMarkerOptions object
	   markerOptions = { icon:blueIcon };	


           // This function picks up the click and opens the corresponding info window
	 function Linkclicked(i) {
     GEvent.trigger(gmarkers[i], "click");

     }
	 
	 // A function to create the marker and set up the event window
     function createMarker(point,name,html) {
      var marker = new GMarker(point,markerOptions);
		
  
		
		
        var linkid = "link"+i;
        GEvent.addListener(marker, "click", function() {		  
		  
		 map.setZoom(17);
		 map.panTo(marker.getPoint());
		 map.openInfoWindow(marker.getLatLng(),html);
		 //document.getElementById(linkid).style.background="#FFFF00";
         lastlinkid=linkid;
        });
        // save the info we need to use later for the side_bar
        gmarkers[i] = marker;
        // add a line to the side_bar html
        side_bar_html += '<div id="'+linkid+'"><a href="javascript:Linkclicked(' + i + ')">' + name + '</a></div>';
        i++;
        return marker;
		GEvent.removeListener("click");
      }


// create the map
      var map = new GMap2(document.getElementById("map"));

	  	


	 
// Put the loading message underneath the tiles
      document.getElementById("map").style.backgroundImage = "url(/maps/mapimages/loading.jpg)";
	 
//    map.addControl(new GLargeMapControl());
//    map.addControl(new GMapTypeControl());
//    map.setCenter(new GLatLng( 43.907787,-79.359741), 8);

//Sets maximum and minimum Zoom levels
	  G_NORMAL_MAP.getMinimumResolution = function() {return 10};
      G_NORMAL_MAP.getMaximumResolution = function() {return 18}; 
	  
      map.addControl(new GLargeMapControl());
	  map.addControl(new GMapTypeControl());
      map.setCenter(new GLatLng(29.736470464439804, -95.39692640304565),17);
	   
  
      var mgrOptions = { borderPadding: 0, maxZoom: 17, trackMarkers: false };
	  var mm = new MarkerManager(map, mgrOptions);
	  
	  
// Insert the Base Map Layer
	var insert1 = new EInsert(new GLatLng(29.73600606690947, -95.39538145065307), "../meniloverlay1.png", new GSize(991,699), 17);
  	map.addOverlay(insert1);
	


      // Insert the Bus Stops Layer
      var insert4 = new EInsert(new GLatLng(29.7171, -95.4033), "busstops.png", new GSize(1890,1400), 17);
      map.addOverlay(insert4);
	  insert4.hide();
      
      // Insert Emergency Phones Layer
      var insert5 = new EInsert(new GLatLng(29.7171, -95.4033), "emergency.png", new GSize(1890,1400), 17);
      map.addOverlay(insert5);
	  insert5.hide();
	  
	  // Insert Easter Egg
	  var insert6 = new EInsert(new GLatLng(29.71810690924234, -95.40447950363159), "zilla2.png", new GSize(294,201), 16);
      map.addOverlay(insert6);
	  insert6.makeDraggable();
	  insert6.hide();
	  
      
// BEGIN MAP MARKERS|||||||||||||||||||||||||   
 
var point = new GLatLng(29.737327534583837, -95.39849281311035);
var marker = createMarker(point,"The Menil Collection","<div id=\"info\"><img src=\"..\/maps\/mapimages\/menil.jpg\" alt=\"The Menil Collection\" width=\"129\" height=\"96\" \/><h1>The Menil Collection</h1><br />1515 Sul Ross Street <br />11 am - 7pm<br />Wednesday through Sunday<br /><a href=\"/visit/building.php\">more info</a></div>");    

var point = new GLatLng(29.737607012395166, -95.39615392684936);
var marker = createMarker(point,"Rothko Chapel","<div id=\"info\"><img src=\"..\/maps\/mapimages\/rothko.jpg\" alt=\"Rothko Chapel\" width=\"129\" height=\"96\" \/><h1>Rothko Chapel</h1><br />1409 Sul Ross Street <br />10 am - 6 pm<br />Sunday through Saturday <br /><a href=\"/visit/rothko.php\">more info</a></div>");    

var point = new GLatLng(29.736759260632553, -95.39788126945495);
var marker = createMarker(point,"Cy Twombly Gallery","<div id=\"info\"><img src=\"..\/maps\/mapimages\/twombly.jpg\" alt=\"Cy Twombly Gallery\" width=\"129\" height=\"96\" \/><h1>Cy Twombly Gallery</h1><br />1501 Branard<br />11 am - 7 pm<br />Wednesday through Sunday<br /><a href=\"/visit/twombly.php\">more info</a></div>");    

var point = new GLatLng(29.73801691177643, -95.39848744869232);
var marker = createMarker(point,"Menil Bookstore","<div id=\"info\"><img src=\"..\/maps\/mapimages\/bookstore.jpg\" alt=\"Menil Bookstore\" width=\"129\" height=\"96\" \/><h1>Menil Bookstore</h1><br />1520 Sul Ross Street<br />11 am- 7 pm<br />Wednesday through Sunday<br /><a href=\"https://www.menil.org/secure/contemporary.php\">more info</a></div>");    

var point = new GLatLng(29.736717338656152, -95.3951507806778);
var marker = createMarker(point,"Byzantine Fresco Chapel Museum","<div id=\"info\"><img src=\"..\/maps\/mapimages\/byzantine.jpg\" alt=\"Byzantine Fresco Chapel Museum\" width=\"129\" height=\"96\" \/><h1>Byzantine Fresco Chapel Museum</h1><br />4011 Yupon Street<br />11 am - 6 pm<br />Wednesday through Sunday<br /><a href=\"/visit/byzantine.php\">more info</a></div>");    

var point = new GLatLng(29.734923993259755, -95.39805293083191);
var marker = createMarker(point,"Dan Flavin Installation at Richmond Hall","<div id=\"info\"><img src=\"..\/maps\/mapimages\/flavin.jpg\" alt=\"Dan Flavin Installation at Richmond Hall\" width=\"129\" height=\"96\" \/><h1>Dan Flavin Installation at Richmond Hall</h1><br />1500 Richmond Avenue<br />11 am - 7 pm<br />Wednesday through Sunday<br /><a href=\"/visit/flavin.php\">more info</a></div>");    
// END MAP MARKERS|||||||||||||||||||||||||     

   
                       
      //GEvent.addListener(map,"infowindowclose", function() {
       // document.getElementById(lastlinkid).style.background="";
      //});

        mm.addMarkers(gmarkers,16,17);
        mm.refresh();
                       
      // put the assembled side_bar_html contents into the side_bar div
      document.getElementById("side_bar").innerHTML = side_bar_html;
      //GEvent.removeListener("infowindowclose");
	 
	// map.openInfoWindow(map.getCenter(), 
	//									document.createTextNode("Click and drag or use the navigation tool in the top left corner. "));
	 					
    
	}

    else {
      alert("Sorry, the Google Maps API is not compatible with this browser");
    }
    
    //]]>