/* [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.html','true',[],''],
	['PAGE','210001',jdecode('Apresenta%E7%E3o'),jdecode(''),'/210001.html','true',[],''],
	['PAGE','252708',jdecode('Cidadania'),jdecode(''),'/252708/index.html','true',[ 
		['PAGE','252735',jdecode('Autarquias'),jdecode(''),'/252708/252735.html','true',[],'']
	],''],
	['PAGE','253093',jdecode('Portal+de+Direito'),jdecode(''),'/253093/index.html','true',[ 
		['PAGE','253120',jdecode('Verbalegis'),jdecode(''),'/253093/253120.html','true',[],'']
	],''],
	['PAGE','230982',jdecode('Quinta+do+Conde'),jdecode(''),'/230982/index.html','true',[ 
		['PAGE','250976',jdecode('Associa%E7%F5es'),jdecode(''),'/230982/250976.html','true',[],''],
		['PAGE','251003',jdecode('C%E2mara+Municipal'),jdecode(''),'/230982/251003.html','true',[],''],
		['PAGE','251030',jdecode('Folclore'),jdecode(''),'/230982/251030.html','true',[],''],
		['PAGE','231036',jdecode('Gastronomia'),jdecode(''),'/230982/231036.html','true',[],''],
		['PAGE','251057',jdecode('Hist%F3ria'),jdecode(''),'/230982/251057.html','true',[],'']
	],''],
	['PAGE','251084',jdecode('Desporto'),jdecode(''),'/251084/index.html','true',[ 
		['PAGE','251111',jdecode('Atletismo'),jdecode(''),'/251084/251111.html','true',[],''],
		['PAGE','251138',jdecode('Ciclismo'),jdecode(''),'/251084/251138.html','true',[],''],
		['PAGE','251165',jdecode('Futebol'),jdecode(''),'/251084/251165.html','true',[],''],
		['PAGE','251192',jdecode('Gin%E1sios'),jdecode(''),'/251084/251192.html','true',[],''],
		['PAGE','251219',jdecode('Provas'),jdecode(''),'/251084/251219.html','true',[],'']
	],''],
	['PAGE','230955',jdecode('Noticias'),jdecode(''),'/230955/index.html','true',[ 
		['PAGE','251246',jdecode('Breves'),jdecode(''),'/230955/251246.html','true',[],''],
		['PAGE','251273',jdecode('%DAltimas'),jdecode(''),'/230955/251273.html','true',[],'']
	],''],
	['PAGE','251300',jdecode('Golfe'),jdecode(''),'/251300/index.html','true',[ 
		['PAGE','251327',jdecode('Quinta+do+Per%FA'),jdecode(''),'/251300/251327.html','true',[],''],
		['PAGE','251354',jdecode('Outros+campos'),jdecode(''),'/251300/251354.html','true',[],'']
	],''],
	['PAGE','44230',jdecode('Regi%E3o'),jdecode(''),'/44230/index.html','true',[ 
		['PAGE','219762',jdecode('Concelhos'),jdecode(''),'/44230/219762.html','true',[],''],
		['PAGE','251381',jdecode('Distrito'),jdecode(''),'/44230/251381.html','true',[],''],
		['PAGE','219789',jdecode('Freguesias'),jdecode(''),'/44230/219789.html','true',[],'']
	],''],
	['PAGE','231171',jdecode('Fotografias'),jdecode(''),'/231171.html','true',[],''],
	['PAGE','231387',jdecode('Imprensa+Local'),jdecode(''),'/231387/index.html','true',[ 
		['PAGE','251408',jdecode('Jornais'),jdecode(''),'/231387/251408.html','true',[],''],
		['PAGE','251435',jdecode('R%E1dios'),jdecode(''),'/231387/251435.html','true',[],'']
	],''],
	['PAGE','210601',jdecode('Festas'),jdecode(''),'/210601/index.html','true',[ 
		['PAGE','231414',jdecode('Feira+Festa'),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+e+Servi%E7os'),jdecode(''),'/210190/index.html','true',[ 
		['PAGE','210628',jdecode('Concelho'),jdecode(''),'/210190/210628.html','true',[],''],
		['PAGE','219897',jdecode('Local'),jdecode(''),'/210190/219897.html','true',[],'']
	],''],
	['PAGE','11998',jdecode('CMV+Consultores'),jdecode(''),'/11998/index.html','true',[ 
		['PAGE','251462',jdecode('Contabilidade'),jdecode(''),'/11998/251462.html','true',[],'']
	],''],
	['PAGE','210136',jdecode('Informa%E7%F5es+%DAteis'),jdecode(''),'/210136/index.html','true',[ 
		['PAGE','251489',jdecode('Bombeiros'),jdecode(''),'/210136/251489.html','true',[],''],
		['PAGE','251516',jdecode('Farm%E1cias'),jdecode(''),'/210136/251516.html','true',[],''],
		['PAGE','11209',jdecode('GNR'),jdecode(''),'/210136/11209.html','true',[],''],
		['PAGE','11182',jdecode('Outras'),jdecode(''),'/210136/11182.html','true',[],''],
		['PAGE','17502',jdecode('Galeria+de+Fotos+'),jdecode(''),'/210136/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=53;
theSitetree.topTemplateName='Time';
					                                                                    
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 */					                                                            
