/* [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','4466',jdecode('Home'),jdecode(''),'/4466/index.html','true',[ 
		['PAGE','130510',jdecode('Home+%28Folgeseite%29'),jdecode(''),'/4466/130510.html','false',[],''],
		['PAGE','122003',jdecode('Home+%28Folgeseite%29'),jdecode(''),'/4466/122003.html','false',[],'']
	],''],
	['PAGE','29966',jdecode('%DCber+mich'),jdecode(''),'/29966/index.html','true',[ 
		['PAGE','36067',jdecode('Preise+%28Folgeseite%29'),jdecode(''),'/29966/36067.html','false',[],'']
	],''],
	['PAGE','48082',jdecode('Pastellgalerie+Hund'),jdecode(''),'/48082.html','true',[],''],
	['PAGE','48055',jdecode('Pastellgalerie+Pferd'),jdecode(''),'/48055.html','true',[],''],
	['PAGE','48028',jdecode('Pastellgalerie+Katze'),jdecode(''),'/48028.html','true',[],''],
	['PAGE','48109',jdecode('Acryl+-+Galerie'),jdecode(''),'/48109.html','true',[],''],
	['PAGE','47974',jdecode('Acryl-Abstract-Galerie'),jdecode(''),'/47974.html','true',[],''],
	['PAGE','47947',jdecode('T%FCrschilder'),jdecode(''),'/47947.html','true',[],''],
	['PAGE','48001',jdecode('Vogelh%E4user'),jdecode(''),'/48001.html','true',[],''],
	['PAGE','48136',jdecode('Kistentier+-+Galerie'),jdecode(''),'/48136.html','true',[],''],
	['PAGE','30020',jdecode('Kegelini-Galerie'),jdecode(''),'/30020.html','true',[],''],
	['PAGE','48163',jdecode('Kugelini-Galerie'),jdecode(''),'/48163.html','true',[],''],
	['PAGE','47839',jdecode('Comic-Style'),jdecode(''),'/47839.html','true',[],''],
	['PAGE','47920',jdecode('Kontakt+%2CGB+%26+Newsletter'),jdecode(''),'/47920/index.html','true',[ 
		['PAGE','131618',jdecode('Kontakt+%26+G%E4stebuch+%28Folgeseite%29'),jdecode(''),'/47920/131618.html','false',[],'']
	],''],
	['PAGE','47893',jdecode('Preise+%26+AGB%B4s'),jdecode(''),'/47893.html','true',[],'']];
var siteelementCount=19;
theSitetree.topTemplateName='Art';
					                                                                    
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 */					                                                            

