/* [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('THE+FOUNDATION+HOME'),jdecode(''),'/4597.html','true',[],''],
	['PAGE','94809',jdecode('Fundraising'),jdecode(''),'/94809.html','true',[],''],
	['PAGE','90246',jdecode('MAKE+A+DONATION'),jdecode(''),'/90246.html','true',[],''],
	['PAGE','4654',jdecode('About+us'),jdecode(''),'/4654.html','true',[],''],
	['PAGE','5056',jdecode('Are+you+an+interpreter%3F'),jdecode(''),'/5056/index.html','true',[ 
		['PAGE','5083',jdecode('Interpreters+Code+of+Conduct'),jdecode(''),'/5056/5083.html','true',[],'']
	],''],
	['PAGE','5802',jdecode('Are+you+a+translator%3F'),jdecode(''),'/5802.html','true',[],''],
	['PAGE','7829',jdecode('Other+organisations'),jdecode(''),'/7829.html','true',[],''],
	['PAGE','11590',jdecode('Interpreting+in+a++project%3F'),jdecode(''),'/11590.html','true',[],''],
	['PAGE','88046',jdecode('Would+I+qualify+as+an+interprerter%3F'),jdecode(''),'/88046.html','true',[],''],
	['PAGE','88246',jdecode('Directions+to+the+Guildhall'),jdecode(''),'/88246.html','true',[],''],
	['PAGE','74346',jdecode('Immigration+Advisory+Service'),jdecode(''),'/74346.html','true',[],''],
	['PAGE','62575',jdecode('How+to+find+us'),jdecode(''),'/62575.html','true',[],''],
	['PAGE','73947',jdecode('Map+to+St+Clements+Court'),jdecode(''),'/73947.html','true',[],''],
	['PAGE','73784',jdecode('Direction'),jdecode(''),'/73784.html','true',[],''],
	['PAGE','90146',jdecode('Profiles+of+conference+speakers'),jdecode(''),'/90146.html','true',[],''],
	['PAGE','94842',jdecode('New+photo+album'),jdecode(''),'/94842.html','true',[],''],
	['PAGE','104763',jdecode('Interpreter+Application+form'),jdecode(''),'/104763.html','true',[],'']];
var siteelementCount=18;
theSitetree.topTemplateName='Business';
					                                                                    
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 */					                                                            
