/* [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','201',jdecode('Home'),jdecode(''),'/201.html','true',[],'',''],
	['PAGE','101542',jdecode('%22Ridin%26%23x27%3B+4+The+Cause%22'),jdecode(''),'/101542.html','true',[],'',''],
	['PAGE','207',jdecode('About+Us'),jdecode(''),'/207.html','true',[],'',''],
	['PAGE','227',jdecode('Contact+Us'),jdecode(''),'/227.html','true',[],'',''],
	['PAGE','212',jdecode('Meet+the+Pastor'),jdecode(''),'/212.html','true',[],'',''],
	['PAGE','95632',jdecode('The+Bishop%26%23x27%3Bs+Corner'),jdecode(''),'/95632.html','true',[],'',''],
	['PAGE','217',jdecode('Vision+Of+the+House'),jdecode(''),'/217.html','true',[],'',''],
	['PAGE','28501',jdecode('Sermons'),jdecode(''),'/28501.html','true',[],'',''],
	['PAGE','30001',jdecode('Special+Events'),jdecode(''),'/30001.html','true',[],'',''],
	['PAGE','19102',jdecode('Guestbook'),jdecode(''),'/19102/index.html','true',[ 
		['PAGE','19103',jdecode('Read+Guestbook'),jdecode(''),'/19102/19103.html','false',[],'','']
	],'',''],
	['PAGE','19302',jdecode('Photo+Album'),jdecode(''),'/19302.html','true',[],'',''],
	['PAGE','20401',jdecode('Evangelism+'),jdecode(''),'/20401.html','true',[],'',''],
	['PAGE','24001',jdecode('Community+Outreach+'),jdecode(''),'/24001/index.html','true',[ 
		['PAGE','24401',jdecode('Programs+%26+Services+'),jdecode(''),'/24001/24401.html','true',[],'','']
	],'',''],
	['PAGE','232',jdecode('Ministries'),jdecode(''),'/232.html','true',[],'',''],
	['PAGE','92812',jdecode('Ministry+News'),jdecode(''),'/92812.html','true',[],'',''],
	['PAGE','222',jdecode('About+Full+Gospel'),jdecode(''),'/222.html','true',[],'',''],
	['PAGE','42001',jdecode('Continuing+Education'),jdecode(''),'/42001.html','true',[],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Column';
theSitetree.paletteFamily='6266AD';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10400';
theSitetree.graphicsetId='10615';
theSitetree.contentColor='121447';
theSitetree.contentBGColor='D7D8ED';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Column',
				paletteFamily: 	'6266AD',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10400',
				graphicsetId: 	'10615',
				contentColor: 	'121447',
				contentBGColor: 'D7D8ED',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'6266AD',
				e_color: 		'3A3C83',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-1781999']={
webappId:    '1501',
documentId:  '201',
internalId:  '1781999',
customField: '1501'
};
webappMappings['1002']=webappMappings['1002-19102aen010in283w']={
webappId:    '1002',
documentId:  '19102',
internalId:  '19102aen010in283w',
customField: 'icq=false'
};
webappMappings['7060']=webappMappings['7060-740f7eb1e186a53fc2c600119a154795']={
webappId:    '7060',
documentId:  '19302',
internalId:  '740f7eb1e186a53fc2c600119a154795',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '201',
internalId:  '',
customField: '20090716-143411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19102',
internalId:  '',
customField: '20090714-111243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19302',
internalId:  '',
customField: '20060306-122808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24001',
internalId:  '',
customField: '20090714-133046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '232',
internalId:  '',
customField: '20090715-095946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19103',
internalId:  '',
customField: '20051118-103550'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30001',
internalId:  '',
customField: '20091021-141508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28501',
internalId:  '',
customField: '20091001-144354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '217',
internalId:  '',
customField: '20090714-144426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '207',
internalId:  '',
customField: '20090721-125717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '212',
internalId:  '',
customField: '20090714-143907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20401',
internalId:  '',
customField: '20090714-155118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24401',
internalId:  '',
customField: '20080410-100625'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '227',
internalId:  '',
customField: '20090721-130258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '222',
internalId:  '',
customField: '20090715-120617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42001',
internalId:  '',
customField: '20080409-084349'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92812',
internalId:  '',
customField: '20091001-125039'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95632',
internalId:  '',
customField: '20100127-133300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101542',
internalId:  '',
customField: '20100520-182500'
};
var canonHostname = 'wscwrk02.ehost-services.com';
var accountId     = 'AEN010IN283W';
var companyName   = '+++West+End+Mt.+Carmel';
var htmlTitle	  = 'West+End+Mt.+Carmel+FGB+Church';
var metaKeywords  = 'Full+Gospel+Baptist+Church+Fellowship%2C+Church%2C+West+End+Mount+Carmel+Full+Gospel+Baptist+Church++++';
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();
};
