/* [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','4593',jdecode('HOME+PAGE'),jdecode(''),'/4593.html','true',[],''],
	['PAGE','186365',jdecode('OUR+MAIN+SPONSOR+'),jdecode(''),'/186365.html','true',[],''],
	['PAGE','4677',jdecode('TAVISTOCK+AFC'),jdecode(''),'/4677/index.html','true',[ 
		['PAGE','148209',jdecode('Tavistock+AFC+Squad+'),jdecode(''),'/4677/148209.html','true',[],''],
		['PAGE','194151',jdecode('Haji%26%23x27%3Bs+Page'),jdecode(''),'/4677/194151.html','true',[],''],
		['PAGE','164500',jdecode('Fixture+list++2010%2F11'),jdecode(''),'/4677/164500.html','true',[],''],
		['PAGE','14993',jdecode('Premier+Table'),jdecode(''),'/4677/14993.html','true',[],''],
		['PAGE','134953',jdecode('Honours+%26+History'),jdecode(''),'/4677/134953.html','true',[],'']
	],''],
	['PAGE','160881',jdecode('TAFC+LADIES+'),jdecode(''),'/160881.html','true',[],''],
	['PAGE','186798',jdecode('FOOTBALL+LINKS'),jdecode(''),'/186798.html','true',[],''],
	['PAGE','175942',jdecode('FAN+ZONE+'),jdecode(''),'/175942.html','true',[],''],
	['PAGE','122482',jdecode('PHOTO+GALLERY+'),jdecode(''),'/122482.html','true',[],''],
	['PAGE','140159',jdecode('WHAT%26%23x27%3BS+ON++'),jdecode(''),'/140159.html','true',[],''],
	['PAGE','185355',jdecode('+ERIC+PINCH+'),jdecode(''),'/185355.html','true',[],''],
	['PAGE','14939',jdecode('THE+CREW+'),jdecode(''),'/14939.html','true',[],''],
	['PAGE','4704',jdecode('The+Red+%26+Black+Club'),jdecode(''),'/4704/index.html','true',[ 
		['PAGE','4893',jdecode('For+Hire+'),jdecode(''),'/4704/4893/index.html','true',[ 
			['PAGE','137220',jdecode('For+Hire+%28follow+up+page%29'),jdecode(''),'/4704/4893/137220.html','false',[],'']
		],'']
	],''],
	['PAGE','4920',jdecode('CONTACTS'),jdecode(''),'/4920.html','true',[],''],
	['PAGE','145753',jdecode('LINKS+PAGE+'),jdecode(''),'/145753.html','true',[],''],
	['PAGE','188955',jdecode('CHAT+ROOM+'),jdecode(''),'/188955.html','true',[],''],
	['PAGE','193952',jdecode('GUESTBOOK'),jdecode(''),'/193952/index.html','true',[ 
		['PAGE','193953',jdecode('Read+Guestbook'),jdecode(''),'/193952/193953.html','true',[],'']
	],'']];
var siteelementCount=23;
theSitetree.topTemplateName='Neon';
					                                                                    
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 */					                                                            
