var map;
var geocoder;

function initialize(title,address) {
	adres = address.replace(/,/g,'');
	adres = adres.split(" ");
	map = new GMap2(document.getElementById("map"));
	map.addControl(new GSmallMapControl());
	var mapControl = new GMapTypeControl();
	map.addControl(mapControl);
	map.setMapType(G_HYBRID_MAP);
	map.removeControl(mapControl); 
	geocoder = new GClientGeocoder();
	showAddress (address, "<div style='height:125px;line-height:16px'><span class=\'orangetxt\'><b>Hollands Wild</b><\/span> reclamebureau<br><br>Oudegracht 297 (Werfkelder)<br>3511 PA  Utrecht<br><a href='mailto:post@hollandswild.nl' title='Stuur een e-mail' style='color:#000;text-decoration:none'>post@hollandswild.nl</a><br>030 236 72 14<br><br><a href='http://www.google.nl/maps?f=q&amp;hl=nl&amp;geocode=&amp;q=hollands+wild+reclamebureau&amp;sll=52.469397,5.509644&amp;sspn=2.078086,4.806519&amp;ie=UTF8&amp;ll=52.085908,5.12215&amp;spn=0.002047,0.004694&amp;t=h&amp;z=18&amp;iwloc=A' title='Routebeschrijving' target='_blank' style='color:#000;text-decoration:none'>Routebeschrijving ></a></div>");
}

function showAddress(address, info) {
	if (geocoder) {
		geocoder.getLatLng(address, function(point) {
			if (!point) {
				document.getElementById('glgview').style.display = 'none';
			} else {
				map.setCenter(point, 16);
				var marker = new GMarker(point);
				map.addOverlay(marker);
				GEvent.addListener(marker, "click", function() {marker.openInfoWindowHtml(info,{maxWidth:225});});
				marker.openInfoWindowHtml(info,{maxWidth:225,height:300});
			}
		});
	}
}