/* [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','14712',jdecode('Home'),jdecode(''), jdecode('%2F14712.html'), 'true',[],'',''],
	['PAGE','14763',jdecode('About+us'),jdecode(''), jdecode('%2F14763%2Findex.html'), 'true',[ 
		['PAGE','14784',jdecode('Vision%2FMission'),jdecode(''), jdecode('%2F14763%2F14784.html'), 'true',[],'',''],
		['PAGE','14805',jdecode('Board+of+Directors'),jdecode(''), jdecode('%2F14763%2F14805.html'), 'true',[],'',''],
		['PAGE','14847',jdecode('Becoming+a+Member'),jdecode(''), jdecode('%2F14763%2F14847.html'), 'true',[],'','']
	],'',''],
	['PAGE','75912',jdecode('Alumni+Association'),jdecode(''), jdecode('%2F75912%2Findex.html'), 'true',[ 
		['PAGE','81612',jdecode('Events+-+Alumni'),jdecode(''), jdecode('%2F75912%2F81612.html'), 'true',[],'',''],
		['PAGE','81633',jdecode('Contact+Us+-+Alumni'),jdecode(''), jdecode('%2F75912%2F81633.html'), 'true',[],'',''],
		['PAGE','93212',jdecode('Make+a+Contribution-Alumni'),jdecode(''), jdecode('%2F75912%2F93212.html'), 'true',[],'','']
	],'',''],
	['PAGE','20712',jdecode('Summer%26%23x27%3Bs+Last+Splash+'),jdecode(''), jdecode('%2F20712.html'), 'true',[],'',''],
	['PAGE','14889',jdecode('Heroes+Recognition+'),jdecode(''), jdecode('%2F14889.html'), 'true',[],'',''],
	['PAGE','20733',jdecode('Mini-Grants'),jdecode(''), jdecode('%2F20733.html'), 'true',[],'',''],
	['PAGE','20754',jdecode('Shooting+for+the+Stars'),jdecode(''), jdecode('%2F20754.html'), 'true',[],'',''],
	['PAGE','79112',jdecode('Business+Partnerships'),jdecode(''), jdecode('%2F79112%2Findex.html'), 'true',[ 
		['PAGE','85612',jdecode('2009-10+Corporate+Sponsor'),jdecode(''), jdecode('%2F79112%2F85612.html'), 'true',[],'',''],
		['PAGE','96012',jdecode('MUSD+Employee+Discount+Program'),jdecode(''), jdecode('%2F79112%2F96012.html'), 'true',[],'','']
	],'',''],
	['PAGE','21312',jdecode('Make+a+Contribution'),jdecode(''), jdecode('%2F21312.html'), 'true',[],'',''],
	['PAGE','14910',jdecode('Contact+Us'),jdecode(''), jdecode('%2F14910.html'), 'true',[],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Collage';
theSitetree.paletteFamily='6683B6';
theSitetree.keyvisualId='2466';
theSitetree.keyvisualName='schule.jpg';
theSitetree.fontsetId='406';
theSitetree.graphicsetId='461';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'hps_testtown',
  product: 'WSCSYSSSSLY0XNM4'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Collage',
				paletteFamily: 	'6683B6',
				keyvisualId: 	'2466',
				keyvisualName: 	'schule.jpg',
				fontsetId: 		'406',
				graphicsetId: 	'461',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'6683B6',
				c_color: 		'FFFFFF',
				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:  '14712',
internalId:  '',
customField: '20101216-155836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14763',
internalId:  '',
customField: '20090818-185405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14805',
internalId:  '',
customField: '20101216-162132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14784',
internalId:  '',
customField: '20090817-181950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14847',
internalId:  '',
customField: '20090817-182037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14889',
internalId:  '',
customField: '20090818-185609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14910',
internalId:  '',
customField: '20090818-190154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20754',
internalId:  '',
customField: '20110924-180044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20733',
internalId:  '',
customField: '20100706-124753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20712',
internalId:  '',
customField: '20090914-142750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21312',
internalId:  '',
customField: '20100203-103809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75912',
internalId:  '',
customField: '20090818-191710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79112',
internalId:  '',
customField: '20090901-175013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81633',
internalId:  '',
customField: '20090818-174018'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85612',
internalId:  '',
customField: '20100203-104125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81612',
internalId:  '',
customField: '20110924-181113'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '14712',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93212',
internalId:  '',
customField: '20110113-203906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96012',
internalId:  '',
customField: '20090901-180547'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INLTMK';
var companyName   = 'Serving+Marana+Unified+School+District';
var htmlTitle	  = 'The+Marana+Foundation+for+Educational+Excellence';
var metaKeywords  = 'MUSD%2C+Foundation%2C+Marana+School+District%2C+Marana%2C+Non-Profit+Organization%2C+Tucson%2C+Education%2C+Fundraising%2C+Marana+Alumni';
var metaContents  = 'The+Marana+Foundation+for+Educational+Excellence+is+a+non-profit+organization+dedicated+to+supporting+the+Marana+Unified+School+District+through+recognitions%2C+service%2C+fundraising%2C+and+distribution+of+grants+to+teachers+on+an+annual+basis.';
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();
};

