//<![CDATA[
var map = null;
var geocoder = null;    
var content = "<div style=\"font-size:1.0em;padding:0 10px 10px 0;font-weight:bold;text-align:left;\">DDi Solutions</div>";
content += "<p style=\"font-size:0.8em;text-align:left;width:250px;padding-left:0;\">";
content += "The professional team at DDi Solutions offers state of the art Website design, Database and Software development.";
content += "</p>";
content += "<div style=\"text-align:left;\"><strong>Head Office:</strong> +61 (0) 2 6023 4666</div>";

    function load() {
      if (GBrowserIsCompatible()) {
		  try {
				//map = new GMap2(document.getElementById("map"));
        		//map.setCenter(new GLatLng(-36.090979, 146.90991), 15);

				//marker.setImage(newImagePath);	  
				map = new GMap2(document.getElementById("map") );
				map.addControl(new GSmallMapControl());  
				//map.addControl(new GMapTypeControl());
				var start = new GLatLng(-36.090979, 146.90991);
				map.setCenter(start, 13); 
				geocoder = new GClientGeocoder();
		}
		catch(err){
			alert(err);
		} //it's ok to fail here - ignore it.			
      }
    }
    
    function showAddress(address) {
      if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
              alert(address + " not found");
            } else {
			  point = new GLatLng(-36.090979, 146.90991);
              map.setCenter(point, 13);
              var marker = new GMarker(point);
              GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(content); }); 
              map.addOverlay(marker);
              marker.openInfoWindowHtml(content);		  
            }
          }
        );
      }
    }
	// execute your scripts when DOM is ready.
    //$(function() { load(); showAddress('19 Bomen Road, Bomen, NSW 2650'); });
    window.setTimeout('load(); showAddress(\'601 Nurigong Street, Albury, NSW 2640\');', 100);
	//window.setTimeout('load();', 100);
    window.onunload = GUnload;
//]]>