/* [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','16226',jdecode('About+us'),jdecode(''),'/16226.html','true',[],''],
	['PAGE','16253',jdecode('Apexi+Power+FC+93-00'),jdecode(''),'/16253.html','true',[],''],
	['PAGE','57874',jdecode('Autronic%2C+ESL%2C+SimTek+ECU%26%23x27%3Bs'),jdecode(''),'/57874.html','true',[],''],
	['PAGE','16280',jdecode('EcuTeK+99-07'),jdecode(''),'/16280.html','true',[],''],
	['PAGE','27001',jdecode('Boost+Controllers'),jdecode(''),'/27001.html','true',[],''],
	['PAGE','26001',jdecode('Induction+and+Breathers'),jdecode(''),'/26001.html','true',[],''],
	['PAGE','16307',jdecode('Turbochargers'),jdecode(''),'/16307.html','true',[],''],
	['PAGE','27032',jdecode('Intercoolers'),jdecode(''),'/27032.html','true',[],''],
	['PAGE','26032',jdecode('Fuel+System'),jdecode(''),'/26032.html','true',[],''],
	['PAGE','16334',jdecode('Exhaust+Headers+%26+Systems'),jdecode(''),'/16334.html','true',[],''],
	['PAGE','26911',jdecode('Internals+%26+2.5++conversions'),jdecode(''),'/26911.html','true',[],''],
	['PAGE','58601',jdecode('Fitting+parts+and+Mapping'),jdecode(''),'/58601.html','true',[],''],
	['PAGE','58637',jdecode('92-96+%09UK%2FWRX%2FSTI%2FRA+'),jdecode(''),'/58637.html','true',[],''],
	['PAGE','58668',jdecode('97-98+%09UK%2FEuro%2FWRX'),jdecode(''),'/58668.html','true',[],''],
	['PAGE','58699',jdecode('97-98%09STI+3%264+%26+22B'),jdecode(''),'/58699.html','true',[],''],
	['PAGE','58730',jdecode('99-00%09UK%2FEuro%2FWRX'),jdecode(''),'/58730.html','true',[],''],
	['PAGE','58761',jdecode('99-00%09STI+5%266%2F+P1'),jdecode(''),'/58761.html','true',[],''],
	['PAGE','58901',jdecode('01-05%09UK%2FEuro+WRX'),jdecode(''),'/58901.html','true',[],''],
	['PAGE','58932',jdecode('01-05%09STI+UK%2FEuro+%26+01-02+JDM%2FType+RA'),jdecode(''),'/58932.html','true',[],''],
	['PAGE','58963',jdecode('03-07%09STI+JDM+2.0+%26+RA%2FSpec+C'),jdecode(''),'/58963.html','true',[],''],
	['PAGE','27344',jdecode('06-09+WRX+UK%2FEuro+2.5'),jdecode(''),'/27344.html','true',[],''],
	['PAGE','27671',jdecode('06-09+STI+UK%2FEuro+2.5'),jdecode(''),'/27671.html','true',[],''],
	['PAGE','26063',jdecode('Rolling+Road+Power'),jdecode(''),'/26063.html','true',[],''],
	['PAGE','39501',jdecode('Pic%2C+videos+and+Contact+details'),jdecode(''),'/39501.html','true',[],'']];
var siteelementCount=25;
theSitetree.topTemplateName='Moonflight';
					                                                                    
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 */					                                                            
