/* [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.html','true',[],''],
	['PAGE','18328',jdecode('About+Us'),jdecode(''),'/18328/index.html','true',[ 
		['PAGE','20203',jdecode('Our+Staff'),jdecode(''),'/18328/20203.html','true',[],''],
		['PAGE','18409',jdecode('Partnership+Workings'),jdecode(''),'/18328/18409.html','true',[],'']
	],''],
	['PAGE','24901',jdecode('Organised+Events'),jdecode(''),'/24901.html','true',[],''],
	['PAGE','18490',jdecode('News'),jdecode(''),'/18490.html','true',[],''],
	['PAGE','18517',jdecode('Join'),jdecode(''),'/18517.html','true',[],''],
	['PAGE','45294',jdecode('New+Friday+Leagues'),jdecode(''),'/45294.html','true',[],''],
	['PAGE','18544',jdecode('League+Tables'),jdecode(''),'/18544/index.html','true',[ 
		['PAGE','20901',jdecode('Friday+Night'),jdecode(''),'/18544/20901.html','true',[],''],
		['PAGE','97276',jdecode('Sandhill+Centre'),jdecode(''),'/18544/97276.html','true',[],''],
		['PAGE','20801',jdecode('Premier'),jdecode(''),'/18544/20801.html','true',[],''],
		['PAGE','20863',jdecode('Independance'),jdecode(''),'/18544/20863.html','true',[],''],
		['PAGE','22010',jdecode('Riverside'),jdecode(''),'/18544/22010.html','true',[],'']
	],''],
	['PAGE','147637',jdecode('Nissan+League+2010'),jdecode(''),'/147637.html','true',[],''],
	['PAGE','28701',jdecode('Youth+Inclusion+'),jdecode(''),'/28701.html','true',[],''],
	['PAGE','22041',jdecode('Fixtures'),jdecode(''),'/22041/index.html','true',[ 
		['PAGE','22165',jdecode('Riverside+7-a-side'),jdecode(''),'/22041/22165.html','true',[],''],
		['PAGE','23307',jdecode('Nissan+Sunday+League'),jdecode(''),'/22041/23307.html','true',[],''],
		['PAGE','22201',jdecode('Friday+Night+5-a-side'),jdecode(''),'/22041/22201.html','true',[],''],
		['PAGE','48736',jdecode('Sandhill+Centre+6-a-side'),jdecode(''),'/22041/48736.html','true',[],'']
	],''],
	['PAGE','18571',jdecode('Interesting+links'),jdecode(''),'/18571.html','true',[],''],
	['PAGE','23613',jdecode('Funding'),jdecode(''),'/23613.html','true',[],''],
	['PAGE','45326',jdecode('Courses'),jdecode(''),'/45326.html','true',[],''],
	['PAGE','42794',jdecode('Kit+%26Trophie+Sales'),jdecode(''),'/42794.html','true',[],'']];
var siteelementCount=25;
theSitetree.topTemplateName='Time';
					                                                                    
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 */					                                                            
