title: Google maps add tabs to markers infowindow
body: <p>I have done some research into whats out there to give tabs to API v3 and have come up with infobubble as a good looking source for tabbed infowindows. I'm not trying to figure out if I can add a tab later to an already created infobubble. I have several events that are pulled from a database to xml then to java script to put on a map but some share the same location but different dates of other potential markers. Do markers or info windows have IDs that can be iterated through to check to see if the marker for a location already exists for the map? and then if that's the case add a tab to the infobubble/infowindow? </p>
  
  <p>I think   <code>infoBubble.addTab(title, content)</code> is the way to do it, but how do I know what marker/infobubble to add it to? </p>
  
  <p><strong>Update</strong> (here is the code I have that seems to be freezing chrome):</p>
  
  <pre><code>var location_icon = new google.maps.MarkerImage('../images/FAFSA_Logo_icon.png');  
   var map;
   var markersArray= [];
    function load() {
  
      map = new google.maps.Map(document.getElementById("map"), {
          center: new google.maps.LatLng(33.961586, -106.008728),
          zoom: 6,
          mapTypeId: 'roadmap'
      });
      var infoBubble = new InfoBubble({maxWidth: 300});
  
  
      downloadUrl("../site_parts/mapmysql.php", function(data) {
      var xml = data.responseXML;
      var markers = xml.documentElement.getElementsByTagName("marker");
      for (var i = 0; i &lt; markers.length; i++) {
          var name = markers[i].getAttribute("event_name");
          var address = markers[i].getAttribute("venue_address");
          var city = markers[i].getAttribute("venue_city");
          var state = markers[i].getAttribute("venue_state");
          var zip = markers[i].getAttribute("venue_zip");
          var website = markers[i].getAttribute("venue_website");
  
          var date = markers[i].getAttribute("event_date");
          var start_time = markers[i].getAttribute("event_start_time");
          var end_time = markers[i].getAttribute("event_end_time");
          var room = markers[i].getAttribute("event_room");
          var cord = markers[i].getAttribute("ec_fname") + " " + markers[i].getAttribute("ec_lname");
          var cord_email = markers[i].getAttribute("ec_email");
          var cord_pnumber = markers[i].getAttribute("ec_pnumber");
          var point = new google.maps.LatLng(
              parseFloat(markers[i].getAttribute("venue_lat")),
              parseFloat(markers[i].getAttribute("venue_lng")));
          var html = "&lt;b&gt;" + name + "&lt;/b&gt; &lt;br/&gt;" + address +", "+ city +", "+ state +", "+ zip + "&lt;br/&gt;" +"&lt;b&gt;Date &lt;/b&gt; "+ date +"&lt;br/&gt;" +"&lt;b&gt;Time &lt;/b&gt; "+ start_time + " - "+ end_time +"&lt;br/&gt;" + "&lt;b&gt;Room &lt;/b&gt;" + room + "&lt;br/&gt;"+ "&lt;b&gt; Cordinator &lt;/b&gt;" + cord + " " + "&lt;a href='mailto:" + cord_email + "?Subject=FAFSA%20FFA%20Event'&gt;" + cord_email + "&lt;/a&gt; " + cord_pnumber;
          var icon =  location_icon;
              for (var i = 0; i &lt; markersArray.length; i++){
                  if (markersArray[i].getPosition()=point){
                      addtabFunction(markersArray[i], map, date, html);
                      break;
                  } if (i &gt; markersArray.length){continue} else{
  
              var marker = new google.maps.Marker({map: map, position: point, icon: icon});
                      markersArray.push(marker);
                      bindinfoBubble(marker, map, infoBubble, date, html)
                      break;
                  }
              }
          }
      });
    }
  
  function bindinfoBubble(marker, map, infoBubble, date, html) {
    google.maps.event.addListener(marker, 'click', function() {
      infoBubble.addTab(date, html)
      infoBubble.open(map, marker);
    });
  }
  
  function addtabFunction (marker, map, date, html){
      infoBubble.open(map, marker);
      infoBubble.addTab(date, html);
  }
  
  function downloadUrl(url,callback) {
   var request = window.ActiveXObject ?
      new ActiveXObject('Microsoft.XMLHTTP') :
      new XMLHttpRequest;
  
  request.onreadystatechange = function() {
      if (request.readyState == 4) {
      request.onreadystatechange = doNothing;
      callback(request, request.status);
      }
  };
  
  request.open('GET', url, true);
  request.send(null);
  }
  
  function doNothing() {} 
  </code></pre>