/* [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','5001',jdecode('Home'),jdecode(''), jdecode('%2F5001.html'), 'true',[],'',''],
	['PAGE','5052',jdecode('Locations'),jdecode(''), jdecode('%2F5052%2Findex.html'), 'true',[ 
		['PAGE','6501',jdecode('Farmington'),jdecode(''), jdecode('%2F5052%2F6501.html'), 'true',[],'',''],
		['PAGE','6522',jdecode('Bonne+Terre'),jdecode(''), jdecode('%2F5052%2F6522.html'), 'true',[],'',''],
		['PAGE','6543',jdecode('Cape+Girardeau'),jdecode(''), jdecode('%2F5052%2F6543.html'), 'true',[],'',''],
		['PAGE','6564',jdecode('Desoto'),jdecode(''), jdecode('%2F5052%2F6564.html'), 'true',[],'',''],
		['PAGE','6585',jdecode('Fredericktown'),jdecode(''), jdecode('%2F5052%2F6585.html'), 'true',[],'',''],
		['PAGE','6606',jdecode('Hayti'),jdecode(''), jdecode('%2F5052%2F6606.html'), 'true',[],'',''],
		['PAGE','6627',jdecode('Hillsboro'),jdecode(''), jdecode('%2F5052%2F6627.html'), 'true',[],'',''],
		['PAGE','18812',jdecode('Imperial'),jdecode(''), jdecode('%2F5052%2F18812.html'), 'true',[],'',''],
		['PAGE','6648',jdecode('Ironton'),jdecode(''), jdecode('%2F5052%2F6648.html'), 'true',[],'',''],
		['PAGE','6669',jdecode('Malden'),jdecode(''), jdecode('%2F5052%2F6669.html'), 'true',[],'',''],
		['PAGE','6690',jdecode('Owensville'),jdecode(''), jdecode('%2F5052%2F6690.html'), 'true',[],'',''],
		['PAGE','6711',jdecode('Perryville'),jdecode(''), jdecode('%2F5052%2F6711.html'), 'true',[],'',''],
		['PAGE','6732',jdecode('Portageville'),jdecode(''), jdecode('%2F5052%2F6732.html'), 'true',[],'',''],
		['PAGE','6753',jdecode('Potosi'),jdecode(''), jdecode('%2F5052%2F6753.html'), 'true',[],'',''],
		['PAGE','6774',jdecode('Sikeston'),jdecode(''), jdecode('%2F5052%2F6774.html'), 'true',[],'',''],
		['PAGE','6795',jdecode('Ste.+Genevieve'),jdecode(''), jdecode('%2F5052%2F6795.html'), 'true',[],'',''],
		['PAGE','6816',jdecode('St.+Louis+Metro'),jdecode(''), jdecode('%2F5052%2F6816.html'), 'true',[],'',''],
		['PAGE','6837',jdecode('Sullivan'),jdecode(''), jdecode('%2F5052%2F6837.html'), 'true',[],'',''],
		['PAGE','6858',jdecode('Warrenton'),jdecode(''), jdecode('%2F5052%2F6858.html'), 'true',[],'',''],
		['PAGE','6879',jdecode('Washington'),jdecode(''), jdecode('%2F5052%2F6879.html'), 'true',[],'',''],
		['PAGE','6900',jdecode('Wright+City'),jdecode(''), jdecode('%2F5052%2F6900.html'), 'true',[],'','']
	],'',''],
	['PAGE','5073',jdecode('Advisor+Bios'),jdecode(''), jdecode('%2F5073%2Findex.html'), 'true',[ 
		['PAGE','7601',jdecode('Sue+Evans%2C+President'),jdecode(''), jdecode('%2F5073%2F7601.html'), 'true',[],'',''],
		['PAGE','7622',jdecode('Cindy+Minnis'),jdecode(''), jdecode('%2F5073%2F7622.html'), 'true',[],'',''],
		['PAGE','7643',jdecode('Jack+Rozier'),jdecode(''), jdecode('%2F5073%2F7643.html'), 'true',[],'',''],
		['PAGE','7664',jdecode('Lisa+Sumpter'),jdecode(''), jdecode('%2F5073%2F7664.html'), 'true',[],'',''],
		['PAGE','7685',jdecode('Levi+Olson'),jdecode(''), jdecode('%2F5073%2F7685.html'), 'true',[],'',''],
		['PAGE','7706',jdecode('Gary+McWaters'),jdecode(''), jdecode('%2F5073%2F7706.html'), 'false',[],'',''],
		['PAGE','7727',jdecode('Chris+Ewens'),jdecode(''), jdecode('%2F5073%2F7727.html'), 'false',[],'',''],
		['PAGE','18112',jdecode('Melissa+Schweigert'),jdecode(''), jdecode('%2F5073%2F18112.html'), 'true',[],'',''],
		['PAGE','21712',jdecode('Jeffrey+A.+Weber'),jdecode(''), jdecode('%2F5073%2F21712.html'), 'true',[],'',''],
		['PAGE','7748',jdecode('Bill+Ramsey'),jdecode(''), jdecode('%2F5073%2F7748.html'), 'false',[],'',''],
		['PAGE','7769',jdecode('Bob+Schwent'),jdecode(''), jdecode('%2F5073%2F7769.html'), 'true',[],'',''],
		['PAGE','7790',jdecode('Debbie+Myers'),jdecode(''), jdecode('%2F5073%2F7790.html'), 'false',[],'',''],
		['PAGE','7811',jdecode('Gail+Woods'),jdecode(''), jdecode('%2F5073%2F7811.html'), 'true',[],'',''],
		['PAGE','7832',jdecode('Mary+Sweeney'),jdecode(''), jdecode('%2F5073%2F7832.html'), 'false',[],'',''],
		['PAGE','7853',jdecode('Retta+Penrod'),jdecode(''), jdecode('%2F5073%2F7853.html'), 'false',[],'',''],
		['PAGE','7874',jdecode('Shaun+Felber'),jdecode(''), jdecode('%2F5073%2F7874.html'), 'true',[],'','']
	],'',''],
	['PAGE','5094',jdecode('More+About+Us'),jdecode(''), jdecode('%2F5094.html'), 'true',[],'','']];
var siteelementCount=41;
theSitetree.topTemplateName='Profile';
theSitetree.paletteFamily='333333';
theSitetree.keyvisualId='1223';
theSitetree.keyvisualName='buero.jpg';
theSitetree.fontsetId='190';
theSitetree.graphicsetId='226';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp35-attweb',
  product: 'WSCSYSSSSLY0X9RC'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Profile',
				paletteFamily: 	'333333',
				keyvisualId: 	'1223',
				keyvisualName: 	'buero.jpg',
				fontsetId: 		'190',
				graphicsetId: 	'226',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'333333',
				b_color: 		'999999',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20100715-083624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5052',
internalId:  '',
customField: '20100715-105034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5073',
internalId:  '',
customField: '20100715-100827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5094',
internalId:  '',
customField: '20100325-121308'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6501',
internalId:  '',
customField: '20100715-094958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6522',
internalId:  '',
customField: '20100325-083625'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6543',
internalId:  '',
customField: '20100616-155022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6564',
internalId:  '',
customField: '20100715-091942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6585',
internalId:  '',
customField: '20100715-092217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6606',
internalId:  '',
customField: '20100715-092753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6627',
internalId:  '',
customField: '20100715-092451'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6648',
internalId:  '',
customField: '20100325-090615'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6669',
internalId:  '',
customField: '20100715-100107'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6690',
internalId:  '',
customField: '20110301-110907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6711',
internalId:  '',
customField: '20100325-124125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6732',
internalId:  '',
customField: '20100715-093049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6753',
internalId:  '',
customField: '20100325-090753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6774',
internalId:  '',
customField: '20100715-100154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6795',
internalId:  '',
customField: '20100325-125030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6816',
internalId:  '',
customField: '20100325-090845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6837',
internalId:  '',
customField: '20110301-110926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6858',
internalId:  '',
customField: '20110301-110945'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6879',
internalId:  '',
customField: '20110301-110837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6900',
internalId:  '',
customField: '20110301-111144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7601',
internalId:  '',
customField: '20100325-143151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7622',
internalId:  '',
customField: '20100325-143227'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7643',
internalId:  '',
customField: '20100325-143338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7664',
internalId:  '',
customField: '20100325-143430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7685',
internalId:  '',
customField: '20100325-143546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7706',
internalId:  '',
customField: '20100325-145417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7727',
internalId:  '',
customField: '20100325-145441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7748',
internalId:  '',
customField: '20100325-145536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7769',
internalId:  '',
customField: '20100715-095435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7790',
internalId:  '',
customField: '20100325-145601'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7811',
internalId:  '',
customField: '20100325-145616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7832',
internalId:  '',
customField: '20100325-115111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7853',
internalId:  '',
customField: '20100325-120555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7874',
internalId:  '',
customField: '20100325-145634'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18112',
internalId:  '',
customField: '20100527-085120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18812',
internalId:  '',
customField: '20100616-151436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21712',
internalId:  '',
customField: '20110301-110514'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I7C87F';
var companyName   = 'First+State+Financial+Management%2C+Inc.';
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();
};

