/* [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','960',jdecode('Vorbemerkung'),jdecode(''),'/960.html','true',[],''],
	['PAGE','8397',jdecode('Geographie'),jdecode(''),'/8397.html','true',[],''],
	['PAGE','1013',jdecode('Geschichte'),jdecode(''),'/1013/index.html','true',[ 
		['PAGE','1036',jdecode('die+Anf%E4nge'),jdecode(''),'/1013/1036.html','true',[],''],
		['PAGE','1059',jdecode('der+Schafhof'),jdecode(''),'/1013/1059.html','true',[],''],
		['PAGE','1082',jdecode('das+Dorf'),jdecode(''),'/1013/1082.html','true',[],''],
		['PAGE','1105',jdecode('das+19.+Jahrhundert'),jdecode(''),'/1013/1105.html','true',[],''],
		['PAGE','1128',jdecode('ein+besonderes+Gewerbe'),jdecode(''),'/1013/1128.html','true',[],''],
		['PAGE','1174',jdecode('das+20.+Jahrhundert'),jdecode(''),'/1013/1174.html','true',[],''],
		['PAGE','5864',jdecode('die+50er+Jahre'),jdecode(''),'/1013/5864.html','true',[],'']
	],''],
	['PAGE','1220',jdecode('Namen'),jdecode(''),'/1220/index.html','true',[ 
		['PAGE','1243',jdecode('historisches'),jdecode(''),'/1220/1243.html','true',[],''],
		['PAGE','1266',jdecode('die+%DCbernamen'),jdecode(''),'/1220/1266.html','true',[],''],
		['PAGE','3194',jdecode('unsere+Honoratioren'),jdecode(''),'/1220/3194.html','true',[],''],
		['PAGE','1289',jdecode('ein+Gedicht'),jdecode(''),'/1220/1289.html','true',[],'']
	],''],
	['PAGE','1312',jdecode('Sprache'),jdecode(''),'/1312/index.html','true',[ 
		['PAGE','14794',jdecode('Engelbert+Wittich'),jdecode(''),'/1312/14794.html','true',[],''],
		['PAGE','1335',jdecode('W%F6rterbuch'),jdecode(''),'/1312/1335.html','true',[],''],
		['PAGE','2082',jdecode('Aufruf'),jdecode(''),'/1312/2082/index.html','true',[ 
			['PAGE','11409',jdecode('Aufruf'),jdecode(''),'/1312/2082/11409.html','false',[],'']
		],'']
	],''],
	['PAGE','7904',jdecode('Zahlen'),jdecode(''),'/7904.html','true',[],''],
	['PAGE','10594',jdecode('Hannikel'),jdecode(''),'/10594.html','true',[],''],
	['PAGE','1381',jdecode('Kontakt'),jdecode(''),'/1381/index.html','true',[ 
		['PAGE','11584',jdecode('Kontakt'),jdecode(''),'/1381/11584.html','false',[],'']
	],''],
	['PAGE','2894',jdecode('Impressum%26Quellen'),jdecode(''),'/2894.html','true',[],''],
	['PAGE','11801',jdecode('G%E4stebuch'),jdecode(''),'/11801/index.html','true',[ 
		['PAGE','11802',jdecode('Eintr%E4ge'),jdecode(''),'/11801/11802.html','true',[],'']
	],'']];
var siteelementCount=27;
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 */					                                                            
