/* [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','1509',jdecode('Home'),jdecode(''),'/1509.html','true',[],''],
	['PAGE','47863',jdecode('Kids%26Us+1+-+8+anys'),jdecode(''),'/47863.html','true',[],''],
	['PAGE','47890',jdecode('Infantil+8+-+12+anys'),jdecode(''),'/47890.html','true',[],''],
	['PAGE','47917',jdecode('Juvenil+13+-19+anys'),jdecode(''),'/47917.html','true',[],''],
	['PAGE','47971',jdecode('Adults'),jdecode(''),'/47971.html','true',[],''],
	['PAGE','47944',jdecode('Casal+estiu'),jdecode(''),'/47944.html','true',[],''],
	['PAGE','47998',jdecode('Horaris+%2F+preus'),jdecode(''),'/47998.html','true',[],'']];
var siteelementCount=7;
theSitetree.topTemplateName='Madison';
theSitetree.paletteFamily='9E81E2';
theSitetree.keyvisualId='3454';
theSitetree.keyvisualName='kv_3454.jpg';
theSitetree.fontsetId='10434';
theSitetree.graphicsetId='10779';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Madison',
				paletteFamily: 	'9E81E2',
				keyvisualId: 	'3454',
				keyvisualName: 	'kv_3454.jpg',
				fontsetId: 		'10434',
				graphicsetId: 	'10779',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'9e81e2',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'9E81E2',
				e_color: 		'ACABAB',
				f_color: 		'626161',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1006']={
webappId:    '1006',
documentId:  '1509',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '1509',
internalId:  '',
customField: '20091105-155239'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '47863',
internalId:  '',
customField: '20091105-154630'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '47890',
internalId:  '',
customField: '20091105-154847'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '47917',
internalId:  '',
customField: '20091105-155051'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '47971',
internalId:  '',
customField: '20091105-155153'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '47944',
internalId:  '',
customField: '20091020-181929'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '47998',
internalId:  '',
customField: '20091106-121125'
};
var canonHostname = 'creator.amenworld.com';
var accountId     = 'AAM010INV30X';
var companyName   = 'ANOIA++Lingua+-+Acad%C3%A8mia+d%27+idiomes+';
var htmlTitle	  = 'Anoia+Lingua+-+Acad%C3%A8mia+d+idiomes';
var metaKeywords  = 'Anoia+Lingua%2C+angles%2C+Idiomes%2C+Igualada%2C+Angl%EF%BF%BDs%2C+Ingl%EF%BF%BDs%2C+Cursos+estiu%2C+Formaci%EF%BF%BD%2C+Alemany%2C+alem%EF%BF%BD%2C+estudiar%2C++franc%EF%BF%BDs%2C+espa%EF%BF%BDol%2C+catal%EF%BF%BD%2C+oficial%2C+kids++Us%2C+cursos%2C+alemany%2C+acad%EF%BF%BDmies%2C+escoles%2C+escola%2C+centres%2C+nens%2C+estiu';
var metaContents  = 'Acad%EF%BF%BDmia+d+idiomes+al+centre+dIgualada.+Angl%EF%BF%BDs%2C+franc%EF%BF%BDs%2C+alemany%2C+xin%EF%BF%BDs.+Cursos+extensius+i+intensius+destiu.';
					                                                                    
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 */					                                                            
