/* [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','home',jdecode('home'),jdecode('Home'),'/home.shtml','',[],''],
	['PAGE','ueberuns',jdecode('aboutus'),jdecode('%C3%9Cber+uns'),'/ueberuns.shtml','',[],''],
	['PAGE','termine',jdecode('termine'),jdecode('Termine'),'/termine.shtml','',[],''],
	['PAGE','ergebnisse',jdecode('ergebnisse'),jdecode('Ergebnisse'),'/ergebnisse.shtml','',[],''],
	['PAGE','aktuelles',jdecode('blog'),jdecode('Aktuelles'),'/aktuelles.shtml','',[],''],
	['PAGE','mitglieder',jdecode('mitglieder'),jdecode('Mitglieder'),'/mitglieder.shtml','',[],''],
	['PAGE','album',jdecode('album'),jdecode('Fotos+und+Videos'),'/album.shtml','',[],''],
	['PAGE','links',jdecode('links'),jdecode('Links'),'/links.shtml','',[],''],
	['PAGE','gaestebuch',jdecode('gaestebuch'),jdecode('Unser+G%C3%A4stebuch'),'/gaestebuch.shtml','',[],''],
	['PAGE','kontakt',jdecode('kontakt'),jdecode('Kontakt'),'/kontakt.shtml','',[],''],
	['PAGE','anfahrt',jdecode('karte'),jdecode('Anfahrt'),'/anfahrt.shtml','',[],'']];
var siteelementCount=11;
theSitetree.topTemplateName='Sportfan2';
theSitetree.paletteFamily='D8D5FD';
theSitetree.keyvisualId='10133';
theSitetree.keyvisualName='kv_10133.jpg';
theSitetree.fontsetId='21088';
theSitetree.graphicsetId='13185';
theSitetree.contentColor='464646';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
  name: 			      'Sportfan2',
	 paletteFamily: 	  'D8D5FD',
	 keyvisualId: 	      '10133',
	 keyvisualName: 	  'kv_10133.jpg',
	 fontsetId: 		  '21088',
	 graphicsetId: 	      '13185',
	 contentColor: 	      '464646',
	 contentBGColor:      'FFFFFF',
	 hasFlashNavigation:  'false',
	 hasFlashLogo: 	      'false',
	 hasFlashCompanyname: 'false',
	 hasFlashElements:    'false',
	 hasCompanyname:      'false',
	 a_color: 		      '000000',
	 b_color: 		      '000000',
	 c_color: 		      '000000',
	 d_color: 		      '000000',
	 e_color: 		      '000000',
	 f_color: 		      '000000',
	 g_color: 		      'FFFFFF',
	 h_color: 		      'FFFFFF',
	 i_color: 		      'FFFFFF',
	 j_color: 		      'FFFFFF',
	 hasCustomLogo: 	  '?',
	 contentFontFace:     'Verdana, Arial, Helvetica, sans-serif',
	 contentFontSize:     '12'
};
var coho = {
  multipleDesignMode:  'false',
	 designDefinition: 	  'subcategory_id=DE06-04&design_name=sportfan2&hexname=D8D5FD&keyvisual_id=10133&palette_id=19582&graphicset_id=13185&fontset_id=21088',
	 TERM_END: 	          ''
};
var canonHostname = 'UNRESOLVED';
var accountId     = 'AHP01NXXXNLU';
var companyName   = '';
var htmlTitle	  = '';
var metaKeywords  = '';
var metaContents  = '';
					                                                                    
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 */					                                                            
