/* Called by Flash when a click has occurred. */
function mapClicked(lat, lon, zoom, locationid, countryid, locationname, tripidstr) {
  // A locationid of -1 means a double-click; those shouldn't be reported, as they're used for zooming in. 0 meanwhile means nothing to us in the display context.
  if (locationid > 0) {
    var tripidarray = tripidstr.match(/^(\d+)/);
    if (tripidarray && !isNaN(parseInt(tripidarray[0]))) {
      var tripid = parseInt(tripidarray[0]);
      var newurl = "http://www.travellerspoint.com/member_map.cfm?loadlocationid="+locationid+"&loadzoom="+zoom+"&loadlat="+lat+"&loadlon="+lon+"&loadcountryid="+countryid+"&tripid="+tripid;
      window.location = newurl;
    }
  }
}