function rounded_corners(map_id, image_dir) {

	function round_corner_1() {}
	round_corner_1.prototype = new GControl();
	round_corner_1.prototype.initialize = function(map) {
		var container = document.createElement("div");
		container.innerHTML = '<img src="'+image_dir+'/round_tl.png" width="10" height="10" alt="" />';
		map.getContainer().appendChild(container);
		return container;
	}
	round_corner_1.prototype.getDefaultPosition = function() {
		return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(0, 0));
	}
	map_id.addControl(new round_corner_1());
	
	function round_corner_2() {}
	round_corner_2.prototype = new GControl();
	round_corner_2.prototype.initialize = function(map) {
		var container = document.createElement("div");
		container.innerHTML = '<img src="'+image_dir+'/round_tr.png" width="10" height="10" alt="" />';
		map.getContainer().appendChild(container);
		return container;
	}
	round_corner_2.prototype.getDefaultPosition = function() {
		return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(0, 0));
	}
	map_id.addControl(new round_corner_2());
	
	function round_corner_3() {}
	round_corner_3.prototype = new GControl();
	round_corner_3.prototype.initialize = function(map) {
		var container = document.createElement("div");
		container.innerHTML = '<img src="'+image_dir+'/round_bl.png" width="10" height="10" alt="" />';
		map.getContainer().appendChild(container);
		return container;
	}
	round_corner_3.prototype.getDefaultPosition = function() {
		return new GControlPosition(G_ANCHOR_BOTTOM_LEFT, new GSize(0, 0));
	}
	map_id.addControl(new round_corner_3());
	
	function round_corner_4() {}
	round_corner_4.prototype = new GControl();
	round_corner_4.prototype.initialize = function(map) {
		var container = document.createElement("div");
		container.innerHTML = '<img src="'+image_dir+'/round_br.png" width="10" height="10" alt="" />';
		map.getContainer().appendChild(container);
		return container;
	}
	round_corner_4.prototype.getDefaultPosition = function() {
		return new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(0, 0));
	}
	map_id.addControl(new round_corner_4());
}

function custom_map_controls(map_id, image_dir, home) {
	
	// HOME BUTTON
	function map_control_home() {}
	map_control_home.prototype = new GControl();
	map_control_home.prototype.initialize = function(map_id) {
		var container = document.createElement("div");
		var content = '<img src="'+image_dir+'/map_home.gif" width="13" height="13" onclick="map.panTo(user_home);" style="cursor: hand;" title="Zu meinem Heimatort scrollen" alt="Mein Zuhause auf der Karte zentrieren" />';
		container.innerHTML = content;
		map.getContainer().appendChild(container);
		return container;
	}
	map_control_home.prototype.getDefaultPosition = function() {
		return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(18, 10));
	}
	map_id.addControl(new map_control_home());
	
	// UP BUTTON
	function map_control_up() {}
	map_control_up.prototype = new GControl();
	map_control_up.prototype.initialize = function(map_id) {
		var container = document.createElement("div");
		var content = '<img src="'+image_dir+'/map_up.gif" width="13" height="13" onclick="map.panDirection(0, +1);" style="cursor: hand;" alt="Karte nach Norden scrollen" />';
		container.innerHTML = content;
		map.getContainer().appendChild(container);
		return container;
	}
	map_control_up.prototype.getDefaultPosition = function() {
		return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(18, 30));
	}
	map_id.addControl(new map_control_up());
	
	// LEFT BUTTON
	function map_control_left() {}
	map_control_left.prototype = new GControl();
	map_control_left.prototype.initialize = function(map_id) {
		var container = document.createElement("div");
		var content = '<img src="'+image_dir+'/map_left.gif" width="13" height="13" onclick="map.panDirection(+1, 0);" style="cursor: hand;" alt="Karte nach Westen scrollen" />';
		container.innerHTML = content;
		map.getContainer().appendChild(container);
		return container;
	}
	map_control_left.prototype.getDefaultPosition = function() {
		return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(11, 45));
	}
	map_id.addControl(new map_control_left());
	
	// RIGHT BUTTON
	function map_control_right() {}
	map_control_right.prototype = new GControl();
	map_control_right.prototype.initialize = function(map_id) {
		var container = document.createElement("div");
		var content = '<img src="'+image_dir+'/map_right.gif" width="13" height="13" onclick="map.panDirection(-1, 0);" style="cursor: hand;" alt="Karte nach Osten scrollen" />';
		container.innerHTML = content;
		map.getContainer().appendChild(container);
		return container;
	}
	map_control_right.prototype.getDefaultPosition = function() {
		return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(25, 45));
	}
	map_id.addControl(new map_control_right());
	
	// DOWN BUTTON
	function map_control_down() {}
	map_control_down.prototype = new GControl();
	map_control_down.prototype.initialize = function(map_id) {
		var container = document.createElement("div");
		var content = '<img src="'+image_dir+'/map_down.gif" width="13" height="13" onclick="map.panDirection(0, -1);" style="cursor: hand;" alt="Karte nach S&uuml;den scrollen" />';
		container.innerHTML = content;
		map.getContainer().appendChild(container);
		return container;
	}
	map_control_down.prototype.getDefaultPosition = function() {
		return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(18, 60));
	}
	map_id.addControl(new map_control_down());
	
	// ZOOMIN BUTTON
	function map_control_in() {}
	map_control_in.prototype = new GControl();
	map_control_in.prototype.initialize = function(map_id) {
		var container = document.createElement("div");
		var content = '<img src="'+image_dir+'/map_plus.gif" width="13" height="13" onclick="map.zoomIn();" style="cursor: hand;" title="Reinzoomen" alt="reinzoomen" />';
		container.innerHTML = content;
		map.getContainer().appendChild(container);
		return container;
	}
	map_control_in.prototype.getDefaultPosition = function() {
		return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(18, 80));
	}
	map_id.addControl(new map_control_in());
	
	// ZOOMOUT BUTTON
	function map_control_out() {}
	map_control_out.prototype = new GControl();
	map_control_out.prototype.initialize = function(map_id) {
		var container = document.createElement("div");
		var content = '<img src="'+image_dir+'/map_minus.gif" width="13" height="13" onclick="map.zoomOut();" style="cursor: hand;" title="Herauszoomen" alt="herauszoomen" />';
		container.innerHTML = content;
		map.getContainer().appendChild(container);
		return container;
	}
	map_control_out.prototype.getDefaultPosition = function() {
		return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(18, 150));
	}
	map_id.addControl(new map_control_out());
	
	// ZOOMCLOSE BUTTON
	function map_control_close() {}
	map_control_close.prototype = new GControl();
	map_control_close.prototype.initialize = function(map_id) {
		var container = document.createElement("div");
		var content = '<img src="'+image_dir+'/map_detail.gif" width="13" height="13" onclick="map.setZoom(16);" style="cursor: hand;" title="Detailkarte anzeigen" alt="Auf Strassenlevel zoomen" />';
		container.innerHTML = content;
		map.getContainer().appendChild(container);
		return container;
	}
	map_control_close.prototype.getDefaultPosition = function() {
		return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(18, 100));
	}
	map_id.addControl(new map_control_close());
	
	// ZOOMMIDDLE BUTTON
	function map_control_middle() {}
	map_control_middle.prototype = new GControl();
	map_control_middle.prototype.initialize = function(map_id) {
		var container = document.createElement("div");
		var content = '<img src="'+image_dir+'/map_zip.gif" width="13" height="13" onclick="map.setZoom(12);" style="cursor: hand;" title="&Uuml;bersicht anzeigen" alt="Auf Stadtlevel zoomen" />';
		container.innerHTML = content;
		map.getContainer().appendChild(container);
		return container;
	}
	map_control_middle.prototype.getDefaultPosition = function() {
		return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(18, 115));
	}
	map_id.addControl(new map_control_middle());
	
	// ZOOMFAR BUTTON
	function map_control_far() {}
	map_control_far.prototype = new GControl();
	map_control_far.prototype.initialize = function(map_id) {
		var container = document.createElement("div");
		var content = '<img src="'+image_dir+'/map_city.gif" width="13" height="13" onclick="map.setCenter(new GLatLng(50.359, 10.129), 6);" style="cursor: hand;" title="Ganz Deutschland anzeigen" alt="Auf Landesebene zoomen" />';
		container.innerHTML = content;
		map.getContainer().appendChild(container);
		return container;
	}
	map_control_far.prototype.getDefaultPosition = function() {
		return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(18, 130));
	}
	map_id.addControl(new map_control_far());
	
	// MAP VIEW BUTTON
	function map_view_control() {}
	map_view_control.prototype = new GControl();
	map_view_control.prototype.initialize = function(map_id) {
		var container = document.createElement("div");
		var content = '<img src="'+image_dir+'/map_male.gif" width="13" height="13" onclick="if(map.getZoom() > 17) { map.setZoom(17); } map.setMapType(G_MAP_TYPE);" style="cursor: hand;" title="M&auml;nnermodus: Kartendarstellung" alt="Kartendarstellung" />';
		container.innerHTML = content;
		map.getContainer().appendChild(container);
		return container;
	}
	map_view_control.prototype.getDefaultPosition = function() {
		return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(18, 190));
	}
	map_id.addControl(new map_view_control());
	
	// SATELLITE VIEW BUTTON
	function satellite_view_control() {}
	satellite_view_control.prototype = new GControl();
	satellite_view_control.prototype.initialize = function(map_id) {
		var container = document.createElement("div");
		var content = '<img src="'+image_dir+'/map_female.gif" width="13" height="13" onclick="map.setMapType(G_SATELLITE_TYPE);" style="cursor: hand;" title="Frauenmodus: Satellitendarstellung" alt="Darstellung als Satellitenbild" />';
		container.innerHTML = content;
		map.getContainer().appendChild(container);
		return container;
	}
	satellite_view_control.prototype.getDefaultPosition = function() {
		return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(18, 205));
	}
	map_id.addControl(new satellite_view_control());
	
	// TERRAIN VIEW BUTTON
	function terrain_view_control() {}
	terrain_view_control.prototype = new GControl();
	terrain_view_control.prototype.initialize = function(map_id) {
		var container = document.createElement("div");
		var content = '<img src="'+image_dir+'/map_terrain.gif" width="13" height="13" onclick="map.setMapType(G_PHYSICAL_MAP);" style="cursor: hand;" title="Neuer Modus: Oberflächendarstellung" alt="Darstellung als Terrainrelief" />';
		container.innerHTML = content;
		map.getContainer().appendChild(container);
		return container;
	}
	terrain_view_control.prototype.getDefaultPosition = function() {
		return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(18, 220));
	}
	map_id.addControl(new terrain_view_control());
}
