/* [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','32',jdecode('Home'),jdecode(''),'/32.html','true',[],''],
	['PAGE','53',jdecode('My+Bikes'),jdecode(''),'/53/index.html','true',[ 
		['PAGE','62',jdecode('My+Old+Bikes'),jdecode(''),'/53/62.html','true',[],''],
		['PAGE','71',jdecode('My+Bike+Now'),jdecode(''),'/53/71.html','true',[],''],
		['PAGE','80',jdecode('My+Dream+Bikes'),jdecode(''),'/53/80.html','true',[],'']
	],''],
	['PAGE','1235',jdecode('Photo+Albums'),jdecode(''),'/1235/index.html','true',[ 
		['PAGE','1223',jdecode('Jumps'),jdecode(''),'/1235/1223.html','true',[],''],
		['PAGE','1660',jdecode('Trails'),jdecode(''),'/1235/1660.html','true',[],''],
		['PAGE','1761',jdecode('Top+Secret'),jdecode(''),'/1235/1761.html','true',[],'']
	],''],
	['PAGE','107',jdecode('Favorite+Links'),jdecode(''),'/107.html','true',[],''],
	['PAGE','1916',jdecode('Forum'),jdecode(''),'/1916.html','true',[],''],
	['PAGE','1185',jdecode('Guestbook'),jdecode(''),'/1185/index.html','true',[ 
		['PAGE','1184',jdecode('Read+Guestbook'),jdecode(''),'/1185/1184.html','true',[],'']
	],''],
	['PAGE','116',jdecode('About+Me'),jdecode(''),'/116.html','true',[],''],
	['PAGE','125',jdecode('Contact+Me'),jdecode(''),'/125/index.html','true',[ 
		['PAGE','1342',jdecode('Contact+Me+%28follow+up+page%29'),jdecode(''),'/125/1342.html','false',[],'']
	],''],
	['PAGE','12923',jdecode('Map'),jdecode(''),'/12923.html','true',[],'']];
var siteelementCount=17;
theSitetree.topTemplateName='Stylus';
theSitetree.paletteFamily='b5d3b5';
theSitetree.keyvisualId='1984';
theSitetree.keyvisualName='mtb.jpg';
theSitetree.fontsetId='328';
theSitetree.graphicsetId='384';
theSitetree.contentColor='666666';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Stylus',
				paletteFamily: 	'b5d3b5',
				keyvisualId: 	'1984',
				keyvisualName: 	'mtb.jpg',
				fontsetId: 		'328',
				graphicsetId: 	'384',
				contentColor: 	'666666',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				a_color: 		'b5d3b5',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1006']={
webappId:    '1006',
documentId:  '32',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']={
webappId:    '1002',
documentId:  '1185',
internalId:  '1185awh010inxssk',
customField: 'action=form&icq=false'
};
webappMappings['1002']={
webappId:    '1002',
documentId:  '1184',
internalId:  '1185awh010inxssk',
customField: 'action=list'
};
webappMappings['1007']={
webappId:    '1007',
documentId:  '1223',
internalId:  '104d058f8f6',
customField: 'g.10j84tsl9.lf2l2tm6t5.b8'
};
webappMappings['1005']={
webappId:    '1005',
documentId:  '32',
internalId:  '104d04ebeee.96a8e4e4',
customField: 'en:US:'
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '125',
internalId:  'awh010inxssk104d06a6858',
customField: ''
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '1342',
internalId:  'awh010inxssk104d06a6858',
customField: 'followUp'
};
webappMappings['1007']={
webappId:    '1007',
documentId:  '1660',
internalId:  '104d40e97e2',
customField: 'g.10j9vnjqv.63hqevks4tv.b8'
};
webappMappings['1007']={
webappId:    '1007',
documentId:  '1761',
internalId:  '104d4338e66',
customField: 'g.10ja2tks8.207hl8bfp0.b8'
};
webappMappings['1501']={
webappId:    '1501',
documentId:  '32',
internalId:  '473',
customField: '1501'
};
webappMappings['1003']={
webappId:    '1003',
documentId:  '1916',
internalId:  'awh010inxssk104e773790f',
customField: 'en:US:'
};
webappMappings['2001']={
webappId:    '2001',
documentId:  '12923',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
var canonHostname = 'cm4all.west-datacenter.net';
var accountId     = 'AWH010INXSSK';
var companyName   = 'The+Bike+Fanatic';
var htmlTitle	  = 'The+Bike+Fanatic+-+crazy+about+mountain+biking';
var metaKeywords  = 'the+bike+fanatic%2C+bike%2C+mountain+biking%2C+freeride%2C+utah';
var metaContents  = 'The+Bike+Fanatic';
					                                                                    
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 */					                                                            
