/* [nodename, id, name, navigationtext, href, isnavigation, childs[], templatename] */

function jdecode(s) {
    s = s.replace(/\+/g, "%20")
    return unescape(s);
}

var POS_NODENAME=0;
var POS_ID=1;
var POS_NAME=2;
var POS_NAVIGATIONTEXT=3;
var POS_HREF=4;
var POS_ISNAVIGATION=5;
var POS_CHILDS=6;
var POS_TEMPLATENAME=7;
var theSitetree=[ 
	['PAGE','4717',jdecode('P%E1gina+Inicial'),jdecode(''),'/4717/index.html','true',[ 
		['PAGE','36902',jdecode('Apresenta%E7%E3o+%28volgende+pagina%29'),jdecode(''),'/4717/36902.html','false',[],'']
	],''],
	['PAGE','210001',jdecode('Apresenta%E7%E3o'),jdecode(''),'/210001/index.html','true',[ 
		['PAGE','230874',jdecode('Aldeia'),jdecode(''),'/210001/230874.html','true',[],''],
		['PAGE','230901',jdecode('Autor'),jdecode(''),'/210001/230901.html','true',[],''],
		['PAGE','230928',jdecode('Colaboradores'),jdecode(''),'/210001/230928.html','true',[],'']
	],''],
	['PAGE','230955',jdecode('Noticias'),jdecode(''),'/230955.html','true',[],''],
	['PAGE','230982',jdecode('Colo+de+Pito'),jdecode(''),'/230982/index.html','true',[ 
		['PAGE','231009',jdecode('Agricultura'),jdecode(''),'/230982/231009.html','true',[],''],
		['PAGE','231036',jdecode('Gastronomia'),jdecode(''),'/230982/231036.html','true',[],''],
		['PAGE','231063',jdecode('Fauna'),jdecode(''),'/230982/231063.html','true',[],''],
		['PAGE','231090',jdecode('Animais+bravios'),jdecode(''),'/230982/231090.html','true',[],''],
		['PAGE','231117',jdecode('Flora'),jdecode(''),'/230982/231117.html','true',[],''],
		['PAGE','231144',jdecode('Fotos'),jdecode(''),'/230982/231144.html','true',[],'']
	],''],
	['PAGE','231171',jdecode('Fotografias'),jdecode(''),'/231171.html','true',[],''],
	['PAGE','44230',jdecode('Regi%E3o'),jdecode(''),'/44230/index.html','true',[ 
		['PAGE','219762',jdecode('Concelho'),jdecode(''),'/44230/219762.html','true',[],''],
		['PAGE','219789',jdecode('Freguesia'),jdecode(''),'/44230/219789.html','true',[],''],
		['PAGE','231198',jdecode('Localidades'),jdecode(''),'/44230/231198.html','true',[],''],
		['PAGE','231225',jdecode('Carvalhas'),jdecode(''),'/44230/231225.html','true',[],''],
		['PAGE','231252',jdecode('Monteiras'),jdecode(''),'/44230/231252.html','true',[],''],
		['PAGE','231279',jdecode('Relva'),jdecode(''),'/44230/231279.html','true',[],'']
	],''],
	['PAGE','11998',jdecode('Hist%F3ria'),jdecode(''),'/11998/index.html','true',[ 
		['PAGE','231306',jdecode('Hist%F3ria+Geral'),jdecode(''),'/11998/231306.html','true',[],''],
		['PAGE','219843',jdecode('Historietas'),jdecode(''),'/11998/219843.html','true',[],''],
		['PAGE','231333',jdecode('Ouvida'),jdecode(''),'/11998/231333.html','true',[],''],
		['PAGE','231360',jdecode('Lapa'),jdecode(''),'/11998/231360.html','true',[],''],
		['PAGE','231387',jdecode('Imprensa'),jdecode(''),'/11998/231387.html','true',[],'']
	],''],
	['PAGE','210601',jdecode('Festas'),jdecode(''),'/210601/index.html','true',[ 
		['PAGE','231414',jdecode('Comiss%E3o'),jdecode(''),'/210601/231414.html','true',[],''],
		['PAGE','207978',jdecode('Programa'),jdecode(''),'/210601/207978.html','true',[],'']
	],''],
	['PAGE','210055',jdecode('Liga%E7%F5es'),jdecode(''),'/210055/index.html','true',[ 
		['PAGE','210082',jdecode('Institucionais'),jdecode(''),'/210055/210082.html','true',[],''],
		['PAGE','210109',jdecode('Nacionais'),jdecode(''),'/210055/210109.html','true',[],''],
		['PAGE','219870',jdecode('Internacionais'),jdecode(''),'/210055/219870.html','true',[],''],
		['PAGE','231441',jdecode('Locais'),jdecode(''),'/210055/231441.html','true',[],'']
	],''],
	['PAGE','210190',jdecode('Com%E9rcio'),jdecode(''),'/210190/index.html','true',[ 
		['PAGE','210628',jdecode('Concelho'),jdecode(''),'/210190/210628.html','true',[],''],
		['PAGE','219897',jdecode('Local'),jdecode(''),'/210190/219897.html','true',[],'']
	],''],
	['PAGE','210136',jdecode('Associa%E7%E3o'),jdecode(''),'/210136/index.html','true',[ 
		['PAGE','231468',jdecode('Estatutos'),jdecode(''),'/210136/231468.html','true',[],''],
		['PAGE','231495',jdecode('Regulamento'),jdecode(''),'/210136/231495.html','true',[],'']
	],''],
	['PAGE','231522',jdecode('Org%E3os+Sociais'),jdecode(''),'/231522/index.html','true',[ 
		['PAGE','231549',jdecode('Assembleia+Geral'),jdecode(''),'/231522/231549.html','true',[],''],
		['PAGE','231576',jdecode('Direc%E7%E3o'),jdecode(''),'/231522/231576.html','true',[],''],
		['PAGE','231603',jdecode('Conselho+Fiscal'),jdecode(''),'/231522/231603.html','true',[],'']
	],''],
	['PAGE','11182',jdecode('Contactos'),jdecode(''),'/11182/index.html','true',[ 
		['PAGE','11236',jdecode('Onde+estamos'),jdecode(''),'/11182/11236.html','true',[],''],
		['PAGE','11209',jdecode('Endere%E7os'),jdecode(''),'/11182/11209.html','true',[],''],
		['PAGE','17502',jdecode('Galeria+de+Fotos+'),jdecode(''),'/11182/17502.html','true',[],'']
	],''],
	['PAGE','209002',jdecode('Livro+de+visitas'),jdecode(''),'/209002/index.html','true',[ 
		['PAGE','209003',jdecode('Entradas'),jdecode(''),'/209002/209003.html','true',[],'']
	],'']];
var siteelementCount=52;
theSitetree.topTemplateName='Postcards';
					                                                                    
theSitetree.getById = function(id, ar) {												
							if (typeof(ar) == 'undefined')                              
								ar = this;                                              
							for (var i=0; i < ar.length; i++) {                         
								if (ar[i][POS_ID] == id)                                
									return ar[i];                                       
								if (ar[i][POS_CHILDS].length > 0) {                     
									var result=this.getById(id, ar[i][POS_CHILDS]);     
									if (result != null)                                 
										return result;                                  
								}									                    
							}                                                           
							return null;                                                
					  };                                                                
					                                                                    
theSitetree.getParentById = function(id, ar) {											
						if (typeof(ar) == 'undefined')                              	
							ar = this;                                             		
						for (var i=0; i < ar.length; i++) {                        		
							for (var j = 0; j < ar[i][POS_CHILDS].length; j++) {   		
								if (ar[i][POS_CHILDS][j][POS_ID] == id) {          		
									// child found                                 		
									return ar[i];                                  		
								}                                                  		
								var result=this.getParentById(id, ar[i][POS_CHILDS]);   
								if (result != null)                                 	
									return result;                                  	
							}                                                       	
						}                                                           	
						return null;                                                	
					 }								                                    
					                                                                    
theSitetree.getName = function(id) {                                                    
						var elem = this.getById(id);                                    
						if (elem != null)                                               
							return elem[POS_NAME];                                      
						return null;	                                                
					  };			                                                    
theSitetree.getNavigationText = function(id) {                                          
						var elem = this.getById(id);                                    
						if (elem != null)                                               
							return elem[POS_NAVIGATIONTEXT];                            
						return null;	                                                
					  };			                                                    
					                                                                    
theSitetree.getHREF = function(id) {                                                    
						var elem = this.getById(id);                                    
						if (elem != null)                                               
							return elem[POS_HREF];                                      
						return null;	                                                
					  };			                                                    
					                                                                    
theSitetree.getIsNavigation = function(id) {                                            
						var elem = this.getById(id);                                    
						if (elem != null)                                               
							return elem[POS_ISNAVIGATION];                              
						return null;	                                                
					  };			                                                    
					                                                                    
theSitetree.getTemplateName = function(id, lastTemplateName, ar) {             		 
	                                                                                 
	if (typeof(lastTemplateName) == 'undefined')                                     
		lastTemplateName = this.topTemplateName;	                                 
	if (typeof(ar) == 'undefined')                                                   
		ar = this;                                                                   
		                                                                             
	for (var i=0; i < ar.length; i++) {                                              
		var actTemplateName = ar[i][POS_TEMPLATENAME];                               
		                                                                             
		if (actTemplateName == '')                                                   
			actTemplateName = lastTemplateName;		                                 
		                                                                             
		if (ar[i][POS_ID] == id) {                                			         
			return actTemplateName;                                                  
		}	                                                                         
		                                                                             
		if (ar[i][POS_CHILDS].length > 0) {                                          
			var result=this.getTemplateName(id, actTemplateName, ar[i][POS_CHILDS]); 
			if (result != null)                                                      
				return result;                                                       
		}									                                         
	}                                                                                
	return null;                                                                     
	};                                                                               
/* EOF */					                                                            
