/* [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','1901',jdecode('Home'),jdecode(''),'/1901.html','true',[],''],
	['PAGE','1994',jdecode('About+us'),jdecode(''),'/1994/index.html','true',[ 
		['PAGE','3422',jdecode('Definitions'),jdecode(''),'/1994/3422.html','true',[],''],
		['PAGE','1973',jdecode('Contact'),jdecode(''),'/1994/1973.html','true',[],''],
		['PAGE','2015',jdecode('What+Cease+Can+Do'),jdecode(''),'/1994/2015.html','true',[],'']
	],''],
	['PAGE','25401',jdecode('Prevent+Abuse'),jdecode(''),'/25401/index.html','true',[ 
		['PAGE','3464',jdecode('Prevention+Procedures'),jdecode(''),'/25401/3464.html','true',[],''],
		['PAGE','25422',jdecode('Prevention+Links'),jdecode(''),'/25401/25422.html','true',[],'']
	],''],
	['PAGE','23701',jdecode('A+Healing+Bibliography'),jdecode(''),'/23701/index.html','true',[ 
		['PAGE','25443',jdecode('Healing+Congregations'),jdecode(''),'/23701/25443.html','true',[],''],
		['PAGE','25464',jdecode('Clergy+Sexual+Abuse'),jdecode(''),'/23701/25464.html','true',[],''],
		['PAGE','25485',jdecode('Other+Abuse+of+Power'),jdecode(''),'/23701/25485.html','true',[],'']
	],''],
	['PAGE','24801',jdecode('SDA+Church+and+Abuse'),jdecode(''),'/24801/index.html','true',[ 
		['PAGE','20501',jdecode('Reform+the+Church%21'),jdecode(''),'/24801/20501.html','true',[],''],
		['PAGE','16201',jdecode('Media+and+Press'),jdecode(''),'/24801/16201.html','true',[],''],
		['PAGE','12001',jdecode('SDA+Links'),jdecode(''),'/24801/12001.html','true',[],'']
	],''],
	['PAGE','12022',jdecode('Add%26%23x27%3Bl+Great+Resources'),jdecode(''),'/12022/index.html','true',[ 
		['PAGE','3443',jdecode('Articles'),jdecode(''),'/12022/3443.html','true',[],''],
		['PAGE','16222',jdecode('Websites'),jdecode(''),'/12022/16222.html','true',[],'']
	],'']];
var siteelementCount=19;
theSitetree.topTemplateName='Easy';
theSitetree.paletteFamily='666666';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='50';
theSitetree.graphicsetId='55';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Easy',
				paletteFamily: 	'666666',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'50',
				graphicsetId: 	'55',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'666666',
				b_color: 		'FFFFFF',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1006']={
webappId:    '1006',
documentId:  '1901',
internalId:  '1006',
customField: '1006'
};
webappMappings['1008']={
webappId:    '1008',
documentId:  '1973',
internalId:  '3221629',
customField: 'en:US:'
};
webappMappings['1005']={
webappId:    '1005',
documentId:  '1994',
internalId:  '117b8d89be9.b43f55fe',
customField: 'en:US:'
};
webappMappings['1008']={
webappId:    '1008',
documentId:  '20501',
internalId:  '3570119',
customField: 'en:US:'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0IN2CBF';
var companyName   = 'Clergy+and+Educator+Abuse+Survivors+Empowered%21';
var htmlTitle	  = 'Clergy+and+Educator+Abuse+Survivors+Empowered%21';
var metaKeywords  = 'Seventh+Day+Adventist%2C+Clergy+Sexual+Abuse%2C+CEASE+Abuse%2C+Clergy+Abuse%2C+Educator+Abuse';
var metaContents  = 'Community+of+Survivors+of+Sexual+Abuse+and+Spiritual+Abuse+within+the+Seventh-day+Adventist+Church.';
					                                                                    
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 */					                                                            
