/* [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','4436',jdecode('Home'),jdecode(''),'/4436.html','true',[],''],
	['PAGE','6955',jdecode('Track+News'),jdecode(''),'/6955.html','true',[],''],
	['PAGE','6901',jdecode('Race%2FPractice+Info'),jdecode(''),'/6901.html','true',[],''],
	['PAGE','13503',jdecode('Event+Dates'),jdecode(''),'/13503.html','true',[],''],
	['PAGE','116604',jdecode('Directions%2FWeather'),jdecode(''),'/116604.html','true',[],''],
	['PAGE','230128',jdecode('Park+Rules'),jdecode(''),'/230128.html','true',[],''],
	['PAGE','6982',jdecode('Contact+Us'),jdecode(''),'/6982.html','true',[],''],
	['PAGE','13565',jdecode('Be+A+Member'),jdecode(''),'/13565.html','true',[],''],
	['PAGE','13596',jdecode('Get+Race+Ready'),jdecode(''),'/13596.html','true',[],''],
	['PAGE','435836',jdecode('2009+Go+NBL'),jdecode(''),'/435836.html','true',[],''],
	['PAGE','233373',jdecode('+Track+pics'),jdecode(''),'/233373.html','true',[],''],
	['PAGE','818975',jdecode('NBL+2009+RACES'),jdecode(''),'/818975.html','true',[],''],
	['PAGE','331909',jdecode('Battle+of+the+Badges+Race'),jdecode(''),'/331909.html','true',[],''],
	['PAGE','108107',jdecode('Photo+Album+2'),jdecode(''),'/108107.html','true',[],''],
	['PAGE','108410',jdecode('Photo+Album+3'),jdecode(''),'/108410.html','true',[],''],
	['PAGE','108601',jdecode('Photo+Album+4'),jdecode(''),'/108601.html','true',[],''],
	['PAGE','148101',jdecode('Photo+Album+5'),jdecode(''),'/148101.html','true',[],''],
	['PAGE','328709',jdecode('BMX+TRACKS+'),jdecode(''),'/328709.html','true',[],''],
	['PAGE','7009',jdecode('Links'),jdecode(''),'/7009.html','true',[],''],
	['PAGE','225912',jdecode('Guestbook'),jdecode(''),'/225912/index.html','true',[ 
		['PAGE','225913',jdecode('Read+Guestbook'),jdecode(''),'/225912/225913.html','true',[],'']
	],''],
	['PAGE','843456',jdecode('NBL+2010+State+Championship'),jdecode(''),'/843456.html','true',[],''],
	['PAGE','844456',jdecode('4%2F25%2F2009+NBL+Western+Regional'),jdecode(''),'/844456.html','true',[],''],
	['PAGE','1029378',jdecode('Roadrunner+National+2010'),jdecode(''),'/1029378.html','true',[],'']];
var siteelementCount=24;
theSitetree.topTemplateName='Steel';
					                                                                    
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 */					                                                            
