/* [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','46120',jdecode('Home'),jdecode(''),'/46120.html','true',[],''],
	['PAGE','2101',jdecode('Chamber'),jdecode(''),'/2101/index.html','true',[ 
		['PAGE','2152',jdecode('Chamber+Members'),jdecode(''),'/2101/2152.html','true',[],''],
		['PAGE','9409',jdecode('Benefits+%26+Join+Chamber'),jdecode(''),'/2101/9409.html','true',[],''],
		['PAGE','40720',jdecode('Newsletters'),jdecode(''),'/2101/40720.html','true',[],'']
	],''],
	['PAGE','2173',jdecode('Organizations'),jdecode(''),'/2173.html','true',[],''],
	['PAGE','11309',jdecode('Awards'),jdecode(''),'/11309.html','true',[],''],
	['PAGE','2194',jdecode('Schools'),jdecode(''),'/2194.html','true',[],''],
	['PAGE','23120',jdecode('Library'),jdecode(''),'/23120.html','true',[],''],
	['PAGE','19409',jdecode('Polo+Historical+Society'),jdecode(''),'/19409.html','true',[],''],
	['PAGE','2215',jdecode('Worship'),jdecode(''),'/2215.html','true',[],''],
	['PAGE','2236',jdecode('Calendar'),jdecode(''),'/2236.html','true',[],''],
	['PAGE','2257',jdecode('Dining'),jdecode(''),'/2257.html','true',[],''],
	['PAGE','2278',jdecode('City+Government'),jdecode(''),'/2278/index.html','true',[ 
		['PAGE','14409',jdecode('City+Clerk'),jdecode(''),'/2278/14409.html','true',[],''],
		['PAGE','14430',jdecode('Mayor%CA%BCs+Appointments'),jdecode(''),'/2278/14430.html','true',[],''],
		['PAGE','43941',jdecode('Agenda+%26++Minutes'),jdecode(''),'/2278/43941.html','true',[],''],
		['PAGE','15509',jdecode('City+Code'),jdecode(''),'/2278/15509.html','true',[],''],
		['PAGE','37720',jdecode('Polo+Police'),jdecode(''),'/2278/37720.html','true',[],''],
		['PAGE','34020',jdecode('FAQS'),jdecode(''),'/2278/34020.html','true',[],'']
	],''],
	['PAGE','2299',jdecode('Recreation'),jdecode(''),'/2299.html','true',[],''],
	['PAGE','2320',jdecode('Photos'),jdecode(''),'/2320.html','true',[],''],
	['PAGE','2341',jdecode('Contact'),jdecode(''),'/2341.html','true',[],'']];
var siteelementCount=23;
theSitetree.topTemplateName='Meadow';
theSitetree.paletteFamily='0000BB';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10473';
theSitetree.graphicsetId='10949';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='9FD796';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Meadow',
				paletteFamily: 	'0000BB',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10473',
				graphicsetId: 	'10949',
				contentColor: 	'000000',
				contentBGColor: '9FD796',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'6EC262',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2101',
internalId:  '',
customField: '20100420-115116'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2194',
internalId:  '',
customField: '20090109-122734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2215',
internalId:  '',
customField: '20100607-221340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2236',
internalId:  '',
customField: '20081216-005500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2278',
internalId:  '',
customField: '20100119-130658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2152',
internalId:  '',
customField: '20100630-185536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2299',
internalId:  '',
customField: '20100129-131715'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2173',
internalId:  '',
customField: '20100408-112152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2257',
internalId:  '',
customField: '20100129-131617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2320',
internalId:  '',
customField: '20081213-231457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2341',
internalId:  '',
customField: '20090104-164304'
};
webappMappings['7060']=webappMappings['7060-287ec30ba066f634d8d18e363a49308c']={
webappId:    '7060',
documentId:  '2320',
internalId:  '287ec30ba066f634d8d18e363a49308c',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9409',
internalId:  '',
customField: '20100519-172102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11309',
internalId:  '',
customField: '20100509-123901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14409',
internalId:  '',
customField: '20090913-174243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14430',
internalId:  '',
customField: '20100119-131316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15509',
internalId:  '',
customField: '20100521-113332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19409',
internalId:  '',
customField: '20090113-093746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23120',
internalId:  '',
customField: '20090204-223234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40720',
internalId:  '',
customField: '20100524-220714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34020',
internalId:  '',
customField: '20091124-164233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37720',
internalId:  '',
customField: '20100627-093918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46120',
internalId:  '',
customField: '20100729-104857'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43941',
internalId:  '',
customField: '20100729-120452'
};
var canonHostname = 'wsc1.brinkster.com';
var accountId     = 'ABR330INL1T1';
var companyName   = 'Welcome+to+Polo%2C+Illinois';
var htmlTitle	  = 'Welcome+to+Polo%2C+Illinois%21';
var metaKeywords  = 'Polo+Illinois+Northern+Illinois+Midwest+Area+Community+Theater+Historical+Society+School+Schools+Organizations+Recreation+Photos+Chamber+of+Commerce+Senior+Center+Town+Country+Economic+Development+PEDC+add+more+search+keywords+here';
var metaContents  = 'Welcome+to+Polo%2C+Illinois%21+The+objective+of+the+Polo+Chamber+of+Commerce+is+to+promote+the+economic%2C+civic%2C+social+and+moral+welfare+to+the+people+of+Polo.+The+Chamber+serves+as+a+source+of+information+of+and+for+our+community+representing+high+ideals.+';
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();
};
