/* [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','1112',jdecode('Home'),jdecode(''),'/1112.html','true',[],''],
	['PAGE','1165',jdecode('Das+Unternehmen'),jdecode(''),'/1165.html','true',[],''],
	['PAGE','5861',jdecode('Kostenmanagement'),jdecode(''),'/5861/index.html','true',[ 
		['PAGE','2208',jdecode('Die+Strategie'),jdecode(''),'/5861/2208.html','true',[],''],
		['PAGE','1280',jdecode('Die+Kompetenz'),jdecode(''),'/5861/1280.html','true',[],''],
		['PAGE','2231',jdecode('Das+Honorar'),jdecode(''),'/5861/2231.html','true',[],''],
		['PAGE','13960',jdecode('wichtige+Info'),jdecode(''),'/5861/13960.html','true',[],''],
		['PAGE','28536',jdecode('Kontakt'),jdecode(''),'/5861/28536/index.html','true',[ 
			['PAGE','28573',jdecode('Kontakt+%28Folgeseite%29'),jdecode(''),'/5861/28536/28573.html','false',[],'']
		],'']
	],''],
	['PAGE','5887',jdecode('Asien-Beratung'),jdecode(''),'/5887/index.html','true',[ 
		['PAGE','17858',jdecode('L%E4nderkompetenz'),jdecode(''),'/5887/17858.html','true',[],''],
		['PAGE','17889',jdecode('Fachkompetenz'),jdecode(''),'/5887/17889.html','true',[],''],
		['PAGE','17920',jdecode('Nutzen'),jdecode(''),'/5887/17920.html','true',[],''],
		['PAGE','18158',jdecode('interessante+Links'),jdecode(''),'/5887/18158.html','true',[],''],
		['PAGE','5910',jdecode('Personal'),jdecode(''),'/5887/5910.html','true',[],''],
		['PAGE','1234',jdecode('Kontakt'),jdecode(''),'/5887/1234.html','true',[],''],
		['PAGE','4222',jdecode('Kontakt'),jdecode(''),'/5887/4222.html','false',[],'']
	],''],
	['PAGE','19458',jdecode('English+version'),jdecode(''),'/19458/index.html','true',[ 
		['PAGE','28600',jdecode('about+us'),jdecode(''),'/19458/28600.html','true',[],''],
		['PAGE','28632',jdecode('cost+reduction'),jdecode(''),'/19458/28632.html','true',[],''],
		['PAGE','28663',jdecode('Asia+-+Consulting'),jdecode(''),'/19458/28663.html','true',[],''],
		['PAGE','28732',jdecode('Links'),jdecode(''),'/19458/28732.html','true',[],''],
		['PAGE','28701',jdecode('Contact'),jdecode(''),'/19458/28701/index.html','true',[ 
			['PAGE','29801',jdecode('Contact+%28Folgeseite%29'),jdecode(''),'/19458/28701/29801.html','false',[],'']
		],'']
	],''],
	['PAGE','8438',jdecode('Disclaimer'),jdecode(''),'/8438.html','true',[],'']];
var siteelementCount=25;
theSitetree.topTemplateName='Strom';
					                                                                    
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 */					                                                            
