/* [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','118',jdecode('Home'),jdecode(''),'/118.html','true',[],'',''],
	['PAGE','115268',jdecode('Douglas+Music+Staff'),jdecode(''),'/115268.html','true',[],'',''],
	['PAGE','25635',jdecode('NV+Day+Governor%26%23x27%3Bs+Cup'),jdecode(''),'/25635/index.html','true',[ 
		['PAGE','7418',jdecode('McQ+%26+Galena'),jdecode(''),'/25635/7418.html','true',[],'',''],
		['PAGE','29835',jdecode('Fairfield+TOC'),jdecode(''),'/25635/29835.html','true',[],'','']
	],'',''],
	['PAGE','85257',jdecode('UNR+State+Champion'),jdecode(''),'/85257.html','true',[],'',''],
	['PAGE','6818',jdecode('Instrumental+Dept.'),jdecode(''),'/6818/index.html','true',[ 
		['PAGE','139979',jdecode('Band+07-08+Photos'),jdecode(''),'/6818/139979.html','true',[],'',''],
		['PAGE','6823',jdecode('Marching+Band'),jdecode(''),'/6818/6823.html','true',[],'',''],
		['PAGE','221379',jdecode('Dress-up+Days+09'),jdecode(''),'/6818/221379.html','true',[],'',''],
		['PAGE','6828',jdecode('Pageantry'),jdecode(''),'/6818/6828.html','true',[],'',''],
		['PAGE','6833',jdecode('Leadership'),jdecode(''),'/6818/6833.html','true',[],'',''],
		['PAGE','6838',jdecode('Concert+Band'),jdecode(''),'/6818/6838.html','true',[],'',''],
		['PAGE','6843',jdecode('Jazz+Band'),jdecode(''),'/6818/6843.html','true',[],'',''],
		['PAGE','121379',jdecode('Guitar'),jdecode(''),'/6818/121379.html','true',[],'',''],
		['PAGE','16019',jdecode('2005+Inauguration'),jdecode(''),'/6818/16019.html','true',[],'',''],
		['PAGE','96568',jdecode('Chinese+New+Year+Parade'),jdecode(''),'/6818/96568.html','true',[],'',''],
		['PAGE','44535',jdecode('Vallejo+2006'),jdecode(''),'/6818/44535.html','true',[],'','']
	],'',''],
	['PAGE','6848',jdecode('Band+Awards'),jdecode(''),'/6848.html','true',[],'',''],
	['PAGE','6853',jdecode('Vocal+Department'),jdecode(''),'/6853/index.html','true',[ 
		['PAGE','6858',jdecode('Madrigal+Singers'),jdecode(''),'/6853/6858.html','true',[],'',''],
		['PAGE','7423',jdecode('Concert+Choir'),jdecode(''),'/6853/7423.html','true',[],'','']
	],'',''],
	['PAGE','6868',jdecode('Choral+Awards'),jdecode(''),'/6868.html','true',[],'',''],
	['PAGE','8448',jdecode('NZNMEA'),jdecode(''),'/8448/index.html','true',[ 
		['PAGE','8453',jdecode('Dates'),jdecode(''),'/8448/8453.html','true',[],'',''],
		['PAGE','20518',jdecode('H.S.Festival+Results'),jdecode(''),'/8448/20518.html','true',[],'',''],
		['PAGE','39935',jdecode('M.S.Festival+results'),jdecode(''),'/8448/39935.html','true',[],'','']
	],'',''],
	['PAGE','6238',jdecode('Calendar'),jdecode(''),'/6238/index.html','true',[ 
		['PAGE','63335',jdecode('Frosh+Addendum'),jdecode(''),'/6238/63335.html','true',[],'','']
	],'',''],
	['PAGE','14518',jdecode('Forum'),jdecode(''),'/14518.html','true',[],'',''],
	['PAGE','6243',jdecode('Links'),jdecode(''),'/6243.html','true',[],'',''],
	['PAGE','4719',jdecode('Guestbook'),jdecode(''),'/4719.html','true',[],'',''],
	['PAGE','15719',jdecode('Directions'),jdecode(''),'/15719.html','true',[],'','']];
var siteelementCount=33;
theSitetree.topTemplateName='Linedup';
theSitetree.paletteFamily='F5D53E';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10359';
theSitetree.graphicsetId='10507';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='F5D53E';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Linedup',
				paletteFamily: 	'F5D53E',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10359',
				graphicsetId: 	'10507',
				contentColor: 	'000000',
				contentBGColor: 'F5D53E',
				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:  '118',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-717373']={
webappId:    '1501',
documentId:  '118',
internalId:  '717373',
customField: '1501'
};
webappMappings['1002']=webappMappings['1002-4719aen010inxzb3']={
webappId:    '1002',
documentId:  '4719',
internalId:  '4719aen010inxzb3',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115268',
internalId:  '',
customField: '20100531-150158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25635',
internalId:  '',
customField: '20091102-130958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7418',
internalId:  '',
customField: '20090308-161735'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29835',
internalId:  '',
customField: '20090308-162259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85257',
internalId:  '',
customField: '20091102-131911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6818',
internalId:  '',
customField: '20100506-190959'
};
webappMappings['1003']=webappMappings['1003-aen010inxzb311e9de050f3']={
webappId:    '1003',
documentId:  '14518',
internalId:  'aen010inxzb311e9de050f3',
customField: 'en:US:'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '15719',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['7060']=webappMappings['7060-afa3745209b29abf8031d76296594d15']={
webappId:    '7060',
documentId:  '16019',
internalId:  'afa3745209b29abf8031d76296594d15',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118',
internalId:  '',
customField: '20100531-153029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6238',
internalId:  '',
customField: '20100604-090254'
};
webappMappings['7060']=webappMappings['7060-33549c6819f230d82ceb457149ef5f15']={
webappId:    '7060',
documentId:  '139979',
internalId:  '33549c6819f230d82ceb457149ef5f15',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '139979',
internalId:  '',
customField: '20090308-162751'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6823',
internalId:  '',
customField: '20091124-092839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6828',
internalId:  '',
customField: '20100531-150004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6833',
internalId:  '',
customField: '20090914-153024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6838',
internalId:  '',
customField: '20100201-224841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6843',
internalId:  '',
customField: '20100122-141747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121379',
internalId:  '',
customField: '20090308-164536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16019',
internalId:  '',
customField: '20090308-164751'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96568',
internalId:  '',
customField: '20091124-090900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44535',
internalId:  '',
customField: '20090308-165024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6848',
internalId:  '',
customField: '20100506-191419'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6853',
internalId:  '',
customField: '20100122-141935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6858',
internalId:  '',
customField: '20100528-080421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7423',
internalId:  '',
customField: '20100506-190835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6868',
internalId:  '',
customField: '20100506-190611'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8448',
internalId:  '',
customField: '20090914-161903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8453',
internalId:  '',
customField: '20090914-160930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20518',
internalId:  '',
customField: '20100325-142429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39935',
internalId:  '',
customField: '20100428-153211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63335',
internalId:  '',
customField: '20091102-135242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14518',
internalId:  '',
customField: '20091207-074547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6243',
internalId:  '',
customField: '20100608-182134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4719',
internalId:  '',
customField: '20090308-171905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '221379',
internalId:  '',
customField: '20091013-153333'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15719',
internalId:  '',
customField: '20090308-171950'
};
var canonHostname = 'wscwrk01.ehost-services.com';
var accountId     = 'AEN010INXZB3';
var companyName   = 'Douglas+High+School+Music+Department';
var htmlTitle	  = 'Douglas+High+School+Music+Department';
var metaKeywords  = 'Band%2C+Marching%2C+Choir%2C+Jazz+Band%2C+Music+Department%2C+High+School';
var metaContents  = 'High+School+Music++High+School+Band++High+School+Choir++Madrigal+Group';
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();
};
