/* [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','1701',jdecode('Home'),jdecode(''),'/1701.html','true',[],'',''],
	['PAGE','2301',jdecode('About+us'),jdecode(''),'/2301.html','true',[],'',''],
	['PAGE','25751',jdecode('Staff+Bios'),jdecode(''),'/25751/index.html','true',[ 
		['PAGE','26251',jdecode('Samuel+G.+Catoe'),jdecode(''),'/25751/26251.html','true',[],'',''],
		['PAGE','26272',jdecode('Andy+Stokes'),jdecode(''),'/25751/26272.html','true',[],'',''],
		['PAGE','26293',jdecode('Tommy+Moore'),jdecode(''),'/25751/26293.html','true',[],'','']
	],'',''],
	['PAGE','2322',jdecode('Opportunities'),jdecode(''),'/2322/index.html','true',[ 
		['PAGE','31731',jdecode('Sunday+School'),jdecode(''),'/2322/31731.html','true',[],'',''],
		['PAGE','31752',jdecode('Sunday+Worship'),jdecode(''),'/2322/31752.html','true',[],'',''],
		['PAGE','31831',jdecode('Midweek+Service'),jdecode(''),'/2322/31831.html','true',[],'',''],
		['PAGE','40831',jdecode('IGNITE%21'),jdecode(''),'/2322/40831.html','true',[],'',''],
		['PAGE','43731',jdecode('Park+Street+FIT+Club'),jdecode(''),'/2322/43731.html','true',[],'','']
	],'',''],
	['PAGE','2364',jdecode('Student+Ministry'),jdecode(''),'/2364/index.html','true',[ 
		['PAGE','25451',jdecode('From+the+Youth+Pastor...'),jdecode(''),'/2364/25451.html','true',[],'',''],
		['PAGE','43031',jdecode('David+Crowder+Band'),jdecode(''),'/2364/43031.html','true',[],'','']
	],'',''],
	['PAGE','13111',jdecode('Student+Ministry+PIX%21'),jdecode(''),'/13111/index.html','true',[ 
		['PAGE','6101',jdecode('Atlanta+Fest+2009'),jdecode(''),'/13111/6101.html','true',[],'',''],
		['PAGE','36431',jdecode('Whataburger'),jdecode(''),'/13111/36431.html','true',[],'',''],
		['PAGE','27251',jdecode('Carowinds%21'),jdecode(''),'/13111/27251.html','true',[],'',''],
		['PAGE','13711',jdecode('Lock+In+%232'),jdecode(''),'/13111/13711.html','true',[],'',''],
		['PAGE','25041',jdecode('Lock+In+%231'),jdecode(''),'/13111/25041.html','true',[],'','']
	],'',''],
	['PAGE','2385',jdecode('Children%26%23x27%3Bs+Ministry'),jdecode(''),'/2385/index.html','true',[ 
		['PAGE','29371',jdecode('Fall+Festival+%26%23x27%3B07'),jdecode(''),'/2385/29371.html','true',[],'',''],
		['PAGE','41731',jdecode('2010+VBS%21'),jdecode(''),'/2385/41731.html','true',[],'','']
	],'',''],
	['PAGE','2406',jdecode('Music+Ministry'),jdecode(''),'/2406.html','true',[],'',''],
	['PAGE','2343',jdecode('Contact'),jdecode(''),'/2343.html','true',[],'',''],
	['PAGE','28271',jdecode('Directions'),jdecode(''),'/28271.html','true',[],'',''],
	['PAGE','2427',jdecode('Missions'),jdecode(''),'/2427.html','true',[],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Sense';
theSitetree.paletteFamily='5D8047';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10498';
theSitetree.graphicsetId='11110';
theSitetree.contentColor='3A6022';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Sense',
				paletteFamily: 	'5D8047',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10498',
				graphicsetId: 	'11110',
				contentColor: 	'3A6022',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1701',
internalId:  '',
customField: '20100618-145519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2322',
internalId:  '',
customField: '20100113-142143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2301',
internalId:  '',
customField: '20091224-102457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2343',
internalId:  '',
customField: '20091227-154605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2364',
internalId:  '',
customField: '20091224-142825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2385',
internalId:  '',
customField: '20100104-132147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2406',
internalId:  '',
customField: '20090930-161010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2427',
internalId:  '',
customField: '20090930-161010'
};
webappMappings['7060']=webappMappings['7060-f3b922fc6038ad42fa4c126a0f6959cf']={
webappId:    '7060',
documentId:  '6101',
internalId:  'f3b922fc6038ad42fa4c126a0f6959cf',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6101',
internalId:  '',
customField: '20091224-132545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13111',
internalId:  '',
customField: '20091224-142230'
};
webappMappings['7060']=webappMappings['7060-0fa3784a186cfd5dbb8e400237c33d0e']={
webappId:    '7060',
documentId:  '13711',
internalId:  '0fa3784a186cfd5dbb8e400237c33d0e',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13711',
internalId:  '',
customField: '20091224-140203'
};
webappMappings['7060']=webappMappings['7060-4e15de039d0e950ea71696eaf37224aa']={
webappId:    '7060',
documentId:  '25041',
internalId:  '4e15de039d0e950ea71696eaf37224aa',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25041',
internalId:  '',
customField: '20091227-155606'
};
webappMappings['7050']=webappMappings['7050-3729']={
webappId:    '7050',
documentId:  '25451',
internalId:  '3729',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25451',
internalId:  '',
customField: '20091224-144213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25751',
internalId:  '',
customField: '20091227-150742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26251',
internalId:  '',
customField: '20100124-141205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26293',
internalId:  '',
customField: '20091227-153116'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26272',
internalId:  '',
customField: '20091227-150922'
};
webappMappings['7060']=webappMappings['7060-1004cb8208e25175ea74a2dde24a823f']={
webappId:    '7060',
documentId:  '27251',
internalId:  '1004cb8208e25175ea74a2dde24a823f',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27251',
internalId:  '',
customField: '20091227-161139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28271',
internalId:  '',
customField: '20100104-120430'
};
webappMappings['7060']=webappMappings['7060-515bbf6573671ad878c7928fc2bda587']={
webappId:    '7060',
documentId:  '29371',
internalId:  '515bbf6573671ad878c7928fc2bda587',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29371',
internalId:  '',
customField: '20100104-135044'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31731',
internalId:  '',
customField: '20100325-205109'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31752',
internalId:  '',
customField: '20100113-110919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31831',
internalId:  '',
customField: '20100113-112915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40831',
internalId:  '',
customField: '20100622-191132'
};
webappMappings['7060']=webappMappings['7060-4801dd51e2768df26f271a3d618d1a05']={
webappId:    '7060',
documentId:  '36431',
internalId:  '4801dd51e2768df26f271a3d618d1a05',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36431',
internalId:  '',
customField: '20100325-185224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41731',
internalId:  '',
customField: '20100623-083156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43731',
internalId:  '',
customField: '20100811-230730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43031',
internalId:  '',
customField: '20100802-140105'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHVBA';
var companyName   = 'Park+Street+Baptist+Church';
var htmlTitle	  = '';
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();
};
