/* [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','301',jdecode('Home'),jdecode(''), jdecode('%2F301.html'), 'true',[],'',''],
	['PAGE','1443',jdecode('What+We+Believe'),jdecode(''), jdecode('%2F1443%2Findex.html'), 'true',[ 
		['PAGE','69691',jdecode('The+Sacrament+of+Holy+Baptism'),jdecode(''), jdecode('%2F1443%2F69691.html'), 'true',[],'',''],
		['PAGE','1422',jdecode('The+Sacrament+of+Holy+Communion'),jdecode(''), jdecode('%2F1443%2F1422.html'), 'true',[],'','']
	],'',''],
	['PAGE','77713',jdecode('Vicar%26%23x27%3Bs+Sermons'),jdecode(''), jdecode('%2F77713.html'), 'true',[],'',''],
	['PAGE','30801',jdecode('Sunday+School'),jdecode(''), jdecode('%2F30801.html'), 'true',[],'',''],
	['PAGE','61791',jdecode('Confirmation'),jdecode(''), jdecode('%2F61791%2Findex.html'), 'true',[ 
		['PAGE','64491',jdecode('Confirmation+Syllabus'),jdecode(''), jdecode('%2F61791%2F64491.html'), 'true',[],'','']
	],'',''],
	['PAGE','30822',jdecode('Bible+Study'),jdecode(''), jdecode('%2F30822.html'), 'true',[],'',''],
	['PAGE','6301',jdecode('Useful+Links'),jdecode(''), jdecode('%2F6301.html'), 'true',[],'',''],
	['PAGE','6322',jdecode('Little+Lambs+of+Jesus'),jdecode(''), jdecode('%2F6322%2Findex.html'), 'true',[ 
		['PAGE','73813',jdecode('Mission+Statement'),jdecode(''), jdecode('%2F6322%2F73813.html'), 'true',[],'',''],
		['PAGE','61591',jdecode('Daily+Schedule'),jdecode(''), jdecode('%2F6322%2F61591.html'), 'true',[],'',''],
		['PAGE','61612',jdecode('Snack+Time'),jdecode(''), jdecode('%2F6322%2F61612.html'), 'true',[],'',''],
		['PAGE','61633',jdecode('Activities'),jdecode(''), jdecode('%2F6322%2F61633.html'), 'true',[],'',''],
		['PAGE','61191',jdecode('Field+Trips'),jdecode(''), jdecode('%2F6322%2F61191.html'), 'true',[],'','']
	],'',''],
	['PAGE','1527',jdecode('Contact'),jdecode(''), jdecode('%2F1527.html'), 'true',[],'',''],
	['PAGE','1401',jdecode('Our+History'),jdecode(''), jdecode('%2F1401.html'), 'true',[],'',''],
	['PAGE','40601',jdecode('Photo+Gallery'),jdecode(''), jdecode('%2F40601.html'), 'true',[],'',''],
	['ITEM','71291',jdecode('Calendar'),jdecode(''), jdecode('https%3A%2F%2Fwww.google.com%2Fcalendar%2Fembed%3Fsrc%3Doffice%2540stpaulalbion.org%26ctz%3DAmerica%2FNew_York'), 'true',[],'','_blank']];
var siteelementCount=20;
theSitetree.topTemplateName='Chaste';
theSitetree.paletteFamily='90BFFA';
theSitetree.keyvisualId='11547';
theSitetree.keyvisualName='kv_11547.jpg';
theSitetree.fontsetId='32877';
theSitetree.graphicsetId='13962';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
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: 			'Chaste',
				paletteFamily: 	'90BFFA',
				keyvisualId: 	'11547',
				keyvisualName: 	'kv_11547.jpg',
				fontsetId: 		'32877',
				graphicsetId: 	'13962',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'90BFFA',
				b_color: 		'5183C3',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20120131-110514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1401',
internalId:  '',
customField: '20120103-115723'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1527',
internalId:  '',
customField: '20120103-115150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40601',
internalId:  '',
customField: '20120131-142939'
};
webappMappings['7060']=webappMappings['7060-d3f87a1e6af30a5b80dd658550a6a228']={
webappId:    '7060',
documentId:  '40601',
internalId:  'd3f87a1e6af30a5b80dd658550a6a228',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1422',
internalId:  '',
customField: '20110823-193936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1443',
internalId:  '',
customField: '20110823-193157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30801',
internalId:  '',
customField: '20111227-122516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30822',
internalId:  '',
customField: '20120202-102300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69691',
internalId:  '',
customField: '20110823-194634'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6301',
internalId:  '',
customField: '20110823-192304'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6322',
internalId:  '',
customField: '20120131-111442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61191',
internalId:  '',
customField: '20120131-112940'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73813',
internalId:  '',
customField: '20111004-112207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61791',
internalId:  '',
customField: '20110831-130755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61591',
internalId:  '',
customField: '20111004-101727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61612',
internalId:  '',
customField: '20111004-103554'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61633',
internalId:  '',
customField: '20120131-111712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64491',
internalId:  '',
customField: '20110823-130941'
};
webappMappings['7008']=webappMappings['7008-26122']={
webappId:    '7008',
documentId:  '1527',
internalId:  '26122',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77713',
internalId:  '',
customField: '20120202-101708'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INZ8HB';
var companyName   = 'St+Paul+Lutheran+Church+and+Little+Lambs+of+Jesus+Preschool%2C+Albion%2C+Michigan';
var htmlTitle	  = '';
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();
};

