/* [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%A1gina+Inicial'),jdecode(''),'/401.html','true',[],''],
	['PAGE','57801',jdecode('Lancar++Auto'),jdecode(''),'/57801.html','true',[],''],
	['PAGE','57852',jdecode('Lancar++Motos'),jdecode(''),'/57852.html','true',[],''],
	['PAGE','57873',jdecode('Lancar+Bike'),jdecode(''),'/57873.html','true',[],''],
	['PAGE','57894',jdecode('Lancar+Industria'),jdecode(''),'/57894.html','true',[],''],
	['PAGE','57915',jdecode('Goldeagle'),jdecode(''),'/57915.html','true',[],''],
	['PAGE','19201',jdecode('Outras+informa%C3%A7%C3%B5es'),jdecode(''),'/19201.html','true',[],'']];
var siteelementCount=7;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='AC2323';
theSitetree.keyvisualId='1753';
theSitetree.keyvisualName='industrie.jpg';
theSitetree.fontsetId='290';
theSitetree.graphicsetId='356';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='AC2323';
var theTemplate={
				name: 			'Movement',
				paletteFamily: 	'AC2323',
				keyvisualId: 	'1753',
				keyvisualName: 	'industrie.jpg',
				fontsetId: 		'290',
				graphicsetId: 	'356',
				contentColor: 	'FFFFFF',
				contentBGColor: 'AC2323',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'AC2323',
				b_color: 		'480F0F',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5000']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20111027-005452'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '19201',
internalId:  '',
customField: '20120115-220244'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '57801',
internalId:  '',
customField: '20120115-202449'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '57852',
internalId:  '',
customField: '20120115-205625'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '57873',
internalId:  '',
customField: '20111020-012402'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '57894',
internalId:  '',
customField: '20120115-205029'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '57915',
internalId:  '',
customField: '20111020-012523'
};
var canonHostname = 'creator.amenworld.com';
var accountId     = 'AAM010INZOB0';
var companyName   = 'O+Site+Oficial+da+Lancar+Portugal';
var htmlTitle	  = 'LANCAR+PORTUGAL+-+SITE+OFICIAL';
var metaKeywords  = 'lancar%2C+oleo%2C+tratamento%2C+lubrificante%2C+carros%2C+motas%2C+biciletas%2C+todo+o+terreno%2C+jipes%2C+motor%2C+combustivel%2C+aft%2C+ta%2C+faher%2C+competi%C3%A7%C3%A3o%2C+barcos%2C+corridas%2C+megapower%2C+jb%2Caditivos%2C+lojas+online%2C+2cv%2C+lancar+portugal%2C+massas+consistentes%2C+gla%2C+gl-20%2C+goldeagle%2C+ed%2C+eg%2C+motocross%2C+kartcross%2C+trakeday';
var metaContents  = 'aditivos+tratamentos+anti-fricc%C3%A3o%2C+lancar%2C+goldeagle.';
					                                                                    
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 */					                                                            

