/* [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','34697',jdecode('Wooden+Handles'),jdecode(''),'/34697.html','true',[],''],
	['PAGE','34666',jdecode('Wooden+Carvings'),jdecode(''),'/34666/index.html','true',[ 
		['PAGE','37177',jdecode('Door+Carvings'),jdecode(''),'/34666/37177.html','true',[],'']
	],''],
	['PAGE','34635',jdecode('Wooden+Trims%2FBeadings'),jdecode(''),'/34635.html','true',[],''],
	['PAGE','34604',jdecode('Wooden+Feet%2FLegs'),jdecode(''),'/34604.html','true',[],''],
	['PAGE','34511',jdecode('Escutcheons'),jdecode(''),'/34511.html','true',[],''],
	['PAGE','34387',jdecode('Escutcheons%2FHandles'),jdecode(''),'/34387/index.html','true',[ 
		['PAGE','38825',jdecode('Fancy'),jdecode(''),'/34387/38825.html','true',[],''],
		['PAGE','38856',jdecode('Rectangular'),jdecode(''),'/34387/38856.html','true',[],''],
		['PAGE','38887',jdecode('Round'),jdecode(''),'/34387/38887.html','true',[],'']
	],''],
	['PAGE','34356',jdecode('Handles'),jdecode(''),'/34356.html','true',[],''],
	['PAGE','34325',jdecode('Hooks'),jdecode(''),'/34325.html','true',[],''],
	['PAGE','34449',jdecode('Hinges'),jdecode(''),'/34449.html','true',[],''],
	['PAGE','34480',jdecode('Locks%2FBolts'),jdecode(''),'/34480.html','true',[],''],
	['PAGE','34294',jdecode('Castors'),jdecode(''),'/34294.html','true',[],''],
	['PAGE','34865',jdecode('Tiles'),jdecode(''),'/34865.html','true',[],''],
	['PAGE','34418',jdecode('Knockdown+Fittings'),jdecode(''),'/34418.html','true',[],''],
	['PAGE','34542',jdecode('Finishing+Products'),jdecode(''),'/34542.html','true',[],''],
	['PAGE','34573',jdecode('Key+Accessories'),jdecode(''),'/34573.html','true',[],''],
	['PAGE','34263',jdecode('Price+list%2FDelivery'),jdecode(''),'/34263.html','true',[],''],
	['PAGE','34201',jdecode('Contact+Details'),jdecode(''),'/34201.html','true',[],'']];
var siteelementCount=22;
theSitetree.topTemplateName='Round';
					                                                                    
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 */					                                                            
