function initMapInline()
{
  // maps are named gmap_n, where n = int
  var i = 0;
  var valid = true;
  while (valid)
  {
    if (document.getElementById("gmap_"+i) != null)
    {
      initMapInlineSingle("gmap_"+i, "gmap_info_"+i);
    }
    else
    {
      valid = false;
      break;
    }
    ++i;
  }
}

function initMapInlineSingle(mapId, infoId)
{
  // Get info from page elements
  var lat = jQuery("#"+infoId+" .lat").html();
  var lng = jQuery("#"+infoId+" .lng").html();
  
  var title = jQuery("#"+infoId+" .title").html();
  var address = jQuery("#"+infoId+" .address").html();
  var city = jQuery("#"+infoId+" .city").html();
  var postal = jQuery("#"+infoId+" .postal").html();
  var country = jQuery("#"+infoId+" .country").html();
  
  if (GBrowserIsCompatible())
  {
    var map = new GMap2(document.getElementById(mapId));
    var point = new GLatLng(lat, lng);
    
    var icon = new GIcon(G_DEFAULT_ICON);
    icon.image = "/images/marker.png";
    markerOptions = { icon:icon };
    
    map.setCenter(point, 10);
    map.addOverlay(new GMarker(point, markerOptions));
    map.setUIToDefault();
  }
  
}




