/* [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','1312',jdecode('Home'),jdecode(''),'/1312/index.html','true',[ 
		['PAGE','17003',jdecode('English'),jdecode(''),'/1312/17003.html','true',[],'']
	],''],
	['PAGE','10224',jdecode('Die+Ferienwohnung'),jdecode(''),'/10224/index.html','true',[ 
		['PAGE','10251',jdecode('Lage'),jdecode(''),'/10224/10251.html','true',[],''],
		['PAGE','10467',jdecode('Anreise'),jdecode(''),'/10224/10467.html','true',[],''],
		['PAGE','10575',jdecode('von+A-Z'),jdecode(''),'/10224/10575.html','true',[],'']
	],''],
	['PAGE','10278',jdecode('Fotos+%26+Videos'),jdecode(''),'/10278/index.html','true',[ 
		['PAGE','24219',jdecode('Die+Ferienwohnung'),jdecode(''),'/10278/24219.html','true',[],''],
		['PAGE','17602',jdecode('Haus+%26+Umgebung'),jdecode(''),'/10278/17602.html','true',[],''],
		['PAGE','24702',jdecode('Berlin'),jdecode(''),'/10278/24702.html','true',[],''],
		['PAGE','45742',jdecode('Videofilm'),jdecode(''),'/10278/45742.html','true',[],'']
	],''],
	['PAGE','10413',jdecode('Preise'),jdecode(''),'/10413/index.html','true',[ 
		['PAGE','10440',jdecode('Bedingungen'),jdecode(''),'/10413/10440.html','true',[],'']
	],''],
	['PAGE','39906',jdecode('Reise-Shop'),jdecode(''),'/39906/index.html','true',[ 
		['PAGE','35103',jdecode('Botanischer+Garten'),jdecode(''),'/39906/35103.html','true',[],''],
		['PAGE','10521',jdecode('Partner-Links'),jdecode(''),'/39906/10521.html','true',[],'']
	],''],
	['PAGE','10548',jdecode('Kontakt+%26+Buchung'),jdecode(''),'/10548/index.html','true',[ 
		['PAGE','41254',jdecode('Nach+der+Buchung...'),jdecode(''),'/10548/41254.html','true',[],''],
		['PAGE','11102',jdecode('G%E4stebuch'),jdecode(''),'/10548/11102.html','true',[],''],
		['PAGE','11103',jdecode('G%E4stebuch+%28Eintr%E4ge%29'),jdecode(''),'/10548/11103.html','true',[],'']
	],'']];
var siteelementCount=20;
theSitetree.topTemplateName='Atmosphere';
					                                                                    
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 */					                                                            
