/* [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 theSitetree=[ 
	['PAGE','2101',jdecode('Home'),jdecode(''),'/2101.html','true',[],''],
	['PAGE','5301',jdecode('Announcements'),jdecode(''),'/5301.html','true',[],''],
	['PAGE','2236',jdecode('Calendar'),jdecode(''),'/2236.html','true',[],''],
	['PAGE','37401',jdecode('Membership'),jdecode(''),'/37401.html','true',[],''],
	['PAGE','72101',jdecode('After+Prom+Notification'),jdecode(''),'/72101.html','false',[],''],
	['PAGE','75501',jdecode('Boost+Up+Northwest+Feedback'),jdecode(''),'/75501.html','false',[],''],
	['PAGE','2173',jdecode('Fund+Raisers'),jdecode(''),'/2173/index.html','true',[ 
		['PAGE','8801',jdecode('Activities+Program'),jdecode(''),'/2173/8801.html','true',[],''],
		['PAGE','8822',jdecode('All-School+Fundraiser'),jdecode(''),'/2173/8822.html','true',[],''],
		['PAGE','16801',jdecode('Concessions'),jdecode(''),'/2173/16801.html','true',[],''],
		['PAGE','13101',jdecode('Golf+Tournament'),jdecode(''),'/2173/13101.html','true',[],''],
		['PAGE','13122',jdecode('Husky+Spirit+Wear'),jdecode(''),'/2173/13122.html','true',[],''],
		['PAGE','13143',jdecode('Husky+Yard+Signs'),jdecode(''),'/2173/13143.html','true',[],'']
	],''],
	['PAGE','2194',jdecode('Services'),jdecode(''),'/2194/index.html','true',[ 
		['PAGE','13401',jdecode('After+Prom%2FAfter+Graduation+Parties'),jdecode(''),'/2194/13401.html','true',[],''],
		['PAGE','13901',jdecode('Hospitality'),jdecode(''),'/2194/13901.html','true',[],''],
		['PAGE','25001',jdecode('Parent+Education+Programs'),jdecode(''),'/2194/25001.html','true',[],''],
		['PAGE','15001',jdecode('Scholarships'),jdecode(''),'/2194/15001.html','true',[],''],
		['PAGE','14701',jdecode('Senior+Picnic'),jdecode(''),'/2194/14701.html','true',[],''],
		['PAGE','14801',jdecode('Spending+Nights'),jdecode(''),'/2194/14801.html','true',[],''],
		['PAGE','18901',jdecode('Sportsmanship'),jdecode(''),'/2194/18901.html','true',[],''],
		['PAGE','14722',jdecode('Sr+Parent+Reception'),jdecode(''),'/2194/14722.html','true',[],''],
		['PAGE','14901',jdecode('Staff+Appreciation'),jdecode(''),'/2194/14901.html','true',[],''],
		['PAGE','14743',jdecode('Tailgates'),jdecode(''),'/2194/14743.html','false',[],'']
	],''],
	['PAGE','2215',jdecode('Communication'),jdecode(''),'/2215.html','true',[],''],
	['PAGE','13301',jdecode('Forms'),jdecode(''),'/13301.html','true',[],''],
	['PAGE','13201',jdecode('Links'),jdecode(''),'/13201.html','true',[],''],
	['PAGE','2152',jdecode('About+us'),jdecode(''),'/2152.html','true',[],''],
	['PAGE','13222',jdecode('PBC+Board+Listing'),jdecode(''),'/13222.html','true',[],''],
	['PAGE','89501',jdecode('Contact+Us'),jdecode(''),'/89501.html','true',[],'']];
var siteelementCount=30;
theSitetree.topTemplateName='Office';
theSitetree.paletteFamily='727D9C';
theSitetree.keyvisualId='11145';
theSitetree.keyvisualName='kv_11145.jpg';
theSitetree.fontsetId='32065';
theSitetree.graphicsetId='13879';
theSitetree.contentColor='757575';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Office',
				paletteFamily: 	'727D9C',
				keyvisualId: 	'11145',
				keyvisualName: 	'kv_11145.jpg',
				fontsetId: 		'32065',
				graphicsetId: 	'13879',
				contentColor: 	'757575',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2101',
internalId:  '',
customField: '20100305-092256'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2152',
internalId:  '',
customField: '20090616-130935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2173',
internalId:  '',
customField: '20090616-152444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2194',
internalId:  '',
customField: '20090616-125647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2215',
internalId:  '',
customField: '20100208-155307'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2236',
internalId:  '',
customField: '20100305-091240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5301',
internalId:  '',
customField: '20100305-091224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8801',
internalId:  '',
customField: '20090616-124219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8822',
internalId:  '',
customField: '20090915-120541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13401',
internalId:  '',
customField: '20100208-135137'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13222',
internalId:  '',
customField: '20100122-141322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13201',
internalId:  '',
customField: '20081031-175414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13901',
internalId:  '',
customField: '20090623-125916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13101',
internalId:  '',
customField: '20090616-174943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13301',
internalId:  '',
customField: '20100208-134933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16801',
internalId:  '',
customField: '20090616-125542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13122',
internalId:  '',
customField: '20090616-175225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18901',
internalId:  '',
customField: '20080428-172412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13143',
internalId:  '',
customField: '20080808-225127'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14801',
internalId:  '',
customField: '20100212-092255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15001',
internalId:  '',
customField: '20100305-091424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14701',
internalId:  '',
customField: '20090615-121756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14722',
internalId:  '',
customField: '20090615-122013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14901',
internalId:  '',
customField: '20080517-173702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37401',
internalId:  '',
customField: '20090616-141216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14743',
internalId:  '',
customField: '20080426-180823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25001',
internalId:  '',
customField: '20090410-104123'
};
webappMappings['7008']=webappMappings['7008-13996']={
webappId:    '7008',
documentId:  '75501',
internalId:  '13996',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-12389']={
webappId:    '7008',
documentId:  '72101',
internalId:  '12389',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72101',
internalId:  '',
customField: '20090330-101920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75501',
internalId:  '',
customField: '20090225-175412'
};
webappMappings['1501']=webappMappings['1501-8117635']={
webappId:    '1501',
documentId:  '2101',
internalId:  '8117635',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-17730']={
webappId:    '7008',
documentId:  '89501',
internalId:  '17730',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89501',
internalId:  '',
customField: '20090623-111716'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2101',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0IN28YH';
var companyName   = 'Blue+Valley+Northwest+High+School+Parent+Booster+Club';
var htmlTitle	  = 'Blue+Valley+Northwest+High+School+Parent+Booster+Club+%28BVNW+PBC%29';
var metaKeywords  = 'Blue+Valley+High+School+Booster+Club+Overland+Park+BVNW+PBC';
var metaContents  = 'The+website+of+the+Parent+Booster+Club+of+Blue+Valley+Northwest+High+School+in+Overland+Park%2C+Kansas.';
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();
};
