/* [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','4599',jdecode('Home'),jdecode(''),'/4599.html','true',[],''],
	['PAGE','4710',jdecode('Instructors'),jdecode(''),'/4710/index.html','true',[ 
		['PAGE','4737',jdecode('Sensei+M.Shiomitsu'),jdecode(''),'/4710/4737.html','true',[],''],
		['PAGE','18603',jdecode('late+Sensei+T.Takamizawa'),jdecode(''),'/4710/18603.html','true',[],''],
		['PAGE','4764',jdecode('Sensei+Peter+Hill'),jdecode(''),'/4710/4764.html','true',[],''],
		['PAGE','4791',jdecode('Matthew+Soanes'),jdecode(''),'/4710/4791.html','true',[],''],
		['PAGE','38601',jdecode('Assistant+Instructors'),jdecode(''),'/4710/38601.html','true',[],''],
		['PAGE','44320',jdecode('Dojo+Captain'),jdecode(''),'/4710/44320.html','true',[],''],
		['PAGE','209182',jdecode('Roll+of+Honour'),jdecode(''),'/4710/209182.html','true',[],'']
	],''],
	['PAGE','16874',jdecode('Dojo+Information'),jdecode(''),'/16874/index.html','true',[ 
		['PAGE','164185',jdecode('Bideford+Dojo+%28Hombu%29'),jdecode(''),'/16874/164185.html','true',[],''],
		['PAGE','22630',jdecode('Barnstaple+Dojo'),jdecode(''),'/16874/22630.html','true',[],''],
		['PAGE','22657',jdecode('Torrington+Dojo'),jdecode(''),'/16874/22657.html','true',[],''],
		['PAGE','22684',jdecode('Crediton+Dojo'),jdecode(''),'/16874/22684.html','true',[],''],
		['PAGE','46109',jdecode('Okehampton+Dojo'),jdecode(''),'/16874/46109.html','true',[],''],
		['PAGE','217378',jdecode('Chulmleigh+Dojo'),jdecode(''),'/16874/217378.html','true',[],''],
		['PAGE','164131',jdecode('Monthly+Dan+Grade+Class'),jdecode(''),'/16874/164131.html','true',[],''],
		['PAGE','164613',jdecode('Private+Tuition'),jdecode(''),'/16874/164613.html','true',[],''],
		['PAGE','44605',jdecode('Fees'),jdecode(''),'/16874/44605.html','true',[],'']
	],''],
	['PAGE','215078',jdecode('Interested%3F'),jdecode(''),'/215078.html','true',[],''],
	['PAGE','4818',jdecode('Courses'),jdecode(''),'/4818/index.html','true',[ 
		['PAGE','23803',jdecode('Course+Reports'),jdecode(''),'/4818/23803.html','true',[],'']
	],''],
	['PAGE','210578',jdecode('Squad+Training'),jdecode(''),'/210578.html','true',[],''],
	['PAGE','35825',jdecode('News'),jdecode(''),'/35825.html','true',[],''],
	['PAGE','58737',jdecode('Photo+Gallery'),jdecode(''),'/58737/index.html','true',[ 
		['PAGE','59022',jdecode('Photo+Gallery+%28Page+2%29'),jdecode(''),'/58737/59022.html','true',[],''],
		['PAGE','59165',jdecode('Photo+Gallery+%28Page+3%29'),jdecode(''),'/58737/59165.html','true',[],''],
		['PAGE','59196',jdecode('Photo+Gallery+%28Page+4%29'),jdecode(''),'/58737/59196.html','true',[],'']
	],''],
	['PAGE','204150',jdecode('Japan+2009'),jdecode(''),'/204150/index.html','true',[ 
		['PAGE','214178',jdecode('Japan+2009+%28continued%29'),jdecode(''),'/204150/214178.html','true',[],''],
		['PAGE','214209',jdecode('Japan+2009+%28continued%29'),jdecode(''),'/204150/214209.html','true',[],''],
		['PAGE','214552',jdecode('Japan+2009+%28continued%29'),jdecode(''),'/204150/214552.html','true',[],''],
		['PAGE','214583',jdecode('Japan+2009+%28continued%29'),jdecode(''),'/204150/214583.html','true',[],'']
	],''],
	['PAGE','57305',jdecode('Links'),jdecode(''),'/57305.html','true',[],''],
	['PAGE','57737',jdecode('Downloads'),jdecode(''),'/57737.html','true',[],''],
	['PAGE','42901',jdecode('Dojo+Shop'),jdecode(''),'/42901.html','true',[],''],
	['PAGE','203854',jdecode('Contact+Details'),jdecode(''),'/203854.html','true',[],''],
	['PAGE','19502',jdecode('Guestbook'),jdecode(''),'/19502/index.html','true',[ 
		['PAGE','19503',jdecode('Read+Guestbook'),jdecode(''),'/19502/19503.html','true',[],'']
	],'']];
var siteelementCount=39;
theSitetree.topTemplateName='Alpha';
					                                                                    
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 */					                                                            
