/* [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','1312',jdecode('Home'),jdecode(''),'/1312.html','true',[],''],
	['PAGE','4136',jdecode('Wir+%FCber+uns'),jdecode(''),'/4136/index.html','true',[ 
		['PAGE','4163',jdecode('Was+k%F6nnen+wir+f%FCr+Sie+tun...%3F'),jdecode(''),'/4136/4163.html','true',[],''],
		['PAGE','4190',jdecode('Leistungen+und+Kosten'),jdecode(''),'/4136/4190.html','true',[],'']
	],''],
	['PAGE','25430',jdecode('Kamine+ohne+Schornstein'),jdecode(''),'/25430.html','true',[],''],
	['PAGE','4217',jdecode('Leistungs+-+und+Lieferverzeichnis'),jdecode(''),'/4217.html','true',[],''],
	['PAGE','13203',jdecode('H%E4user+im+Angebot'),jdecode(''),'/13203/index.html','true',[ 
		['PAGE','13730',jdecode('Auf+einer+Ebene'),jdecode(''),'/13203/13730.html','true',[],''],
		['PAGE','14589',jdecode('1%2C5+Geschosse'),jdecode(''),'/13203/14589.html','true',[],''],
		['PAGE','15172',jdecode('2%2C0+Geschosse'),jdecode(''),'/13203/15172.html','true',[],'']
	],''],
	['PAGE','24903',jdecode('Shop'),jdecode(''),'/24903.html','true',[],''],
	['PAGE','4325',jdecode('Aktuelles'),jdecode(''),'/4325/index.html','true',[ 
		['PAGE','4352',jdecode('Referenzen'),jdecode(''),'/4325/4352.html','true',[],''],
		['PAGE','6317',jdecode('Fotos+von+Referenzobjekten'),jdecode(''),'/4325/6317.html','true',[],''],
		['PAGE','6568',jdecode('Fotos+von+aktuellen+Projekten'),jdecode(''),'/4325/6568.html','true',[],'']
	],''],
	['PAGE','4406',jdecode('Kontakt'),jdecode(''),'/4406.html','true',[],''],
	['PAGE','27234',jdecode('Links'),jdecode(''),'/27234.html','true',[],''],
	['PAGE','8683',jdecode('Service'),jdecode(''),'/8683/index.html','true',[ 
		['PAGE','4244',jdecode('Katalogservice'),jdecode(''),'/8683/4244.html','true',[],'']
	],'']];
var siteelementCount=19;
theSitetree.topTemplateName='Neon';
					                                                                    
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 */					                                                            

