/* [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','4597',jdecode('Home'),jdecode(''),'/4597.html','true',[],''],
	['PAGE','4654',jdecode('About+us'),jdecode(''),'/4654/index.html','true',[ 
		['PAGE','66859',jdecode('The+Team'),jdecode(''),'/4654/66859.html','true',[],'']
	],''],
	['PAGE','4708',jdecode('What+we+do'),jdecode(''),'/4708/index.html','true',[ 
		['PAGE','27925',jdecode('Feasibility+%26+Design'),jdecode(''),'/4708/27925.html','true',[],''],
		['PAGE','27801',jdecode('Bespoke+New-Build+Homes'),jdecode(''),'/4708/27801.html','true',[],''],
		['PAGE','27832',jdecode('Care+%26+Disability'),jdecode(''),'/4708/27832.html','true',[],''],
		['PAGE','27863',jdecode('Conservation+%26+Conversion'),jdecode(''),'/4708/27863.html','true',[],''],
		['PAGE','27894',jdecode('Extensions+%26+Transformations'),jdecode(''),'/4708/27894.html','true',[],''],
		['PAGE','65385',jdecode('Commercial+%26+Design+%26+Build'),jdecode(''),'/4708/65385.html','true',[],''],
		['PAGE','27987',jdecode('Timber+Frame'),jdecode(''),'/4708/27987.html','true',[],''],
		['PAGE','28018',jdecode('Technical+Services'),jdecode(''),'/4708/28018.html','true',[],''],
		['PAGE','28049',jdecode('Contract+Administration'),jdecode(''),'/4708/28049.html','true',[],'']
	],''],
	['PAGE','28828',jdecode('Projects'),jdecode(''),'/28828/index.html','true',[ 
		['PAGE','28633',jdecode('New+Houses+%26+Apartments'),jdecode(''),'/28828/28633.html','true',[],''],
		['PAGE','28863',jdecode('Care+%26+Disability'),jdecode(''),'/28828/28863.html','true',[],''],
		['PAGE','62653',jdecode('Conservation+%26+Conversion'),jdecode(''),'/28828/62653.html','true',[],''],
		['PAGE','28668',jdecode('Design+%26+Build'),jdecode(''),'/28828/28668.html','true',[],''],
		['PAGE','62688',jdecode('Timber+Frame'),jdecode(''),'/28828/62688.html','true',[],''],
		['PAGE','63540',jdecode('Transform+%26+Extend+1'),jdecode(''),'/28828/63540.html','true',[],''],
		['PAGE','65872',jdecode('Transform+%26+Extend+2'),jdecode(''),'/28828/65872.html','true',[],''],
		['PAGE','63496',jdecode('Extensions'),jdecode(''),'/28828/63496.html','true',[],'']
	],''],
	['PAGE','4816',jdecode('Contact'),jdecode(''),'/4816/index.html','true',[ 
		['PAGE','67460',jdecode('Contact+%28follow+up+page%29'),jdecode(''),'/4816/67460.html','false',[],''],
		['PAGE','67360',jdecode('How+to+find+us'),jdecode(''),'/4816/67360.html','true',[],''],
		['PAGE','67395',jdecode('Direction'),jdecode(''),'/4816/67395.html','true',[],'']
	],'']];
var siteelementCount=26;
theSitetree.topTemplateName='Inspiration';
					                                                                    
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 */					                                                            

