/* [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','42',jdecode('Home'),jdecode(''),'/42.html','true',[],''],
	['PAGE','407',jdecode('About+us'),jdecode(''),'/407.html','true',[],''],
	['PAGE','416',jdecode('Health+%26+Wellness+Programs+'),jdecode(''),'/416/index.html','true',[ 
		['PAGE','425',jdecode('Weight+Mangement++'),jdecode(''),'/416/425.html','true',[],''],
		['PAGE','434',jdecode('Smoking++Sessation+'),jdecode(''),'/416/434.html','true',[],''],
		['PAGE','443',jdecode('Stress+Management'),jdecode(''),'/416/443.html','true',[],'']
	],''],
	['PAGE','862',jdecode('+Marriage+Counseling'),jdecode(''),'/862.html','true',[],''],
	['PAGE','9201',jdecode('Premarital+Counseling'),jdecode(''),'/9201.html','true',[],''],
	['PAGE','1200',jdecode('Family+Counseling'),jdecode(''),'/1200.html','true',[],''],
	['PAGE','880',jdecode('Individual+Counseling'),jdecode(''),'/880.html','true',[],''],
	['PAGE','5118',jdecode('Eating+Disorders+Program'),jdecode(''),'/5118/index.html','true',[ 
		['PAGE','10901',jdecode('+FREE++SUPPORT+GROUP'),jdecode(''),'/5118/10901.html','true',[],'']
	],''],
	['PAGE','13401',jdecode('Substance+Abuse+Program'),jdecode(''),'/13401.html','true',[],''],
	['PAGE','7301',jdecode('Self-esteem+Program'),jdecode(''),'/7301.html','true',[],''],
	['PAGE','700',jdecode('Contact'),jdecode(''),'/700.html','true',[],''],
	['PAGE','3470',jdecode('Testimonials'),jdecode(''),'/3470.html','true',[],''],
	['PAGE','1028',jdecode('How+to+Find+Us'),jdecode(''),'/1028.html','true',[],''],
	['PAGE','2140',jdecode('Resource+Links'),jdecode(''),'/2140.html','true',[],''],
	['PAGE','3108',jdecode('Hypnosis++FAQ'),jdecode(''),'/3108.html','true',[],'']];
var siteelementCount=19;
theSitetree.topTemplateName='Easylife';
theSitetree.paletteFamily='B650B7';
theSitetree.keyvisualId='5817';
theSitetree.keyvisualName='kv_5817.jpg';
theSitetree.fontsetId='11096';
theSitetree.graphicsetId='11870';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Easylife',
				paletteFamily: 	'B650B7',
				keyvisualId: 	'5817',
				keyvisualName: 	'kv_5817.jpg',
				fontsetId: 		'11096',
				graphicsetId: 	'11870',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '407',
internalId:  '',
customField: '20090828-140846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13401',
internalId:  '',
customField: '20100327-125422'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '42',
internalId:  '1006',
customField: '1006'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '1028',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42',
internalId:  '',
customField: '20080523-155304'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '416',
internalId:  '',
customField: '20070412-042308'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '425',
internalId:  '',
customField: '20070412-042608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '434',
internalId:  '',
customField: '20070412-040356'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '443',
internalId:  '',
customField: '20061009-143456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '862',
internalId:  '',
customField: '20061031-035722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1200',
internalId:  '',
customField: '20061031-040122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '880',
internalId:  '',
customField: '20081103-103406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5118',
internalId:  '',
customField: '20081103-103741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '700',
internalId:  '',
customField: '20061009-144755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3470',
internalId:  '',
customField: '20090721-112516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10901',
internalId:  '',
customField: '20090828-140938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9201',
internalId:  '',
customField: '20090424-145525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1028',
internalId:  '',
customField: '20061009-145118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2140',
internalId:  '',
customField: '20090409-145719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3108',
internalId:  '',
customField: '20070813-150508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7301',
internalId:  '',
customField: '20090527-143525'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050IN3X2E';
var companyName   = 'LifeDimensions++.+.+.Pathways+to+Change';
var htmlTitle	  = 'Counseling%2C+marriage+family+counseling%2C+psychotherapy%2C+eating+disroders%2C+hypnosis%2C%2C+stress+management';
var metaKeywords  = 'counseling%2C+psychotherapy%2C+hypnosis%2C+CBT%2C+marriage+and+family+counseling%2C+management+stress%2C+weight+lost%2C+anger+management%2C+gigong%2C+Ti+Chi%2C+addiction+treatment%2C+obesity%2C+quit+smoking%2C+co+dependency%2C+depression%2C+anxiety%2C+PTSD%2C+divorce%2C+children+behavior+problems%2C++eating+disorders%2C+++sexual+abuse%2C++death+of+a+child%2C+death+of+a+parent%2C+divorce%2C+dimestic+violence%2C++phobia%2C+gambling+addiction%2C+EFT';
var metaContents  = 'Gretna%2C+Marrero%2C+Harvey%2C+Algiers+Counseling+service.++Specializing+in+Marriage+and+Family+Counseling%2C+Psychotherapy.+Also+provide+hypnotherapy%2C+stress+management%2C+weight+lost%2C+eating+disorders%2C+and+quit+smoking+programs+to+business+and+individuals.';
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();
};
