/* [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','701',jdecode('Home'),jdecode(''),'/701.html','true',[],'',''],
	['PAGE','5501',jdecode('About+us'),jdecode(''),'/5501/index.html','true',[ 
		['PAGE','21801',jdecode('Steve+Schafer'),jdecode(''),'/5501/21801.html','true',[],'','']
	],'',''],
	['PAGE','5522',jdecode('Solutions'),jdecode(''),'/5522/index.html','true',[ 
		['PAGE','5543',jdecode('Accreditation'),jdecode(''),'/5522/5543.html','true',[],'',''],
		['PAGE','62601',jdecode('Business+Development'),jdecode(''),'/5522/62601.html','true',[],'',''],
		['PAGE','23801',jdecode('Compliance'),jdecode(''),'/5522/23801.html','true',[],'',''],
		['PAGE','64401',jdecode('Efficiency'),jdecode(''),'/5522/64401.html','true',[],'',''],
		['PAGE','5585',jdecode('Market+Research'),jdecode(''),'/5522/5585.html','true',[],'',''],
		['PAGE','15801',jdecode('Mergers+Acquisitions'),jdecode(''),'/5522/15801.html','true',[],'',''],
		['PAGE','5606',jdecode('Operations'),jdecode(''),'/5522/5606.html','true',[],'',''],
		['PAGE','5627',jdecode('Planning'),jdecode(''),'/5522/5627.html','true',[],'',''],
		['PAGE','21201',jdecode('Residential'),jdecode(''),'/5522/21201.html','true',[],'',''],
		['PAGE','61601',jdecode('Safety'),jdecode(''),'/5522/61601.html','true',[],'',''],
		['PAGE','67001',jdecode('Training'),jdecode(''),'/5522/67001.html','true',[],'',''],
		['PAGE','34801',jdecode('Turnaround'),jdecode(''),'/5522/34801.html','true',[],'','']
	],'',''],
	['PAGE','40901',jdecode('Clients'),jdecode(''),'/40901.html','true',[],'',''],
	['PAGE','40001',jdecode('Links'),jdecode(''),'/40001.html','true',[],'',''],
	['PAGE','5648',jdecode('Contact+Us'),jdecode(''),'/5648/index.html','true',[ 
		['PAGE','35901',jdecode('Confidentiality'),jdecode(''),'/5648/35901.html','true',[],'','']
	],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Time';
theSitetree.paletteFamily='272740';
theSitetree.keyvisualId='2311';
theSitetree.keyvisualName='vorsorge.jpg';
theSitetree.fontsetId='270';
theSitetree.graphicsetId='336';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Time',
				paletteFamily: 	'272740',
				keyvisualId: 	'2311',
				keyvisualName: 	'vorsorge.jpg',
				fontsetId: 		'270',
				graphicsetId: 	'336',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'272740',
				b_color: 		'6D6DA7',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20100124-170706'
};
webappMappings['7008']=webappMappings['7008-13785']={
webappId:    '7008',
documentId:  '5648',
internalId:  '13785',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5501',
internalId:  '',
customField: '20080118-095545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21801',
internalId:  '',
customField: '20080118-154229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5522',
internalId:  '',
customField: '20081017-121008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5543',
internalId:  '',
customField: '20080905-063350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62601',
internalId:  '',
customField: '20081015-151241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23801',
internalId:  '',
customField: '20080121-105619'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64401',
internalId:  '',
customField: '20081016-082756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5585',
internalId:  '',
customField: '20080120-200707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15801',
internalId:  '',
customField: '20080122-191055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5606',
internalId:  '',
customField: '20080120-200756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5627',
internalId:  '',
customField: '20081016-093031'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21201',
internalId:  '',
customField: '20080120-200931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61601',
internalId:  '',
customField: '20081015-143506'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67001',
internalId:  '',
customField: '20081017-142231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34801',
internalId:  '',
customField: '20080120-201016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40901',
internalId:  '',
customField: '20081120-090230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40001',
internalId:  '',
customField: '20080120-201144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5648',
internalId:  '',
customField: '20080122-105045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35901',
internalId:  '',
customField: '20080122-105325'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INLFIN';
var companyName   = 'Behavioral+Health+Management+Solutions';
var htmlTitle	  = 'A+Behavioral+Health+Human+Services+Business+Consultant+since+1993%3A+SCI';
var metaKeywords  = 'behavioral+health+consultant%2C+behavioral+health+management+consultant%2C+consultant%2C+consulting+firm%2C+consulting+group%2C+advisor%2C+professional+advisor%2C+behavioral+health+business+management%2C+behavioral+health%2C+psychiatric%2C+hospital%2C+mental+health%2C+substance+abuse+treatment%2C+addiction+treatment%2C+addiction+rehabilitation%2C+addiction+rehab%2C+training%2C+staff+training%2C+staff+education%2C+training+and+education%2C+operations+assessment%2C+compliance%2C+strategic+plan%2C+business+plan%2C+COA+consultant%2C+CARF+consultant%2C+Joint+Commission+consultant%2C+tracers%2C+in-house+tracers%2C+quality+improvement%2C+JCAHO+consultant%2C+psych+consultant%2C+healthcare+accreditation+consultant%2C+psychiatric+accreditation%2C+COA+behavioral+health+consultant%2C+CARF+behavioral+health+consultant%2C+Joint+Commssion+behavioral+health+consultant%2C+behavioral+health+market+research%2C+psychiatric+hospital+market+research+firm%2C+selling+human+service+business%2C+safety+assessment%2C+psychiatric+inpatient+incidents%2C+psychiatric+risk+reduction%2C+sentinel+events%2C+critical+events%2C+staff+injuries%2C+patient+injuries%2C+falls%2C+restraints%2C+seclusion%2C+safety+consultant%2C+psychiatric+safety+consultant%2C+children+youth+market+research+firm%2C+Indian+child+welfare+consultant%2C+Indian+tribe+social+services%2C+Indian%2C+Tribe%2C+native+people%2C+Inuit%2C+person+centered+treatment%2C+person+centered+recovery+model%2C+person+centered+treatment+approach%2C+mental+health+reform%2C+child+welfare+reform%2C+privatization%2C+behavioral+health+business+intermediary%2C+behavioral+health+business+broker%2C+buy+sell+psychiatric+hospital%2C+buy+sell+residential+treatment%2C+sell+behavioral+health+program%2C+sell+residential+treatment+program%2C+finder+behavioral+health%2C+behavioral+health+merger%2C+behavioral+health+merger+consultant%2C+behavioral+health+merger+acquisition%2C+merger+plan%2C+merging+non+profit+agencies%2C+merging+foster+care+agencies%2C+merging+behavioral+health+providers%2C+acquire+behavioral+health+facility%2C+acquire+psychiatric+hospital%2C+acquire+specialty+health+care+providers%2C+acquire+children+youth+agency%2C+acquire+private+academy%2C+behavioral+health+merger+acquistion+consultant%2C+sell+juvenile+detention+center%2C+buy+juvenile+detention+facility%2C+buy+sell+foster+care+agency%2C+psychiatric+hospital+consultant%2C+psychiatric+hospital+operations+assessment%2C+psychiatric+hospital+business+consultant%2C+psychiatric+product+line+assessment%2C+behavioral+health+due+diligence%2C+residential+treatment+consultant%2C+foster+care+consultant%2C+child+welfare+consultant%2C+juvenile+justice+consultant%2C+manage+psychiatric+unit%2C+hospital+turnaround%2C+psychiatric+program+turnaround%2C+community+mental+health+consultant%2C+mental+health+reform+consultant%2C+human+service+consultant%2C+social+service+consultant%2C+addiction+program+consultant%2C+psychiatric+hospital%2C+residential+treatment%2C+mental+health%2C+addiction+rehabilitation%2C+hospital+broker%2C+finder%2C+juvenile+detention+management+consultant%2C+child+welfare+privatization%2C+case+management+organization+consultant%2C+managed+care+consultant%2C+non+profit+management+consultant%2C+behavioral+health+investment%2C+opioid+treatment+consultant%2C+interim+management+psychiatric+inpatient+unit%2C+interim+manager%2C+psychiatric+hospital%2C+interim+CEO+residential+treatment%2C+interim+administrator+psychiatric+program%2C+behavioral+health+market+analysis%2C+due+diligence%2C+finance%2C+financial+consultant%2C+case+rate+analysis%2C+foster+care+consultant%2C+health+human+service+business+consultant%2C+health+human+service+management%2C+health+human+service+planning%2C+child+welfare+reform+planning+consultant%2C+MRDD+business+consultant%2C+mental+retardation+business+consultant%2C+management+consultant%2C+management+agreement%2C+joint+venture+consultant%2C+human+service+business+consultant%2C+human+service+management+consultant%2C+non+profit+agency+consultant%2C+children+youth+agency+consultant%2C+child+welfare+consultant%2C+child+protective+services+plan%2C+Florida+child+welfare+privatization%2C+DC+child+welfare+privatization%2C+child+welfare+expert%2C+residential+treatment+expert%2C+psychiatric+residential+treatment+management%2C+business+development+consultant%2C+government+contracts%2C+child+welfare+contract%2C+juvenile+justice+contract%2C+mental+health+contract%2C+behavioral+health+contract+consultant%2C+national+referral+development%2C+state+child+protective+services+contract%2C+state+mental+health+contract%2C+state+juvenile+justice+contract%2C+state+contracting+specialist%2C+state+child+welfare+contract+development%2C+state+juvenile+justice+contract+specialist%2C+human+services+government+contracts+firm%2C+human+services+business+development%2C+human+services+contract+consultant+';
var metaContents  = 'Schafer+Consulting+is+a+behavioral+health+and+human+services+business+management+consultant+firm%3A+COA%2C+CARF%2C+Joint+Commission+accreditation+preparation%2C+operations+and+safety+assessments%2C+strategic+plans%2C+market+research+and+feasibility%2C+mergers+and+acquisitions%2C+business+development%2C+efficiency%2C+state+licensing%2C+Medicaid%2C+Medicare+compliance.+Established+1993.+Serving+the+US+and+Canada.';
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();
};
