/* [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','128529',jdecode('Got+a+Strong+Marriage%3F'),jdecode(''),'/128529.html','true',[],''],
	['PAGE','106617',jdecode('CoupleWise+Seminar'),jdecode(''),'/106617.html','true',[],''],
	['PAGE','6955',jdecode('Couples+Coaching'),jdecode(''),'/6955.html','true',[],''],
	['PAGE','6928',jdecode('Classes+%26+Presentations'),jdecode(''),'/6928/index.html','true',[ 
		['PAGE','130387',jdecode('Financial+Harmony+'),jdecode(''),'/6928/130387.html','true',[],'']
	],''],
	['PAGE','12586',jdecode('Frequently+Asked+Questions'),jdecode(''),'/12586.html','true',[],''],
	['PAGE','103217',jdecode('Fees'),jdecode(''),'/103217.html','true',[],''],
	['PAGE','7009',jdecode('To+Contact+Us+%26+Get+Started'),jdecode(''),'/7009.html','true',[],''],
	['PAGE','12524',jdecode('Training+%26+Consulting'),jdecode(''),'/12524.html','true',[],''],
	['PAGE','104303',jdecode('Helpful+Tips+%26+Info'),jdecode(''),'/104303/index.html','true',[ 
		['PAGE','104148',jdecode('For+Singles'),jdecode(''),'/104303/104148.html','true',[],''],
		['PAGE','12648',jdecode('Quotes+on+Love'),jdecode(''),'/104303/12648.html','true',[],''],
		['PAGE','104272',jdecode('Quotes+on+Sexuality'),jdecode(''),'/104303/104272.html','true',[],''],
		['PAGE','104334',jdecode('Quotes+on+Marriage'),jdecode(''),'/104303/104334.html','true',[],'']
	],''],
	['PAGE','12555',jdecode('Good+Books+%26+Links'),jdecode(''),'/12555.html','true',[],''],
	['PAGE','12617',jdecode('What+People+Say'),jdecode(''),'/12617.html','true',[],''],
	['PAGE','6982',jdecode('About+our+Programs'),jdecode(''),'/6982.html','true',[],''],
	['PAGE','6901',jdecode('About+John+Williams+%26+CLC'),jdecode(''),'/6901.html','true',[],''],
	['PAGE','4436',jdecode('Home'),jdecode(''),'/4436.html','true',[],'']];
var siteelementCount=19;
theSitetree.topTemplateName='Alpha';
					                                                                    
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 */					                                                            

