/* [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','11',jdecode('Home'),jdecode(''), jdecode('%2F11%2Findex.html'), 'true',[ 
		['PAGE','35601',jdecode('%22Songs+of+Praise%22'),jdecode(''), jdecode('%2F11%2F35601.html'), 'true',[],'','']
	],'',''],
	['PAGE','1070',jdecode('About+us'),jdecode(''), jdecode('%2F1070%2Findex.html'), 'true',[ 
		['PAGE','1079',jdecode('Worship'),jdecode(''), jdecode('%2F1070%2F1079.html'), 'true',[],'',''],
		['PAGE','16601',jdecode('Craig+McGaha'),jdecode(''), jdecode('%2F1070%2F16601.html'), 'true',[],'',''],
		['PAGE','16622',jdecode('Grady+Peters'),jdecode(''), jdecode('%2F1070%2F16622.html'), 'true',[],'',''],
		['PAGE','16643',jdecode('Jonathan+Woods'),jdecode(''), jdecode('%2F1070%2F16643.html'), 'true',[],'',''],
		['PAGE','16664',jdecode('Richard+A.+Prince'),jdecode(''), jdecode('%2F1070%2F16664.html'), 'true',[],'','']
	],'',''],
	['PAGE','1088',jdecode('Ministries'),jdecode(''), jdecode('%2F1088%2Findex.html'), 'true',[ 
		['PAGE','1097',jdecode('Canaan+Downloads'),jdecode(''), jdecode('%2F1088%2F1097.html'), 'true',[],'',''],
		['PAGE','1106',jdecode('Contact+Information'),jdecode(''), jdecode('%2F1088%2F1106.html'), 'true',[],'',''],
		['PAGE','6851',jdecode('Canaan+History'),jdecode(''), jdecode('%2F1088%2F6851.html'), 'true',[],'',''],
		['PAGE','1115',jdecode('Links'),jdecode(''), jdecode('%2F1088%2F1115.html'), 'true',[],'',''],
		['PAGE','5294',jdecode('Community+Support'),jdecode(''), jdecode('%2F1088%2F5294.html'), 'true',[],'',''],
		['PAGE','6374',jdecode('Youth+Ministry'),jdecode(''), jdecode('%2F1088%2F6374.html'), 'true',[],'',''],
		['PAGE','6503',jdecode('International+Ministries'),jdecode(''), jdecode('%2F1088%2F6503.html'), 'true',[],'','']
	],'',''],
	['PAGE','6720',jdecode('Homeless+Ministries'),jdecode(''), jdecode('%2F6720.html'), 'true',[],'',''],
	['PAGE','147267',jdecode('June+2011+Family+Reunion+Info'),jdecode(''), jdecode('%2F147267.html'), 'true',[],'',''],
	['PAGE','1124',jdecode('From+Bondage+To+Freedom'),jdecode(''), jdecode('%2F1124%2Findex.html'), 'true',[ 
		['PAGE','1133',jdecode('Publication+'),jdecode(''), jdecode('%2F1124%2F1133.html'), 'true',[],'',''],
		['PAGE','1142',jdecode('Gifts+of+the+Spirit'),jdecode(''), jdecode('%2F1124%2F1142.html'), 'true',[],'',''],
		['PAGE','1151',jdecode('Body+of+Christ'),jdecode(''), jdecode('%2F1124%2F1151.html'), 'true',[],'','']
	],'',''],
	['PAGE','1160',jdecode('Pastor+G.+B.+Prince+Jr.+Family'),jdecode(''), jdecode('%2F1160%2Findex.html'), 'true',[ 
		['PAGE','1169',jdecode('%22Full+Vessels%22'),jdecode(''), jdecode('%2F1160%2F1169.html'), 'true',[],'',''],
		['PAGE','1178',jdecode('%22Effective+Church%22'),jdecode(''), jdecode('%2F1160%2F1178.html'), 'true',[],'',''],
		['PAGE','1187',jdecode('%22Hallelujah%22'),jdecode(''), jdecode('%2F1160%2F1187.html'), 'true',[],'',''],
		['PAGE','7028',jdecode('%22Hinderance+to+Prayer%22'),jdecode(''), jdecode('%2F1160%2F7028.html'), 'true',[],'',''],
		['PAGE','7184',jdecode('%22Basis+of+Christian+Unity%22'),jdecode(''), jdecode('%2F1160%2F7184.html'), 'true',[],'',''],
		['PAGE','7193',jdecode('%22Are+We+Growing%3F%22'),jdecode(''), jdecode('%2F1160%2F7193.html'), 'true',[],'',''],
		['PAGE','7202',jdecode('%22Christ+our+example+PrayerLife%22'),jdecode(''), jdecode('%2F1160%2F7202.html'), 'true',[],'',''],
		['PAGE','7211',jdecode('%22Luke%22'),jdecode(''), jdecode('%2F1160%2F7211.html'), 'true',[],'',''],
		['PAGE','7220',jdecode('Prince+Reunion+2006'),jdecode(''), jdecode('%2F1160%2F7220.html'), 'true',[],'','']
	],'',''],
	['PAGE','167167',jdecode('Pastor+G.+B.+Prince+Jr.+Family+continue'),jdecode(''), jdecode('%2F167167.html'), 'true',[],'',''],
	['PAGE','75401',jdecode('Burleson+Family+Tree'),jdecode(''), jdecode('%2F75401.html'), 'true',[],'',''],
	['PAGE','77201',jdecode('Cash+Family+Tree'),jdecode(''), jdecode('%2F77201.html'), 'true',[],'',''],
	['PAGE','101412',jdecode('Prince+Family+Tree'),jdecode(''), jdecode('%2F101412.html'), 'true',[],'',''],
	['PAGE','108523',jdecode('Prince+Family+History+from+Slavery'),jdecode(''), jdecode('%2F108523.html'), 'true',[],'',''],
	['PAGE','5330',jdecode('Whole+Counsel+of+God+Series'),jdecode(''), jdecode('%2F5330%2Findex.html'), 'true',[ 
		['PAGE','5662',jdecode('++1.+Keeping+Hope+Alive+'),jdecode(''), jdecode('%2F5330%2F5662.html'), 'true',[],'',''],
		['PAGE','5671',jdecode('2.+None+But+the+Righteous'),jdecode(''), jdecode('%2F5330%2F5671.html'), 'true',[],'',''],
		['PAGE','5680',jdecode('3.+The+Making+of+the+Righteous'),jdecode(''), jdecode('%2F5330%2F5680.html'), 'true',[],'',''],
		['PAGE','5689',jdecode('4.+Suffering+of+The+Righteous'),jdecode(''), jdecode('%2F5330%2F5689.html'), 'true',[],'',''],
		['PAGE','5698',jdecode('5.+Rest+For+The+Soul'),jdecode(''), jdecode('%2F5330%2F5698.html'), 'true',[],'',''],
		['PAGE','5707',jdecode('6.+Vision+of+Salvation'),jdecode(''), jdecode('%2F5330%2F5707.html'), 'true',[],'',''],
		['PAGE','5716',jdecode('7.+Rewards+of+the+Faithful'),jdecode(''), jdecode('%2F5330%2F5716.html'), 'true',[],'',''],
		['PAGE','5725',jdecode('8.+Joy+in+the+Kingdom+of+God'),jdecode(''), jdecode('%2F5330%2F5725.html'), 'true',[],'',''],
		['PAGE','5734',jdecode('9.+Building+Up+the+Kingdom'),jdecode(''), jdecode('%2F5330%2F5734.html'), 'true',[],'',''],
		['PAGE','5743',jdecode('10.+Sowing+Seeds+in+the+Kingdom'),jdecode(''), jdecode('%2F5330%2F5743.html'), 'true',[],'','']
	],'',''],
	['PAGE','5516',jdecode('Sermons'),jdecode(''), jdecode('%2F5516%2Findex.html'), 'true',[ 
		['PAGE','5525',jdecode('Love+not+the+world'),jdecode(''), jdecode('%2F5516%2F5525.html'), 'true',[],'',''],
		['PAGE','5534',jdecode('Dealing+with+those+fiery+darts'),jdecode(''), jdecode('%2F5516%2F5534.html'), 'true',[],'',''],
		['PAGE','5543',jdecode('Take+No+Thought'),jdecode(''), jdecode('%2F5516%2F5543.html'), 'true',[],'','']
	],'',''],
	['PAGE','41201',jdecode('JusBrushEm'),jdecode(''), jdecode('%2F41201.html'), 'true',[],'',''],
	['PAGE','45501',jdecode('+++++Photo+Album+I'),jdecode(''), jdecode('%2F45501.html'), 'true',[],'',''],
	['PAGE','91212',jdecode('Photo+Album+II'),jdecode(''), jdecode('%2F91212.html'), 'true',[],'',''],
	['PAGE','177367',jdecode('Fred+%26+MeSheila+Wedding'),jdecode(''), jdecode('%2F177367.html'), 'true',[],'',''],
	['PAGE','63501',jdecode('Athens+Greece+Mission+08'),jdecode(''), jdecode('%2F63501.html'), 'true',[],'','']];
var siteelementCount=57;
theSitetree.topTemplateName='Commander';
theSitetree.paletteFamily='2B25A2';
theSitetree.keyvisualId='2385';
theSitetree.keyvisualName='leiterplatte.jpg';
theSitetree.fontsetId='392';
theSitetree.graphicsetId='439';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='E0E0E0';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp35-attweb',
  product: 'WSCSYSSSSLY0X9RC'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Commander',
				paletteFamily: 	'2B25A2',
				keyvisualId: 	'2385',
				keyvisualName: 	'leiterplatte.jpg',
				fontsetId: 		'392',
				graphicsetId: 	'439',
				contentColor: 	'000000',
				contentBGColor: 'E0E0E0',
				a_color: 		'E0E0E0',
				b_color: 		'5762CA',
				c_color: 		'A1A4D2',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '11',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11',
internalId:  '',
customField: '20120131-174225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1070',
internalId:  '',
customField: '20080529-211912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1088',
internalId:  '',
customField: '20110623-205434'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41201',
internalId:  '',
customField: '20070723-204610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16664',
internalId:  '',
customField: '20101015-151937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35601',
internalId:  '',
customField: '20090807-223759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1079',
internalId:  '',
customField: '20060621-132733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16601',
internalId:  '',
customField: '20110713-165011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16622',
internalId:  '',
customField: '20070723-204820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16643',
internalId:  '',
customField: '20101130-140723'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1097',
internalId:  '',
customField: '20060602-104453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1106',
internalId:  '',
customField: '20060602-100801'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6851',
internalId:  '',
customField: '20060707-174951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1115',
internalId:  '',
customField: '20060612-174147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5294',
internalId:  '',
customField: '20060623-112516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6374',
internalId:  '',
customField: '20060706-112406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6503',
internalId:  '',
customField: '20090324-161210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6720',
internalId:  '',
customField: '20060707-105453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1124',
internalId:  '',
customField: '20060623-171412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1133',
internalId:  '',
customField: '20070429-230929'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1142',
internalId:  '',
customField: '20070429-230844'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1151',
internalId:  '',
customField: '20060623-182843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1160',
internalId:  '',
customField: '20120203-135907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1169',
internalId:  '',
customField: '20060718-163557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1178',
internalId:  '',
customField: '20060718-172612'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1187',
internalId:  '',
customField: '20060718-172515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7028',
internalId:  '',
customField: '20060718-173516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7184',
internalId:  '',
customField: '20060720-175056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7193',
internalId:  '',
customField: '20060721-164015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7202',
internalId:  '',
customField: '20060721-155839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7211',
internalId:  '',
customField: '20070506-204541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7220',
internalId:  '',
customField: '20070515-220327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75401',
internalId:  '',
customField: '20100908-214120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77201',
internalId:  '',
customField: '20100907-150724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5330',
internalId:  '',
customField: '20070503-035055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5662',
internalId:  '',
customField: '20070503-040037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5671',
internalId:  '',
customField: '20060616-173015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5680',
internalId:  '',
customField: '20060614-131503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5689',
internalId:  '',
customField: '20060614-142830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5698',
internalId:  '',
customField: '20060615-104134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5707',
internalId:  '',
customField: '20060615-155740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5716',
internalId:  '',
customField: '20060615-160819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5725',
internalId:  '',
customField: '20060615-171144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5734',
internalId:  '',
customField: '20060615-175523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5743',
internalId:  '',
customField: '20060620-181723'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5516',
internalId:  '',
customField: '20070501-220000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5525',
internalId:  '',
customField: '20060612-175512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5534',
internalId:  '',
customField: '20060706-100125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5543',
internalId:  '',
customField: '20070425-234758'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45501',
internalId:  '',
customField: '20110713-165359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63501',
internalId:  '',
customField: '20090324-163839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91212',
internalId:  '',
customField: '20100902-093254'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101412',
internalId:  '',
customField: '20110626-201945'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108523',
internalId:  '',
customField: '20100820-153736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '147267',
internalId:  '',
customField: '20110706-221618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '167167',
internalId:  '',
customField: '20101117-002109'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '177367',
internalId:  '',
customField: '20101208-152442'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN2ANW';
var companyName   = 'Canaan+Valley+Ministries+';
var htmlTitle	  = 'Canaan+Valley+Ministries';
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();
};

