/*console.log(address);*/
function load() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        map.addControl(new GSmallZoomControl());
		map.enableDoubleClickZoom();
		var geocoder = new GClientGeocoder();
		function showAddress(address) {
			  geocoder.getLatLng(
			    address,
			    function(point) {
			      if (!point) {
			//	  document.getElementById("mapcontainer").style.display='none'; /* address not found, hide map */
				window.alert('no address');
			    } else {
			        map.setCenter(point, 15);
			        var marker = new GMarker(point);
			        map.addOverlay(marker);
			      }
			    }
			  );
			}
		showAddress(address);
      }
    }
function addLoadEvent(func)
{	
	var oldonload = window.onload;
	if (typeof window.onload != 'function'){
    	window.onload = func;
	} else {
		window.onload = function(){
		oldonload();
		func();
		}
	}

}
addLoadEvent(load);