/* [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','1301',jdecode('Home'),jdecode(''),'/1301.html','true',[],'',''],
	['PAGE','24466',jdecode('News'),jdecode(''),'/24466.html','true',[],'',''],
	['PAGE','1520',jdecode('Prayer+Requests....'),jdecode(''),'/1520/index.html','true',[ 
		['PAGE','9501',jdecode('Contact+%28follow+up+page%29'),jdecode(''),'/1520/9501.html','false',[],'','']
	],'',''],
	['PAGE','3301',jdecode('Outreach'),jdecode(''),'/3301.html','true',[],'',''],
	['PAGE','29201',jdecode('Projects'),jdecode(''),'/29201.html','true',[],'',''],
	['PAGE','18501',jdecode('Newsletter'),jdecode(''),'/18501/index.html','true',[ 
		['PAGE','19001',jdecode('newsletter+%28follow+up+page%29'),jdecode(''),'/18501/19001.html','false',[],'','']
	],'',''],
	['PAGE','7401',jdecode('Mass+Cards'),jdecode(''),'/7401/index.html','true',[ 
		['PAGE','15501',jdecode('Mass+Cards+%28follow+up+page%29'),jdecode(''),'/7401/15501.html','false',[],'','']
	],'','']];
var siteelementCount=10;
theSitetree.topTemplateName='Sonnemond';
theSitetree.paletteFamily='F9FBBF';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10442';
theSitetree.graphicsetId='10816';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='F9FBBF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Sonnemond',
				paletteFamily: 	'F9FBBF',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10442',
				graphicsetId: 	'10816',
				contentColor: 	'000000',
				contentBGColor: 'F9FBBF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'5C5898',
				e_color: 		'ED4747',
				f_color: 		'437D3B',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1301',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-986564']={
webappId:    '1501',
documentId:  '1301',
internalId:  '986564',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-8164']={
webappId:    '7008',
documentId:  '1520',
internalId:  '8164',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-8165']={
webappId:    '7008',
documentId:  '18501',
internalId:  '8165',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29201',
internalId:  '',
customField: '20100517-182425'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1301',
internalId:  '',
customField: '20100118-110428'
};
webappMappings['7008']=webappMappings['7008-8163']={
webappId:    '7008',
documentId:  '7401',
internalId:  '8163',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1520',
internalId:  '',
customField: '20100517-183358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24466',
internalId:  '',
customField: '20100517-170634'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7401',
internalId:  '',
customField: '20100118-133828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18501',
internalId:  '',
customField: '20090220-221957'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3301',
internalId:  '',
customField: '20100517-182627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9501',
internalId:  '',
customField: '20070522-162705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15501',
internalId:  '',
customField: '20080229-165820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19001',
internalId:  '',
customField: '20080504-232121'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INEJNG';
var companyName   = 'Saint+Michael%27s+Catholic+Mission';
var htmlTitle	  = 'Saint+Michael%27s+Mission';
var metaKeywords  = 'catholic%2C+jesuit%2C+native+american%2C+indian%2C+roman+catholic%2C+mass+cards%2C+healing%2C+prayer%2C+sehnert%2C+joseph+sehnert%2C+joseph+c.+sehnert%2C+joe+sehnert%2C+donations%2C+poverty%2C+help+for+native+americans%2C+mission+parish%2C+charity%2C+donations%2C++missions++st.+michaels++st.+mikes++saint+michaels++saint+mikes%2C+catholic+grants%2C+kewa%2C+rogers+bar%2C+sacred+heart%2C+pia+mission%2C+st.+anns%2C+seymour%2C+signor%2C+mason%2C+toulou%2C+stensgar%2C+carson%2C+banning%2C+ensminger%2C+pakootas%2C+seastrom%2C+boyd%2C+shaffer%2C+brandit%2C+st.+michaels+hall++saint+michaels+hall++roman+catholic++prayer+requests++society+of+jesus++joseph+sehnert++joseph+c.+sehnert++pastoral+administrator++diocese+of+spokane++jesuit+mission++jesuit+missions++native+american+youth++';
var metaContents  = 'catholic%2C+jesuit%2C+native+american%2C+indian%2C+roman+catholic%2C+mass+cards%2C+healing%2C+prayer%2C+sehnert%2C+joseph+sehnert%2C+joseph+c.+sehnert%2C+joe+sehnert%2C+donations%2C+poverty%2C+help+for+native+americans%2C+mission+parish%2C+charity%2C+donations%2C++missions++st.+michaels++st.+mikes++saint+michaels++saint+mikes%2C+catholic+grants%2C+kewa%2C+rogers+bar%2C+sacred+heart%2C+pia+mission%2C+st.+anns%2C+seymour%2C+signor%2C+mason%2C+toulou%2C+stensgar%2C+carson%2C+banning%2C+ensminger%2C+pakootas%2C+seastrom%2C+boyd%2C+shaffer%2C+brandit%2C+st.+michaels+hall++saint+michaels+hall++roman+catholic++prayer+requests++society+of+jesus++joseph+sehnert++joseph+c.+sehnert++pastoral+administrator++diocese+of+spokane++jesuit+mission++jesuit+missions++native+american+youth++';
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();
};
