/*--------------------------------------------------------------------
JAVASCRIPT - google maps, www.kwl.pt

Version: 	1.0 - 2006/2007
author: 		Burocratik (alexandre gomes)
email: 		alex@burocratik.com
website: 	http://www.burocratik.com
-----------------------------------------------------------------------*/

/* =window.onload
-----------------------------------------------------------------------*/
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

/* =Google Maps
-----------------------------------------------------------------------*/
function load() {
	if (GBrowserIsCompatible()) {
   	var map = new GMap2(document.getElementById("map"));
		map.addControl(new GSmallMapControl());
		map.addControl(new GMapTypeControl());
      map.setCenter(new GLatLng(39.95, -8.5020447), 10);
   }
/* =PENELA */	
// Criar marker icon
	var iconPenela = new GIcon();
	iconPenela.image = "imgs/gmap-icon-penela.png";
	iconPenela.shadow = "imgs/gmap-icon-sombra.png";
	iconPenela.iconSize = new GSize(71, 68); //Pixel size(width,height)
	iconPenela.shadowSize = new GSize(104, 70);//Pixel size(width,height)
	iconPenela.iconAnchor = new GPoint(30, 68);//Pixel coordinate relative to the top left corner of the icon image at which this icon is anchored to the map.
// Colocar Marker
	var pointPenela = new GLatLng(40.03006, -8.39020729);
	map.addOverlay(new GMarker(pointPenela, iconPenela));
/* =CONDEIXA */	
// Criar marker icon
	var iconCondeixa = new GIcon();
	iconCondeixa.image = "imgs/gmap-icon-condeixa.png";
	iconCondeixa.shadow = "imgs/gmap-icon-sombra.png";
	iconCondeixa.iconSize = new GSize(71, 68); //Pixel size(width,height)
	iconCondeixa.shadowSize = new GSize(104, 70);//Pixel size(width,height)
	iconCondeixa.iconAnchor = new GPoint(30, 68);//Pixel coordinate relative to the top left corner of the icon image at which this icon is anchored to the map.
// Colocar Marker
	var pointCondeixa = new GLatLng(40.113067, -8.4989118);
	map.addOverlay(new GMarker(pointCondeixa, iconCondeixa));
/* =SOURE */	
// Criar marker icon
	var iconSoure = new GIcon();
	iconSoure.image = "imgs/gmap-icon-soure.png";
	iconSoure.shadow = "imgs/gmap-icon-sombra.png";
	iconSoure.iconSize = new GSize(71, 68); //Pixel size(width,height)
	iconSoure.shadowSize = new GSize(104, 70);//Pixel size(width,height)
	iconSoure.iconAnchor = new GPoint(30, 68);//Pixel coordinate relative to the top left corner of the icon image at which this icon is anchored to the map.
// Colocar Marker
	var pointSoure = new GLatLng(40.060731, -8.625705);
	map.addOverlay(new GMarker(pointSoure, iconSoure));
/* =POMBAL */	
// Criar marker icon
	var iconPombal = new GIcon();
	iconPombal.image = "imgs/gmap-icon-pombal.png";
	iconPombal.shadow = "imgs/gmap-icon-sombra.png";
	iconPombal.iconSize = new GSize(71, 68); //Pixel size(width,height)
	iconPombal.shadowSize = new GSize(104, 70);//Pixel size(width,height)
	iconPombal.iconAnchor = new GPoint(30, 68);//Pixel coordinate relative to the top left corner of the icon image at which this icon is anchored to the map.
// Colocar Marker
	var pointPombal = new GLatLng(39.91724, -8.626885);
	map.addOverlay(new GMarker(pointPombal, iconPombal));	
/* =ANSIAO */	
// Criar marker icon
	var iconAnsiao = new GIcon();
	iconAnsiao.image = "imgs/gmap-icon-ansiao.png";
	iconAnsiao.shadow = "imgs/gmap-icon-sombra.png";
	iconAnsiao.iconSize = new GSize(71, 68); //Pixel size(width,height)
	iconAnsiao.shadowSize = new GSize(104, 70);//Pixel size(width,height)
	iconAnsiao.iconAnchor = new GPoint(30, 68);//Pixel coordinate relative to the top left corner of the icon image at which this icon is anchored to the map.
// Colocar Marker
	var pointAnsiao = new GLatLng(39.9117113, -8.4360408);
	map.addOverlay(new GMarker(pointAnsiao, iconAnsiao));		
/* =ALVAIAZERE */	
// Criar marker icon
	var iconAlva = new GIcon();
	iconAlva.image = "imgs/gmap-icon-alva.png";
	iconAlva.shadow = "imgs/gmap-icon-sombra.png";
	iconAlva.iconSize = new GSize(71, 68); //Pixel size(width,height)
	iconAlva.shadowSize = new GSize(104, 70);//Pixel size(width,height)
	iconAlva.iconAnchor = new GPoint(30, 68);//Pixel coordinate relative to the top left corner of the icon image at which this icon is anchored to the map.
// Colocar Marker
	var pointAlva = new GLatLng(39.823666, -8.3813667);
	map.addOverlay(new GMarker(pointAlva, iconAlva));			
}

/* =window.onunload
-----------------------------------------------------------------------*/
window.onunload = GUnload;

/* =Preparar Eventos
-----------------------------------------------------------------------*/
addLoadEvent(load);

