/* [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','4599',jdecode('Home'),jdecode(''),'/4599.html','true',[],''],
	['PAGE','4656',jdecode('Os+Nossos+Servi%C3%A7os'),jdecode(''),'/4656/index.html','true',[ 
		['PAGE','4683',jdecode('P%C3%B3s-Escolares'),jdecode(''),'/4656/4683.html','true',[],''],
		['PAGE','4710',jdecode('Workshops'),jdecode(''),'/4656/4710.html','true',[],''],
		['PAGE','4737',jdecode('Pr%C3%A9-Escolares'),jdecode(''),'/4656/4737.html','true',[],''],
		['PAGE','4764',jdecode('Programas+de+F%C3%A9rias'),jdecode(''),'/4656/4764.html','true',[],''],
		['PAGE','4791',jdecode('Festas+de+Anivers%C3%A1rio'),jdecode(''),'/4656/4791.html','true',[],''],
		['PAGE','4818',jdecode('Eventos+Especiais'),jdecode(''),'/4656/4818.html','true',[],'']
	],''],
	['PAGE','4845',jdecode('Video'),jdecode(''),'/4845.html','true',[],''],
	['PAGE','12703',jdecode('O+Que+Dizem+Os+Pais'),jdecode(''),'/12703.html','true',[],''],
	['PAGE','14101',jdecode('Clientes'),jdecode(''),'/14101.html','true',[],''],
	['PAGE','4872',jdecode('Mad+Cientistas'),jdecode(''),'/4872.html','true',[],''],
	['PAGE','4899',jdecode('Contactos'),jdecode(''),'/4899.html','true',[],''],
	['PAGE','38001',jdecode('FOTOS'),jdecode(''),'/38001.html','true',[],'']];
var siteelementCount=14;
theSitetree.topTemplateName='Stylus';
theSitetree.paletteFamily='B0CBD6';
theSitetree.keyvisualId='2054';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='328';
theSitetree.graphicsetId='383';
theSitetree.contentColor='000066';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Stylus',
				paletteFamily: 	'B0CBD6',
				keyvisualId: 	'2054',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'328',
				graphicsetId: 	'383',
				contentColor: 	'000066',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'B0CBD6',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4599',
internalId:  '',
customField: '20090627-021919'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '14101',
internalId:  '',
customField: '20090925-164102'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4656',
internalId:  '',
customField: '20070320-041820'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4683',
internalId:  '',
customField: '20070320-033417'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4710',
internalId:  '',
customField: '20070616-031022'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4737',
internalId:  '',
customField: '20070616-022840'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4764',
internalId:  '',
customField: '20070616-024253'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4791',
internalId:  '',
customField: '20090627-021538'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4818',
internalId:  '',
customField: '20070616-025555'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4845',
internalId:  '',
customField: '20100101-184502'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '12703',
internalId:  '',
customField: '20090713-184832'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4872',
internalId:  '',
customField: '20070321-012010'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4899',
internalId:  '',
customField: '20070623-215426'
};
webappMappings['1007']={
webappId:    '1007',
documentId:  '38001',
internalId:  '12385658165',
customField: 'g.14e2m41ho.mleelud9ac.1s'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '4599',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']={
webappId:    '1501',
documentId:  '4599',
internalId:  '9403756',
customField: '1501'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '38001',
internalId:  '',
customField: '20090908-150457'
};
var canonHostname = 'creator.amenworld.com';
var accountId     = 'AAM010INVPDM';
var companyName   = 'Ensino+Experimental+de+Ci%C3%AAncias';
var htmlTitle	  = '';
var metaKeywords  = 'anima%C3%A7%C3%A3o+infantil%2C+festas+de+anivers%C3%A1rio%2C+ci%C3%AAncia%2C+ensino+experimental%2C+escolas%2C+atl%2Ccol%C3%A9gios%2C+festa+de+natal%2C+anima%C3%A7%C3%B5es+tem%C3%A1ticas%2C+empresas%2C+casamentos%2C+baptizados%2C+workshops%2C+feiras+de+ci%C3%AAncia%2C+campos+de+f%C3%A9rias%2C+autarquias%2C+anima%C3%A7%C3%B5es+de+centros+comerciais%2C+anima%C3%A7%C3%B5es+de+rua%2C+crian%C3%A7a%2C+enriquecimento+curricular';
var metaContents  = 'anima%C3%A7%C3%A3o+infantil%2C+festas+de+anivers%C3%A1rio%2C+ci%C3%AAncia%2C+ensino+experimental%2C+escolas%2C+atl%2Ccol%C3%A9gios%2C+festa+de+natal%2C+anima%C3%A7%C3%B5es+tem%C3%A1ticas%2C+empresas%2C+casamentos%2C+baptizados%2C+workshops%2C+feiras+de+ci%C3%AAncia%2C+campos+de+f%C3%A9rias%2C+autarquias%2C+anima%C3%A7%C3%B5es+de+centros+comerciais%2C+anima%C3%A7%C3%B5es+de+rua';
					                                                                    
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 */					                                                            
