/* [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','301',jdecode('Home'),jdecode(''),'/301.html','true',[],''],
	['PAGE','5601',jdecode('Driving+Offenses'),jdecode(''),'/5601/index.html','true',[ 
		['PAGE','11401',jdecode('DUI'),jdecode(''),'/5601/11401.html','true',[],''],
		['PAGE','11422',jdecode('Reckless+Driving'),jdecode(''),'/5601/11422.html','true',[],''],
		['PAGE','11443',jdecode('Under+Suspension'),jdecode(''),'/5601/11443.html','true',[],''],
		['PAGE','11464',jdecode('Evading'),jdecode(''),'/5601/11464.html','true',[],'']
	],''],
	['PAGE','5622',jdecode('Drug+Crimes'),jdecode(''),'/5622/index.html','true',[ 
		['PAGE','11801',jdecode('Possession'),jdecode(''),'/5622/11801.html','true',[],''],
		['PAGE','11822',jdecode('Sale+of+Drugs'),jdecode(''),'/5622/11822.html','true',[],''],
		['PAGE','11843',jdecode('Manufacture'),jdecode(''),'/5622/11843.html','true',[],'']
	],''],
	['PAGE','11101',jdecode('Domestic+Violence'),jdecode(''),'/11101.html','true',[],''],
	['PAGE','5643',jdecode('Misdemeanor+Crimes'),jdecode(''),'/5643/index.html','true',[ 
		['PAGE','11864',jdecode('Disorderly+Conduct'),jdecode(''),'/5643/11864.html','true',[],''],
		['PAGE','11885',jdecode('Tresspass'),jdecode(''),'/5643/11885.html','true',[],''],
		['PAGE','11906',jdecode('Shoplifting'),jdecode(''),'/5643/11906.html','true',[],'']
	],''],
	['PAGE','11122',jdecode('Felony+Crimes'),jdecode(''),'/11122/index.html','true',[ 
		['PAGE','11948',jdecode('Robbery'),jdecode(''),'/11122/11948.html','true',[],''],
		['PAGE','11969',jdecode('Burglary'),jdecode(''),'/11122/11969.html','true',[],''],
		['PAGE','11990',jdecode('Sexual+Assault'),jdecode(''),'/11122/11990.html','true',[],''],
		['PAGE','12011',jdecode('Homicide+%2F+Murder'),jdecode(''),'/11122/12011.html','true',[],'']
	],''],
	['PAGE','12501',jdecode('Recent+Results'),jdecode(''),'/12501.html','true',[],''],
	['PAGE','5664',jdecode('About+us'),jdecode(''),'/5664/index.html','true',[ 
		['PAGE','5685',jdecode('Contact'),jdecode(''),'/5664/5685.html','true',[],'']
	],'']];
var siteelementCount=23;
theSitetree.topTemplateName='Cable';
theSitetree.paletteFamily='D30303';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10367';
theSitetree.graphicsetId='10527';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var theTemplate={
				name: 			'Cable',
				paletteFamily: 	'D30303',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10367',
				graphicsetId: 	'10527',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				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['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC245']={
webappId:    '5003',
documentId:  '301',
internalId:  'tid:1;pid:WSCSYSSSSLYTC245',
customField: 'en:US:'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20100326-215551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5601',
internalId:  '',
customField: '20100326-215156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11401',
internalId:  '',
customField: '20081026-192727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11422',
internalId:  '',
customField: '20081026-192727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11443',
internalId:  '',
customField: '20081026-192727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11464',
internalId:  '',
customField: '20081026-192727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5622',
internalId:  '',
customField: '20100326-222406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11801',
internalId:  '',
customField: '20081026-193430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11822',
internalId:  '',
customField: '20081026-193430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11843',
internalId:  '',
customField: '20081026-193430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11101',
internalId:  '',
customField: '20081026-191844'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5643',
internalId:  '',
customField: '20081026-162307'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11864',
internalId:  '',
customField: '20081026-193430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11885',
internalId:  '',
customField: '20081026-193430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11906',
internalId:  '',
customField: '20081026-193430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11122',
internalId:  '',
customField: '20081026-191844'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11948',
internalId:  '',
customField: '20081026-193430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11969',
internalId:  '',
customField: '20081026-193430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11990',
internalId:  '',
customField: '20081026-193430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12011',
internalId:  '',
customField: '20081026-193430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12501',
internalId:  '',
customField: '20081026-194141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5664',
internalId:  '',
customField: '20100323-202906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5685',
internalId:  '',
customField: '20081026-195024'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050IN3UBV';
var companyName   = 'Law+Office+of+Matthew+Lloyd+Brovender';
var htmlTitle	  = 'Law+Office+of+Matthew+Lloyd+Brovender';
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();
};
