/* [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','13001',jdecode('Home'),jdecode(''),'/13001.html','true',[],'',''],
	['PAGE','10601',jdecode('About+us'),jdecode(''),'/10601.html','true',[],'',''],
	['PAGE','10622',jdecode('Hypnosis'),jdecode(''),'/10622.html','true',[],'',''],
	['PAGE','20301',jdecode('Coaching'),jdecode(''),'/20301.html','true',[],'',''],
	['PAGE','27501',jdecode('Healthy+Body'),jdecode(''),'/27501.html','true',[],'',''],
	['PAGE','10664',jdecode('Contact'),jdecode(''),'/10664.html','true',[],'',''],
	['PAGE','12164',jdecode('Consultation'),jdecode(''),'/12164.html','true',[],'',''],
	['PAGE','24901',jdecode('Current+courses'),jdecode(''),'/24901/index.html','true',[ 
		['PAGE','12206',jdecode('Energy+In+Motion'),jdecode(''),'/24901/12206.html','true',[],'',''],
		['PAGE','12227',jdecode('Inner+Peace'),jdecode(''),'/24901/12227.html','true',[],'',''],
		['PAGE','12248',jdecode('Achieve+Your+Potential'),jdecode(''),'/24901/12248.html','true',[],'','']
	],'',''],
	['PAGE','26801',jdecode('Catalog'),jdecode(''),'/26801.html','true',[],'',''],
	['PAGE','10643',jdecode('News'),jdecode(''),'/10643.html','true',[],'',''],
	['PAGE','12185',jdecode('Bulletin+board'),jdecode(''),'/12185.html','true',[],'',''],
	['PAGE','42001',jdecode('Hypnosis+World+Summit'),jdecode(''),'/42001.html','true',[],'','']];
var siteelementCount=15;
theSitetree.topTemplateName='Steps';
theSitetree.paletteFamily='315881';
theSitetree.keyvisualId='2263';
theSitetree.keyvisualName='culture.jpg';
theSitetree.fontsetId='367';
theSitetree.graphicsetId='419';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='315881';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Steps',
				paletteFamily: 	'315881',
				keyvisualId: 	'2263',
				keyvisualName: 	'culture.jpg',
				fontsetId: 		'367',
				graphicsetId: 	'419',
				contentColor: 	'FFFFFF',
				contentBGColor: '315881',
				a_color: 		'315881',
				b_color: 		'2985B5',
				c_color: 		'3366CC',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '13001',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20301',
internalId:  '',
customField: '20091228-134912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10601',
internalId:  '',
customField: '20091228-131517'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10622',
internalId:  '',
customField: '20091228-134226'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10643',
internalId:  '',
customField: '20100503-120033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10664',
internalId:  '',
customField: '20091228-134328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27501',
internalId:  '',
customField: '20091228-140241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26801',
internalId:  '',
customField: '20090909-122448'
};
webappMappings['1003']=webappMappings['1003-ahw050ine95d12339705306']={
webappId:    '1003',
documentId:  '24901',
internalId:  'ahw050ine95d12339705306',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12164',
internalId:  '',
customField: '20091228-134035'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12185',
internalId:  '',
customField: '20090130-111905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12206',
internalId:  '',
customField: '20091228-124353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12227',
internalId:  '',
customField: '20090828-140949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12248',
internalId:  '',
customField: '20091228-124827'
};
webappMappings['7008']=webappMappings['7008-1642']={
webappId:    '7008',
documentId:  '13001',
internalId:  '1642',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13001',
internalId:  '',
customField: '20091228-132536'
};
webappMappings['1501']=webappMappings['1501-5097688']={
webappId:    '1501',
documentId:  '13001',
internalId:  '5097688',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24901',
internalId:  '',
customField: '20100503-121857'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42001',
internalId:  '',
customField: '20100503-120750'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INE95D';
var companyName   = '++++++New+Horizons+HC+';
var htmlTitle	  = 'Hypnosis+and+Life+Coach%2Cachieve+your+goals%2C+manage+stress%2Cstop+smoking%2Cmanage+weight%2C+%26+more';
var metaKeywords  = 'Hypnosis%2CLife+Coach%2CAchieve+goals%2C+Stress+Management%2C+Confidence%2C+Personal+Growth%2C+Spiritual+Growth.+Increase+financial+income.';
var metaContents  = 'Personal+Development.++Remove+blocks+and+limitations+that+are+holding+you+back+from+achieving+your+goals+and+outcomes+in+life.+Feel+empowered%2C+confident%2C+creative%2C+and+so+much+more.+When+we+change+our+thoughts+we+change+our+lives.+Change+begins+Within+';
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();
};
