/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','21401',jdecode('Why+KaraLee%3F'),jdecode(''),'/21401.html','true',[],'',''],
	['PAGE','22601',jdecode('KaraLee+History'),jdecode(''),'/22601.html','true',[],'',''],
	['PAGE','29001',jdecode('Location+'),jdecode(''),'/29001.html','true',[],'',''],
	['PAGE','28001',jdecode('Intake+Forms+%26+FAQ%26%23x27%3Bs'),jdecode(''),'/28001.html','true',[],'',''],
	['PAGE','48001',jdecode('Psychiatrists'),jdecode(''),'/48001.html','true',[],'',''],
	['PAGE','722',jdecode('Our+Staff'),jdecode(''),'/722/index.html','true',[ 
		['PAGE','31801',jdecode('Dr.+Karen+Maier+PhD'),jdecode(''),'/722/31801.html','false',[],'',''],
		['PAGE','31822',jdecode('Dr.+Charles+Meredith+PhD'),jdecode(''),'/722/31822.html','false',[],'',''],
		['PAGE','31843',jdecode('Dr.+William+Starnes+Phd'),jdecode(''),'/722/31843.html','false',[],'',''],
		['PAGE','31885',jdecode('Kyle+Andrews+TLLP'),jdecode(''),'/722/31885.html','false',[],'',''],
		['PAGE','31864',jdecode('Bruce+Binstok+LMSW'),jdecode(''),'/722/31864.html','false',[],'',''],
		['PAGE','53401',jdecode('Sharon+Dziurda+TLLP'),jdecode(''),'/722/53401.html','false',[],'',''],
		['PAGE','31969',jdecode('John+Heger+Psy+LLP'),jdecode(''),'/722/31969.html','false',[],'',''],
		['PAGE','31948',jdecode('Jennifer+Lauria+Psy+Sp+LLP'),jdecode(''),'/722/31948.html','false',[],'',''],
		['PAGE','31906',jdecode('Diane+Lothrop+MS%2C+LLP'),jdecode(''),'/722/31906.html','false',[],'',''],
		['PAGE','31927',jdecode('Wayne+MacIntosh%2C+MA+LLP'),jdecode(''),'/722/31927.html','false',[],'',''],
		['PAGE','32032',jdecode('Madelyn+Palmieri+MA+LLP'),jdecode(''),'/722/32032.html','false',[],'',''],
		['PAGE','32011',jdecode('Judy+Pearlman+LMSW'),jdecode(''),'/722/32011.html','false',[],'',''],
		['PAGE','31990',jdecode('Judith+Richards+MS%2C+LLP'),jdecode(''),'/722/31990.html','false',[],'',''],
		['PAGE','32053',jdecode(''),jdecode(''),'/722/32053.html','true',[],'','']
	],'',''],
	['PAGE','29801',jdecode('Joint+Commission'),jdecode(''),'/29801.html','true',[],'',''],
	['PAGE','22622',jdecode('Insurances+Accepted'),jdecode(''),'/22622.html','true',[],'',''],
	['PAGE','49501',jdecode('Billing+Information'),jdecode(''),'/49501.html','true',[],'',''],
	['PAGE','27801',jdecode('HIPPA'),jdecode(''),'/27801.html','true',[],'',''],
	['PAGE','701',jdecode('Services'),jdecode(''),'/701.html','true',[],'',''],
	['PAGE','764',jdecode('Resources'),jdecode(''),'/764.html','true',[],'',''],
	['PAGE','21443',jdecode('Photo+Gallery'),jdecode(''),'/21443.html','true',[],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Borders';
theSitetree.paletteFamily='C9DFEE';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10432';
theSitetree.graphicsetId='10771';
theSitetree.contentColor='692643';
theSitetree.contentBGColor='F0F2F4';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Borders',
				paletteFamily: 	'C9DFEE',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10432',
				graphicsetId: 	'10771',
				contentColor: 	'692643',
				contentBGColor: 'F0F2F4',
				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['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC245']={
webappId:    '5003',
documentId:  '501',
internalId:  'tid:1;pid:WSCSYSSSSLYTC245',
customField: 'en:US:'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20100727-141403'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29801',
internalId:  '',
customField: '20100708-144750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21443',
internalId:  '',
customField: '20090509-134654'
};
webappMappings['7060']=webappMappings['7060-9deb22d2baafabb1ad56b245cf74c5b4']={
webappId:    '7060',
documentId:  '21443',
internalId:  '9deb22d2baafabb1ad56b245cf74c5b4',
customField: 'language:en;country:US;'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '29001',
internalId:  'routing',
customField: 'en_US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '764',
internalId:  '',
customField: '20100708-153139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21401',
internalId:  '',
customField: '20100805-130855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '722',
internalId:  '',
customField: '20100816-105121'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29001',
internalId:  '',
customField: '20100708-162346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22601',
internalId:  '',
customField: '20100709-122942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22622',
internalId:  '',
customField: '20100814-094045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20100709-121145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27801',
internalId:  '',
customField: '20090817-171929'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28001',
internalId:  '',
customField: '20100814-094106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31801',
internalId:  '',
customField: '20100708-154516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31822',
internalId:  '',
customField: '20100727-115516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31843',
internalId:  '',
customField: '20100805-131203'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31864',
internalId:  '',
customField: '20100727-120246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31885',
internalId:  '',
customField: '20100708-155332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31906',
internalId:  '',
customField: '20100709-104932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31927',
internalId:  '',
customField: '20100814-091833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31948',
internalId:  '',
customField: '20100727-115834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31969',
internalId:  '',
customField: '20100708-154133'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31990',
internalId:  '',
customField: '20100709-114101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32011',
internalId:  '',
customField: '20100802-201020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32032',
internalId:  '',
customField: '20100727-143904'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32053',
internalId:  '',
customField: '20100814-094029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48001',
internalId:  '',
customField: '20100805-131019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49501',
internalId:  '',
customField: '20100708-143829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53401',
internalId:  '',
customField: '20100709-120653'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INVKIW';
var companyName   = 'KaraLee+and+Associates%2C+P.C.++%28734%29+451-3440';
var htmlTitle	  = 'KaraLee+and+Associates+P.C.+Centre+for+Self+and+Family';
var metaKeywords  = 'centre+for+self+and+family%2C+substance+abuse%2C+psychiatry%2C+psychology%2C+therapy%2C+social+work';
var metaContents  = 'centre+for+self+and+family%2C+substance+abuse%2C+psychiatry%2C+psychology%2C+therapy%2C+social+work';
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();
};
