/* [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','index',jdecode('Home'),jdecode(''),'/index.html','true',[],''],
	['PAGE','purchase',jdecode('Purchase+the+Book'),jdecode(''),'/purchase.html','true',[],''],
	['PAGE','book',jdecode('About+the+Book'),jdecode(''),'/book.html','true',[],''],
	['PAGE','author',jdecode('About+the+Author'),jdecode(''),'/author.html','true',[],''],
	['PAGE','6543',jdecode('Share+Your+Story'),jdecode(''),'/6543/index.html','true',[ 
	['PAGE','7901',jdecode('Submit+Your+Story+%28follow+up+page%29'),jdecode(''),'/6543/7901.html','true',[],'']
	],''],
	['PAGE','charity',jdecode('Our+Charity+Partner'),jdecode(''),'/partner.html','true',[],''],
	['PAGE','contact',jdecode('Contact'),jdecode(''),'/contact.html','true',[],''],
	['PAGE','6585',jdecode('Press+Room'),jdecode(''),'/6585/index.html','true',[ 
			['PAGE','6627',jdecode('Media+Contact'),jdecode(''),'/6585/6627.html','true',[],'']
	],'']];
var siteelementCount=11;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='479949';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10556';
theSitetree.graphicsetId='10895';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Alpha',
				paletteFamily: 	'479949',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10556',
				graphicsetId: 	'10895',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'479949',
				e_color: 		'479949',
				f_color: 		'479949',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1001']={
webappId:    '1001',
documentId:  '6543',
internalId:  'ahw050in316u11b201744d1',
customField: ''
};
webappMappings['1001']={
webappId:    '1001',
documentId:  '7901',
internalId:  'ahw050in316u11b201744d1',
customField: 'followUp'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  'home',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050IN316U';
var companyName   = '';
var htmlTitle	  = 'Grandparent+Book+of+Names';
var metaKeywords  = 'grandparent+names%2C+grandparent+books%2C+grandparent+name%2C+new+grandparent+information%2C+first-time+grandparent%2C+new+grandparent%2C+names+for+grandparents%2C+Lauren+Charpio%2C+traditional+grandparent+names%2C+cultural+grandparent+names%2C+list+of+grandparent+names';
var metaContents  = 'grandparent+names%2C+grandparent+books%2C+grandparent+name%2C+grandparent+book%2C+what+to+call+a+grandparent%2C+first-time+grandparents%2C+Lauren+Charpio%2C+names+for+grandparents%2C+new+grandparents%2C+list+of+grandparent+names%2C+cultural+grandparent+names%2C+traditional+grandparent+names';
					                                                                    
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 */					                                                            
