/* [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','2401',jdecode('Home'),jdecode(''), jdecode('%2F2401.html'), 'true',[],'',''],
	['PAGE','3001',jdecode('Simple+Plan+of+Salvation'),jdecode(''), jdecode('%2F3001.html'), 'true',[],'',''],
	['PAGE','4101',jdecode('Statement+of+Faith'),jdecode(''), jdecode('%2F4101.html'), 'true',[],'',''],
	['PAGE','3022',jdecode('Church+Ministries'),jdecode(''), jdecode('%2F3022%2Findex.html'), 'true',[ 
		['PAGE','38312',jdecode('Bus+Ministry'),jdecode(''), jdecode('%2F3022%2F38312.html'), 'true',[],'',''],
		['PAGE','19501',jdecode('Deaf+Ministry'),jdecode(''), jdecode('%2F3022%2F19501.html'), 'true',[],'',''],
		['PAGE','4401',jdecode('Food+Pantry'),jdecode(''), jdecode('%2F3022%2F4401.html'), 'true',[],'',''],
		['PAGE','39312',jdecode('Go+Sew+Sisters'),jdecode(''), jdecode('%2F3022%2F39312.html'), 'true',[],'',''],
		['PAGE','37012',jdecode('Kids+Ministry'),jdecode(''), jdecode('%2F3022%2F37012.html'), 'true',[],'',''],
		['PAGE','4422',jdecode('Missionaries'),jdecode(''), jdecode('%2F3022%2F4422.html'), 'true',[],'',''],
		['PAGE','20401',jdecode('Nursery'),jdecode(''), jdecode('%2F3022%2F20401.html'), 'true',[],'',''],
		['PAGE','4443',jdecode('Nursing+Home+Ministry'),jdecode(''), jdecode('%2F3022%2F4443.html'), 'true',[],'',''],
		['PAGE','17401',jdecode('Patch+the+Pirate+Club'),jdecode(''), jdecode('%2F3022%2F17401.html'), 'true',[],'',''],
		['PAGE','3043',jdecode('Reformers+Unanimous+%28RU%29'),jdecode(''), jdecode('%2F3022%2F3043.html'), 'true',[],'',''],
		['PAGE','17422',jdecode('Soul-Winning%2FVisitation'),jdecode(''), jdecode('%2F3022%2F17422.html'), 'true',[],'',''],
		['PAGE','15101',jdecode('Teen+Ministry'),jdecode(''), jdecode('%2F3022%2F15101.html'), 'true',[],'','']
	],'',''],
	['PAGE','3064',jdecode('Sermons'),jdecode(''), jdecode('%2F3064.html'), 'true',[],'',''],
	['PAGE','3901',jdecode('Church+Calendar'),jdecode(''), jdecode('%2F3901.html'), 'true',[],'',''],
	['PAGE','15201',jdecode('Church+News'),jdecode(''), jdecode('%2F15201.html'), 'true',[],'',''],
	['PAGE','15801',jdecode('Photo+Albums'),jdecode(''), jdecode('%2F15801%2Findex.html'), 'false',[ 
		['PAGE','53612',jdecode('2010'),jdecode(''), jdecode('%2F15801%2F53612.html'), 'true',[],'',''],
		['PAGE','46712',jdecode('VBS+2010'),jdecode(''), jdecode('%2F15801%2F46712.html'), 'true',[],'',''],
		['PAGE','29412',jdecode('2009'),jdecode(''), jdecode('%2F15801%2F29412.html'), 'true',[],'','']
	],'',''],
	['PAGE','35112',jdecode('Contact+Us'),jdecode(''), jdecode('%2F35112.html'), 'true',[],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Dots';
theSitetree.paletteFamily='CCCC99';
theSitetree.keyvisualId='407';
theSitetree.keyvisualName='handschlag1.jpg';
theSitetree.fontsetId='43';
theSitetree.graphicsetId='47';
theSitetree.contentColor='666666';
theSitetree.contentBGColor='CCCC99';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'comcast',
  product: 'WSCSYSSSSLYTC245'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Dots',
				paletteFamily: 	'CCCC99',
				keyvisualId: 	'407',
				keyvisualName: 	'handschlag1.jpg',
				fontsetId: 		'43',
				graphicsetId: 	'47',
				contentColor: 	'666666',
				contentBGColor: 'CCCC99',
				a_color: 		'CCCC99',
				b_color: 		'CCCCCC',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2401',
internalId:  '',
customField: '20101201-215408'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3001',
internalId:  '',
customField: '20101201-222832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3022',
internalId:  '',
customField: '20111114-201704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3064',
internalId:  '',
customField: '20110704-124041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3043',
internalId:  '',
customField: '20100625-065234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3901',
internalId:  '',
customField: '20111108-192832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4101',
internalId:  '',
customField: '20100617-175548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4422',
internalId:  '',
customField: '20110620-190138'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4401',
internalId:  '',
customField: '20110704-123548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4443',
internalId:  '',
customField: '20111108-172118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15201',
internalId:  '',
customField: '20111114-201733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15101',
internalId:  '',
customField: '20111114-201438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15801',
internalId:  '',
customField: '20110312-133846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17401',
internalId:  '',
customField: '20100628-125701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17422',
internalId:  '',
customField: '20110704-134140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20401',
internalId:  '',
customField: '20100622-105019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19501',
internalId:  '',
customField: '20110704-134234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29412',
internalId:  '',
customField: '20100628-161856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35112',
internalId:  '',
customField: '20100629-172257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37012',
internalId:  '',
customField: '20110704-123703'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38312',
internalId:  '',
customField: '20110704-123159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39312',
internalId:  '',
customField: '20101015-211101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46712',
internalId:  '',
customField: '20101015-222057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53612',
internalId:  '',
customField: '20110312-135213'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INZBUJ';
var companyName   = 'FELLOWSHIP+BAPTIST+CHURCH+++++++++++++++++++++++++++++++++++++++++++';
var htmlTitle	  = 'Fellowship+Baptist+Church+of+Elkton%2C+MD';
var metaKeywords  = 'Fellowship+Baptist+Church+Elkton+MD%2C+Cecil+County%2C+Elkton%2C+North+East%2C+Teen+Program+in+Elkton%2C+King+James+Version%2C+KJV%2C+Reformers+Unanimous%2C+Bus+Ministry%2C+Vacation+Bible+School+Elkton+MD%2C+Fundamental+Baptist+Church%2C+Missionaries%2C+Go+Sew+Sisters%2C+Faith+Promise+Missions%2C+Pastor+Ron+Silverman%2C+joy%2C+love%2C+peace%2C+longsuffering%2C+faith%2C+temperance%2C+meekness%2C+goodness%2C+gentleness%2C+Bob+Sibigtroth%2C+Food+Pantry+Elkton+MD%2C+church+transportation%2C+free+Baptist+sermons+online';
var metaContents  = 'Fellowship+Baptist+Church+of+Elkton%2C+MD+is+a+Bible-believing%2C+God-fearing+church+and+we+love+to+have+you+visit+us+for+our+next+service.++Transportation+is+available+through+our+Bus+Ministry.++Please+browse+through+our+website+and+call+us+at+%28410%29+398-6558+if+we+can+be+of+service+to+you.++';
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();
};

