/* [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','26706',jdecode('Aktuelle+Termine'),jdecode(''),'/26706.html','true',[],''],
	['PAGE','4584',jdecode('Die+Medien-AG'),jdecode(''),'/4584/index.html','true',[ 
		['PAGE','22001',jdecode('Alles+neu%21'),jdecode(''),'/4584/22001.html','true',[],''],
		['PAGE','26737',jdecode('Das+machen+wir'),jdecode(''),'/4584/26737.html','true',[],'']
	],''],
	['PAGE','21901',jdecode('Sch%FClerzeitung+EduCat'),jdecode(''),'/21901/index.html','true',[ 
		['PAGE','21601',jdecode('Daran+arbeiten+wir+zurzeit'),jdecode(''),'/21901/21601.html','true',[],'']
	],''],
	['PAGE','21794',jdecode('Radio-Projekt'),jdecode(''),'/21794/index.html','true',[ 
		['PAGE','21763',jdecode('Das+ist+das+Radioprojekt'),jdecode(''),'/21794/21763.html','true',[],''],
		['PAGE','21732',jdecode('Daran+arbeiten+wir+zurzeit'),jdecode(''),'/21794/21732.html','true',[],'']
	],''],
	['PAGE','26830',jdecode('Fragen+und+Antworten'),jdecode(''),'/26830.html','true',[],''],
	['PAGE','26768',jdecode('Feedback'),jdecode(''),'/26768/index.html','true',[ 
		['PAGE','27719',jdecode('Kontakt+%28Folgeseite%29'),jdecode(''),'/26768/27719.html','false',[],'']
	],''],
	['PAGE','26799',jdecode('AG-Mitglieder'),jdecode(''),'/26799.html','true',[],''],
	['PAGE','28166',jdecode('G%E4stebuch'),jdecode(''),'/28166/index.html','true',[ 
		['PAGE','28167',jdecode('Eintr%E4ge'),jdecode(''),'/28166/28167.html','true',[],'']
	],''],
	['PAGE','21701',jdecode('Impressum'),jdecode(''),'/21701.html','true',[],'']];
var siteelementCount=16;
theSitetree.topTemplateName='Alpha';
					                                                                    
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 */					                                                            
