/* [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','4598',jdecode('Home'),jdecode(''),'/4598.html','true',[],''],
	['PAGE','8403',jdecode('Services'),jdecode(''),'/8403/index.html','true',[ 
		['PAGE','10603',jdecode('-+unique+selling+points'),jdecode(''),'/8403/10603.html','true',[],''],
		['PAGE','5230',jdecode('-+for+individuals'),jdecode(''),'/8403/5230.html','true',[],''],
		['PAGE','10630',jdecode('-+for+pairs'),jdecode(''),'/8403/10630.html','true',[],''],
		['PAGE','5257',jdecode('-+for+teams'),jdecode(''),'/8403/5257.html','true',[],''],
		['PAGE','5284',jdecode('-+for+organisations'),jdecode(''),'/8403/5284.html','true',[],'']
	],''],
	['PAGE','5203',jdecode('Specialisms'),jdecode(''),'/5203/index.html','true',[ 
		['PAGE','8903',jdecode('-+emotional+intelligence'),jdecode(''),'/5203/8903.html','true',[],''],
		['PAGE','8930',jdecode('-+career+change'),jdecode(''),'/5203/8930.html','true',[],''],
		['PAGE','8957',jdecode('-+performance+improvement'),jdecode(''),'/5203/8957.html','true',[],'']
	],''],
	['PAGE','7106',jdecode('Case+Studies'),jdecode(''),'/7106/index.html','true',[ 
		['PAGE','7160',jdecode('-+Individual+Performance'),jdecode(''),'/7106/7160.html','true',[],''],
		['PAGE','7187',jdecode('-+Team+Development'),jdecode(''),'/7106/7187.html','true',[],''],
		['PAGE','7214',jdecode('-+Organisational+Change'),jdecode(''),'/7106/7214.html','true',[],'']
	],''],
	['PAGE','9403',jdecode('Diagnostics'),jdecode(''),'/9403/index.html','true',[ 
		['PAGE','9747',jdecode('-+EQ+Self-test'),jdecode(''),'/9403/9747.html','true',[],'']
	],''],
	['PAGE','10657',jdecode('Articles'),jdecode(''),'/10657.html','true',[],''],
	['PAGE','7806',jdecode('Reference'),jdecode(''),'/7806.html','true',[],''],
	['PAGE','5311',jdecode('About+us'),jdecode(''),'/5311.html','true',[],''],
	['PAGE','5338',jdecode('Contact+Us'),jdecode(''),'/5338.html','true',[],'']];
var siteelementCount=21;
theSitetree.topTemplateName='Collage';
					                                                                    
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 */					                                                            

