/* [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','4598',jdecode('HOME++++++'),jdecode(''),'/4598.html','true',[],''],
	['PAGE','4655',jdecode('PATENTE+'),jdecode(''),'/4655.html','true',[],''],
	['PAGE','63804',jdecode('CarCap+-+der+Carport'),jdecode(''),'/63804.html','true',[],''],
	['PAGE','68121',jdecode('Smoker-Table'),jdecode(''),'/68121.html','true',[],''],
	['PAGE','4709',jdecode('MARKEN+'),jdecode(''),'/4709.html','true',[],''],
	['PAGE','4736',jdecode('DESIGN'),jdecode(''),'/4736/index.html','true',[ 
		['PAGE','56707',jdecode('OfficeLine'),jdecode(''),'/4736/56707.html','true',[],'']
	],''],
	['PAGE','4763',jdecode('RECHERCHEN'),jdecode(''),'/4763.html','true',[],''],
	['PAGE','4790',jdecode('ANMELDUNGEN'),jdecode(''),'/4790.html','true',[],''],
	['PAGE','4844',jdecode('LIZENZEN+'),jdecode(''),'/4844.html','true',[],''],
	['PAGE','18901',jdecode('LIZENZVERTR%C4GE'),jdecode(''),'/18901.html','true',[],''],
	['PAGE','54301',jdecode('FINANZIERUNG'),jdecode(''),'/54301.html','true',[],''],
	['PAGE','24501',jdecode('KONTAKT'),jdecode(''),'/24501/index.html','true',[ 
		['PAGE','24602',jdecode('KONTAKT+%28Folgeseite%29'),jdecode(''),'/24501/24602.html','false',[],'']
	],''],
	['PAGE','4925',jdecode('IMPRESSUM'),jdecode(''),'/4925.html','true',[],''],
	['PAGE','4898',jdecode('LINKS'),jdecode(''),'/4898.html','true',[],'']];
var siteelementCount=16;
theSitetree.topTemplateName='Amaze';
					                                                                    
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 */					                                                            

