/* [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','2401',jdecode('Home'),jdecode(''),'/2401.html','true',[],''],
	['PAGE','2452',jdecode('The+Burning+Bush'),jdecode(''),'/2452.html','true',[],''],
	['PAGE','2473',jdecode('The+Fisherman%26%23x27%3Bs+Net'),jdecode(''),'/2473.html','true',[],''],
	['PAGE','70825',jdecode('Ecce+Homo'),jdecode(''),'/70825.html','true',[],''],
	['PAGE','2494',jdecode('The+Zaddik'),jdecode(''),'/2494/index.html','true',[ 
		['PAGE','20501',jdecode('The+Zaddik+%28follow+up+page%29'),jdecode(''),'/2494/20501.html','false',[],'']
	],''],
	['PAGE','4222',jdecode('Zaddik+Literary+Agency'),jdecode(''),'/4222.html','true',[],''],
	['PAGE','21301',jdecode('Zaddik+Literary+Agency+%28follow+up+page%29'),jdecode(''),'/21301.html','false',[],''],
	['PAGE','66401',jdecode('The+Holy+Land+'),jdecode(''),'/66401.html','true',[],''],
	['PAGE','4201',jdecode('The+Detroit+Foundation'),jdecode(''),'/4201/index.html','true',[ 
		['PAGE','21101',jdecode('The+Detroit+Foundation+%28follow+up+page%29'),jdecode(''),'/4201/21101.html','false',[],'']
	],''],
	['PAGE','70349',jdecode('Image+of+Detroit'),jdecode(''),'/70349.html','true',[],''],
	['PAGE','56601',jdecode('Great+Lakes+Shipping'),jdecode(''),'/56601.html','true',[],''],
	['PAGE','7301',jdecode('Links'),jdecode(''),'/7301.html','true',[],''],
	['PAGE','6306',jdecode('Guestbook'),jdecode(''),'/6306/index.html','true',[ 
		['PAGE','6301',jdecode('Read+Guestbook'),jdecode(''),'/6306/6301.html','true',[],'']
	],''],
	['PAGE','70052',jdecode('%28Discussion%29+forum'),jdecode(''),'/70052.html','true',[],''],
	['PAGE','70307',jdecode('What+do+you+think%3F+'),jdecode(''),'/70307.html','true',[],'']];
var siteelementCount=18;
theSitetree.topTemplateName='Stars';
theSitetree.paletteFamily='000000';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10510';
theSitetree.graphicsetId='10916';
theSitetree.contentColor='FE0000';
theSitetree.contentBGColor='000000';
var theTemplate={
				name: 			'Stars',
				paletteFamily: 	'000000',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10510',
				graphicsetId: 	'10916',
				contentColor: 	'FE0000',
				contentBGColor: '000000',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				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:  '2401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4222',
internalId:  '',
customField: '20080831-184950'
};
webappMappings['1002']=webappMappings['1002-6306AHW050INX3MT']={
webappId:    '1002',
documentId:  '6306',
internalId:  '6306AHW050INX3MT',
customField: 'icq=false'
};
webappMappings['1001']=webappMappings['1001-ahw050inx3mt3a230e65678eaa29']={
webappId:    '1001',
documentId:  '2494',
internalId:  'ahw050inx3mt3a230e65678eaa29',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050inx3mt3a230e65678eaa29']={
webappId:    '1001',
documentId:  '20501',
internalId:  'ahw050inx3mt3a230e65678eaa29',
customField: 'followUp'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20501',
internalId:  '',
customField: '20070101-184113'
};
webappMappings['1001']=webappMappings['1001-ahw050inx3mtb25f7d83921dd7f']={
webappId:    '1001',
documentId:  '4201',
internalId:  'ahw050inx3mtb25f7d83921dd7f',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050inx3mtb25f7d83921dd7f']={
webappId:    '1001',
documentId:  '21101',
internalId:  'ahw050inx3mtb25f7d83921dd7f',
customField: 'followUp'
};
webappMappings['1001']=webappMappings['1001-ahw050inx3mtdd411190807ecee6']={
webappId:    '1001',
documentId:  '4222',
internalId:  'ahw050inx3mtdd411190807ecee6',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050inx3mtdd411190807ecee6']={
webappId:    '1001',
documentId:  '21301',
internalId:  'ahw050inx3mtdd411190807ecee6',
customField: 'followUp'
};
webappMappings['1501']=webappMappings['1501-179681']={
webappId:    '1501',
documentId:  '2401',
internalId:  '179681',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2494',
internalId:  '',
customField: '20071214-134422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2473',
internalId:  '',
customField: '20090416-124435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2401',
internalId:  '',
customField: '20090417-060234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2452',
internalId:  '',
customField: '20071231-131105'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21301',
internalId:  '',
customField: '20070101-185800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66401',
internalId:  '',
customField: '20071231-152422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4201',
internalId:  '',
customField: '20090417-064201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21101',
internalId:  '',
customField: '20070101-185610'
};
webappMappings['1003']=webappMappings['1003-ahw050inx3mt121e3b81285']={
webappId:    '1003',
documentId:  '70307',
internalId:  'ahw050inx3mt121e3b81285',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56601',
internalId:  '',
customField: '20071214-134115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7301',
internalId:  '',
customField: '20070818-233023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6306',
internalId:  '',
customField: '20061228-182646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6301',
internalId:  '',
customField: '20061228-182646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70307',
internalId:  '',
customField: '20090416-124845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70052',
internalId:  '',
customField: '20090416-125026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70349',
internalId:  '',
customField: '20090416-133041'
};
webappMappings['7060']=webappMappings['7060-b186cdb9a460936c45a4178d260d65a9']={
webappId:    '7060',
documentId:  '66401',
internalId:  'b186cdb9a460936c45a4178d260d65a9',
customField: 'language:en;country:US;'
};
webappMappings['1003']=webappMappings['1003-ahw050inx3mt120a718d6bc']={
webappId:    '1003',
documentId:  '20501',
internalId:  'ahw050inx3mt120a718d6bc',
customField: 'en:US'
};
webappMappings['7008']=webappMappings['7008-2895']={
webappId:    '7008',
documentId:  '21301',
internalId:  '2895',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-63a8a26859c732fa52aa9d337f75adc3']={
webappId:    '7060',
documentId:  '66401',
internalId:  '63a8a26859c732fa52aa9d337f75adc3',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-68af884cce0bf91d12afbedc51b26ec0']={
webappId:    '7060',
documentId:  '70349',
internalId:  '68af884cce0bf91d12afbedc51b26ec0',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-03cfbf47286e55cb6ea9093a8191b1ce']={
webappId:    '7060',
documentId:  '56601',
internalId:  '03cfbf47286e55cb6ea9093a8191b1ce',
customField: 'language:en;country:US;'
};
webappMappings['1003']=webappMappings['1003-ahw050inx3mt120a719af4c']={
webappId:    '1003',
documentId:  '70052',
internalId:  'ahw050inx3mt120a719af4c',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70825',
internalId:  '',
customField: '20090528-062609'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INX3MT';
var companyName   = 'The+Church+of+the+New+Apostles';
var htmlTitle	  = 'NEWAPOSTLES.NET+--+THE+CHURCH+OF+THE+NEW+APOSTLES+-a+place+for+spiritual+wanderers.';
var metaKeywords  = 'Zaddik%2C+James+the+brother+of+Jesus%2C+Paul%2C+Dead+Sea+Scrolls%2Cearly+Christian+documents%2C+Jerusalem+Assembly.++Judas+Thomas%2C+Thomas+the+Twin%2C+Judas+Iscariot%2C+Simeon+bar+Cleophas%2C+Joseph+of+Aramathea%2C+spiritual+wanderers%2C+Dead+Sea+Scrolls+as+Christian+Documents%3F%2C++new+apostles%2C+newapostles.net%2C+dead+sea+scrolls%2C+nag+hamadi+library%2C+robert+eisenman%2C+The+Jesus+Seminar%2C+Paul%2C+Herodian%2C+Herod%2C+Great+Temple%2C+Kittim%2C+Jerusalem%2C+sicarii%2C+Nero%2C+Epaphroditus%2C+Ecce+Homo%2C+++';
var metaContents  = 'The+Church+of+the+New+Apostles+is+a+place+for+spiritual+wanderers.+++The+Zaddik+is+the+story+of+James+the+brother+of+Jesusn+and+Paul+and+their+struggle+for+leadership+of+the+nascient+church+of+Jesus.++Together+with+his+brothers+and+the+original+followers+of+Jesus.++The+story+is+based+on+the+interpretation+of+history+hat+the+Dead+Sea+Scrolls+are+really+early+Christian+documents%2C+if+not+the+library+of+the+Jerusalem+Assembly.++Judas+Thomas%2C+Thomas+the+Twin%2C+Judas+Iscariot%2C+Simeon+bar+Cleophas%2C+Joseph+of+Aramathea%2C+spiritual+wanderers%2C+Dead+Sea+Scrolls+as+Christian+Documents%3F%2C++new+apostles%2C+newapostles.net%2C+dead+sea+scrolls%2C+nag+hamadi+library%2C+robert+eisenman%2C+The+Jesus+Seminar%2C+Paul%2C+Herodian%2C+Herod%2C+The+Temple%2C+Kittim%2C+Jerusalem%2C+';
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();
};
