/* [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','4466',jdecode('Home'),jdecode(''),'/4466.html','true',[],''],
	['PAGE','10691',jdecode('Planning+a+funeral'),jdecode(''),'/10691/index.html','true',[ 
		['PAGE','25037',jdecode('Funeral+expenses'),jdecode(''),'/10691/25037.html','true',[],''],
		['PAGE','25089',jdecode('Private+Chapel+of+Rest'),jdecode(''),'/10691/25089.html','true',[],''],
		['PAGE','25120',jdecode('Informing+others'),jdecode(''),'/10691/25120.html','true',[],''],
		['PAGE','25151',jdecode('Hearse+and+limousines'),jdecode(''),'/10691/25151.html','true',[],''],
		['PAGE','25182',jdecode('Registration+of+death'),jdecode(''),'/10691/25182.html','true',[],''],
		['PAGE','25213',jdecode('Stationary+%26+catering'),jdecode(''),'/10691/25213.html','true',[],''],
		['PAGE','25244',jdecode('Floral+tributes'),jdecode(''),'/10691/25244.html','true',[],''],
		['PAGE','25275',jdecode('HM+Coroner'),jdecode(''),'/10691/25275.html','true',[],''],
		['PAGE','25306',jdecode('Repatriation'),jdecode(''),'/10691/25306.html','true',[],'']
	],''],
	['PAGE','30830',jdecode('General+information'),jdecode(''),'/30830/index.html','true',[ 
		['PAGE','30861',jdecode('Burial+or+cremation'),jdecode(''),'/30830/30861.html','true',[],''],
		['PAGE','30923',jdecode('Care+of+body%2Fembalming'),jdecode(''),'/30830/30923.html','true',[],'']
	],''],
	['PAGE','30737',jdecode('Monumental'),jdecode(''),'/30737.html','true',[],''],
	['PAGE','30799',jdecode('Coffins+and+caskets'),jdecode(''),'/30799.html','true',[],''],
	['PAGE','30892',jdecode('Bereavement+counselling'),jdecode(''),'/30892.html','true',[],''],
	['PAGE','30768',jdecode('Pre-payment+plans'),jdecode(''),'/30768.html','true',[],''],
	['PAGE','10751',jdecode('About+us'),jdecode(''),'/10751.html','true',[],''],
	['PAGE','10781',jdecode('Contact+us'),jdecode(''),'/10781.html','true',[],''],
	['PAGE','10811',jdecode('Links'),jdecode(''),'/10811.html','true',[],'']];
var siteelementCount=21;
theSitetree.topTemplateName='Galerie';
					                                                                    
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 */					                                                            
