/* [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','4558',jdecode('Le+Ch%E2teau+de+La+Gr%E8ze'),jdecode(''),'/4558.html','true',[],''],
	['PAGE','5202',jdecode('Les+chambres+d%26%23x27%3Bh%F4tes'),jdecode(''),'/5202/index.html','true',[ 
		['PAGE','6602',jdecode('Collonges-la-Rouge'),jdecode(''),'/5202/6602.html','true',[],''],
		['PAGE','7308',jdecode('Turenne'),jdecode(''),'/5202/7308.html','true',[],''],
		['PAGE','7335',jdecode('Carennac'),jdecode(''),'/5202/7335.html','true',[],''],
		['PAGE','7362',jdecode('Loubressac'),jdecode(''),'/5202/7362.html','true',[],''],
		['PAGE','7389',jdecode('Autoire'),jdecode(''),'/5202/7389.html','true',[],'']
	],''],
	['PAGE','4642',jdecode('La+Table+d%26%23x27%3Bh%F4tes'),jdecode(''),'/4642.html','true',[],''],
	['PAGE','9918',jdecode('Le+g%EEte++%22La+Bergerie%22'),jdecode(''),'/9918.html','true',[],''],
	['PAGE','7416',jdecode('Activit%E9s+%26+Loisirs'),jdecode(''),'/7416.html','true',[],''],
	['PAGE','5836',jdecode('Contacts%2C+Tarifs%2C+Acc%E8s'),jdecode(''),'/5836.html','true',[],''],
	['PAGE','9945',jdecode('English+version'),jdecode(''),'/9945.html','true',[],''],
	['PAGE','9972',jdecode('The+rooms+at++La+Gr%E8ze'),jdecode(''),'/9972/index.html','true',[ 
		['PAGE','9999',jdecode('Collonges-la-Rouge'),jdecode(''),'/9972/9999.html','true',[],''],
		['PAGE','10026',jdecode('Turenne'),jdecode(''),'/9972/10026.html','true',[],''],
		['PAGE','10053',jdecode('Carennac'),jdecode(''),'/9972/10053.html','true',[],''],
		['PAGE','10080',jdecode('Loubressac'),jdecode(''),'/9972/10080.html','true',[],''],
		['PAGE','10107',jdecode('Autoire'),jdecode(''),'/9972/10107.html','true',[],'']
	],''],
	['PAGE','10134',jdecode('The+Table+d%26%23x27%3Bh%F4tes'),jdecode(''),'/10134.html','true',[],''],
	['PAGE','10161',jdecode('Things+to+do'),jdecode(''),'/10161.html','true',[],''],
	['PAGE','10188',jdecode('Contacts%2C+Rates%2C+Ways'),jdecode(''),'/10188.html','true',[],'']];
var siteelementCount=21;
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 */					                                                            
