// Create our "tiny" marker icon
var icon = new GIcon();
icon.image = "http://labs.google.com/ridefinder/images/mm_20_red.png";
icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
icon.iconSize = new GSize(12, 20);
icon.shadowSize = new GSize(22, 20);
icon.iconAnchor = new GPoint(6, 20);
icon.infoWindowAnchor = new GPoint(5, 1);

// Create our "tiny" marker icon
var icon2 = new GIcon();
icon2.image = "http://maxdev.nl/ducarbo/images/logo_maps.png";
icon2.shadow = "http://maxdev.nl/ducarbo/images/logo_maps_shadow.png";
icon2.iconSize = new GSize(22, 20);
icon2.shadowSize = new GSize(29, 20);
icon2.iconAnchor = new GPoint(6, 20);
icon2.infoWindowAnchor = new GPoint(15, 1);



function showAddress(address,map,info,type,center) {
			var geocoder = new GClientGeocoder();
			map.addControl(new GSmallMapControl());
			geocoder.getLatLng(
				address,
				function(point) {
					if (point) {
						if(center){
							map.setCenter(point, 6);
							map.savePosition()
						}
						if(type=="ducarbo"){
							var use_icon = icon2;
						}
						else{
							var use_icon = icon;
						}
					  var marker = new GMarker(point,use_icon);
						  GEvent.addListener(marker, "click", function() {
						  	// inzoomen bij openen
						    map.setCenter(point,12);
						    // informatie tonen
						    marker.openInfoWindowHtml(info);
						  });
						 /* GEvent.addListener(marker,"infowindowclose", function(){
						  	// uitzoomen bij sluiten window en terug naar startpositi
						  	map.returnToSavedPosition();
						  });*/

						map.addOverlay(marker);
					}
				}
			);
		}

