/* [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','201',jdecode('2010-11+Home+Page'),jdecode(''),'/201.html','true',[],'',''],
	['PAGE','85105',jdecode('School+Events'),jdecode(''),'/85105.html','true',[],'',''],
	['PAGE','85126',jdecode('The+Fine+Arts'),jdecode(''),'/85126/index.html','true',[ 
		['PAGE','86745',jdecode('Choir+'),jdecode(''),'/85126/86745.html','true',[],'',''],
		['PAGE','86766',jdecode('Theatre'),jdecode(''),'/85126/86766.html','true',[],'',''],
		['PAGE','86787',jdecode('Band'),jdecode(''),'/85126/86787.html','true',[],'','']
	],'',''],
	['PAGE','1601',jdecode('High+School+Athletics'),jdecode(''),'/1601/index.html','true',[ 
		['PAGE','86445',jdecode('Team+%26+Individual+Sports+Photos'),jdecode(''),'/1601/86445.html','true',[],'',''],
		['PAGE','86466',jdecode('Fall+Sports'),jdecode(''),'/1601/86466.html','true',[],'',''],
		['PAGE','86487',jdecode('Winter+Sports'),jdecode(''),'/1601/86487.html','true',[],'',''],
		['PAGE','86508',jdecode('Spring+Sports'),jdecode(''),'/1601/86508.html','true',[],'','']
	],'',''],
	['PAGE','85147',jdecode('Middle+School+Athletics'),jdecode(''),'/85147/index.html','true',[ 
		['PAGE','86571',jdecode('Team+%26+Individual+Sports+Pics'),jdecode(''),'/85147/86571.html','true',[],'',''],
		['PAGE','96245',jdecode('Game+Photos'),jdecode(''),'/85147/96245.html','true',[],'','']
	],'',''],
	['PAGE','85168',jdecode('Elementary+Athletics'),jdecode(''),'/85168/index.html','true',[ 
		['PAGE','86808',jdecode('Golden+Saints+Cheer'),jdecode(''),'/85168/86808.html','true',[],'',''],
		['PAGE','99145',jdecode('Golden+Saints+Football'),jdecode(''),'/85168/99145.html','true',[],'','']
	],'',''],
	['PAGE','51305',jdecode(''),jdecode(''),'/51305.html','true',[],'',''],
	['PAGE','91045',jdecode('2009-10+School+Year'),jdecode(''),'/91045/index.html','true',[ 
		['PAGE','86245',jdecode('School+Events'),jdecode(''),'/91045/86245.html','true',[],'',''],
		['PAGE','90566',jdecode('Fine+Arts%3A+Choir+and+Band'),jdecode(''),'/91045/90566.html','true',[],'',''],
		['PAGE','90587',jdecode('Fine+Arts%3A+Theatre'),jdecode(''),'/91045/90587.html','true',[],'',''],
		['PAGE','104945',jdecode('Ahtletic+Team%2FInd.+Photos'),jdecode(''),'/91045/104945.html','true',[],'',''],
		['PAGE','90608',jdecode('High+School+Fall+Sports'),jdecode(''),'/91045/90608.html','true',[],'',''],
		['PAGE','90629',jdecode('High+School+Winter+Sports'),jdecode(''),'/91045/90629.html','true',[],'',''],
		['PAGE','90650',jdecode('High+School+Spring+Sports'),jdecode(''),'/91045/90650.html','true',[],'',''],
		['PAGE','90671',jdecode('Middle+School+Sports'),jdecode(''),'/91045/90671.html','true',[],'',''],
		['PAGE','90692',jdecode('Elementary+Sports'),jdecode(''),'/91045/90692.html','true',[],'','']
	],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Dispose';
theSitetree.paletteFamily='E99C2E';
theSitetree.keyvisualId='9684';
theSitetree.keyvisualName='kv_9684.gif';
theSitetree.fontsetId='10658';
theSitetree.graphicsetId='11182';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='CCCACA';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Dispose',
				paletteFamily: 	'E99C2E',
				keyvisualId: 	'9684',
				keyvisualName: 	'kv_9684.gif',
				fontsetId: 		'10658',
				graphicsetId: 	'11182',
				contentColor: 	'000000',
				contentBGColor: 'CCCACA',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '201',
internalId:  '',
customField: '20100221-084026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1601',
internalId:  '',
customField: '20090713-035025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51305',
internalId:  '',
customField: '20080802-195833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86445',
internalId:  '',
customField: '20100709-133106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85105',
internalId:  '',
customField: '20100709-132643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85126',
internalId:  '',
customField: '20090713-035055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86745',
internalId:  '',
customField: '20100709-132749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86766',
internalId:  '',
customField: '20100709-132829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86787',
internalId:  '',
customField: '20100709-132919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86466',
internalId:  '',
customField: '20100712-134653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86487',
internalId:  '',
customField: '20100712-134441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86508',
internalId:  '',
customField: '20100709-134328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96245',
internalId:  '',
customField: '20100709-134601'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85147',
internalId:  '',
customField: '20090713-035243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86571',
internalId:  '',
customField: '20100709-134502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85168',
internalId:  '',
customField: '20090713-035308'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86808',
internalId:  '',
customField: '20100709-134723'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86245',
internalId:  '',
customField: '20100712-135549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99145',
internalId:  '',
customField: '20100709-134803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91045',
internalId:  '',
customField: '20090713-034937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90566',
internalId:  '',
customField: '20090713-025826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90587',
internalId:  '',
customField: '20100709-114712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90608',
internalId:  '',
customField: '20100712-134936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90629',
internalId:  '',
customField: '20090713-032202'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90650',
internalId:  '',
customField: '20100712-135008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90671',
internalId:  '',
customField: '20100712-135058'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90692',
internalId:  '',
customField: '20090713-033743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '104945',
internalId:  '',
customField: '20100709-115307'
};
var canonHostname = 'wscwrk02.ehost-services.com';
var accountId     = 'AEN010IN21EJ';
var companyName   = 'BCSaints.com';
var htmlTitle	  = 'BCSAINTS.COM';
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();
};
