/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','4801',jdecode('About+us'),jdecode(''),'/4801/index.html','true',[ 
		['PAGE','4822',jdecode('Board+of+Directors'),jdecode(''),'/4801/4822.html','true',[],'',''],
		['PAGE','73675',jdecode('Service+Awards'),jdecode(''),'/4801/73675.html','true',[],'',''],
		['PAGE','4843',jdecode('Staff'),jdecode(''),'/4801/4843.html','true',[],'','']
	],'',''],
	['PAGE','5032',jdecode('Events'),jdecode(''),'/5032/index.html','true',[ 
		['PAGE','80015',jdecode('Vision+2020+Workshop'),jdecode(''),'/5032/80015.html','true',[],'',''],
		['PAGE','76398',jdecode('Merrow%26%23x27%3Bs+California%26%23x27%3Bs+Schools+Panel'),jdecode(''),'/5032/76398.html','true',[],'',''],
		['PAGE','76142',jdecode('Benefit+Concert'),jdecode(''),'/5032/76142.html','true',[],'',''],
		['PAGE','64301',jdecode('San+Francisco+Giants'),jdecode(''),'/5032/64301.html','true',[],'',''],
		['PAGE','74118',jdecode('Kingfish+Photos'),jdecode(''),'/5032/74118.html','true',[],'','']
	],'',''],
	['PAGE','38601',jdecode('Why+give%3F'),jdecode(''),'/38601.html','true',[],'',''],
	['PAGE','4864',jdecode('Programs+We+Support'),jdecode(''),'/4864.html','true',[],'',''],
	['PAGE','4948',jdecode('Get+Involved'),jdecode(''),'/4948.html','true',[],'',''],
	['PAGE','4990',jdecode('Ways+to+Give'),jdecode(''),'/4990/index.html','true',[ 
		['PAGE','4969',jdecode('Our+Campaigns'),jdecode(''),'/4990/4969.html','true',[],'',''],
		['PAGE','75305',jdecode('Vehicle+Donations'),jdecode(''),'/4990/75305.html','true',[],'',''],
		['PAGE','74715',jdecode('MySchoolBucks'),jdecode(''),'/4990/74715.html','true',[],'','']
	],'',''],
	['PAGE','5053',jdecode('Our+Business+Partners'),jdecode(''),'/5053.html','true',[],'',''],
	['PAGE','80663',jdecode('Our+Individual+Donors+10-11'),jdecode(''),'/80663.html','true',[],'',''],
	['PAGE','76849',jdecode('Our+Individual+Donors+09-10'),jdecode(''),'/76849.html','true',[],'',''],
	['PAGE','74559',jdecode('Our+Individual+Donors+08-09'),jdecode(''),'/74559.html','true',[],'',''],
	['PAGE','73483',jdecode('Our+thanks+to+PTA%26%23x27%3Bs'),jdecode(''),'/73483.html','true',[],'',''],
	['PAGE','5074',jdecode('News'),jdecode(''),'/5074.html','true',[],'',''],
	['PAGE','5095',jdecode('Contact+Us++650-312-7235'),jdecode(''),'/5095/index.html','true',[ 
		['PAGE','38622',jdecode('Suggested+Links'),jdecode(''),'/5095/38622.html','true',[],'',''],
		['PAGE','19701',jdecode('Feedback'),jdecode(''),'/5095/19701/index.html','true',[ 
			['PAGE','20001',jdecode('Feedback+%28follow+up+page%29'),jdecode(''),'/5095/19701/20001.html','false',[],'','']
		],'','']
	],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Steps';
theSitetree.paletteFamily='315881';
theSitetree.keyvisualId='2278';
theSitetree.keyvisualName='schule.jpg';
theSitetree.fontsetId='367';
theSitetree.graphicsetId='419';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='315881';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Steps',
				paletteFamily: 	'315881',
				keyvisualId: 	'2278',
				keyvisualName: 	'schule.jpg',
				fontsetId: 		'367',
				graphicsetId: 	'419',
				contentColor: 	'FFFFFF',
				contentBGColor: '315881',
				a_color: 		'315881',
				b_color: 		'2985B5',
				c_color: 		'3366CC',
				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:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20100527-173304'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4801',
internalId:  '',
customField: '20090312-142041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4822',
internalId:  '',
customField: '20081113-184913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73675',
internalId:  '',
customField: '20080627-185846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4843',
internalId:  '',
customField: '20080627-190002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5032',
internalId:  '',
customField: '20100401-123513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74118',
internalId:  '',
customField: '20080729-175022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64301',
internalId:  '',
customField: '20100505-182649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38601',
internalId:  '',
customField: '20080207-135444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4864',
internalId:  '',
customField: '20091019-192955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4948',
internalId:  '',
customField: '20091020-201813'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4990',
internalId:  '',
customField: '20081014-181323'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4969',
internalId:  '',
customField: '20090629-195902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74715',
internalId:  '',
customField: '20081014-181700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5053',
internalId:  '',
customField: '20091020-205200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74559',
internalId:  '',
customField: '20100527-173203'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80663',
internalId:  '',
customField: '20100721-184504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73483',
internalId:  '',
customField: '20091020-204547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5074',
internalId:  '',
customField: '20100225-124334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5095',
internalId:  '',
customField: '20081216-190909'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38622',
internalId:  '',
customField: '20080207-140126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19701',
internalId:  '',
customField: '20080401-123222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20001',
internalId:  '',
customField: '20070410-152223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75305',
internalId:  '',
customField: '20081216-164143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76142',
internalId:  '',
customField: '20090618-194056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76398',
internalId:  '',
customField: '20091020-202032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76849',
internalId:  '',
customField: '20091019-201403'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80015',
internalId:  '',
customField: '20100401-123949'
};
webappMappings['7008']=webappMappings['7008-7758']={
webappId:    '7008',
documentId:  '19701',
internalId:  '7758',
customField: 'language:en;country:US;'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INX2KU';
var companyName   = 'A+Foundation+for+our+Future';
var htmlTitle	  = 'for+kids%21+San+Mateo-+Foster+City+Education+Foundation';
var metaKeywords  = 'Education+Foundation++San+Mateo+Foster+City+Education+Foundation++Education++Foundation++For+Kids';
var metaContents  = 'Education+Foundation++San+Mateo+Foster+City+Education+Foundation++Education++Foundation++For+Kids%2C+students%2C+parents%2C+educational%2C+learning%2C+health%2C+fitness%2C+arts%2C+san+mateo%2C+foster+city%2C+for+kids%2C+san+mateo+foster+city+education+foundation';
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();
};
