/* [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','20626',jdecode('Scooters'),jdecode(''),'/20626/index.html','true',[ 
		['PAGE','35031',jdecode('Small+Scooters'),jdecode(''),'/20626/35031.html','true',[],''],
		['PAGE','35062',jdecode('Medium+Scooters'),jdecode(''),'/20626/35062.html','true',[],''],
		['PAGE','35093',jdecode('Large+Scooters'),jdecode(''),'/20626/35093.html','true',[],'']
	],''],
	['PAGE','20653',jdecode('Riser+Recliner+Chairs'),jdecode(''),'/20653.html','true',[],''],
	['PAGE','20707',jdecode('Adjustable+Beds'),jdecode(''),'/20707.html','true',[],''],
	['PAGE','20680',jdecode('Wheelchairs'),jdecode(''),'/20680/index.html','true',[ 
		['PAGE','39001',jdecode('Transit+chairs'),jdecode(''),'/20680/39001.html','true',[],''],
		['PAGE','39032',jdecode('Self-Propelled+chairs'),jdecode(''),'/20680/39032.html','true',[],'']
	],''],
	['PAGE','35701',jdecode('Power+Chairs'),jdecode(''),'/35701.html','true',[],''],
	['PAGE','48649',jdecode('Accessories'),jdecode(''),'/48649.html','true',[],''],
	['PAGE','34383',jdecode('Walking+Aids'),jdecode(''),'/34383.html','true',[],''],
	['PAGE','34414',jdecode('Stairlifts'),jdecode(''),'/34414/index.html','true',[ 
		['PAGE','40521',jdecode('Stairlifts+%28follow+up+page%29'),jdecode(''),'/34414/40521.html','false',[],'']
	],''],
	['PAGE','34445',jdecode('Bathroom+Aids'),jdecode(''),'/34445/index.html','true',[ 
		['PAGE','48101',jdecode('Toilet+Lifter'),jdecode(''),'/34445/48101.html','true',[],''],
		['PAGE','40601',jdecode('Bath+Lift'),jdecode(''),'/34445/40601.html','true',[],'']
	],''],
	['PAGE','34476',jdecode('Delivery+and+VAT'),jdecode(''),'/34476.html','true',[],''],
	['PAGE','20734',jdecode('Contact+Us'),jdecode(''),'/20734/index.html','true',[ 
		['PAGE','73517',jdecode('Contact+Us+%28follow+up+page%29'),jdecode(''),'/20734/73517.html','false',[],'']
	],''],
	['PAGE','45931',jdecode('Terms+and+Conditions'),jdecode(''),'/45931.html','true',[],''],
	['PAGE','46828',jdecode('Newsletter+%26+Links'),jdecode(''),'/46828.html','true',[],'']];
var siteelementCount=23;
theSitetree.topTemplateName='Speed';
					                                                                    
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 */					                                                            
