/* [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','239',jdecode('Home'),jdecode(''),'/239.html','true',[],'',''],
	['PAGE','4701',jdecode('Firm+Overview'),jdecode(''),'/4701.html','true',[],'',''],
	['PAGE','4722',jdecode('Attorney+Profiles'),jdecode(''),'/4722/index.html','true',[ 
		['PAGE','4743',jdecode('Thomas+E.+Hickman'),jdecode(''),'/4722/4743.html','true',[],'',''],
		['PAGE','4764',jdecode('Edward+M.+Ulsch'),jdecode(''),'/4722/4764.html','true',[],'',''],
		['PAGE','4785',jdecode('Christy+M.+Saunders'),jdecode(''),'/4722/4785.html','true',[],'',''],
		['PAGE','4827',jdecode('Phillip+W.+Wright'),jdecode(''),'/4722/4827.html','true',[],'',''],
		['PAGE','23312',jdecode('Amy+M.+Feldman'),jdecode(''),'/4722/23312.html','true',[],'',''],
		['PAGE','12301',jdecode('Louise+A.+Lock'),jdecode(''),'/4722/12301.html','true',[],'','']
	],'',''],
	['PAGE','4848',jdecode('Practice+Areas'),jdecode(''),'/4848.html','true',[],'',''],
	['PAGE','4869',jdecode('Resources'),jdecode(''),'/4869.html','true',[],'',''],
	['PAGE','4890',jdecode('Contact+Us'),jdecode(''),'/4890.html','true',[],'',''],
	['PAGE','13301',jdecode('Map'),jdecode(''),'/13301.html','true',[],'',''],
	['PAGE','17201',jdecode('Driving+directions'),jdecode(''),'/17201.html','true',[],'',''],
	['PAGE','28812',jdecode('Pay+Now'),jdecode(''),'/28812.html','true',[],'','']];
var siteelementCount=15;
theSitetree.topTemplateName='Akropolis';
theSitetree.paletteFamily='A4A4AC';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10344';
theSitetree.graphicsetId='10451';
theSitetree.contentColor='4f5051';
theSitetree.contentBGColor='A4A4AC';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Akropolis',
				paletteFamily: 	'A4A4AC',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10344',
				graphicsetId: 	'10451',
				contentColor: 	'4f5051',
				contentBGColor: 'A4A4AC',
				a_color: 		'A4A4AC',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC245']={
webappId:    '5003',
documentId:  '239',
internalId:  'tid:1;pid:WSCSYSSSSLYTC245',
customField: 'en:US:'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '13301',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '17201',
internalId:  'routing',
customField: 'en_US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '239',
internalId:  '',
customField: '20090727-114518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4701',
internalId:  '',
customField: '20090105-113921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4722',
internalId:  '',
customField: '20090210-133420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4848',
internalId:  '',
customField: '20090105-114001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4869',
internalId:  '',
customField: '20090105-114019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4890',
internalId:  '',
customField: '20100319-104851'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4743',
internalId:  '',
customField: '20090109-074354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4764',
internalId:  '',
customField: '20080813-134041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4785',
internalId:  '',
customField: '20080813-134022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4827',
internalId:  '',
customField: '20080813-134231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12301',
internalId:  '',
customField: '20090727-113131'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13301',
internalId:  '',
customField: '20090105-114041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17201',
internalId:  '',
customField: '20081016-130729'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23312',
internalId:  '',
customField: '20090211-093233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28812',
internalId:  '',
customField: '20100415-104031'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INVJ17';
var companyName   = 'HICKMAN%2C+ULSCH%2C+MCFAUL+%26+WRIGHT%2C+P.A.';
var htmlTitle	  = 'LawInCarroll.com+++++Hickman%2C+Ulsch%2C+McFaul+%26+Wright%2C+P.A.';
var metaKeywords  = 'Carroll+County+lawyer+criminal+family+juvenile+domestic+violence+divorce+child+custody+adoption+will+elder+appeals+mva+dui+dwi+personal+injury+general+workers+compensation+medical+malpractic+protective+order+exparte';
var metaContents  = 'Carroll+County+lawyer+criminal+family+juvenile+domestic+violence+divorce+child+custody+adoption+will+elder+appeals+mva+dui+dwi+personal+injury+general+workers+compensation+medical+malpractic+protective+order+exparte';
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();
};

