/* [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('What%26%23x27%3Bs+On'),jdecode(''),'/4556/index.html','true',[ 
		['PAGE','35445',jdecode('Adult+classes'),jdecode(''),'/4556/35445.html','true',[],''],
		['PAGE','35414',jdecode('Children%2FTeen+classes'),jdecode(''),'/4556/35414.html','true',[],''],
		['PAGE','9457',jdecode('Gay+%26+Lesbian+Evening'),jdecode(''),'/4556/9457.html','true',[],''],
		['PAGE','9538',jdecode('General+Dancing'),jdecode(''),'/4556/9538.html','true',[],''],
		['PAGE','9484',jdecode('Private+Lessons'),jdecode(''),'/4556/9484.html','true',[],''],
		['PAGE','28992',jdecode('Tuesday+Traditional+Ballroom+'),jdecode(''),'/4556/28992.html','true',[],''],
		['PAGE','9511',jdecode('Wedding%2FCivil+Partnership'),jdecode(''),'/4556/9511.html','true',[],'']
	],''],
	['PAGE','9403',jdecode('About+us'),jdecode(''),'/9403/index.html','true',[ 
		['PAGE','33494',jdecode('Heather+%26+Hadass'),jdecode(''),'/9403/33494.html','true',[],''],
		['PAGE','33802',jdecode('Other+teachers'),jdecode(''),'/9403/33802.html','true',[],'']
	],''],
	['PAGE','35040',jdecode('Class+schedule+at+a+glance'),jdecode(''),'/35040.html','true',[],''],
	['PAGE','9565',jdecode('Studio+hire%2Fclassified'),jdecode(''),'/9565.html','true',[],''],
	['PAGE','36240',jdecode('Special+offers+%26+Bookings'),jdecode(''),'/36240/index.html','true',[ 
		['PAGE','10448',jdecode('Apply+on+line'),jdecode(''),'/36240/10448.html','true',[],''],
		['PAGE','36271',jdecode('Payment+Policy'),jdecode(''),'/36240/36271.html','true',[],''],
		['PAGE','22727',jdecode('Apply+on+line+%28follow+up+page%29'),jdecode(''),'/36240/22727.html','false',[],'']
	],''],
	['PAGE','62857',jdecode('Photo+Gallery'),jdecode(''),'/62857.html','true',[],''],
	['PAGE','9592',jdecode('Contact+%26+Location'),jdecode(''),'/9592.html','true',[],''],
	['PAGE','9673',jdecode('Links'),jdecode(''),'/9673.html','true',[],'']];
var siteelementCount=20;
theSitetree.topTemplateName='Movement';
					                                                                    
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 */					                                                            
