	  function doGeolocation() {
	 		//document.getElementById('info').innerHTML = "Detecting your location...";
	    if (navigator.geolocation) {
	      navigator.geolocation.getCurrentPosition(positionSuccess, positionError);
	    } else {
	      positionError(-1);
	    }
	  }

	  function positionError(err) {
	    var msg;

	    switch(err.code) {
	      case 0:
	        msg = "Unable to find your location";
	        break;
	      case 1:
	        msg = "Permissioned denied in finding your location";
	        break;
	      case 2:
	        msg = "Your location is currently unknown";
	        break;
	      case 3:
	        msg = "Attempt to find location took too long";
	        break;
	      default:
	        msg = "Location detection not supported in browser";
	    }
			//	    document.getElementById('info').innerHTML = msg;
			alert(msg);
	  }

	  function positionSuccess(position) {

	    // Centre the map on the new location
	    var coords = position.coords || position.coordinate || position;

	    //zavolam ajax
			new Ajax.Request('http://www.lokola.cz/search/ajaxRevGeoCode/lat:'+coords.latitude+'/lon:'+coords.longitude+'/accuracy:'+coords.accuracy, {asynchronous:true,
		  	onComplete: function(transport){
				//	alert(transport.responseText);
				if(transport.responseText == 'Prague') { transport.responseText = transport.responseText.replace('Prague', 'Praha');}
		      $('kde').value = transport.responseText;
		    }
		  });
		//	alert('Position detected');
		//	document.getElementById('info').innerHTML = "Position detected"; 
	  }
