/* [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','301',jdecode('Home'),jdecode(''),'/301.html','true',[],''],
	['PAGE','4511',jdecode('A+DIREC%C3%87%C3%83O'),jdecode(''),'/4511.html','true',[],''],
	['PAGE','4301',jdecode('SARE'),jdecode(''),'/4301.html','true',[],''],
	['PAGE','8164',jdecode('PROFESSORES'),jdecode(''),'/8164.html','true',[],''],
	['PAGE','17201',jdecode('HORARIO+LCP'),jdecode(''),'/17201.html','true',[],''],
	['PAGE','4322',jdecode('DIREC%C3%87%C3%83O+DAS+ESCOLAS'),jdecode(''),'/4322.html','true',[],''],
	['PAGE','84812',jdecode('REGULAMENTOS'),jdecode(''),'/84812.html','true',[],''],
	['PAGE','8185',jdecode('INSCRI%C3%87%C3%83O+LCP'),jdecode(''),'/8185.html','true',[],''],
	['PAGE','8143',jdecode('ESTATUTOS'),jdecode(''),'/8143.html','true',[],''],
	['PAGE','8101',jdecode('EVENTOS'),jdecode(''),'/8101.html','true',[],''],
	['PAGE','65701',jdecode('+FOTOS+DAS+ESCOLAS'),jdecode(''),'/65701.html','true',[],''],
	['PAGE','4364',jdecode('JORNAL+INFORMATIVO'),jdecode(''),'/4364.html','true',[],''],
	['PAGE','8122',jdecode('HISTORIAL'),jdecode(''),'/8122.html','true',[],''],
	['PAGE','4385',jdecode('FUNDA%C3%87%C3%83O'),jdecode(''),'/4385.html','true',[],''],
	['PAGE','4574',jdecode('DICION%C3%81RIO'),jdecode(''),'/4574.html','true',[],''],
	['PAGE','54101',jdecode('ASSOCIA%C3%87%C3%95ES+PORTUGUESAS'),jdecode(''),'/54101.html','true',[],''],
	['PAGE','4595',jdecode('IMPRENSSA'),jdecode(''),'/4595.html','true',[],''],
	['PAGE','8501',jdecode('CRIADOR+DO+SITE'),jdecode(''),'/8501.html','true',[],'']];
var siteelementCount=18;
theSitetree.topTemplateName='Bigcity_NYC';
theSitetree.paletteFamily='7C0B0B';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='17892';
theSitetree.graphicsetId='13164';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='7C0B0B';
var theTemplate={
				name: 			'Bigcity_NYC',
				paletteFamily: 	'7C0B0B',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'17892',
				graphicsetId: 	'13164',
				contentColor: 	'FFFFFF',
				contentBGColor: '7C0B0B',
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5000']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20100530-164706'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '8185',
internalId:  '',
customField: '20071229-171039'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '8501',
internalId:  '',
customField: '20071208-005418'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '8101',
internalId:  '',
customField: '20080420-123830'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '8122',
internalId:  '',
customField: '20071210-160939'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4301',
internalId:  '',
customField: '20091012-165555'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4322',
internalId:  '',
customField: '20071218-210516'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '65701',
internalId:  '',
customField: '20071225-212457'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4364',
internalId:  '',
customField: '20080523-193412'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4385',
internalId:  '',
customField: '20071205-083032'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '8143',
internalId:  '',
customField: '20080430-115244'
};
webappMappings['1007']={
webappId:    '1007',
documentId:  '65701',
internalId:  '11712dd50b5',
customField: 'g.12s9btseo.4oi5nphld2d.0'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '17201',
internalId:  '',
customField: '20091026-131821'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '84812',
internalId:  '',
customField: '20080502-183619'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4511',
internalId:  '',
customField: '20080201-092057'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '8164',
internalId:  '',
customField: '20081218-185842'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '54101',
internalId:  '',
customField: '20071221-152501'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4574',
internalId:  '',
customField: '20080107-111648'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4595',
internalId:  '',
customField: '20071208-005839'
};
var canonHostname = 'creator.amenworld.com';
var accountId     = 'AAM010INLOUW';
var companyName   = 'C.P.+DE+STUTTGART';
var htmlTitle	  = 'C.P.STG';
var metaKeywords  = 'cp-stuttgart';
var metaContents  = 'Comiss%C3%A3o+de+pais+de+stuttgart';
					                                                                    
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 */					                                                            
