/* [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 POS_TARGET=8;
var theSitetree=[ 
	['PAGE','42',jdecode('Home'),jdecode(''), jdecode('%2F42.html'), 'true',[],'',''],
	['PAGE','407',jdecode('About+us'),jdecode(''), jdecode('%2F407.html'), 'true',[],'',''],
	['PAGE','416',jdecode('Health+%26+Wellness+Programs+'),jdecode(''), jdecode('%2F416%2Findex.html'), 'true',[ 
		['PAGE','425',jdecode('Lose+Weight+with+Hypnosis+'),jdecode(''), jdecode('%2F416%2F425.html'), 'true',[],'',''],
		['PAGE','434',jdecode('+Stop+Smoking++with+Hypnosis+'),jdecode(''), jdecode('%2F416%2F434.html'), 'true',[],'',''],
		['PAGE','443',jdecode('Learn+How+to+Manage+Stress'),jdecode(''), jdecode('%2F416%2F443.html'), 'true',[],'','']
	],'',''],
	['PAGE','862',jdecode('+Marriage+Counseling'),jdecode(''), jdecode('%2F862.html'), 'true',[],'',''],
	['PAGE','9201',jdecode('Premarital+Counseling'),jdecode(''), jdecode('%2F9201.html'), 'true',[],'',''],
	['PAGE','1200',jdecode('Family+Counseling'),jdecode(''), jdecode('%2F1200.html'), 'true',[],'',''],
	['PAGE','880',jdecode('Individual+Counseling'),jdecode(''), jdecode('%2F880.html'), 'true',[],'',''],
	['PAGE','5118',jdecode('Eating+Disorders+Program'),jdecode(''), jdecode('%2F5118.html'), 'true',[],'',''],
	['PAGE','13401',jdecode('Substance+Abuse+Program'),jdecode(''), jdecode('%2F13401.html'), 'true',[],'',''],
	['PAGE','7301',jdecode('Self-esteem+Program'),jdecode(''), jdecode('%2F7301.html'), 'true',[],'',''],
	['PAGE','700',jdecode('Contact'),jdecode(''), jdecode('%2F700.html'), 'true',[],'',''],
	['PAGE','3470',jdecode('Testimonials'),jdecode(''), jdecode('%2F3470.html'), 'true',[],'',''],
	['PAGE','1028',jdecode('How+to+Find+Us'),jdecode(''), jdecode('%2F1028.html'), 'true',[],'',''],
	['PAGE','2140',jdecode('Articles+%26+Resource+Links'),jdecode(''), jdecode('%2F2140%2Findex.html'), 'true',[ 
		['PAGE','3108',jdecode('FAQ+ABOUT+HYPNOSIS'),jdecode(''), jdecode('%2F2140%2F3108.html'), 'true',[],'',''],
		['PAGE','20723',jdecode('Article%3A+Help+for+Panic+Disorder'),jdecode(''), jdecode('%2F2140%2F20723.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 localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'hps_testtown',
  product: 'WSCSYSSSSLYTC245'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Easylife',
				paletteFamily: 	'B650B7',
				keyvisualId: 	'5817',
				keyvisualName: 	'kv_5817.jpg',
				fontsetId: 		'11096',
				graphicsetId: 	'11870',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				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: '20101215-103730'
};
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: '20101215-110546'
};
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: '20110805-115159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20723',
internalId:  '',
customField: '20111030-200303'
};
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: '20110805-113831'
};
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 webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050IN3X2E';
var companyName   = 'LifeDimensions++.+.+.Pathways+to+Change';
var htmlTitle	  = 'Counseling%2C+marriage%2C+family+counseling%2C+hypnosis+%2C+eating+disorders%2C+alcohol+abuse%2C+drug+abuse%2C+DWI';
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();
};

