/* [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','1114',jdecode('Home'),jdecode(''),'/1114.html','true',[],''],
	['PAGE','10536',jdecode('Leistungen+%2F+Kurse'),jdecode(''),'/10536/index.html','true',[ 
		['PAGE','14134',jdecode('Welpenspieltage'),jdecode(''),'/10536/14134.html','true',[],''],
		['PAGE','23863',jdecode('Junghundekurs'),jdecode(''),'/10536/23863.html','true',[],''],
		['PAGE','23890',jdecode('Erziehungskurs'),jdecode(''),'/10536/23890.html','true',[],''],
		['PAGE','10582',jdecode('Obediencekurs'),jdecode(''),'/10536/10582.html','true',[],''],
		['PAGE','23917',jdecode('Problemhunde'),jdecode(''),'/10536/23917.html','true',[],''],
		['PAGE','23944',jdecode('Clickertraining'),jdecode(''),'/10536/23944.html','true',[],''],
		['PAGE','23971',jdecode('Einzeltraining'),jdecode(''),'/10536/23971.html','true',[],''],
		['PAGE','23998',jdecode('Begleithundekurs'),jdecode(''),'/10536/23998.html','true',[],''],
		['PAGE','24025',jdecode('Kinderferienkurs'),jdecode(''),'/10536/24025.html','true',[],''],
		['PAGE','10559',jdecode('Agilitykurs'),jdecode(''),'/10536/10559.html','true',[],'']
	],''],
	['PAGE','14301',jdecode('Alternative+Methoden'),jdecode(''),'/14301/index.html','true',[ 
		['PAGE','14302',jdecode('Tellington-Touch'),jdecode(''),'/14301/14302.html','true',[],''],
		['PAGE','24052',jdecode('Bach-Bl%FCten'),jdecode(''),'/14301/24052.html','true',[],''],
		['PAGE','24079',jdecode('Hom%F6opathie'),jdecode(''),'/14301/24079.html','true',[],'']
	],''],
	['PAGE','14157',jdecode('Animal-Training+-+Shop'),jdecode(''),'/14157.html','true',[],''],
	['PAGE','10651',jdecode('So+finden+Sie+uns'),jdecode(''),'/10651.html','true',[],'']];
var siteelementCount=18;
theSitetree.topTemplateName='Collage';
					                                                                    
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 */					                                                            

