/* [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','5901',jdecode('Home'),jdecode(''), jdecode('%2F5901.html'), 'true',[],'',''],
	['PAGE','6001',jdecode('Services'),jdecode(''), jdecode('%2F6001%2Findex.html'), 'true',[ 
		['PAGE','6022',jdecode('Accounting+Services'),jdecode(''), jdecode('%2F6001%2F6022.html'), 'true',[],'',''],
		['PAGE','6043',jdecode('Tax+Planning+%26+Preparation'),jdecode(''), jdecode('%2F6001%2F6043.html'), 'true',[],'',''],
		['PAGE','6064',jdecode('Estate+%2F+Trust+%2F+Gift+Tax'),jdecode(''), jdecode('%2F6001%2F6064.html'), 'true',[],'',''],
		['PAGE','6085',jdecode('Business+Consulting'),jdecode(''), jdecode('%2F6001%2F6085.html'), 'true',[],'','']
	],'',''],
	['PAGE','6106',jdecode('Calculators'),jdecode(''), jdecode('%2F6106.html'), 'true',[],'',''],
	['PAGE','24012',jdecode('Our+Team'),jdecode(''), jdecode('%2F24012%2Findex.html'), 'true',[ 
		['PAGE','29212',jdecode('Alison+E.+Garrett%2C+CPA'),jdecode(''), jdecode('%2F24012%2F29212.html'), 'true',[],'',''],
		['PAGE','29233',jdecode('Brandon+S.+Verner%2C+CPA'),jdecode(''), jdecode('%2F24012%2F29233.html'), 'true',[],'',''],
		['PAGE','29254',jdecode('James+B.+Murphy%2C+CPA'),jdecode(''), jdecode('%2F24012%2F29254.html'), 'true',[],'',''],
		['PAGE','29275',jdecode('James+D.+Marosek%2C+CPA'),jdecode(''), jdecode('%2F24012%2F29275.html'), 'true',[],'',''],
		['PAGE','58412',jdecode('Jeffrey+Cohen%2C+CPA%2FPFS'),jdecode(''), jdecode('%2F24012%2F58412.html'), 'true',[],'',''],
		['PAGE','29317',jdecode('Joseph+R.+Spradlin%2C+CPA'),jdecode(''), jdecode('%2F24012%2F29317.html'), 'true',[],'',''],
		['PAGE','29338',jdecode('Katherine+E.+Sumner'),jdecode(''), jdecode('%2F24012%2F29338.html'), 'true',[],'',''],
		['PAGE','60912',jdecode('Lawrence+M.+Cohen%2C+CPA'),jdecode(''), jdecode('%2F24012%2F60912.html'), 'true',[],'',''],
		['PAGE','29359',jdecode('Michael+W.+Jaye'),jdecode(''), jdecode('%2F24012%2F29359.html'), 'true',[],'',''],
		['PAGE','29380',jdecode('Michael+G.+Verner%2C+CPA%2C+JD'),jdecode(''), jdecode('%2F24012%2F29380.html'), 'true',[],'',''],
		['PAGE','58433',jdecode('Sam+Bromberg%2C+CPA%2FPFS'),jdecode(''), jdecode('%2F24012%2F58433.html'), 'true',[],'',''],
		['PAGE','29422',jdecode('Steve+A.+Fraser'),jdecode(''), jdecode('%2F24012%2F29422.html'), 'true',[],'',''],
		['PAGE','29443',jdecode('Stuart+J.+Verner'),jdecode(''), jdecode('%2F24012%2F29443.html'), 'true',[],'','']
	],'',''],
	['PAGE','6148',jdecode('Client+Connections'),jdecode(''), jdecode('%2F6148.html'), 'true',[],'',''],
	['PAGE','6169',jdecode('Links'),jdecode(''), jdecode('%2F6169.html'), 'true',[],'',''],
	['PAGE','6190',jdecode('Newsletter'),jdecode(''), jdecode('%2F6190.html'), 'true',[],'',''],
	['PAGE','6211',jdecode('Contact+Us'),jdecode(''), jdecode('%2F6211.html'), 'true',[],'',''],
	['PAGE','53612',jdecode('Site+Map'),jdecode(''), jdecode('%2F53612.html'), 'false',[],'','']];
var siteelementCount=26;
theSitetree.topTemplateName='Capri';
theSitetree.paletteFamily='385CA9';
theSitetree.keyvisualId='7155';
theSitetree.keyvisualName='kv_7155.jpg';
theSitetree.fontsetId='16409';
theSitetree.graphicsetId='12134';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
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: 			'Capri',
				paletteFamily: 	'385CA9',
				keyvisualId: 	'7155',
				keyvisualName: 	'kv_7155.jpg',
				fontsetId: 		'16409',
				graphicsetId: 	'12134',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5901',
internalId:  '',
customField: '20120124-133001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6001',
internalId:  '',
customField: '20110808-103813'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6022',
internalId:  '',
customField: '20110808-104201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6106',
internalId:  '',
customField: '20110808-104334'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24012',
internalId:  '',
customField: '20110808-104432'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6148',
internalId:  '',
customField: '20111007-100343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6169',
internalId:  '',
customField: '20110808-104941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6211',
internalId:  '',
customField: '20110808-105028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6043',
internalId:  '',
customField: '20110808-104010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6064',
internalId:  '',
customField: '20110808-104243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6085',
internalId:  '',
customField: '20110808-104252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6190',
internalId:  '',
customField: '20110808-095101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29254',
internalId:  '',
customField: '20111121-104245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29212',
internalId:  '',
customField: '20111121-104424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29233',
internalId:  '',
customField: '20111121-104434'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29275',
internalId:  '',
customField: '20111121-104321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29317',
internalId:  '',
customField: '20111117-132923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29338',
internalId:  '',
customField: '20110720-115156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29359',
internalId:  '',
customField: '20111117-132624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29380',
internalId:  '',
customField: '20111121-104411'
};
webappMappings['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC245']={
webappId:    '5003',
documentId:  '5901',
internalId:  'tid:1;pid:WSCSYSSSSLYTC245',
customField: 'en:US::;language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29422',
internalId:  '',
customField: '20111117-132747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29443',
internalId:  '',
customField: '20111117-132816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53612',
internalId:  '',
customField: '20110808-105050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58433',
internalId:  '',
customField: '20110831-141737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58412',
internalId:  '',
customField: '20110831-141805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60912',
internalId:  '',
customField: '20120119-144656'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INZUZU';
var companyName   = 'Verner+Bromberg+%26+Cohen+';
var htmlTitle	  = 'Verner+Bromberg+%26+Cohen';
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();
};

