function save_view(field) {
  $(field).value = map_frame.position();
  $(field).form.onsubmit();
}

function toggle_locations(show) {
  map_frame.showMarkers(show);
  $w('map_show map_hide').each(function(id) {$(id).toggle()});
}

function highlight_location(elem, highlight) {
  highlight ? elem.addClassName('highlight') : elem.removeClassName('highlight');

  var elems = elem.select('.location_functions');
  if (elems.length > 0) {
    var e = elems.first();
    highlight ? e.show() : e.hide();
  }
}
