/* [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','5901',jdecode('HOME'),jdecode(''),'/5901.html','true',[],'',''],
	['PAGE','26712',jdecode('NOTICES'),jdecode(''),'/26712.html','true',[],'',''],
	['PAGE','7001',jdecode('CALENDER'),jdecode(''),'/7001.html','true',[],'',''],
	['PAGE','7022',jdecode('DEPARTMENTS'),jdecode(''),'/7022/index.html','true',[ 
		['PAGE','92516',jdecode('Airport+Fees'),jdecode(''),'/7022/92516.html','false',[],'',''],
		['PAGE','21012',jdecode('Administration'),jdecode(''),'/7022/21012.html','false',[],'',''],
		['PAGE','26912',jdecode('Fees'),jdecode(''),'/7022/26912.html','false',[],'',''],
		['PAGE','19812',jdecode('Central+Maine+Regional+Airport'),jdecode(''),'/7022/19812.html','false',[],'',''],
		['PAGE','28412',jdecode('About+Us'),jdecode(''),'/7022/28412.html','false',[],'',''],
		['PAGE','28433',jdecode('Services'),jdecode(''),'/7022/28433.html','false',[],'',''],
		['PAGE','28454',jdecode('Contact+Us'),jdecode(''),'/7022/28454.html','false',[],'',''],
		['PAGE','28475',jdecode('Projects'),jdecode(''),'/7022/28475.html','false',[],'',''],
		['PAGE','28496',jdecode('Links'),jdecode(''),'/7022/28496.html','false',[],'',''],
		['PAGE','44379',jdecode('Airport+Photos'),jdecode(''),'/7022/44379.html','false',[],'',''],
		['PAGE','54590',jdecode('What%26%23x27%3Bs+Happening+at+CMRA'),jdecode(''),'/7022/54590.html','false',[],'',''],
		['PAGE','21412',jdecode('Animal+Control'),jdecode(''),'/7022/21412.html','false',[],'',''],
		['PAGE','36212',jdecode('Assessing'),jdecode(''),'/7022/36212.html','false',[],'',''],
		['PAGE','21433',jdecode('Codes+Enforcement'),jdecode(''),'/7022/21433.html','false',[],'',''],
		['PAGE','19833',jdecode('Fire+Department'),jdecode(''),'/7022/19833.html','false',[],'',''],
		['PAGE','47179',jdecode('Members+'),jdecode(''),'/7022/47179.html','false',[],'',''],
		['PAGE','60690',jdecode('History'),jdecode(''),'/7022/60690.html','false',[],'',''],
		['PAGE','58890',jdecode('Links'),jdecode(''),'/7022/58890.html','false',[],'',''],
		['PAGE','58911',jdecode('News'),jdecode(''),'/7022/58911.html','false',[],'',''],
		['PAGE','60711',jdecode('Fire+Calls'),jdecode(''),'/7022/60711.html','false',[],'',''],
		['PAGE','60732',jdecode('File+of+Life+Forms'),jdecode(''),'/7022/60732.html','false',[],'',''],
		['PAGE','46779',jdecode('Fire+Permit+Information'),jdecode(''),'/7022/46779.html','false',[],'',''],
		['PAGE','22912',jdecode('General+Assistance'),jdecode(''),'/7022/22912.html','false',[],'',''],
		['PAGE','19854',jdecode('Library'),jdecode(''),'/7022/19854.html','true',[],'',''],
		['PAGE','91916',jdecode('Library+Fees'),jdecode(''),'/7022/91916.html','true',[],'',''],
		['PAGE','19875',jdecode('Public+Works+Department'),jdecode(''),'/7022/19875.html','false',[],'',''],
		['PAGE','19896',jdecode('Recreation+Department'),jdecode(''),'/7022/19896.html','false',[],'',''],
		['PAGE','139516',jdecode('Agenda%26%23x27%3Bs'),jdecode(''),'/7022/139516.html','true',[],'',''],
		['PAGE','139537',jdecode('Minutes'),jdecode(''),'/7022/139537.html','true',[],'',''],
		['PAGE','19917',jdecode('Sewer+Department'),jdecode(''),'/7022/19917.html','false',[],'','']
	],'',''],
	['PAGE','7043',jdecode('BOARDS+AND+COMMITTEES'),jdecode(''),'/7043/index.html','true',[ 
		['PAGE','19938',jdecode('Assessing'),jdecode(''),'/7043/19938.html','false',[],'',''],
		['PAGE','94616',jdecode('Assessing+Agendas'),jdecode(''),'/7043/94616.html','true',[],'',''],
		['PAGE','95316',jdecode('Assessing+Minutes'),jdecode(''),'/7043/95316.html','true',[],'',''],
		['PAGE','20212',jdecode('Budget+Committee'),jdecode(''),'/7043/20212.html','false',[],'',''],
		['PAGE','140116',jdecode('Budget+Committee+Agenda%26%23x27%3Bs'),jdecode(''),'/7043/140116.html','true',[],'',''],
		['PAGE','140137',jdecode('Budget+Committee+Minutes'),jdecode(''),'/7043/140137.html','true',[],'',''],
		['PAGE','20233',jdecode('Planning+Board'),jdecode(''),'/7043/20233.html','false',[],'',''],
		['PAGE','19959',jdecode('Selectmen'),jdecode(''),'/7043/19959.html','false',[],'',''],
		['PAGE','32612',jdecode('Selectmen+Agendas'),jdecode(''),'/7043/32612.html','true',[],'',''],
		['PAGE','32633',jdecode('Selectmen+Minutes'),jdecode(''),'/7043/32633.html','true',[],'',''],
		['PAGE','86816',jdecode('Road+Plan+Committee'),jdecode(''),'/7043/86816.html','false',[],'',''],
		['PAGE','87116',jdecode('Road+Plan+Agendas'),jdecode(''),'/7043/87116.html','true',[],'',''],
		['PAGE','87137',jdecode('Road+Plan+Minutes'),jdecode(''),'/7043/87137.html','true',[],'','']
	],'',''],
	['PAGE','13001',jdecode('LINKS'),jdecode(''),'/13001.html','true',[],'',''],
	['PAGE','16701',jdecode('SPECIAL+EVENTS'),jdecode(''),'/16701/index.html','true',[ 
		['PAGE','165638',jdecode('Oosoola+Days+2010'),jdecode(''),'/16701/165638.html','true',[],'','']
	],'',''],
	['PAGE','31812',jdecode('PHOTOS'),jdecode(''),'/31812/index.html','true',[ 
		['PAGE','123616',jdecode('The+Bridge'),jdecode(''),'/31812/123616.html','true',[],'',''],
		['PAGE','142216',jdecode('Sandy+River+Road'),jdecode(''),'/31812/142216.html','true',[],'',''],
		['PAGE','156638',jdecode('2010+Fly-In'),jdecode(''),'/31812/156638.html','true',[],'',''],
		['PAGE','165659',jdecode('Oosoola+Days+2010'),jdecode(''),'/31812/165659.html','true',[],'','']
	],'',''],
	['PAGE','143616',jdecode('EMPLOYMENT%2FVOLUNTEER+OPPORTUNITIES'),jdecode(''),'/143616.html','true',[],'',''],
	['PAGE','74090',jdecode('Town+Election+2010'),jdecode(''),'/74090.html','false',[],'',''],
	['PAGE','135216',jdecode('Basement+Mold+Cleanup'),jdecode(''),'/135216.html','false',[],'','']];
var siteelementCount=59;
theSitetree.topTemplateName='Ornaments';
theSitetree.paletteFamily='9B5353';
theSitetree.keyvisualId='3901';
theSitetree.keyvisualName='kv_3901.jpg';
theSitetree.fontsetId='10493';
theSitetree.graphicsetId='11074';
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: 			'Ornaments',
				paletteFamily: 	'9B5353',
				keyvisualId: 	'3901',
				keyvisualName: 	'kv_3901.jpg',
				fontsetId: 		'10493',
				graphicsetId: 	'11074',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'887248',
				e_color: 		'887248',
				f_color: 		'887248',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5901',
internalId:  '',
customField: '20100825-122817'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7001',
internalId:  '',
customField: '20100825-100114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7022',
internalId:  '',
customField: '20100512-115555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7043',
internalId:  '',
customField: '20100712-152428'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13001',
internalId:  '',
customField: '20091228-140700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16701',
internalId:  '',
customField: '20091228-160711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19812',
internalId:  '',
customField: '20100811-134235'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19833',
internalId:  '',
customField: '20100508-131606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19854',
internalId:  '',
customField: '20100825-090501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19875',
internalId:  '',
customField: '20090915-225017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19896',
internalId:  '',
customField: '20100830-161836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19917',
internalId:  '',
customField: '20100310-160154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19938',
internalId:  '',
customField: '20100420-165932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19959',
internalId:  '',
customField: '20100310-152534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20212',
internalId:  '',
customField: '20100713-090515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20233',
internalId:  '',
customField: '20100310-153512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21012',
internalId:  '',
customField: '20100805-152854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21412',
internalId:  '',
customField: '20100405-114717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21433',
internalId:  '',
customField: '20090915-161132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22912',
internalId:  '',
customField: '20090915-230809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26712',
internalId:  '',
customField: '20100729-112922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26912',
internalId:  '',
customField: '20100408-155610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28412',
internalId:  '',
customField: '20091113-113822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28433',
internalId:  '',
customField: '20091020-103007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28454',
internalId:  '',
customField: '20091113-113957'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28475',
internalId:  '',
customField: '20091020-103007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28496',
internalId:  '',
customField: '20091113-121446'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31812',
internalId:  '',
customField: '20100514-100413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32612',
internalId:  '',
customField: '20100827-102055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32633',
internalId:  '',
customField: '20100819-112700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74090',
internalId:  '',
customField: '20100305-135350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36212',
internalId:  '',
customField: '20091029-172656'
};
webappMappings['7060']=webappMappings['7060-5d6353019c2085c371de896341264b2b']={
webappId:    '7060',
documentId:  '31812',
internalId:  '5d6353019c2085c371de896341264b2b',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-55a9e671e6dd2e9e9fa8b175222d0125']={
webappId:    '7060',
documentId:  '44379',
internalId:  '55a9e671e6dd2e9e9fa8b175222d0125',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44379',
internalId:  '',
customField: '20091113-102831'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46779',
internalId:  '',
customField: '20091226-140600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47179',
internalId:  '',
customField: '20100312-153132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54590',
internalId:  '',
customField: '20100816-113502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58911',
internalId:  '',
customField: '20100307-210151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58890',
internalId:  '',
customField: '20091227-170552'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60690',
internalId:  '',
customField: '20091228-185911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60711',
internalId:  '',
customField: '20100508-131059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60732',
internalId:  '',
customField: '20091228-190345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86816',
internalId:  '',
customField: '20100319-093355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87116',
internalId:  '',
customField: '20100823-161522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87137',
internalId:  '',
customField: '20100319-093216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91916',
internalId:  '',
customField: '20100409-090923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92516',
internalId:  '',
customField: '20100409-092209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94616',
internalId:  '',
customField: '20100420-143012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95316',
internalId:  '',
customField: '20100423-161932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '123616',
internalId:  '',
customField: '20100514-100346'
};
webappMappings['7060']=webappMappings['7060-bba614f43e474d289722b4fe0dae8842']={
webappId:    '7060',
documentId:  '135216',
internalId:  'bba614f43e474d289722b4fe0dae8842',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '135216',
internalId:  '',
customField: '20100629-114749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '139516',
internalId:  '',
customField: '20100823-143042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '139537',
internalId:  '',
customField: '20100729-152038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '140116',
internalId:  '',
customField: '20100712-165509'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '140137',
internalId:  '',
customField: '20100712-161451'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '142216',
internalId:  '',
customField: '20100714-164952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '143616',
internalId:  '',
customField: '20100830-161718'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '165638',
internalId:  '',
customField: '20100908-125239'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '156638',
internalId:  '',
customField: '20100816-120818'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '165659',
internalId:  '',
customField: '20100908-122907'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0IN3BOS';
var companyName   = 'Town+of+Norridgewock';
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();
};
