/* [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','4556',jdecode('Home'),jdecode(''),'/4556.html','true',[],''],
	['PAGE','66194',jdecode('Jahresmodell+08%2F09'),jdecode(''),'/66194.html','true',[],''],
	['PAGE','59393',jdecode('Jahresmodell+06%2F07'),jdecode(''),'/59393.html','true',[],''],
	['PAGE','36795',jdecode('Produkte+Spur+2m'),jdecode(''),'/36795/index.html','true',[ 
		['PAGE','36822',jdecode('Loks'),jdecode(''),'/36795/36822.html','true',[],''],
		['PAGE','36849',jdecode('Wagen'),jdecode(''),'/36795/36849.html','true',[],''],
		['PAGE','62593',jdecode('Baus%E4tze'),jdecode(''),'/36795/62593.html','true',[],''],
		['PAGE','36876',jdecode('Zubeh%F6r'),jdecode(''),'/36795/36876.html','true',[],''],
		['PAGE','38295',jdecode('Dampfzubeh%F6r'),jdecode(''),'/36795/38295.html','true',[],'']
	],''],
	['PAGE','61193',jdecode('Produkte+Spur+2'),jdecode(''),'/61193/index.html','true',[ 
		['PAGE','61224',jdecode('Wagen'),jdecode(''),'/61193/61224.html','true',[],''],
		['PAGE','61255',jdecode('Zubeh%F6r'),jdecode(''),'/61193/61255.html','true',[],'']
	],''],
	['PAGE','60620',jdecode('Produkte+5+Zoll'),jdecode(''),'/60620.html','true',[],''],
	['PAGE','64166',jdecode('Produkte+7+Zoll'),jdecode(''),'/64166.html','true',[],''],
	['PAGE','63693',jdecode('Drehscheibe'),jdecode(''),'/63693.html','true',[],''],
	['PAGE','9617',jdecode('Bauen'),jdecode(''),'/9617/index.html','true',[ 
		['PAGE','9644',jdecode('Loks+%2F+Umbauten'),jdecode(''),'/9617/9644.html','true',[],''],
		['PAGE','9671',jdecode('Waggons+%2F+Tender'),jdecode(''),'/9617/9671.html','true',[],''],
		['PAGE','9698',jdecode('Zubeh%F6r'),jdecode(''),'/9617/9698.html','true',[],'']
	],''],
	['PAGE','46593',jdecode('INFO+%2F+Messe'),jdecode(''),'/46593/index.html','true',[ 
		['PAGE','55673',jdecode('Neuvorstellung'),jdecode(''),'/46593/55673.html','true',[],'']
	],''],
	['PAGE','9725',jdecode('Links'),jdecode(''),'/9725.html','true',[],''],
	['PAGE','9563',jdecode('%DCber+mich...'),jdecode(''),'/9563.html','true',[],''],
	['PAGE','9590',jdecode('Kontakt'),jdecode(''),'/9590/index.html','true',[ 
		['PAGE','16202',jdecode('Kontakt+%28Folgeseite%29'),jdecode(''),'/9590/16202.html','false',[],'']
	],''],
	['PAGE','17002',jdecode('G%E4stebuch'),jdecode(''),'/17002/index.html','true',[ 
		['PAGE','17003',jdecode('G%E4stebuch+lesen'),jdecode(''),'/17002/17003.html','true',[],'']
	],''],
	['PAGE','48793',jdecode('AGB+%2F+Impressum'),jdecode(''),'/48793.html','true',[],''],
	['PAGE','51693',jdecode('Shop'),jdecode(''),'/51693.html','true',[],''],
	['PAGE','65793',jdecode('%D6ffnungszeiten'),jdecode(''),'/65793.html','true',[],''],
	['PAGE','68093',jdecode('Sitemap'),jdecode(''),'/68093.html','true',[],''],
	['PAGE','69093',jdecode('Insider'),jdecode(''),'/69093.html','true',[],''],
	['PAGE','41494',jdecode('Routenplaner'),jdecode(''),'/41494.html','true',[],'']];
var siteelementCount=33;
theSitetree.topTemplateName='Commander';
					                                                                    
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 */					                                                            

