/* [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','140374',jdecode('Kaukasischer+Owtscharka'),jdecode(''),'/140374/index.html','true',[ 
		['PAGE','140405',jdecode('Anmerkung+zur+Rasse'),jdecode(''),'/140374/140405.html','true',[],''],
		['PAGE','140436',jdecode('Erziehung'),jdecode(''),'/140374/140436.html','true',[],'']
	],''],
	['PAGE','140467',jdecode('Unsere+Hunde'),jdecode(''),'/140467/index.html','true',[ 
		['PAGE','140498',jdecode('Cessy'),jdecode(''),'/140467/140498.html','true',[],''],
		['PAGE','140529',jdecode('Aunja'),jdecode(''),'/140467/140529.html','true',[],''],
		['PAGE','140591',jdecode('Bulana'),jdecode(''),'/140467/140591.html','true',[],''],
		['PAGE','140622',jdecode('Burrak'),jdecode(''),'/140467/140622.html','true',[],''],
		['PAGE','140653',jdecode('Yutha'),jdecode(''),'/140467/140653.html','true',[],''],
		['PAGE','140684',jdecode('Tussik'),jdecode(''),'/140467/140684.html','true',[],'']
	],''],
	['PAGE','140715',jdecode('Unvergessen'),jdecode(''),'/140715/index.html','true',[ 
		['PAGE','140560',jdecode('Dunja'),jdecode(''),'/140715/140560.html','true',[],'']
	],''],
	['PAGE','140746',jdecode('Welpen'),jdecode(''),'/140746/index.html','true',[ 
		['PAGE','140777',jdecode('unser+A-Wurf'),jdecode(''),'/140746/140777.html','true',[],''],
		['PAGE','140808',jdecode('unser+B-Wurf'),jdecode(''),'/140746/140808.html','true',[],'']
	],''],
	['PAGE','141120',jdecode('Links'),jdecode(''),'/141120.html','true',[],''],
	['PAGE','140839',jdecode('Online-Shop'),jdecode(''),'/140839.html','true',[],''],
	['PAGE','82811',jdecode('Kontakt'),jdecode(''),'/82811.html','true',[],'']];
var siteelementCount=19;
theSitetree.topTemplateName='Fotoalbum';
					                                                                    
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 */					                                                            
