function codeAddress(address, targetMap) {
	var geocoder;
	geocoder = new google.maps.Geocoder();
	geocoder.geocode( { address: address}, function(results, status) {
		if (status == google.maps.GeocoderStatus.OK && results.length) {
			if (status != google.maps.GeocoderStatus.ZERO_RESULTS) {
				var marker = new google.maps.Marker({
					position: results[0].geometry.location,
					map: targetMap
				});
				
				var infowindow = new google.maps.InfoWindow({
					content: address
				});
				
				google.maps.event.addListener(marker, 'click', function() {
					infowindow.open(targetMap, marker);
				});
				
				targetMap.setCenter(marker.getPosition());
			}
		} else {
			//alert("Geocode was unsuccessful due to: " + status);
		}
	});
}

var contactMap;
function loadContactMap() {
	var latlng = new google.maps.LatLng(35, -118.644);
	var mapOptions = {
		zoom: 6,
		center: latlng,
		mapTypeId: google.maps.MapTypeId.TERRAIN
	};
	contactMap = new google.maps.Map(document.getElementById("contactMap"), mapOptions);
	codeAddress("119 18th Street, Lincoln Beach, 92648", contactMap);
}

