/* [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','4436',jdecode('Home'),jdecode(''),'/4436.html','true',[],''],
	['PAGE','16280',jdecode('Our+Vision'),jdecode(''),'/16280.html','true',[],''],
	['PAGE','16253',jdecode('Sunday+Services'),jdecode(''),'/16253.html','true',[],''],
	['PAGE','17994',jdecode('Weekly+Events'),jdecode(''),'/17994/index.html','true',[ 
		['PAGE','33533',jdecode('Corner+Stop'),jdecode(''),'/17994/33533.html','true',[],''],
		['PAGE','33202',jdecode('Toddlers'),jdecode(''),'/17994/33202.html','true',[],''],
		['PAGE','33502',jdecode('Home+Groups'),jdecode(''),'/17994/33502.html','true',[],''],
		['PAGE','39639',jdecode('Wednesday+Club'),jdecode(''),'/17994/39639.html','true',[],'']
	],''],
	['PAGE','129470',jdecode('BCBC+News'),jdecode(''),'/129470.html','true',[],''],
	['PAGE','107870',jdecode('Our+DVD%26%23x27%3Bs'),jdecode(''),'/107870.html','true',[],''],
	['PAGE','106570',jdecode('Football'),jdecode(''),'/106570.html','true',[],''],
	['PAGE','106770',jdecode('Needle+Crafts'),jdecode(''),'/106770.html','true',[],''],
	['PAGE','17963',jdecode('Where+We+Are'),jdecode(''),'/17963/index.html','true',[ 
		['PAGE','16334',jdecode('Public+Transport+Access'),jdecode(''),'/17963/16334.html','true',[],'']
	],''],
	['PAGE','18025',jdecode('What+We+Believe'),jdecode(''),'/18025.html','true',[],''],
	['PAGE','17901',jdecode('What+Is+A+Christian%3F'),jdecode(''),'/17901.html','true',[],''],
	['PAGE','17932',jdecode('What+Is+A+Baptist%3F'),jdecode(''),'/17932.html','true',[],''],
	['PAGE','18733',jdecode('Links'),jdecode(''),'/18733/index.html','true',[ 
		['PAGE','18701',jdecode('Christian+Links'),jdecode(''),'/18733/18701.html','true',[],''],
		['PAGE','18764',jdecode('Secular+Links'),jdecode(''),'/18733/18764.html','true',[],'']
	],''],
	['PAGE','18057',jdecode('Contact+Us'),jdecode(''),'/18057/index.html','true',[ 
		['PAGE','18502',jdecode('Contact+Us+%28follow+up+page%29'),jdecode(''),'/18057/18502.html','false',[],'']
	],''],
	['PAGE','107792',jdecode('DVD+Request'),jdecode(''),'/107792/index.html','true',[ 
		['PAGE','107852',jdecode('DVD+Request+%28follow+up+page%29'),jdecode(''),'/107792/107852.html','false',[],'']
	],'']];
var siteelementCount=24;
theSitetree.topTemplateName='echo';
					                                                                    
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 */					                                                            
