/* [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','301',jdecode('Home'),jdecode(''),'/301.html','true',[],''],
	['PAGE','22401',jdecode('About+Us'),jdecode(''),'/22401.html','true',[],''],
	['PAGE','10001',jdecode('From+Pastor+Chris'),jdecode(''),'/10001/index.html','true',[ 
		['PAGE','20801',jdecode('Sermons'),jdecode(''),'/10001/20801.html','true',[],'']
	],''],
	['PAGE','83844',jdecode('HOLIDAY+EVENTS'),jdecode(''),'/83844.html','false',[],''],
	['PAGE','33601',jdecode('Weekly+Schedule'),jdecode(''),'/33601.html','true',[],''],
	['PAGE','19601',jdecode('News'),jdecode(''),'/19601/index.html','false',[ 
		['PAGE','56701',jdecode('NEW+BABY+PICTURES'),jdecode(''),'/19601/56701.html','true',[],''],
		['PAGE','43401',jdecode('Newsletters'),jdecode(''),'/19601/43401.html','true',[],''],
		['PAGE','34001',jdecode('Easter+Egg+Hunt'),jdecode(''),'/19601/34001.html','true',[],''],
		['PAGE','35101',jdecode('Shoe+Drive'),jdecode(''),'/19601/35101.html','true',[],''],
		['PAGE','21501',jdecode('2007+News+Articles'),jdecode(''),'/19601/21501.html','true',[],'']
	],''],
	['PAGE','43422',jdecode('Search+Engine'),jdecode(''),'/43422.html','false',[],''],
	['PAGE','32501',jdecode('Youth'),jdecode(''),'/32501/index.html','true',[ 
		['PAGE','33001',jdecode('Retreats'),jdecode(''),'/32501/33001.html','true',[],''],
		['PAGE','42101',jdecode('Together+Sunday'),jdecode(''),'/32501/42101.html','true',[],''],
		['PAGE','86044',jdecode('Angel+Tree'),jdecode(''),'/32501/86044.html','false',[],'']
	],''],
	['PAGE','32522',jdecode('Children'),jdecode(''),'/32522/index.html','true',[ 
		['PAGE','35801',jdecode('Children%26%23x27%3Bs+Church'),jdecode(''),'/32522/35801.html','false',[],''],
		['PAGE','35501',jdecode('Mother%26%23x27%3Bs+Day+Out'),jdecode(''),'/32522/35501.html','false',[],''],
		['PAGE','42701',jdecode('Parent%26%23x27%3Bs+Night+Out'),jdecode(''),'/32522/42701.html','false',[],''],
		['PAGE','76944',jdecode('Preschool'),jdecode(''),'/32522/76944.html','false',[],''],
		['PAGE','42401',jdecode('Sunday+After+Service'),jdecode(''),'/32522/42401.html','false',[],'']
	],''],
	['PAGE','32543',jdecode('Young+Adults'),jdecode(''),'/32543.html','true',[],''],
	['PAGE','81344',jdecode('Missions+2009'),jdecode(''),'/81344.html','false',[],''],
	['PAGE','26701',jdecode('Devotional'),jdecode(''),'/26701.html','true',[],''],
	['PAGE','18401',jdecode('Meet+Our+Staff'),jdecode(''),'/18401/index.html','true',[ 
		['PAGE','38201',jdecode('Rev.+Chris+George'),jdecode(''),'/18401/38201.html','false',[],''],
		['PAGE','38222',jdecode('Rev.+H.+Easterling'),jdecode(''),'/18401/38222.html','false',[],''],
		['PAGE','38243',jdecode('Sarah+Walley'),jdecode(''),'/18401/38243.html','false',[],''],
		['PAGE','38285',jdecode('Rita+Wright'),jdecode(''),'/18401/38285.html','false',[],''],
		['PAGE','38327',jdecode('Gloria+Puckett'),jdecode(''),'/18401/38327.html','false',[],''],
		['PAGE','38306',jdecode('Dedra+Cassidey'),jdecode(''),'/18401/38306.html','false',[],''],
		['PAGE','107944',jdecode('Gwinelle+Allums'),jdecode(''),'/18401/107944.html','false',[],'']
	],''],
	['PAGE','89544',jdecode('Contact+Us'),jdecode(''),'/89544.html','true',[],''],
	['PAGE','13401',jdecode('Map+and+Directions'),jdecode(''),'/13401.html','true',[],''],
	['PAGE','78744',jdecode('SUBSCRIBE+TO+NEWS'),jdecode(''),'/78744.html','false',[],''],
	['PAGE','87244',jdecode('Our+History'),jdecode(''),'/87244.html','false',[],''],
	['PAGE','87265',jdecode('Our+Beliefs'),jdecode(''),'/87265.html','false',[],''],
	['PAGE','87286',jdecode('Our+Church+Covenant'),jdecode(''),'/87286.html','false',[],''],
	['PAGE','99744',jdecode('Newsletter+Sign-Up'),jdecode(''),'/99744.html','false',[],''],
	['PAGE','100744',jdecode('Temp+-+Prayer+Request'),jdecode(''),'/100744.html','false',[],''],
	['PAGE','104144',jdecode('Pastor+Chris%26%23x27%3Bs+Blog'),jdecode(''),'/104144.html','false',[],''],
	['PAGE','134522',jdecode('Choir'),jdecode(''),'/134522.html','true',[],'']];
var siteelementCount=44;
theSitetree.topTemplateName='Care';
theSitetree.paletteFamily='669999';
theSitetree.keyvisualId='207';
theSitetree.keyvisualName='apotheker.jpg';
theSitetree.fontsetId='19';
theSitetree.graphicsetId='16';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Care',
				paletteFamily: 	'669999',
				keyvisualId: 	'207',
				keyvisualName: 	'apotheker.jpg',
				fontsetId: 		'19',
				graphicsetId: 	'16',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'669999',
				b_color: 		'FF9900',
				c_color: 		'000000',
				d_color: 		'6A8493',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '13401',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20100225-194521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18401',
internalId:  '',
customField: '20090203-171250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10001',
internalId:  '',
customField: '20091129-211951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20801',
internalId:  '',
customField: '20100217-163342'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19601',
internalId:  '',
customField: '20080719-173533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21501',
internalId:  '',
customField: '20080311-123125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32501',
internalId:  '',
customField: '20081209-001931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26701',
internalId:  '',
customField: '20090623-104121'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33601',
internalId:  '',
customField: '20081204-023454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22401',
internalId:  '',
customField: '20081204-022603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13401',
internalId:  '',
customField: '20081204-014417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33001',
internalId:  '',
customField: '20081209-000741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32522',
internalId:  '',
customField: '20090708-173937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32543',
internalId:  '',
customField: '20081209-000427'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34001',
internalId:  '',
customField: '20080403-160047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35101',
internalId:  '',
customField: '20080331-173333'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35501',
internalId:  '',
customField: '20081005-172704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35801',
internalId:  '',
customField: '20080721-170158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76944',
internalId:  '',
customField: '20081005-172534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38243',
internalId:  '',
customField: '20080902-222807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38201',
internalId:  '',
customField: '20080902-222930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38222',
internalId:  '',
customField: '20090204-153320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81344',
internalId:  '',
customField: '20081119-232200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38285',
internalId:  '',
customField: '20080403-151811'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38327',
internalId:  '',
customField: '20080902-222402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38306',
internalId:  '',
customField: '20080403-143335'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42101',
internalId:  '',
customField: '20090708-172641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42401',
internalId:  '',
customField: '20090708-174158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42701',
internalId:  '',
customField: '20090708-173323'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43401',
internalId:  '',
customField: '20080830-101834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43422',
internalId:  '',
customField: '20080418-094718'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56701',
internalId:  '',
customField: '20090401-204505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78744',
internalId:  '',
customField: '20081209-003326'
};
webappMappings['7008']=webappMappings['7008-9558']={
webappId:    '7008',
documentId:  '78744',
internalId:  '9558',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83844',
internalId:  '',
customField: '20081125-140948'
};
webappMappings['7008']=webappMappings['7008-11321']={
webappId:    '7008',
documentId:  '99744',
internalId:  '11321',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86044',
internalId:  '',
customField: '20081210-180607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87265',
internalId:  '',
customField: '20081203-155132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87286',
internalId:  '',
customField: '20081203-154526'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87244',
internalId:  '',
customField: '20081203-163956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89544',
internalId:  '',
customField: '20090203-000213'
};
webappMappings['7008']=webappMappings['7008-11322']={
webappId:    '7008',
documentId:  '78744',
internalId:  '11322',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99744',
internalId:  '',
customField: '20081209-002457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100744',
internalId:  '',
customField: '20090102-194848'
};
webappMappings['7008']=webappMappings['7008-11999']={
webappId:    '7008',
documentId:  '100744',
internalId:  '11999',
customField: 'language:en;country:US;'
};
webappMappings['7050']=webappMappings['7050-6551']={
webappId:    '7050',
documentId:  '104144',
internalId:  '6551',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '104144',
internalId:  '',
customField: '20090102-201230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '107944',
internalId:  '',
customField: '20090204-153005'
};
webappMappings['1501']=webappMappings['1501-1280243']={
webappId:    '1501',
documentId:  '301',
internalId:  '1280243',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '134522',
internalId:  '',
customField: '20100208-181545'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0INX3Q5';
var companyName   = 'FIRST+BAPTIST+CHURCH+OF+MOBILE';
var htmlTitle	  = 'First+Baptist+Church+of+Mobile%2C+Alabama';
var metaKeywords  = 'FIRST+BAPTIST+CHURCH+MOBILE';
var metaContents  = 'First+Baptist+Church+of+Mobile%2C+Alabama.++Big+Enough+to+Meet+Your+Needs+...+Small+Enough+to+Know+your+Name%21FBC+Mobile+is+located+in+historic+downtown+Mobile%2C+Alabama%2C+just+across+Mobile+Bay+from+Baldwin+Countys+Eastern+Shore+and+minutes+from+West+Mobile.++The+unique+church+has+a+loving%2C+accepting+church+family+and+you+are+welcome+here.';
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();
};
