//<![CDATA[

    var map = null;
    var geocoder = null;
    
var losPueblos = new MakeStringArray(12);

losPueblos[0]  = '&nbsp;VEGA DE ESPINAREDA&nbsp;';
losPueblos[1]  = '&nbsp;S&Eacute;SAMO&nbsp;';
losPueblos[2]  = '&nbsp;BURBIA&nbsp;';
losPueblos[3]  = '&nbsp;PENOSELO&nbsp;';
losPueblos[4]  = '&nbsp;BUSTARGA&nbsp;';
losPueblos[5]  = '&nbsp;VILLAR DE OTERO&nbsp;';
losPueblos[6]  = '&nbsp;MOREDA&nbsp;';
losPueblos[7]  = '&nbsp;SAN MART&Iacute;N DE MOREDA&nbsp;';
losPueblos[8]  = '&nbsp;VALLE DE FINOLLEDO&nbsp;';
losPueblos[9]  = '&nbsp;SAN PEDRO DE OLLEROS&nbsp;';
losPueblos[10]  = '&nbsp;EL ESPINO&nbsp;';
losPueblos[11]  = '&nbsp;ESPINAREDA DE VEGA&nbsp;';
losPueblos[12]  = '&nbsp;LAS ALGUEIRAS&nbsp;';
					
   var textoPunto1 = '';
	    textoPunto1 += '<DIV><P ALIGN="LEFT">';
	    textoPunto1 += '<FONT SIZE="1" CLASS="SubSeccion"><B>';
	    
	var textoPunto2 = '';
	    textoPunto1 += '</B></FONT><BR>';
	    textoPunto2 += '</P>';




function MakeStringArray(n) 

		{ this.length = n; 

				for (var i = 0; i<=n; i++) 

						{ this[i] = new String() } 

		return this } 



	function onLoad() {
		if (GBrowserIsCompatible()) {

				var icon_1 = new GIcon();
					icon_1.image = "comollegar/imagenes/icono_1.png";
					icon_1.shadow = "comollegar/imagenes/icono_1_shadow.png";
					icon_1.iconSize = new GSize(25, 18);
					icon_1.shadowSize = new GSize(30, 18);
					icon_1.iconAnchor = new GPoint(12, 18); // desplaza Info
					icon_1.infoWindowAnchor = new GPoint(17, 4); // desplaza bocadillo

				var icon_2 = new GIcon();
					icon_2.image = "comollegar/imagenes/icono_2.png";
					icon_2.shadow = "comollegar/imagenes/icono_1_shadow.png";
					icon_2.iconSize = new GSize(18, 18);
					icon_2.shadowSize = new GSize(30, 18);
					icon_2.iconAnchor = new GPoint(8, 18); // desplaza Info
					icon_2.infoWindowAnchor = new GPoint(17, 4); // desplaza bocadillo

				var icon_click = new GIcon();
					icon_click.image = "comollegar/imagenes/enblanco.gif"; // si pulso en mapa (segun opcion)
					icon_click.shadow = "comollegar/imagenes/enblanco.gif";
					icon_click.iconSize = new GSize(0, 0);
					icon_click.shadowSize = new GSize(0, 0);
					icon_click.iconAnchor = new GPoint(6, 20);
					icon_click.infoWindowAnchor = new GPoint(5, 1);
			
 				map = new GMap2(document.getElementById("map"));
					//map.addControl(new GLargeMapControl());
					map.addControl(new GSmallMapControl());
					map.addControl(new GMenuMapTypeControl());
//					 map.setMapType(G_HYBRID_MAP); 	
					 map.setMapType(G_PHYSICAL_MAP); 										
					//map.addControl(new GScaleControl());    //Muestra la imagen de 200 pies
					map.setCenter(new GLatLng(42.74339610206592,-6.710030505371094), 12); // long,lat

 				geocoder = new GClientGeocoder(); // para el buscador de sitios		

				var point0 = new GLatLng(42.72592490400173,-6.655054092407227);
				var marker0 = new PdMarker(point0, icon_1);
					marker0.setTooltip(losPueblos[0]);
					map.addOverlay(marker0);
					GEvent.addListener(marker0, 'click', function() {marker0.openInfoWindowHtml(textoPunto1 + losPueblos[0] + textoPunto2);});
																				
			   var point1 = new GLatLng(42.73891223191173,-6.6570281982421875);
				var marker1 = new PdMarker(point1, icon_2);
					marker1.setTooltip(losPueblos[1]);
					map.addOverlay(marker1);
					GEvent.addListener(marker1, 'click', function() {marker1.openInfoWindowHtml(textoPunto1 + losPueblos[1] + textoPunto2);});

			   var point2 = new GLatLng(42.79187360418141,-6.773972511291504);
				var marker2 = new PdMarker(point2, icon_2);
					marker2.setTooltip(losPueblos[2]);
					map.addOverlay(marker2);
					GEvent.addListener(marker2, 'click', function() {marker2.openInfoWindowHtml(textoPunto1 + losPueblos[2] + textoPunto2);});

			   var point3 = new GLatLng(42.75772642266992,-6.753802299499512);
				var marker3 = new PdMarker(point3, icon_2);
					marker3.setTooltip(losPueblos[3]);
					map.addOverlay(marker3);
					GEvent.addListener(marker3, 'click', function() {marker3.openInfoWindowHtml(textoPunto1 + losPueblos[3] + textoPunto2);});

			   var point4 = new GLatLng(42.76078279542937,-6.7133331298828125);
				var marker4 = new PdMarker(point4, icon_2);
					marker4.setTooltip(losPueblos[4]);
					map.addOverlay(marker4);
					GEvent.addListener(marker4, 'click', function() {marker4.openInfoWindowHtml(textoPunto1 + losPueblos[4] + textoPunto2);});

			   var point5 = new GLatLng(42.763366415633094,-6.677241325378418);
				var marker5 = new PdMarker(point5, icon_2);
					marker5.setTooltip(losPueblos[5]);
					map.addOverlay(marker5);
					GEvent.addListener(marker5, 'click', function() {marker5.openInfoWindowHtml(textoPunto1 + losPueblos[5] + textoPunto2);});

			   var point6 = new GLatLng(42.72617711101724,-6.72637939453125);
				var marker6 = new PdMarker(point6, icon_2);
					marker6.setTooltip(losPueblos[6]);
					map.addOverlay(marker6);
					GEvent.addListener(marker6, 'click', function() {marker6.openInfoWindowHtml(textoPunto1 + losPueblos[6] + textoPunto2);});

			   var point7 = new GLatLng(42.731473221479945,-6.713418960571289);
				var marker7 = new PdMarker(point7, icon_2);
					marker7.setTooltip(losPueblos[7]);
					map.addOverlay(marker7);
					GEvent.addListener(marker7, 'click', function() {marker7.openInfoWindowHtml(textoPunto1 + losPueblos[7] + textoPunto2);});

			   var point8 = new GLatLng(42.71791679816426,-6.692647933959961);
				var marker8 = new PdMarker(point8, icon_2);
					marker8.setTooltip(losPueblos[8]);
					map.addOverlay(marker8);
					GEvent.addListener(marker8, 'click', function() {marker8.openInfoWindowHtml(textoPunto1 + losPueblos[8] + textoPunto2);});

			   var point9 = new GLatLng(42.696472687055646,-6.717581748962402);
				var marker9 = new PdMarker(point9, icon_2);
					marker9.setTooltip(losPueblos[9]);
					map.addOverlay(marker9);
					GEvent.addListener(marker9, 'click', function() {marker9.openInfoWindowHtml(textoPunto1 + losPueblos[9] + textoPunto2);});

			   var point10 = new GLatLng(42.71794832816667,-6.649346351623535);
				var marker10 = new PdMarker(point10, icon_2);
					marker10.setTooltip(losPueblos[10]);
					map.addOverlay(marker10);
					GEvent.addListener(marker10, 'click', function() {marker10.openInfoWindowHtml(textoPunto1 + losPueblos[10] + textoPunto2);});

			   var point11 = new GLatLng(42.710979808159266,-6.650590896606045);
				var marker11 = new PdMarker(point11, icon_2);
					marker11.setTooltip(losPueblos[11]);
					map.addOverlay(marker11);
					GEvent.addListener(marker11, 'click', function() {marker11.openInfoWindowHtml(textoPunto1 + losPueblos[11] + textoPunto2);});

			   var point12 = new GLatLng(42.77010852672673,-6.784830093383789);
				var marker12 = new PdMarker(point12, icon_2);
					marker12.setTooltip(losPueblos[12]);
					map.addOverlay(marker12);
					GEvent.addListener(marker12, 'click', function() {marker12.openInfoWindowHtml(textoPunto1 + losPueblos[12] + textoPunto2);});
	
		}
	}
   
//]]>
