/* [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','1153',jdecode('Moulin+St-Benoit'),jdecode(''),'/1153.html','true',[],''],
	['PAGE','1395',jdecode('Zeltplatz'),jdecode(''),'/1395/index.html','true',[ 
		['PAGE','10139',jdecode('oberer+Platz'),jdecode(''),'/1395/10139.html','true',[],''],
		['PAGE','10166',jdecode('unterer+Platz'),jdecode(''),'/1395/10166.html','true',[],''],
		['PAGE','11150',jdecode('Sanit%E4rtrakt'),jdecode(''),'/1395/11150.html','true',[],''],
		['PAGE','11177',jdecode('Lagerk%FCche'),jdecode(''),'/1395/11177.html','true',[],''],
		['PAGE','13640',jdecode('Zeltplatzordnung'),jdecode(''),'/1395/13640.html','true',[],'']
	],''],
	['PAGE','1418',jdecode('G%E4stehaus'),jdecode(''),'/1418/index.html','true',[ 
		['PAGE','10193',jdecode('Appartement+1'),jdecode(''),'/1418/10193.html','true',[],''],
		['PAGE','10220',jdecode('Appartement+2'),jdecode(''),'/1418/10220.html','true',[],''],
		['PAGE','10247',jdecode('Appartement+3'),jdecode(''),'/1418/10247.html','true',[],''],
		['PAGE','10274',jdecode('Appartement+4'),jdecode(''),'/1418/10274.html','true',[],''],
		['PAGE','10301',jdecode('Appartement+5'),jdecode(''),'/1418/10301.html','true',[],''],
		['PAGE','11204',jdecode('Schlafraum'),jdecode(''),'/1418/11204.html','true',[],''],
		['PAGE','13671',jdecode('Hausordnung'),jdecode(''),'/1418/13671.html','true',[],'']
	],''],
	['PAGE','15590',jdecode('30.+Jubil%E4um'),jdecode(''),'/15590/index.html','true',[ 
		['PAGE','15674',jdecode('Gru%DFworte'),jdecode(''),'/15590/15674.html','true',[],'']
	],''],
	['PAGE','2128',jdecode('Normandie'),jdecode(''),'/2128.html','true',[],''],
	['PAGE','1441',jdecode('Buchung-Kontakt'),jdecode(''),'/1441.html','true',[],''],
	['PAGE','1487',jdecode('DPSG+Bo-Harpen'),jdecode(''),'/1487.html','true',[],''],
	['PAGE','9839',jdecode('Impressum'),jdecode(''),'/9839.html','true',[],'']];
var siteelementCount=21;
theSitetree.topTemplateName='Cuy';
					                                                                    
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 */					                                                            

