
$(document).ready(function()
{
  //for table row
  $("#hitlistentabelle tr:odd").css("background-color", "#3B3B3B");
});


function initialize() {

	  if (GBrowserIsCompatible()) {
	    var map = new GMap2(document.getElementById("map_canvas"));
	    map.setCenter(new GLatLng(51.1333, 10.4166), 6);
	    //map.setMapType(G_HYBRID_MAP);
	    var mapControl = new GMapTypeControl();
	    //map.addControl(mapControl);
	    map.addControl(new GLargeMapControl());
	    geocoder = new GClientGeocoder();

	    // Create a base icon for all of our markers that specifies the
        // shadow, icon dimensions, etc.
        var baseIcon = new GIcon();
        baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
        baseIcon.iconSize = new GSize(20, 34);
        baseIcon.shadowSize = new GSize(37, 34);
        baseIcon.iconAnchor = new GPoint(9, 34);
        baseIcon.infoWindowAnchor = new GPoint(9, 2);
        baseIcon.infoShadowAnchor = new GPoint(18, 25);

	    // Creates a marker at the given point
	    // Clicking the marker will hide it
	    function createMarker(letter, point, address, firma, link, image, width, height) {

	      var letteredIcon = new GIcon(baseIcon);
          letteredIcon.image = "http://www.google.com/mapfiles/marker" + letter + ".png";

          // Set up our GMarkerOptions object
          markerOptions = { icon:letteredIcon };
          var marker = new GMarker(point, markerOptions);

          GEvent.addListener(marker, "click", function() {

          	myHtml = '<b>' + firma + '</b><br />' + address;
            if(link != '') myHtml += '<br /><a href="http://' + link + '" target="_blank">' + link + '</a>';
            if(image != '') myHtml += '<br /><img width="'+width+'" height="'+height+'" src="http://www.sportsplan.de/img/' + image + '" alt="' + firma + '" />';
            map.openInfoWindowHtml(point, myHtml);


          });
          return marker;

		}

		function showAddress(letter, address, firma, link, image, width, height) {
	      if (geocoder) {
	        geocoder.getLatLng(
	          address,
	          function(point) {
	            if (!point) {
	              alert(address + " not found");
	            } else {

	              marker = createMarker(letter, point, address, firma, link, image, width, height);
	              map.addOverlay(marker);
	            }
	          }
	        );
	      }
	    }

	    showAddress('A','Mühlenstr. 17, 29614 Soltau', 'Vitadrom GmbH & Co. KG', 'www.vitadrom.net/', 'vitadrom_thumb.jpg', '110', '83');
	    showAddress('B','Emmastr. 11, 42287 Wuppertal', 'Klaus Meyer', '', '', '', '');
	    showAddress('C','An den Heilquellen 6, 79111 Freiburg', 'Physiotherapiepraxis Christoph Sacherer', '', '', '', '');
	    showAddress('D','Alsfelder Straße 27, 64289 Darmstadt', 'Deutscher Leichtathletik-Verband', 'http://www.deutscher-leichtathletik-verband.de', 'dlv_thumb.gif', '206', '57');
	  }
	}




