/* [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','1401',jdecode('Home'),jdecode(''), jdecode('%2F1401.html'), 'true',[],'',''],
	['PAGE','3001',jdecode('Pastor%26%23x27%3Bs+Corner'),jdecode(''), jdecode('%2F3001.html'), 'true',[],'',''],
	['PAGE','110001',jdecode('New+Parish+Center+Capital+Campaign'),jdecode(''), jdecode('%2F110001.html'), 'true',[],'',''],
	['PAGE','3022',jdecode('Parish+News+%26+Events'),jdecode(''), jdecode('%2F3022.html'), 'true',[],'',''],
	['PAGE','3043',jdecode('Faith+Formation'),jdecode(''), jdecode('%2F3043.html'), 'true',[],'',''],
	['PAGE','3064',jdecode('Music+Ministry'),jdecode(''), jdecode('%2F3064.html'), 'true',[],'',''],
	['PAGE','20301',jdecode('Music+at+St.+Patrick'),jdecode(''), jdecode('%2F20301.html'), 'true',[],'',''],
	['PAGE','3085',jdecode('Youth+Ministry'),jdecode(''), jdecode('%2F3085.html'), 'true',[],'',''],
	['PAGE','94701',jdecode('Young+Adult+Group'),jdecode(''), jdecode('%2F94701.html'), 'true',[],'',''],
	['PAGE','46901',jdecode('Vacation+Bible+School'),jdecode(''), jdecode('%2F46901.html'), 'true',[],'',''],
	['PAGE','16001',jdecode('Council+of+Catholic+Women'),jdecode(''), jdecode('%2F16001.html'), 'true',[],'',''],
	['PAGE','135612',jdecode('Knights+of+Columbus'),jdecode(''), jdecode('%2F135612.html'), 'true',[],'',''],
	['PAGE','98501',jdecode('Ministry+for+Homless+%26+Needy'),jdecode(''), jdecode('%2F98501.html'), 'true',[],'',''],
	['PAGE','3106',jdecode('Parish+Staff'),jdecode(''), jdecode('%2F3106.html'), 'true',[],'',''],
	['PAGE','3901',jdecode('Parish+Council'),jdecode(''), jdecode('%2F3901.html'), 'true',[],'',''],
	['PAGE','28601',jdecode('Bulletin'),jdecode(''), jdecode('%2F28601.html'), 'true',[],'',''],
	['PAGE','14801',jdecode('Parish+Pay'),jdecode(''), jdecode('%2F14801.html'), 'true',[],'',''],
	['PAGE','11801',jdecode('Parish+Tour'),jdecode(''), jdecode('%2F11801.html'), 'true',[],'',''],
	['PAGE','3148',jdecode('Directions'),jdecode(''), jdecode('%2F3148.html'), 'true',[],'',''],
	['PAGE','3127',jdecode('Pictures'),jdecode(''), jdecode('%2F3127.html'), 'true',[],'',''],
	['PAGE','3169',jdecode('Links'),jdecode(''), jdecode('%2F3169.html'), 'true',[],'',''],
	['PAGE','87901',jdecode('Religious+Education'),jdecode(''), jdecode('%2F87901.html'), 'false',[],'',''],
	['PAGE','88301',jdecode('Baptisim'),jdecode(''), jdecode('%2F88301.html'), 'false',[],'',''],
	['PAGE','88322',jdecode('Joining+the+Catholic+Church'),jdecode(''), jdecode('%2F88322.html'), 'false',[],'',''],
	['PAGE','88343',jdecode('Adult+Faith+Formation'),jdecode(''), jdecode('%2F88343.html'), 'false',[],'',''],
	['PAGE','91001',jdecode('Catholic+News'),jdecode(''), jdecode('%2F91001.html'), 'false',[],'',''],
	['PAGE','96201',jdecode('Prayer+Corner'),jdecode(''), jdecode('%2F96201.html'), 'false',[],'',''],
	['PAGE','104701',jdecode('Fasting+%26+Abstinence+Regulations+for+Lent+'),jdecode(''), jdecode('%2F104701.html'), 'false',[],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Blog';
theSitetree.paletteFamily='649B30';
theSitetree.keyvisualId='11518';
theSitetree.keyvisualName='kv_11518.jpg';
theSitetree.fontsetId='32865';
theSitetree.graphicsetId='13949';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='989696';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp35-attweb',
  product: 'WSCSYSSSSLY0X9RC'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Blog',
				paletteFamily: 	'649B30',
				keyvisualId: 	'11518',
				keyvisualName: 	'kv_11518.jpg',
				fontsetId: 		'32865',
				graphicsetId: 	'13949',
				contentColor: 	'FFFFFF',
				contentBGColor: '989696',
				a_color: 		'FFB434',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1401',
internalId:  '',
customField: '20120130-131505'
};
webappMappings['7060']=webappMappings['7060-b77fc811c13a3579f4c56f77c86b7ef2']={
webappId:    '7060',
documentId:  '11801',
internalId:  'b77fc811c13a3579f4c56f77c86b7ef2',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3106',
internalId:  '',
customField: '20100706-114701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3127',
internalId:  '',
customField: '20120104-101333'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3001',
internalId:  '',
customField: '20120105-100218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3022',
internalId:  '',
customField: '20120131-112830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3148',
internalId:  '',
customField: '20090902-111739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3043',
internalId:  '',
customField: '20110302-105822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3064',
internalId:  '',
customField: '20110729-110934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3085',
internalId:  '',
customField: '20120123-130930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3901',
internalId:  '',
customField: '20111220-111456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3169',
internalId:  '',
customField: '20090902-112201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11801',
internalId:  '',
customField: '20090902-133734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14801',
internalId:  '',
customField: '20120104-154402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16001',
internalId:  '',
customField: '20120105-102312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20301',
internalId:  '',
customField: '20111108-172408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28601',
internalId:  '',
customField: '20120130-131630'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46901',
internalId:  '',
customField: '20110726-122434'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '135612',
internalId:  '',
customField: '20110823-094511'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87901',
internalId:  '',
customField: '20110729-113603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88301',
internalId:  '',
customField: '20110727-100110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88322',
internalId:  '',
customField: '20110726-142828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88343',
internalId:  '',
customField: '20110909-091519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91001',
internalId:  '',
customField: '20110120-164957'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94701',
internalId:  '',
customField: '20120103-111959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96201',
internalId:  '',
customField: '20110203-132436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98501',
internalId:  '',
customField: '20110207-160208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '104701',
internalId:  '',
customField: '20110302-112639'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110001',
internalId:  '',
customField: '20120104-155534'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INH2OF';
var companyName   = 'St.+Patrick+Catholic+Church';
var htmlTitle	  = 'St.+Patrick+Catholic+Church%2C+Palm+Beach+Gardens';
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();
};

