title: Is there a way to check if an infowindow is opened for a specific marker in google maps v3?
body: <p>I currently have a bunch of markers that I store in an array to keep track of them.  When I click on a specific link it opens up that marker's infowindow.  Is there a way to do a check in the click listener to see if the infowindow I want opened is the currently opened one?  If so, don't close and reopen the infowindow?</p>
  
  <p>Current javascript:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      var infowindow = null;
      var stored_markers = new Array();
  
      function initialize() 
      {
          var latlng = new google.maps.LatLng(0,0);
          var myOptions = {
              zoom: 1,
              center: latlng,
              mapTypeId: google.maps.MapTypeId.ROADMAP
          };
  
          var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
  
          setMarkers(map, items);
          infowindow = new google.maps.InfoWindow({
          content: "holding..."
          });
      }
  
      var items = [
          ['title 1 to display on hover', latitude 1, longitude 1, z-index 1, 'infowindow 1 content'],
          ['title 2 to display on hover', latitude 2, longitude 2, z-index 2, 'infowindow 2 content'],
          ['title 3 to display on hover', latitude 3, longitude 3, z-index 3, 'infowindow 3 content']
      ];
  
      function setMarkers(map, markers) 
      {
          for (var i = 0; i &lt; markers.length; i++) 
          {
              var sites = markers[i];
              var siteLatLng = new google.maps.LatLng(sites[1], sites[2]);
              var marker = new google.maps.Marker({
                  position: siteLatLng,
                  map: map,
                  title: sites[0],
                  zIndex: sites[3],
                  html: sites[4]
              });
              stored_markers.push(marker);
              //initial content string
              var contentString = "Some content";
  
              //attach infowindow on click
              google.maps.event.addListener(marker, "click", function () 
              {
                  infowindow.setContent(this.html);
                  infowindow.open(map, this);
              });
  
          }
      }
  
  &lt;/script&gt;
  </code></pre>