//<![CDATA[
if (GBrowserIsCompatible()) { 
		
    var stat = "Slovensko";	
    var map = null;
    var geo;
    var reasons=[];
    var obec;
    
    function load() {
      map = new GMap2(document.getElementById("map"));
      map.addControl(new GLargeMapControl());
      map.addControl(new GMapTypeControl(1));	  
      map.setCenter(new GLatLng(48.139516,17.128716),12);
  	  /*map.enableScrollWheelZoom();*/
  	  map.enableDoubleClickZoom();
  	  GEvent.addDomListener(map.getContainer(), "DOMMouseScroll", wheelevent);
  	  map.getContainer().onmousewheel = wheelevent; 
  	  //continuous zoom enable
  	  map.enableContinuousZoom();
	  
      // ====== Create a Client Geocoder ======
      geo = new GClientGeocoder(); 

      // ====== Array for decoding the failure codes ======
      reasons[G_GEO_SUCCESS]            = "Success";
      reasons[G_GEO_MISSING_ADDRESS]    = "Missing Address: The address was either missing or had no value.";
      reasons[G_GEO_UNKNOWN_ADDRESS]    = "Unknown Address:  No corresponding geographic location could be found for the specified address.";
      reasons[G_GEO_UNAVAILABLE_ADDRESS]= "Unavailable Address:  The geocode for the given address cannot be returned due to legal or contractual reasons.";
      reasons[G_GEO_BAD_KEY]            = "Bad Key: The API key is either invalid or does not match the domain for which it was given";
      reasons[G_GEO_TOO_MANY_QUERIES]   = "Too Many Queries: The daily geocoding quota for this site has been exceeded.";
      reasons[G_GEO_SERVER_ERROR]       = "Server error: The geocoding request could not be successfully processed.";
      
      //GEvent.addListener(map,"move",getZoom);
      //GEvent.addListener(map,"move",getType);
    }
  
	//prevent page scroll
	function wheelevent(e) {
			
	  if (!e){
		e = window.event
	  }
	  if (e.preventDefault){
		e.preventDefault()
      }
	  e.returnValue = false;	
	}
    
    function setType(typ) {
      map.setMapType(typ);
    }
			
      // ====== Plot a marker after positive reponse to "did you mean" ======
    function place(lat,lng,z) {
        var point = new GLatLng(lat,lng);
        map.setCenter(point,14);
        map.setZoom(z);
		    var markerD2 = new GMarker(point, {icon:G_DEFAULT_ICON, draggable: false}); 
		    map.addOverlay(markerD2);
		
		    //markerD2.enableDragging();
		
        document.getElementById("message").innerHTML = "";	
	}
}
    
    // display a warning if the browser was not compatible
else {
	alert("Sorry, the Google Maps API is not compatible with this browser");
}

    // This Javascript is based on code provided by the
    // Blackpool Community Church Javascript Team
    // http://www.commchurch.freeserve.co.uk/   
    // http://econym.googlepages.com/index.htm

//]]>
