// docs are here https://developer.mozilla.org/En/Using_geolocation
var searchWhereText;

// keep
function getGeoProfile() {
  var geoProfile = false;
  if (navigator.geolocation == undefined || navigator.geolocation == null) {
    if (!window.google || !google.gears) {
      geoProfile = false;
    } else {
      var geo = google.gears.factory.create('beta.geolocation');
      if (geo) {
        geoProfile = 'gears';  
      } else {
        geoProfile = false;
      }
    }
  } else {
    geoProfile = 'w3c';
  }
  return geoProfile;
}

// keep
function getCurrentPosition(geoProfile) {
  if (geoProfile == 'w3c') {
    navigator.geolocation.getCurrentPosition(getPositionCallback, handleError, { enableHighAccuracy:true, maximumAge:1 }); 
  } else if (geoProfile == 'gears') {
    var geo = google.gears.factory.create('beta.geolocation');
    geo.getCurrentPosition(getPositionCallback, handleError, { enableHighAccuracy:true, gearsRequestAddress:true});
  }
}





