/* [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','4436',jdecode('Home'),jdecode(''),'/4436.html','true',[],''],
	['PAGE','8607',jdecode('2001+Audi+S4'),jdecode(''),'/8607/index.html','true',[ 
		['PAGE','8974',jdecode('Modifications'),jdecode(''),'/8607/8974.html','true',[],''],
		['PAGE','9130',jdecode('S4+Photos'),jdecode(''),'/8607/9130.html','true',[],''],
		['PAGE','10626',jdecode('Performance%2FRacing'),jdecode(''),'/8607/10626.html','true',[],'']
	],''],
	['PAGE','8638',jdecode('Media'),jdecode(''),'/8638/index.html','true',[ 
		['PAGE','8731',jdecode('Pictures'),jdecode(''),'/8638/8731.html','true',[],''],
		['PAGE','8762',jdecode('Videos'),jdecode(''),'/8638/8762.html','true',[],'']
	],''],
	['PAGE','8669',jdecode('Other+Vehicles'),jdecode(''),'/8669/index.html','true',[ 
		['PAGE','11782',jdecode('1999+Jeep+Cherokee+%28XJ%29'),jdecode(''),'/8669/11782.html','true',[],''],
		['PAGE','24885',jdecode('2005+Golf+V+%28Euro+Spec%29'),jdecode(''),'/8669/24885.html','true',[],''],
		['PAGE','24916',jdecode('1991+E34+BMW+535i+%28Euro%29'),jdecode(''),'/8669/24916.html','true',[],''],
		['PAGE','12196',jdecode('1997+Audi+A4+1.8T+quattro'),jdecode(''),'/8669/12196.html','true',[],''],
		['PAGE','12221',jdecode('1994+Probe+GT'),jdecode(''),'/8669/12221.html','true',[],''],
		['PAGE','12246',jdecode('1985+GMC+S-15+Jimmy'),jdecode(''),'/8669/12246.html','true',[],'']
	],''],
	['PAGE','27978',jdecode('Road+Tests%2FArticles'),jdecode(''),'/27978/index.html','true',[ 
		['PAGE','28009',jdecode('2006+Audi+B7+RS4'),jdecode(''),'/27978/28009.html','true',[],''],
		['PAGE','28071',jdecode('2006+Porsche+Cayman+S'),jdecode(''),'/27978/28071.html','true',[],''],
		['PAGE','28040',jdecode('B5+RS4+Sedan+Project'),jdecode(''),'/27978/28040.html','true',[],''],
		['PAGE','30426',jdecode('Truth+about+magazine+tests'),jdecode(''),'/27978/30426.html','true',[],'']
	],''],
	['PAGE','8700',jdecode('Biking'),jdecode(''),'/8700.html','true',[],''],
	['PAGE','13567',jdecode('Photography'),jdecode(''),'/13567.html','true',[],''],
	['PAGE','14867',jdecode('About+the+Creator'),jdecode(''),'/14867.html','true',[],''],
	['PAGE','14898',jdecode('Links'),jdecode(''),'/14898.html','true',[],''],
	['PAGE','17167',jdecode('Germany'),jdecode(''),'/17167.html','true',[],''],
	['PAGE','12277',jdecode('Guestbook'),jdecode(''),'/12277/index.html','true',[ 
		['PAGE','12278',jdecode('Read+Guestbook'),jdecode(''),'/12277/12278.html','true',[],'']
	],'']];
var siteelementCount=27;
theSitetree.topTemplateName='Stone';
					                                                                    
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 */					                                                            
