/* [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','4436',jdecode('Home'),jdecode(''),'/4436.html','true',[],''],
	['PAGE','17224',jdecode('How+Do+I+Order%3F'),jdecode(''),'/17224.html','true',[],''],
	['PAGE','14402',jdecode('Are+You+Afraid%3F'),jdecode(''),'/14402.html','true',[],''],
	['PAGE','8328',jdecode('Revelation+Chapter+1'),jdecode(''),'/8328.html','true',[],''],
	['PAGE','8355',jdecode('Revelation+Chapter+2'),jdecode(''),'/8355.html','true',[],''],
	['PAGE','8382',jdecode('Revelation+Chapter+3'),jdecode(''),'/8382.html','true',[],''],
	['PAGE','8409',jdecode('Revelation+Chapter+4'),jdecode(''),'/8409.html','true',[],''],
	['PAGE','13601',jdecode('Revelation+Chapter+5'),jdecode(''),'/13601.html','true',[],''],
	['PAGE','13632',jdecode('Revelation+Chapter+6'),jdecode(''),'/13632.html','true',[],''],
	['PAGE','13663',jdecode('Revelation+Chapter+7'),jdecode(''),'/13663.html','true',[],''],
	['PAGE','13694',jdecode('Revelation+Chapter+8'),jdecode(''),'/13694.html','true',[],''],
	['PAGE','13801',jdecode('Revelation+Chapter+9'),jdecode(''),'/13801.html','true',[],''],
	['PAGE','13832',jdecode('Revelation+Chapter+10'),jdecode(''),'/13832.html','true',[],''],
	['PAGE','13863',jdecode('Revelation+Chapter+11'),jdecode(''),'/13863.html','true',[],''],
	['PAGE','13894',jdecode('Revelation+Chapter+12'),jdecode(''),'/13894.html','true',[],''],
	['PAGE','13925',jdecode('Revelation+Chapter+13'),jdecode(''),'/13925.html','true',[],''],
	['PAGE','13956',jdecode('Revelation+Chapter+14'),jdecode(''),'/13956.html','true',[],''],
	['PAGE','13987',jdecode('Revelation+Chapter+15'),jdecode(''),'/13987.html','true',[],''],
	['PAGE','14018',jdecode('Revelation+Chapter+16'),jdecode(''),'/14018.html','true',[],''],
	['PAGE','14049',jdecode('Revelation+Chapter+17'),jdecode(''),'/14049.html','true',[],''],
	['PAGE','14080',jdecode('Revelation+Chapter+18'),jdecode(''),'/14080.html','true',[],''],
	['PAGE','14111',jdecode('Revelation+Chapter+19'),jdecode(''),'/14111.html','true',[],''],
	['PAGE','14142',jdecode('Revelation+Chapter+20'),jdecode(''),'/14142.html','true',[],''],
	['PAGE','14173',jdecode('Revelation+Chapter+21'),jdecode(''),'/14173.html','true',[],''],
	['PAGE','14204',jdecode('Revelation+Chapter+22'),jdecode(''),'/14204.html','true',[],'']];
var siteelementCount=25;
theSitetree.topTemplateName='Care';
					                                                                    
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 */					                                                            
