/* [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','4901',jdecode('Home'),jdecode(''),'/4901.html','true',[],'',''],
	['PAGE','4952',jdecode('About+Us'),jdecode(''),'/4952.html','true',[],'',''],
	['PAGE','4973',jdecode('Personal+Care'),jdecode(''),'/4973.html','true',[],'',''],
	['PAGE','26401',jdecode('Shared+Services'),jdecode(''),'/26401.html','true',[],'',''],
	['PAGE','26601',jdecode('Our+Caregivers'),jdecode(''),'/26601.html','true',[],'',''],
	['PAGE','4994',jdecode('Careers'),jdecode(''),'/4994.html','true',[],'',''],
	['PAGE','5036',jdecode('Contact+Us'),jdecode(''),'/5036.html','true',[],'',''],
	['PAGE','16901',jdecode('Promotions'),jdecode(''),'/16901.html','true',[],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Vienna';
theSitetree.paletteFamily='D6D2C5';
theSitetree.keyvisualId='11877';
theSitetree.keyvisualName='kv_11877.jpg';
theSitetree.fontsetId='33184';
theSitetree.graphicsetId='14088';
theSitetree.contentColor='696146';
theSitetree.contentBGColor='ebe8df';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Vienna',
				paletteFamily: 	'D6D2C5',
				keyvisualId: 	'11877',
				keyvisualName: 	'kv_11877.jpg',
				fontsetId: 		'33184',
				graphicsetId: 	'14088',
				contentColor: 	'696146',
				contentBGColor: 'ebe8df',
				a_color: 		'EBE8DF',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4901',
internalId:  '',
customField: '20100617-090054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4973',
internalId:  '',
customField: '20100617-092618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4952',
internalId:  '',
customField: '20100617-090238'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5036',
internalId:  '',
customField: '20100617-091245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4994',
internalId:  '',
customField: '20100617-091217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26401',
internalId:  '',
customField: '20100617-091006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16901',
internalId:  '',
customField: '20100617-090551'
};
webappMappings['7008']=webappMappings['7008-10750']={
webappId:    '7008',
documentId:  '5036',
internalId:  '10750',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26601',
internalId:  '',
customField: '20100617-090855'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHXX0';
var companyName   = 'LOVING+SUPPORT+AT+HOME';
var htmlTitle	  = 'Private+Home+Care+Atlanta+Tucker+Dekalb+Decatur+Emory+Lawrenceville+Gwinnett+Fulton+Cobb+Smyrna+Stone+Mountain+Private+Personal+Care+Assistant+Assistance+Companion+Live-In+LiveIn+Live+In+CNA+Sitter+Homemaker+Healthcare+Health+Care+Seniors+Alzheimer%27s+AIDS';
var metaKeywords  = 'Private+Home+Care%2C+Atlanta%2C+Tucker%2C+Dekalb%2C+Decatur%2C+Emory%2C+Buckhead%2C+Lawrenceville%2C+Gwinnett%2C+Roswell%2C+Marietta%2C+Fulton%2C+Cobb%2C+Smyrna%2C+Stone+Mountain%2C+Private%2C+Personal+Care%2C+Assistant%2C+Assistance%2C+Companion%2C+Live-In%2C+LiveIn%2C+Live+In%2C+CNA%2C+Sitter%2C+Homemaker%2C+Healthcare%2C+Health+Care%2C+Seniors%2C+Alzheimer%27s%2C+AIDS%2C+HIV%2C+Dementia%2C+Local%2C+Community+Based%2C+Plastic+Surgery%2C+Surgeons%2C+Stroke%2C+Assistance%2C+Paralyzed%2C+St.+Josephs%2C+Northside+Hospital%2C+Help%2C+Independent+Living%2C+Assisted+Living%2C+Long+Term+Care%2C+Home_Care%2C+Senior+Support%2C+Elderly%2C+Senior%2C+Seniors%2C+Aged%2C+Baby+Boomer%2C+Boomers%2C+Health+Problems%2C+Best%2C+Cheap%2C+Cheaper%2C+Cheapest%2C+Quality%2C+Need%2C+Needs%2C+Local%2C+Community+Based%2CGive+Back%2C+Discount%2C+Discounts%2C+Private+Pay%2C+Self+pay%2C+Long+Term+Care+Insurance%2C+Elder+Care+Attorneys%2C+Attorney%2C+Azalea%2C+Home+Care%2C+Certified+Nursing+Assistant%2C+Help';
var metaContents  = 'Azalea+Homecare+is+a+locally+owned+and+operated+Private+Homecare+Provider.++We+provide+non-medical+assistance+with+bathing%2C+dressing%2C+grooming%2C+feeding%2C+running+errands%2C+escorting+to+doctor+appointments%2C+taking+your+family+pet+to+and+from+your+veterinarian%2C+companions%2C+sitters%2C+homemakers%2C+personal+care+assistants+and+CNA%27s+%28Certified+Nursing+Assistants%29.++Let+us+provide+the+loving+support+and+peace+of+mind+that+you+need+and+expect.';
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();
};

