/* [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','63',jdecode('Home'),jdecode(''),'/63.html','true',[],''],
	['PAGE','11401',jdecode('HOMEBOUND+COUNSELING'),jdecode(''),'/11401.html','true',[],''],
	['PAGE','11601',jdecode('CASE+MANAGEMENT+SERVICES+'),jdecode(''),'/11601.html','true',[],''],
	['PAGE','13101',jdecode('CONSULTATIONS'),jdecode(''),'/13101.html','true',[],''],
	['PAGE','13501',jdecode('SOCIAL+WORK+SUPERVISION+'),jdecode(''),'/13501.html','true',[],''],
	['PAGE','11801',jdecode('MEDICAID+'),jdecode(''),'/11801.html','true',[],''],
	['PAGE','111',jdecode('SERVICES'),jdecode(''),'/111.html','true',[],''],
	['PAGE','120',jdecode('EMPLOYEES'),jdecode(''),'/120.html','true',[],''],
	['PAGE','129',jdecode('GROUPS'),jdecode(''),'/129.html','true',[],''],
	['PAGE','138',jdecode('SEMINARS'),jdecode(''),'/138.html','true',[],''],
	['PAGE','147',jdecode('THE+POSTIVE+CONNECTION+'),jdecode(''),'/147.html','true',[],''],
	['PAGE','156',jdecode('JOB+OPPORTUNITIES+'),jdecode(''),'/156.html','true',[],''],
	['PAGE','10301',jdecode('LINKS+'),jdecode(''),'/10301/index.html','true',[ 
		['PAGE','4901',jdecode('Read+Guestbook'),jdecode(''),'/10301/4901.html','false',[],'']
	],''],
	['PAGE','84',jdecode('ABOUT+US+'),jdecode(''),'/84/index.html','true',[ 
		['PAGE','93',jdecode('Our+team'),jdecode(''),'/84/93.html','true',[],''],
		['PAGE','102',jdecode('How+to+find+us'),jdecode(''),'/84/102.html','true',[],'']
	],''],
	['PAGE','4906',jdecode('GUESTBOOK+'),jdecode(''),'/4906.html','true',[],'']];
var siteelementCount=18;
theSitetree.topTemplateName='Aroundtheworld';
theSitetree.paletteFamily='77B484';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10790';
theSitetree.graphicsetId='11220';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='77B484';
var theTemplate={
				name: 			'Aroundtheworld',
				paletteFamily: 	'77B484',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10790',
				graphicsetId: 	'11220',
				contentColor: 	'FFFFFF',
				contentBGColor: '77B484',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'365D3D',
				e_color: 		'365D3D',
				f_color: 		'365D3D',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '63',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-4906ahw050inxst6']={
webappId:    '1002',
documentId:  '4906',
internalId:  '4906ahw050inxst6',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63',
internalId:  '',
customField: '20091117-105742'
};
webappMappings['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC245']={
webappId:    '5003',
documentId:  '63',
internalId:  'tid:1;pid:WSCSYSSSSLYTC245',
customField: 'en:US:'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84',
internalId:  '',
customField: '20091026-154114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93',
internalId:  '',
customField: '20091026-111448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102',
internalId:  '',
customField: '20080812-134249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '111',
internalId:  '',
customField: '20091116-133116'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '120',
internalId:  '',
customField: '20091026-111618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '129',
internalId:  '',
customField: '20080617-122053'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '138',
internalId:  '',
customField: '20080812-135421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '147',
internalId:  '',
customField: '20080616-150953'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '156',
internalId:  '',
customField: '20080812-135542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4906',
internalId:  '',
customField: '20080617-111513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4901',
internalId:  '',
customField: '20080617-111513'
};
webappMappings['7050']=webappMappings['7050-1704']={
webappId:    '7050',
documentId:  '10301',
internalId:  '1704',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10301',
internalId:  '',
customField: '20091026-161442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11401',
internalId:  '',
customField: '20091117-110115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11601',
internalId:  '',
customField: '20091117-111142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11801',
internalId:  '',
customField: '20091117-111954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13101',
internalId:  '',
customField: '20091207-105547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13501',
internalId:  '',
customField: '20091208-103500'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INXST6';
var companyName   = 'Long+Island+Elder+Care+LCSW%2C+PLLC';
var htmlTitle	  = 'LONG+ISLAND+ELDER+CARE';
var metaKeywords  = 'Home+Health+Care%2CCounseling%2C+community+services%2C+entitlements%2C+Long+Island%2C+Suffolk+County%2C+elder+care%2C+Medicaid%2C+meals+on+wheels%2C+Marital+counseling%2C+home+health+aide+services%2C+food+stamps%2C+nursing+home+placement%2C+assisted+living+placement%2C+Alzheimer%2C+dementia%2C+caregiver+support%2C+Parkinsons%2C+senior+citizens%2C+Geriatric+planning%2C+group+counseling%2C+psychotherapy%2C+therapy';
var metaContents  = 'At+Long+Island+Elder+Care+we+provide+homebound+counseling%2C+home+health+care%2C+consultations%2C+and+evaluations+for+community+services+and+entitlements.++Servicing+the+area+of+Suffolk+county+NY';
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();
};
