/* [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','4535',jdecode('Home'),jdecode(''),'/4535/index.html','true',[ 
		['PAGE','14802',jdecode('Pixelspiel'),jdecode(''),'/4535/14802.html','true',[],'']
	],''],
	['PAGE','14829',jdecode('Sylt+Gallerie'),jdecode(''),'/14829/index.html','true',[ 
		['PAGE','15191',jdecode('Abendstimmung'),jdecode(''),'/14829/15191.html','true',[],''],
		['PAGE','15218',jdecode('Buhnenreste'),jdecode(''),'/14829/15218.html','true',[],''],
		['PAGE','15245',jdecode('Ebbe+in+Gold'),jdecode(''),'/14829/15245.html','true',[],''],
		['PAGE','15272',jdecode('Goldene+Restbuhne'),jdecode(''),'/14829/15272.html','true',[],''],
		['PAGE','15299',jdecode('Hart+am+Wind'),jdecode(''),'/14829/15299.html','true',[],''],
		['PAGE','15326',jdecode('Leuchtturm'),jdecode(''),'/14829/15326.html','true',[],''],
		['PAGE','15353',jdecode('Morsumer+Kliff'),jdecode(''),'/14829/15353.html','true',[],''],
		['PAGE','15380',jdecode('Sonnenuntergang+1'),jdecode(''),'/14829/15380.html','true',[],''],
		['PAGE','15407',jdecode('Sonnenuntergang+2'),jdecode(''),'/14829/15407.html','true',[],''],
		['PAGE','15434',jdecode('Sonnenuntergang+3'),jdecode(''),'/14829/15434.html','true',[],''],
		['PAGE','15461',jdecode('Himmel+und+Wasser'),jdecode(''),'/14829/15461.html','true',[],''],
		['PAGE','15488',jdecode('Wellenbrecher+1'),jdecode(''),'/14829/15488.html','true',[],''],
		['PAGE','16152',jdecode('Wellenbrecher+2'),jdecode(''),'/14829/16152.html','true',[],''],
		['PAGE','16179',jdecode('Wellenbrecher+3'),jdecode(''),'/14829/16179.html','true',[],''],
		['PAGE','16206',jdecode('Windr%E4der'),jdecode(''),'/14829/16206.html','true',[],'']
	],''],
	['PAGE','4619',jdecode('G%E4stebuch'),jdecode(''),'/4619/index.html','true',[ 
		['PAGE','4620',jdecode('Eintr%E4ge'),jdecode(''),'/4619/4620.html','true',[],'']
	],''],
	['PAGE','17154',jdecode('Links'),jdecode(''),'/17154.html','true',[],'']];
var siteelementCount=21;
theSitetree.topTemplateName='Logg';
					                                                                    
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 */					                                                            

