/* [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','47520',jdecode('Home'),jdecode(''), jdecode('%2F47520.html'), 'true',[],'',''],
	['PAGE','37720',jdecode('Who+We+Are'),jdecode(''), jdecode('%2F37720%2Findex.html'), 'true',[ 
		['PAGE','37741',jdecode('What+We+Believe'),jdecode(''), jdecode('%2F37720%2F37741.html'), 'true',[],'',''],
		['PAGE','26320',jdecode('Our+Mission+and+Purpose'),jdecode(''), jdecode('%2F37720%2F26320.html'), 'true',[],'',''],
		['PAGE','26741',jdecode('Our+Church+History'),jdecode(''), jdecode('%2F37720%2F26741.html'), 'true',[],'','']
	],'',''],
	['PAGE','26720',jdecode('Our+Pastors+and+Staff'),jdecode(''), jdecode('%2F26720.html'), 'true',[],'',''],
	['PAGE','37762',jdecode('Worship'),jdecode(''), jdecode('%2F37762%2Findex.html'), 'true',[ 
		['PAGE','26762',jdecode('Worship+Times'),jdecode(''), jdecode('%2F37762%2F26762.html'), 'true',[],'',''],
		['PAGE','37783',jdecode('What+to+expect'),jdecode(''), jdecode('%2F37762%2F37783.html'), 'true',[],'',''],
		['PAGE','37804',jdecode('Baptisms'),jdecode(''), jdecode('%2F37762%2F37804.html'), 'true',[],'',''],
		['PAGE','37825',jdecode('Adult+Choirs'),jdecode(''), jdecode('%2F37762%2F37825.html'), 'true',[],'',''],
		['PAGE','37846',jdecode('Children%26%23x27%3Bs+Choirs'),jdecode(''), jdecode('%2F37762%2F37846.html'), 'true',[],'',''],
		['PAGE','37867',jdecode('Praise+Team'),jdecode(''), jdecode('%2F37762%2F37867.html'), 'true',[],'','']
	],'',''],
	['PAGE','36320',jdecode('Children%26%23x27%3Bs+Ministry'),jdecode(''), jdecode('%2F36320%2Findex.html'), 'true',[ 
		['PAGE','77131',jdecode('Trunk+or+Treat+2010'),jdecode(''), jdecode('%2F36320%2F77131.html'), 'true',[],'','']
	],'',''],
	['PAGE','36362',jdecode('Youth+Ministry'),jdecode(''), jdecode('%2F36362.html'), 'true',[],'',''],
	['PAGE','30120',jdecode('Adult+Ministry'),jdecode(''), jdecode('%2F30120%2Findex.html'), 'true',[ 
		['PAGE','66531',jdecode('United+Methodist+Men'),jdecode(''), jdecode('%2F30120%2F66531.html'), 'true',[],'',''],
		['PAGE','52041',jdecode('United+Methodist+Women'),jdecode(''), jdecode('%2F30120%2F52041.html'), 'true',[],'',''],
		['PAGE','52062',jdecode('Disciple+Bible+Study'),jdecode(''), jdecode('%2F30120%2F52062.html'), 'true',[],'',''],
		['PAGE','52820',jdecode('Small+Groups+and+Bible+Studies'),jdecode(''), jdecode('%2F30120%2F52820.html'), 'true',[],'',''],
		['PAGE','52083',jdecode('Care+Team'),jdecode(''), jdecode('%2F30120%2F52083.html'), 'true',[],'',''],
		['PAGE','52841',jdecode('Men%26%23x27%3Bs+Fraternity'),jdecode(''), jdecode('%2F30120%2F52841.html'), 'true',[],'',''],
		['PAGE','52862',jdecode('Crown+Financial+Ministry'),jdecode(''), jdecode('%2F30120%2F52862.html'), 'true',[],'','']
	],'',''],
	['PAGE','37888',jdecode('Mission+Projects'),jdecode(''), jdecode('%2F37888.html'), 'true',[],'',''],
	['PAGE','37909',jdecode('Weddings+at+UMCNL'),jdecode(''), jdecode('%2F37909.html'), 'true',[],'',''],
	['ITEM','46720',jdecode('UMCNL+Calendar'),jdecode(''), jdecode('http%3A%2F%2Fwww.MyChurchEvents.com%2Fcalendar%2Fcalendar.aspx%3Fci%3DG1K5L6I3F0F0O9N8H2+'), 'true',[],'','_blank'],
	['PAGE','33920',jdecode('Upcoming+Events'),jdecode(''), jdecode('%2F33920.html'), 'true',[],'',''],
	['PAGE','37930',jdecode('KIDS+%26+Co.+Preschool'),jdecode(''), jdecode('%2F37930.html'), 'true',[],'',''],
	['PAGE','37951',jdecode('Read+Our+Newsletter'),jdecode(''), jdecode('%2F37951.html'), 'true',[],'',''],
	['PAGE','37972',jdecode('Prayer+Requests'),jdecode(''), jdecode('%2F37972.html'), 'true',[],'',''],
	['PAGE','37993',jdecode('How+to+Find+Us'),jdecode(''), jdecode('%2F37993.html'), 'true',[],'',''],
	['PAGE','33120',jdecode('Contact+us'),jdecode(''), jdecode('%2F33120.html'), 'true',[],'','']];
var siteelementCount=33;
theSitetree.topTemplateName='Profile';
theSitetree.paletteFamily='336699';
theSitetree.keyvisualId='1225';
theSitetree.keyvisualName='kinder.jpg';
theSitetree.fontsetId='190';
theSitetree.graphicsetId='230';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
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: 			'Profile',
				paletteFamily: 	'336699',
				keyvisualId: 	'1225',
				keyvisualName: 	'kinder.jpg',
				fontsetId: 		'190',
				graphicsetId: 	'230',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'336699',
				b_color: 		'336699',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52041',
internalId:  '',
customField: '20101127-012511'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26320',
internalId:  '',
customField: '20101126-234739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26720',
internalId:  '',
customField: '20101126-235413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26741',
internalId:  '',
customField: '20101127-004036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26762',
internalId:  '',
customField: '20100908-083513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30120',
internalId:  '',
customField: '20101021-144719'
};
webappMappings['7008']=webappMappings['7008-19346']={
webappId:    '7008',
documentId:  '37972',
internalId:  '19346',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33120',
internalId:  '',
customField: '20101127-011749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33920',
internalId:  '',
customField: '20111130-142214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36320',
internalId:  '',
customField: '20111018-125837'
};
webappMappings['7008']=webappMappings['7008-19518']={
webappId:    '7008',
documentId:  '37909',
internalId:  '19518',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37720',
internalId:  '',
customField: '20100923-084135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77131',
internalId:  '',
customField: '20101016-155436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37741',
internalId:  '',
customField: '20101127-003911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37888',
internalId:  '',
customField: '20101127-012414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37909',
internalId:  '',
customField: '20101127-012331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37972',
internalId:  '',
customField: '20100907-201250'
};
webappMappings['7008']=webappMappings['7008-19350']={
webappId:    '7008',
documentId:  '33120',
internalId:  '19350',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37762',
internalId:  '',
customField: '20110301-130357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37783',
internalId:  '',
customField: '20101126-235847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37804',
internalId:  '',
customField: '20100908-225931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37825',
internalId:  '',
customField: '20101110-151821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37846',
internalId:  '',
customField: '20101127-000755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37867',
internalId:  '',
customField: '20101110-153935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36362',
internalId:  '',
customField: '20101127-012929'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37951',
internalId:  '',
customField: '20110524-175213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37993',
internalId:  '',
customField: '20101127-002111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37930',
internalId:  '',
customField: '20101126-225342'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47520',
internalId:  '',
customField: '20111130-142012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52062',
internalId:  '',
customField: '20101127-001145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52820',
internalId:  '',
customField: '20101127-012707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52083',
internalId:  '',
customField: '20110301-170042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52841',
internalId:  '',
customField: '20100906-225016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52862',
internalId:  '',
customField: '20100906-225016'
};
webappMappings['7060']=webappMappings['7060-c2f58f4d15b9438e1ce9e19eb990adec']={
webappId:    '7060',
documentId:  '77131',
internalId:  'c2f58f4d15b9438e1ce9e19eb990adec',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66531',
internalId:  '',
customField: '20101126-223918'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I7102E';
var companyName   = 'United+Methodist+Church+of+New+Lenox';
var htmlTitle	  = 'UMCNL';
var metaKeywords  = 'United+Methodist+Church%2C+New+Lenox+IL%2C+New+Lenox+Illinois%2C+Methodist+Church%2C+United+Methodist+Church+New+Lenox%2C+New+Lenox+Church%2C+Sunday+school%2C+Rev.+Dr.+Jay+D.+Carr%2C+Pastor+Jay+Carr%2C+Wedding%2C+baptism%2C+historic+campground%2C+worship%2C+crown+financial%2C+disciple%2C+small+group%2C+Bible+study%2C+Pastor+Sarah+Hong';
var metaContents  = 'United+Methodist+Church+of+New+Lenox%2C+IL%2C+A+Place+to+Belong%21+A+Place+to+Become';
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();
};

