/* [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','701',jdecode('Home'),jdecode(''),'/701.html','true',[],''],
	['PAGE','11201',jdecode('Not%C3%ADcias+e+Eventos'),jdecode(''),'/11201.html','true',[],'']];
var siteelementCount=2;
theSitetree.topTemplateName='Proton';
theSitetree.paletteFamily='FFFFFF';
theSitetree.keyvisualId='3545';
theSitetree.keyvisualName='kv_3545.jpg';
theSitetree.fontsetId='10445';
theSitetree.graphicsetId='10827';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Proton',
				paletteFamily: 	'FFFFFF',
				keyvisualId: 	'3545',
				keyvisualName: 	'kv_3545.jpg',
				fontsetId: 		'10445',
				graphicsetId: 	'10827',
				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: 		'747474',
				e_color: 		'864242',
				f_color: 		'A9A9A9',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5000']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20110203-233010'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '11201',
internalId:  '',
customField: '20110203-233615'
};
var canonHostname = 'creator.amenworld.com';
var accountId     = 'AAM010INZ5T3';
var companyName   = 'LANCAR+PORTUGAL';
var htmlTitle	  = 'LANCAR+PORTUGAL';
var metaKeywords  = 'faher%2C+lancar%2C+ptfe%2C+hd%2C+teflon%2C+ta%2C+tratamentos+anti+fric%C3%A7%C3%A3o%2C+carro%2C+mota%2C+cami%C3%A3o%2C+compressores%2C+gruas%2C+competi%C3%A7%C3%A3o+desportiva%2C+gasoleo%2C+gasolina%2C+m%C3%A1quinas%2C+protec%C3%A7%C3%A3o%2C+oficina%2C+hidr%C3%A1ulicos%2C+rolamentos%2C+%C3%B3leos%2C+valvulinas%2C+massas%2C+embraiagens%2C+viacerta%2C+velozride%2C+paulomartinho%2C+seminauto%2C+autoreparadora+varzea%2C+g%C3%B3is%2C+faro%2C+motocross%2C+freestyle%2C+bike+sport%2C+expomoto%2C+exposal%C3%A3o%2C+lancar.biz%2C+motard%2C+racing%2C+concentra%C3%A7%C3%A3o+motard%2C+lubrificantes%2C+aditivos%2C+combust%C3%ADveis%2C+provas+de+per%C3%ADcia%2C+tunning%2C+motabout';
var metaContents  = 'Tratamentos+Anti-fric%C3%A7%C3%A3o%2C+Lubrificantes+t%C3%A9cnicos%2C+aditivos%2C+comb%C3%BAstiveis%2C+industria%2C+ramo+autom%C3%B3vel%2C+competi%C3%A7%C3%A3o+desportiva%2C+freestyle%2C+motocross%2C+';
					                                                                    
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 */					                                                            

