function showMapAddress(address,opts)
{
 // Google Geocoder function to look up point coordinates for an address string and move map to that view
 // assumes map already initialzed by one of the loadMap... functions

 // address   = location name or address to look up
 // opts?:
 //  drag     = boolean marker draggable
 //  info     = HTML for infowindow and tooltip
 //  mark     = marker object
 //  plcs     = document id of element displaying list of places
 //  showinfo = boolean show infowindow when marker placed
 //  zoom     = zoom level
 
 if (!oMap)
  return;

 if (!opts.zoom)
  opts.zoom = oMap.getZoom();

 if (!opts.info)
   opts.info = address;

 if (!opts.plcs)
   opts.plcs = "";

 if (opts.mark)
 {
  g_marker = opts.mark;
  var tip = opts.info;
  if (0 < tip.length)
   tip = tip.replace(/<br>/gi,", ");
  else
   tip = gll.toUrlValue();
  if (!opts.drag)
   opts.drag = false;
  var markeroptions = {draggable: opts.drag, icon: opts.mark, title: tip};
 }
 
 var maptype = map.getCurrentMapType();
 var geocoder = new GClientGeocoder();
 if (geocoder)
 {
  geocoder.getLatLng(address,
   function(point)
   {
    if (!point) {
     alert(address + " not found");
    }
    else
    {
     map_address = address;
     map.setCenter(point,opts.zoom,opts.maptype);
     if (opts.mark)
     {
      map_marker = new GMarker(point,markeroptions);
      map.addOverlay(map_marker);
      if (0 < opts.info.length)
      {
       map_marker.bindInfoWindowHtml(opts.info+"<br/>("+point.toUrlValue()+")");
       if (opts.showinfo)
        map_marker.openInfoWindowHtml(opts.info+"<br/>("+point.toUrlValue()+")");
      }
      else
       GEvent.addListener(map_marker, "dblclick", function() {map_marker.showBlowupMap();});
     }
     if (0 < opts.plcs.length)
     {
      var places = document.getElementById(opts.plcs);
      if (places)
      {
       var t = places.innerHTML;
       t += '<div style="cursor:pointer; margin-top:4px" onclick="setMapPoint('+point.lat()+','+point.lng()+')">'+address+' ('+point.toUrlValue()+')<\/div>';
       places.innerHTML = t;  
      }
     }
    }
   }
  );
 }
}

function showDirections(panel,fromto)
{
 if (map)
 {
  var directionsPanel = document.getElementById(panel);
  var directions = new GDirections(map, directionsPanel);
  GEvent.addListener(directions,"error",function(){geoStats(directions.getStatus().code)});
  directions.load(fromto);
 }
}
