function codeAddress(address) {
    var geocoder = new google.maps.Geocoder();
    geocoder.geocode( { 'address': address}, function(results, status) {
      if (status == google.maps.GeocoderStatus.OK) {
          window.location="/search.aspx?"+"lat="+results[0].geometry.location.lat()+"&lon="+results[0].geometry.location.lng()+"&loc="+address;
      } else {
        alert("Geocode was not successful for the following reason: " + status);
      }
    });
}

//returns lat and lng as post variables
function ParseLocation(location) {

      var lat = location.lat().toString().substr(0, 12);
      var lng = location.lng().toString().substr(0, 12);

      return "lat="+lat+"&lon"+lng

    }
