/* [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','2039',jdecode('Home'),jdecode(''),'/2039.html','true',[],'',''],
	['PAGE','71861',jdecode('Areas+of+Practice'),jdecode(''),'/71861.html','true',[],'',''],
	['PAGE','48750',jdecode('Our+Team'),jdecode(''),'/48750/index.html','true',[ 
		['PAGE','66661',jdecode('David+Hvistendahl'),jdecode(''),'/48750/66661.html','true',[],'',''],
		['PAGE','66682',jdecode('Ronald+L.+Moersch'),jdecode(''),'/48750/66682.html','true',[],'',''],
		['PAGE','66761',jdecode('Jacqueline+A.+Dorsey'),jdecode(''),'/48750/66761.html','true',[],'',''],
		['PAGE','66782',jdecode('Mary+L.+Hahn'),jdecode(''),'/48750/66782.html','true',[],'',''],
		['PAGE','66803',jdecode('Britt+Ackerman'),jdecode(''),'/48750/66803.html','true',[],'',''],
		['PAGE','66824',jdecode('Kimberly+A.+Decker'),jdecode(''),'/48750/66824.html','true',[],'',''],
		['PAGE','66845',jdecode('Barbara+K.+Lundergan'),jdecode(''),'/48750/66845.html','true',[],'','']
	],'',''],
	['PAGE','80661',jdecode('Law+Review+Podcasts'),jdecode(''),'/80661.html','true',[],'',''],
	['PAGE','72061',jdecode('Legal+Resources'),jdecode(''),'/72061.html','true',[],'',''],
	['PAGE','72261',jdecode('General+Reference'),jdecode(''),'/72261.html','true',[],'',''],
	['PAGE','72282',jdecode('Local+Resources'),jdecode(''),'/72282.html','true',[],'',''],
	['PAGE','73561',jdecode('Our+History'),jdecode(''),'/73561.html','true',[],'',''],
	['PAGE','66261',jdecode('Contact+Us'),jdecode(''),'/66261.html','true',[],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Kalkutta';
theSitetree.paletteFamily='AC9662';
theSitetree.keyvisualId='6170';
theSitetree.keyvisualName='kv_6170.jpg';
theSitetree.fontsetId='11141';
theSitetree.graphicsetId='11951';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='DACC9B';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Kalkutta',
				paletteFamily: 	'AC9662',
				keyvisualId: 	'6170',
				keyvisualName: 	'kv_6170.jpg',
				fontsetId: 		'11141',
				graphicsetId: 	'11951',
				contentColor: 	'000000',
				contentBGColor: 'DACC9B',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2039',
internalId:  '',
customField: '20100707-180730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66782',
internalId:  '',
customField: '20100702-105306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48750',
internalId:  '',
customField: '20100702-105137'
};
webappMappings['7008']=webappMappings['7008-8716']={
webappId:    '7008',
documentId:  '66261',
internalId:  '8716',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72061',
internalId:  '',
customField: '20100707-181232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66761',
internalId:  '',
customField: '20100702-105245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66661',
internalId:  '',
customField: '20100723-104246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66261',
internalId:  '',
customField: '20100707-182653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66682',
internalId:  '',
customField: '20100723-104334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66803',
internalId:  '',
customField: '20100702-105324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66824',
internalId:  '',
customField: '20100702-105353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66845',
internalId:  '',
customField: '20100723-104639'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71861',
internalId:  '',
customField: '20100707-180817'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72282',
internalId:  '',
customField: '20100723-105306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72261',
internalId:  '',
customField: '20100707-182248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73561',
internalId:  '',
customField: '20100723-100908'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80661',
internalId:  '',
customField: '20100723-105717'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INZIPY';
var companyName   = 'Hvistendahl%2C+Moersch%2C+Dorsey+%26+Hahn%2C+P.A.';
var htmlTitle	  = 'Hvistendahl%2C+Moersch%2C+Dorsey+%26+Hahn%2C+P.A.';
var metaKeywords  = '+++++Hvistendahl%2C+Moersch%2C+Dorsey+%26+Hahn%2C+David+Hvistendahl%2C+Ronald+L.+Moersch%2C+Northfield%2C+Minnesota+State+Bank+Building+';
var metaContents  = '+++++Hvistendahl%2C+Moersch%2C+Dorsey+%26+Hahn+was+founded+in+1980+by+David+Hvistendahl+and+Ronald+L.+Moersch.+Located+in+Northfield%2C+Minnesota%2C+Hvistendahl%2C+Moersch%2C+Dorsey+%26+Hahn+represents+individuals+and+businesses+in+local%2C+national+and+international+matters.+The+Firm+is+committed+to+excellence+in+representing+our+clients+by+providing+prompt+and+efficient+service.+Clients+are+well+informed+during+every+step+of+the+legal+process%2C+and+are+given+careful+guidance+and+advice+in+making+important+legal+decisions.';
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();
};
