/* [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 theSitetree=[ 
	['PAGE','2401',jdecode('Home'),jdecode(''),'/2401.html','true',[],''],
	['PAGE','2452',jdecode('Services'),jdecode(''),'/2452.html','true',[],''],
	['PAGE','2473',jdecode('News'),jdecode(''),'/2473.html','true',[],''],
	['PAGE','2536',jdecode('About+us'),jdecode(''),'/2536.html','true',[],''],
	['PAGE','8301',jdecode('Referral+Form+'),jdecode(''),'/8301.html','true',[],''],
	['PAGE','8601',jdecode('For+Physicians+'),jdecode(''),'/8601.html','true',[],''],
	['PAGE','6501',jdecode('Insurances+Accepted'),jdecode(''),'/6501.html','true',[],''],
	['PAGE','2494',jdecode('Jobs'),jdecode(''),'/2494.html','true',[],''],
	['PAGE','2515',jdecode('Contact+us'),jdecode(''),'/2515.html','true',[],''],
	['PAGE','2557',jdecode('Resources'),jdecode(''),'/2557.html','true',[],'']];
var siteelementCount=10;
theSitetree.topTemplateName='Oblique';
theSitetree.paletteFamily='9EC78C';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33310';
theSitetree.graphicsetId='14184';
theSitetree.contentColor='6F9959';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Oblique',
				paletteFamily: 	'9EC78C',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33310',
				graphicsetId: 	'14184',
				contentColor: 	'6F9959',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				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:  '2401',
internalId:  '',
customField: '20100504-175719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2557',
internalId:  '',
customField: '20090326-114237'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2452',
internalId:  '',
customField: '20091123-163221'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2473',
internalId:  '',
customField: '20100504-175921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2536',
internalId:  '',
customField: '20091123-163713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2515',
internalId:  '',
customField: '20100504-181018'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2494',
internalId:  '',
customField: '20100504-180117'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '2401',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '2452',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '2473',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '2494',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '2515',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '2536',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '2557',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6501',
internalId:  '',
customField: '20091123-162701'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2401',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-876']={
webappId:    '7008',
documentId:  '8301',
internalId:  '876',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8301',
internalId:  '',
customField: '20090309-111001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8601',
internalId:  '',
customField: '20090427-174102'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '8301',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '8601',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '6501',
internalId:  '',
customField: 'language:en;country:US;'
};
var canonHostname = 'wsc1.brinkster.com';
var accountId     = 'ABR330INL4PH';
var companyName   = 'Regency+Home+Health+Care+P.C.+';
var htmlTitle	  = 'Home+Health+Care+Oak+Lawn%2C+Chicago';
var metaKeywords  = 'physical+therapy+occupational+therapy+Oak+Lawn+IL+Chicago+Nursing+Home+Home+health+Homehealth+Home+care+Homecare+IV+Rehabilitation+Medical+Social+Worker+home+health+aide+Gait+Training+Diabetes+High+blood+pressure+CHF+congestive+heart+failure+heartfracturecaregiver+bridgeview+evergreen+orland+park+worth+Orland+hills+Palos+Alsip+Harvey+Robbins+Midlothian+Crestwood+calumet+hazel+crest+riverdale+dolton+Robbins+Tinly+park+Blue+Island+Burbank+Hickory+Hills+Oak+ForestHome+Town+Midway+Cisero+Central+home+health+care+providerin+home+care+for+elderlysenior+home+careelderly+home+health+carehome+health+care+servicesmedical+home+health+care+in+home+care+home+health+care+nursing+home+health+service+home+health+agency+senior+care+elderly+care+adult+care+caregiver+nursing+home+bound+home+care+provider+medical+care+in+the+home++home+health+home+care+services+home+care++home+health+care+physical+therapy+home+physical+therapy+home+nurse+home+care+agency+post+surgical+home+care+home+health+physical+therapy+senior+home+health+care+homecare+home+health+regency+regency+home+regency+home+health+regency+home+health+care+regency+home+rehab+home+rehabilitation+rehab+rehabilitation+speech+therapy+infusion+wound+care+wound+medical+care+at+home+total+knee+replacment+Home+care+in+Oak+Lawn+chicago+home+care+chicago+home+health+chicago+homehealth+chicago+homecare+home+health+care+agency+home+health+care+agencies+home+health+care+services+home+health+services+health+care+agency+home+health+aides+home+health+agencies+home+health+aid+home+health+agency+home+health+care+agency+jobs+home+care+agency+certified+home+health+care+agency+home+health+care+agency+njhome+health+care+agency+in+home+care+agencies+pediatric+home+health+care+agency+non+medical+home+care+home+health+carehome+healthhome+healthcarehomecare+serviceshome+health+care+businesshome+care+serviceshome+care+assistance+senior+home+care++health+care+hospice+care+elderly+care+home+health+nursing+agency+home+health+care+aide+home+health+care+providers+home+health+aide+agency+private+home+health+care+home+health+care+aides+how+to+start+a+home+health+care+agency+starting+a+home+health+care+agency+nursing+care+home+health+care+nurse+elderly+home+health+care+licensed+home+health+care+agency+home+health+care+provider+home+health+nurse+home+health+care+companies+home+health+care+jobs+home+health+care+service+home+health+nursing+medicare+home+health+care+home+personal+care+home+health+care+nursing+senior+home+health+carehome+health+aidehome+care+givershealth+care+serviceselderly+home+carehome+carehomewatch+caregiversmedicare+home+nursingnursing+agencieshome+health+care+insurance+homecare+care+for+the+elderly+home+health+aide+agencies+homecare+agency+home+health+care+franchise+private+home+caregiver+elderly+home+aide+home+health+care+supplies+disabled+home+aide+homecare+agencies+health+care+plans+home+health+nursing+agencies+home+health+aides+agency+home+health+care+companions+home+hospice+companion+home+nurse+companion+for+home+healthcare+agencies+in+home+healthcare+agencies+home+nursing+companion+home+hospice+aide+medical+home+aide+home+health+caregiver+home+health+care+familyhome+nurse+health+caregiver+home+hospice+caregiver++nursing+home+care+home+care+nursing+agencies+home+nursing+health+caregiver+private+home+health+pay+for+home+caregiver+health+insurance+home+care+nursing+agency+caregiver+sa+home+health+care+agency+agency+for+home+health+care+in+home+health+care+agency+plus+home+health+care+agency+home+health+care+aid+home+hospice+health+aide+home+health+care+oasis+we+care+home+health+agency+home+hospice+health+companion+home+health+care+companion+home+health+aid+agency+home+health+care+infusion+at+home+health+care+agency+home+health+aids+agency+home+healthcare+agencies+home+health+care+attendant+home+health+nurse+agency+of+home+healthcare+agencies+home+health+care+agency+license+home+assisted+living+companion+home+healthcare+agency+home+nurse+health+aidehome+nursing+health+aide+medical+home+health+caregiver+for+home+healthcare+agency+home+healthcare+agency+in+a+home+healthcare+agency+medical+home+caregiver+home+health+care+giversown+home+health+care+agencyhome+health+care+certification+home+health+care+supplyinterim+health+care+agencyhome+health+care+assistance+home+health+care+equipment+insurance+nursing+home+caregiver+home+health+care+agency+and+home+health+care+agency+ofhome+health+care+agency+on+home+health+care+agency+san+home+health+care+agency+life+home+health+care+agency+open+home+health+care+agency+up+home+health+care+agency+home+health+care+agency+new+touch+home+health+care+agency+accent+care+home+health+agency+best+care+home+health+agency+golden+care+home+health+agency+total+care+home+health+agency+home+health+care+agency+for+sale+healthcare+home+health+agency+loving+care+home+health+agency+home+care+home+health+agency+how+to+start+a+home+health+agency+family+care+home+health+agency+jobs+Carrier+Career+';
var metaContents  = 'Home+health+care+services+including+skilled+nursing%2C+physical%2C+occupational+and+speech+therapy+in+Chicago+metropolitan+area.+Oak+lawn%2C+';
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();
};

