/* [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','301',jdecode('Home'),jdecode(''),'/301.html','true',[],''],
	['PAGE','2632',jdecode('Online+Buchladen'),jdecode(''),'/2632.html','true',[],''],
	['PAGE','2401',jdecode('Smart+Anzeiger'),jdecode(''),'/2401.html','true',[],''],
	['PAGE','2653',jdecode('Kontakt'),jdecode(''),'/2653.html','true',[],''],
	['PAGE','31506',jdecode('G%C3%A4stebuch'),jdecode(''),'/31506/index.html','true',[ 
		['PAGE','31501',jdecode('Eintr%C3%A4ge'),jdecode(''),'/31506/31501.html','true',[],'']
	],'']];
var siteelementCount=6;
theSitetree.topTemplateName='Speed';
theSitetree.paletteFamily='920000';
theSitetree.keyvisualId='2336';
theSitetree.keyvisualName='research.jpg';
theSitetree.fontsetId='373';
theSitetree.graphicsetId='424';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='920000';
var theTemplate={
				name: 			'Speed',
				paletteFamily: 	'920000',
				keyvisualId: 	'2336',
				keyvisualName: 	'research.jpg',
				fontsetId: 		'373',
				graphicsetId: 	'424',
				contentColor: 	'FFFFFF',
				contentBGColor: '920000',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'920000',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']={
webappId:    '1002',
documentId:  '31506',
internalId:  '31506ahopt0ineem8',
customField: 'action=form&icq=false'
};
webappMappings['1002']={
webappId:    '1002',
documentId:  '31501',
internalId:  '31506ahopt0ineem8',
customField: 'action=list'
};
var canonHostname = 'webomat';
var accountId     = 'AHOPT0INEEM8';
var companyName   = 'Buchwurm';
var htmlTitle	  = 'Buchwurm';
var metaKeywords  = 'htmlhead+meta+http-equiv%3Dcontent-type+content%3Dtext%2Fhtml%3B+iso-8859-1+meta+http-equiv%3Dpragma+content%3Dcache+meta+name%3Drobots+content%3DINDEX%2CFOLLOW+meta+http-equiv%3Dcontent-Language+content%3Dde+meta+name%3Ddescription+content%3DUnsere+stets+lesehungrigen+Buchw%C3%BCrmer+fressen+sich+f%C3%BCr+euch+meterweise+durch+die+Welt+des+bedruckten+Bl%C3%A4tterwalds.+Unser+Schwerpunkt+liegt+zwar+bei+der+fantastischen+Literatur+in+allen+Ausformungen%2C+ihr+findet+hier+aber+auch+ausf%C3%BChrliche+Rezensionen+zu+Thr+meta+name%3Dkeywords+content%3DBuchwurm%2CRezensionen%2CFantasy%2CScience-Fiction%2CH%C3%B6rbuch%2CHoerbuch%2CH%C3%B6rb%C3%BCcher%2CHoerbuecher%2CFiction%2CHorror+meta+name%3Dauthor+content%3DBuchwurm.ch+meta+name%3Dpublisher+content%3DBuchwurm.ch+meta+name%3Dcopyright+content%3DWEB+Design+meta+name%3Daudience+content%3DAlle+meta+name%3Dpage-type+content%3DBuch+meta+name%3Dpage-topic+content%3DBranche+Produkt+meta+http-equiv%3Dreply-to+content%3Dinfo%40buchwurm.ch+meta+name%3Dcreation_Date+content%3D06%2F16%2F2007+meta+name%3Dexpires+content%3D31+december+2098+meta+name%3Drevisit-after+content%3D2+days+titleBuchwurm%2Ftitle%2Fhead';
var metaContents  = 'Willkommen+beim+Buchwurm%2C+liebe+Leser%21++Unsere+stets+lesehungrigen+Buchw%C3%BCrmer+fressen+sich+f%C3%BCr+euch+meterweise+durch+die+Welt+des+bedruckten+Bl%C3%A4tterwalds.+Unser+Schwerpunkt+liegt+zwar+bei+der+fantastischen+Literatur+in+allen+Ausformungen%2C+ihr+findet+hier+aber+auch+ausf%C3%BChrliche+Rezensionen+zu+Thrillern%2C+Krimis%2C+H%C3%B6rb%C3%BCchern%2C+Philosophie%2C+Esoterik%2C+Grenzwissenschaften%2C+Historienromanen%2C+Zeitgeschichte+und+Gesellschaftskritik+und+vielem+mehr.+Wir+hoffen%2C+dass+ihr+Freude+daran+habt%2C+euch+durch+unsere+Internetbibliothek+zu+st%C3%B6bern%2C+das+noch+so+jung+ist%2C+wie+wir+selbst+geblieben+sind.+In+diesem+Sinne+w%C3%BCnschen+wir+euch+Buchw%C3%BCrmern+einen+gesegneten+Appetit.++';
					                                                                    
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 */					                                                            
