	  var map = null;
      var geocoder = null;

      // this variable will collect the html which will eventualkly 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 htmls = [];
	  // ===== Start with an empty GLatLngBounds object =====     
      var bounds = new GLatLngBounds();
      var tooltip = document.createElement("div");

// Create our colored marker icons 
var icons = new Array();
icons["red"] = new GIcon(G_DEFAULT_ICON); 
icons["red"].image = "images/markers/marker_red.png"; 
icons["green"] = new GIcon(G_DEFAULT_ICON);
icons["green"].image = "images/markers/marker_green.png";
icons["yellow"] = new GIcon(G_DEFAULT_ICON);
icons["yellow"].image = "images/markers/marker_yellow.png";
icons["blue"] = new GIcon(G_DEFAULT_ICON);
icons["blue"].image = "images/markers/marker_blue.png";


function setMultipleMarkers(lats, lons, info, marks, ids) {
		map = new GMap2(document.getElementById("map"));
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		map.addControl(new GOverviewMapControl());
		
		
		
		  // ====== set up marker mouseover tooltip div ======
      
      map.getPane(G_MAP_FLOAT_PANE).appendChild(tooltip);
      tooltip.style.visibility="hidden";

		// GEvent.addListener(map, "moveend", function() {
		//	tooltip.style.visibility="hidden"
		//	});
		
		
		side_bar_html += '<select name="ddllist" onchange="outsideselect(this.value);"  style="width: 175px" id="ddllist"><option value="">Select a Location...</option>'
		for (var i = 0; i<lons.length; ++i) {
			createMarker(i, lats[i], lons[i], info[i], marks[i], ids[i]);
		};
		side_bar_html += '</select>'
		
	    // put the assembled side_bar_html contents into the side_bar div
        document.getElementById("side_bar").innerHTML = side_bar_html;
      
        // ===== determine the zoom level from the bounds =====
        //map.setZoom(map.getBoundsZoomLevel(bounds));
        // ===== determine the centre from the bounds ======
        //var clat = (bounds.getNorthEast().lat() + bounds.getSouthWest().lat()) /2;
        //var clng = (bounds.getNorthEast().lng() + bounds.getSouthWest().lng()) /2;
        //map.setCenter(new GLatLng(clat,clng));
        map.setZoom(11);
        map.setCenter(new GLatLng(40.441885,-80.012784));
    }
    

function get_icon(iconColor) {
   if ((typeof(iconColor)=="undefined") || (iconColor==null)) { 
      iconColor = "red"; 
   }
   if (!icons[iconColor]) {
      icons[iconColor] = new GIcon(icons["red"]);
      icons[iconColor].image = "mapIcons/marker_"+ iconColor +".png";
   } 
   return icons[iconColor];
}

function createMarker(num, lat, lon, info, iconStr, id) {
		var point = new GLatLng(lat,lon);
        map.setCenter(point, 13);
        var marker = new GMarker(point, get_icon(iconStr));
        marker.tooltip = '<div class="tooltip"><nobr>'+info+'</nobr></div>';
        marker.type = iconStr;
        marker.ourid = id;
       
        //GEvent.addListener(marker, "click", function() {
		//	marker.openInfoWindowHtml(info);
		//	});
		   GEvent.addListener(marker, "click", function() {
			UpdPanelUpdate(iconStr, id);
			});
			
        //  ======  The new marker "mouseover" and "mouseout" listeners  ======
        GEvent.addListener(marker,"mouseover", function() {
          showTooltip(marker);
        });        
        GEvent.addListener(marker,"mouseout", function() {
		tooltip.style.visibility="hidden"
        });       
			
        // ==== Each time a point is found, extent the bounds ato include it =====
            bounds.extend(point);        
        
        // save the info we need to use later for the side_bar
        gmarkers[num] = marker;
       
        htmls[num] = info;
        // add to the show list
        //side_bar_html += '<a href="javascript:myclick(' + num + ')">#' + (num+1) + '</a>';
        side_bar_html += '<option value="' + num + '">' + info + '</option>';
        map.addOverlay(marker);
        }
       
       
        // ====== This function displays the tooltip ======
      // it can be called from an icon mousover or a side_bar mouseover
      function showTooltip(marker) {
      	    tooltip.innerHTML = marker.tooltip;
	        var point=map.getCurrentMapType().getProjection().fromLatLngToPixel(map.fromDivPixelToLatLng(new GPoint(0,0),true),map.getZoom());
	        var offset=map.getCurrentMapType().getProjection().fromLatLngToPixel(marker.getPoint(),map.getZoom());
	        var anchor=marker.getIcon().iconAnchor;
	        var width=marker.getIcon().iconSize.width;
	        var height=tooltip.clientHeight;
	        var pos = new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(offset.x - point.x - anchor.x + width, offset.y - point.y -anchor.y -height)); 
	        pos.apply(tooltip);
	        tooltip.style.visibility="visible";
              }
       
       
       
       
       
       
       
      //listens for sidebar click 
      function outsideselect(i) {
        if (i!='') {
            //map.getInfoWindow().hide();
            map.removeOverlay(gmarkers[i]);
            map.addOverlay(gmarkers[i]);
            marker = gmarkers[i];
            map.setCenter(marker.getPoint(), 14);
            showTooltip(marker);
            UpdPanelUpdate(marker.type, marker.ourid);
            //gmarkers[i].openInfoWindowHtml(htmls[i]);
            }
      }
      
      function ToggleMarkers(color){
        // map.closeInfoWindow();
        tooltip.style.visibility="hidden"
           if (document.getElementById(color).checked==false) { // hide the marker
              for (var i=0;i<gmarkers.length;i++) {
                 if (gmarkers[i].type==color)  {
                    map.removeOverlay(gmarkers[i]);
                 }
              }
           } else { // show the marker again
              for (var i=0;i<gmarkers.length;i++) {
                 if (gmarkers[i].type==color)  {
                    map.addOverlay(gmarkers[i]);
                 }
              }
           }
        }
