KB.GoogleMaps={mapElement:null,map:null,geo:null,reasons:[],standards:[["road","rd"],["street","st"],["avenue","ave"],["av","ave"],["drive","dr"],["saint","st"],["north","n"],["south","s"],["east","e"],["west","w"],["expressway","expy"],["parkway","pkwy"],["terrace","ter"],["turnpike","tpke"],["highway","hwy"],["lane","ln"]],load:function(a){if(!GBrowserIsCompatible()){alert("Sorry, the Google Maps API is not compatible with this browser");return}this.mapElement=a;this.map=new GMap(a);this.map.addControl(new GLargeMapControl());this.map.addControl(new GMapTypeControl());this.geo=new GClientGeocoder();this.reasons[G_GEO_SUCCESS]="Success";this.reasons[G_GEO_MISSING_ADDRESS]="Missing Address: The address was either missing or had no value.";this.reasons[G_GEO_UNKNOWN_ADDRESS]="Unknown Address:  No corresponding geographic location could be found for the specified address.";this.reasons[G_GEO_UNAVAILABLE_ADDRESS]="Unavailable Address:  The geocode for the given address cannot be returned due to legal or contractual reasons.";this.reasons[G_GEO_BAD_KEY]="Bad Key: The API key is either invalid or does not match the domain for which it was given";this.reasons[G_GEO_TOO_MANY_QUERIES]="Too Many Queries: The daily geocoding quota for this site has been exceeded.";this.reasons[G_GEO_SERVER_ERROR]="Server error: The geocoding request could not be successfully processed."},standardize:function(b){for(var c=0;c<this.standards.length;c++){if(b==this.standards[c][0]){b=this.standards[c][1]}}return b},different:function(e,d){var h=d.split(",");d=h[0];e=e.toLowerCase();d=d.toLowerCase();e=e.replace(/'/g,"");d=d.replace(/'/g,"");e=e.replace(/\W/g," ");d=d.replace(/\W/g," ");e=e.replace(/\s+/g," ");d=d.replace(/\s+/g," ");awords=e.split(" ");bwords=d.split(" ");var g=false;for(var f=0;f<bwords.length;f++){if(this.standardize(awords[f])!=this.standardize(bwords[f])){g=true}}return(g)},place:function(c,b){var a=new GLatLng(c,b);this.map.setCenter(a,14);this.map.addOverlay(new GMarker(a));suggestedAdsress=""},suggestAddress:function(c){var d;this.map.clearOverlays();var a=new GLatLng("39.061849134291535","-105.53466796875");var b=new GMarker(a,{draggable:true,bouncy:true,bounceGravity:0.3});console.log(b);this.map.addOverlay(b);this.geo.getLocations(c,function(f){if(f.Status.code==G_GEO_SUCCESS){if(f.Placemark){var g=f.Placemark.length?f.Placemark[0]:f.Placemark;console.log(g);var e=new GLatLng(g.Point.coordinates[1],g.Point.coordinates[0]);this.map.setCenter(e,11);b.setPoint(e);$("latlng").value=e.toString()}}else{alert("Could not find")}}.bind(this))}};