/* [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','5101',jdecode('Home'),jdecode(''), jdecode('%2F5101.html'), 'true',[],'',''],
	['PAGE','5173',jdecode('About+us'),jdecode(''), jdecode('%2F5173.html'), 'true',[],'',''],
	['PAGE','13401',jdecode('Mission+'),jdecode(''), jdecode('%2F13401.html'), 'true',[],'',''],
	['PAGE','21512',jdecode('Our+Bulletin'),jdecode(''), jdecode('%2F21512.html'), 'true',[],'',''],
	['PAGE','16401',jdecode('Newsletter'),jdecode(''), jdecode('%2F16401.html'), 'true',[],'',''],
	['PAGE','37512',jdecode('Parish+Photos'),jdecode(''), jdecode('%2F37512.html'), 'true',[],'',''],
	['PAGE','5152',jdecode('Parish+Ministry'),jdecode(''), jdecode('%2F5152%2Findex.html'), 'true',[ 
		['PAGE','17269',jdecode('Music+Ministry'),jdecode(''), jdecode('%2F5152%2F17269.html'), 'true',[],'',''],
		['PAGE','16501',jdecode('Adult+Prayer+Group'),jdecode(''), jdecode('%2F5152%2F16501.html'), 'true',[],'',''],
		['PAGE','16522',jdecode('Adoration'),jdecode(''), jdecode('%2F5152%2F16522.html'), 'true',[],'',''],
		['PAGE','16543',jdecode('Altar+Servers'),jdecode(''), jdecode('%2F5152%2F16543.html'), 'true',[],'',''],
		['PAGE','16564',jdecode('Baptismal+Preparation'),jdecode(''), jdecode('%2F5152%2F16564.html'), 'true',[],'',''],
		['PAGE','16585',jdecode('Catholic+Ministries+Appeal'),jdecode(''), jdecode('%2F5152%2F16585.html'), 'true',[],'',''],
		['PAGE','16606',jdecode('Fr.+McKeon+Over+50+Club'),jdecode(''), jdecode('%2F5152%2F16606.html'), 'true',[],'',''],
		['PAGE','16627',jdecode('Garden+of+Life'),jdecode(''), jdecode('%2F5152%2F16627.html'), 'true',[],'',''],
		['PAGE','16648',jdecode('Holy+Names+of+Jesus+%26+Mary+Society'),jdecode(''), jdecode('%2F5152%2F16648.html'), 'true',[],'',''],
		['PAGE','17101',jdecode('Homebound'),jdecode(''), jdecode('%2F5152%2F17101.html'), 'true',[],'',''],
		['PAGE','17122',jdecode('Hospitality+%26+Sunday+Greeters'),jdecode(''), jdecode('%2F5152%2F17122.html'), 'true',[],'',''],
		['PAGE','17143',jdecode('Knights+of+Columbus'),jdecode(''), jdecode('%2F5152%2F17143.html'), 'true',[],'',''],
		['PAGE','17164',jdecode('Lectors'),jdecode(''), jdecode('%2F5152%2F17164.html'), 'true',[],'',''],
		['PAGE','17185',jdecode('Legion+of+Mary'),jdecode(''), jdecode('%2F5152%2F17185.html'), 'true',[],'',''],
		['PAGE','17206',jdecode('Living+Rosary'),jdecode(''), jdecode('%2F5152%2F17206.html'), 'true',[],'',''],
		['PAGE','17227',jdecode('Men%26%23x27%3Bs+Group'),jdecode(''), jdecode('%2F5152%2F17227.html'), 'true',[],'',''],
		['PAGE','17248',jdecode('Ministry+of+Consolation'),jdecode(''), jdecode('%2F5152%2F17248.html'), 'true',[],'',''],
		['PAGE','17290',jdecode('Respect+Life+Ministry'),jdecode(''), jdecode('%2F5152%2F17290.html'), 'true',[],'',''],
		['PAGE','17311',jdecode('RCIA'),jdecode(''), jdecode('%2F5152%2F17311.html'), 'true',[],'',''],
		['PAGE','17332',jdecode('Small+Church+Communities'),jdecode(''), jdecode('%2F5152%2F17332.html'), 'true',[],'',''],
		['PAGE','17353',jdecode('Stewardship'),jdecode(''), jdecode('%2F5152%2F17353.html'), 'true',[],'',''],
		['PAGE','17374',jdecode('Tree+of+Life'),jdecode(''), jdecode('%2F5152%2F17374.html'), 'true',[],'','']
	],'',''],
	['PAGE','13201',jdecode('Liturgy%2C+Sacraments'),jdecode(''), jdecode('%2F13201.html'), 'true',[],'',''],
	['PAGE','26012',jdecode('Stewardship'),jdecode(''), jdecode('%2F26012.html'), 'true',[],'',''],
	['PAGE','14301',jdecode('Faith+Formation'),jdecode(''), jdecode('%2F14301.html'), 'true',[],'',''],
	['PAGE','25212',jdecode('Fundraisers'),jdecode(''), jdecode('%2F25212.html'), 'true',[],'',''],
	['PAGE','13422',jdecode('Pastoral+Center'),jdecode(''), jdecode('%2F13422.html'), 'true',[],'',''],
	['PAGE','26412',jdecode('Parish+Contacts'),jdecode(''), jdecode('%2F26412.html'), 'true',[],'',''],
	['PAGE','27712',jdecode('Location'),jdecode(''), jdecode('%2F27712.html'), 'true',[],'','']];
var siteelementCount=36;
theSitetree.topTemplateName='Enjoy';
theSitetree.paletteFamily='93A6CC';
theSitetree.keyvisualId='2224';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='364';
theSitetree.graphicsetId='415';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='93A6CC';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'optimum',
  product: 'WSCSYSSSSLYTC245'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Enjoy',
				paletteFamily: 	'93A6CC',
				keyvisualId: 	'2224',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'364',
				graphicsetId: 	'415',
				contentColor: 	'FFFFFF',
				contentBGColor: '93A6CC',
				a_color: 		'93A6CC',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5101',
internalId:  '',
customField: '20120106-101029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5152',
internalId:  '',
customField: '20101201-160802'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5173',
internalId:  '',
customField: '20110111-191407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14301',
internalId:  '',
customField: '20111219-093304'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13201',
internalId:  '',
customField: '20110901-154027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13401',
internalId:  '',
customField: '20101105-152100'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13422',
internalId:  '',
customField: '20120113-130714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16401',
internalId:  '',
customField: '20120123-084706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16501',
internalId:  '',
customField: '20100902-162018'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16522',
internalId:  '',
customField: '20100902-162038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16543',
internalId:  '',
customField: '20100902-162136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16564',
internalId:  '',
customField: '20100902-162154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16606',
internalId:  '',
customField: '20100902-162500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16648',
internalId:  '',
customField: '20100902-162829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17143',
internalId:  '',
customField: '20100902-161933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17164',
internalId:  '',
customField: '20100902-161933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16585',
internalId:  '',
customField: '20100902-162238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16627',
internalId:  '',
customField: '20100902-162542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17101',
internalId:  '',
customField: '20100902-161933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17122',
internalId:  '',
customField: '20100902-161933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17185',
internalId:  '',
customField: '20100902-161933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17206',
internalId:  '',
customField: '20100902-161933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17227',
internalId:  '',
customField: '20100902-161933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17248',
internalId:  '',
customField: '20100902-161933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17269',
internalId:  '',
customField: '20110111-190543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17290',
internalId:  '',
customField: '20100902-161933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17311',
internalId:  '',
customField: '20100902-161933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17332',
internalId:  '',
customField: '20100902-161933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17353',
internalId:  '',
customField: '20100902-161933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17374',
internalId:  '',
customField: '20100902-161933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21512',
internalId:  '',
customField: '20120127-083355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25212',
internalId:  '',
customField: '20110823-074349'
};
webappMappings['7060']=webappMappings['7060-6eadd3f53c31e0b7174d47d0844fdfa9']={
webappId:    '7060',
documentId:  '37512',
internalId:  '6eadd3f53c31e0b7174d47d0844fdfa9',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26012',
internalId:  '',
customField: '20110112-142024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26412',
internalId:  '',
customField: '20101201-161012'
};
webappMappings['7060']=webappMappings['7060-118da66160e54ac86b63eace85b9b4fa']={
webappId:    '7060',
documentId:  '21512',
internalId:  '118da66160e54ac86b63eace85b9b4fa',
customField: 'language:en;country:US;'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '27712',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27712',
internalId:  '',
customField: '20101202-102508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37512',
internalId:  '',
customField: '20110823-075923'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INZ4C9';
var companyName   = 'Church+of+the+Blessed+Sacrament';
var htmlTitle	  = 'Church+of+the+Blessed+Sacrament';
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();
};

