/* [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','46120',jdecode('Home'),jdecode(''), jdecode('%2F46120.html'), 'true',[],'',''],
	['PAGE','2101',jdecode('Chamber'),jdecode(''), jdecode('%2F2101%2Findex.html'), 'true',[ 
		['PAGE','2152',jdecode('Chamber+Members'),jdecode(''), jdecode('%2F2101%2F2152.html'), 'true',[],'',''],
		['PAGE','9409',jdecode('Benefits+%26+Join+Chamber'),jdecode(''), jdecode('%2F2101%2F9409.html'), 'true',[],'',''],
		['PAGE','40720',jdecode('Newsletters'),jdecode(''), jdecode('%2F2101%2F40720.html'), 'true',[],'','']
	],'',''],
	['PAGE','2173',jdecode('Organizations'),jdecode(''), jdecode('%2F2173.html'), 'true',[],'',''],
	['PAGE','11309',jdecode('Awards'),jdecode(''), jdecode('%2F11309.html'), 'true',[],'',''],
	['PAGE','2194',jdecode('Schools'),jdecode(''), jdecode('%2F2194.html'), 'true',[],'',''],
	['PAGE','23120',jdecode('Library'),jdecode(''), jdecode('%2F23120.html'), 'true',[],'',''],
	['PAGE','19409',jdecode('Polo+Historical+Society'),jdecode(''), jdecode('%2F19409.html'), 'true',[],'',''],
	['PAGE','2215',jdecode('Worship'),jdecode(''), jdecode('%2F2215.html'), 'true',[],'',''],
	['PAGE','2236',jdecode('Calendar'),jdecode(''), jdecode('%2F2236.html'), 'true',[],'',''],
	['PAGE','2257',jdecode('Dining'),jdecode(''), jdecode('%2F2257.html'), 'true',[],'',''],
	['PAGE','2278',jdecode('City+Government'),jdecode(''), jdecode('%2F2278%2Findex.html'), 'true',[ 
		['PAGE','14409',jdecode('City+Clerk'),jdecode(''), jdecode('%2F2278%2F14409.html'), 'true',[],'',''],
		['PAGE','14430',jdecode('Mayor%CA%BCs+Appointments'),jdecode(''), jdecode('%2F2278%2F14430.html'), 'true',[],'',''],
		['PAGE','43941',jdecode('Agenda+%26++Minutes'),jdecode(''), jdecode('%2F2278%2F43941.html'), 'true',[],'',''],
		['PAGE','15509',jdecode('City+Code'),jdecode(''), jdecode('%2F2278%2F15509.html'), 'true',[],'',''],
		['PAGE','37720',jdecode('Polo+Police'),jdecode(''), jdecode('%2F2278%2F37720.html'), 'true',[],'',''],
		['PAGE','34020',jdecode('FAQS'),jdecode(''), jdecode('%2F2278%2F34020.html'), 'true',[],'','']
	],'',''],
	['PAGE','96420',jdecode('Municipal+Aggregation'),jdecode(''), jdecode('%2F96420.html'), 'true',[],'',''],
	['PAGE','2299',jdecode('Recreation'),jdecode(''), jdecode('%2F2299.html'), 'true',[],'',''],
	['PAGE','2320',jdecode('Photos'),jdecode(''), jdecode('%2F2320.html'), 'true',[],'',''],
	['PAGE','2341',jdecode('Contact'),jdecode(''), jdecode('%2F2341.html'), 'true',[],'','']];
var siteelementCount=24;
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 prodDef={
  wl_name: 'brinkster',
  product: 'WSCSYSSSSLYTCVUO'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Meadow',
				paletteFamily: 	'0000BB',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10473',
				graphicsetId: 	'10949',
				contentColor: 	'000000',
				contentBGColor: '9FD796',
				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: '20111005-093156'
};
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: '20110503-155759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2152',
internalId:  '',
customField: '20120119-140426'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2299',
internalId:  '',
customField: '20100129-131715'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2173',
internalId:  '',
customField: '20120116-160954'
};
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: '20110409-130116'
};
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: '20110407-114210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11309',
internalId:  '',
customField: '20111005-093622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14409',
internalId:  '',
customField: '20090913-174243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14430',
internalId:  '',
customField: '20110503-160712'
};
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: '20120128-142149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34020',
internalId:  '',
customField: '20091124-164233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37720',
internalId:  '',
customField: '20110213-122416'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46120',
internalId:  '',
customField: '20120205-160007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96420',
internalId:  '',
customField: '20110822-122706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43941',
internalId:  '',
customField: '20120202-095218'
};
var webAppHostname = 'wsc.brinkster.com:80';
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();
};

