/* [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','4607',jdecode('P%C3%A1gina+Inicial'),jdecode(''),'/4607.html','true',[],''],
	['PAGE','4664',jdecode('A+Empresa'),jdecode(''),'/4664.html','true',[],''],
	['PAGE','4718',jdecode('Produtos'),jdecode(''),'/4718/index.html','true',[ 
		['PAGE','4745',jdecode('Produto+1'),jdecode(''),'/4718/4745.html','true',[],''],
		['PAGE','4772',jdecode('Produto+2'),jdecode(''),'/4718/4772.html','true',[],''],
		['PAGE','4799',jdecode('Produto+3'),jdecode(''),'/4718/4799.html','true',[],''],
		['PAGE','5201',jdecode('Produto+4'),jdecode(''),'/4718/5201.html','true',[],''],
		['PAGE','5228',jdecode('Produto+5'),jdecode(''),'/4718/5228.html','true',[],''],
		['PAGE','5255',jdecode('Produto+6'),jdecode(''),'/4718/5255.html','true',[],''],
		['PAGE','5282',jdecode('Produto+7'),jdecode(''),'/4718/5282.html','true',[],''],
		['PAGE','5309',jdecode('Produto+8'),jdecode(''),'/4718/5309.html','true',[],''],
		['PAGE','5336',jdecode('Produto+9'),jdecode(''),'/4718/5336.html','true',[],''],
		['PAGE','5363',jdecode('Produto+10'),jdecode(''),'/4718/5363.html','true',[],'']
	],''],
	['PAGE','4826',jdecode('Servi%C3%A7os'),jdecode(''),'/4826.html','true',[],''],
	['PAGE','4853',jdecode('Contactos'),jdecode(''),'/4853/index.html','true',[ 
		['PAGE','7402',jdecode('Contactos+%28volgende+pagina%29'),jdecode(''),'/4853/7402.html','false',[],''],
		['PAGE','4880',jdecode('Endere%C3%A7os'),jdecode(''),'/4853/4880.html','true',[],''],
		['PAGE','4907',jdecode('Localiza%C3%A7%C3%A3o'),jdecode(''),'/4853/4907.html','true',[],'']
	],'']];
var siteelementCount=18;
theSitetree.topTemplateName='Match';
theSitetree.paletteFamily='FF3333';
theSitetree.keyvisualId='2698';
theSitetree.keyvisualName='blanco.jpg';
theSitetree.fontsetId='10404';
theSitetree.graphicsetId='10635';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='CCCCCC';
var theTemplate={
				name: 			'Match',
				paletteFamily: 	'FF3333',
				keyvisualId: 	'2698',
				keyvisualName: 	'blanco.jpg',
				fontsetId: 		'10404',
				graphicsetId: 	'10635',
				contentColor: 	'000000',
				contentBGColor: 'CCCCCC',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FF3333',
				e_color: 		'545353',
				f_color: 		'545353',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1001']={
webappId:    '1001',
documentId:  '4853',
internalId:  'aam010ine7dx10027beecfa',
customField: ''
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '7402',
internalId:  'aam010ine7dx10027beecfa',
customField: 'followUp'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '4607',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']={
webappId:    '1501',
documentId:  '4607',
internalId:  '2951748',
customField: '1501'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4607',
internalId:  '',
customField: '20041116-142732'
};
var canonHostname = 'creator.amenworld.com';
var accountId     = 'AAM010INE7DX';
var companyName   = 'ANAGRI+-+M%EF%BF%BDquinas+Agr%EF%BF%BDcolas';
var htmlTitle	  = 'Anagri+-+M%C3%A1quinas+Agr%C3%ADcolas';
var metaKeywords  = 'tractores+usados%3B+ocasiao%3B+maquinas+agricolas%3B+agricultura%3B+alfaias%3B+venda+tractores%3B+used+tractors%3B+agriculture%3B+machinery';
var metaContents  = 'Tractores+usados';
					                                                                    
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 */					                                                            
