// JavaScript Document

//<![CDATA[

		var map = null;
    var geocoder = null;

    function load() {
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map"));
				// 
				map.addControl(new GLargeMapControl());
				map.addControl(new GMapTypeControl());
        map.setCenter(new GLatLng(-33.715, 150.313638), 15); // Kurrara location: -33.721555, 150.313638
        geocoder = new GClientGeocoder();

      }
	  else{
		  alert("Browser is not compatible for Google Maps!")
	  }
    }

    function showAddress(town,address,bname,image,w,h,id) {
      if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
				if(town != ""){
				showAddress('',town,bname,image,w,h,id)
				}else{
				  alert(address + " not found");
				}
            } else {
              //map.setCenter(point, 15);
              var marker = new GMarker(point);
              map.addOverlay(marker);
							marker.openInfoWindowHtml("<div style='text-align:center; color: #444; font-family: Arial; font-size: 11px;'><strong>Kurrara Guest House</strong><br />17 Coomonderry St<br />Katoomba 2780<br />NSW Australia</div>");
          }
				});
      }
    }
