/* [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','4597',jdecode('Home'),jdecode(''),'/4597.html','true',[],''],
	['PAGE','6002',jdecode('News'),jdecode(''),'/6002/index.html','true',[ 
		['PAGE','13802',jdecode('2004+Sunday+Rides'),jdecode(''),'/6002/13802.html','true',[],''],
		['PAGE','12602',jdecode('Rest+of+2003'),jdecode(''),'/6002/12602.html','true',[],''],
		['PAGE','11002',jdecode('Weekend+Trips'),jdecode(''),'/6002/11002.html','true',[],''],
		['PAGE','10611',jdecode('2003+May+%2F+June'),jdecode(''),'/6002/10611.html','true',[],''],
		['PAGE','9213',jdecode('2003+March+%2F+April'),jdecode(''),'/6002/9213.html','true',[],'']
	],''],
	['PAGE','7402',jdecode('Snow'),jdecode(''),'/7402/index.html','true',[ 
		['PAGE','4762',jdecode('Skiing'),jdecode(''),'/7402/4762.html','true',[],''],
		['PAGE','7720',jdecode('Snowboarding.'),jdecode(''),'/7402/7720.html','true',[],''],
		['PAGE','6298',jdecode('Scottish+Ski+Areas'),jdecode(''),'/7402/6298.html','true',[],''],
		['PAGE','6325',jdecode('European+Ski+Areas'),jdecode(''),'/7402/6325.html','true',[],'']
	],''],
	['PAGE','4708',jdecode('Cycle'),jdecode(''),'/4708/index.html','true',[ 
		['PAGE','4789',jdecode('Bike+Rides'),jdecode(''),'/4708/4789.html','true',[],''],
		['PAGE','4735',jdecode('Mountain+Biking'),jdecode(''),'/4708/4735.html','true',[],''],
		['PAGE','6244',jdecode('Mountain+Bike+Routes'),jdecode(''),'/4708/6244.html','true',[],''],
		['PAGE','6271',jdecode('Other+Cycle+Routes'),jdecode(''),'/4708/6271.html','true',[],'']
	],''],
	['PAGE','8130',jdecode('Music'),jdecode(''),'/8130.html','true',[],''],
	['PAGE','6816',jdecode('Tools'),jdecode(''),'/6816/index.html','true',[ 
		['PAGE','6843',jdecode('Bicycle+Tools'),jdecode(''),'/6816/6843.html','true',[],'']
	],''],
	['PAGE','5013',jdecode('Guestbook'),jdecode(''),'/5013/index.html','true',[ 
		['PAGE','5012',jdecode('Add+to+Guestbook'),jdecode(''),'/5013/5012.html','true',[],'']
	],''],
	['PAGE','4816',jdecode('Contact'),jdecode(''),'/4816.html','true',[],'']];
var siteelementCount=23;
theSitetree.topTemplateName='Activate';
					                                                                    
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 */					                                                            
