/* [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','4598',jdecode('Home'),jdecode(''),'/4598.html','true',[],''],
	['PAGE','5201',jdecode('Quem+Somos...'),jdecode(''),'/5201.html','true',[],''],
	['PAGE','5222',jdecode('Infos+%26+Doc...'),jdecode(''),'/5222.html','true',[],''],
	['PAGE','5243',jdecode('Actividades%2FEventos'),jdecode(''),'/5243.html','true',[],''],
	['PAGE','5264',jdecode('Parceiros'),jdecode(''),'/5264.html','true',[],''],
	['PAGE','5285',jdecode('Galeria'),jdecode(''),'/5285.html','true',[],''],
	['PAGE','5306',jdecode('%C3%9Ateis+%26+F%C3%BAteis'),jdecode(''),'/5306.html','true',[],'']];
var siteelementCount=7;
theSitetree.topTemplateName='Comedy';
theSitetree.paletteFamily='4871C0';
theSitetree.keyvisualId='2798';
theSitetree.keyvisualName='schnecke.jpg';
theSitetree.fontsetId='10601';
theSitetree.graphicsetId='10722';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='698BCB';
var theTemplate={
				name: 			'Comedy',
				paletteFamily: 	'4871C0',
				keyvisualId: 	'2798',
				keyvisualName: 	'schnecke.jpg',
				fontsetId: 		'10601',
				graphicsetId: 	'10722',
				contentColor: 	'000000',
				contentBGColor: '698BCB',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'36599C',
				e_color: 		'36599C',
				f_color: 		'36599C',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4598',
internalId:  '',
customField: '20100822-171848'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '5201',
internalId:  '',
customField: '20090623-183152'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '5222',
internalId:  '',
customField: '20090623-201427'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '5306',
internalId:  '',
customField: '20100813-182511'
};
webappMappings['1008']={
webappId:    '1008',
documentId:  '5306',
internalId:  '10982773',
customField: 'pt:PT:'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '4598',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '5243',
internalId:  '',
customField: '20100504-185436'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '5264',
internalId:  '',
customField: '20090623-190657'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '5285',
internalId:  '',
customField: '20090713-204850'
};
var canonHostname = 'creator.amenworld.com';
var accountId     = 'AAM010INLDRI';
var companyName   = 'ONDAMAGNA+-+Escola+de+Surf';
var htmlTitle	  = 'OndaMagna+-+Escola+de+Surf';
var metaKeywords  = 'Surf%2C+Camps%2C+Campos+de+f%C3%A9rias%2C+Escola%2C+Baptismos%2C+Eventos%2C+Visitas+de+Estudo%2C+actividades%2C+mar%2C+praia%2C+onda%2C+alunos%2C+Bodyboard';
var metaContents  = 'Surf%2C+Camps%2C+Campos+de+f%C3%A9rias%2C+Escola%2C+Baptismos%2C+Eventos%2C+Visitas+de+Estudo%2C+actividades%2C+mar%2C+praia%2C+onda%2C+alunos%2C+Bodyboard';
					                                                                    
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 */					                                                            
