/* [nodename, id, name, navigationtext, href, isnavigation, childs[], templatename] */

if (typeof(decodeURIComponent) == 'undefined') {
  decodeURIComponent = function(s) {
    return unescape(s);
  }
}

function jdecode(s) {
    s = s.replace(/\+/g, "%20")
    return decodeURIComponent(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/index.html','true',[ 
		['PAGE','4083',jdecode('Events'),jdecode(''),'/32/4083.html','true',[],''],
		['PAGE','2300',jdecode('Contact+Me'),jdecode(''),'/32/2300.html','true',[],''],
		['PAGE','3203',jdecode('Vulnerability+to+Influence'),jdecode(''),'/32/3203.html','true',[],''],
		['PAGE','3212',jdecode('Personal+Rights'),jdecode(''),'/32/3212.html','true',[],''],
		['PAGE','3221',jdecode('Intimacy+and+Relationships'),jdecode(''),'/32/3221.html','true',[],'']
	],''],
	['PAGE','53',jdecode('+My+Work+and+Experience'),jdecode(''),'/53/index.html','true',[ 
		['PAGE','507',jdecode('Contact+Me'),jdecode(''),'/53/507.html','true',[],''],
		['PAGE','2554',jdecode('Informative+Websites'),jdecode(''),'/53/2554.html','true',[],'']
	],''],
	['PAGE','11801',jdecode('Recovery+and+Change'),jdecode(''),'/11801.html','true',[],''],
	['PAGE','3345',jdecode('Group+Therapy'),jdecode(''),'/3345.html','true',[],''],
	['PAGE','489',jdecode('Motherless+Daughters'),jdecode(''),'/489/index.html','true',[ 
		['PAGE','2291',jdecode('%22When+Mom+Dies...%22'),jdecode(''),'/489/2291.html','true',[],''],
		['PAGE','2563',jdecode('Helpful+Websites'),jdecode(''),'/489/2563.html','true',[],''],
		['PAGE','2627',jdecode('Recommended+Reading'),jdecode(''),'/489/2627.html','true',[],'']
	],''],
	['PAGE','1447',jdecode('Groups+Identified+As+Cults'),jdecode(''),'/1447/index.html','true',[ 
		['PAGE','2572',jdecode('Helpful+Websites'),jdecode(''),'/1447/2572.html','true',[],''],
		['PAGE','2636',jdecode('Recommended+Reading'),jdecode(''),'/1447/2636.html','true',[],''],
		['PAGE','2995',jdecode('Published+Articles'),jdecode(''),'/1447/2995.html','true',[],'']
	],''],
	['PAGE','3057',jdecode('Directions'),jdecode(''),'/3057.html','true',[],'']];
var siteelementCount=20;
theSitetree.topTemplateName='Animal';
theSitetree.paletteFamily='3468BD';
theSitetree.keyvisualId='4293';
theSitetree.keyvisualName='kv_4293.jpg';
theSitetree.fontsetId='10789';
theSitetree.graphicsetId='11209';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='D8E0ED';
var theTemplate={
				name: 			'Animal',
				paletteFamily: 	'3468BD',
				keyvisualId: 	'4293',
				keyvisualName: 	'kv_4293.jpg',
				fontsetId: 		'10789',
				graphicsetId: 	'11209',
				contentColor: 	'000000',
				contentBGColor: 'D8E0ED',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'3468BD',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '3057',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '32',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32',
internalId:  '',
customField: '20100210-173311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53',
internalId:  '',
customField: '20100107-202414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11801',
internalId:  '',
customField: '20091118-202502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1447',
internalId:  '',
customField: '20100107-203055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2300',
internalId:  '',
customField: '20100210-174856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4083',
internalId:  '',
customField: '20100219-154716'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3221',
internalId:  '',
customField: '20090102-204829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3345',
internalId:  '',
customField: '20090102-210047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3057',
internalId:  '',
customField: '20090102-205400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '489',
internalId:  '',
customField: '20090524-043336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3203',
internalId:  '',
customField: '20080323-010117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3212',
internalId:  '',
customField: '20080323-010331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2554',
internalId:  '',
customField: '20080328-061454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '507',
internalId:  '',
customField: '20080312-153943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2563',
internalId:  '',
customField: '20080328-062107'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2627',
internalId:  '',
customField: '20080709-200426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2291',
internalId:  '',
customField: '20090524-044029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2572',
internalId:  '',
customField: '20100107-203249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2636',
internalId:  '',
customField: '20080312-220813'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2995',
internalId:  '',
customField: '20081011-202956'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INX2MN';
var companyName   = 'TherapyHelp';
var htmlTitle	  = 'TherapyHelp%2FColleen+Russell%2C+MA%2C+LMFT%2C+CGP';
var metaKeywords  = 'Psychotherapy%2C+Couple+Counseling%2C+Cult%2C+Motherless+Daughters%2C+Loss%2C+Trauma%2C+High-Demand+Groups%2C+Relationships%2C+Marriage%2C+Abuse%2C+Recovery%2C+Healing%2C+Group+Therapy%2C+Healthy+Patterns%2C+Guilt%2C+Shame%2C+Inaccurate%2C+Self-Limiting+Beliefs.';
var metaContents  = 'Psychotherapy%2C+Couple+Counseling%2C+Cult+Recovery%2C+Motherless+Daughters%2C+Loss+and+Grief%2C+Healing+From+Trauma%2C+Childhood+Abuse%2C+Healthy+Lifestyle%2C+Connecting+to+Self%2C+Sexual+Abuse%2C+Abusive+Relationships%2C+Authoritarian+High-Demand+Groups%2C+Mental+Health+Professional%2C+Phone+Consultations%2C+Phone+Sessions%2C+Group+Therapy%2C++Certified+Group+Psychotherapist%2C+San+Francisco+Bay+Area%2C+Inaccurate%2C+Self-Limiting+Beliefs.';
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;
};

theSitetree.getByXx = function(lookup, xx, ar) {
    if (typeof(ar) == 'undefined'){
    	ar = this;
    }
    for (var i=0; i < ar.length; i++) {
        if (ar[i][xx] == lookup){
        	return ar[i];
        }
        if (ar[i][POS_CHILDS].length > 0) {
        	var result=this.getByXx(lookup, xx, ar[i][POS_CHILDS]);
            if (result != null){
                return result;
               }
        }
    }
    return null;
};

function gotoPage(lookup) {
	if(__path_prefix__ == "/servlet/CMServeRES" && typeof (changePage) == 'function'){
		changePage(lookup);
		return;
	}
	var page = theSitetree.getHREF(lookup);
	if (!page) {
		var testFor = [ POS_NAME, POS_NAVIGATIONTEXT ];
		for (var i=0 ; i < testFor.length ; i++) {
			var p = theSitetree.getByXx(lookup, testFor[i]);
			if (p != null) {
				page = p[POS_HREF];
				break;
			}
		}
	}
	document.location.href = (new URL(__path_prefix__ + page, true, true)).toString();
};
