/* [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','4481',jdecode('Home'),jdecode(''),'/4481.html','true',[],''],
	['PAGE','39216',jdecode('Rettungswagen+Koffer'),jdecode(''),'/39216/index.html','true',[ 
		['PAGE','162276',jdecode('MB+Sprinter+313+CDI+%28F151%29'),jdecode(''),'/39216/162276.html','true',[],''],
		['PAGE','162245',jdecode('MB+Sprinter+313+CDI+%28F150%29'),jdecode(''),'/39216/162245.html','true',[],''],
		['PAGE','161445',jdecode('MB+Sprinter+313+CDI+%28F149%29'),jdecode(''),'/39216/161445.html','true',[],'']
	],''],
	['PAGE','9254',jdecode('Rettungswagen+Kasten'),jdecode(''),'/9254/index.html','true',[ 
		['PAGE','157476',jdecode('MB+Sprinter+313+CDI+%28F146%29'),jdecode(''),'/9254/157476.html','true',[],''],
		['PAGE','157445',jdecode('MB+Sprinter+313+CDI+%28F145%29'),jdecode(''),'/9254/157445.html','true',[],''],
		['PAGE','150845',jdecode('MB+Sprinter+313+CDI+%28F139%29'),jdecode(''),'/9254/150845.html','true',[],'']
	],''],
	['PAGE','38778',jdecode('Krankenwagen'),jdecode(''),'/38778/index.html','true',[ 
		['PAGE','157945',jdecode('VW+T5+KTW+1.9+TDI+%28F147%29'),jdecode(''),'/38778/157945.html','true',[],''],
		['PAGE','155045',jdecode('VW+T5+KTW+2.5+TDI+%28F142%29'),jdecode(''),'/38778/155045.html','true',[],'']
	],''],
	['PAGE','53435',jdecode('NEF+Notarzteinsatzfahrzeug'),jdecode(''),'/53435/index.html','true',[ 
		['PAGE','158845',jdecode('VW+T5+KTW+2.5+TDI+%28F148%29'),jdecode(''),'/53435/158845.html','true',[],'']
	],''],
	['PAGE','163745',jdecode('Tragsessel'),jdecode(''),'/163745/index.html','true',[ 
		['PAGE','163776',jdecode('utila+BTS+900'),jdecode(''),'/163745/163776.html','true',[],'']
	],''],
	['PAGE','9308',jdecode('Ankauf'),jdecode(''),'/9308.html','true',[],''],
	['PAGE','9335',jdecode('Kontakt'),jdecode(''),'/9335/index.html','true',[ 
		['PAGE','31426',jdecode('Kontakt+%28Folgeseite%29'),jdecode(''),'/9335/31426.html','false',[],'']
	],''],
	['PAGE','34016',jdecode('AGB'),jdecode(''),'/34016/index.html','true',[ 
		['PAGE','34416',jdecode('AGB+Gebrauchtwagen'),jdecode(''),'/34016/34416.html','true',[],'']
	],''],
	['PAGE','34047',jdecode('Impressum'),jdecode(''),'/34047.html','true',[],''],
	['PAGE','34247',jdecode('Anfahrt'),jdecode(''),'/34247.html','true',[],''],
	['PAGE','55036',jdecode('Routenplaner'),jdecode(''),'/55036.html','true',[],'']];
var siteelementCount=24;
theSitetree.topTemplateName='Easy';
					                                                                    
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 */					                                                            

