/* [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(''),'/1611.html','true',[],'',''],
	['PAGE','4701',jdecode('Auction+2010'),jdecode(''),'/4701.html','false',[],'',''],
	['PAGE','1642',jdecode('About+Us'),jdecode(''),'/1642.html','true',[],'',''],
	['PAGE','23912',jdecode('August+Office+Hours+'),jdecode(''),'/23912.html','true',[],'',''],
	['PAGE','23933',jdecode('Book+Bill+Day+2010'),jdecode(''),'/23933.html','true',[],'',''],
	['PAGE','22212',jdecode('Calendar+2010-2011'),jdecode(''),'/22212.html','true',[],'',''],
	['PAGE','22233',jdecode('Tuition+2010-2011'),jdecode(''),'/22233.html','true',[],'',''],
	['PAGE','3701',jdecode('Classroom+Pages'),jdecode(''),'/3701/index.html','true',[ 
		['PAGE','3722',jdecode('Pre-K+Highlights'),jdecode(''),'/3701/3722.html','true',[],'',''],
		['PAGE','3743',jdecode('Kindergarten+Highlights'),jdecode(''),'/3701/3743.html','true',[],'',''],
		['PAGE','3764',jdecode('1st+Grade+Highlights'),jdecode(''),'/3701/3764.html','true',[],'',''],
		['PAGE','3785',jdecode('2nd+Grade+Highlights'),jdecode(''),'/3701/3785.html','true',[],'',''],
		['PAGE','3806',jdecode('3rd+Grade+Highlights'),jdecode(''),'/3701/3806.html','true',[],'',''],
		['PAGE','3827',jdecode('4th+Grade+Highlights'),jdecode(''),'/3701/3827.html','true',[],'',''],
		['PAGE','3848',jdecode('5th+Grade+Highlights'),jdecode(''),'/3701/3848.html','true',[],'',''],
		['PAGE','3869',jdecode('6th+Grade+Highlights'),jdecode(''),'/3701/3869.html','true',[],'',''],
		['PAGE','3890',jdecode('7th+Grade+Highlights'),jdecode(''),'/3701/3890.html','true',[],'',''],
		['PAGE','3911',jdecode('8th+Grade+Highlights'),jdecode(''),'/3701/3911.html','true',[],'','']
	],'',''],
	['PAGE','3932',jdecode('Curriculum+Pages'),jdecode(''),'/3932/index.html','true',[ 
		['PAGE','3953',jdecode('Pre-K+Curriculum'),jdecode(''),'/3932/3953.html','true',[],'',''],
		['PAGE','3974',jdecode('Kindergarten+Curriculum'),jdecode(''),'/3932/3974.html','true',[],'',''],
		['PAGE','3995',jdecode('1st+Grade+Curriculum'),jdecode(''),'/3932/3995.html','true',[],'',''],
		['PAGE','4016',jdecode('2nd+Grade+Curriculum'),jdecode(''),'/3932/4016.html','true',[],'',''],
		['PAGE','4037',jdecode('3rd+Grade+Curriculum'),jdecode(''),'/3932/4037.html','true',[],'',''],
		['PAGE','4058',jdecode('4th+Grade+Curriculum'),jdecode(''),'/3932/4058.html','true',[],'',''],
		['PAGE','4079',jdecode('5th+Grade+Curriculum'),jdecode(''),'/3932/4079.html','true',[],'',''],
		['PAGE','4100',jdecode('6th+Grade+Curriculum'),jdecode(''),'/3932/4100.html','true',[],'',''],
		['PAGE','4121',jdecode('7th+Grade+Curriculum'),jdecode(''),'/3932/4121.html','true',[],'',''],
		['PAGE','4142',jdecode('8th+Grade+Curriculum'),jdecode(''),'/3932/4142.html','true',[],'','']
	],'',''],
	['PAGE','4205',jdecode('Children%26%23x27%3Bs+Center'),jdecode(''),'/4205.html','true',[],'',''],
	['PAGE','4163',jdecode('Contact+Us'),jdecode(''),'/4163.html','true',[],'',''],
	['PAGE','1663',jdecode('Photo+Album'),jdecode(''),'/1663.html','false',[],'',''],
	['PAGE','1684',jdecode('Our+Blog'),jdecode(''),'/1684.html','false',[],'',''],
	['PAGE','1695',jdecode('Guestbook'),jdecode(''),'/1695.html','false',[],'',''],
	['PAGE','1716',jdecode('Our+Location'),jdecode(''),'/1716.html','false',[],'',''],
	['PAGE','1737',jdecode('Contact'),jdecode(''),'/1737.html','false',[],'','']];
var siteelementCount=36;
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 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: '20100526-103927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1642',
internalId:  '',
customField: '20100216-192535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3974',
internalId:  '',
customField: '20100216-180518'
};
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:  '23912',
internalId:  '',
customField: '20100727-143609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4701',
internalId:  '',
customField: '20100309-123155'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4163',
internalId:  '',
customField: '20100216-204947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4205',
internalId:  '',
customField: '20100216-205615'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3722',
internalId:  '',
customField: '20100503-211905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3827',
internalId:  '',
customField: '20100503-213140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3743',
internalId:  '',
customField: '20100503-211850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3764',
internalId:  '',
customField: '20100503-211829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3806',
internalId:  '',
customField: '20100503-212839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3848',
internalId:  '',
customField: '20100503-215249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3869',
internalId:  '',
customField: '20100503-215413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3890',
internalId:  '',
customField: '20100503-215504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3911',
internalId:  '',
customField: '20100503-215015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3785',
internalId:  '',
customField: '20100503-212342'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3932',
internalId:  '',
customField: '20100216-180518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3953',
internalId:  '',
customField: '20100216-180518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4100',
internalId:  '',
customField: '20100216-180518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23933',
internalId:  '',
customField: '20100727-143609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3995',
internalId:  '',
customField: '20100216-180518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4016',
internalId:  '',
customField: '20100216-180518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4037',
internalId:  '',
customField: '20100216-180518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4058',
internalId:  '',
customField: '20100216-180518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4079',
internalId:  '',
customField: '20100216-180518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4121',
internalId:  '',
customField: '20100216-180518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4142',
internalId:  '',
customField: '20100216-180518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1663',
internalId:  '',
customField: '20100216-173712'
};
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: '20100526-104639'
};
var canonHostname = 'wsc-worker04.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();
};
