/* [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','84',jdecode('Home'),jdecode(''), jdecode('%2F84.html'), 'true',[],'',''],
	['PAGE','10915',jdecode('News'),jdecode(''), jdecode('%2F10915.html'), 'true',[],'',''],
	['PAGE','474',jdecode('About+the+Council'),jdecode(''), jdecode('%2F474.html'), 'true',[],'',''],
	['PAGE','114',jdecode('Council+Meetings'),jdecode(''), jdecode('%2F114%2Findex.html'), 'true',[ 
		['PAGE','13959',jdecode('Minutes+archive'),jdecode(''), jdecode('%2F114%2F13959.html'), 'true',[],'','']
	],'',''],
	['PAGE','60001',jdecode('2011%2F12+budget'),jdecode(''), jdecode('%2F60001%2Findex.html'), 'true',[ 
		['PAGE','8156',jdecode('Grant+funding'),jdecode(''), jdecode('%2F60001%2F8156.html'), 'true',[],'','']
	],'',''],
	['PAGE','15461',jdecode('Neighbourhood+Action'),jdecode(''), jdecode('%2F15461%2Findex.html'), 'true',[ 
		['PAGE','43801',jdecode('NAG+archive'),jdecode(''), jdecode('%2F15461%2F43801.html'), 'true',[],'','']
	],'',''],
	['PAGE','3203',jdecode('New+Parish+Projects'),jdecode(''), jdecode('%2F3203.html'), 'true',[],'',''],
	['PAGE','107001',jdecode('Parish+Fete'),jdecode(''), jdecode('%2F107001.html'), 'true',[],'',''],
	['PAGE','33301',jdecode('Parish+Policies'),jdecode(''), jdecode('%2F33301.html'), 'true',[],'',''],
	['PAGE','15145',jdecode('Parish+Allotments'),jdecode(''), jdecode('%2F15145.html'), 'true',[],'',''],
	['PAGE','14255',jdecode('Law+and+order'),jdecode(''), jdecode('%2F14255%2Findex.html'), 'true',[ 
		['PAGE','7532',jdecode('Home+security'),jdecode(''), jdecode('%2F14255%2F7532.html'), 'true',[],'',''],
		['PAGE','75101',jdecode('police+information'),jdecode(''), jdecode('%2F14255%2F75101.html'), 'true',[],'',''],
		['PAGE','11225',jdecode('Cell+phone+security'),jdecode(''), jdecode('%2F14255%2F11225.html'), 'true',[],'',''],
		['PAGE','14264',jdecode('Stop+%26+Search'),jdecode(''), jdecode('%2F14255%2F14264.html'), 'true',[],'',''],
		['PAGE','11489',jdecode('Don%26%23x27%3Bt+be+caught+out'),jdecode(''), jdecode('%2F14255%2F11489.html'), 'true',[],'','']
	],'',''],
	['PAGE','7422',jdecode('Where+are+we%3F'),jdecode(''), jdecode('%2F7422.html'), 'true',[],'',''],
	['PAGE','45301',jdecode('iNFACT+newsletter'),jdecode(''), jdecode('%2F45301.html'), 'true',[],'',''],
	['PAGE','483',jdecode('Community+Info.'),jdecode(''), jdecode('%2F483%2Findex.html'), 'true',[ 
		['PAGE','3424',jdecode('coming+to+live+here%3F'),jdecode(''), jdecode('%2F483%2F3424.html'), 'true',[],'',''],
		['PAGE','7331',jdecode('community+events'),jdecode(''), jdecode('%2F483%2F7331.html'), 'true',[],'',''],
		['PAGE','8249',jdecode('charity+organisations'),jdecode(''), jdecode('%2F483%2F8249.html'), 'true',[],'',''],
		['PAGE','8505',jdecode('dispose+of+furniture+etc'),jdecode(''), jdecode('%2F483%2F8505.html'), 'true',[],'','']
	],'',''],
	['PAGE','2729',jdecode('Youth+Matters'),jdecode(''), jdecode('%2F2729.html'), 'true',[],'',''],
	['PAGE','37401',jdecode('Parents+%26+Carers'),jdecode(''), jdecode('%2F37401.html'), 'true',[],'',''],
	['PAGE','57101',jdecode('Commerce+%26+trade'),jdecode(''), jdecode('%2F57101%2Findex.html'), 'true',[ 
		['PAGE','57322',jdecode('Kingston'),jdecode(''), jdecode('%2F57101%2F57322.html'), 'true',[],'',''],
		['PAGE','57343',jdecode('Brinklow'),jdecode(''), jdecode('%2F57101%2F57343.html'), 'true',[],'',''],
		['PAGE','57364',jdecode('Home+businesses'),jdecode(''), jdecode('%2F57101%2F57364.html'), 'true',[],'','']
	],'',''],
	['PAGE','15968',jdecode('Transport'),jdecode(''), jdecode('%2F15968.html'), 'true',[],'',''],
	['PAGE','734',jdecode('Contact+Us'),jdecode(''), jdecode('%2F734%2Findex.html'), 'true',[ 
		['PAGE','974',jdecode('Contact+Us+%28follow+up+page%29'),jdecode(''), jdecode('%2F734%2F974.html'), 'false',[],'',''],
		['PAGE','2410',jdecode('Parish+Councillors'),jdecode(''), jdecode('%2F734%2F2410.html'), 'true',[],'','']
	],'',''],
	['PAGE','2564',jdecode('Maps'),jdecode(''), jdecode('%2F2564.html'), 'true',[],'',''],
	['PAGE','15003',jdecode('Guestbook'),jdecode(''), jdecode('%2F15003%2Findex.html'), 'true',[ 
		['PAGE','15002',jdecode('Read+Guestbook'),jdecode(''), jdecode('%2F15003%2F15002.html'), 'false',[],'','']
	],'',''],
	['PAGE','15214',jdecode('Parish+pictures'),jdecode(''), jdecode('%2F15214.html'), 'true',[],'','']];
var siteelementCount=40;
theSitetree.topTemplateName='Welcome';
theSitetree.paletteFamily='990000';
theSitetree.keyvisualId='9178';
theSitetree.keyvisualName='kv_9178.jpg';
theSitetree.fontsetId='10364';
theSitetree.graphicsetId='10524';
theSitetree.contentColor='DDDDDD';
theSitetree.contentBGColor='AC0A16';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'hostway',
  product: 'WSCSYSSSSLYTC245'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Welcome',
				paletteFamily: 	'990000',
				keyvisualId: 	'9178',
				keyvisualName: 	'kv_9178.jpg',
				fontsetId: 		'10364',
				graphicsetId: 	'10524',
				contentColor: 	'DDDDDD',
				contentBGColor: 'AC0A16',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'D6AAAA',
				e_color: 		'DC6C70',
				f_color: 		'68070E',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43801',
internalId:  '',
customField: '20110428-074012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84',
internalId:  '',
customField: '20120112-072145'
};
webappMappings['1002']=webappMappings['1002-15003AHW050INXX83']={
webappId:    '1002',
documentId:  '15003',
internalId:  '15003AHW050INXX83',
customField: 'icq=false'
};
webappMappings['7060']=webappMappings['7060-92061c6b96477d7aee4775575870125b']={
webappId:    '7060',
documentId:  '15214',
internalId:  '92061c6b96477d7aee4775575870125b',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10915',
internalId:  '',
customField: '20111210-082518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '474',
internalId:  '',
customField: '20111209-092041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '114',
internalId:  '',
customField: '20120112-072349'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13959',
internalId:  '',
customField: '20110428-071739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75101',
internalId:  '',
customField: '20111209-093937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8156',
internalId:  '',
customField: '20091027-055724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15461',
internalId:  '',
customField: '20110523-053712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3203',
internalId:  '',
customField: '20110428-074327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15145',
internalId:  '',
customField: '20111209-093645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14255',
internalId:  '',
customField: '20110428-074706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7532',
internalId:  '',
customField: '20070801-103639'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11225',
internalId:  '',
customField: '20070723-145744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14264',
internalId:  '',
customField: '20070801-103707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11489',
internalId:  '',
customField: '20070723-145938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7422',
internalId:  '',
customField: '20111209-094750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '483',
internalId:  '',
customField: '20120110-060143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3424',
internalId:  '',
customField: '20081205-140637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7331',
internalId:  '',
customField: '20101219-045200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8249',
internalId:  '',
customField: '20070723-151140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8505',
internalId:  '',
customField: '20111209-091031'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2729',
internalId:  '',
customField: '20111209-100754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '107001',
internalId:  '',
customField: '20111209-092847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15968',
internalId:  '',
customField: '20111209-101052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '734',
internalId:  '',
customField: '20081115-100418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '974',
internalId:  '',
customField: '20060109-010847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2410',
internalId:  '',
customField: '20110512-131153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2564',
internalId:  '',
customField: '20110215-074721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15003',
internalId:  '',
customField: '20071025-145530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15002',
internalId:  '',
customField: '20071017-105452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15214',
internalId:  '',
customField: '20090223-082147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33301',
internalId:  '',
customField: '20110215-075408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37401',
internalId:  '',
customField: '20111209-100934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57101',
internalId:  '',
customField: '20090323-141308'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45301',
internalId:  '',
customField: '20111209-094849'
};
webappMappings['7008']=webappMappings['7008-7901']={
webappId:    '7008',
documentId:  '734',
internalId:  '7901',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57322',
internalId:  '',
customField: '20090323-141010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57343',
internalId:  '',
customField: '20090323-141010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60001',
internalId:  '',
customField: '20110428-072153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57364',
internalId:  '',
customField: '20090328-091602'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INXX83';
var companyName   = 'Kents+Hill+%26+Monkston+Parish+Council';
var htmlTitle	  = 'Kents+Hill+and+Monkston+Parish+Council';
var metaKeywords  = 'parish+council+Kents+Hill+Monkston+Park+meetings+Milton+Keynes+eastern+flank+local+community+information+chaffron+way+standing+way+brickhill+street+tongwell+street+v10+v11+h7+h8+bucks+buckinghamshire+balc+nalc';
var metaContents  = 'Website+for+Kents+Hill+and+Monkston+Parish+Council%2C+in+Milton+Keynes%2C+UK';
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();
};

