/* [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','192',jdecode('Eingang'),jdecode(''),'/192.html','true',[],''],
	['PAGE','5038',jdecode('Netzwerk'),jdecode(''),'/5038.html','true',[],''],
	['PAGE','1816',jdecode('Feedback'),jdecode(''),'/1816/index.html','true',[ 
		['PAGE','2077',jdecode('contact+%28Folgeseite%29'),jdecode(''),'/1816/2077.html','false',[],'']
	],'']];
var siteelementCount=4;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='555454';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10555';
theSitetree.graphicsetId='10892';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Alpha',
				paletteFamily: 	'555454',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10555',
				graphicsetId: 	'10892',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'555454',
				e_color: 		'555454',
				f_color: 		'555454',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1001']={
webappId:    '1001',
documentId:  '1816',
internalId:  'agt010inxe0a108f77c95a8',
customField: ''
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '2077',
internalId:  'agt010inxe0a108f77c95a8',
customField: 'followUp'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '192',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '192',
internalId:  '',
customField: '20060128-211237'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '5038',
internalId:  '',
customField: '20080902-160136'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '1816',
internalId:  '',
customField: '20060128-211102'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '2077',
internalId:  '',
customField: '20060123-144051'
};
var canonHostname = 'localhost.localdomain';
var accountId     = 'AGT010INXE0A';
var companyName   = 'toshy.ch';
var htmlTitle	  = 'toshy.ch';
var metaKeywords  = 'toshy%2C+ch%2C+blog%2C+weblog%2C+web%2C+log%2C+sex%2C+drug%2C+drugs%2C+rock%2C+roll%2C+rocknroll%2C+rock+nroll%2C+bomb%2C+sexbomb%2C+google%2C+britney%2C+retter+der+welt%2C+retter%2C+welt%2C+k%C3%B6nig%2C+erde%2C+k%C3%B6nig+der+erde%2C+sexy%2C+cool%2C+fool%2C+happy%2C+i+am+so+sexy+i+am+so+cool+i+am+so+happy+i+am+a+fool%2C+trojanisches%2C+suppenhuhn%2C+crazy%2C+elvis%2C+christina%2C+blog%2C+porn%2C+porno%2C+movie%2C+mp3%2C+mp4%2C+free%2C+download%2C+googel%2C+flickr%2C+xing%2C+poker%2C+star%2C+pokerstar%2C+pornstar%2C+wong%2C+mister%2C+mister+wong%2C+wordpress';
var metaContents  = 'toshy.ch+-+i+am+so+sexy+i+am+so+cool+iam+so+happy+i+am+a+fool.';
					                                                                    
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 */					                                                            
