function showMapMarker(pt, info) { pt.openInfoWindowHtml(info); }


function updateLocationMode(x) {
  var cont = document.getElementById('placeMapCont');
  var link = document.getElementById('mapUpdate');

  if (x) {
    mode = 1;
    cont.className = "placeMapCont";
    dispN('mapU'); 
    dispI('mapU2');
    link.className = "mapUpdate2";
  } 
  else {
    mode = 0;
    link.className = "mapUpdate";
    dispN('mapU2'); 
    dispI('mapU');
    cont.className = "";
  }
}


function updatePlaceLngLat(point, marker, type, id) {  
  var y = confirm("Are you sure you want to update the location to (" + 
                  point.lat() + "," + point.lng() + ") ?");
  if (!y) { return; }

  var url = "/ajax/locationUpdater.php?"+type+"&id="+id+
            "&latitude="+point.lat()+"&longitude="+point.lng();
  $.ajax({
    url: url,
    success: function(data) {
      if (data != 1) { alert("Error Updating Location!"); }
      else {
        alert("Location Updated");
        window['point'+id].setPoint(point);
      }
    }
  });
}
