/* [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','2201',jdecode('Home'),jdecode(''),'/2201.html','true',[],'',''],
	['PAGE','13701',jdecode('Daily+In+Christ++Devotionals'),jdecode(''),'/13701.html','true',[],'',''],
	['ITEM','26001',jdecode('Verse+Of+The+Day'),jdecode(''),'http://www.dailyinchrist.net/dailybible/','true',[],'','_blank'],
	['PAGE','18201',jdecode('I+Need+Prayer%21'),jdecode(''),'/18201.html','true',[],'',''],
	['PAGE','23501',jdecode('Help%21+I+Need+Answers'),jdecode(''),'/23501.html','true',[],'',''],
	['PAGE','24701',jdecode('Personal+Struggles'),jdecode(''),'/24701.html','true',[],'',''],
	['PAGE','15501',jdecode('Life+Questions+-+Forum'),jdecode(''),'/15501.html','true',[],'',''],
	['PAGE','15522',jdecode('Books+%26+Resources'),jdecode(''),'/15522.html','true',[],'',''],
	['PAGE','9701',jdecode('Topical+Bible+Verses'),jdecode(''),'/9701.html','true',[],'',''],
	['PAGE','9722',jdecode('How+To+Know+God'),jdecode(''),'/9722.html','true',[],'',''],
	['PAGE','10022',jdecode('Helpful+Links+'),jdecode(''),'/10022.html','true',[],'',''],
	['PAGE','17301',jdecode('Videos+%2F+Testimonies'),jdecode(''),'/17301.html','true',[],'',''],
	['PAGE','9401',jdecode('About'),jdecode(''),'/9401.html','true',[],'',''],
	['PAGE','9601',jdecode('Contact'),jdecode(''),'/9601.html','true',[],'',''],
	['PAGE','16101',jdecode('Anger'),jdecode(''),'/16101.html','false',[],'',''],
	['PAGE','16122',jdecode('Anxiety'),jdecode(''),'/16122.html','false',[],'',''],
	['PAGE','16143',jdecode('Comfort'),jdecode(''),'/16143.html','false',[],'',''],
	['PAGE','16164',jdecode('Courage'),jdecode(''),'/16164.html','false',[],'',''],
	['PAGE','16185',jdecode('Faith'),jdecode(''),'/16185.html','false',[],'',''],
	['PAGE','20401',jdecode('God%26%23x27%3Bs+Love'),jdecode(''),'/20401.html','false',[],'',''],
	['PAGE','16206',jdecode('Grace'),jdecode(''),'/16206.html','false',[],'',''],
	['PAGE','16227',jdecode('Guidance'),jdecode(''),'/16227.html','false',[],'',''],
	['PAGE','16248',jdecode('Healing'),jdecode(''),'/16248.html','false',[],'',''],
	['PAGE','16269',jdecode('Honesty'),jdecode(''),'/16269.html','false',[],'',''],
	['PAGE','16401',jdecode('Hope+In+Christ'),jdecode(''),'/16401.html','false',[],'',''],
	['PAGE','20422',jdecode('Lust+%2F+Purity'),jdecode(''),'/20422.html','false',[],'',''],
	['PAGE','20443',jdecode('Marriage'),jdecode(''),'/20443.html','false',[],'',''],
	['PAGE','16422',jdecode('Mercy'),jdecode(''),'/16422.html','false',[],'',''],
	['PAGE','16443',jdecode('Prayer'),jdecode(''),'/16443.html','false',[],'',''],
	['PAGE','16464',jdecode('Salvation'),jdecode(''),'/16464.html','false',[],'',''],
	['PAGE','16485',jdecode('Worship'),jdecode(''),'/16485.html','false',[],'',''],
	['PAGE','23522',jdecode('Test+Page'),jdecode(''),'/23522.html','false',[],'','']];
var siteelementCount=32;
theSitetree.topTemplateName='Nucleus';
theSitetree.paletteFamily='FDE26B';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33304';
theSitetree.graphicsetId='14180';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FDE26B';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Nucleus',
				paletteFamily: 	'FDE26B',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33304',
				graphicsetId: 	'14180',
				contentColor: 	'000000',
				contentBGColor: 'FDE26B',
				a_color: 		'EBCC45',
				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:  '2201',
internalId:  '',
customField: '20110618-145732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9722',
internalId:  '',
customField: '20110618-163702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9401',
internalId:  '',
customField: '20110617-114001'
};
webappMappings['7008']=webappMappings['7008-36120']={
webappId:    '7008',
documentId:  '9601',
internalId:  '36120',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9701',
internalId:  '',
customField: '20110619-111812'
};
webappMappings['1003']=webappMappings['1003-aendu0infr6d130a259138b']={
webappId:    '1003',
documentId:  '15501',
internalId:  'aendu0infr6d130a259138b',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10022',
internalId:  '',
customField: '20110618-071548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9601',
internalId:  '',
customField: '20110617-114111'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2201',
internalId:  '1006',
customField: '1006'
};
webappMappings['7090']=webappMappings['7090-102']={
webappId:    '7090',
documentId:  '13701',
internalId:  '102',
customField: 'language:en;country:US;name:;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13701',
internalId:  '',
customField: '20110618-041107'
};
webappMappings['5002']=webappMappings['5002-22']={
webappId:    '5002',
documentId:  '15522',
internalId:  '22',
customField: 'language:en;country:US;name:amazonstore;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15522',
internalId:  '',
customField: '20110619-111657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15501',
internalId:  '',
customField: '20110618-152932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16143',
internalId:  '',
customField: '20110618-214926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16464',
internalId:  '',
customField: '20110618-225516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20401',
internalId:  '',
customField: '20110618-220504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17301',
internalId:  '',
customField: '20110619-112106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16101',
internalId:  '',
customField: '20110618-213747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16122',
internalId:  '',
customField: '20110618-214458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20422',
internalId:  '',
customField: '20110618-223829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16164',
internalId:  '',
customField: '20110618-215343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16185',
internalId:  '',
customField: '20110618-215623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16206',
internalId:  '',
customField: '20110618-220736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16227',
internalId:  '',
customField: '20110618-221043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16248',
internalId:  '',
customField: '20110618-221312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16269',
internalId:  '',
customField: '20110618-222524'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16401',
internalId:  '',
customField: '20110618-223504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16422',
internalId:  '',
customField: '20110618-225101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16443',
internalId:  '',
customField: '20110618-225307'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16485',
internalId:  '',
customField: '20110618-225726'
};
webappMappings['1003']=webappMappings['1003-aendu0infr6d130a8d3425e']={
webappId:    '1003',
documentId:  '18201',
internalId:  'aendu0infr6d130a8d3425e',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18201',
internalId:  '',
customField: '20110619-125525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20443',
internalId:  '',
customField: '20110618-224548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23522',
internalId:  '',
customField: '20110618-231219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23501',
internalId:  '',
customField: '20110619-111154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24701',
internalId:  '',
customField: '20110619-111536'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0INFR6D';
var companyName   = 'Daily+In+Christ+';
var htmlTitle	  = 'Daily+In+Christ+-+Encouraging+and+Strengthening+Believer%27s+In+Jesus+Christ%21';
var metaKeywords  = 'Daily+In+Christ%2C+Daily+Devotionals%2C+Is+God+Real%2C+Is+Jesus+Gods+Son%2C+Keith+Carey%2C+Being+In+Christ%2C+Gods+Love%2C+Salvation%2C+Christian+Suffering%2C+Joy%2C+Does+God+Love+Me%2C+crucified+with+christ%2C+live+in+christ%2C';
var metaContents  = 'Helping+Seekers+and+Believer%27s+Live+A+Life+Fully+Devoted+To+Jesus+Christ.';
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();
};

