/* [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 theSitetree=[ 
	['PAGE','12843',jdecode('HOME'),jdecode(''),'/12843.html','true',[],''],
	['PAGE','10801',jdecode('School+Information'),jdecode(''),'/10801/index.html','true',[ 
		['PAGE','10957',jdecode('School+Overview'),jdecode(''),'/10801/10957.html','true',[],''],
		['PAGE','12801',jdecode('Staff'),jdecode(''),'/10801/12801.html','true',[],''],
		['PAGE','19322',jdecode('Volunteer+Opportunities'),jdecode(''),'/10801/19322.html','true',[],'']
	],''],
	['PAGE','42601',jdecode('About+PTSA'),jdecode(''),'/42601.html','true',[],''],
	['PAGE','19301',jdecode('Board+Members'),jdecode(''),'/19301.html','true',[],''],
	['PAGE','25101',jdecode('Budget'),jdecode(''),'/25101.html','true',[],''],
	['PAGE','25122',jdecode('Calendar+%26+Events'),jdecode(''),'/25122/index.html','true',[ 
		['PAGE','56601',jdecode('Skate+King+%26+Castle+Ice'),jdecode(''),'/25122/56601.html','true',[],'']
	],''],
	['PAGE','25185',jdecode('Contact+Us'),jdecode(''),'/25185.html','true',[],''],
	['PAGE','12864',jdecode('Committees'),jdecode(''),'/12864/index.html','true',[ 
		['PAGE','86001',jdecode('Reflections'),jdecode(''),'/12864/86001.html','true',[],'']
	],''],
	['PAGE','25143',jdecode('Forms+%26+More'),jdecode(''),'/25143.html','true',[],''],
	['PAGE','20501',jdecode('Fundraising'),jdecode(''),'/20501/index.html','true',[ 
		['PAGE','10915',jdecode('No+Effort+Fundraising'),jdecode(''),'/20501/10915.html','true',[],''],
		['PAGE','35801',jdecode('Auction'),jdecode(''),'/20501/35801.html','true',[],''],
		['PAGE','35822',jdecode('Walk-a-thon'),jdecode(''),'/20501/35822.html','true',[],''],
		['PAGE','87501',jdecode('Donate+Today'),jdecode(''),'/20501/87501.html','true',[],'']
	],''],
	['PAGE','61601',jdecode('Golden+Acorn'),jdecode(''),'/61601.html','true',[],''],
	['PAGE','64401',jdecode('Links'),jdecode(''),'/64401.html','true',[],''],
	['PAGE','25164',jdecode('Meetings'),jdecode(''),'/25164.html','true',[],''],
	['PAGE','12822',jdecode('Newsletters'),jdecode(''),'/12822.html','true',[],''],
	['PAGE','67401',jdecode('Parent+Involvement'),jdecode(''),'/67401.html','true',[],''],
	['PAGE','23801',jdecode('Photo+Album'),jdecode(''),'/23801.html','false',[],'']];
var siteelementCount=25;
theSitetree.topTemplateName='Education';
theSitetree.paletteFamily='766B4B';
theSitetree.keyvisualId='7307';
theSitetree.keyvisualName='kv_7307.jpg';
theSitetree.fontsetId='16462';
theSitetree.graphicsetId='12158';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='867C5F';
var theTemplate={
				name: 			'Education',
				paletteFamily: 	'766B4B',
				keyvisualId: 	'7307',
				keyvisualName: 	'kv_7307.jpg',
				fontsetId: 		'16462',
				graphicsetId: 	'12158',
				contentColor: 	'FFFFFF',
				contentBGColor: '867C5F',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10801',
internalId:  '',
customField: '20100308-235925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12822',
internalId:  '',
customField: '20091108-141819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12801',
internalId:  '',
customField: '20091108-133101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10957',
internalId:  '',
customField: '20090501-124322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10915',
internalId:  '',
customField: '20090927-001937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56601',
internalId:  '',
customField: '20090902-174747'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '12843',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12843',
internalId:  '',
customField: '20100308-235838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19301',
internalId:  '',
customField: '20091108-134215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19322',
internalId:  '',
customField: '20090902-173843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12864',
internalId:  '',
customField: '20091011-233521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20501',
internalId:  '',
customField: '20090528-234128'
};
webappMappings['7060']=webappMappings['7060-43247b6a298a436f6b4a02155dc265c3']={
webappId:    '7060',
documentId:  '23801',
internalId:  '43247b6a298a436f6b4a02155dc265c3',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23801',
internalId:  '',
customField: '20090422-134539'
};
webappMappings['7008']=webappMappings['7008-2984']={
webappId:    '7008',
documentId:  '25185',
internalId:  '2984',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25185',
internalId:  '',
customField: '20090428-121659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25164',
internalId:  '',
customField: '20100309-002316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25143',
internalId:  '',
customField: '20090625-193129'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25101',
internalId:  '',
customField: '20091108-132730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25122',
internalId:  '',
customField: '20100202-214157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35801',
internalId:  '',
customField: '20100108-032817'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42601',
internalId:  '',
customField: '20090503-122843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35822',
internalId:  '',
customField: '20090913-201903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61601',
internalId:  '',
customField: '20090607-200614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64401',
internalId:  '',
customField: '20090529-165504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67401',
internalId:  '',
customField: '20090527-191234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86001',
internalId:  '',
customField: '20091005-164215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87501',
internalId:  '',
customField: '20091103-031421'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INLDUQ';
var companyName   = 'Spiritridge+Elementary+PTSA';
var htmlTitle	  = 'Spiritridge+Elementary+School+PTSA+Web+Site+-+Bellevue%2C+WA';
var metaKeywords  = 'Spiritridge+Elementary+PTSA%2C+Bellevue+School+District%2C+Washington+State%2C+Math%2C+English%2C+Social+Studies%2C+Science%2C+Reading%2C+Library%2C+Writing';
var metaContents  = 'Spiritridge+Elementary+-+Nestled+in+a+quiet+forest+setting+this+fantastic+community+school+that+goes+out+of+its+way+to+focus+on+the+student+is+a+neighborhood+treasure.+With+a+student+body+of+around+300+students+and+very+strong+and+giving+community+of+parents%2C+volunteers+and+teachers+this+school+is+a+small+haven+of+academic+learning+and+growth+for+its+students.';
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();
};
