
// Configuration
// central: central, trapiche, filtros, velez, rincon

try {
	// central=document.central.central.value;
	central=document.getElementById("nombre_central").value;

// onload function {{{1
function WindowOnload(f) {
	var prev=window.onload;
	window.onload=function(){ if(prev)prev(); f(); }
}
// }}}1

// Gmaps function
function load() {
	if (GBrowserIsCompatible()) {
		// Variables {{{1
		var content = new Array();
		var map = new GMap2(document.getElementById("axa_map"));
		// }}}1
		// === Set map center === {{{1
		if (central=="velez") {
			// Velez
			map.setCenter(new GLatLng(36.75389435592115, -4.1053032875061035), 16, G_SATELLITE_MAP);
		} else if (central=="trapiche") {
			// Trapiche
			map.setCenter(new GLatLng(36.78344200140682, -4.110774993896484), 13, G_SATELLITE_MAP);
		} else if (central=="filtros") {
			// Filtros
			map.setCenter(new GLatLng(36.78344200140682, -4.110774993896484), 13, G_SATELLITE_MAP);
		} else if (central=="rincon") {
			// Rincon
			map.setCenter(new GLatLng(36.718487514347935, -4.2383623123168945), 15, G_SATELLITE_MAP);
		} else if (central=="central") {
			// Central
			map.setCenter(new GLatLng(36.74947584127597, -4.099874496459961), 14, G_SATELLITE_MAP);
		} else {
			alert("No se ha encontrado el centro a usar para la central "+central);
			return;
		}
		// }}}1
		// Controls and position on the map {{{1
		// CAdd map controls
		map.addControl(new GSmallMapControl());
		map.addControl(new GMapTypeControl());
		//map.enableScrollWheelZoom();
		
		// Show position of the map center (below the map)
		GEvent.addListener(map, "moveend", function() {
			var center = map.getCenter();
			// Show the coordinates
			document.getElementById("message").innerHTML = center.toString();
		});
		// }}}1
		// === Content === {{{1
		content['velez']=[
				new GInfoWindowTab('', '<img src="/img/pic_map_edarvelez.jpg" alt="" width="217" height="163" style="margin:15px 0 5px 0;" /><br /><strong>Axaragua</strong> EDAR Velez')
				]

		content['trapiche']=[
				new GInfoWindowTab('', '<img src="/img/pic_trapiche_foto.jpg" alt="" width="161" height="125" style="margin:15px 0 5px 0;" /><br /><strong>Axaragua</strong> ETAP Decantadora Trapiche')
				]

		content['filtros']=[
				new GInfoWindowTab('', '<img src="/img/pic_filtros_foto.jpg" alt="" width="161" height="125" style="margin:15px 0 5px 0;" /><br /><strong>Axaragua</strong> ETAP Filtros Trapiche')
				]
		
		content['rincon']=[
				new GInfoWindowTab('', '<img src="/img/pic_rincon_foto.jpg" alt="" width="161" height="125" style="margin:15px 0 5px 0;" /><br /><strong>Axaragua</strong> EDAR Rincón')
				]

		content['central']=[
				new GInfoWindowTab('', '<img src="/img/pic_mancomunidad_delante_foto.jpg" alt="" width="161" height="125" style="margin:15px 0 5px 0;" /><br><img src="/img/pic_mancomunidad_detras_foto.jpg" alt="" width="161" height="125" style="margin:15px 0 5px 0;" /><br /><strong>Axaragua</strong> Oficinas centrales')
				]
		
		if (central=="velez") {
					content['signpost']=[
					new GInfoWindowTab('', '<img src="/img/pic_velez_rotonda_autovia_foto.jpg" alt="" width="161" height="125" style="margin:15px 0 5px 0;" /><br><strong>Axaragua</strong> NORTE: V&eacute;lez <br /> SUR: Torre del mar<br /> ESTE: Almer&iacute;a<br /> OESTE: M&aacute;laga')
				]
				} else {
					content['signpost']=[
					new GInfoWindowTab('', 'NORTE: V&eacute;lez <br /> SUR: Torre del mar<br /> ESTE: Almer&iacute;a<br /> OESTE: M&aacute;laga')
				]
		}
		
		content['signpost_central']=[
				new GInfoWindowTab('', 'ESTE: Almer&iacute;a<br /> OESTE: M&aacute;laga')
				]
		
		content['planta_transferencia']=[
				new GInfoWindowTab('', '<img src="/img/pic_velez_planta_transferencia_foto.jpg" alt="" width="161" height="125" style="margin:15px 0 5px 0;" /><br><strong>Axaragua</strong> Planta de Transferencia R.S.U.')
				]
		
		content['centro_comercial']=[
				new GInfoWindowTab('', 'Centro Comercial El Ingenio')
				]
		
		content['gasolinera']=[
				new GInfoWindowTab('', '<img src="/img/pic_filtros_gasolinera_foto.jpg" alt="" width="161" height="125" style="margin:15px 0 5px 0;" /><br /><strong>Axaragua</strong> Gasolinera')
				]
		
		content['gasolinera2']=[
				new GInfoWindowTab('', '<strong>Axaragua</strong> Gasolinera')
				]
		
		content['barco']=[
				new GInfoWindowTab('', '<img src="/img/pic_filtros_barco_foto.jpg" alt="" width="161" height="125" style="margin:15px 0 5px 0;" /><br /><strong>Axaragua</strong> Barco')
				]
		
		content['rotonda_cc']=[
				new GInfoWindowTab('', '<img src="/img/pic_velez_rotonda_cc_foto.jpg" alt="" width="161" height="125" style="margin:15px 0 5px 0;" /><br /><strong>Axaragua</strong> Rotonda')
				]
		
		content['velez_autovia1']=[
				new GInfoWindowTab('', '<img src="/img/pic_velez_autovia1_foto.jpg" alt="" width="161" height="125" style="margin:15px 0 5px 0;" /><br /><strong>Axaragua</strong> Autovía - 500 metros para salida 272')
				]
		
		content['velez_autovia2']=[
				new GInfoWindowTab('', '<img src="/img/pic_velez_autovia2_foto.jpg" alt="" width="161" height="125" style="margin:15px 0 5px 0;" /><br /><strong>Axaragua</strong> Autovía - Salida 272')
				]
		
		content['velez_rotonda_autovia']=[
					new GInfoWindowTab('', '<img src="/img/pic_velez_rotonda_autovia_foto.jpg" alt="" width="161" height="125" style="margin:15px 0 5px 0;" /><br><strong>Axaragua</strong> Rotonda bajo la autovía')
				]
		
		content['rincon_autovia1']=[
				new GInfoWindowTab('', '<img src="/img/pic_rincon_autovia1_foto.jpg" alt="" width="161" height="125" style="margin:15px 0 5px 0;" /><br /><strong>Axaragua</strong> Autovía - 350 metros para salida 258')
				]
		
		content['rincon_autovia2']=[
				new GInfoWindowTab('', '<img src="/img/pic_rincon_autovia2_foto.jpg" alt="" width="161" height="125" style="margin:15px 0 5px 0;" /><br /><strong>Axaragua</strong> Autovía - Salida 258')
				]
		
		content['rincon_carril_secundario1']=[
				new GInfoWindowTab('', '<img src="/img/pic_rincon_carril_secundario1_foto.jpg" alt="" width="161" height="125" style="margin:15px 0 5px 0;" /><br /><strong>Axaragua</strong> Entrada a carril secundario')
				]
		
		content['rincon_carril_secundario2']=[
				new GInfoWindowTab('', '<img src="/img/pic_rincon_carril_secundario2_foto.jpg" alt="" width="161" height="125" style="margin:15px 0 5px 0;" /><br /><strong>Axaragua</strong> Salida de carril secundario hacia la costa')
				]
		
		content['rincon_cuesta_abajo']=[
				new GInfoWindowTab('', '<img src="/img/pic_rincon_cuesta_foto.jpg" alt="" width="161" height="125" style="margin:15px 0 5px 0;" /><br /><strong>Axaragua</strong> Cuesta abajo dirección Rinón')
				]
		
		content['rincon_los_rubios']=[
				new GInfoWindowTab('', '<img src="/img/pic_rincon_los_rubios_foto.jpg" alt="" width="161" height="125" style="margin:15px 0 5px 0;" /><br /><strong>Axaragua</strong> Los Rubios')
				]
		
		content['N340']=[
				new GInfoWindowTab('', '<strong>Axaragua</strong> N-340')
				]
		// }}}1
		// Create a UNIVERSAL icon {{{1
		var uniicon = new GIcon();
		uniicon.shadow = "";
		// }}}1
		// Function createUniMarker {{{1
		function createUniMarker(where, x, y, ax, ay, identifier) {
			var uniicon2 = new GIcon(uniicon);
			uniicon2.iconSize = new GSize(x, y);
			uniicon2.iconAnchor = new GPoint(ax, ay);
			uniicon2.infoWindowAnchor = new GPoint(ax, 1);
			uniicon2.image = "/img/marker_"+identifier+".png";
			var umarker = new GMarker(where, uniicon2);
			
			GEvent.addListener(
				umarker, "click", function() {
					umarker.openInfoWindowTabsHtml(content[identifier]);
				}
			);
			return umarker;
		}
		// }}}1
		// === Create a markers === {{{1
		//var where = new GLatLng(36.7543542450614, -4.107191562652588);
		//map.addOverlay(createUniMarker(where, 161, 159, 60, 159,"velez_basurero_foto"));
		
		var where = new GLatLng(36.75199634951783, -4.108491938323975);
		map.addOverlay(createUniMarker(where, 61, 22, 31, 11,"velez"));
		
		var where = new GLatLng(36.81223956170516, -4.117147922515869);
		map.addOverlay(createUniMarker(where, 129, 23, 64, 11,"trapiche"));
		
		var where = new GLatLng(36.81019522329291, -4.1239553689956665);
		map.addOverlay(createUniMarker(where, 102, 23, 51, 11,"filtros"));
		
		var where = new GLatLng(36.71897771563987, -4.238705635070801);
		map.addOverlay(createUniMarker(where, 66, 23, 33, 11,"rincon"));
		
		var where = new GLatLng(36.73940858633111, -4.099332690238953);
		map.addOverlay(createUniMarker(where, 87, 23, 43, 11,"central"));
		
		// var where = new GLatLng(36.756626838546594, -4.104051657867432);
		// map.addOverlay(createUniMarker(where, 128, 72, 64, 36,"signpost"));
		var where = new GLatLng(36.7314552950949, -4.118757247924805);
		map.addOverlay(createUniMarker(where, 128, 72, 64, 36,"signpost_central"));
		
		if (central=="velez") {
			var where = new GLatLng(36.7561464969915, -4.10463809967041);
			map.addOverlay(createUniMarker(where, 135, 22, 67, 22,"velez_rotonda_autovia"));
		
			var where = new GLatLng(36.755467423249506, -4.111815690994263);
			map.addOverlay(createUniMarker(where, 135, 22, 67, 22,"velez_autovia2"));
		}
		
		if ((central=="velez") || (central=="central")) {
			var where = new GLatLng(36.75513218209728, -4.100131988525391);
			map.addOverlay(createUniMarker(where, 127, 22, 64, 11,"centro_comercial"));
			if (central=="velez") {
				var where = new GLatLng(36.754541351010915, -4.107191562652588);
				map.addOverlay(createUniMarker(where, 135, 22, 67, 22,"planta_transferencia"));
				
				var where = new GLatLng(36.755249373986875, -4.103497927703857);
				map.addOverlay(createUniMarker(where, 57, 22, 29, 22,"gasolinera2"));
				
				var where = new GLatLng(36.75504622259151, -4.102374315261841);
				map.addOverlay(createUniMarker(where, 135, 22, 67, 22,"rotonda_cc"));
			}
		} else if ((central=="trapiche") || (central=="filtros")) {
			var where = new GLatLng(36.799667734185384, -4.123311638832092);
			map.addOverlay(createUniMarker(where, 57, 22, 29, 22,"gasolinera"));
			
			var where = new GLatLng(36.804822132454234, -4.124395251274109);
			map.addOverlay(createUniMarker(where, 135, 22, 67, 22,"barco"));
		}
		
		var where = new GLatLng(36.753640771010446, -4.116852879524231);
		map.addOverlay(createUniMarker(where, 135, 22, 67, 22,"velez_autovia1"));
		
		if (central=="rincon") {
			var where = new GLatLng(36.72459330723784, -4.251113533973694);
			map.addOverlay(createUniMarker(where, 135, 22, 67, 22,"rincon_autovia1"));
			
			var where = new GLatLng(36.72483408912177, -4.247578382492065);
			map.addOverlay(createUniMarker(where, 135, 22, 67, 22,"rincon_autovia2"));
			
			var where = new GLatLng(36.7234710817134, -4.245749115943909);
			map.addOverlay(createUniMarker(where, 135, 22, 67, 22,"rincon_carril_secundario1"));
			
			var where = new GLatLng(36.7196528122984, -4.240851402282715);
			map.addOverlay(createUniMarker(where, 135, 22, 67, 22,"rincon_carril_secundario2"));
			
			var where = new GLatLng(36.71433787809744, -4.229704141616821);
			map.addOverlay(createUniMarker(where, 135, 22, 67, 22,"rincon_cuesta_abajo"));
			
			var where = new GLatLng(36.71281127157858, -4.235948324203491);
			map.addOverlay(createUniMarker(where, 135, 22, 67, 22,"rincon_los_rubios"));
		}
		
		// Otras cosas
		var where = new GLatLng(36.71300908709165, -4.232461452484131);
		map.addOverlay(createUniMarker(where, 135, 22, 67, 11,"N340"));
		
		var where = new GLatLng(36.71642347459329, -4.226088523864746);
		map.addOverlay(createUniMarker(where, 85, 21, 43, 11,"pueblo_chilches"));
		
		var where = new GLatLng(36.714084162496036, -4.247632026672363);
		map.addOverlay(createUniMarker(where, 191, 25, 95, 12,"pueblo_rincon"));
		
		var where = new GLatLng(36.74328605437939, -4.091463088989258);
		map.addOverlay(createUniMarker(where, 124, 21, 62, 10,"pueblo_torre_del_mar"));
		
		var where = new GLatLng(36.78003918793529, -4.101204872131348);
		map.addOverlay(createUniMarker(where, 123, 29, 61, 14,"pueblo_velez"));
		
		var where = new GLatLng(36.80883802730657, -4.124293327331543);
		map.addOverlay(createUniMarker(where, 82, 23, 41, 12,"pueblo_trapiche"));
		
		//var where = new GLatLng(36.71300908709165, -4.232461452484131);
		//map.addOverlay(createUniMarker(where, 135, 22, 67, 11,"N340"));
		
		// }}}1
		// Velez {{{1
		if (central=="velez") {
			// Create shape
			var polygon = new GPolygon([
				new GLatLng (36.7538577675777, -4.10835464996338),
				new GLatLng (36.7540855629034, -4.10892864269257),
				new GLatLng (36.754068370827, -4.1089715580368),
				new GLatLng (36.7533935787828, -4.10916467708588),
				new GLatLng (36.753114204543, -4.10918077033997),
				new GLatLng (36.7527875502957, -4.10915931266785),
				new GLatLng (36.7523491437251, -4.10921295684814),
				new GLatLng (36.7520224862203, -4.10921295684814),
				new GLatLng (36.7517731940309, -4.109186134758),
				new GLatLng (36.7511800472893, -4.10893937152863),
				new GLatLng (36.7510253126026, -4.10878916782379),
				new GLatLng (36.750823297403, -4.10844584506989),
				new GLatLng (36.7510296107926, -4.10813470882416),
				new GLatLng (36.7515711808005, -4.1078182081604),
				new GLatLng (36.7525167700626, -4.1078182081604),
				new GLatLng (36.7527058865165, -4.10760363143921),
				new GLatLng (36.7528004445686, -4.10760363143921),
				new GLatLng (36.7533205117722, -4.10800059837341),
				new GLatLng (36.7537073363314, -4.10796841186523),
				new GLatLng (36.7538577675777, -4.10835464996338)
			], "#ffe401", 2,0.4,"#ffe401", 0.15);
			map.addOverlay(polygon);
			// Create a roadpath
			var polyline = new GPolyline([
				new GLatLng (36.7561844568266, -4.10368151302338),
				new GLatLng (36.7562145421201, -4.10349912281036),
				new GLatLng (36.7563348831762, -4.10090810890198),
				new GLatLng (36.7562489252983, -4.10069889659882),
				new GLatLng (36.7561758610262, -4.10252279872894),
				new GLatLng (36.7551916355206, -4.10241551036835),
				new GLatLng (36.7551529539109, -4.10247988338471),
				new GLatLng (36.7550970804403, -4.102533527565),
				new GLatLng (36.7550197171062, -4.10252279872894),
				new GLatLng (36.7549337577545, -4.10245306129456),
				new GLatLng (36.7534208573996, -4.10287148590088),
				new GLatLng (36.7532618292089, -4.10296804542542),
				new GLatLng (36.7531543775422, -4.10311824913025),
				new GLatLng (36.753098502616, -4.10335964794159),
				new GLatLng (36.7530297334202, -4.10444326038361),
				new GLatLng (36.7528964929279, -4.10574144954681),
				new GLatLng (36.7529179833455, -4.10596675510407),
				new GLatLng (36.7529695603233, -4.10609550113678),
				new GLatLng (36.7538549597014, -4.10716302032471),
				new GLatLng (36.753811979385,  -4.10734004611969),
				new GLatLng (36.7538205754502, -4.10821444625855),
				new GLatLng (36.7537475088653, -4.10843438739777),
				new GLatLng (36.753807681352, -4.10877771015167),
				new GLatLng (36.7537647010092, -4.1088903629303),
				new GLatLng (36.7535884813518, -4.10890109176636),
				new GLatLng (36.7533950690667, -4.10871870155335),
				new GLatLng (36.7533177040162, -4.10838074321747),
				new GLatLng (36.7533134059556, -4.1081876241684),
				new GLatLng (36.7532102524277, -4.10816080207825),
				new GLatLng (36.753119992977, -4.10828954811096),
				new GLatLng (36.7528406178138, -4.10824663276672),
				new GLatLng (36.7527116750877, -4.1081339799881),
				new GLatLng (36.752574135941, -4.10812861557007),
				new GLatLng (36.7525311549071, -4.10819298858643),
				new GLatLng (36.7525096643811, -4.10857922668457),
				new GLatLng (36.7524237022169, -4.10857922668457),
				new GLatLng (36.752410807884, -4.10879380340576)
			], "#ff0000", 4);
			map.addOverlay(polyline);
		// }}}1
		// Trapiche {{{1
		} else if (central=="trapiche") {
			// Create a shape for Trapiche
			var polygon = new GPolygon([
				new GLatLng	(36.81263467964086, -4.1173142194747925),
				new GLatLng	(36.81257884788236, -4.117158651351929),
				new GLatLng	(36.81235552044119, -4.117040634155273),
				new GLatLng	(36.8119775802104, -4.116697311401367),
				new GLatLng	(36.81191745318347, -4.116531014442444),
				new GLatLng	(36.81180578857959, -4.116423726081848),
				new GLatLng	(36.81173277701976, -4.116434454917908),
				new GLatLng	(36.811681239406205, -4.116504192352295),
				new GLatLng	(36.8114965626727, -4.116927981376648),
				new GLatLng	(36.81171989261962, -4.117212295532227),
				new GLatLng	(36.8119775802104, -4.117400050163269),
				new GLatLng	(36.81243712092791, -4.1175878047943115),
				new GLatLng	(36.81255737411825, -4.117453694343567),
				new GLatLng	(36.81263467964086, -4.1173142194747925),
			], "#ffe401", 2,0.4,"#ffe401", 0.15);
			map.addOverlay(polygon);
			// Create a roadpath for Trapiche
			var polyline = new GPolyline([
				new GLatLng (36.7571092241461, -4.104058742523193),
				new GLatLng (36.76137258487793, -4.103908538818359),
				new GLatLng (36.762782192344005, -4.10365104675293),
				new GLatLng (36.764312102834765, -4.1042304039001465),
				new GLatLng (36.76654674870215, -4.106612205505371),
				new GLatLng (36.768901651181224, -4.108414649963379),
				new GLatLng (36.77266590712333, -4.109230041503906),
				new GLatLng (36.775158121009, -4.109251499176025),
				new GLatLng (36.77648153958444, -4.1097235679626465),
				new GLatLng (36.77838928459488, -4.11137580871582),
				new GLatLng (36.784868388374775, -4.115324020385742),
				new GLatLng (36.78749768272418, -4.117641448974609),
				new GLatLng (36.78927627186131, -4.119755029678345),
				new GLatLng (36.7904018310948, -4.120323657989502),
				new GLatLng (36.796682319879004, -4.122169017791748),
				new GLatLng (36.7975843997792, -4.12260890007019),
				new GLatLng (36.79920811682742, -4.1236817836761475),
				new GLatLng (36.80292793140989, -4.124765396118164),
				new GLatLng (36.803529270150904, -4.124840497970581),
				new GLatLng (36.804710457501926, -4.124652743339539),
				new GLatLng (36.804727638274414, -4.1242289543151855),
				new GLatLng (36.805208698339136, -4.124212861061096),
				new GLatLng (36.805633918558605, -4.124261140823364),
				new GLatLng (36.80644999115313, -4.124169945716858),
				new GLatLng (36.807497987412745, -4.124416708946228),
				new GLatLng (36.80902271045304, -4.124422073364258),
				new GLatLng (36.8096068216581, -4.124556183815002),
				new GLatLng (36.8099718888983, -4.124411344528198),
				new GLatLng (36.80995041440295, -4.123638868331909),
				new GLatLng (36.809808682582535, -4.123182892799377),
				new GLatLng (36.80990746539417, -4.123091697692871),
				new GLatLng (36.810113620416566, -4.123075604438782),
				new GLatLng (36.8106977232988, -4.1223567724227905),
				new GLatLng (36.81100265759181, -4.122571349143982),
				new GLatLng (36.811457909346494, -4.122544527053833),
				new GLatLng (36.81158675369122, -4.122394323348999),
				new GLatLng (36.81168553420866, -4.121798872947693),
				new GLatLng (36.81163829136839, -4.1213589906692505),
				new GLatLng (36.811848736523444, -4.121063947677612),
				new GLatLng (36.812226677390306, -4.120913743972778),
				new GLatLng (36.81270769034053, -4.120768904685974),
				new GLatLng (36.8138243158945, -4.119148850440979),
				new GLatLng (36.814004692340525, -4.118472933769226),
				new GLatLng (36.81437403326104, -4.118177890777588),
				new GLatLng (36.814709015345535, -4.117507338523865),
				new GLatLng (36.814494283408756, -4.116777777671814),
				new GLatLng (36.814215130990405, -4.116520285606384),
				new GLatLng (36.813609581476, -4.116412997245789),
				new GLatLng (36.81330465756674, -4.1167134046554565),
				new GLatLng (36.81299114298519, -4.11687970161438),
				new GLatLng (36.81277211148831, -4.117271304130554),
				new GLatLng (36.81262179539251, -4.117335677146912),
			],"#ff0000",4);
			map.addOverlay(polyline);
		// }}}1
		// Filtros {{{1
		} else if (central=="filtros") {
			// Create a shape
			var polygon = new GPolygon([
				new GLatLng	(36.81006637660631, -4.124250411987305),
				new GLatLng	(36.810375608289895, -4.124132394790649),
				new GLatLng	(36.810375608289895, -4.123740792274475),
				new GLatLng	(36.81008785106912, -4.123713970184326),
				new GLatLng	(36.80999765828476, -4.1242289543151855),
				new GLatLng	(36.81006637660631, -4.124250411987305),
			], "#ffe401", 2,0.4,"#ffe401", 0.15);
			map.addOverlay(polygon);
			// Create a roadpath
			var polyline = new GPolyline([
				new GLatLng (36.7571092241461, -4.104058742523193),
				new GLatLng (36.76137258487793, -4.103908538818359),
				new GLatLng (36.762782192344005, -4.10365104675293),
				new GLatLng (36.764312102834765, -4.1042304039001465),
				new GLatLng (36.76654674870215, -4.106612205505371),
				new GLatLng (36.768901651181224, -4.108414649963379),
				new GLatLng (36.77266590712333, -4.109230041503906),
				new GLatLng (36.775158121009, -4.109251499176025),
				new GLatLng (36.77648153958444, -4.1097235679626465),
				new GLatLng (36.77838928459488, -4.11137580871582),
				new GLatLng (36.784868388374775, -4.115324020385742),
				new GLatLng (36.78749768272418, -4.117641448974609),
				new GLatLng (36.78927627186131, -4.119755029678345),
				new GLatLng (36.7904018310948, -4.120323657989502),
				new GLatLng (36.796682319879004, -4.122169017791748),
				new GLatLng (36.7975843997792, -4.12260890007019),
				new GLatLng (36.79920811682742, -4.1236817836761475),
				new GLatLng (36.80292793140989, -4.124765396118164),
				new GLatLng (36.803529270150904, -4.124840497970581),
				new GLatLng (36.804710457501926, -4.124652743339539),
				new GLatLng (36.804727638274414, -4.1242289543151855),
				new GLatLng (36.805208698339136, -4.124212861061096),
				new GLatLng (36.805633918558605, -4.124261140823364),
				new GLatLng (36.80644999115313, -4.124169945716858),
				new GLatLng (36.807497987412745, -4.124416708946228),
				new GLatLng (36.80902271045304, -4.124422073364258),
				new GLatLng (36.8096068216581, -4.124556183815002),
				new GLatLng (36.81009214596098, -4.124293327331543),
				new GLatLng (36.81006637660631, -4.124250411987305),
			],"#ff0000",4);
			map.addOverlay(polyline);
		// }}}1
		// Rincon {{{1
		} else if (central=="rincon") {
			// Create a shape
			var polygon = new GPolygon([
				new GLatLng	(36.71812201134889, -4.238453507423401),
				new GLatLng	(36.71824671256754, -4.238040447235107),
				new GLatLng	(36.71867671521727, -4.238051176071167),
				new GLatLng	(36.71893471565171, -4.238249659538269),
				new GLatLng	(36.719463613833256, -4.238410592079163),
				new GLatLng	(36.71952381339546, -4.238603711128235),
				new GLatLng	(36.7193475145444, -4.239644408226013),
				new GLatLng	(36.717954309390805, -4.239301085472107),
				new GLatLng	(36.71812201134889, -4.238453507423401),
			], "#ffe401", 2,0.4,"#ffe401", 0.15);
			map.addOverlay(polygon);
			// Create a roadpath
			var polyline = new GPolyline([
				new GLatLng (36.71812201134889, -4.238453507423401),
				new GLatLng (36.71805321058986, -4.238448143005371),
				new GLatLng (36.7178855084816, -4.239317178726196),
				new GLatLng (36.71712869441325, -4.239284992218018),
				new GLatLng (36.71686208768144, -4.239006042480469),
				new GLatLng (36.71662558093523, -4.238550066947937),
				new GLatLng (36.71638907346087, -4.238351583480835),
				new GLatLng (36.71622566787146, -4.237182140350342),
				new GLatLng (36.71432067706619, -4.236087799072266),
				new GLatLng (36.71402395867102, -4.236012697219849),
				new GLatLng (36.713916451723286, -4.235830307006836),
				new GLatLng (36.71386484833494, -4.235535264015198),
				new GLatLng (36.71356812817935, -4.235562086105347),
				new GLatLng (36.71360683087334, -4.235862493515015),
				new GLatLng (36.71279407020554, -4.235910773277283),
				new GLatLng (36.713155298230475, -4.230170845985413),
				new GLatLng (36.7133488125452, -4.229832887649536),
				new GLatLng (36.71371433825429, -4.229618310928345),
				new GLatLng (36.718023110238406, -4.230315685272217),
				new GLatLng (36.71859501489904, -4.230599999427795),
				new GLatLng (36.71899921562493, -4.230959415435791),
				new GLatLng (36.71946791380357, -4.231747984886169),
				new GLatLng (36.71986351004067, -4.232928156852722),
				new GLatLng (36.72045260066135, -4.2352294921875),
				new GLatLng (36.72052139927132, -4.236270189285278),
				new GLatLng (36.72041390141615, -4.237144589424133),
				new GLatLng (36.719747411356224, -4.239531755447388),
				new GLatLng (36.71963131249629, -4.240422248840332),
				new GLatLng (36.7196528122984, -4.241253733634949),
				new GLatLng (36.71992800923399, -4.242600202560425),
				new GLatLng (36.720542898824306, -4.243775010108948),
				new GLatLng (36.72135557751394, -4.2446547746658325),
				new GLatLng (36.722310141501126, -4.245191216468811),
				new GLatLng (36.723337789469646, -4.245663285255432),
				new GLatLng (36.72409024265125, -4.246242642402649),
				new GLatLng (36.72433532581019, -4.246564507484436),
				new GLatLng (36.72467500117593, -4.247170686721802),
				new GLatLng (36.72490288380709, -4.247809052467346),
			],"#ff0000",4);
			map.addOverlay(polyline);
			var polyline = new GPolyline([
				new GLatLng (36.71946791380357, -4.231747984886169),
				new GLatLng (36.72037520215146, -4.233931303024292),
				new GLatLng (36.72176836339666, -4.234864711761475),
				new GLatLng (36.721940356859726, -4.235149025917053),
				new GLatLng (36.72208225117682, -4.235889315605164),
				new GLatLng (36.721961856015554, -4.236356019973755),
				new GLatLng (36.72177696307899, -4.236634969711304),
				new GLatLng (36.72144157475577, -4.236785173416138),
				new GLatLng (36.72122658147063, -4.236688613891602),
				new GLatLng (36.721011587583696, -4.23623263835907),
				new GLatLng (36.72108898545233, -4.233196377754211),
			],"#ff0000",4);
			map.addOverlay(polyline);
		// }}}1
		// Central {{{1
		} else if (central=="central") {
			// Create a shape
			var polygon = new GPolygon([
				new GLatLng	(36.73925382744377, -4.099209308624268),
				new GLatLng	(36.73941288518465, -4.098978638648987),
				new GLatLng	(36.739692310147525, -4.099262952804565),
				new GLatLng	(36.73935270121334, -4.099949598312378),
				new GLatLng	(36.73901738965226, -4.09965455532074),
				new GLatLng	(36.73925382744377, -4.099209308624268),
			], "#ffe401", 2,0.4,"#ffe401", 0.15);
			map.addOverlay(polygon);
			// Create a roadpath
			var polyline = new GPolyline([
				new GLatLng (36.739571942595916, -4.099488258361816),
				new GLatLng (36.73961493102887, -4.099525809288025),
				new GLatLng (36.739365597782594, -4.100008606910706),
				new GLatLng (36.73892711321249, -4.099665284156799),
				new GLatLng (36.7393441034993, -4.098871350288391),
				new GLatLng (36.74006200930439, -4.099600911140442),
				new GLatLng (36.74195776421287, -4.0978628396987915),
				new GLatLng (36.74274012560481, -4.097530245780945),
				new GLatLng (36.743569763862645, -4.097508788108826),
				new GLatLng (36.743853472297126, -4.097524881362915),
				new GLatLng (36.74416726979853, -4.09764289855957),
				new GLatLng (36.74595975969452, -4.098989367485046),
				new GLatLng (36.7465744408336, -4.099262952804565),
				new GLatLng (36.747545884901854, -4.099343419075012),
				new GLatLng (36.74825511727326, -4.099182486534119),
				new GLatLng (36.74901162457741, -4.098747968673706),
				new GLatLng (36.749153468866595, -4.098823070526123),
				new GLatLng (36.74923943497487, -4.099000096321106),
				new GLatLng (36.74933829588029, -4.101220965385437),
				new GLatLng (36.749634877832335, -4.102122187614441),
				new GLatLng (36.75005180994232, -4.102798104286194),
				new GLatLng (36.75059338847555, -4.103296995162964),
				new GLatLng (36.75121233068981, -4.103624224662781),
				new GLatLng (36.75192582732464, -4.103747606277466),
				new GLatLng (36.75513218209728, -4.103999733924866),
				new GLatLng (36.75571240624199, -4.104031920433044),
				new GLatLng (36.75605194278008, -4.104246497154236),
			],"#ff0000",4);
			map.addOverlay(polyline);
		// }}}1
		// Error {{{1
		} else {
			alert("Forma y camino no encontrados para la central "+central);
			return;
		}
		// }}}1
	}
}

// new GLatLng	(36.75513218209728, -4.103999733924866),

// Load GMaps on page load
WindowOnload( load );

} catch(e) {
	alert("No se ha indicado de que central se desean obtener los datos.");
}

