function initialize_google_map() {
  if(GBrowserIsCompatible()) {
    var google_map = new GMap2(document.getElementById('google_map'));
		google_map.setMapType(G_SATELLITE_MAP);
    google_map.addControl(new GSmallZoomControl());
    google_map.checkResize();
	  google_map.setCenter(new GLatLng(-24.588527, 133.505859), 4);

		var baseIcon = new GIcon();
		baseIcon.shadow = "/images/icons/shadow.png";
		baseIcon.iconSize = new GSize(32.0, 37.0);
		baseIcon.shadowSize = new GSize(51.0, 37.0);
		baseIcon.iconAnchor = new GPoint(16.0, 18.0);
		baseIcon.infoWindowAnchor = new GPoint(16, 18);
		
		function createMarker(point, name, info) {
			var icon = new GIcon(baseIcon);
			icon.image = "/images/icons/" + name + ".png";
			
			var marker = new GMarker(point, icon);
			GEvent.addListener(marker, "click", function() {
				marker.openInfoWindowHtml(info, {maxWidth:250});
			});
			return marker;
		}

		google_map.addOverlay(createMarker(new GLatLng(-27.4231, 117.898965), 'au', "<h3><a href='/projects/central-murchison'>Central Murchison Gold</a></h3><p>The Central Murchison Gold Project (CMGP) is located between the towns of Mt Magnet and Cue approximately 600km north-east of Perth, Western Australia.</p><p>More about: <a href='/projects/central-murchison'>Central Murchison Project</a></p>"));
		
		google_map.addOverlay(createMarker(new GLatLng(-21.7925, 135.403889), 'p2', "<h3><a href='/projects/phosphate'>Phosphate</a></h3><p>The Georgina Basin in the Northern Territory is highly prospective for large phosphate deposits such as that at Wonarah located approximately 200km north east of the 100% owned Ammaroo Phosphate Prospect</p><p>More about: <a href='/projects/phosphate'>Ammaroo & Lady Judtih</a></p>"));
		
		google_map.addOverlay(createMarker(new GLatLng(-31.198056, 121.795833), 'ni', "<h3><a href='/projects/nickel'>Nickel</a></h3><p>The Kambalda region is prospective for both orogenic gold and massive Ni sulphide mineralisation and has a history of extensive production from mines such as the Long (200,000t Ni) and Beta-Hunt (nickel) (35,000t Ni).</p><p>More about: <a href='/projects/nickel'>Lake Lefroy</a></p>"));
		
		google_map.addOverlay(createMarker(new GLatLng(-27.806389, 121.2675), 'au', "<h3><a href='/projects/gold'>Gold</a></h3><p>Located just 7km north of the Darlot Gold Mine in the gold rich Yandal Belt of Western Australia the Mission and Cables Prospects are in a zone of structural deformation extending north from the Darlot Gold Mine.</p><p>More about: <a href='/projects/gold'>Mission and Cable</a></p>"));

  } 
}

if (typeof window.onload != 'function') {
  window.onload = initialize_google_map;
} else {
  old_before_google_map = window.onload;
  window.onload = function() {
    old_before_google_map();
    initialize_google_map();
  }
}
if (typeof window.onunload != 'function') {
  window.onunload = GUnload;
} else {
  old_before_onunload = window.onload;
  window.onunload = function() {
    old_before_onunload();
    GUnload();
  }
}
