/* [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','701',jdecode('Home+Page'),jdecode(''),'/701.html','true',[],'',''],
	['PAGE','102701',jdecode('Bishop%26%23x27%3Bs+Visit+on+2-16-11'),jdecode(''),'/102701.html','true',[],'',''],
	['PAGE','100101',jdecode('Festival+2011+-+May+13-15'),jdecode(''),'/100101.html','true',[],'',''],
	['PAGE','752',jdecode('Academy+%28HS%29'),jdecode(''),'/752/index.html','true',[ 
		['PAGE','8501',jdecode('Mission+Statement'),jdecode(''),'/752/8501.html','true',[],'',''],
		['PAGE','8522',jdecode('Academics'),jdecode(''),'/752/8522.html','true',[],'',''],
		['PAGE','8543',jdecode('Admissions'),jdecode(''),'/752/8543.html','true',[],'',''],
		['PAGE','8564',jdecode('Faculty'),jdecode(''),'/752/8564.html','true',[],'',''],
		['PAGE','8585',jdecode('Tuition'),jdecode(''),'/752/8585.html','true',[],'',''],
		['PAGE','8627',jdecode('Athletics'),jdecode(''),'/752/8627.html','true',[],'','']
	],'',''],
	['PAGE','794',jdecode('Elementary+School'),jdecode(''),'/794/index.html','true',[ 
		['PAGE','101201',jdecode('Faculty+2010-2011'),jdecode(''),'/794/101201.html','true',[],'',''],
		['PAGE','69401',jdecode('Announcements'),jdecode(''),'/794/69401.html','true',[],'',''],
		['PAGE','52701',jdecode('Bishop+Paul%26%23x27%3Bs+Visit'),jdecode(''),'/794/52701.html','false',[],'','']
	],'',''],
	['PAGE','13601',jdecode('History+in+Ukrainian'),jdecode(''),'/13601/index.html','true',[ 
		['PAGE','14022',jdecode('Early+Years'),jdecode(''),'/13601/14022.html','true',[],'',''],
		['PAGE','14043',jdecode('History+of+the+Schools'),jdecode(''),'/13601/14043.html','true',[],'',''],
		['PAGE','14064',jdecode('100+Year+Celebration'),jdecode(''),'/13601/14064.html','true',[],'',''],
		['PAGE','16501',jdecode('100+Year+Banquet'),jdecode(''),'/13601/16501.html','true',[],'',''],
		['PAGE','14085',jdecode('Pastoral+Lineage'),jdecode(''),'/13601/14085.html','true',[],'','']
	],'',''],
	['PAGE','72401',jdecode('Monthly+Newsletter'),jdecode(''),'/72401.html','true',[],'',''],
	['PAGE','920',jdecode('Contact'),jdecode(''),'/920.html','true',[],'',''],
	['PAGE','7001',jdecode('Photo+Gallery'),jdecode(''),'/7001/index.html','true',[ 
		['PAGE','66901',jdecode('Academy+Graduation+2007'),jdecode(''),'/7001/66901.html','true',[],'','']
	],'',''],
	['PAGE','91301',jdecode('Festival+2009+Photos+II'),jdecode(''),'/91301.html','true',[],'',''],
	['PAGE','86401',jdecode('Festival+2009+Photos'),jdecode(''),'/86401/index.html','true',[ 
		['PAGE','79301',jdecode('FESTIVAL+2008+PHOTOS'),jdecode(''),'/86401/79301.html','true',[],'',''],
		['PAGE','56301',jdecode('Festival+2007+Photos'),jdecode(''),'/86401/56301.html','true',[],'',''],
		['PAGE','42801',jdecode('FESTIVAL+2006+Photos'),jdecode(''),'/86401/42801.html','true',[],'',''],
		['PAGE','85401',jdecode('FESTIVAL+2009++MAY+15-17'),jdecode(''),'/86401/85401.html','true',[],'',''],
		['PAGE','40001',jdecode('FESTIVAL+MAY+19-21'),jdecode(''),'/86401/40001.html','true',[],'',''],
		['PAGE','41101',jdecode('MUSIC+INVASION+-+ENG'),jdecode(''),'/86401/41101.html','true',[],'',''],
		['PAGE','41122',jdecode('MUSIC+INVASION+-UKR'),jdecode(''),'/86401/41122.html','true',[],'',''],
		['PAGE','17901',jdecode('Festival+Flyer+2007'),jdecode(''),'/86401/17901.html','true',[],'','']
	],'',''],
	['PAGE','26601',jdecode('Support+Our+Schools'),jdecode(''),'/26601.html','true',[],'',''],
	['PAGE','26622',jdecode('Alumni'),jdecode(''),'/26622.html','true',[],'',''],
	['PAGE','102122',jdecode('SCHOOL+CLOSED+1-12-11'),jdecode(''),'/102122.html','true',[],'','']];
var siteelementCount=37;
theSitetree.topTemplateName='Sub_Port';
theSitetree.paletteFamily='416FB6';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10376';
theSitetree.graphicsetId='10540';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Sub_Port',
				paletteFamily: 	'416FB6',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10376',
				graphicsetId: 	'10540',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20100916-075405'
};
webappMappings['7060']=webappMappings['7060-2f3d7231db9ce470084a8b5719d8017b']={
webappId:    '7060',
documentId:  '7001',
internalId:  '2f3d7231db9ce470084a8b5719d8017b',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '752',
internalId:  '',
customField: '20071004-151327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8501',
internalId:  '',
customField: '20080312-112614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8522',
internalId:  '',
customField: '20060313-130413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8543',
internalId:  '',
customField: '20080312-112835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8564',
internalId:  '',
customField: '20100223-202806'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66901',
internalId:  '',
customField: '20080311-124404'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8585',
internalId:  '',
customField: '20100916-075452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8627',
internalId:  '',
customField: '20080311-124553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '794',
internalId:  '',
customField: '20090922-204433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102122',
internalId:  '',
customField: '20110111-180849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100101',
internalId:  '',
customField: '20110228-204637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101201',
internalId:  '',
customField: '20101108-200434'
};
webappMappings['8010']=webappMappings['8010-335']={
webappId:    '8010',
documentId:  '102122',
internalId:  '335',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102701',
internalId:  '',
customField: '20110228-190822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13601',
internalId:  '',
customField: '20060323-150216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14022',
internalId:  '',
customField: '20060324-052922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14043',
internalId:  '',
customField: '20060303-160602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14064',
internalId:  '',
customField: '20060304-084724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16501',
internalId:  '',
customField: '20060304-085456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14085',
internalId:  '',
customField: '20060304-142204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69401',
internalId:  '',
customField: '20100827-212736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52701',
internalId:  '',
customField: '20071105-185842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72401',
internalId:  '',
customField: '20090922-204342'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '920',
internalId:  '',
customField: '20060324-053842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7001',
internalId:  '',
customField: '20060324-053908'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79301',
internalId:  '',
customField: '20080527-184041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56301',
internalId:  '',
customField: '20070531-172906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42801',
internalId:  '',
customField: '20060601-110528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40001',
internalId:  '',
customField: '20060519-102136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41101',
internalId:  '',
customField: '20060428-155108'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41122',
internalId:  '',
customField: '20060429-062926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17901',
internalId:  '',
customField: '20070508-195700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26601',
internalId:  '',
customField: '20060316-151139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26622',
internalId:  '',
customField: '20060316-111431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85401',
internalId:  '',
customField: '20090506-194653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86401',
internalId:  '',
customField: '20090523-120135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91301',
internalId:  '',
customField: '20090525-172614'
};
var canonHostname = 'wscwrk01.ehost-services.com';
var accountId     = 'AEN020IN2FLL';
var companyName   = 'Saint+George+Ukrainian+Catholic+Schools';
var htmlTitle	  = 'Saint+George+Ukrainian+Catholic+Schools';
var metaKeywords  = 'High+School%2C+Academy%2C+Parochial+Education%2C+Ukrainian+School%2C+College+Prep%2C+Elementary+School%2C+After+School+Programs%2C+High+School+Sports%2C+Board+of+Regents+Curriculum%2C+Affodable+Tuition%2C+Private+School+Education%2C+St.+George+Schools%2C+St.+George+Church%2C+';
var metaContents  = 'Saint+George+Elementary+School+offers+students+in+grades+Pre-K-+8th+top-notch+academic+curriculum%2C+excellent+student+support+services%2C+superior+instructional+technology%2C+and+exceptional+community+support.++++++++Saint+George+Academy+offers+students+in+grades+9-12+top-notch+academic+curriculum%2C+excellent+student+support+services%2C+superior+instructional+technology%2C+many+involvement+opportunities+for+all+students+and+exceptional+community+support.+';
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();
};

