// http://code.google.com/intl/es-ES/apis/maps/documentation/reference.html#GMapType
function initialize() {
	if (GBrowserIsCompatible()) {
		var map = new GMap2(document.getElementById("map_canvas"));

		if (document.getElementById("mt").value == 'S') {
			map.addMapType(G_HYBRID_MAP );
		}

		var lat = document.getElementById("lat").value.split("$");
		var lon = document.getElementById("lon").value.split("$");
		var vzoom = document.getElementById("hz").value;
		
		if (document.getElementById("mt").value == 'S') {
			map.setCenter(new GLatLng(lat, lon), parseInt(vzoom), G_HYBRID_MAP );
		} else {
			map.setCenter(new GLatLng(lat, lon), parseInt(vzoom));
		}
		map.setUIToDefault();

		var loc = new GLatLng(lat, lon);
		var ico = new GIcon(G_DEFAULT_ICON);
		ico.image = "/mapas/activo.gif";
		map.addOverlay(new GMarker(loc, {draggable: false, icon: ico}));
		
		try {
			var ol = document.getElementById("ol").value == '' || true;
		} catch (err){
			var ol = false;
		}

		if (ol) {
			GEvent.addListener(map, "click", function() {
				mm();
			});
		}
	}
}