var map = null;
var geocoder = null;

function initialize() {
  if (GBrowserIsCompatible()) {
	map = new GMap2($("#course_dates li.active .local_map").get(0),{ size: new GSize(164,128) });
	geocoder = new GClientGeocoder();
  }
  $('.local_map').css('display','none');
}

function showAddress(address) {
	address = jQuery.trim(address);
	
	// MAP NEU INITIALISIEREN
	initialize();
	
$('.local_map').css('display','block'); 
  if (geocoder) {
	geocoder.getLatLng(
	  address,
	  function(point) {
		if (!point) {
		  //alert(address + " not found");
		  $('.local_map').css('display','none');
		} else {
		  map.setCenter(point, 14);
		  var marker = new GMarker(point);
		  map.addOverlay(marker);
		  $('.local_map #logocontrol').next().hide();
		}
	  }
	);
  }
}
