/* [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','601',jdecode('Home'),jdecode(''),'/601.html','true',[],'',''],
	['PAGE','60001',jdecode('Our+Director'),jdecode(''),'/60001.html','true',[],'',''],
	['PAGE','106001',jdecode('Apostolic+Succession'),jdecode(''),'/106001.html','true',[],'',''],
	['PAGE','652',jdecode('About+us'),jdecode(''),'/652/index.html','true',[ 
		['PAGE','673',jdecode('Our+Clergy+and+Staff'),jdecode(''),'/652/673.html','true',[],'','']
	],'',''],
	['PAGE','107401',jdecode('Retreats+.+Q+%26+A'),jdecode(''),'/107401.html','true',[],'',''],
	['PAGE','49601',jdecode('Clergy+-+Staff+Photos'),jdecode(''),'/49601.html','true',[],'',''],
	['PAGE','694',jdecode('Contact+Information'),jdecode(''),'/694/index.html','true',[ 
		['PAGE','715',jdecode('Phone+and+Address'),jdecode(''),'/694/715/index.html','true',[ 
			['PAGE','97201',jdecode('Phone+and+Address+%28follow+up+page%29'),jdecode(''),'/694/715/97201.html','false',[],'','']
		],'','']
	],'',''],
	['PAGE','736',jdecode('Services+we+Offer'),jdecode(''),'/736/index.html','true',[ 
		['PAGE','757',jdecode('Marriage+Services'),jdecode(''),'/736/757.html','true',[],'',''],
		['PAGE','778',jdecode('Pre+Marital+Counseling'),jdecode(''),'/736/778.html','true',[],'',''],
		['PAGE','799',jdecode('Marriage+Counseling'),jdecode(''),'/736/799.html','true',[],'',''],
		['PAGE','64501',jdecode('Other+Ministerial+Services'),jdecode(''),'/736/64501.html','true',[],'',''],
		['PAGE','23501',jdecode('Spiritual+retreats'),jdecode(''),'/736/23501.html','true',[],'','']
	],'',''],
	['PAGE','31501',jdecode('Our+Recommendations+'),jdecode(''),'/31501/index.html','true',[ 
		['PAGE','65601',jdecode('Officiants'),jdecode(''),'/31501/65601.html','true',[],'',''],
		['PAGE','31522',jdecode('Locations'),jdecode(''),'/31501/31522.html','true',[],'',''],
		['PAGE','31543',jdecode('Caterers+and+Bands'),jdecode(''),'/31501/31543.html','true',[],'',''],
		['PAGE','31564',jdecode('Flowers%2C+Photo%26%23x27%3Bs+and+more'),jdecode(''),'/31501/31564.html','true',[],'','']
	],'',''],
	['PAGE','50301',jdecode('The+Reading+Room'),jdecode(''),'/50301/index.html','true',[ 
		['PAGE','50322',jdecode('Wedding+Planners'),jdecode(''),'/50301/50322.html','true',[],'',''],
		['PAGE','50343',jdecode('Spiritual+Reading'),jdecode(''),'/50301/50343.html','true',[],'',''],
		['PAGE','50364',jdecode('Just+Good+Reading'),jdecode(''),'/50301/50364.html','true',[],'','']
	],'',''],
	['PAGE','101601',jdecode('Wedding+Consultant'),jdecode(''),'/101601.html','true',[],'',''],
	['PAGE','43101',jdecode('Weddings+Photos'),jdecode(''),'/43101.html','true',[],'',''],
	['PAGE','28101',jdecode('Clergy+Affiliation+'),jdecode(''),'/28101.html','true',[],'',''],
	['PAGE','35801',jdecode('WebMail'),jdecode(''),'/35801.html','true',[],'','']];
var siteelementCount=29;
theSitetree.topTemplateName='Architekt';
theSitetree.paletteFamily='C8C0A4';
theSitetree.keyvisualId='1710';
theSitetree.keyvisualName='meeting.jpg';
theSitetree.fontsetId='281';
theSitetree.graphicsetId='347';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='C8C0A4';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Architekt',
				paletteFamily: 	'C8C0A4',
				keyvisualId: 	'1710',
				keyvisualName: 	'meeting.jpg',
				fontsetId: 		'281',
				graphicsetId: 	'347',
				contentColor: 	'000000',
				contentBGColor: 'C8C0A4',
				a_color: 		'C8C0A4',
				b_color: 		'5C5438',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-cc3b796d4211c71e4d09ddf05814acb1']={
webappId:    '7060',
documentId:  '43101',
internalId:  'cc3b796d4211c71e4d09ddf05814acb1',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20100424-165353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60001',
internalId:  '',
customField: '20090630-195721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106001',
internalId:  '',
customField: '20061030-192138'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '652',
internalId:  '',
customField: '20060404-195947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '673',
internalId:  '',
customField: '20060910-143022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '107401',
internalId:  '',
customField: '20070930-053606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49601',
internalId:  '',
customField: '20090409-082327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '694',
internalId:  '',
customField: '20091023-124519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '715',
internalId:  '',
customField: '20060404-194646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97201',
internalId:  '',
customField: '20060404-194530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '736',
internalId:  '',
customField: '20060414-105151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '757',
internalId:  '',
customField: '20060307-115637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '778',
internalId:  '',
customField: '20060307-115553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '799',
internalId:  '',
customField: '20060215-102056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64501',
internalId:  '',
customField: '20060203-080520'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23501',
internalId:  '',
customField: '20060123-104932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31501',
internalId:  '',
customField: '20060501-052527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65601',
internalId:  '',
customField: '20060713-135602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31522',
internalId:  '',
customField: '20060128-071739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31543',
internalId:  '',
customField: '20060125-095913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31564',
internalId:  '',
customField: '20060125-100015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50301',
internalId:  '',
customField: '20060404-094329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50322',
internalId:  '',
customField: '20060203-181231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50343',
internalId:  '',
customField: '20061007-121924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50364',
internalId:  '',
customField: '20060131-045014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101601',
internalId:  '',
customField: '20060520-123550'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43101',
internalId:  '',
customField: '20060126-180743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28101',
internalId:  '',
customField: '20061105-191717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35801',
internalId:  '',
customField: '20060210-130439'
};
webappMappings['7008']=webappMappings['7008-582']={
webappId:    '7008',
documentId:  '715',
internalId:  '582',
customField: 'language:en;country:US;'
};
var canonHostname = 'wscwrk01.ehost-services.com';
var accountId     = 'AEN020IN22WK';
var companyName   = 'Married+Life+Ministries';
var htmlTitle	  = 'Married+Life+Ministries+-+Wedding+Officiant';
var metaKeywords  = 'officiant%2C+weddings%2C+services%2C+catholic%2C+interfaith%2C+priest%2C+marriage%2C+counseling%2C+divorced%2Cordination%2C+justice+of+the+peace%2C+Florists%2C+caterer%2C+bands%2C+tents%2C+photographer%2C+locations%2C+apostolic%2C+cacina%2C+independent%2C+';
var metaContents  = 'interfaith+ministry%2C+interfaith+wedding+services%2C+officiant%2C+bishop+clements%2C+father+clements%2C+catholic+marriage%2C+catholic+apostolic+church%2C++reformed+catholic+church%2C+Premarital+counseling%2C+married+clergy%2C+independent+catholic+church%2C+cacina%2C+apostolic';
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();
};
