function initialize() {
  var map;
  if (GBrowserIsCompatible()) {
    map = new GMap2(document.getElementById("map_canvas"));
    map.addControl(new GSmallMapControl());
    map.addControl(new GMapTypeControl());

    map.setCenter(new GLatLng(-41.609506, 171.897025), 14);
    
	var locIcon = new GIcon(G_DEFAULT_ICON);
	locIcon.image = "http://www.newzealandtravelinsider.com/images/flag.png";
	var parkIcon = new GIcon(G_DEFAULT_ICON);
	parkIcon.image = "http://www.newzealandtravelinsider.com/images/park.png";
	                
	markerOptions1 = { icon:locIcon };
	var waterfallMarker = new GMarker(new GLatLng(-41.607308, 171.914234), markerOptions1);
    map.addOverlay(waterfallMarker);
    GEvent.addListener(waterfallMarker, "click", function() {
	    waterfallMarker.openInfoWindowHtml("Here's where Mangatini Falls is located.<br/>You'll be standing opposite to it on<br/>the other side of Charming Creek, or<br/> directly below it.");
	  });
	
	markerOptions2 = { icon:parkIcon };
    var parkingMarker = new GMarker(new GLatLng(-41.609747, 171.88134), markerOptions2);        
    map.addOverlay(parkingMarker);
    GEvent.addListener(parkingMarker, "click", function() {
	    parkingMarker.openInfoWindowHtml('Parking lot for the <a target="blank" href="http://www.doc.govt.nz/parks-and-recreation/tracks-and-walks/west-coast/buller-area/charming-creek-walkway/">Charming Creek Walkway</a>.<br/>It is a small dirt area that can get muddy <br/>sometimes.');
	  });

    map.setMapType(G_PHYSICAL_MAP);        

	var polyline = new GPolyline([
		new GLatLng(-41.609747, 171.88134),
		new GLatLng(-41.610116, 171.883636),
		new GLatLng(-41.610694, 171.885395),
		new GLatLng(-41.607549, 171.890244),
		new GLatLng(-41.607549, 171.890931),
		new GLatLng(-41.609506, 171.894536),
		new GLatLng(-41.607645, 171.900415),
		new GLatLng(-41.607838, 171.901746),
		new GLatLng(-41.609699, 171.905179),
		new GLatLng(-41.609667, 171.90608),
		new GLatLng(-41.609153, 171.907668),
		new GLatLng(-41.609089, 171.910243),
		new GLatLng(-41.608063, 171.912475),
		new GLatLng(-41.607389, 171.912088),
		new GLatLng(-41.606972, 171.913805)
	], "#FF0000", 4);
	map.addOverlay(polyline);  
	} 
}

