/* [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','4520',jdecode('Home'),jdecode(''),'/4520.html','true',[],''],
	['PAGE','4840',jdecode('Fallen+Crewmates'),jdecode(''),'/4840/index.html','true',[ 
		['PAGE','96301',jdecode('Hardick+Wood'),jdecode(''),'/4840/96301.html','true',[],'']
	],''],
	['PAGE','4786',jdecode('President'),jdecode(''),'/4786.html','true',[],''],
	['PAGE','98601',jdecode('News'),jdecode(''),'/98601/index.html','true',[ 
		['PAGE','4813',jdecode('Archive'),jdecode(''),'/98601/4813.html','true',[],'']
	],''],
	['PAGE','4867',jdecode('Contact+Us+%2F+Join'),jdecode(''),'/4867.html','true',[],''],
	['PAGE','105916',jdecode('2008+Reunion'),jdecode(''),'/105916/index.html','true',[ 
		['PAGE','98541',jdecode('2007+Reunion'),jdecode(''),'/105916/98541.html','true',[],''],
		['PAGE','95101',jdecode('2006+Reunion'),jdecode(''),'/105916/95101.html','true',[],''],
		['PAGE','43501',jdecode('2005+Reunion'),jdecode(''),'/105916/43501.html','true',[],''],
		['PAGE','4894',jdecode('2004+Reunion'),jdecode(''),'/105916/4894.html','true',[],''],
		['PAGE','16129',jdecode('2003+Reunion'),jdecode(''),'/105916/16129.html','true',[],'']
	],''],
	['PAGE','97829',jdecode('Falklands+25'),jdecode(''),'/97829.html','true',[],''],
	['PAGE','98667',jdecode('TS+Ardent'),jdecode(''),'/98667.html','true',[],''],
	['PAGE','20201',jdecode('Heritage'),jdecode(''),'/20201.html','true',[],''],
	['PAGE','4921',jdecode('Photo+Gallery'),jdecode(''),'/4921/index.html','true',[ 
		['PAGE','19963',jdecode('The+Ship+'),jdecode(''),'/4921/19963.html','true',[],''],
		['PAGE','18704',jdecode('Crew+Photo'),jdecode(''),'/4921/18704.html','true',[],''],
		['PAGE','18938',jdecode('Ship+Layout'),jdecode(''),'/4921/18938.html','true',[],''],
		['PAGE','6076',jdecode('Gulf+Trip+1981+Gallery'),jdecode(''),'/4921/6076.html','true',[],''],
		['PAGE','18168',jdecode('21+May+1982+Gallery'),jdecode(''),'/4921/18168.html','true',[],''],
		['PAGE','23017',jdecode('HMS+Yarmouth+'),jdecode(''),'/4921/23017.html','true',[],'']
	],''],
	['PAGE','19301',jdecode('Links'),jdecode(''),'/19301.html','true',[],''],
	['PAGE','20801',jdecode('Shop'),jdecode(''),'/20801.html','true',[],''],
	['PAGE','6903',jdecode('Members+Area'),jdecode(''),'/6903.html','true',[],''],
	['PAGE','105617',jdecode('Guestbook'),jdecode(''),'/105617/index.html','true',[ 
		['PAGE','105618',jdecode('Read+Guestbook'),jdecode(''),'/105617/105618.html','true',[],'']
	],'']];
var siteelementCount=28;
theSitetree.topTemplateName='Galerie';
					                                                                    
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 */					                                                            

