<!-- hide this stuff from other browsers 

//<![CDATA[

var map;
var geocoder = null;
var addressMarker;
var addresses = [								 
"Lambton Quay, Wellington, New Zealand",
"Cuba Mall, Wellington, New Zealand",
"Courtenay Place, Wellington, New Zealand",
"193 vivian st, Wellington, New Zealand",
"55 cable st, Wellington, New Zealand",
"Wellington Station, Wellington, New Zealand",
"Basin Reserve, Wellington, New Zealand",
"Oriental Parade, Te Aro, Wellington, New Zealand",
"222 Willis Street , Wellington, New Zealand"
];
var addresstext = [ 
"<b>Lambton Quay</b>",
"<b>Cuba Mall</b>",
"<b>Courtenay Place</b>",
"<b>Farmers Market</b>",
"<b>Te Papa Museum</b>",
"<b>Wellington Train Station</b>",
"<b>Basin Reserve</b>",
"<b>Oriental Parade</b>",
"<b>222 Willis Street<br />Wellington"
];		
var numGeocoded = 0;		

// Create Icons
var attractionIcon = new GIcon(G_DEFAULT_ICON);
attractionIcon.image = "http://www.google.com/intl/en_us/mapfiles/ms/micons/red.png";
attractionIcon.iconSize = new GSize(24, 24);
attractionIcon.shadowSize = new GSize(28, 24);

var hotelIcon = new GIcon(G_DEFAULT_ICON);
hotelIcon.image = "http://www.google.com/intl/en_us/mapfiles/ms/micons/orange-dot.png";
hotelIcon.iconSize = new GSize(32, 32);
hotelIcon.shadowSize = new GSize(36, 32);

            		
		
function createMarker(point, number) {
	
	// Determine Hotel or Attraction Icon
	if (number == 8) {
		markerOptions = { icon:hotelIcon };
	} else {
		markerOptions = { icon:attractionIcon };
	}
	var marker = new GMarker(point, markerOptions);
	marker.value = number;
	GEvent.addListener(marker,"click", function() {
		var infotext = addresstext[number];
		map.openInfoWindowHtml(point, infotext);
	});
	return marker;
}
		
function geocodeAll() {
	if (numGeocoded < addresses.length) {
		geocoder.getLocations(addresses[numGeocoded], addressResolved);
	}
}

function addressResolved(response) {
 var delay = 0;
 if (response.Status.code == 620) {
	 // Too fast, try again, with a small pause
	 delay = 1000;
 } else {
	 if (response.Status.code == 200) {
		 // Success; do something with the address.
		 place = response.Placemark[0];
		 point = new GLatLng(place.Point.coordinates[1], place.Point.coordinates[0]);
		 
		 map.addOverlay(createMarker(point, numGeocoded));		 
	 }
	 // Move onto the next address; this skips bad addresses, too.
	 numGeocoded += 1;
 }
 window.setTimeout(geocodeAll, delay);
}

function load() {
	if (GBrowserIsCompatible()) {
		map = new GMap2(document.getElementById("map"));
		map.addControl(new GSmallMapControl());
		map.addControl(new GMapTypeControl());
		map.setCenter(new GLatLng(-41.289270,174.785559), 14);
		
		geocoder = new GClientGeocoder();
		geocoder.setCache(null);

		window.setTimeout(geocodeAll, 50);
	}
}

    //]]>


		
// end hiding javascript -->