/* [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','1801',jdecode('Home'),jdecode(''), jdecode('%2F1801.html'), 'true',[],'',''],
	['PAGE','2461',jdecode('About+us'),jdecode(''), jdecode('%2F2461.html'), 'true',[],'',''],
	['PAGE','4101',jdecode('Contact+Us'),jdecode(''), jdecode('%2F4101.html'), 'true',[],'',''],
	['PAGE','1852',jdecode('Advent%2FChristmas'),jdecode(''), jdecode('%2F1852.html'), 'true',[],'',''],
	['PAGE','1894',jdecode('BICI'),jdecode(''), jdecode('%2F1894.html'), 'true',[],'',''],
	['PAGE','1915',jdecode('Calendar'),jdecode(''), jdecode('%2F1915.html'), 'true',[],'',''],
	['PAGE','67401',jdecode('Chapter'),jdecode(''), jdecode('%2F67401.html'), 'true',[],'',''],
	['PAGE','1978',jdecode('Constitutions'),jdecode(''), jdecode('%2F1978.html'), 'true',[],'',''],
	['PAGE','1999',jdecode('Directories'),jdecode(''), jdecode('%2F1999.html'), 'true',[],'',''],
	['PAGE','132112',jdecode('Discussion+Forum'),jdecode(''), jdecode('%2F132112.html'), 'false',[],'',''],
	['PAGE','2020',jdecode('Forms'),jdecode(''), jdecode('%2F2020.html'), 'true',[],'',''],
	['PAGE','2041',jdecode('Franciscans+International'),jdecode(''), jdecode('%2F2041.html'), 'true',[],'',''],
	['PAGE','2062',jdecode('Friars+Only'),jdecode(''), jdecode('%2F2062.html'), 'true',[],'',''],
	['PAGE','2125',jdecode('Links'),jdecode(''), jdecode('%2F2125.html'), 'true',[],'',''],
	['PAGE','2146',jdecode('Liturgy+and+Prayer'),jdecode(''), jdecode('%2F2146.html'), 'true',[],'',''],
	['PAGE','2167',jdecode('Local+Ministers'),jdecode(''), jdecode('%2F2167.html'), 'true',[],'',''],
	['PAGE','2188',jdecode('Minutes'),jdecode(''), jdecode('%2F2188.html'), 'true',[],'',''],
	['PAGE','2209',jdecode('Minutes+Archive'),jdecode(''), jdecode('%2F2209.html'), 'true',[],'',''],
	['PAGE','2230',jdecode('Mission+Effectiveness'),jdecode(''), jdecode('%2F2230.html'), 'true',[],'',''],
	['PAGE','2251',jdecode('Necrology'),jdecode(''), jdecode('%2F2251.html'), 'true',[],'',''],
	['PAGE','2272',jdecode('Novitiate'),jdecode(''), jdecode('%2F2272.html'), 'true',[],'',''],
	['PAGE','2293',jdecode('Official+Documents'),jdecode(''), jdecode('%2F2293.html'), 'true',[],'',''],
	['PAGE','2314',jdecode('Other+Documents'),jdecode(''), jdecode('%2F2314.html'), 'true',[],'',''],
	['PAGE','2335',jdecode('Pastoral+Care+%26+Conciliation'),jdecode(''), jdecode('%2F2335.html'), 'true',[],'',''],
	['PAGE','2356',jdecode('Photo+Gallery'),jdecode(''), jdecode('%2F2356.html'), 'true',[],'',''],
	['PAGE','2377',jdecode('Social+Justice'),jdecode(''), jdecode('%2F2377.html'), 'true',[],'',''],
	['PAGE','2419',jdecode('Weekly+re%3ACap+newsletter'),jdecode(''), jdecode('%2F2419.html'), 'true',[],'',''],
	['PAGE','2440',jdecode('Wellness'),jdecode(''), jdecode('%2F2440.html'), 'true',[],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Display';
theSitetree.paletteFamily='580D02';
theSitetree.keyvisualId='11079';
theSitetree.keyvisualName='kv_11079.jpg';
theSitetree.fontsetId='31966';
theSitetree.graphicsetId='13803';
theSitetree.contentColor='340800';
theSitetree.contentBGColor='FBE5C3';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'fatcow',
  product: 'WSCSYSSSSLY0XRN4'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Display',
				paletteFamily: 	'580D02',
				keyvisualId: 	'11079',
				keyvisualName: 	'kv_11079.jpg',
				fontsetId: 		'31966',
				graphicsetId: 	'13803',
				contentColor: 	'340800',
				contentBGColor: 'FBE5C3',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1801',
internalId:  '',
customField: '20110324-114831'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1852',
internalId:  '',
customField: '20111210-152330'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1894',
internalId:  '',
customField: '20120107-105547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1915',
internalId:  '',
customField: '20120128-170737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1978',
internalId:  '',
customField: '20110310-124419'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1999',
internalId:  '',
customField: '20111227-093855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2020',
internalId:  '',
customField: '20110915-094504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2041',
internalId:  '',
customField: '20091124-160951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2062',
internalId:  '',
customField: '20100116-132438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '132112',
internalId:  '',
customField: '20110317-112015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2125',
internalId:  '',
customField: '20091124-160951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2146',
internalId:  '',
customField: '20110401-065948'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2167',
internalId:  '',
customField: '20120125-100614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2188',
internalId:  '',
customField: '20120109-134855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2209',
internalId:  '',
customField: '20100106-210710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2230',
internalId:  '',
customField: '20091124-160951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2251',
internalId:  '',
customField: '20120113-105032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2272',
internalId:  '',
customField: '20111224-130239'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2293',
internalId:  '',
customField: '20111005-123520'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2314',
internalId:  '',
customField: '20120107-105725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2335',
internalId:  '',
customField: '20120110-092641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2356',
internalId:  '',
customField: '20111105-154033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2377',
internalId:  '',
customField: '20120117-134725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67401',
internalId:  '',
customField: '20120109-135012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2419',
internalId:  '',
customField: '20120129-191722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2440',
internalId:  '',
customField: '20111116-204030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2461',
internalId:  '',
customField: '20100123-100343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4101',
internalId:  '',
customField: '20101024-220113'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0INVIZ6';
var companyName   = 'Province+of+St.+Joseph+-+Capuchin+Communications';
var htmlTitle	  = 'Capuchin+Communications';
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();
};

