/* [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','1611',jdecode('Home'),jdecode(''), jdecode('%2F1611.html'), 'true',[],'',''],
	['PAGE','1642',jdecode('About+Us'),jdecode(''), jdecode('%2F1642.html'), 'true',[],'',''],
	['PAGE','4701',jdecode('Auction+Thank+You'),jdecode(''), jdecode('%2F4701.html'), 'false',[],'',''],
	['PAGE','40634',jdecode('Science+Fair+2011-2012'),jdecode(''), jdecode('%2F40634.html'), 'false',[],'',''],
	['PAGE','60756',jdecode('2011-2012+Calendar'),jdecode(''), jdecode('%2F60756.html'), 'true',[],'',''],
	['PAGE','47545',jdecode('Catholic+Schools+Week'),jdecode(''), jdecode('%2F47545.html'), 'false',[],'',''],
	['PAGE','31223',jdecode('Supply+Lists+2011-2012'),jdecode(''), jdecode('%2F31223.html'), 'true',[],'',''],
	['PAGE','22212',jdecode('2010-2011+Calendar'),jdecode(''), jdecode('%2F22212.html'), 'false',[],'',''],
	['PAGE','22233',jdecode('Tuition+2011-2012'),jdecode(''), jdecode('%2F22233.html'), 'true',[],'',''],
	['PAGE','38534',jdecode('Athletics'),jdecode(''), jdecode('%2F38534.html'), 'true',[],'',''],
	['PAGE','49445',jdecode('School+Closing+Info'),jdecode(''), jdecode('%2F49445.html'), 'true',[],'',''],
	['PAGE','3701',jdecode('Classroom+Pages'),jdecode(''), jdecode('%2F3701%2Findex.html'), 'true',[ 
		['PAGE','3722',jdecode('Pre-K+Highlights'),jdecode(''), jdecode('%2F3701%2F3722.html'), 'true',[],'',''],
		['PAGE','3743',jdecode('Kindergarten+Highlights'),jdecode(''), jdecode('%2F3701%2F3743.html'), 'true',[],'',''],
		['PAGE','3764',jdecode('1st+Grade+Highlights'),jdecode(''), jdecode('%2F3701%2F3764.html'), 'true',[],'',''],
		['PAGE','3785',jdecode('2nd+Grade+Highlights'),jdecode(''), jdecode('%2F3701%2F3785.html'), 'true',[],'',''],
		['PAGE','3806',jdecode('3rd+Grade+Highlights'),jdecode(''), jdecode('%2F3701%2F3806.html'), 'true',[],'',''],
		['PAGE','3827',jdecode('4th+Grade+Highlights'),jdecode(''), jdecode('%2F3701%2F3827.html'), 'true',[],'',''],
		['PAGE','3848',jdecode('5th+Grade+Highlights'),jdecode(''), jdecode('%2F3701%2F3848.html'), 'true',[],'',''],
		['PAGE','3869',jdecode('6th+Grade+Highlights'),jdecode(''), jdecode('%2F3701%2F3869.html'), 'true',[],'',''],
		['PAGE','3890',jdecode('7th+Grade+Highlights'),jdecode(''), jdecode('%2F3701%2F3890.html'), 'true',[],'',''],
		['PAGE','3911',jdecode('8th+Grade+Highlights'),jdecode(''), jdecode('%2F3701%2F3911.html'), 'true',[],'','']
	],'',''],
	['PAGE','3932',jdecode('Meet+the+Teachers'),jdecode(''), jdecode('%2F3932%2Findex.html'), 'true',[ 
		['PAGE','3953',jdecode('Pre-K+'),jdecode(''), jdecode('%2F3932%2F3953.html'), 'true',[],'',''],
		['PAGE','3974',jdecode('Kindergarten+'),jdecode(''), jdecode('%2F3932%2F3974.html'), 'true',[],'',''],
		['PAGE','3995',jdecode('1st+Grade+'),jdecode(''), jdecode('%2F3932%2F3995.html'), 'true',[],'',''],
		['PAGE','4016',jdecode('2nd+Grade+'),jdecode(''), jdecode('%2F3932%2F4016.html'), 'true',[],'',''],
		['PAGE','4037',jdecode('3rd+Grade+'),jdecode(''), jdecode('%2F3932%2F4037.html'), 'true',[],'',''],
		['PAGE','4058',jdecode('4th+Grade+'),jdecode(''), jdecode('%2F3932%2F4058.html'), 'true',[],'',''],
		['PAGE','4079',jdecode('5th+Grade+'),jdecode(''), jdecode('%2F3932%2F4079.html'), 'true',[],'',''],
		['PAGE','4100',jdecode('6th+Grade+'),jdecode(''), jdecode('%2F3932%2F4100.html'), 'true',[],'',''],
		['PAGE','4121',jdecode('7th+Grade+'),jdecode(''), jdecode('%2F3932%2F4121.html'), 'true',[],'',''],
		['PAGE','4142',jdecode('8th+Grade+'),jdecode(''), jdecode('%2F3932%2F4142.html'), 'true',[],'','']
	],'',''],
	['PAGE','24812',jdecode('Parent+Club'),jdecode(''), jdecode('%2F24812.html'), 'true',[],'',''],
	['PAGE','4205',jdecode('Children%26%23x27%3Bs+Center'),jdecode(''), jdecode('%2F4205.html'), 'true',[],'',''],
	['PAGE','4163',jdecode('Contact+Us'),jdecode(''), jdecode('%2F4163.html'), 'true',[],'',''],
	['PAGE','1663',jdecode('Photo+Gallery'),jdecode(''), jdecode('%2F1663.html'), 'false',[],'',''],
	['PAGE','1684',jdecode('Our+Blog'),jdecode(''), jdecode('%2F1684.html'), 'false',[],'',''],
	['PAGE','1695',jdecode('Guestbook'),jdecode(''), jdecode('%2F1695.html'), 'false',[],'',''],
	['PAGE','1716',jdecode('Our+Location'),jdecode(''), jdecode('%2F1716.html'), 'false',[],'',''],
	['PAGE','1737',jdecode('Contact'),jdecode(''), jdecode('%2F1737.html'), 'false',[],'',''],
	['PAGE','48845',jdecode('Auction+2011'),jdecode(''), jdecode('%2F48845.html'), 'false',[],'','']];
var siteelementCount=42;
theSitetree.topTemplateName='Noble';
theSitetree.paletteFamily='960000';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='17225';
theSitetree.graphicsetId='12669';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='960000';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'hps_testtown',
  product: 'WSCSYSSSSLY0XFEL'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Noble',
				paletteFamily: 	'960000',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'17225',
				graphicsetId: 	'12669',
				contentColor: 	'FFFFFF',
				contentBGColor: '960000',
				a_color: 		'000000',
				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['7060']=webappMappings['7060-a1dd2122f1882e05d596bdb04581412c']={
webappId:    '7060',
documentId:  '1663',
internalId:  'a1dd2122f1882e05d596bdb04581412c',
customField: 'language:en;country:US;'
};
webappMappings['7050']=webappMappings['7050-2239']={
webappId:    '7050',
documentId:  '1684',
internalId:  '2239',
customField: 'language:en;country:US;'
};
webappMappings['7002']=webappMappings['7002-1095']={
webappId:    '7002',
documentId:  '1695',
internalId:  '1095',
customField: 'language:en;country:US;'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '1716',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['7008']=webappMappings['7008-6748']={
webappId:    '7008',
documentId:  '1737',
internalId:  '6748',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1611',
internalId:  '',
customField: '20120201-150038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1642',
internalId:  '',
customField: '20100216-192535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3974',
internalId:  '',
customField: '20110826-141417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3701',
internalId:  '',
customField: '20100216-183445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1716',
internalId:  '',
customField: '20100216-173713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1695',
internalId:  '',
customField: '20100216-173713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38534',
internalId:  '',
customField: '20111211-160559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4701',
internalId:  '',
customField: '20110429-144902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4163',
internalId:  '',
customField: '20111028-171409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4205',
internalId:  '',
customField: '20101103-102459'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3722',
internalId:  '',
customField: '20120201-215232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3827',
internalId:  '',
customField: '20120201-213921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3743',
internalId:  '',
customField: '20120201-115853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3764',
internalId:  '',
customField: '20120201-213441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3806',
internalId:  '',
customField: '20120202-114816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3848',
internalId:  '',
customField: '20120201-220800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3869',
internalId:  '',
customField: '20120201-220835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3890',
internalId:  '',
customField: '20120201-220918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3911',
internalId:  '',
customField: '20120201-221109'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3785',
internalId:  '',
customField: '20120201-214618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3932',
internalId:  '',
customField: '20100823-210658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3953',
internalId:  '',
customField: '20110825-094743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4100',
internalId:  '',
customField: '20110825-105106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31223',
internalId:  '',
customField: '20110602-094917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3995',
internalId:  '',
customField: '20110825-100237'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4016',
internalId:  '',
customField: '20110825-095352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4037',
internalId:  '',
customField: '20110825-101320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4058',
internalId:  '',
customField: '20110825-102013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4079',
internalId:  '',
customField: '20110825-103213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4121',
internalId:  '',
customField: '20110825-104442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4142',
internalId:  '',
customField: '20110825-113942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1663',
internalId:  '',
customField: '20100917-131021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1684',
internalId:  '',
customField: '20100216-173712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1737',
internalId:  '',
customField: '20100216-173715'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22212',
internalId:  '',
customField: '20100526-104320'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22233',
internalId:  '',
customField: '20110622-101436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24812',
internalId:  '',
customField: '20120201-120636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40634',
internalId:  '',
customField: '20111003-183844'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47545',
internalId:  '',
customField: '20110204-095626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48845',
internalId:  '',
customField: '20110131-222247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49445',
internalId:  '',
customField: '20110204-123901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60756',
internalId:  '',
customField: '20110524-113128'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1611',
internalId:  '1006',
customField: '1006'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INZAMO';
var companyName   = 'St.+Maria+Goretti+Catholic+School+';
var htmlTitle	  = 'St.+Maria+Goretti+Catholic+School%2C+Schiller+Park%2C+IL';
var metaKeywords  = 'St.+Maria+Goretti+School%2C+Catholic+school';
var metaContents  = 'Website+of+St.+Maria+Goretti+Catholic+School%2C+educating+preK-8th+grade+students+in+Franklin+Park+and+Schiller+Park%2C+IL.';
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();
};

