/* [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','4556',jdecode('Home'),jdecode(''),'/4556.html','true',[],''],
	['PAGE','61219',jdecode('Boatwatch'),jdecode(''),'/61219/index.html','true',[ 
		['PAGE','103877',jdecode('Sale+%26+Wants'),jdecode(''),'/61219/103877.html','true',[],''],
		['PAGE','103908',jdecode('Lost+%26+Found'),jdecode(''),'/61219/103908.html','true',[],'']
	],''],
	['PAGE','36610',jdecode('Carnival+'),jdecode(''),'/36610.html','true',[],''],
	['PAGE','62619',jdecode('Car+parking'),jdecode(''),'/62619.html','true',[],''],
	['PAGE','59519',jdecode('Carnival+2007'),jdecode(''),'/59519.html','true',[],''],
	['PAGE','100577',jdecode('Carnival+2008'),jdecode(''),'/100577.html','true',[],''],
	['PAGE','125016',jdecode('Carnival+%26+Bank+Hol.+2009'),jdecode(''),'/125016.html','true',[],''],
	['PAGE','126213',jdecode('Comments'),jdecode(''),'/126213.html','true',[],''],
	['PAGE','127217',jdecode('Film+Clips'),jdecode(''),'/127217.html','true',[],''],
	['PAGE','85643',jdecode('Fisherman%26%23x27%3Bs+Arms'),jdecode(''),'/85643.html','true',[],''],
	['PAGE','126258',jdecode('Guestbook'),jdecode(''),'/126258.html','true',[],''],
	['PAGE','9020',jdecode('History'),jdecode(''),'/9020.html','true',[],''],
	['PAGE','9398',jdecode('Links'),jdecode(''),'/9398.html','true',[],''],
	['PAGE','66519',jdecode('Local+Planning'),jdecode(''),'/66519.html','true',[],''],
	['PAGE','9425',jdecode('Map+%26+Transport'),jdecode(''),'/9425.html','true',[],''],
	['PAGE','123330',jdecode('Memory+Lane'),jdecode(''),'/123330.html','true',[],''],
	['PAGE','130013',jdecode('Nature+Notes'),jdecode(''),'/130013.html','true',[],''],
	['PAGE','9263',jdecode('Organisations+'),jdecode(''),'/9263.html','true',[],''],
	['PAGE','104824',jdecode('Photo+Gallery'),jdecode(''),'/104824.html','true',[],''],
	['PAGE','66337',jdecode('+P%2FC+mins.+%26+reports'),jdecode(''),'/66337.html','true',[],''],
	['PAGE','95653',jdecode('Parish+Plan+'),jdecode(''),'/95653/index.html','true',[ 
		['PAGE','95977',jdecode('Menu'),jdecode(''),'/95653/95977.html','true',[],''],
		['PAGE','96008',jdecode('1.'),jdecode(''),'/95653/96008.html','true',[],''],
		['PAGE','96039',jdecode('2.'),jdecode(''),'/95653/96039.html','true',[],''],
		['PAGE','96070',jdecode('3'),jdecode(''),'/95653/96070.html','true',[],''],
		['PAGE','96101',jdecode('4'),jdecode(''),'/95653/96101.html','true',[],''],
		['PAGE','96177',jdecode('5'),jdecode(''),'/95653/96177.html','true',[],''],
		['PAGE','97077',jdecode('6'),jdecode(''),'/95653/97077.html','true',[],''],
		['PAGE','97108',jdecode('7'),jdecode(''),'/95653/97108.html','true',[],''],
		['PAGE','97139',jdecode('8'),jdecode(''),'/95653/97139.html','true',[],''],
		['PAGE','97170',jdecode('9'),jdecode(''),'/95653/97170.html','true',[],''],
		['PAGE','97201',jdecode('10'),jdecode(''),'/95653/97201.html','true',[],''],
		['PAGE','97987',jdecode('11'),jdecode(''),'/95653/97987.html','true',[],''],
		['PAGE','98018',jdecode('12'),jdecode(''),'/95653/98018.html','true',[],''],
		['PAGE','98049',jdecode('13'),jdecode(''),'/95653/98049.html','true',[],''],
		['PAGE','98080',jdecode('14'),jdecode(''),'/95653/98080.html','true',[],''],
		['PAGE','98111',jdecode('15'),jdecode(''),'/95653/98111.html','true',[],''],
		['PAGE','98142',jdecode('16'),jdecode(''),'/95653/98142.html','true',[],'']
	],''],
	['PAGE','14823',jdecode('Round+and+About'),jdecode(''),'/14823/index.html','true',[ 
		['PAGE','9155',jdecode('Fowey+River'),jdecode(''),'/14823/9155.html','true',[],''],
		['PAGE','9209',jdecode('Photo+Tour+1'),jdecode(''),'/14823/9209.html','true',[],''],
		['PAGE','17710',jdecode('Photo+Tour+2'),jdecode(''),'/14823/17710.html','true',[],'']
	],''],
	['PAGE','9128',jdecode('St+Sampson+Church+'),jdecode(''),'/9128/index.html','true',[ 
		['PAGE','34410',jdecode('Church+Page+2'),jdecode(''),'/9128/34410.html','true',[],'']
	],''],
	['PAGE','84243',jdecode('Tides'),jdecode(''),'/84243.html','true',[],''],
	['PAGE','9371',jdecode('Village+Hall+%26+Events'),jdecode(''),'/9371.html','true',[],''],
	['PAGE','29210',jdecode('Village+News'),jdecode(''),'/29210.html','true',[],''],
	['PAGE','86753',jdecode('Village+Map'),jdecode(''),'/86753.html','true',[],''],
	['PAGE','123224',jdecode('Whats+Going+On%3F'),jdecode(''),'/123224.html','true',[],'']];
var siteelementCount=51;
theSitetree.topTemplateName='Square';
					                                                                    
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 */					                                                            
