/* [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','4584',jdecode('Home'),jdecode(''),'/4584/index.html','true',[ 
		['PAGE','4749',jdecode('News.'),jdecode(''),'/4584/4749.html','true',[],''],
		['PAGE','5208',jdecode('Contact+details'),jdecode(''),'/4584/5208.html','true',[],''],
		['PAGE','25465',jdecode('Contact+details+%28follow+up+page%29'),jdecode(''),'/4584/25465.html','false',[],''],
		['PAGE','5262',jdecode('How+to+find+us'),jdecode(''),'/4584/5262.html','true',[],'']
	],''],
	['PAGE','44474',jdecode('PIpeline+Contracting'),jdecode(''),'/44474/index.html','true',[ 
		['PAGE','4803',jdecode('Unerground+mains'),jdecode(''),'/44474/4803.html','true',[],''],
		['PAGE','17964',jdecode('Leak+Detection'),jdecode(''),'/44474/17964.html','true',[],''],
		['PAGE','5100',jdecode('Process+pipework'),jdecode(''),'/44474/5100.html','true',[],''],
		['PAGE','4776',jdecode('Secondary+Containment'),jdecode(''),'/44474/4776.html','true',[],''],
		['PAGE','134274',jdecode('Projects'),jdecode(''),'/44474/134274.html','true',[],'']
	],''],
	['PAGE','20919',jdecode('Plastic+Fabrications'),jdecode(''),'/20919/index.html','true',[ 
		['PAGE','20784',jdecode('Tanks+and+Vessels'),jdecode(''),'/20919/20784.html','true',[],''],
		['PAGE','28890',jdecode('Bespoke+fabrications'),jdecode(''),'/20919/28890.html','true',[],''],
		['PAGE','4830',jdecode('GRP+Walkways+%26+Structures'),jdecode(''),'/20919/4830.html','true',[],'']
	],''],
	['PAGE','4695',jdecode('Pipeline+Supplies'),jdecode(''),'/4695/index.html','true',[ 
		['PAGE','20676',jdecode('PTFE+lined+pipe'),jdecode(''),'/4695/20676.html','true',[],''],
		['PAGE','20703',jdecode('Polyethylene+pipework'),jdecode(''),'/4695/20703.html','true',[],''],
		['PAGE','20730',jdecode('Thermoplastic+pipework'),jdecode(''),'/4695/20730.html','true',[],''],
		['PAGE','4884',jdecode('Semi+Finished+Products'),jdecode(''),'/4695/4884.html','true',[],''],
		['PAGE','20946',jdecode('Pulled+bends'),jdecode(''),'/4695/20946.html','true',[],'']
	],''],
	['PAGE','20757',jdecode('CNC+Machining'),jdecode(''),'/20757.html','true',[],''],
	['PAGE','42930',jdecode('Downloads'),jdecode(''),'/42930.html','true',[],'']];
var siteelementCount=23;
theSitetree.topTemplateName='Pixelprofi';
					                                                                    
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 */					                                                            
