    //<![CDATA[

    // Check to see if this browser can run the Google API
    
      // Storage for the stuff thats going to go into the tabbed infowindow
      var markers = [];
      var page1s = [];
      var page2s = [];
      var label1s = [];
      var label2s = [];
      
      // When the tab updated triggers, it doesnt tell us which marker it is associated with
      // (info windows dont have a history of whether they came from a marker or from the map)
      // but we need to know which set of info to use to rebuild the infowindow with the other tab active.
      var marker_num = 0;
    
    
      // ==================================================
      // This function updates the tabs when we get a click
      // The function gets called several times for each click, with different information
      // that the API thinks that we might possibly be interested in.
      // For our current purposes we are only interested in the call where the first parameter is "page"
      
      // Note the unusual style of the function name that allows us to reference this function in the infoWindow.addContext() method
      update_tabs = function(a,b,c) {
        if (a == "page") {
          var html = make_tab(marker_num, parseFloat(b));
          markers[marker_num].openInfoWindowHtml(html);
        }
      }
      
      // ============
      dummy_function = function(a,b,c) {}
      
      

      // ==================================================
      // A function to construct the html for the "p"th tab of the "i"th marker
      // Assume p is either 1 or 2
      function make_tab(i,p) {
        if (p == 1) {
          var html = '<div page="1" label="'  + label1s[i] + '" class="active">' +page1s[i] +'</div>'
                    +'<div page="2" label="'  + label2s[i] + '"></div>';
        }
        else {
          var html = '<div page="1" label="'  + label1s[i] + '">' +page2s[i] +'</div>'
                    +'<div page="2" label="'  + label2s[i] + '" class="active"></div>';
        }
        return html;
      }

      // ==================================================
      // A function to create a tabbed marker and set up the event window
      function createTabbedMarker(point, icon, tip, html1,html2) {
        var marker = new GxMarker(point, icon, tip);
        markers[marker_num] = marker;
        page1s[marker_num] = '<div style="white-space:nowrap;">' + html1 + '</div>';
        page2s[marker_num] = '<div style="white-space:nowrap;">' + html2 + '</div>';
        label1s[marker_num] = "Summary";
        label2s[marker_num] = "More";
                
        var i = marker_num;     // store the marker_num with a function closure
        var html = make_tab(i,1); 
        
        GEvent.addListener(marker, "click", function() {
          marker_num = i;       // retrieve the marker_num
          markers[marker_num].openInfoWindowHtml(html);
        });
        marker_num++;
        return marker;
      }
      // ==================================================

