/* [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','401',jdecode('Home'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','452',jdecode('PTO+Board'),jdecode(''),'/452.html','true',[],'',''],
	['PAGE','473',jdecode('Calendar+of+Events'),jdecode(''),'/473.html','true',[],'',''],
	['PAGE','12301',jdecode('Monthly+Newsletter'),jdecode(''),'/12301.html','true',[],'',''],
	['PAGE','494',jdecode('Volunteer+Opportunities'),jdecode(''),'/494.html','true',[],'',''],
	['PAGE','515',jdecode('Fundraising+Activities'),jdecode(''),'/515/index.html','true',[ 
		['PAGE','6501',jdecode('Fall+Fundraiser'),jdecode(''),'/515/6501.html','true',[],'',''],
		['PAGE','6522',jdecode('Crab+Feed'),jdecode(''),'/515/6522.html','true',[],'',''],
		['PAGE','6543',jdecode('Chocolate+Fest'),jdecode(''),'/515/6543.html','true',[],'','']
	],'',''],
	['PAGE','536',jdecode('eScrip'),jdecode(''),'/536.html','true',[],'',''],
	['PAGE','557',jdecode('Donation+Wish+List'),jdecode(''),'/557.html','true',[],'',''],
	['PAGE','578',jdecode('Thank+you'),jdecode(''),'/578.html','true',[],'',''],
	['PAGE','599',jdecode('Grade+Level+Events'),jdecode(''),'/599/index.html','true',[ 
		['PAGE','620',jdecode('8th+grade'),jdecode(''),'/599/620.html','true',[],'',''],
		['PAGE','641',jdecode('7th+grade'),jdecode(''),'/599/641.html','true',[],'',''],
		['PAGE','662',jdecode('6th+grade'),jdecode(''),'/599/662.html','true',[],'','']
	],'',''],
	['PAGE','683',jdecode('Spiritwear'),jdecode(''),'/683.html','true',[],'',''],
	['PAGE','15061',jdecode('Bulldogs+Sports'),jdecode(''),'/15061/index.html','true',[ 
		['PAGE','15117',jdecode('Practice+Sched+-+ALL'),jdecode(''),'/15061/15117.html','true',[],'',''],
		['PAGE','15126',jdecode('Flag+Football+Sched+as+of+9%2F18'),jdecode(''),'/15061/15126.html','true',[],'',''],
		['PAGE','15152',jdecode('Volleyball+Sched+as+of+9%2F18'),jdecode(''),'/15061/15152.html','true',[],'','']
	],'',''],
	['PAGE','704',jdecode('Photo+Gallery'),jdecode(''),'/704.html','true',[],'',''],
	['PAGE','725',jdecode('Parent+%26+Student+Links'),jdecode(''),'/725.html','true',[],'',''],
	['PAGE','746',jdecode('Ingrid+B.+Lacy+website'),jdecode(''),'/746.html','true',[],'',''],
	['PAGE','15243',jdecode('Pacifica+Education+Foundation'),jdecode(''),'/15243.html','true',[],'',''],
	['PAGE','2001',jdecode('Contact+Us'),jdecode(''),'/2001.html','true',[],'',''],
	['PAGE','3306',jdecode('Guestbook'),jdecode(''),'/3306/index.html','true',[ 
		['PAGE','3301',jdecode('Read+Guestbook'),jdecode(''),'/3306/3301.html','false',[],'','']
	],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Capri';
theSitetree.paletteFamily='385CA9';
theSitetree.keyvisualId='7245';
theSitetree.keyvisualName='kv_7245.jpg';
theSitetree.fontsetId='16409';
theSitetree.graphicsetId='12134';
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: 			'Capri',
				paletteFamily: 	'385CA9',
				keyvisualId: 	'7245',
				keyvisualName: 	'kv_7245.jpg',
				fontsetId: 		'16409',
				graphicsetId: 	'12134',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20100902-071248'
};
webappMappings['1002']=webappMappings['1002-3306AHW050INEXNX']={
webappId:    '1002',
documentId:  '3306',
internalId:  '3306AHW050INEXNX',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100902-074626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20100902-073557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12301',
internalId:  '',
customField: '20100302-003642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20100902-074318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20071217-143523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6501',
internalId:  '',
customField: '20091024-111716'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6522',
internalId:  '',
customField: '20100114-195003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6543',
internalId:  '',
customField: '20100114-195225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20080825-200605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '557',
internalId:  '',
customField: '20080217-131443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '578',
internalId:  '',
customField: '20080217-203616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '599',
internalId:  '',
customField: '20071218-130321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '620',
internalId:  '',
customField: '20080825-200729'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '641',
internalId:  '',
customField: '20071113-010748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '662',
internalId:  '',
customField: '20080825-200815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '683',
internalId:  '',
customField: '20080112-201354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '704',
internalId:  '',
customField: '20071113-010837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '725',
internalId:  '',
customField: '20071113-010853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '746',
internalId:  '',
customField: '20090903-190322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2001',
internalId:  '',
customField: '20080217-203343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3306',
internalId:  '',
customField: '20071112-224358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3301',
internalId:  '',
customField: '20071112-224358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15061',
internalId:  '',
customField: '20091019-125412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15117',
internalId:  '',
customField: '20090928-193849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15126',
internalId:  '',
customField: '20091019-125202'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15152',
internalId:  '',
customField: '20091019-124342'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15243',
internalId:  '',
customField: '20091015-140319'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INEXNX';
var companyName   = 'Ingrid+B.+Lacy+Middle+School+PTO';
var htmlTitle	  = 'Ingrid+B.+Lacy+Middle+School+PTO';
var metaKeywords  = 'Ingrid+B.+Lacy+Middle+School++PTO+Pacifica';
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();
};
