/* [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','76',jdecode('Home'),jdecode(''),'/76/index.html','true',[ 
		['PAGE','3514',jdecode('Home+%28follow+up+page%29'),jdecode(''),'/76/3514.html','false',[],'']
	],''],
	['PAGE','1070',jdecode('Issue+No.+1'),jdecode(''),'/1070.html','true',[],''],
	['PAGE','3972',jdecode('Issue+No.+2'),jdecode(''),'/3972.html','true',[],''],
	['PAGE','4740',jdecode('Issue+No.+3'),jdecode(''),'/4740.html','true',[],''],
	['PAGE','5254',jdecode('Issue+No.+4'),jdecode(''),'/5254.html','true',[],''],
	['PAGE','5548',jdecode('Issue+No.+5'),jdecode(''),'/5548.html','true',[],''],
	['PAGE','5557',jdecode('Issue+No.+6'),jdecode(''),'/5557.html','true',[],''],
	['PAGE','8182',jdecode('Issue+No.+7'),jdecode(''),'/8182.html','true',[],''],
	['PAGE','10301',jdecode('Issue+No.+8'),jdecode(''),'/10301.html','true',[],''],
	['PAGE','214',jdecode('Armonk+Square'),jdecode(''),'/214/index.html','true',[ 
		['PAGE','3584',jdecode('Background'),jdecode(''),'/214/3584.html','true',[],''],
		['PAGE','3593',jdecode('Environmental+Review'),jdecode(''),'/214/3593.html','true',[],''],
		['PAGE','4571',jdecode('Town+Planner+Memo'),jdecode(''),'/214/4571.html','true',[],''],
		['PAGE','3602',jdecode('Impact+on+Historic+District'),jdecode(''),'/214/3602.html','true',[],''],
		['PAGE','3663',jdecode('Impact+on+Parking+%26+Traffic'),jdecode(''),'/214/3663.html','true',[],'']
	],''],
	['PAGE','2948',jdecode('Seven+Springs'),jdecode(''),'/2948.html','true',[],''],
	['PAGE','5726',jdecode('Dubos+Property'),jdecode(''),'/5726.html','true',[],''],
	['PAGE','5735',jdecode('Chestnut+Ridge+Property'),jdecode(''),'/5735/index.html','true',[ 
		['PAGE','5744',jdecode('Letter+from+Westmoreland+Sanctuary'),jdecode(''),'/5735/5744.html','true',[],''],
		['PAGE','5814',jdecode('Kazak+Letter+to+Town+Board'),jdecode(''),'/5735/5814.html','true',[],'']
	],''],
	['PAGE','205',jdecode('Take+a+Hike'),jdecode(''),'/205.html','true',[],''],
	['PAGE','115',jdecode('Contact'),jdecode(''),'/115/index.html','true',[ 
		['PAGE','3538',jdecode('Contact+%28follow+up+page%29'),jdecode(''),'/115/3538.html','false',[],'']
	],''],
	['PAGE','4387',jdecode('Links'),jdecode(''),'/4387.html','true',[],'']];
var siteelementCount=25;
theSitetree.topTemplateName='Billy';
theSitetree.paletteFamily='589955';
theSitetree.keyvisualId='7078';
theSitetree.keyvisualName='kv_7078.jpg';
theSitetree.fontsetId='16391';
theSitetree.graphicsetId='12123';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='589955';
var theTemplate={
				name: 			'Billy',
				paletteFamily: 	'589955',
				keyvisualId: 	'7078',
				keyvisualName: 	'kv_7078.jpg',
				fontsetId: 		'16391',
				graphicsetId: 	'12123',
				contentColor: 	'FFFFFF',
				contentBGColor: '589955',
				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: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1001']=webappMappings['1001-ahw050in3b2868067b7b72ecc26c']={
webappId:    '1001',
documentId:  '76',
internalId:  'ahw050in3b2868067b7b72ecc26c',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050in3b2868067b7b72ecc26c']={
webappId:    '1001',
documentId:  '3514',
internalId:  'ahw050in3b2868067b7b72ecc26c',
customField: 'followUp'
};
webappMappings['1001']=webappMappings['1001-ahw050in3b288eb8af983f1f1f9b']={
webappId:    '1001',
documentId:  '115',
internalId:  'ahw050in3b288eb8af983f1f1f9b',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050in3b288eb8af983f1f1f9b']={
webappId:    '1001',
documentId:  '3538',
internalId:  'ahw050in3b288eb8af983f1f1f9b',
customField: 'followUp'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '76',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76',
internalId:  '',
customField: '20081231-110413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5254',
internalId:  '',
customField: '20081231-110721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5726',
internalId:  '',
customField: '20090127-163536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '214',
internalId:  '',
customField: '20081231-111006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3514',
internalId:  '',
customField: '20070224-032329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1070',
internalId:  '',
customField: '20081231-110502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3972',
internalId:  '',
customField: '20081231-110557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4740',
internalId:  '',
customField: '20081231-110638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5548',
internalId:  '',
customField: '20081231-110800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5557',
internalId:  '',
customField: '20081231-110843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3584',
internalId:  '',
customField: '20081231-111046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3593',
internalId:  '',
customField: '20081231-111124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4571',
internalId:  '',
customField: '20070312-224609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3602',
internalId:  '',
customField: '20081231-111215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3663',
internalId:  '',
customField: '20081231-111251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2948',
internalId:  '',
customField: '20081231-111332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5735',
internalId:  '',
customField: '20080326-015051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5744',
internalId:  '',
customField: '20080410-022658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8182',
internalId:  '',
customField: '20081231-110919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5814',
internalId:  '',
customField: '20080326-015402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '205',
internalId:  '',
customField: '20081231-111540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115',
internalId:  '',
customField: '20070224-033922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3538',
internalId:  '',
customField: '20070224-033829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4387',
internalId:  '',
customField: '20081215-201546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10301',
internalId:  '',
customField: '20090603-193955'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050IN3B28';
var companyName   = 'The+Open+Space+Advocate+Newsletter';
var htmlTitle	  = '';
var metaKeywords  = 'open+space+advocate+north+castle+armonk+square+armonk+seven+springs';
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();
};

