/* [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','1801',jdecode('FBC+Activities+Ministries'),jdecode(''), jdecode('%2F1801%2Findex.html'), 'true',[ 
		['PAGE','1978',jdecode('Year+at+a+glance'),jdecode(''), jdecode('%2F1801%2F1978.html'), 'false',[],'',''],
		['PAGE','89901',jdecode('The+Bulletin+Board'),jdecode(''), jdecode('%2F1801%2F89901.html'), 'true',[],'','']
	],'',''],
	['PAGE','1873',jdecode('Family+Fellowships'),jdecode(''), jdecode('%2F1873.html'), 'false',[],'',''],
	['PAGE','1894',jdecode('The+AYMC'),jdecode(''), jdecode('%2F1894%2Findex.html'), 'true',[ 
		['PAGE','84701',jdecode('Exercise+and+Wellness'),jdecode(''), jdecode('%2F1894%2F84701.html'), 'true',[],'',''],
		['PAGE','1936',jdecode('Strength+and+Conditioning'),jdecode(''), jdecode('%2F1894%2F1936.html'), 'true',[],'',''],
		['PAGE','81201',jdecode('Massage+Therapy'),jdecode(''), jdecode('%2F1894%2F81201.html'), 'false',[],'',''],
		['PAGE','84722',jdecode('Culture+and+Conversation'),jdecode(''), jdecode('%2F1894%2F84722.html'), 'false',[],'',''],
		['PAGE','94701',jdecode('Fitness+Boot+Camp'),jdecode(''), jdecode('%2F1894%2F94701.html'), 'false',[],'',''],
		['PAGE','94722',jdecode('Shag+Lessons'),jdecode(''), jdecode('%2F1894%2F94722.html'), 'false',[],'',''],
		['PAGE','1957',jdecode('How+to+Join'),jdecode(''), jdecode('%2F1894%2F1957.html'), 'true',[],'',''],
		['PAGE','94743',jdecode('Sign-up+Special'),jdecode(''), jdecode('%2F1894%2F94743.html'), 'false',[],'',''],
		['PAGE','4822',jdecode('Meet+the+Staff'),jdecode(''), jdecode('%2F1894%2F4822.html'), 'true',[],'','']
	],'',''],
	['PAGE','1915',jdecode('Sports+Ministry'),jdecode(''), jdecode('%2F1915%2Findex.html'), 'true',[ 
		['PAGE','1852',jdecode('Basketball'),jdecode(''), jdecode('%2F1915%2F1852.html'), 'false',[],'',''],
		['PAGE','4843',jdecode('Basketball+Camps'),jdecode(''), jdecode('%2F1915%2F4843.html'), 'false',[],'',''],
		['PAGE','4864',jdecode('Christian+Sports+Network'),jdecode(''), jdecode('%2F1915%2F4864.html'), 'true',[],'',''],
		['PAGE','46301',jdecode('Golf+Outings'),jdecode(''), jdecode('%2F1915%2F46301.html'), 'false',[],'',''],
		['PAGE','46322',jdecode('Camping'),jdecode(''), jdecode('%2F1915%2F46322.html'), 'false',[],'','']
	],'',''],
	['PAGE','3201',jdecode('Photo+Gallery'),jdecode(''), jdecode('%2F3201%2Findex.html'), 'false',[ 
		['PAGE','38601',jdecode('Basketball'),jdecode(''), jdecode('%2F3201%2F38601.html'), 'true',[],'',''],
		['PAGE','38622',jdecode('Church+Picnic'),jdecode(''), jdecode('%2F3201%2F38622.html'), 'true',[],'',''],
		['PAGE','40101',jdecode('Family+Fellowship'),jdecode(''), jdecode('%2F3201%2F40101.html'), 'true',[],'',''],
		['PAGE','38643',jdecode('May+Day+Play+Day'),jdecode(''), jdecode('%2F3201%2F38643.html'), 'true',[],'',''],
		['PAGE','38664',jdecode('Softball'),jdecode(''), jdecode('%2F3201%2F38664.html'), 'true',[],'',''],
		['PAGE','38685',jdecode('Tee+Ball'),jdecode(''), jdecode('%2F3201%2F38685.html'), 'true',[],'',''],
		['PAGE','38706',jdecode('The+AYMC'),jdecode(''), jdecode('%2F3201%2F38706.html'), 'true',[],'','']
	],'',''],
	['PAGE','82601',jdecode('Matt%26%23x27%3Bs+Email'),jdecode(''), jdecode('%2F82601.html'), 'false',[],'',''],
	['PAGE','82622',jdecode('Mittie%26%23x27%3Bs+Email'),jdecode(''), jdecode('%2F82622.html'), 'false',[],'',''],
	['PAGE','100901',jdecode('Mission+Backpack+5K'),jdecode(''), jdecode('%2F100901%2Findex.html'), 'true',[ 
		['PAGE','101101',jdecode('Packet+Pick-up'),jdecode(''), jdecode('%2F100901%2F101101.html'), 'true',[],'',''],
		['PAGE','101122',jdecode('Race+Day+Information'),jdecode(''), jdecode('%2F100901%2F101122.html'), 'true',[],'',''],
		['PAGE','101143',jdecode('Race+Routes'),jdecode(''), jdecode('%2F100901%2F101143.html'), 'true',[],'',''],
		['PAGE','101164',jdecode('Awards'),jdecode(''), jdecode('%2F100901%2F101164.html'), 'true',[],'',''],
		['PAGE','101185',jdecode('Event+Photos'),jdecode(''), jdecode('%2F100901%2F101185.html'), 'true',[],'',''],
		['PAGE','101206',jdecode('Race+Sponsorship'),jdecode(''), jdecode('%2F100901%2F101206.html'), 'true',[],'',''],
		['PAGE','101227',jdecode('About+Us'),jdecode(''), jdecode('%2F100901%2F101227.html'), 'true',[],'',''],
		['PAGE','101248',jdecode('Contact+Us'),jdecode(''), jdecode('%2F100901%2F101248.html'), 'true',[],'','']
	],'',''],
	['PAGE','105701',jdecode('Youth+Assistants'),jdecode(''), jdecode('%2F105701.html'), 'false',[],'','']];
var siteelementCount=40;
theSitetree.topTemplateName='Linedup';
theSitetree.paletteFamily='4270B8';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10359';
theSitetree.graphicsetId='10505';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='4270B8';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'endurance',
  product: 'WSCSYSSSSLY0XRN4'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Linedup',
				paletteFamily: 	'4270B8',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10359',
				graphicsetId: 	'10505',
				contentColor: 	'FFFFFF',
				contentBGColor: '4270B8',
				a_color: 		'000000',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1801',
internalId:  '',
customField: '20120110-143650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1852',
internalId:  '',
customField: '20110815-213139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1873',
internalId:  '',
customField: '20100823-123957'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1894',
internalId:  '',
customField: '20111208-155700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1915',
internalId:  '',
customField: '20120106-130153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1936',
internalId:  '',
customField: '20120110-142944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1957',
internalId:  '',
customField: '20111208-155453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1978',
internalId:  '',
customField: '20110328-162034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3201',
internalId:  '',
customField: '20100823-124354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38601',
internalId:  '',
customField: '20100823-124520'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4822',
internalId:  '',
customField: '20110818-114943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4843',
internalId:  '',
customField: '20100823-124209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4864',
internalId:  '',
customField: '20100824-121054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38622',
internalId:  '',
customField: '20100823-124604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38706',
internalId:  '',
customField: '20100823-124928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40101',
internalId:  '',
customField: '20100823-124649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38643',
internalId:  '',
customField: '20100823-124732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38664',
internalId:  '',
customField: '20100823-124812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38685',
internalId:  '',
customField: '20100823-124849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46301',
internalId:  '',
customField: '20100823-123831'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46322',
internalId:  '',
customField: '20100823-124317'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81201',
internalId:  '',
customField: '20100826-124215'
};
webappMappings['7008']=webappMappings['7008-30788']={
webappId:    '7008',
documentId:  '82601',
internalId:  '30788',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-30789']={
webappId:    '7008',
documentId:  '82622',
internalId:  '30789',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82601',
internalId:  '',
customField: '20100824-121515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82622',
internalId:  '',
customField: '20100824-121614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84701',
internalId:  '',
customField: '20110818-114702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84722',
internalId:  '',
customField: '20100826-122603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89901',
internalId:  '',
customField: '20120112-121644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94743',
internalId:  '',
customField: '20101215-094403'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94722',
internalId:  '',
customField: '20101215-094835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94701',
internalId:  '',
customField: '20101215-095719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100901',
internalId:  '',
customField: '20111129-133201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101248',
internalId:  '',
customField: '20110831-111722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101206',
internalId:  '',
customField: '20110926-202914'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101185',
internalId:  '',
customField: '20111129-132011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101122',
internalId:  '',
customField: '20110921-131423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101101',
internalId:  '',
customField: '20110826-113404'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101143',
internalId:  '',
customField: '20110921-131502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101164',
internalId:  '',
customField: '20110921-130413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101227',
internalId:  '',
customField: '20110906-143431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105701',
internalId:  '',
customField: '20110923-115804'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0INLWHL';
var companyName   = 'The+Activities+Ministry+of+FBC+Greenville';
var htmlTitle	  = 'AYMC';
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();
};

