/* [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','1111',jdecode('Home'),jdecode(''),'/1111.html','true',[],''],
	['PAGE','1164',jdecode('Auction+Sales'),jdecode(''),'/1164/index.html','true',[ 
		['PAGE','21481',jdecode('Next+Sale+Catalogue'),jdecode(''),'/1164/21481.html','true',[],''],
		['PAGE','21508',jdecode('Unsold+Vehicles+'),jdecode(''),'/1164/21508.html','true',[],''],
		['PAGE','115358',jdecode('Finance+Repossessions'),jdecode(''),'/1164/115358.html','true',[],'']
	],''],
	['PAGE','1233',jdecode('Buying+%26+Selling+'),jdecode(''),'/1233/index.html','true',[ 
		['PAGE','1210',jdecode('What+is+a+Car+Auction%3F'),jdecode(''),'/1233/1210.html','true',[],''],
		['PAGE','1256',jdecode('Hints+for+Buyers'),jdecode(''),'/1233/1256.html','true',[],''],
		['PAGE','1279',jdecode('Hints+for+Sellers'),jdecode(''),'/1233/1279.html','true',[],''],
		['PAGE','1302',jdecode('FAQ'),jdecode(''),'/1233/1302.html','true',[],''],
		['PAGE','1325',jdecode('Terms+%26+Conditions'),jdecode(''),'/1233/1325.html','true',[],'']
	],''],
	['PAGE','1463',jdecode('About+us'),jdecode(''),'/1463/index.html','true',[ 
		['PAGE','1486',jdecode('The+auction+team'),jdecode(''),'/1463/1486.html','true',[],''],
		['PAGE','1532',jdecode('How+to+find+us'),jdecode(''),'/1463/1532.html','true',[],'']
	],''],
	['PAGE','31447',jdecode('Classic+Car+Auctions'),jdecode(''),'/31447/index.html','true',[ 
		['PAGE','160217',jdecode('October+Catalogue'),jdecode(''),'/31447/160217.html','true',[],''],
		['PAGE','146459',jdecode('Sale+Results+July'),jdecode(''),'/31447/146459.html','true',[],''],
		['PAGE','130910',jdecode('Sale+Results+April'),jdecode(''),'/31447/130910.html','true',[],''],
		['PAGE','35445',jdecode('Sale+Results+January'),jdecode(''),'/31447/35445.html','true',[],'']
	],''],
	['PAGE','108199',jdecode('Top+Gear+'),jdecode(''),'/108199.html','true',[],''],
	['PAGE','31516',jdecode('Restaurant'),jdecode(''),'/31516.html','true',[],''],
	['PAGE','22554',jdecode('Contact'),jdecode(''),'/22554.html','true',[],''],
	['PAGE','99373',jdecode('Useful+Links'),jdecode(''),'/99373.html','true',[],''],
	['PAGE','145259',jdecode('Vacancies'),jdecode(''),'/145259.html','true',[],'']];
var siteelementCount=24;
theSitetree.topTemplateName='NewYork';
					                                                                    
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 */					                                                            
