title: How to set another function to closebutton in panorama
body: <p>(sorry for my english) i have a problem,,, I´m trying to create a web in which user click on a polygon and it move user to another page with Google Street View Panorama (this i have). But i also need a code to move user back from "panorama page" to "polygons page" after clicking on close button in panorama. I tried to use the same code like i used before to move user to "panorama page" but it doesn´t work  (it just closes panorama, but doesn´t move back to "polygons page"). The line: </p>
  
  <pre><code>
      google.maps.event.addListener(panorama, "closeclick", function(event) { window.location = "index.html"; })
  </code></pre>
  
  <p>is the code to move user back to "polygons page" (index.html). Here is the whole code:</p>
  
  <p><code>
      function initialize() {</p>
  
  <pre><code>var panoOptions = {
   pano: 'Kuchyn',
   enableCloseButton: true,
   pov: {
       heading: 0,
       pitch: 0,
       zoom: 0
       },
   panoProvider: getCustomPanorama,
   visible: true};
  
  var panorama = new google.maps.StreetViewPanorama(
   document.getElementById('map-canvas'), panoOptions);
  
  function getCustomPanoramaTileUrl(pano, zoom, tileX, tileY) {
       return 'images/Untitled.jpg';}
  
  function getCustomPanorama(pano, zoom, tileX, tiley) {
  
  if (pano == 'Kuchyn') {
   return {
    location: 
     {pano: 'Kuchyn',
      description: 'Kromeriz - Kuchyn'},
  
    links: [],
    copyright: 'Oznog (c) 2013',
    Heading: 180,
  
    tiles: 
     {tileSize: new google.maps.Size(4096, 2048),
      worldSize: new google.maps.Size(4096, 2048),
      centerHeading: 180,
      verticalFOV: 90,
      getTileUrl: getCustomPanoramaTileUrl}
  };
  }
  }
  }
  google.maps.event.addDomListener(window, 'load', initialize);
  google.maps.event.addListener(panorama, "closeclick", function(event) { window.location = "index.html"; })
  </code></pre>
  
  <p></code></p>
  
  <p>Please help me, Jan.</p>