/* [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','168604',jdecode('Whats+New'),jdecode(''), jdecode('%2F168604.html'), 'true',[],'',''],
	['PAGE','652',jdecode('About+Us'),jdecode(''), jdecode('%2F652.html'), 'true',[],'',''],
	['PAGE','715',jdecode('Board+of+Directors'),jdecode(''), jdecode('%2F715.html'), 'true',[],'',''],
	['PAGE','52843',jdecode('Advisory+Council'),jdecode(''), jdecode('%2F52843.html'), 'true',[],'',''],
	['PAGE','63943',jdecode('Awards+and+Honors'),jdecode(''), jdecode('%2F63943.html'), 'true',[],'',''],
	['PAGE','175804',jdecode('Past+Events%3A+This+Year'),jdecode(''), jdecode('%2F175804.html'), 'true',[],'',''],
	['PAGE','148404',jdecode('Past+Events%3A+2011'),jdecode(''), jdecode('%2F148404%2Findex.html'), 'true',[ 
		['PAGE','152846',jdecode('Greencycle+Swap'),jdecode(''), jdecode('%2F148404%2F152846.html'), 'true',[],'',''],
		['PAGE','152825',jdecode('Valentines+day'),jdecode(''), jdecode('%2F148404%2F152825.html'), 'true',[],'',''],
		['PAGE','152804',jdecode('Go+Green+2011'),jdecode(''), jdecode('%2F148404%2F152804.html'), 'true',[],'',''],
		['PAGE','163504',jdecode('Summerstarz'),jdecode(''), jdecode('%2F148404%2F163504.html'), 'true',[],'',''],
		['PAGE','159304',jdecode('July'),jdecode(''), jdecode('%2F148404%2F159304.html'), 'true',[],'',''],
		['PAGE','159325',jdecode('August'),jdecode(''), jdecode('%2F148404%2F159325.html'), 'true',[],'',''],
		['PAGE','163804',jdecode('Summer+Live+2011'),jdecode(''), jdecode('%2F148404%2F163804.html'), 'true',[],'',''],
		['PAGE','165104',jdecode('Schoolfest'),jdecode(''), jdecode('%2F148404%2F165104.html'), 'true',[],'','']
	],'',''],
	['PAGE','130904',jdecode('Past+Events%3A+2010'),jdecode(''), jdecode('%2F130904%2Findex.html'), 'true',[ 
		['PAGE','126904',jdecode('Greencycle+Swaps'),jdecode(''), jdecode('%2F130904%2F126904.html'), 'true',[],'',''],
		['PAGE','118504',jdecode('FEB+-+Valentine+Dance'),jdecode(''), jdecode('%2F130904%2F118504.html'), 'true',[],'',''],
		['PAGE','135804',jdecode('MAY+-+Go+Green%21+G%26%23x27%3Bpt'),jdecode(''), jdecode('%2F130904%2F135804.html'), 'true',[],'',''],
		['PAGE','139104',jdecode('JUN+-+Town+Square+LIVE'),jdecode(''), jdecode('%2F130904%2F139104.html'), 'true',[],'',''],
		['PAGE','139125',jdecode('JUL%2FAUG+-+SummerStarz+2010'),jdecode(''), jdecode('%2F130904%2F139125.html'), 'true',[],'',''],
		['PAGE','145304',jdecode('DEC+-+Santa+Brunch'),jdecode(''), jdecode('%2F130904%2F145304.html'), 'true',[],'','']
	],'',''],
	['PAGE','65443',jdecode('Past+Events%3A+2009'),jdecode(''), jdecode('%2F65443%2Findex.html'), 'true',[ 
		['PAGE','65343',jdecode('MAR+-+Spr+SchoolFEST'),jdecode(''), jdecode('%2F65443%2F65343.html'), 'true',[],'',''],
		['PAGE','65364',jdecode('APR+-+Go+Green%21+G%26%23x27%3Bpt%21'),jdecode(''), jdecode('%2F65443%2F65364.html'), 'true',[],'',''],
		['PAGE','64464',jdecode('MAY+-+33rd+District+Forum'),jdecode(''), jdecode('%2F65443%2F64464.html'), 'true',[],'',''],
		['PAGE','65643',jdecode('JUL+-+SummerStarz'),jdecode(''), jdecode('%2F65443%2F65643.html'), 'true',[],'',''],
		['PAGE','101171',jdecode('AUG+-+Forum+Receptions'),jdecode(''), jdecode('%2F65443%2F101171.html'), 'true',[],'',''],
		['PAGE','101192',jdecode('AUG+-+Summer+Starz'),jdecode(''), jdecode('%2F65443%2F101192.html'), 'true',[],'',''],
		['PAGE','97843',jdecode('AUG+-+Recycling%2FSwaps'),jdecode(''), jdecode('%2F65443%2F97843.html'), 'true',[],'',''],
		['PAGE','64443',jdecode('AUG+-+SummerStarz'),jdecode(''), jdecode('%2F65443%2F64443.html'), 'true',[],'',''],
		['PAGE','96143',jdecode('OCT+-+Pumpkin+Day'),jdecode(''), jdecode('%2F65443%2F96143.html'), 'true',[],'',''],
		['PAGE','67864',jdecode('OCT+-+SchoolFEST'),jdecode(''), jdecode('%2F65443%2F67864.html'), 'true',[],'',''],
		['PAGE','96164',jdecode('OCT+-+Halloween'),jdecode(''), jdecode('%2F65443%2F96164.html'), 'true',[],'',''],
		['PAGE','106371',jdecode('DEC+-+Recycling%2FSwap'),jdecode(''), jdecode('%2F65443%2F106371.html'), 'true',[],'',''],
		['PAGE','106392',jdecode('DEC+-+Brunch+w%2FSanta'),jdecode(''), jdecode('%2F65443%2F106392.html'), 'true',[],'',''],
		['PAGE','121304',jdecode('DEC+-+Santa+Brunch+Pics'),jdecode(''), jdecode('%2F65443%2F121304.html'), 'true',[],'','']
	],'',''],
	['PAGE','799',jdecode('Past+Events%3A+2008'),jdecode(''), jdecode('%2F799%2Findex.html'), 'true',[ 
		['PAGE','18322',jdecode('JAN+-+Moscow+Circus'),jdecode(''), jdecode('%2F799%2F18322.html'), 'true',[],'',''],
		['PAGE','18301',jdecode('APR+-+Go+Green%21+G%26%23x27%3Bpt%21'),jdecode(''), jdecode('%2F799%2F18301.html'), 'true',[],'',''],
		['PAGE','18364',jdecode('JUL+-+SummerStarz'),jdecode(''), jdecode('%2F799%2F18364.html'), 'true',[],'',''],
		['PAGE','20543',jdecode('AUG+-+SummerStarz'),jdecode(''), jdecode('%2F799%2F20543.html'), 'true',[],'',''],
		['PAGE','20627',jdecode('SEP+-+SummerStarz'),jdecode(''), jdecode('%2F799%2F20627.html'), 'true',[],'',''],
		['PAGE','20669',jdecode('SEP+-+SchoolFEST'),jdecode(''), jdecode('%2F799%2F20669.html'), 'true',[],'',''],
		['PAGE','37901',jdecode('OCT+-+Pumpkin+Day'),jdecode(''), jdecode('%2F799%2F37901.html'), 'true',[],'',''],
		['PAGE','45401',jdecode('OCT+-+Halloween'),jdecode(''), jdecode('%2F799%2F45401.html'), 'true',[],'',''],
		['PAGE','60643',jdecode('DEC+-+Holiday+Lights'),jdecode(''), jdecode('%2F799%2F60643.html'), 'true',[],'','']
	],'',''],
	['PAGE','21001',jdecode('Music+Partners'),jdecode(''), jdecode('%2F21001.html'), 'true',[],'',''],
	['PAGE','820',jdecode('Join+Our+Distribution'),jdecode(''), jdecode('%2F820.html'), 'true',[],'',''],
	['PAGE','70143',jdecode('Get+Involved'),jdecode(''), jdecode('%2F70143.html'), 'true',[],'','']];
var siteelementCount=50;
theSitetree.topTemplateName='Deepcolor';
theSitetree.paletteFamily='5583CB';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10349';
theSitetree.graphicsetId='10469';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='154186';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'valueweb',
  product: 'WSCSYSSSSLYTCR7V'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Deepcolor',
				paletteFamily: 	'5583CB',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10349',
				graphicsetId: 	'10469',
				contentColor: 	'000000',
				contentBGColor: '154186',
				a_color: 		'5583CB',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '652',
internalId:  '',
customField: '20090511-164849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '168604',
internalId:  '',
customField: '20120127-084212'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '168604',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '799',
internalId:  '',
customField: '20090731-231113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45401',
internalId:  '',
customField: '20090617-123306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '715',
internalId:  '',
customField: '20111231-192503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18322',
internalId:  '',
customField: '20090617-123004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18301',
internalId:  '',
customField: '20090617-123032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18364',
internalId:  '',
customField: '20090617-123137'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20543',
internalId:  '',
customField: '20090615-122324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20627',
internalId:  '',
customField: '20081117-074523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20669',
internalId:  '',
customField: '20090617-123205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37901',
internalId:  '',
customField: '20090617-123229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21001',
internalId:  '',
customField: '20090225-150943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '820',
internalId:  '',
customField: '20100214-113534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64443',
internalId:  '',
customField: '20091202-120508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52843',
internalId:  '',
customField: '20111231-193521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65443',
internalId:  '',
customField: '20100214-115701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60643',
internalId:  '',
customField: '20090618-102102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65343',
internalId:  '',
customField: '20090618-100642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63943',
internalId:  '',
customField: '20090621-230054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65364',
internalId:  '',
customField: '20090618-100538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64464',
internalId:  '',
customField: '20090618-100508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65643',
internalId:  '',
customField: '20091202-115136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96143',
internalId:  '',
customField: '20091203-092057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118504',
internalId:  '',
customField: '20110129-182539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67864',
internalId:  '',
customField: '20091203-090812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '135804',
internalId:  '',
customField: '20100424-134950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70143',
internalId:  '',
customField: '20090615-132859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96164',
internalId:  '',
customField: '20091203-092952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97843',
internalId:  '',
customField: '20090804-072322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101171',
internalId:  '',
customField: '20100102-160959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101192',
internalId:  '',
customField: '20090810-122623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106371',
internalId:  '',
customField: '20091207-092412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106392',
internalId:  '',
customField: '20100102-161310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '126904',
internalId:  '',
customField: '20110129-181246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130904',
internalId:  '',
customField: '20110129-182419'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121304',
internalId:  '',
customField: '20091220-193002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '139125',
internalId:  '',
customField: '20100828-075624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '139104',
internalId:  '',
customField: '20100603-185454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '145304',
internalId:  '',
customField: '20110129-181612'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '148404',
internalId:  '',
customField: '20120121-220939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '159325',
internalId:  '',
customField: '20110702-082518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '163504',
internalId:  '',
customField: '20110915-095347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '163804',
internalId:  '',
customField: '20110915-095828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '159304',
internalId:  '',
customField: '20110701-224652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '152846',
internalId:  '',
customField: '20111231-123500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '152804',
internalId:  '',
customField: '20120123-213315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '152825',
internalId:  '',
customField: '20110616-093704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '175804',
internalId:  '',
customField: '20120121-221152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '165104',
internalId:  '',
customField: '20110928-054411'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INX3AK';
var companyName   = 'TOWN+SQUARE+INC.';
var htmlTitle	  = 'Town+Square';
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();
};

