var address="2324 156th St., Surrey, British Columbia"
var map = null;
var geocoder = null;

function initialize() {
	if (GBrowserIsCompatible()) {
		var map = new google.maps.Map(document.getElementById("map"));
		map.setCenter(new GLatLng(37.4419, -122.1419), 14);
		var mapControl = new GMapTypeControl();
		map.addControl(mapControl);
		map.addControl(new GLargeMapControl());
		geocoder = new GClientGeocoder();
	}
	
	directionsPanel = document.getElementById("route");
	directions = new GDirections(map, directionsPanel);
	directions.load("YVR to 2324 156th St., Surrey, British Columbia");
	
	var marker = new GLatLng(49.0432474,-122.7899274);
	map.openInfoWindowHtml(marker,"<strong>Baragar Demographics</strong><br />2324 156th St.,<br />Surrey, British Columbia");
	
	
	/*if (geocoder) {
		geocoder.getLatLng(
			address,
			function(point) {
				if (!point) {
					alert(address + " not found");
				} else {
					var marker = new GLatLng(point);
					map.openInfoWindow(marker,document.createTextNode("Hello, world"));
					//map.openInfoWindowHtml(marker,"<strong>Baragar Demographics</strong><br />2324 156th St.,<br />Surrey, British Columbia");
					
				}
			}
		);
	}*/
}
