/* [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','4598',jdecode('Home'),jdecode(''),'/4598.html','true',[],''],
	['PAGE','36762',jdecode('Website+guide'),jdecode(''),'/36762.html','true',[],''],
	['PAGE','4655',jdecode('About+us'),jdecode(''),'/4655.html','true',[],''],
	['PAGE','35219',jdecode('Membership'),jdecode(''),'/35219.html','true',[],''],
	['PAGE','44968',jdecode('Publications'),jdecode(''),'/44968.html','true',[],''],
	['PAGE','38062',jdecode('CDs+available'),jdecode(''),'/38062.html','true',[],''],
	['PAGE','39562',jdecode('Parish+Register+Updates'),jdecode(''),'/39562.html','true',[],''],
	['PAGE','53016',jdecode('The+Spring+Drop+Ins'),jdecode(''),'/53016.html','true',[],''],
	['PAGE','4736',jdecode('Indexes'),jdecode(''),'/4736.html','true',[],''],
	['PAGE','40262',jdecode('Our+Diary'),jdecode(''),'/40262.html','true',[],''],
	['PAGE','4763',jdecode('The+Link-up+Journal'),jdecode(''),'/4763.html','true',[],''],
	['PAGE','43862',jdecode('News+News+%26+more+News'),jdecode(''),'/43862.html','true',[],''],
	['PAGE','46662',jdecode('Could+it+be%3F'),jdecode(''),'/46662.html','true',[],''],
	['PAGE','35762',jdecode('Searchers'),jdecode(''),'/35762.html','true',[],''],
	['PAGE','54019',jdecode('Collections'),jdecode(''),'/54019.html','true',[],''],
	['PAGE','15644',jdecode('Databases+and+Records'),jdecode(''),'/15644.html','true',[],''],
	['PAGE','12244',jdecode('WWII+Portsmouth'),jdecode(''),'/12244.html','true',[],''],
	['PAGE','7862',jdecode('The+Exploration+Game'),jdecode(''),'/7862.html','true',[],''],
	['PAGE','35365',jdecode('Record+Offices'),jdecode(''),'/35365.html','true',[],''],
	['PAGE','34842',jdecode('Useful+Websites'),jdecode(''),'/34842.html','true',[],''],
	['PAGE','40662',jdecode('Local+Exhibitions'),jdecode(''),'/40662.html','true',[],''],
	['PAGE','53338',jdecode('New+at+the+TNA'),jdecode(''),'/53338.html','true',[],''],
	['PAGE','48925',jdecode('Record+Holdings'),jdecode(''),'/48925.html','true',[],''],
	['PAGE','60228',jdecode('ASWE+Apprentices+Roll'),jdecode(''),'/60228.html','true',[],''],
	['PAGE','60316',jdecode('Photograph+Copying'),jdecode(''),'/60316.html','true',[],'']];
var siteelementCount=25;
theSitetree.topTemplateName='Round';
					                                                                    
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 */					                                                            
