    var map; 
    var coder;

    function showmap(id, address) {
		$(id).style.display='none';
		
		if (GBrowserIsCompatible()) {	
		    coder = new GClientGeocoder();
		    coder.setBaseCountryCode('cz');
    		
		    coder.getLocations(address, function(response) {
			 
			    if (response && response.Status.code != 200) {
					alert('Google mapa není k dispozici.');
			    } else { 
		    		$(id).style.width="760px";
					$(id).style.height="480px";
			
					$(id).style.display="block";
					$(id).style.border="3px solid black";
					$(id).style.margin="10px 0";
					
			    	map = new GMap2($(id), new GSize(760, 480));

				    map.addControl(new GLargeMapControl());
				    map.addControl(new GMapTypeControl());
		    
		    		var place = response.Placemark[0];
					var point = new GLatLng(place.Point.coordinates[1], place.Point.coordinates[0]);
		    		map.setCenter(point, 16);
					/*map.addOverlay(new GMarker(point));*/
		    		map.openInfoWindowHtml(point, place.address);
			    }
			
			});
		} else {
			alert('Váš prohlížeč nepodporuje Google mapy.');
		}
    }
    