title: Google Maps: openInfoWindowTabsHtml + GDownloadUrl (Ajax call) question
body: <p>I am facing the following problem. 
  On an Google Map I want to add info windows with tabs, where content is loaded from an external file using the GDownloadUrl method. 
  The code works about fine, but with two problems. 
  a) The first time I click on a marker, nothing hapens. I need to click twice to get an info box. After that it works ok.
  b) When I close an info box and open it again, the tabs repeat themselves. Every time I reopen the info box, those tabs get repeated. So, if using the code below and open the info box 3 times, I get 6 tabs (Info, Photos, Info, Photos, Info, Photos). Any idea of what I am doing wrong here?</p>
  
  <p>I have also tried this with JQuery's $.get method, but the results are exactly the same.</p>
  
  <pre><code>function createREMarker(lat,long,reID)
  {
      var reMarker = new GMarker(rePoint,iconRE);
      GEvent.addListener(reMarker, "click", function()
      {
          GDownloadUrl('testcontent.php?reID='+reID+'&amp;what=info', function(data) {
              content1 = data;
          });
          GDownloadUrl('testcontent.php?reID='+reID+'&amp;what=photos', function(data) {
              content2 = data;
          });
          tabs.push(new GInfoWindowTab('Info', '&lt;div id="mapOverlayContent" style="width:375px; height:220px; overflow:auto;"&gt;'+content1+'&lt;/div&gt;'));
          tabs.push(new GInfoWindowTab('Photos', '&lt;div id="mapOverlayContent" style="width:375px; height:220px; overflow:auto;"&gt;'+content2+'&lt;/div&gt;'));
          reMarker.openInfoWindowTabsHtml(tabs);
      });
      return reMarker;
  };
  </code></pre>