/* [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','4801',jdecode('HOME'),jdecode(''),'/4801.html','true',[],'',''],
	['PAGE','46623',jdecode('ABOUT+US'),jdecode(''),'/46623.html','true',[],'',''],
	['PAGE','71095',jdecode('CAMP+LAZARUS'),jdecode(''),'/71095.html','true',[],'',''],
	['PAGE','39201',jdecode('CALENDAR+2010-2011'),jdecode(''),'/39201.html','true',[],'',''],
	['PAGE','30501',jdecode('CURRICULUM'),jdecode(''),'/30501.html','true',[],'',''],
	['PAGE','27801',jdecode('LOCATION'),jdecode(''),'/27801.html','true',[],'',''],
	['PAGE','30101',jdecode('MEET+THE+TEAM'),jdecode(''),'/30101.html','true',[],'',''],
	['PAGE','26701',jdecode('CONTACT+US'),jdecode(''),'/26701.html','true',[],'',''],
	['PAGE','45523',jdecode('CAMPUS+HOUSING'),jdecode(''),'/45523.html','true',[],'',''],
	['PAGE','27822',jdecode('ACADEMY+PHOTOS'),jdecode(''),'/27822.html','true',[],'',''],
	['PAGE','66895',jdecode('DONATIONS'),jdecode(''),'/66895.html','true',[],'',''],
	['PAGE','54434',jdecode('ON-LINE+STORE'),jdecode(''),'/54434.html','true',[],'',''],
	['PAGE','40301',jdecode('SCHOOL+SUPPLY+1st-4th'),jdecode(''),'/40301.html','true',[],'',''],
	['PAGE','40801',jdecode('SCHOOL+SUPPLY+5TH-12TH'),jdecode(''),'/40801.html','true',[],'',''],
	['PAGE','35801',jdecode('NEWS+LETTER'),jdecode(''),'/35801.html','true',[],'',''],
	['PAGE','62234',jdecode('LOGISTICS+TEAM'),jdecode(''),'/62234.html','false',[],'',''],
	['PAGE','35601',jdecode('2009+BOARD+OF+ADVISORS'),jdecode(''),'/35601.html','false',[],'',''],
	['PAGE','65995',jdecode('MPAB+BASKETBALL'),jdecode(''),'/65995.html','false',[],'',''],
	['PAGE','63245',jdecode('COSTA+RICA+2010'),jdecode(''),'/63245.html','false',[],'',''],
	['PAGE','42901',jdecode('NEXT+Drill+Week+Update%21%21'),jdecode(''),'/42901.html','false',[],'',''],
	['PAGE','48923',jdecode('FALL+SLEEPOVER'),jdecode(''),'/48923.html','false',[],'',''],
	['PAGE','56434',jdecode('FATHER-SON+RETREAT'),jdecode(''),'/56434.html','false',[],'',''],
	['PAGE','44523',jdecode('LUNCH+SURVEY'),jdecode(''),'/44523.html','false',[],'',''],
	['PAGE','36001',jdecode('BOOT+CAMP+AUG+2-7'),jdecode(''),'/36001.html','false',[],'',''],
	['PAGE','43201',jdecode('BREAKFAST+CLUB'),jdecode(''),'/43201.html','false',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Natural';
theSitetree.paletteFamily='666699';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='154';
theSitetree.graphicsetId='169';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FCFCF4';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Natural',
				paletteFamily: 	'666699',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'154',
				graphicsetId: 	'169',
				contentColor: 	'000000',
				contentBGColor: 'FCFCF4',
				a_color: 		'666699',
				b_color: 		'91A5C1',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4801',
internalId:  '',
customField: '20100621-180921'
};
webappMappings['7008']=webappMappings['7008-9044']={
webappId:    '7008',
documentId:  '26701',
internalId:  '9044',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54434',
internalId:  '',
customField: '20100205-121328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26701',
internalId:  '',
customField: '20091002-003311'
};
webappMappings['7060']=webappMappings['7060-aad401085e4740644da45e81293e241e']={
webappId:    '7060',
documentId:  '27822',
internalId:  'aad401085e4740644da45e81293e241e',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27801',
internalId:  '',
customField: '20091004-134107'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27822',
internalId:  '',
customField: '20090917-201544'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30101',
internalId:  '',
customField: '20091002-003704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30501',
internalId:  '',
customField: '20100324-140021'
};
webappMappings['7008']=webappMappings['7008-9293']={
webappId:    '7008',
documentId:  '35601',
internalId:  '9293',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35601',
internalId:  '',
customField: '20090821-081005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35801',
internalId:  '',
customField: '20090721-195427'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36001',
internalId:  '',
customField: '20090722-002637'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46623',
internalId:  '',
customField: '20100621-193326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39201',
internalId:  '',
customField: '20100730-183521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40301',
internalId:  '',
customField: '20090721-201142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40801',
internalId:  '',
customField: '20090721-205546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42901',
internalId:  '',
customField: '20090910-095044'
};
webappMappings['7008']=webappMappings['7008-9653']={
webappId:    '7008',
documentId:  '43201',
internalId:  '9653',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43201',
internalId:  '',
customField: '20090724-230141'
};
webappMappings['1003']=webappMappings['1003-avfl30inhgjr12355ff0c60']={
webappId:    '1003',
documentId:  '45523',
internalId:  'avfl30inhgjr12355ff0c60',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44523',
internalId:  '',
customField: '20090821-073316'
};
webappMappings['7008']=webappMappings['7008-10496']={
webappId:    '7008',
documentId:  '44523',
internalId:  '10496',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45523',
internalId:  '',
customField: '20100710-151132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48923',
internalId:  '',
customField: '20090910-094751'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56434',
internalId:  '',
customField: '20091005-123744'
};
webappMappings['1501']=webappMappings['1501-13891052']={
webappId:    '1501',
documentId:  '4801',
internalId:  '13891052',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63245',
internalId:  '',
customField: '20091023-105028'
};
webappMappings['1003']=webappMappings['1003-avfl30inhgjr12469df0f82']={
webappId:    '1003',
documentId:  '62234',
internalId:  'avfl30inhgjr12469df0f82',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62234',
internalId:  '',
customField: '20091115-203224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65995',
internalId:  '',
customField: '20100131-005145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66895',
internalId:  '',
customField: '20100202-145538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71095',
internalId:  '',
customField: '20100821-164947'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHGJR';
var companyName   = 'MILLERS+PREPARATORY+ACADEMY+FOR+BOYS';
var htmlTitle	  = 'Miller%27s+Prep';
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();
};
