/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],''],
	['PAGE','552',jdecode('Quem+somos'),jdecode(''),'/552.html','true',[],''],
	['PAGE','6422',jdecode('Os+nossos+Puffs'),jdecode(''),'/6422.html','true',[],''],
	['PAGE','6443',jdecode('Tapetes+Shaggy'),jdecode(''),'/6443.html','true',[],''],
	['PAGE','6464',jdecode('Sugest%C3%B5es'),jdecode(''),'/6464.html','true',[],''],
	['PAGE','18301',jdecode('Portf%C3%B3lio'),jdecode(''),'/18301.html','true',[],''],
	['PAGE','12401',jdecode('Contactos'),jdecode(''),'/12401.html','true',[],'']];
var siteelementCount=7;
theSitetree.topTemplateName='Neon';
theSitetree.paletteFamily='FF6600';
theSitetree.keyvisualId='908';
theSitetree.keyvisualName='antiquitaeten2.jpg';
theSitetree.fontsetId='162';
theSitetree.graphicsetId='195';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var theTemplate={
				name: 			'Neon',
				paletteFamily: 	'FF6600',
				keyvisualId: 	'908',
				keyvisualName: 	'antiquitaeten2.jpg',
				fontsetId: 		'162',
				graphicsetId: 	'195',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'666666',
				c_color: 		'000000',
				d_color: 		'6699CC',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5000']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20100308-213434'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20090427-115802'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '6464',
internalId:  '',
customField: '20100121-013658'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '6422',
internalId:  '',
customField: '20100126-231935'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '18301',
internalId:  '',
customField: '20100122-131718'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '6443',
internalId:  '',
customField: '20100126-232051'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '12401',
internalId:  '',
customField: '20100308-213607'
};
var canonHostname = 'creator.amenworld.com';
var accountId     = 'AAM010INLUSO';
var companyName   = 'Puffs+-+14+Modelos+-+19+Cores';
var htmlTitle	  = 'Puffs+-+Puff+-+Poufs+-+Bean+Bags+-+14+Modelos+em+19+Cores+-+Carpetes+Shaggy';
var metaKeywords  = 'puffs%2C+puff%2C+poufs%2C+bean+bags%2C+19+cores%2C+14+modelos%2C+decora%C3%A7%C3%A3o%2C+fern%C3%A3o+%2C+lideres%2C+encomenda%2C+qualidade%2C+tamanhos%2C+empenho%2C+decora%C3%A7%C3%A3o%2C+utilidades%2C+eventos%2C+rapida%2C+resposta%2C+colec%C3%A7%C3%A3o%2C+sesimbra%2C+clientes%2C';
var metaContents  = 'puffs%2C+puff%2C+poufs%2C+bean+bags%2C+14+modelos+tamanhos%2C+19+cores%2C+tapetes+carpetes+shaggy%2C+pre%C3%A7o+revenda%2C+envio+a+cobran%C3%A7a%2C+fornecimento+eventos%2C+produ%C3%A7oes%2C+portofolio%2C+empresa+moderna%2C+rapida+resposta%2C+qualidade%2C+garantia%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 */					                                                            
