// JavaScript Document<script type="text/javascript">
	if (GBrowserIsCompatible()) {
	 // this variable will collect the html which will eventually be placed in the side_bar
      var side_bar_html = "";
    
      // arrays to hold copies of the markers and html used by the side_bar
      // because the function closure trick doesnt work there
      var gmarkers = [];
      var i = 0;

    //<![CDATA[
	 function createMarker(point,name,html) {
        var marker = new GMarker(point);
        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(html);
        });
        // save the info we need to use later for the side_bar
        gmarkers[i] = marker;
        // add a line to the side_bar html
        side_bar_html += '<li><a href="javascript:myclick(' + i + ')">' + name + '</a></li><br>';
        i++;
        return marker;
      } 
	  
	  // This function picks up the click and opens the corresponding info window
      function myclick(i) {
        GEvent.trigger(gmarkers[i], "click");
      }

    var map = new GMap(document.getElementById("mapAuck"));    
	map.setCenter(new GLatLng(-36.846577,174.768341) ,15);
    map.addControl(new GLargeMapControl());


var point = new GLatLng(-36.846577,174.768341);
var marker = createMarker(point,'Oaks Residences','Oaks Residences <br /><a href="http://www.theoaksgroup.com.au">Website</a>')
map.addOverlay(marker);
 
var point = new GLatLng(-36.852754,174.760895);
var marker = createMarker(point,"Rendezvous Hotel Auckland", "The Rendezvous Hotel Auckland combines<br> timeless elegance with the finest service<br><a href='http://www.rendezvoushotels.com/auckland/'>Website</a>")
map.addOverlay(marker);

                 
      // put the assembled side_bar_html contents into the side_bar div
      document.getElementById("side_bar").innerHTML = side_bar_html;
       }
    else {
      alert("Sorry, the Google Maps API is not compatible with this browser");
    }
	  
	    //]]>

  
