/* [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','3201',jdecode('Home'),jdecode(''), jdecode('%2F3201.html'), 'true',[],'',''],
	['PAGE','3252',jdecode('About+us'),jdecode(''), jdecode('%2F3252%2Findex.html'), 'true',[ 
		['PAGE','8601',jdecode('History+'),jdecode(''), jdecode('%2F3252%2F8601.html'), 'true',[],'',''],
		['PAGE','8622',jdecode('Mission'),jdecode(''), jdecode('%2F3252%2F8622.html'), 'true',[],'',''],
		['PAGE','8643',jdecode('Principal%26%23x27%3Bs+Letter'),jdecode(''), jdecode('%2F3252%2F8643.html'), 'true',[],'',''],
		['PAGE','8664',jdecode('Catholic+Identity'),jdecode(''), jdecode('%2F3252%2F8664.html'), 'true',[],'',''],
		['PAGE','8685',jdecode('Faculty+and+Staff'),jdecode(''), jdecode('%2F3252%2F8685.html'), 'true',[],'',''],
		['PAGE','8706',jdecode('Contact+%2F+Location'),jdecode(''), jdecode('%2F3252%2F8706.html'), 'true',[],'','']
	],'',''],
	['PAGE','8727',jdecode('Admissions'),jdecode(''), jdecode('%2F8727%2Findex.html'), 'true',[ 
		['PAGE','8748',jdecode('Admissions+Process'),jdecode(''), jdecode('%2F8727%2F8748.html'), 'true',[],'',''],
		['PAGE','8769',jdecode('Financial+Aid'),jdecode(''), jdecode('%2F8727%2F8769.html'), 'true',[],'',''],
		['PAGE','18734',jdecode('FACTS+'),jdecode(''), jdecode('%2F8727%2F18734.html'), 'true',[],'',''],
		['PAGE','13101',jdecode('Application'),jdecode(''), jdecode('%2F8727%2F13101.html'), 'true',[],'','']
	],'',''],
	['PAGE','8790',jdecode('Calendar'),jdecode(''), jdecode('%2F8790.html'), 'true',[],'',''],
	['PAGE','8811',jdecode('Academics'),jdecode(''), jdecode('%2F8811%2Findex.html'), 'true',[ 
		['PAGE','8832',jdecode('Curriculum'),jdecode(''), jdecode('%2F8811%2F8832.html'), 'true',[],'',''],
		['PAGE','8853',jdecode('Bilingual+PreK+Program'),jdecode(''), jdecode('%2F8811%2F8853.html'), 'true',[],'','']
	],'',''],
	['PAGE','8916',jdecode('Student+Life'),jdecode(''), jdecode('%2F8916%2Findex.html'), 'true',[ 
		['PAGE','8937',jdecode('Athletics'),jdecode(''), jdecode('%2F8916%2F8937.html'), 'true',[],'',''],
		['PAGE','8979',jdecode('Faith+Development'),jdecode(''), jdecode('%2F8916%2F8979.html'), 'true',[],'','']
	],'',''],
	['PAGE','9000',jdecode('Become+Involved'),jdecode(''), jdecode('%2F9000%2Findex.html'), 'true',[ 
		['PAGE','9042',jdecode('Volunteer+Opportunities'),jdecode(''), jdecode('%2F9000%2F9042.html'), 'true',[],'',''],
		['PAGE','9063',jdecode('Giving'),jdecode(''), jdecode('%2F9000%2F9063.html'), 'true',[],'',''],
		['PAGE','14112',jdecode('Join+Us'),jdecode(''), jdecode('%2F9000%2F14112.html'), 'true',[],'','']
	],'',''],
	['PAGE','9084',jdecode('Parents'),jdecode(''), jdecode('%2F9084%2Findex.html'), 'true',[ 
		['PAGE','9105',jdecode('RenWeb'),jdecode(''), jdecode('%2F9084%2F9105.html'), 'true',[],'',''],
		['PAGE','9147',jdecode('Home+and+School'),jdecode(''), jdecode('%2F9084%2F9147.html'), 'true',[],'',''],
		['PAGE','9168',jdecode('Dad%26%23x27%3Bs+Club'),jdecode(''), jdecode('%2F9084%2F9168.html'), 'true',[],'',''],
		['PAGE','9189',jdecode('School+Advisory+Council'),jdecode(''), jdecode('%2F9084%2F9189.html'), 'true',[],'',''],
		['PAGE','9210',jdecode('Booster+Club'),jdecode(''), jdecode('%2F9084%2F9210.html'), 'true',[],'',''],
		['PAGE','9231',jdecode('Safe+Environment'),jdecode(''), jdecode('%2F9084%2F9231.html'), 'true',[],'','']
	],'',''],
	['PAGE','9252',jdecode('Alumni'),jdecode(''), jdecode('%2F9252.html'), 'true',[],'','']];
var siteelementCount=32;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='333F65';
theSitetree.keyvisualId='1819';
theSitetree.keyvisualName='kv_dummy.jpg';
theSitetree.fontsetId='291';
theSitetree.graphicsetId='355';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='333F65';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp13-cbeyon',
  product: 'WSCSYSSSSLYTC2ZA'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'333F65',
				keyvisualId: 	'1819',
				keyvisualName: 	'kv_dummy.jpg',
				fontsetId: 		'291',
				graphicsetId: 	'355',
				contentColor: 	'FFFFFF',
				contentBGColor: '333F65',
				a_color: 		'333F65',
				b_color: 		'040507',
				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:  '3201',
internalId:  '',
customField: '20120121-134257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9084',
internalId:  '',
customField: '20110112-103048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3252',
internalId:  '',
customField: '20120121-134411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8664',
internalId:  '',
customField: '20120121-134917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8727',
internalId:  '',
customField: '20120130-102311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8790',
internalId:  '',
customField: '20120102-224016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8601',
internalId:  '',
customField: '20110111-152101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8622',
internalId:  '',
customField: '20120121-134517'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8643',
internalId:  '',
customField: '20120121-134736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8685',
internalId:  '',
customField: '20111011-162052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8706',
internalId:  '',
customField: '20120102-212842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8748',
internalId:  '',
customField: '20120130-104426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8769',
internalId:  '',
customField: '20120102-215143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8811',
internalId:  '',
customField: '20120102-224342'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8832',
internalId:  '',
customField: '20120102-225546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8853',
internalId:  '',
customField: '20101207-224513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8916',
internalId:  '',
customField: '20101207-224513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8937',
internalId:  '',
customField: '20120102-153529'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8979',
internalId:  '',
customField: '20101207-224514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9000',
internalId:  '',
customField: '20101207-224514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9042',
internalId:  '',
customField: '20101207-224514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9063',
internalId:  '',
customField: '20101207-224514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9105',
internalId:  '',
customField: '20110111-234310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9147',
internalId:  '',
customField: '20101207-224514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9168',
internalId:  '',
customField: '20101207-224514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9189',
internalId:  '',
customField: '20101207-224514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9210',
internalId:  '',
customField: '20101207-224514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9231',
internalId:  '',
customField: '20101207-224514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9252',
internalId:  '',
customField: '20120102-230610'
};
webappMappings['7008']=webappMappings['7008-22033']={
webappId:    '7008',
documentId:  '13101',
internalId:  '22033',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13101',
internalId:  '',
customField: '20120102-220729'
};
webappMappings['7008']=webappMappings['7008-22047']={
webappId:    '7008',
documentId:  '14112',
internalId:  '22047',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14112',
internalId:  '',
customField: '20110111-234835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18734',
internalId:  '',
customField: '20120213-110947'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I714K3';
var companyName   = 'Saint+Augustine+Catholic+School+';
var htmlTitle	  = 'St.+Augustine+Catholic+School';
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();
};

