    //<![CDATA[

    var map = null;
    var geocoder = null;
	var directionsPanel;
    var directions = null;

    function load() {
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map"));
		directionsPanel = document.getElementById("route");
        map.setCenter(new GLatLng(53.45114531321813,14.531028270721436), 13);
				map.addControl(new GSmallMapControl());
				map.addControl(new GMapTypeControl());
        geocoder = new GClientGeocoder();
      	directions = new GDirections(map, directionsPanel);
	    //directions.load("Szczecin, PL, Wojska Polskiego 65 to Szczecin, PL, Mickiewicza 64");
      }
    }

    function showAddress(address) {
		 if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
              alert(address + " nie znaleziono adresu");
            } else {
              map.setCenter(point, 13);
              var marker = new GMarker(point);
              map.addOverlay(marker);
              //marker.openInfoWindowHtml(address);
							GEvent.addListener(marker, "click", function() {
            marker.openInfoWindowHtml(address+"<br><br>Znajd¼ najbli¿szy:"+pole_wyb);
          });
            }
          }
        );
      }
    }
		function findDirection(address1, address2) {
            //alert("from: "+address1+" to: "+address2);
			document.getElementById('map').style.width=385;
            document.getElementById('route').style.display="block";
            directions.load("from: "+address1+" to: "+address2);
            //directions.load("from: 500 Memorial Drive, Cambridge, MA to: 4 Yawkey Way, Boston, MA 02215 (Fenway Park)");
    }
		
    //]]>
				
