/* [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('HOME'),jdecode(''),'/4597.html','true',[],''],
	['PAGE','6402',jdecode('BEHIND+THE+CAMERA'),jdecode(''),'/6402.html','true',[],''],
	['PAGE','36310',jdecode('BILL+IN+ACTION+'),jdecode(''),'/36310.html','true',[],''],
	['PAGE','4789',jdecode('REPORTAGE+ALBUM'),jdecode(''),'/4789.html','true',[],''],
	['PAGE','4654',jdecode('Brooksby+Hall'),jdecode(''),'/4654.html','true',[],''],
	['PAGE','4708',jdecode('Rothley+Court'),jdecode(''),'/4708.html','true',[],''],
	['PAGE','35232',jdecode('Quorn+Country+Hotel'),jdecode(''),'/35232.html','true',[],''],
	['PAGE','38801',jdecode('Beaumanor+Hall'),jdecode(''),'/38801.html','true',[],''],
	['PAGE','4762',jdecode('Quorn+Grange+Hotel'),jdecode(''),'/4762.html','true',[],''],
	['PAGE','41701',jdecode('Prestwold+Hall'),jdecode(''),'/41701.html','true',[],''],
	['PAGE','51101',jdecode('Sutton+Bonington+Hall'),jdecode(''),'/51101.html','true',[],''],
	['PAGE','41801',jdecode('Ullesthorpe+Court'),jdecode(''),'/41801.html','true',[],''],
	['PAGE','35263',jdecode('Kilworth+House+Hotel'),jdecode(''),'/35263.html','true',[],''],
	['PAGE','4735',jdecode('Bosworth+Hall'),jdecode(''),'/4735.html','true',[],''],
	['PAGE','38101',jdecode('Brownsover+Hall'),jdecode(''),'/38101.html','true',[],''],
	['PAGE','4681',jdecode('Scalford+Hall'),jdecode(''),'/4681.html','true',[],''],
	['PAGE','46501',jdecode('Belmont+House+Hotel'),jdecode(''),'/46501.html','true',[],''],
	['PAGE','13618',jdecode('MORE+VENUES'),jdecode(''),'/13618.html','true',[],''],
	['PAGE','55101',jdecode('Churches'),jdecode(''),'/55101.html','true',[],''],
	['PAGE','4843',jdecode('Latest+Completed+Weddings'),jdecode(''),'/4843.html','true',[],''],
	['PAGE','13702',jdecode('Guestbook'),jdecode(''),'/13702.html','true',[],''],
	['PAGE','13703',jdecode('Read+Guestbook'),jdecode(''),'/13703.html','true',[],''],
	['PAGE','35401',jdecode('Links'),jdecode(''),'/35401.html','true',[],''],
	['PAGE','37413',jdecode('Reprint+Price'),jdecode(''),'/37413.html','true',[],''],
	['PAGE','37301',jdecode('CONTACT'),jdecode(''),'/37301.html','true',[],'']];
var siteelementCount=25;
theSitetree.topTemplateName='Art';
					                                                                    
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 */					                                                            
