/* [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','1151',jdecode('Home'),jdecode(''),'/index2.html','false',[],''],
	['PAGE','2960',jdecode('Legal'),jdecode(''),'/2960.html','false',[],''],
	['PAGE','2983',jdecode('Solicitors'),jdecode(''),'/2983.html','false',[],''],
	['PAGE','3006',jdecode('Social+Workers'),jdecode(''),'/3006.html','false',[],''],
	['PAGE','3029',jdecode('Advocates'),jdecode(''),'/3029.html','false',[],''],
	['PAGE','3052',jdecode('Care+Homes'),jdecode(''),'/3052.html','false',[],''],
	['PAGE','3075',jdecode('Residential'),jdecode(''),'/3075.html','false',[],''],
	['PAGE','3098',jdecode('Independent+Health+Care'),jdecode(''),'/3098.html','false',[],''],
	['PAGE','3121',jdecode('Contact+Us'),jdecode(''),'/3121.html','false',[],''],
	['PAGE','3144',jdecode('Links'),jdecode(''),'/3144.html','false',[],''],
	['PAGE','3420',jdecode('Web+Services'),jdecode(''),'/3420.html','false',[],''],
	['PAGE','3443',jdecode('Domain+Names'),jdecode(''),'/3443.html','false',[],''],
	['PAGE','3583',jdecode('Educational+Services'),jdecode(''),'/3583.html','false',[],''],
	['PAGE','9572',jdecode('About+Us'),jdecode(''),'/9572.html','true',[],''],
	['PAGE','9501',jdecode('Associates'),jdecode(''),'/9501.html','true',[],''],
	['PAGE','9192',jdecode('Training'),jdecode(''),'/9192.html','true',[],''],
	['PAGE','9223',jdecode('Independent+Social+Work'),jdecode(''),'/9223.html','true',[],''],
	['PAGE','9254',jdecode('Care+Services'),jdecode(''),'/9254.html','true',[],''],
	['PAGE','9541',jdecode('Links'),jdecode(''),'/9541.html','true',[],'']];
var siteelementCount=19;
theSitetree.topTemplateName='Movement';
					                                                                    
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 */					                                                            
