/* [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','4556',jdecode('Home'),jdecode(''),'/4556.html','true',[],''],
	['PAGE','4613',jdecode('Training'),jdecode(''),'/4613/index.html','true',[ 
		['PAGE','20815',jdecode('Gradings'),jdecode(''),'/4613/20815.html','true',[],'']
	],''],
	['PAGE','4640',jdecode('Karate'),jdecode(''),'/4640.html','true',[],''],
	['PAGE','4667',jdecode('Kobudo'),jdecode(''),'/4667.html','true',[],''],
	['PAGE','4694',jdecode('History'),jdecode(''),'/4694.html','true',[],''],
	['PAGE','4721',jdecode('Club+Locations'),jdecode(''),'/4721/index.html','true',[ 
		['PAGE','7403',jdecode('Pitsea+Dojo'),jdecode(''),'/4721/7403.html','true',[],''],
		['PAGE','61567',jdecode('Pitsea+Sunday+Class'),jdecode(''),'/4721/61567.html','true',[],''],
		['PAGE','7703',jdecode('Basildon+Dojo'),jdecode(''),'/4721/7703.html','true',[],''],
		['PAGE','7730',jdecode('Stanford+Dojo+Copland+Rd'),jdecode(''),'/4721/7730.html','true',[],''],
		['PAGE','7757',jdecode('Stanford+Dojo+High+St'),jdecode(''),'/4721/7757.html','true',[],''],
		['PAGE','7784',jdecode('Horndon+on+the+Hill+Dojo'),jdecode(''),'/4721/7784.html','true',[],''],
		['PAGE','7811',jdecode('Corringham+Dojo+ETFC'),jdecode(''),'/4721/7811.html','true',[],'']
	],''],
	['PAGE','60471',jdecode('Junior+Achievers'),jdecode(''),'/60471.html','true',[],''],
	['PAGE','4748',jdecode('News+and+events'),jdecode(''),'/4748.html','true',[],''],
	['PAGE','49253',jdecode('Seminars'),jdecode(''),'/49253.html','true',[],''],
	['PAGE','20315',jdecode('Kessingland+2012'),jdecode(''),'/20315.html','true',[],''],
	['PAGE','31737',jdecode('Equipment+guide'),jdecode(''),'/31737.html','true',[],''],
	['PAGE','11403',jdecode('FAQ'),jdecode(''),'/11403.html','true',[],''],
	['PAGE','53553',jdecode('Charity+and+Fundraising'),jdecode(''),'/53553.html','true',[],''],
	['PAGE','12203',jdecode('Club+Mascots%21'),jdecode(''),'/12203.html','true',[],''],
	['PAGE','4775',jdecode('Links'),jdecode(''),'/4775.html','true',[],''],
	['PAGE','6402',jdecode('Guestbook'),jdecode(''),'/6402/index.html','true',[ 
		['PAGE','6403',jdecode('Read+Guestbook'),jdecode(''),'/6402/6403.html','true',[],'']
	],'']];
var siteelementCount=25;
theSitetree.topTemplateName='Raster';
					                                                                    
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 */					                                                            

