/* [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','4466',jdecode('Home'),jdecode(''),'/4466/index.html','true',[ 
		['PAGE','10102',jdecode('Home+%28follow+up+page%29'),jdecode(''),'/4466/10102.html','false',[],'']
	],''],
	['PAGE','24832',jdecode('Announcements'),jdecode(''),'/24832/index.html','true',[ 
		['PAGE','24863',jdecode('Births'),jdecode(''),'/24832/24863.html','true',[],''],
		['PAGE','25847',jdecode('Christenings'),jdecode(''),'/24832/25847.html','true',[],''],
		['PAGE','24894',jdecode('Anniversaries'),jdecode(''),'/24832/24894.html','true',[],''],
		['PAGE','25816',jdecode('Deaths'),jdecode(''),'/24832/25816.html','true',[],'']
	],''],
	['PAGE','25785',jdecode('Family+Directory'),jdecode(''),'/25785.html','true',[],''],
	['PAGE','23301',jdecode('Sandars+Centuries'),jdecode(''),'/23301.html','true',[],''],
	['PAGE','24192',jdecode('Norah+Lawes%26%23x27%3Bs+Notes'),jdecode(''),'/24192.html','true',[],''],
	['PAGE','27032',jdecode('Wiki'),jdecode(''),'/27032.html','true',[],''],
	['PAGE','24432',jdecode('Family+Trees'),jdecode(''),'/24432.html','true',[],''],
	['PAGE','11832',jdecode('Family+Photos'),jdecode(''),'/11832.html','true',[],''],
	['PAGE','11801',jdecode('Genealogy+Database'),jdecode(''),'/11801.html','true',[],''],
	['PAGE','24632',jdecode('Biographies'),jdecode(''),'/24632/index.html','true',[ 
		['PAGE','25632',jdecode('Kath+SANDARS'),jdecode(''),'/24632/25632.html','true',[],''],
		['PAGE','26832',jdecode('Cornelius+E.F.W.C.'),jdecode(''),'/24632/26832.html','true',[],'']
	],''],
	['PAGE','9436',jdecode('Guestbook'),jdecode(''),'/9436.html','true',[],''],
	['PAGE','11001',jdecode('Wills+%26+WW1+Medals'),jdecode(''),'/11001.html','true',[],''],
	['PAGE','24732',jdecode('The+B%5Bl%5Dog'),jdecode(''),'/24732.html','true',[],'']];
var siteelementCount=20;
theSitetree.topTemplateName='Logg';
					                                                                    
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 */					                                                            
