/* [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','4529',jdecode('Home'),jdecode(''),'/4529.html','true',[],''],
	['PAGE','45162',jdecode('Servi%C3%A7os'),jdecode(''),'/45162.html','true',[],''],
	['PAGE','45189',jdecode('Clientes'),jdecode(''),'/45189.html','true',[],''],
	['PAGE','45216',jdecode('Candidatos'),jdecode(''),'/45216/index.html','true',[ 
		['PAGE','46102',jdecode('Candidatos+%28volgende+pagina%29'),jdecode(''),'/45216/46102.html','false',[],'']
	],''],
	['PAGE','45243',jdecode('Ofertas+de+Emprego'),jdecode(''),'/45243.html','true',[],''],
	['PAGE','4586',jdecode('Contactos'),jdecode(''),'/4586/index.html','true',[ 
		['PAGE','39102',jdecode('Contacto+%28volgende+pagina%29'),jdecode(''),'/4586/39102.html','false',[],''],
		['PAGE','39002',jdecode('Contacto+%28volgende+pagina%29'),jdecode(''),'/4586/39002.html','false',[],''],
		['PAGE','38402',jdecode('Contacto+%28volgende+pagina%29'),jdecode(''),'/4586/38402.html','false',[],''],
		['PAGE','47001',jdecode('Links+Uteis'),jdecode(''),'/4586/47001.html','true',[],'']
	],'']];
var siteelementCount=11;
theSitetree.topTemplateName='Cube';
theSitetree.paletteFamily='154186';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10605';
theSitetree.graphicsetId='10488';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Cube',
				paletteFamily: 	'154186',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10605',
				graphicsetId: 	'10488',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				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: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1006']={
webappId:    '1006',
documentId:  '4529',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4529',
internalId:  '',
customField: '20100115-181749'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '45216',
internalId:  '',
customField: '20100701-014537'
};
webappMappings['1008']={
webappId:    '1008',
documentId:  '45189',
internalId:  '12102886',
customField: 'pt:PT:'
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '45216',
internalId:  'aam010in3844112cef41640',
customField: ''
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '46102',
internalId:  'aam010in3844112cef41640',
customField: 'followUp'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4586',
internalId:  '',
customField: '20080610-175353'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '45243',
internalId:  '',
customField: '20100303-225533'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '47001',
internalId:  '',
customField: '20081201-184004'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '45162',
internalId:  '',
customField: '20080721-234854'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '45189',
internalId:  '',
customField: '20080610-181901'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '46102',
internalId:  '',
customField: '20070527-211222'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '39102',
internalId:  '',
customField: '20070308-011828'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '39002',
internalId:  '',
customField: '20070308-011239'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '38402',
internalId:  '',
customField: '20070308-003325'
};
var canonHostname = 'creator.amenworld.com';
var accountId     = 'AAM010IN3844';
var companyName   = 'JPN-Trabalho+Tempor%C3%A1rio';
var htmlTitle	  = 'Trabalho+Tempor%C3%A1rio';
var metaKeywords  = 'T+S+V+P+E+O';
var metaContents  = 'Trabalho%2C+Temporario%2C+consulta%2C+servi%EF%BF%BDo%2C+Vila%2C+Alenquer%2C+Carregado%2C+Candidato%2C+Cliente%2C+Recrutar%2C+Pessoal%2Cemprego%2C+empresa%2C+outsor%2C+manuten%EF%BF%BD%EF%BF%BDo%2C+limpeza%2C+Centro%2C+servi%C3%A7o%2C+fornecedor%2C+m%C3%A3o+de+obra';
					                                                                    
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 */					                                                            
