

    //<![CDATA[



    function load() {

      if (GBrowserIsCompatible()) {

	// Criar novo mapa

        var map = new GMap2(document.getElementById("map"));



	// Adicionar ferramenta para mudar zoom

	map.addControl(new GSmallMapControl());

	// Adicionar ferramenta para mudar tipo de mapa

	map.addControl(new GMapTypeControl());



	// Se o utilizador mover o mapa, mostrar as novas coordenadas

	/*

	var centro

	GEvent.addListener(map, "moveend", function() {

		var center = map.getCenter();

		document.getElementById("message").innerHTML = center.toString();

		map.removeOverlay(centro);

		centro = new GMarker(map.getCenter());

		map.addOverlay(centro)

	});
*/
	

	

	// Centrar o mapa na 3GNTW

        // map.setCenter(new GLatLng(41.43410421758351, -8.520069122314453), 13);

	// Centrar o mapa em Portugal

         map.setCenter(new GLatLng(41.45507852101139, -8.4429931640625), 8);



	// Criar uma legenda num ponto do mapa, com o logo da 3GNTW

	// map.openInfoWindowHtml(new GLatLng(41.4450432176, -8.52271636164),

	// 	("<center><img align=\"center\" border=\"0\" src=\"/img/logo.gif\"></center>"));

	

	// Ampliar um ponto do mapa

	// map.showMapBlowup(new GLatLng(41.4450432176, -8.52271636164));



	// Mostrar direces at  3GNTW quando se clica no marcador

	function createMarker(point) {

		var marker = new GMarker(point);

		GEvent.addListener(marker, "click", function() {

			//marker.openInfoWindowHtml('<img src="images/lateral_3.jpg" alt="" align="left" width="50%" border="0">');

		});

		return marker;

	}	



	// Mostrar a posio da 3GNTW no mapa

	map.addOverlay(createMarker(new GLatLng(41.4450432176, -8.52271636164)));



	// Gerar o percurso desde Cruz at  3GNTW

	var points = [];

	points.push(new GLatLng(41.45480110611004, -8.487405180931091));

	points.push(new GLatLng(41.45647361854304, -8.49117636680603));

	points.push(new GLatLng(41.45728171606851, -8.493010997772217));

	points.push(new GLatLng(41.45745057099614, -8.493837118148804));

	points.push(new GLatLng(41.4573942860691, -8.495017290115356));

	points.push(new GLatLng(41.45665453677422, -8.494791984558105));

	points.push(new GLatLng(41.454676470043445, -8.493804931640625));

	points.push(new GLatLng(41.45449956682807, -8.494019508361816));

	points.push(new GLatLng(41.45508656200531, -8.496728539466858));

	points.push(new GLatLng(41.453936689751174, -8.499705791473389));

	points.push(new GLatLng(41.45344617860138, -8.50042462348938));

	points.push(new GLatLng(41.452497310439966, -8.502291440963745));

	points.push(new GLatLng(41.45063169866893, -8.507559299468994));

	points.push(new GLatLng(41.45050303381051, -8.50841760635376));

	points.push(new GLatLng(41.45107398217351, -8.511491417884827));

	points.push(new GLatLng(41.450334160796544, -8.513717651367188));

	points.push(new GLatLng(41.45022157854305, -8.515251874923706));

	points.push(new GLatLng(41.4504467428547, -8.516228199005127));

	points.push(new GLatLng(41.44934503860145, -8.518116474151611));

	points.push(new GLatLng(41.44874994968995, -8.518964052200317));

	points.push(new GLatLng(41.44822723195381, -8.52013349533081));

	points.push(new GLatLng(41.44794576681304, -8.520573377609253));

	points.push(new GLatLng(41.44762006991189, -8.521957397460938));

	points.push(new GLatLng(41.4471415739682, -8.522450923919678));

	points.push(new GLatLng(41.446289118669704, -8.523588180541992));

	points.push(new GLatLng(41.44550098965627, -8.523706197738647));

	points.push(new GLatLng(41.444958140125266, -8.523545265197754));

	points.push(new GLatLng(41.4450432176, -8.52271636164));

	map.addOverlay(new GPolyline(points));

        

      }

    }



    //]]>
