/* [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','401',jdecode('Welcome'),jdecode(''),'/401.html','true',[],''],
	['PAGE','62801',jdecode('Summer+Splurge+2010'),jdecode(''),'/62801.html','true',[],''],
	['PAGE','61001',jdecode('Community+Cleanup'),jdecode(''),'/61001.html','true',[],''],
	['PAGE','60101',jdecode('Summer+Activities'),jdecode(''),'/60101.html','true',[],''],
	['PAGE','57601',jdecode('Information+Day'),jdecode(''),'/57601.html','true',[],''],
	['PAGE','7601',jdecode('Where+to+find+us'),jdecode(''),'/7601.html','true',[],''],
	['PAGE','473',jdecode('Sam%26%23x27%3Bs+Place'),jdecode(''),'/473.html','true',[],''],
	['PAGE','22101',jdecode('Holiday+Playscheme'),jdecode(''),'/22101.html','true',[],''],
	['PAGE','515',jdecode('All+Saints+UK+Online'),jdecode(''),'/515.html','true',[],''],
	['PAGE','9201',jdecode('Training'),jdecode(''),'/9201/index.html','true',[ 
		['PAGE','42301',jdecode('CV+and+Computing'),jdecode(''),'/9201/42301.html','true',[],'']
	],''],
	['PAGE','50501',jdecode('Exercise+Class'),jdecode(''),'/50501.html','true',[],''],
	['PAGE','599',jdecode('Lunch+Club'),jdecode(''),'/599.html','true',[],''],
	['PAGE','620',jdecode('Pram+Club'),jdecode(''),'/620.html','true',[],''],
	['PAGE','662',jdecode('Have+A+Go+Sessions'),jdecode(''),'/662/index.html','true',[ 
		['PAGE','13401',jdecode('Timetable'),jdecode(''),'/662/13401.html','true',[],'']
	],''],
	['PAGE','536',jdecode('Walking+Group'),jdecode(''),'/536/index.html','true',[ 
		['PAGE','16122',jdecode('Walking+Group+Info'),jdecode(''),'/536/16122.html','true',[],''],
		['PAGE','28001',jdecode('Walk+Photos'),jdecode(''),'/536/28001.html','true',[],'']
	],''],
	['PAGE','58301',jdecode('New+Events'),jdecode(''),'/58301.html','true',[],''],
	['PAGE','17501',jdecode('Other+Groups+in+Area'),jdecode(''),'/17501/index.html','true',[ 
		['PAGE','17522',jdecode('SureStart'),jdecode(''),'/17501/17522.html','true',[],''],
		['PAGE','24201',jdecode('SureStart+Walking+Group'),jdecode(''),'/17501/24201.html','true',[],''],
		['PAGE','20901',jdecode('NKFC'),jdecode(''),'/17501/20901.html','true',[],''],
		['PAGE','20922',jdecode('Faith+in+the+Gateway'),jdecode(''),'/17501/20922.html','true',[],''],
		['PAGE','61022',jdecode('Medway+Renaissance'),jdecode(''),'/17501/61022.html','true',[],'']
	],''],
	['PAGE','51601',jdecode('Residents+Association'),jdecode(''),'/51601.html','true',[],''],
	['PAGE','52901',jdecode('Faiths+in+Action'),jdecode(''),'/52901.html','true',[],'']];
var siteelementCount=28;
theSitetree.topTemplateName='Surround';
theSitetree.paletteFamily='5944D9';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10514';
theSitetree.graphicsetId='11135';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='5764B2';
var theTemplate={
				name: 			'Surround',
				paletteFamily: 	'5944D9',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10514',
				graphicsetId: 	'11135',
				contentColor: 	'FFFFFF',
				contentBGColor: '5764B2',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'8386EC',
				e_color: 		'8386EC',
				f_color: 		'8386EC',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5000']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100805-004450'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '9201',
internalId:  '',
customField: '20100816-003928'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20100207-155924'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20100715-233710'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20100207-162808'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '61001',
internalId:  '',
customField: '20100805-004946'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '61022',
internalId:  '',
customField: '20100805-002851'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '599',
internalId:  '',
customField: '20090614-185344'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '620',
internalId:  '',
customField: '20090614-185515'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '662',
internalId:  '',
customField: '20090806-222849'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '7601',
internalId:  '',
customField: '20071220-001020'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '58301',
internalId:  '',
customField: '20100816-000805'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '60101',
internalId:  '',
customField: '20100805-001745'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '13401',
internalId:  '',
customField: '20100816-002635'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '24201',
internalId:  '',
customField: '20090327-133354'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '28001',
internalId:  '',
customField: '20090614-184225'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '16122',
internalId:  '',
customField: '20100207-162137'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '62801',
internalId:  '',
customField: '20100816-005040'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '57601',
internalId:  '',
customField: '20100522-194751'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '52901',
internalId:  '',
customField: '20100207-153216'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '17501',
internalId:  '',
customField: '20100805-002655'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '17522',
internalId:  '',
customField: '20090614-190337'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '42301',
internalId:  '',
customField: '20090625-113827'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '20901',
internalId:  '',
customField: '20090614-190936'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '20922',
internalId:  '',
customField: '20090614-191036'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '22101',
internalId:  '',
customField: '20100715-231820'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '51601',
internalId:  '',
customField: '20100816-003345'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '50501',
internalId:  '',
customField: '20100408-213819'
};
var canonHostname = 'creator.amenworld.com';
var accountId     = 'AAM010INLR36';
var companyName   = 'All+Saints+Community+Project';
var htmlTitle	  = 'All+Saints+Community+Project';
var metaKeywords  = '';
var metaContents  = '';
					                                                                    
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 */					                                                            
