/* [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','32',jdecode('Home'),jdecode(''), jdecode('%2F32.html'), 'true',[],'',''],
	['PAGE','53',jdecode('About+us'),jdecode(''), jdecode('%2F53.html'), 'true',[],'',''],
	['PAGE','62',jdecode('Officers'),jdecode(''), jdecode('%2F62.html'), 'true',[],'',''],
	['PAGE','32901',jdecode('Membership'),jdecode(''), jdecode('%2F32901.html'), 'true',[],'',''],
	['PAGE','441',jdecode('Upcoming+Events'),jdecode(''), jdecode('%2F441.html'), 'true',[],'',''],
	['PAGE','739',jdecode('Announcements'),jdecode(''), jdecode('%2F739.html'), 'true',[],'',''],
	['PAGE','414',jdecode('The+Guardian+Staff'),jdecode(''), jdecode('%2F414.html'), 'true',[],'',''],
	['PAGE','859',jdecode('GK+Message'),jdecode(''), jdecode('%2F859.html'), 'true',[],'',''],
	['PAGE','868',jdecode('Pastor%26%23x27%3Bs+Desk'),jdecode(''), jdecode('%2F868.html'), 'true',[],'',''],
	['PAGE','877',jdecode('Field+Agent+Message'),jdecode(''), jdecode('%2F877.html'), 'true',[],'',''],
	['PAGE','886',jdecode('Right+to+Life'),jdecode(''), jdecode('%2F886.html'), 'true',[],'',''],
	['PAGE','895',jdecode('Morality+in+Media'),jdecode(''), jdecode('%2F895.html'), 'true',[],'',''],
	['PAGE','904',jdecode('Editor%26%23x27%3Bs+Desk'),jdecode(''), jdecode('%2F904.html'), 'true',[],'',''],
	['PAGE','994',jdecode('Editor%26%23x27%3Bs+Desk+%28follow+up+page%29'),jdecode(''), jdecode('%2F994.html'), 'true',[],'',''],
	['PAGE','913',jdecode('Op-Ed'),jdecode(''), jdecode('%2F913.html'), 'true',[],'',''],
	['PAGE','922',jdecode('Tidbits'),jdecode(''), jdecode('%2F922.html'), 'true',[],'',''],
	['PAGE','931',jdecode('Service+Program+Reports'),jdecode(''), jdecode('%2F931.html'), 'true',[],'',''],
	['PAGE','1701',jdecode('Birthdays+%26+Anniversaries'),jdecode(''), jdecode('%2F1701.html'), 'true',[],'',''],
	['PAGE','1082',jdecode('Sick+%26+Distressed'),jdecode(''), jdecode('%2F1082.html'), 'true',[],'',''],
	['PAGE','1710',jdecode('Deceased'),jdecode(''), jdecode('%2F1710.html'), 'true',[],'',''],
	['PAGE','20201',jdecode('Ads'),jdecode(''), jdecode('%2F20201%2Findex.html'), 'true',[ 
		['PAGE','20222',jdecode('Pictures'),jdecode(''), jdecode('%2F20201%2F20222.html'), 'false',[],'','']
	],'',''],
	['PAGE','2093',jdecode('Editorial+and+Stories'),jdecode(''), jdecode('%2F2093%2Findex.html'), 'true',[ 
		['PAGE','2102',jdecode('Jay+Leno'),jdecode(''), jdecode('%2F2093%2F2102.html'), 'true',[],'',''],
		['PAGE','2111',jdecode('How+Long'),jdecode(''), jdecode('%2F2093%2F2111.html'), 'true',[],'',''],
		['PAGE','3173',jdecode('Ann+Margaret'),jdecode(''), jdecode('%2F2093%2F3173.html'), 'true',[],'','']
	],'',''],
	['PAGE','1719',jdecode('First+Saturday'),jdecode(''), jdecode('%2F1719.html'), 'true',[],'',''],
	['PAGE','423',jdecode('Links'),jdecode(''), jdecode('%2F423.html'), 'true',[],'',''],
	['PAGE','432',jdecode('Contact'),jdecode(''), jdecode('%2F432.html'), 'true',[],'',''],
	['PAGE','1376',jdecode('Guestbook'),jdecode(''), jdecode('%2F1376%2Findex.html'), 'true',[ 
		['PAGE','1375',jdecode('Read+Guestbook'),jdecode(''), jdecode('%2F1376%2F1375.html'), 'true',[],'','']
	],'',''],
	['PAGE','1394',jdecode('Directions'),jdecode(''), jdecode('%2F1394.html'), 'true',[],'','']];
var siteelementCount=32;
theSitetree.topTemplateName='Americanlife';
theSitetree.paletteFamily='A71E1E';
theSitetree.keyvisualId='4238';
theSitetree.keyvisualName='kv_4238.jpg';
theSitetree.fontsetId='10674';
theSitetree.graphicsetId='11194';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='C53131';
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: 			'Americanlife',
				paletteFamily: 	'A71E1E',
				keyvisualId: 	'4238',
				keyvisualName: 	'kv_4238.jpg',
				fontsetId: 		'10674',
				graphicsetId: 	'11194',
				contentColor: 	'FFFFFF',
				contentBGColor: 'C53131',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-732526']={
webappId:    '1501',
documentId:  '32',
internalId:  '732526',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '32',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '739',
internalId:  '',
customField: '20111206-223626'
};
webappMappings['1002']=webappMappings['1002-1376AHW050IN22M3']={
webappId:    '1002',
documentId:  '1376',
internalId:  '1376AHW050IN22M3',
customField: 'icq=false'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '1394',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32',
internalId:  '',
customField: '20110213-121752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32901',
internalId:  '',
customField: '20110315-062910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53',
internalId:  '',
customField: '20110213-121812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62',
internalId:  '',
customField: '20110712-131510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '414',
internalId:  '',
customField: '20110308-215200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '859',
internalId:  '',
customField: '20110913-060053'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '868',
internalId:  '',
customField: '20110913-060211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '877',
internalId:  '',
customField: '20111016-225257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '886',
internalId:  '',
customField: '20111016-235903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '895',
internalId:  '',
customField: '20111016-225447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '904',
internalId:  '',
customField: '20100108-115414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '994',
internalId:  '',
customField: '20071123-204210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '913',
internalId:  '',
customField: '20111016-225608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '922',
internalId:  '',
customField: '20110712-134339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '931',
internalId:  '',
customField: '20111107-060549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1701',
internalId:  '',
customField: '20111107-060654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1082',
internalId:  '',
customField: '20110404-005952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1710',
internalId:  '',
customField: '20110712-134711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2093',
internalId:  '',
customField: '20080219-004044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2102',
internalId:  '',
customField: '20071129-050649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2111',
internalId:  '',
customField: '20071129-051950'
};
webappMappings['7008']=webappMappings['7008-7887']={
webappId:    '7008',
documentId:  '904',
internalId:  '7887',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3173',
internalId:  '',
customField: '20080229-215700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1719',
internalId:  '',
customField: '20111107-060456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '423',
internalId:  '',
customField: '20090205-221944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '432',
internalId:  '',
customField: '20100108-114259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '441',
internalId:  '',
customField: '20111107-060929'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20201',
internalId:  '',
customField: '20100919-232451'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1376',
internalId:  '',
customField: '20071123-222259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1375',
internalId:  '',
customField: '20071123-222259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1394',
internalId:  '',
customField: '20071123-235658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20222',
internalId:  '',
customField: '20090927-100014'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050IN22M3';
var companyName   = 'Immaculate+Heart+of+Mary+Knights+of+Columbus+Council+%2310206';
var htmlTitle	  = 'Immaculate+Heart+of+Mary+Knights+of+Columbus+Council+%2310206';
var metaKeywords  = '10206';
var metaContents  = 'Guardian';
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();
};

