/* [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','1001',jdecode('Home'),jdecode(''),'/1001/index.html','true',[ 
		['PAGE','43542',jdecode('Wetter'),jdecode(''),'/1001/43542.html','true',[],''],
		['PAGE','45491',jdecode('Sport'),jdecode(''),'/1001/45491.html','true',[],'']
	],''],
	['PAGE','3194',jdecode('Wir+%FCber+uns'),jdecode(''),'/3194/index.html','true',[ 
		['PAGE','27748',jdecode('unser+Team'),jdecode(''),'/3194/27748.html','true',[],''],
		['PAGE','28127',jdecode('und+wie+wir+hei%DFen+...'),jdecode(''),'/3194/28127.html','true',[],''],
		['PAGE','3794',jdecode('Bildergalerie'),jdecode(''),'/3194/3794.html','true',[],'']
	],''],
	['PAGE','7133',jdecode('Korrektionsfassungen'),jdecode(''),'/7133/index.html','true',[ 
		['PAGE','14956',jdecode('1.%3Eweitere+Korrektionsfassungen+'),jdecode(''),'/7133/14956.html','true',[],''],
		['PAGE','17565',jdecode('2.%3Eweitere+Korrektionsfassungen'),jdecode(''),'/7133/17565.html','true',[],''],
		['PAGE','16756',jdecode('3.%3Eweitere+Korrektionsfassungen'),jdecode(''),'/7133/16756.html','true',[],''],
		['PAGE','39829',jdecode('4+%3Eweitere+Korrektionsfassungen'),jdecode(''),'/7133/39829.html','true',[],'']
	],''],
	['PAGE','9358',jdecode('Kinderbrillen'),jdecode(''),'/9358.html','true',[],''],
	['PAGE','8456',jdecode('Sonnenbrillen'),jdecode(''),'/8456/index.html','true',[ 
		['PAGE','12456',jdecode('weitere+Sonnenbrillen++'),jdecode(''),'/8456/12456.html','true',[],'']
	],''],
	['PAGE','4602',jdecode('Contactlinsen'),jdecode(''),'/4602.html','true',[],''],
	['PAGE','1194',jdecode('Aktuelles+%26+Brillengl%E4ser'),jdecode(''),'/1194.html','true',[],''],
	['PAGE','1594',jdecode('Spezialbrillen+%26+mehr'),jdecode(''),'/1594.html','true',[],''],
	['PAGE','10056',jdecode('Information+%26+Augen+...'),jdecode(''),'/10056.html','true',[],''],
	['PAGE','11856',jdecode('Sevice+%26+mehr'),jdecode(''),'/11856.html','true',[],''],
	['PAGE','5802',jdecode('Online-Sehtest'),jdecode(''),'/5802.html','true',[],''],
	['PAGE','10859',jdecode('Praktika+-+Jobs'),jdecode(''),'/10859.html','true',[],''],
	['PAGE','21840',jdecode('Impressum'),jdecode(''),'/21840.html','true',[],''],
	['PAGE','2294',jdecode('Kontakt'),jdecode(''),'/2294/index.html','true',[ 
		['PAGE','14067',jdecode('Kontakt'),jdecode(''),'/2294/14067.html','false',[],'']
	],'']];
var siteelementCount=25;
theSitetree.topTemplateName='Moonflight';
					                                                                    
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 */					                                                            

