		
	function agregarCustomMapTypeControl(map){
		function CustomMapTypeControl() {
		}
		CustomMapTypeControl.prototype = new GControl();
		CustomMapTypeControl.prototype.initialize = function(map) {


			// ------------ textos literales -------------

			var txtMapa = 'mapa';
			var txtSatelite = 'satélite';
			var txtHibrido = 'híbrido';

			// -------------------------------------------

			var container = document.createElement('div');

			var defaultStyle = 'background: url(images/mapas/btn_fondo.gif); cursor: pointer; width: 58px; height: 16px; float: left; ';
			defaultStyle += 'font-family:Arial, Helvetica, sans-serif; font-size: 11px; text-align: center; margin-left: 8px; vertical-align: center;';

			// boton de mapa			
			var btnMapa = document.createElement('input');
			btnMapa.setAttribute('style',defaultStyle + ' color: #d96e0e;');
			btnMapa.setAttribute('id','bMap');
			btnMapa.style.background = 'url(/images/mapas/btn_fondo.gif)';
			btnMapa.style.cursor = 'pointer';
			btnMapa.style.fontFamily = 'Arial, Helvetica, sans-serif';
			btnMapa.style.fontSize = 11;
			btnMapa.style.textAlign = 'center';
			btnMapa.style.marginLeft = 8;
			btnMapa.style.color = '#d96e0e';
			btnMapa.style.float = 'left';
			btnMapa.style.display = 'inline';
			btnMapa.type = 'button';
			btnMapa.value = txtMapa;
			btnMapa.style.border = 'none';
			btnMapa.style.width = 58;
			btnMapa.style.height = 16;
			container.appendChild(btnMapa);
			GEvent.addDomListener(btnMapa, 'click', function() {
				map.setMapType(G_NORMAL_MAP);
				repintarTypes(map);
			});

			// boton de satelite			
			var btnSatelite = document.createElement('input');
			btnSatelite.setAttribute('style',defaultStyle);
			btnSatelite.setAttribute('id','bSat');
			btnSatelite.style.background = 'url(/images/mapas/btn_fondo.gif)';
			btnSatelite.style.cursor = 'pointer';
			btnSatelite.style.width = 58;
			btnSatelite.style.height = 16;
			btnSatelite.style.fontFamily = 'Arial, Helvetica, sans-serif';
			btnSatelite.style.fontSize = 11;
			btnSatelite.style.textAlign = 'center';
			btnSatelite.style.marginLeft = 8;
			btnSatelite.style.float = 'left';
			btnSatelite.style.display = 'inline';
			btnSatelite.type = 'button';
			btnSatelite.value = txtSatelite;
			btnSatelite.style.border = 'none';
			container.appendChild(btnSatelite);
			GEvent.addDomListener(btnSatelite, 'click', function() {
				map.setMapType(G_SATELLITE_MAP);
				repintarTypes(map);
			});

			// boton de hibrido			
			var btnHibrido = document.createElement('input');
			btnHibrido.setAttribute('style',defaultStyle);
			btnHibrido.setAttribute('id','bHib');
			btnHibrido.style.background = 'url(/images/mapas/btn_fondo.gif)';
			btnHibrido.style.cursor = 'pointer';
			btnHibrido.style.width = 58;
			btnHibrido.style.height = 16;
			btnHibrido.style.fontFamily = 'Arial, Helvetica, sans-serif';
			btnHibrido.style.fontSize = 11;
			btnHibrido.style.textAlign = 'center';
			btnHibrido.style.marginLeft = 8;
			btnHibrido.style.float = 'left';
			btnHibrido.style.display = 'inline';
			btnHibrido.type = 'button';
			btnHibrido.value = txtHibrido;
			btnHibrido.style.border = 'none';
			container.appendChild(btnHibrido);
			GEvent.addDomListener(btnHibrido, 'click', function() {
				map.setMapType(G_HYBRID_MAP);
				repintarTypes(map);
			});
	
			map.getContainer().appendChild(container);
			return container;
		}

		CustomMapTypeControl.prototype.getDefaultPosition = function() {
			return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(8, 8));
		}

		map.addControl(new CustomMapTypeControl());
	}

	function repintarTypes (map) {
		document.getElementById('bMap').style.color = '#000000';
		document.getElementById('bSat').style.color = '#000000';
		document.getElementById('bHib').style.color = '#000000';
		var tipo = map.getCurrentMapType();
		switch(tipo){
			case G_NORMAL_MAP : document.getElementById('bMap').style.color = '#d96e0e'; break;
			case G_SATELLITE_MAP : document.getElementById('bSat').style.color = '#d96e0e'; break;
			case G_HYBRID_MAP : document.getElementById('bHib').style.color = '#d96e0e'; break; 
		}
	}