/* [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','2512',jdecode('Home'),jdecode(''), jdecode('%2F2512.html'), 'true',[],'',''],
	['PAGE','62949',jdecode('NYSUT+Benefits'),jdecode(''), jdecode('%2F62949.html'), 'true',[],'',''],
	['PAGE','4154',jdecode('Community'),jdecode(''), jdecode('%2F4154.html'), 'true',[],'',''],
	['PAGE','27712',jdecode('Calendar+'),jdecode(''), jdecode('%2F27712.html'), 'false',[],'',''],
	['PAGE','4175',jdecode('About+Us'),jdecode(''), jdecode('%2F4175.html'), 'true',[],'',''],
	['PAGE','4196',jdecode('Contact'),jdecode(''), jdecode('%2F4196%2Findex.html'), 'false',[ 
		['PAGE','28112',jdecode(''),jdecode(''), jdecode('%2F4196%2F28112.html'), 'true',[],'',''],
		['PAGE','28133',jdecode(''),jdecode(''), jdecode('%2F4196%2F28133.html'), 'true',[],'','']
	],'',''],
	['PAGE','4217',jdecode('Welfare+Fund'),jdecode(''), jdecode('%2F4217%2Findex.html'), 'true',[ 
		['PAGE','89756',jdecode('Benefits+at+a+Glance++2011-2012'),jdecode(''), jdecode('%2F4217%2F89756.html'), 'true',[],'',''],
		['PAGE','4112',jdecode('Welfare+Fund+Newsletter'),jdecode(''), jdecode('%2F4217%2F4112.html'), 'true',[],'',''],
		['PAGE','58598',jdecode('Teacher+Legal+Fund'),jdecode(''), jdecode('%2F4217%2F58598.html'), 'true',[],'','']
	],'',''],
	['PAGE','62487',jdecode('District+Forms'),jdecode(''), jdecode('%2F62487.html'), 'true',[],'',''],
	['PAGE','4238',jdecode('Meeting+Dates'),jdecode(''), jdecode('%2F4238.html'), 'true',[],'',''],
	['PAGE','4612',jdecode('Volunteer+Check+List'),jdecode(''), jdecode('%2F4612.html'), 'false',[],'',''],
	['PAGE','5217',jdecode('Guestbook'),jdecode(''), jdecode('%2F5217%2Findex.html'), 'true',[ 
		['PAGE','5212',jdecode('Read+Guestbook'),jdecode(''), jdecode('%2F5217%2F5212.html'), 'true',[],'','']
	],'',''],
	['PAGE','7812',jdecode('Pictures'),jdecode(''), jdecode('%2F7812.html'), 'true',[],'',''],
	['PAGE','10212',jdecode('Teacher%2F+Month+Arch'),jdecode(''), jdecode('%2F10212.html'), 'false',[],'',''],
	['PAGE','21412',jdecode('In+Memoriam'),jdecode(''), jdecode('%2F21412.html'), 'true',[],'',''],
	['PAGE','35112',jdecode('What+do+you+make%3F'),jdecode(''), jdecode('%2F35112.html'), 'false',[],'',''],
	['PAGE','36812',jdecode('NEWS%21%21'),jdecode(''), jdecode('%2F36812.html'), 'false',[],'',''],
	['PAGE','39612',jdecode('Building+News+%26+Events'),jdecode(''), jdecode('%2F39612%2Findex.html'), 'false',[ 
		['PAGE','39633',jdecode('JFK'),jdecode(''), jdecode('%2F39612%2F39633.html'), 'true',[],'',''],
		['PAGE','39654',jdecode('GSS'),jdecode(''), jdecode('%2F39612%2F39654.html'), 'true',[],'',''],
		['PAGE','39675',jdecode('Middle+School'),jdecode(''), jdecode('%2F39612%2F39675.html'), 'true',[],'','']
	],'',''],
	['PAGE','47212',jdecode('The+Edge++%28NEW%21%29'),jdecode(''), jdecode('%2F47212.html'), 'false',[],'',''],
	['PAGE','50112',jdecode('RA+Report'),jdecode(''), jdecode('%2F50112.html'), 'false',[],'',''],
	['PAGE','52612',jdecode('Nysut+Srp+Newsletter'),jdecode(''), jdecode('%2F52612.html'), 'false',[],'',''],
	['PAGE','54512',jdecode('Certification+Check'),jdecode(''), jdecode('%2F54512.html'), 'true',[],'',''],
	['PAGE','59131',jdecode('District+Phone+%23%26%23x27%3Bs'),jdecode(''), jdecode('%2F59131.html'), 'true',[],'',''],
	['PAGE','59509',jdecode('Weather+Alerts%21'),jdecode(''), jdecode('%2F59509.html'), 'false',[],'',''],
	['PAGE','59761',jdecode('CLEANING+YOUR+SCREEN'),jdecode(''), jdecode('%2F59761.html'), 'false',[],'',''],
	['PAGE','60897',jdecode('Careers+in+Ed'),jdecode(''), jdecode('%2F60897.html'), 'true',[],'',''],
	['PAGE','76323',jdecode('Questions%3F+Email+us.'),jdecode(''), jdecode('%2F76323.html'), 'false',[],'',''],
	['PAGE','85556',jdecode('Keep+the+heat+on+members+of+Legislature+to+%22do+their+part%22'),jdecode(''), jdecode('%2F85556.html'), 'true',[],'','']];
var siteelementCount=36;
theSitetree.topTemplateName='Enjoy';
theSitetree.paletteFamily='378927';
theSitetree.keyvisualId='2238';
theSitetree.keyvisualName='jugendherbergen4.jpg';
theSitetree.fontsetId='364';
theSitetree.graphicsetId='416';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='378927';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'valueweb',
  product: 'WSCSYSSSSLYTCR7V'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Enjoy',
				paletteFamily: 	'378927',
				keyvisualId: 	'2238',
				keyvisualName: 	'jugendherbergen4.jpg',
				fontsetId: 		'364',
				graphicsetId: 	'416',
				contentColor: 	'FFFFFF',
				contentBGColor: '378927',
				a_color: 		'378927',
				b_color: 		'FFFFFF',
				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:  '4154',
internalId:  '',
customField: '20111022-122052'
};
webappMappings['1002']=webappMappings['1002-5217AHW050INXE4C']={
webappId:    '1002',
documentId:  '5217',
internalId:  '5217AHW050INXE4C',
customField: 'icq=false'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2512',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89756',
internalId:  '',
customField: '20110504-115551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2512',
internalId:  '',
customField: '20111022-122001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27712',
internalId:  '',
customField: '20081215-082525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4175',
internalId:  '',
customField: '20111104-115334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4196',
internalId:  '',
customField: '20090907-070240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28112',
internalId:  '',
customField: '20070904-122315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28133',
internalId:  '',
customField: '20070904-122315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4217',
internalId:  '',
customField: '20120123-171747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4112',
internalId:  '',
customField: '20100819-061336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4238',
internalId:  '',
customField: '20090111-152246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4612',
internalId:  '',
customField: '20090111-152426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5217',
internalId:  '',
customField: '20070720-142517'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5212',
internalId:  '',
customField: '20070815-153840'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7812',
internalId:  '',
customField: '20081112-185151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10212',
internalId:  '',
customField: '20070816-172812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21412',
internalId:  '',
customField: '20111027-120103'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59131',
internalId:  '',
customField: '20111103-141322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35112',
internalId:  '',
customField: '20080501-161923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36812',
internalId:  '',
customField: '20071125-082044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39612',
internalId:  '',
customField: '20071101-091519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39633',
internalId:  '',
customField: '20071101-091519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39654',
internalId:  '',
customField: '20071101-091519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39675',
internalId:  '',
customField: '20080807-080436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47212',
internalId:  '',
customField: '20090413-164514'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50112',
internalId:  '',
customField: '20080416-194831'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52612',
internalId:  '',
customField: '20090513-095653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54512',
internalId:  '',
customField: '20111022-122240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59509',
internalId:  '',
customField: '20090302-140115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58598',
internalId:  '',
customField: '20111022-122125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59761',
internalId:  '',
customField: '20090224-081023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60897',
internalId:  '',
customField: '20090424-095521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76323',
internalId:  '',
customField: '20100420-123833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62487',
internalId:  '',
customField: '20111022-122217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62949',
internalId:  '',
customField: '20111022-121936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85556',
internalId:  '',
customField: '20100911-073302'
};
webappMappings['7008']=webappMappings['7008-7640']={
webappId:    '7008',
documentId:  '76323',
internalId:  '7640',
customField: 'language:en;country:US;'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INXE4C';
var companyName   = 'BREWSTER+TEACHERS%27+ASSOCIATION+';
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();
};

