/* [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('Antique+Clocks'),jdecode(''),'/4436.html','true',[],''],
	['PAGE','11903',jdecode('Longcase++%A33-5K+'),jdecode(''),'/11903/index.html','true',[ 
		['PAGE','32722',jdecode('Langly'),jdecode(''),'/11903/32722.html','true',[],''],
		['PAGE','32832',jdecode('Baker'),jdecode(''),'/11903/32832.html','true',[],''],
		['PAGE','50443',jdecode('Nicholson'),jdecode(''),'/11903/50443.html','true',[],'']
	],''],
	['PAGE','41101',jdecode('Longcase+%A35-10K'),jdecode(''),'/41101/index.html','true',[ 
		['PAGE','34801',jdecode('Hargrave'),jdecode(''),'/41101/34801.html','true',[],''],
		['PAGE','33436',jdecode('Michell'),jdecode(''),'/41101/33436.html','true',[],''],
		['PAGE','32504',jdecode('Sainsbury'),jdecode(''),'/41101/32504.html','true',[],'']
	],''],
	['PAGE','41132',jdecode('Longcase+%A310-20K'),jdecode(''),'/41132/index.html','true',[ 
		['PAGE','12414',jdecode('Pepys'),jdecode(''),'/41132/12414.html','true',[],'']
	],''],
	['PAGE','46616',jdecode('Longcase+%3E+%A320K'),jdecode(''),'/46616/index.html','true',[ 
		['PAGE','45616',jdecode('Norton'),jdecode(''),'/46616/45616.html','true',[],''],
		['PAGE','51016',jdecode('Harmar'),jdecode(''),'/46616/51016.html','true',[],'']
	],''],
	['PAGE','11930',jdecode('Bracket+%26+Mantel+'),jdecode(''),'/11930/index.html','true',[ 
		['PAGE','42361',jdecode('Purvis+1'),jdecode(''),'/11930/42361.html','true',[],''],
		['PAGE','42392',jdecode('Purvis+2'),jdecode(''),'/11930/42392.html','true',[],''],
		['PAGE','45416',jdecode('Dent'),jdecode(''),'/11930/45416.html','true',[],'']
	],''],
	['PAGE','32691',jdecode('Wall+'),jdecode(''),'/32691/index.html','true',[ 
		['PAGE','43108',jdecode('Hornby'),jdecode(''),'/32691/43108.html','true',[],''],
		['PAGE','43139',jdecode('Vienna'),jdecode(''),'/32691/43139.html','true',[],''],
		['PAGE','43201',jdecode('Hughes'),jdecode(''),'/32691/43201.html','true',[],'']
	],''],
	['PAGE','11957',jdecode('Carriage'),jdecode(''),'/11957/index.html','true',[ 
		['PAGE','43541',jdecode('Howell'),jdecode(''),'/11957/43541.html','true',[],''],
		['PAGE','43510',jdecode('Rait'),jdecode(''),'/11957/43510.html','true',[],''],
		['PAGE','44510',jdecode('Leroy'),jdecode(''),'/11957/44510.html','true',[],''],
		['PAGE','48516',jdecode('Drocourt'),jdecode(''),'/11957/48516.html','true',[],'']
	],'']];
var siteelementCount=27;
theSitetree.topTemplateName='Galerie';
					                                                                    
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 */					                                                            
