//<![CDATA[

  var myPano;

  //----------------------------------------------------------------------------------
  // initPano() - Initializes the panoramic view with the last station
  //----------------------------------------------------------------------------------
  function initPano(Lat, Lon, Pov) {
    myPano = new GStreetviewPanorama(document.getElementById("pano"));
    var myPoint = new GLatLng(Lat,Lon);
    var myPOV = {yaw:Pov,pitch:0};
    myPano.setLocationAndPOV(myPoint, myPOV);
    GEvent.addListener(myPano, "error", handleNoFlash);
  }
    
  //----------------------------------------------------------------------------------
  // handleNoFlash(errorCode) - handles the no flash installed error
  //----------------------------------------------------------------------------------
    function handleNoFlash(errorCode) {
      if (errorCode == 603) {
        alert("Error: Flash doesn't appear to be supported by your browser");
        return;
      }
    }  

  //----------------------------------------------------------------------------------
  // movePano(myStation) - Moves the panoramic view to a specified point
  //     myStation = the index to the Lats, Lons, Povs and Station Names arrays
  //----------------------------------------------------------------------------------
  function movePano(myStation) {
    var myPoint = new GLatLng(Lats[myStation],Lons[myStation]);
    var myPOV = {yaw:Povs[myStation],pitch:0};
    myPano.setLocationAndPOV(myPoint, myPOV);
  }

//]]>