/* [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','5322',jdecode('Home'),jdecode(''), jdecode('%2F5322.html'), 'true',[],'',''],
	['PAGE','40601',jdecode('Primary+Results'),jdecode(''), jdecode('%2F40601.html'), 'true',[],'',''],
	['PAGE','20101',jdecode('The+General+Election'),jdecode(''), jdecode('%2F20101.html'), 'true',[],'',''],
	['PAGE','19001',jdecode('About+District+4'),jdecode(''), jdecode('%2F19001.html'), 'true',[],'',''],
	['PAGE','10001',jdecode('About+Mark'),jdecode(''), jdecode('%2F10001%2Findex.html'), 'true',[ 
		['PAGE','12601',jdecode('Overview'),jdecode(''), jdecode('%2F10001%2F12601.html'), 'true',[],'',''],
		['PAGE','10022',jdecode('Professional'),jdecode(''), jdecode('%2F10001%2F10022.html'), 'true',[],'',''],
		['PAGE','10301',jdecode('Community'),jdecode(''), jdecode('%2F10001%2F10301.html'), 'true',[],'',''],
		['PAGE','11001',jdecode('Education'),jdecode(''), jdecode('%2F10001%2F11001.html'), 'true',[],'',''],
		['PAGE','9101',jdecode('Personal'),jdecode(''), jdecode('%2F10001%2F9101.html'), 'true',[],'','']
	],'',''],
	['PAGE','6901',jdecode('Mark%26%23x27%3Bs+Objectives'),jdecode(''), jdecode('%2F6901%2Findex.html'), 'true',[ 
		['PAGE','36301',jdecode('Taxes'),jdecode(''), jdecode('%2F6901%2F36301.html'), 'true',[],'',''],
		['PAGE','39101',jdecode('Broadband'),jdecode(''), jdecode('%2F6901%2F39101.html'), 'true',[],'','']
	],'',''],
	['PAGE','8801',jdecode('Your+Issues'),jdecode(''), jdecode('%2F8801%2Findex.html'), 'true',[ 
		['PAGE','17101',jdecode('County-Wide'),jdecode(''), jdecode('%2F8801%2F17101.html'), 'true',[],'',''],
		['PAGE','17122',jdecode('District+4'),jdecode(''), jdecode('%2F8801%2F17122.html'), 'true',[],'',''],
		['PAGE','17143',jdecode('Two+Harbors'),jdecode(''), jdecode('%2F8801%2F17143.html'), 'true',[],'',''],
		['PAGE','17164',jdecode('Larsmont'),jdecode(''), jdecode('%2F8801%2F17164.html'), 'true',[],'','']
	],'',''],
	['PAGE','14301',jdecode('Business'),jdecode(''), jdecode('%2F14301%2Findex.html'), 'true',[ 
		['PAGE','26601',jdecode('Business+Issues'),jdecode(''), jdecode('%2F14301%2F26601.html'), 'true',[],'','']
	],'',''],
	['PAGE','23201',jdecode('Labor'),jdecode(''), jdecode('%2F23201.html'), 'true',[],'',''],
	['PAGE','6922',jdecode('NE+Labor+Council'),jdecode(''), jdecode('%2F6922%2Findex.html'), 'true',[ 
		['PAGE','7101',jdecode('Questionaire'),jdecode(''), jdecode('%2F6922%2F7101.html'), 'true',[],'',''],
		['PAGE','7122',jdecode('Cover+Letter'),jdecode(''), jdecode('%2F6922%2F7122.html'), 'true',[],'','']
	],'',''],
	['PAGE','15001',jdecode('Education'),jdecode(''), jdecode('%2F15001%2Findex.html'), 'true',[ 
		['PAGE','34001',jdecode('Our+School+District'),jdecode(''), jdecode('%2F15001%2F34001.html'), 'true',[],'','']
	],'',''],
	['PAGE','23801',jdecode('News+Chronicle'),jdecode(''), jdecode('%2F23801%2Findex.html'), 'true',[ 
		['PAGE','24001',jdecode('Introductory+Letter'),jdecode(''), jdecode('%2F23801%2F24001.html'), 'true',[],'',''],
		['PAGE','24022',jdecode('Questions%2FAnswers'),jdecode(''), jdecode('%2F23801%2F24022.html'), 'true',[],'','']
	],'',''],
	['PAGE','23222',jdecode('Campaign'),jdecode(''), jdecode('%2F23222%2Findex.html'), 'true',[ 
		['PAGE','31101',jdecode('Mailer-July+29'),jdecode(''), jdecode('%2F23222%2F31101.html'), 'true',[],'','']
	],'',''],
	['PAGE','15601',jdecode('Financial'),jdecode(''), jdecode('%2F15601.html'), 'true',[],'',''],
	['PAGE','6401',jdecode('Contact+Us'),jdecode(''), jdecode('%2F6401.html'), 'true',[],'','']];
var siteelementCount=33;
theSitetree.topTemplateName='Disco';
theSitetree.paletteFamily='3D5465';
theSitetree.keyvisualId='1873';
theSitetree.keyvisualName='business.jpg';
theSitetree.fontsetId='307';
theSitetree.graphicsetId='364';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='3D5465';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'hostway_generic',
  product: 'WSCSYSSSSLYTC245'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Disco',
				paletteFamily: 	'3D5465',
				keyvisualId: 	'1873',
				keyvisualName: 	'business.jpg',
				fontsetId: 		'307',
				graphicsetId: 	'364',
				contentColor: 	'FFFFFF',
				contentBGColor: '3D5465',
				a_color: 		'3D5465',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5322',
internalId:  '',
customField: '20100814-103839'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5322',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6401',
internalId:  '',
customField: '20100814-111525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6922',
internalId:  '',
customField: '20100730-002005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7101',
internalId:  '',
customField: '20100710-104825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6901',
internalId:  '',
customField: '20100814-235308'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7122',
internalId:  '',
customField: '20100710-091146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8801',
internalId:  '',
customField: '20100814-104737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9101',
internalId:  '',
customField: '20100801-114431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10001',
internalId:  '',
customField: '20100731-231153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10022',
internalId:  '',
customField: '20100711-154838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10301',
internalId:  '',
customField: '20100711-134317'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11001',
internalId:  '',
customField: '20100801-011519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12601',
internalId:  '',
customField: '20100714-100717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14301',
internalId:  '',
customField: '20100804-140131'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15001',
internalId:  '',
customField: '20100801-113527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15601',
internalId:  '',
customField: '20100819-004946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17101',
internalId:  '',
customField: '20100722-091534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17164',
internalId:  '',
customField: '20100722-084006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17122',
internalId:  '',
customField: '20100801-082558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17143',
internalId:  '',
customField: '20100730-004807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19001',
internalId:  '',
customField: '20100814-105549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20101',
internalId:  '',
customField: '20100814-104433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23222',
internalId:  '',
customField: '20100814-112122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23201',
internalId:  '',
customField: '20100731-122720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23801',
internalId:  '',
customField: '20100729-225029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24001',
internalId:  '',
customField: '20100729-224919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24022',
internalId:  '',
customField: '20100729-210520'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26601',
internalId:  '',
customField: '20100730-011215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31101',
internalId:  '',
customField: '20100805-234311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34001',
internalId:  '',
customField: '20100801-110519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36301',
internalId:  '',
customField: '20100804-134406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39101',
internalId:  '',
customField: '20100807-102814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40601',
internalId:  '',
customField: '20100814-103912'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INZSFQ';
var companyName   = 'Mark+Broin';
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();
};

