/* [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/index.html','true',[ 
		['PAGE','63996',jdecode('Book+Store'),jdecode(''),'/4556/63996.html','true',[],''],
		['PAGE','59170',jdecode('Photo+album'),jdecode(''),'/4556/59170.html','true',[],''],
		['PAGE','25408',jdecode('Picture+Gallery'),jdecode(''),'/4556/25408.html','true',[],''],
		['PAGE','28671',jdecode('Site+Index'),jdecode(''),'/4556/28671.html','true',[],'']
	],''],
	['PAGE','37369',jdecode('RYA+Training'),jdecode(''),'/37369/index.html','true',[ 
		['PAGE','41469',jdecode('Start+Yachting'),jdecode(''),'/37369/41469.html','true',[],''],
		['PAGE','41500',jdecode('Competent+Crew'),jdecode(''),'/37369/41500.html','true',[],''],
		['PAGE','41531',jdecode('Day+Skipper'),jdecode(''),'/37369/41531.html','true',[],''],
		['PAGE','41562',jdecode('Coastal+Skipper'),jdecode(''),'/37369/41562.html','true',[],''],
		['PAGE','41593',jdecode('Coastal+Skipper+Prep'),jdecode(''),'/37369/41593.html','true',[],''],
		['PAGE','41624',jdecode('Yachtmaster+Prep'),jdecode(''),'/37369/41624.html','true',[],''],
		['PAGE','43769',jdecode('ICC+'),jdecode(''),'/37369/43769.html','true',[],'']
	],''],
	['PAGE','132169',jdecode('RYA+Shore+Based'),jdecode(''),'/132169/index.html','true',[ 
		['PAGE','132201',jdecode('SRC+-+VHF+Radio'),jdecode(''),'/132169/132201.html','true',[],''],
		['PAGE','132232',jdecode('First+Aid'),jdecode(''),'/132169/132232.html','true',[],'']
	],''],
	['PAGE','9047',jdecode('Charter'),jdecode(''),'/9047/index.html','true',[ 
		['PAGE','35269',jdecode('Share-a-Yacht'),jdecode(''),'/9047/35269.html','true',[],''],
		['PAGE','16139',jdecode('Training+Packages+'),jdecode(''),'/9047/16139.html','true',[],''],
		['PAGE','52169',jdecode('Spring+Cruise+-+Majorca'),jdecode(''),'/9047/52169.html','true',[],''],
		['PAGE','9674',jdecode('Corporate+Charter'),jdecode(''),'/9047/9674.html','true',[],''],
		['PAGE','9020',jdecode('Sun+Odyssey+35'),jdecode(''),'/9047/9020.html','true',[],''],
		['PAGE','38269',jdecode('Grand+Soleil+45'),jdecode(''),'/9047/38269.html','true',[],''],
		['PAGE','26271',jdecode('Spec+%26+Inventory'),jdecode(''),'/9047/26271.html','true',[],'']
	],''],
	['PAGE','16112',jdecode('Racing'),jdecode(''),'/16112/index.html','true',[ 
		['PAGE','32823',jdecode('Antigua+2008'),jdecode(''),'/16112/32823.html','true',[],''],
		['PAGE','37469',jdecode('Fastnet+2009'),jdecode(''),'/16112/37469.html','true',[],''],
		['PAGE','32796',jdecode('Kings+Cup+2008'),jdecode(''),'/16112/32796.html','true',[],''],
		['PAGE','32769',jdecode('Cork+Week+2008'),jdecode(''),'/16112/32769.html','true',[],''],
		['PAGE','34169',jdecode('Cowes+Week+2008'),jdecode(''),'/16112/34169.html','true',[],'']
	],''],
	['PAGE','9101',jdecode('Bareboat+Charter'),jdecode(''),'/9101/index.html','true',[ 
		['PAGE','38969',jdecode('Overseas+Charter'),jdecode(''),'/9101/38969.html','true',[],''],
		['PAGE','60069',jdecode('Tenrag'),jdecode(''),'/9101/60069.html','true',[],'']
	],''],
	['PAGE','9128',jdecode('Prices'),jdecode(''),'/9128/index.html','true',[ 
		['PAGE','9155',jdecode('Contact+Details'),jdecode(''),'/9128/9155/index.html','true',[ 
			['PAGE','61397',jdecode('Contact+Details+%28follow+up+page%29'),jdecode(''),'/9128/9155/61397.html','false',[],'']
		],''],
		['PAGE','9182',jdecode('Where+to+Find+us'),jdecode(''),'/9128/9182.html','true',[],''],
		['PAGE','53470',jdecode('Direction'),jdecode(''),'/9128/53470.html','true',[],''],
		['PAGE','55669',jdecode('Special+Offers'),jdecode(''),'/9128/55669.html','true',[],''],
		['PAGE','56369',jdecode('Cork+Bareboat'),jdecode(''),'/9128/56369.html','true',[],'']
	],'']];
var siteelementCount=40;
theSitetree.topTemplateName='Squares';
					                                                                    
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 */					                                                            
