/* [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','301',jdecode('Home'),jdecode(''),'/301.html','true',[],'',''],
	['PAGE','8401',jdecode('About+Us'),jdecode(''),'/8401.html','true',[],'',''],
	['PAGE','5901',jdecode('Links'),jdecode(''),'/5901.html','true',[],'',''],
	['PAGE','8464',jdecode('Employment'),jdecode(''),'/8464.html','true',[],'',''],
	['PAGE','29701',jdecode('OCA-Middle+School'),jdecode(''),'/29701/index.html','true',[ 
		['PAGE','8422',jdecode('The+Team'),jdecode(''),'/29701/8422.html','true',[],'',''],
		['PAGE','49501',jdecode('Test+Scores'),jdecode(''),'/29701/49501.html','true',[],'',''],
		['PAGE','20101',jdecode('SARC'),jdecode(''),'/29701/20101.html','true',[],'',''],
		['PAGE','6601',jdecode('News'),jdecode(''),'/29701/6601.html','true',[],'',''],
		['PAGE','49522',jdecode('Calendar'),jdecode(''),'/29701/49522.html','true',[],'',''],
		['PAGE','4943',jdecode('Enrollment+Info.'),jdecode(''),'/29701/4943.html','true',[],'',''],
		['PAGE','4901',jdecode('Contact'),jdecode(''),'/29701/4901.html','true',[],'','']
	],'',''],
	['PAGE','29722',jdecode('OCHS+High+School'),jdecode(''),'/29722/index.html','true',[ 
		['PAGE','29743',jdecode('The+Team'),jdecode(''),'/29722/29743.html','true',[],'',''],
		['PAGE','49543',jdecode('Test+Scores'),jdecode(''),'/29722/49543.html','true',[],'',''],
		['PAGE','80112',jdecode('SARC'),jdecode(''),'/29722/80112.html','true',[],'',''],
		['PAGE','49564',jdecode('Programs'),jdecode(''),'/29722/49564.html','true',[],'',''],
		['PAGE','29764',jdecode('News'),jdecode(''),'/29722/29764.html','true',[],'',''],
		['PAGE','29785',jdecode('Graduation+Requirements'),jdecode(''),'/29722/29785.html','true',[],'',''],
		['PAGE','84734',jdecode('College+Advising'),jdecode(''),'/29722/84734.html','true',[],'',''],
		['PAGE','42101',jdecode('Calendar'),jdecode(''),'/29722/42101.html','true',[],'',''],
		['PAGE','49585',jdecode('Enrollment+Info.'),jdecode(''),'/29722/49585.html','true',[],'',''],
		['PAGE','29806',jdecode('Contact'),jdecode(''),'/29722/29806.html','true',[],'','']
	],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Profile';
theSitetree.paletteFamily='336699';
theSitetree.keyvisualId='1283';
theSitetree.keyvisualName='wueste.jpg';
theSitetree.fontsetId='190';
theSitetree.graphicsetId='230';
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: 			'Profile',
				paletteFamily: 	'336699',
				keyvisualId: 	'1283',
				keyvisualName: 	'wueste.jpg',
				fontsetId: 		'190',
				graphicsetId: 	'230',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'336699',
				b_color: 		'336699',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20100119-192116'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5901',
internalId:  '',
customField: '20091012-134815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29701',
internalId:  '',
customField: '20090504-010837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4901',
internalId:  '',
customField: '20080423-120533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4943',
internalId:  '',
customField: '20090108-135804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29722',
internalId:  '',
customField: '20100527-203401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49585',
internalId:  '',
customField: '20100111-140015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8401',
internalId:  '',
customField: '20100111-133400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8464',
internalId:  '',
customField: '20100119-192534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8422',
internalId:  '',
customField: '20100111-133839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49501',
internalId:  '',
customField: '20100317-131403'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20101',
internalId:  '',
customField: '20100325-152655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6601',
internalId:  '',
customField: '20100111-134041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49522',
internalId:  '',
customField: '20090714-130240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29743',
internalId:  '',
customField: '20100527-203515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49543',
internalId:  '',
customField: '20100311-190708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49564',
internalId:  '',
customField: '20100119-200856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29764',
internalId:  '',
customField: '20100119-193309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29785',
internalId:  '',
customField: '20081021-170216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42101',
internalId:  '',
customField: '20090714-130211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29806',
internalId:  '',
customField: '20100111-140541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80112',
internalId:  '',
customField: '20100325-151659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84734',
internalId:  '',
customField: '20100720-150126'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INEZBH';
var companyName   = 'Oakland+Charter+Academies';
var htmlTitle	  = '';
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();
};
