/* [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','401',jdecode('P%C3%81GINA+INICIAL'),jdecode(''),'/401/index.html','true',[ 
		['PAGE','27301',jdecode('Perfis'),jdecode(''),'/401/27301.html','true',[],''],
		['PAGE','830',jdecode('Sugest%C3%B5es+do+Mun%C3%ADcipe'),jdecode(''),'/401/830.html','true',[],''],
		['PAGE','48001',jdecode('Agenda+de+Campanha'),jdecode(''),'/401/48001.html','true',[],''],
		['PAGE','51601',jdecode('%C3%81lbum+de+Imagens'),jdecode(''),'/401/51601.html','true',[],''],
		['PAGE','28201',jdecode('Contactos'),jdecode(''),'/401/28201.html','true',[],'']
	],''],
	['PAGE','30101',jdecode('MANIFESTO+ELEITORAL'),jdecode(''),'/30101/index.html','true',[ 
		['PAGE','30122',jdecode('Perfil+do+Candidato'),jdecode(''),'/30101/30122.html','true',[],''],
		['PAGE','30143',jdecode('Sugest%C3%B5es+do+Mun%C3%ADcipe'),jdecode(''),'/30101/30143.html','true',[],''],
		['PAGE','30164',jdecode('Contactos'),jdecode(''),'/30101/30164.html','true',[],'']
	],''],
	['PAGE','22722',jdecode('EQUIPA+e+PROG.+AC%C3%87%C3%83O'),jdecode(''),'/22722/index.html','true',[ 
		['PAGE','22743',jdecode('C%C3%A2mara+M.+Santana'),jdecode(''),'/22722/22743.html','true',[],''],
		['PAGE','23101',jdecode('Assembleia+Municipal'),jdecode(''),'/22722/23101.html','true',[],''],
		['PAGE','23185',jdecode('Assemb.+de+Freguesia'),jdecode(''),'/22722/23185.html','true',[],''],
		['PAGE','41701',jdecode('Programas+Ac%C3%A7%C3%A3o'),jdecode(''),'/22722/41701.html','true',[],'']
	],''],
	['PAGE','23206',jdecode('%C3%81REAS+DE+INTERVEN%C3%87%C3%83O'),jdecode(''),'/23206.html','true',[],''],
	['PAGE','42901',jdecode('-------------------------------'),jdecode(''),'/42901.html','true',[],''],
	['PAGE','37101',jdecode('Planeamento+Estrat%C3%A9gico'),jdecode(''),'/37101.html','true',[],''],
	['PAGE','37122',jdecode('Economia+e+Finan%C3%A7as'),jdecode(''),'/37122.html','true',[],''],
	['PAGE','37143',jdecode('Ord.+Territ%C3%B3rio+%2FUrbanismo'),jdecode(''),'/37143.html','true',[],''],
	['PAGE','37164',jdecode('Coopera%C3%A7%C3%A3o+Institucional'),jdecode(''),'/37164.html','true',[],''],
	['PAGE','37185',jdecode('Ambiente'),jdecode(''),'/37185.html','true',[],''],
	['PAGE','37206',jdecode('Agricultura'),jdecode(''),'/37206.html','true',[],''],
	['PAGE','37227',jdecode('Promo%C3%A7%C3%A3o+e+Turismo'),jdecode(''),'/37227.html','true',[],''],
	['PAGE','37248',jdecode('Educa%C3%A7%C3%A3o%2C+Ci%C3%AAncia+e+Tecnol.'),jdecode(''),'/37248.html','true',[],''],
	['PAGE','37269',jdecode('Gest%C3%A3o+Cultural+e+Patrim%C3%B3nio'),jdecode(''),'/37269.html','true',[],''],
	['PAGE','37290',jdecode('Desporto+e+Lazer'),jdecode(''),'/37290.html','true',[],''],
	['PAGE','37311',jdecode('Juventude+e+Idosos'),jdecode(''),'/37311.html','true',[],''],
	['PAGE','37332',jdecode('Interven%C3%A7%C3%A3o+Comunit%C3%A1ria'),jdecode(''),'/37332.html','true',[],''],
	['PAGE','37353',jdecode('Mobilidade'),jdecode(''),'/37353.html','true',[],''],
	['PAGE','37374',jdecode('Protec%C3%A7%C3%A3o+Civil'),jdecode(''),'/37374.html','true',[],''],
	['PAGE','50501',jdecode('-------------------------------'),jdecode(''),'/50501.html','true',[],''],
	['PAGE','50522',jdecode('Ficha+t%C3%A9cnica'),jdecode(''),'/50522.html','true',[],'']];
var siteelementCount=33;
theSitetree.topTemplateName='Lifecycle';
theSitetree.paletteFamily='EF9043';
theSitetree.keyvisualId='4460';
theSitetree.keyvisualName='kv_4460.jpg';
theSitetree.fontsetId='10815';
theSitetree.graphicsetId='11260';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='7F7F7F';
var theTemplate={
				name: 			'Lifecycle',
				paletteFamily: 	'EF9043',
				keyvisualId: 	'4460',
				keyvisualName: 	'kv_4460.jpg',
				fontsetId: 		'10815',
				graphicsetId: 	'11260',
				contentColor: 	'FFFFFF',
				contentBGColor: '7F7F7F',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5000']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20091022-134751'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '830',
internalId:  '',
customField: '20090909-152949'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '30164',
internalId:  '',
customField: '20090909-203721'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '22743',
internalId:  '',
customField: '20090918-203156'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '22722',
internalId:  '',
customField: '20090910-093446'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '23206',
internalId:  '',
customField: '20090915-211326'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '28201',
internalId:  '',
customField: '20090909-203642'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '27301',
internalId:  '',
customField: '20090911-091239'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '30101',
internalId:  '',
customField: '20090918-201031'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '30122',
internalId:  '',
customField: '20090911-095041'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '30143',
internalId:  '',
customField: '20090909-210823'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '23101',
internalId:  '',
customField: '20090925-172238'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '23185',
internalId:  '',
customField: '20090914-190659'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '37101',
internalId:  '',
customField: '20090921-105504'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '37122',
internalId:  '',
customField: '20090911-093726'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '37143',
internalId:  '',
customField: '20090911-093800'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '37164',
internalId:  '',
customField: '20090909-212122'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '37185',
internalId:  '',
customField: '20090911-093903'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '37206',
internalId:  '',
customField: '20090909-212304'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '37227',
internalId:  '',
customField: '20090915-211124'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '37248',
internalId:  '',
customField: '20090909-212539'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '37269',
internalId:  '',
customField: '20090911-094009'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '37290',
internalId:  '',
customField: '20090911-094109'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '37311',
internalId:  '',
customField: '20090909-212812'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '37332',
internalId:  '',
customField: '20090909-212936'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '37353',
internalId:  '',
customField: '20090909-213018'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '37374',
internalId:  '',
customField: '20090911-094238'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '41701',
internalId:  '',
customField: '20090909-211500'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '42901',
internalId:  '',
customField: '20090910-093234'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '48001',
internalId:  '',
customField: '20091010-020733'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '50501',
internalId:  '',
customField: '20090910-095332'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '50522',
internalId:  '',
customField: '20090910-095125'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '51601',
internalId:  '',
customField: '20091022-142700'
};
var canonHostname = 'creator.amenworld.com';
var accountId     = 'AAM010INZDW3';
var companyName   = 'PPD%2FPSD+Sempre+Por+Santana+%21';
var htmlTitle	  = '';
var metaKeywords  = 'Rui+Mois%C3%A9s+%3B+C%C3%A2mara+Municipal+de+Santana+%3B+elei%C3%A7%C3%B5es+%3B+aut%C3%A1rquicas+2009%3B+Madeira+%3B+aut%C3%A1rquicas';
var metaContents  = 'Rui+Mois%C3%A9s+candidato+do+PPD%2FPSD+Madeira+%C3%A0+C%C3%A2mara+Municipal+de+Santana+%C3%A0s+elei%C3%A7%C3%B5es+aut%C3%A1rquicas+11+de+Outubro+2009';
					                                                                    
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 */					                                                            
