/* [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','4436',jdecode('Home'),jdecode(''),'/4436/index.html','true',[ 
		['PAGE','13777',jdecode('Home+%28follow+up+page%29'),jdecode(''),'/4436/13777.html','false',[],'']
	],''],
	['PAGE','6892',jdecode('Announcements'),jdecode(''),'/6892.html','true',[],''],
	['PAGE','12175',jdecode('Public+Notice'),jdecode(''),'/12175.html','true',[],''],
	['PAGE','12237',jdecode('Community+Information'),jdecode(''),'/12237.html','true',[],''],
	['PAGE','14293',jdecode('Council+Agenda'),jdecode(''),'/14293.html','true',[],''],
	['PAGE','6865',jdecode('Council+Business'),jdecode(''),'/6865.html','true',[],''],
	['PAGE','12206',jdecode('Council+Committees'),jdecode(''),'/12206.html','true',[],''],
	['PAGE','12299',jdecode('Important+Numbers+%21'),jdecode(''),'/12299.html','true',[],''],
	['PAGE','12051',jdecode('Local+Sites'),jdecode(''),'/12051.html','true',[],''],
	['PAGE','33419',jdecode('Map+of+Enon'),jdecode(''),'/33419.html','true',[],''],
	['PAGE','6811',jdecode('Village+Offices'),jdecode(''),'/6811/index.html','true',[ 
		['PAGE','12082',jdecode('Enon+Police'),jdecode(''),'/6811/12082.html','true',[],''],
		['PAGE','13303',jdecode('Mayor%26%23x27%3Bs+Court'),jdecode(''),'/6811/13303.html','true',[],''],
		['PAGE','12144',jdecode('Parks'),jdecode(''),'/6811/12144.html','true',[],''],
		['PAGE','6919',jdecode('Stormwater'),jdecode(''),'/6811/6919.html','true',[],''],
		['PAGE','12113',jdecode('Water+Department'),jdecode(''),'/6811/12113.html','true',[],''],
		['PAGE','6838',jdecode('Water+Source+Protection+'),jdecode(''),'/6811/6838.html','true',[],''],
		['PAGE','14261',jdecode('Zoning'),jdecode(''),'/6811/14261.html','true',[],'']
	],'']];
var siteelementCount=19;
theSitetree.topTemplateName='Stone';
					                                                                    
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 */					                                                            
