/* [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','3001',jdecode('Home'),jdecode(''),'/3001.html','true',[],'',''],
	['PAGE','3765',jdecode('About+us'),jdecode(''),'/3765/index.html','true',[ 
		['PAGE','42001',jdecode('Staff'),jdecode(''),'/3765/42001.html','true',[],'',''],
		['PAGE','3912',jdecode('Contact+Us'),jdecode(''),'/3765/3912.html','true',[],'',''],
		['PAGE','82262',jdecode('Grapevine+'),jdecode(''),'/3765/82262.html','true',[],'',''],
		['PAGE','126486',jdecode('Directions'),jdecode(''),'/3765/126486.html','true',[],'',''],
		['PAGE','22843',jdecode('Session'),jdecode(''),'/3765/22843.html','true',[],'',''],
		['PAGE','132106',jdecode('RPC+outings+%26+activities'),jdecode(''),'/3765/132106.html','true',[],'','']
	],'',''],
	['PAGE','22822',jdecode('Logistics'),jdecode(''),'/22822.html','true',[],'',''],
	['PAGE','3786',jdecode('Discipleship'),jdecode(''),'/3786/index.html','true',[ 
		['PAGE','25101',jdecode('Christian+Education'),jdecode(''),'/3786/25101.html','true',[],'',''],
		['PAGE','25122',jdecode('Children+and+Youth+'),jdecode(''),'/3786/25122.html','true',[],'',''],
		['PAGE','25901',jdecode('Sunday+School'),jdecode(''),'/3786/25901.html','true',[],'',''],
		['PAGE','25164',jdecode('Worship'),jdecode(''),'/3786/25164.html','true',[],'',''],
		['PAGE','27201',jdecode('Adult+Choir'),jdecode(''),'/3786/27201.html','true',[],'',''],
		['PAGE','25143',jdecode('Missions'),jdecode(''),'/3786/25143.html','true',[],'','']
	],'',''],
	['PAGE','22801',jdecode('Congregational+Life'),jdecode(''),'/22801/index.html','true',[ 
		['PAGE','23001',jdecode('Fellowship'),jdecode(''),'/22801/23001.html','true',[],'',''],
		['PAGE','126886',jdecode('Member+Care'),jdecode(''),'/22801/126886.html','true',[],'',''],
		['PAGE','127186',jdecode('Presbyterian+Women'),jdecode(''),'/22801/127186.html','true',[],'','']
	],'',''],
	['PAGE','3891',jdecode('Calendar'),jdecode(''),'/3891.html','true',[],'',''],
	['PAGE','128286',jdecode('Links'),jdecode(''),'/128286.html','true',[],'','']];
var siteelementCount=22;
theSitetree.topTemplateName='Nebula';
theSitetree.paletteFamily='7A7A7B';
theSitetree.keyvisualId='8792';
theSitetree.keyvisualName='kv_8792.jpg';
theSitetree.fontsetId='17095';
theSitetree.graphicsetId='12478';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='AFAEB0';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Nebula',
				paletteFamily: 	'7A7A7B',
				keyvisualId: 	'8792',
				keyvisualName: 	'kv_8792.jpg',
				fontsetId: 		'17095',
				graphicsetId: 	'12478',
				contentColor: 	'000000',
				contentBGColor: 'AFAEB0',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3001',
internalId:  '',
customField: '20100826-144151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3912',
internalId:  '',
customField: '20091117-112528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23001',
internalId:  '',
customField: '20091117-102407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3765',
internalId:  '',
customField: '20091209-102305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3891',
internalId:  '',
customField: '20100720-141317'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3786',
internalId:  '',
customField: '20100202-142306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22801',
internalId:  '',
customField: '20100330-122145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22822',
internalId:  '',
customField: '20100330-122041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25164',
internalId:  '',
customField: '20091105-141941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22843',
internalId:  '',
customField: '20100202-143348'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25101',
internalId:  '',
customField: '20091119-142712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25901',
internalId:  '',
customField: '20091118-105823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25122',
internalId:  '',
customField: '20091103-122135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25143',
internalId:  '',
customField: '20091117-150115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27201',
internalId:  '',
customField: '20091112-140246'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '3001',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42001',
internalId:  '',
customField: '20091209-114628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '126486',
internalId:  '',
customField: '20091117-113645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82262',
internalId:  '',
customField: '20100629-151644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '126886',
internalId:  '',
customField: '20091117-101340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127186',
internalId:  '',
customField: '20091118-113008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '128286',
internalId:  '',
customField: '20091208-132017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132106',
internalId:  '',
customField: '20100701-135824'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHPI0';
var companyName   = 'RIVERCHASE+PRESBYTERIAN+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();
};
