/* [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(''),'/index.html','true',[],''],
	['PAGE','7423',jdecode('About+the+Course'),jdecode(''),'/7423/index.html','true',[ 
		['PAGE','7461',jdecode('Give+us+your+feedback+%28follow+up+page%29'),jdecode(''),'/7423/7461.html','false',[],'']
	],''],
	['PAGE','19203',jdecode('Rates+and+Directions'),jdecode(''),'/19203.html','true',[],''],
	['PAGE','20413',jdecode('Our+Policies'),jdecode(''),'/20413.html','true',[],''],
	['PAGE','7481',jdecode('The+Club+House'),jdecode(''),'/7481/index.html','true',[ 
		['PAGE','7525',jdecode('Feedback+%28follow+up+page%29'),jdecode(''),'/7481/7525.html','false',[],''],
		['PAGE','20504',jdecode('Fairway+Pub'),jdecode(''),'/7481/20504.html','true',[],'']
	],''],
	['PAGE','20574',jdecode('Leagues'),jdecode(''),'/20574/index.html','true',[ 
		['PAGE','20605',jdecode('Cape+Ann+Golf+Association'),jdecode(''),'/20574/20605.html','true',[],''],
		['PAGE','20636',jdecode('Essex+Wreck+League'),jdecode(''),'/20574/20636.html','true',[],''],
		['PAGE','20667',jdecode('Chargers'),jdecode(''),'/20574/20667.html','true',[],''],
		['PAGE','20698',jdecode('F.W.Webb'),jdecode(''),'/20574/20698.html','true',[],''],
		['PAGE','20776',jdecode('Join+a+League'),jdecode(''),'/20574/20776.html','true',[],'']
	],''],
	['PAGE','20543',jdecode('Events'),jdecode(''),'/20543.html','true',[],''],
	['PAGE','18602',jdecode('Guestbook'),jdecode(''),'/18602/index.html','true',[ 
		['PAGE','18603',jdecode('Read+Guestbook'),jdecode(''),'/18602/18603.html','true',[],'']
	],''],
	['PAGE','19234',jdecode('Contact+Us'),jdecode(''),'/19234/index.html','true',[ 
		['PAGE','20813',jdecode('Contact+Us+%28follow+up+page%29'),jdecode(''),'/19234/20813.html','false',[],'']
	],''],
	['PAGE','19265',jdecode('Area+Attactions'),jdecode(''),'/19265.html','true',[],''],
	['PAGE','20841',jdecode(''),jdecode(''),'/20841/index.html','true',[ 
		['PAGE','20879',jdecode(''),jdecode(''),'/20841/20879.html','true',[],'']
	],'']];
var siteelementCount=22;
theSitetree.topTemplateName='Enjoy';
					                                                                    
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 */					                                                            

