/* [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','1513',jdecode('Som+%26+Imagem'),jdecode(''),'/1513.html','true',[],''],
	['PAGE','1570',jdecode('Electrodom%C3%A9sticos'),jdecode(''),'/1570/index.html','true',[ 
		['PAGE','19902',jdecode('Produtos+%28volgende+pagina%29'),jdecode(''),'/1570/19902.html','false',[],'']
	],''],
	['PAGE','205412',jdecode('P.+Dom%C3%A9sticos'),jdecode(''),'/205412.html','true',[],''],
	['PAGE','205433',jdecode('Climatiza%C3%A7%C3%A3o'),jdecode(''),'/205433.html','true',[],''],
	['PAGE','205454',jdecode('Comunica%C3%A7%C3%B5es'),jdecode(''),'/205454.html','true',[],''],
	['PAGE','205812',jdecode('Antenas%2FAcess%C3%B3rios'),jdecode(''),'/205812.html','true',[],''],
	['PAGE','205833',jdecode('Assist%C3%AAncia'),jdecode(''),'/205833.html','true',[],'']];
var siteelementCount=8;
theSitetree.topTemplateName='Profile';
theSitetree.paletteFamily='333333';
theSitetree.keyvisualId='1271';
theSitetree.keyvisualName='cd_einlegen.jpg';
theSitetree.fontsetId='191';
theSitetree.graphicsetId='226';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Profile',
				paletteFamily: 	'333333',
				keyvisualId: 	'1271',
				keyvisualName: 	'cd_einlegen.jpg',
				fontsetId: 		'191',
				graphicsetId: 	'226',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'333333',
				b_color: 		'999999',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1006']={
webappId:    '1006',
documentId:  '1513',
internalId:  '1006',
customField: '1006'
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '1570',
internalId:  'aam010invvzn110a6f1790b',
customField: ''
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '19902',
internalId:  'aam010invvzn110a6f1790b',
customField: 'followUp'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '1513',
internalId:  '',
customField: '20100205-130520'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '1570',
internalId:  '',
customField: '20100120-203631'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '19902',
internalId:  '',
customField: '20070209-153907'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '205412',
internalId:  '',
customField: '20100127-154729'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '205433',
internalId:  '',
customField: '20100109-131802'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '205454',
internalId:  '',
customField: '20100109-132551'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '205812',
internalId:  '',
customField: '20100105-171749'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '205833',
internalId:  '',
customField: '20100105-171759'
};
var canonHostname = 'creator.amenworld.com';
var accountId     = 'AAM010INVVZN';
var companyName   = 'Compactel+-+electrodom%C3%A9sticos';
var htmlTitle	  = 'Compactel+-+electrodom%C3%A9sticos%2C+um+estilo+de+vida+uma+vida+com+estilo';
var metaKeywords  = 'compactel+electrodomesticos+Lg+samsung+Indesit+Polti+Krups+Vodafone+Ariston+Fagor+Balay+Sanyo+Grundig+Sony+Rowenta+Ufesa+Tefal+Philips+Teka+Siemens+Bosch+';
var metaContents  = 'electrodom%EF%BF%BDsticos-Vodafone-LG-Ariston-Indesit-Fagor-Edesa-Balay-Sanyo-Grundig-Sony-Rowenta-Ufesa-Krups-Tefal-Philips-Airlux-Teka-Siemens-Bosch';
					                                                                    
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 */					                                                            
