/* [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','2601',jdecode('Home'),jdecode(''),'/2601.html','true',[],''],
	['PAGE','7022',jdecode('Coping+with+Recession'),jdecode(''),'/7022.html','true',[],''],
	['PAGE','4190',jdecode('Effective+Communication'),jdecode(''),'/4190.html','true',[],''],
	['PAGE','4022',jdecode('Health+%26+Fitness'),jdecode(''),'/4022.html','true',[],''],
	['PAGE','4043',jdecode('Lifestyle+%26+Wellness'),jdecode(''),'/4043.html','true',[],''],
	['PAGE','7043',jdecode('Money+Management'),jdecode(''),'/7043.html','true',[],''],
	['PAGE','4106',jdecode('Motivation+%26+Success'),jdecode(''),'/4106.html','true',[],''],
	['PAGE','4001',jdecode('Personal+Development'),jdecode(''),'/4001.html','true',[],''],
	['PAGE','4148',jdecode('Personal+Grooming'),jdecode(''),'/4148.html','true',[],''],
	['PAGE','2673',jdecode('Public+Speaking'),jdecode(''),'/2673.html','true',[],''],
	['PAGE','4085',jdecode('Relationships'),jdecode(''),'/4085.html','true',[],''],
	['PAGE','4064',jdecode('Sex+Life'),jdecode(''),'/4064.html','true',[],''],
	['PAGE','4127',jdecode('Time+Management'),jdecode(''),'/4127.html','true',[],''],
	['PAGE','83601',jdecode('Weight+Loss'),jdecode(''),'/83601.html','true',[],''],
	['PAGE','7064',jdecode('Work+Life+Balance'),jdecode(''),'/7064.html','true',[],''],
	['PAGE','92701',jdecode('PIH+Bookshop'),jdecode(''),'/92701.html','true',[],''],
	['PAGE','42301',jdecode('PIH+Forum'),jdecode(''),'/42301.html','true',[],''],
	['PAGE','92722',jdecode('PIH+InfoMart'),jdecode(''),'/92722.html','true',[],''],
	['PAGE','8201',jdecode('PIH+Newsletters'),jdecode(''),'/8201.html','true',[],''],
	['PAGE','32501',jdecode('My+Blog+%40+PIH'),jdecode(''),'/32501.html','true',[],''],
	['PAGE','8222',jdecode('Additional+Resources'),jdecode(''),'/8222.html','true',[],''],
	['PAGE','2778',jdecode('Contact+Us'),jdecode(''),'/2778.html','true',[],''],
	['PAGE','2652',jdecode('About+Us'),jdecode(''),'/2652.html','true',[],''],
	['PAGE','76801',jdecode('Useful+Links'),jdecode(''),'/76801.html','true',[],'']];
var siteelementCount=24;
theSitetree.topTemplateName='Case';
theSitetree.paletteFamily='82C1DC';
theSitetree.keyvisualId='11335';
theSitetree.keyvisualName='kv_11335.jpg';
theSitetree.fontsetId='31940';
theSitetree.graphicsetId='13781';
theSitetree.contentColor='003C54';
theSitetree.contentBGColor='F6FBFE';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Case',
				paletteFamily: 	'82C1DC',
				keyvisualId: 	'11335',
				keyvisualName: 	'kv_11335.jpg',
				fontsetId: 		'31940',
				graphicsetId: 	'13781',
				contentColor: 	'003C54',
				contentBGColor: 'F6FBFE',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2601',
internalId:  '',
customField: '20090422-040241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2652',
internalId:  '',
customField: '20090422-022715'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2601',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2778',
internalId:  '',
customField: '20081222-000936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2673',
internalId:  '',
customField: '20090422-034041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4001',
internalId:  '',
customField: '20090420-133600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4022',
internalId:  '',
customField: '20090422-023742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4043',
internalId:  '',
customField: '20090422-030656'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4064',
internalId:  '',
customField: '20090421-001002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4085',
internalId:  '',
customField: '20090422-034217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4106',
internalId:  '',
customField: '20090422-034935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4127',
internalId:  '',
customField: '20090422-024134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4148',
internalId:  '',
customField: '20090422-033924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92701',
internalId:  '',
customField: '20090422-022055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4190',
internalId:  '',
customField: '20090420-231556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92722',
internalId:  '',
customField: '20090422-022301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7022',
internalId:  '',
customField: '20090420-231204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7043',
internalId:  '',
customField: '20090422-033312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7064',
internalId:  '',
customField: '20090421-001540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8201',
internalId:  '',
customField: '20090422-040441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8222',
internalId:  '',
customField: '20090422-035909'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83601',
internalId:  '',
customField: '20090422-035143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76801',
internalId:  '',
customField: '20090422-040114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42301',
internalId:  '',
customField: '20090130-001631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32501',
internalId:  '',
customField: '20090108-040435'
};
webappMappings['7008']=webappMappings['7008-10754']={
webappId:    '7008',
documentId:  '2778',
internalId:  '10754',
customField: 'language:en;country:US;'
};
webappMappings['1003']=webappMappings['1003-aendu0inegn211dd1d3fbbf']={
webappId:    '1003',
documentId:  '42301',
internalId:  'aendu0inegn211dd1d3fbbf',
customField: 'en:US'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0INEGN2';
var companyName   = 'Personal+Improvement+Hub';
var htmlTitle	  = 'Self+help+personal+improvement%2C+inspiration%2C+motivational+life+coaching%2C+development+resources+and+more';
var metaKeywords  = 'self+help%2C+inspiration%2C+motivational%2C+life+coach%2C+coaching%2C+successful%2C+personal+improvement%2C+personal%2C+development%2C+improvement%2C+success%2C+self%2C+self+improvement%2C+motivation%2C+growth%2C+positive+thinking%2C+help%2C+life%2C+goal%2C+esteem%2C+self-esteem%2C+happiness%2C+confidence%2C+positive%2C+thinking%2C+coach';
var metaContents  = 'Self+help+personal+improvement%2C+inspiration%2C+motivational+life+coaching%2C+development+resources+and+more';
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();
};
