/* [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','43801',jdecode('Living+A+Life+of+Joy'),jdecode(''),'/43801.html','true',[],''],
	['PAGE','43401',jdecode('Meditation%2C+Joy+and+Jesus'),jdecode(''),'/43401.html','false',[],''],
	['PAGE','24701',jdecode('Joy+and+Our+Health'),jdecode(''),'/24701.html','false',[],''],
	['PAGE','43422',jdecode('Joy+and+Our+Money'),jdecode(''),'/43422.html','false',[],''],
	['PAGE','43443',jdecode('Joy+and+Our+Relationships'),jdecode(''),'/43443.html','false',[],''],
	['PAGE','43464',jdecode('Joy+and+Humanity'),jdecode(''),'/43464.html','false',[],''],
	['PAGE','2494',jdecode('Focus+Matters+Blog'),jdecode(''),'/2494.html','false',[],''],
	['PAGE','12401',jdecode('Imprint'),jdecode(''),'/12401.html','false',[],''],
	['PAGE','2452',jdecode('About+us'),jdecode(''),'/2452.html','true',[],''],
	['PAGE','2536',jdecode('Enrollment+Here'),jdecode(''),'/2536.html','false',[],''],
	['PAGE','2515',jdecode('Focus+Instruction'),jdecode(''),'/2515.html','false',[],''],
	['PAGE','2473',jdecode('Contact'),jdecode(''),'/2473.html','true',[],''],
	['PAGE','2401',jdecode('Home'),jdecode(''),'/2401.html','false',[],''],
	['PAGE','27901',jdecode('Registration+Form'),jdecode(''),'/27901.html','false',[],''],
	['PAGE','10501',jdecode('Release+Tool'),jdecode(''),'/10501.html','false',[],''],
	['PAGE','22322',jdecode('Brilliant+Books'),jdecode(''),'/22322.html','true',[],''],
	['PAGE','23201',jdecode('Guestbook'),jdecode(''),'/23201.html','false',[],''],
	['PAGE','48512',jdecode('Knowledge+Out+Front'),jdecode(''),'/48512.html','false',[],''],
	['PAGE','49312',jdecode('Things+To+Have'),jdecode(''),'/49312.html','false',[],''],
	['PAGE','50212',jdecode('New+page'),jdecode(''),'/50212.html','false',[],'']];
var siteelementCount=20;
theSitetree.topTemplateName='Holiday';
theSitetree.paletteFamily='8A8C8A';
theSitetree.keyvisualId='6142';
theSitetree.keyvisualName='kv_6142.jpg';
theSitetree.fontsetId='11131';
theSitetree.graphicsetId='11929';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='9DA19D';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Holiday',
				paletteFamily: 	'8A8C8A',
				keyvisualId: 	'6142',
				keyvisualName: 	'kv_6142.jpg',
				fontsetId: 		'11131',
				graphicsetId: 	'11929',
				contentColor: 	'FFFFFF',
				contentBGColor: '9DA19D',
				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: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-807']={
webappId:    '7008',
documentId:  '2536',
internalId:  '807',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2401',
internalId:  '',
customField: '20081108-150647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2452',
internalId:  '',
customField: '20090118-124003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2473',
internalId:  '',
customField: '20081123-214514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2494',
internalId:  '',
customField: '20080315-220043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2515',
internalId:  '',
customField: '20081123-185005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2536',
internalId:  '',
customField: '20081108-164144'
};
webappMappings['7008']=webappMappings['7008-808']={
webappId:    '7008',
documentId:  '2473',
internalId:  '808',
customField: 'language:en;country:US;'
};
webappMappings['7050']=webappMappings['7050-353']={
webappId:    '7050',
documentId:  '2494',
internalId:  '353',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24701',
internalId:  '',
customField: '20090118-131622'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '22322',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-2865']={
webappId:    '7008',
documentId:  '27901',
internalId:  '2865',
customField: 'language:en;country:US;'
};
webappMappings['1003']=webappMappings['1003-aendu0in2al811ed2a71177']={
webappId:    '1003',
documentId:  '49312',
internalId:  'aendu0in2al811ed2a71177',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48512',
internalId:  '',
customField: '20090118-124831'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43443',
internalId:  '',
customField: '20081123-213013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27901',
internalId:  '',
customField: '20080423-013706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23201',
internalId:  '',
customField: '20080330-030734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10501',
internalId:  '',
customField: '20091015-002712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12401',
internalId:  '',
customField: '20080328-094056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43401',
internalId:  '',
customField: '20090118-131149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22322',
internalId:  '',
customField: '20100323-233711'
};
webappMappings['1002']=webappMappings['1002-23201aendu0in2al8']={
webappId:    '1002',
documentId:  '23201',
internalId:  '23201aendu0in2al8',
customField: 'icq=false'
};
webappMappings['1002']=webappMappings['1002-9401aendu0in2al8']={
webappId:    '1002',
documentId:  '9401',
internalId:  '9401aendu0in2al8',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43801',
internalId:  '',
customField: '20091225-001202'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43422',
internalId:  '',
customField: '20090118-132147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43464',
internalId:  '',
customField: '20081123-213417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49312',
internalId:  '',
customField: '20090118-123146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50212',
internalId:  '',
customField: '20090118-121945'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0IN2AL8';
var companyName   = 'Insights+for+Workability';
var htmlTitle	  = 'The+State+of+Joy+Is+An+Environment+Where+Anything+Can+Happen';
var metaKeywords  = 'Barry+Bonds%2C+Major+League+Baseball%2C+Vote%2C+MLB%2C+Angels%2C+Giants%2C+Padres%2C+Dodgers%2C+Athletics%2C+Yankees%2C+Pirates%2C+Orioles%2C+Reds%2C+Tigers%2C+Cubs%2C+Mets%2C+Rays';
var metaContents  = 'Fans+Vote+a+Team+for+Barry+Bonds';
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();
};
