/* [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','801',jdecode('Home'),jdecode(''),'/801.html','true',[],'',''],
	['PAGE','852',jdecode('About+us'),jdecode(''),'/852/index.html','true',[ 
		['PAGE','936',jdecode('The+History+of+New+life'),jdecode(''),'/852/936.html','true',[],'',''],
		['PAGE','9664',jdecode('Beliefs'),jdecode(''),'/852/9664.html','true',[],'',''],
		['PAGE','957',jdecode('Denomination'),jdecode(''),'/852/957.html','true',[],'',''],
		['PAGE','9601',jdecode('Values'),jdecode(''),'/852/9601.html','true',[],'',''],
		['PAGE','9622',jdecode('Vision'),jdecode(''),'/852/9622.html','true',[],'',''],
		['PAGE','9643',jdecode('Worship'),jdecode(''),'/852/9643.html','true',[],'',''],
		['PAGE','62701',jdecode('NLCF+Staff'),jdecode(''),'/852/62701.html','true',[],'','']
	],'',''],
	['PAGE','17901',jdecode('Pastor%26%23x27%3Bs+Message'),jdecode(''),'/17901.html','true',[],'',''],
	['PAGE','9685',jdecode('Ministries'),jdecode(''),'/9685/index.html','true',[ 
		['PAGE','17201',jdecode('Bible+Studies'),jdecode(''),'/9685/17201.html','true',[],'',''],
		['PAGE','17222',jdecode('Community+Service'),jdecode(''),'/9685/17222.html','true',[],'',''],
		['PAGE','17243',jdecode('Sunday+School+Programs'),jdecode(''),'/9685/17243.html','true',[],'',''],
		['PAGE','17264',jdecode('Youth'),jdecode(''),'/9685/17264.html','true',[],'',''],
		['PAGE','17285',jdecode('Yoga'),jdecode(''),'/9685/17285.html','true',[],'','']
	],'',''],
	['PAGE','894',jdecode('What%26%23x27%3Bs+Going+on%3F'),jdecode(''),'/894.html','true',[],'',''],
	['PAGE','61001',jdecode('Event+Images'),jdecode(''),'/61001/index.html','true',[ 
		['PAGE','60401',jdecode('NLCF+Picnic+Worship+Photos'),jdecode(''),'/61001/60401.html','true',[],'',''],
		['PAGE','80912',jdecode('JeLo%26%23x27%3Bs+trip+to+Chabot+Observatory+%28June+2010%29'),jdecode(''),'/61001/80912.html','true',[],'','']
	],'',''],
	['PAGE','57401',jdecode('Daily+Prayer'),jdecode(''),'/57401.html','true',[],'',''],
	['PAGE','77112',jdecode('Growing+In+Every+Way'),jdecode(''),'/77112.html','true',[],'',''],
	['PAGE','999',jdecode('Contact'),jdecode(''),'/999.html','true',[],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Collage';
theSitetree.paletteFamily='F9C116';
theSitetree.keyvisualId='2469';
theSitetree.keyvisualName='verkehr.jpg';
theSitetree.fontsetId='403';
theSitetree.graphicsetId='459';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Collage',
				paletteFamily: 	'F9C116',
				keyvisualId: 	'2469',
				keyvisualName: 	'verkehr.jpg',
				fontsetId: 		'403',
				graphicsetId: 	'459',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'F9C116',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '801',
internalId:  '',
customField: '20081210-000047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '894',
internalId:  '',
customField: '20100705-204944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '852',
internalId:  '',
customField: '20081113-210038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '936',
internalId:  '',
customField: '20081011-010002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9664',
internalId:  '',
customField: '20081011-010144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '957',
internalId:  '',
customField: '20081206-214738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9601',
internalId:  '',
customField: '20081111-181329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9622',
internalId:  '',
customField: '20081005-170818'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9643',
internalId:  '',
customField: '20081110-234746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77112',
internalId:  '',
customField: '20100311-220947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17901',
internalId:  '',
customField: '20081011-011557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9685',
internalId:  '',
customField: '20090102-185828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17201',
internalId:  '',
customField: '20081206-215001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17222',
internalId:  '',
customField: '20090102-185946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17243',
internalId:  '',
customField: '20100705-205309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17264',
internalId:  '',
customField: '20081110-152755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17285',
internalId:  '',
customField: '20081006-233609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57401',
internalId:  '',
customField: '20091125-201542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '999',
internalId:  '',
customField: '20090709-192905'
};
webappMappings['7060']=webappMappings['7060-dbd525d1ac15298b155e01b5e7ca94d6']={
webappId:    '7060',
documentId:  '60401',
internalId:  'dbd525d1ac15298b155e01b5e7ca94d6',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60401',
internalId:  '',
customField: '20081103-225654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61001',
internalId:  '',
customField: '20081103-231050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62701',
internalId:  '',
customField: '20090709-192837'
};
webappMappings['7060']=webappMappings['7060-a92b761474a0fd198298bd740bb8a0f5']={
webappId:    '7060',
documentId:  '80912',
internalId:  'a92b761474a0fd198298bd740bb8a0f5',
customField: 'language:en;country:US;'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INVG38';
var companyName   = 'NEW+LIFE+CHRISTIAN+FELLOWSHIP';
var htmlTitle	  = '';
var metaKeywords  = '';
var metaContents  = '';
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();
};
