/* [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','2501',jdecode('Home'),jdecode(''),'/2501.html','true',[],''],
	['PAGE','2552',jdecode('Confidentiality'),jdecode(''),'/2552.html','true',[],''],
	['PAGE','2573',jdecode('Admissions+Criteria'),jdecode(''),'/2573.html','true',[],''],
	['PAGE','2594',jdecode('Treatment+Philosophy'),jdecode(''),'/2594/index.html','true',[ 
		['PAGE','2657',jdecode('Mission+Statement'),jdecode(''),'/2594/2657.html','true',[],'']
	],''],
	['PAGE','2615',jdecode('Main+Services'),jdecode(''),'/2615/index.html','true',[ 
		['PAGE','2801',jdecode('Auricular+Acupuncture'),jdecode(''),'/2615/2801.html','true',[],''],
		['PAGE','3101',jdecode('Herbal+Treatment'),jdecode(''),'/2615/3101.html','true',[],''],
		['PAGE','2901',jdecode('Individual+Couseling'),jdecode(''),'/2615/2901.html','true',[],''],
		['PAGE','3001',jdecode('Urine+Toxicology'),jdecode(''),'/2615/3001.html','true',[],''],
		['PAGE','3122',jdecode('Therapy+Groups'),jdecode(''),'/2615/3122.html','true',[],'']
	],''],
	['PAGE','12512',jdecode('Groups'),jdecode(''),'/12512/index.html','true',[ 
		['PAGE','3143',jdecode('Alcohol+Education'),jdecode(''),'/12512/3143.html','true',[],''],
		['PAGE','3164',jdecode('Relapse+Prevention'),jdecode(''),'/12512/3164.html','true',[],''],
		['PAGE','3185',jdecode('Coping+%26+Connecting'),jdecode(''),'/12512/3185.html','true',[],''],
		['PAGE','3206',jdecode('Living+Drug+Free'),jdecode(''),'/12512/3206.html','true',[],''],
		['PAGE','3227',jdecode('Parenting+Skills'),jdecode(''),'/12512/3227.html','true',[],''],
		['PAGE','3248',jdecode('Stress+Management'),jdecode(''),'/12512/3248.html','true',[],''],
		['PAGE','3269',jdecode('Men%26%23x27%3Bs+Group'),jdecode(''),'/12512/3269.html','true',[],''],
		['PAGE','3290',jdecode('Women%26%23x27%3Bs+Group'),jdecode(''),'/12512/3290.html','true',[],''],
		['PAGE','3311',jdecode('12+Steps+Preparation'),jdecode(''),'/12512/3311.html','true',[],'']
	],''],
	['PAGE','9401',jdecode('Group+Schedule'),jdecode(''),'/9401/index.html','true',[ 
		['PAGE','17912',jdecode('Monday'),jdecode(''),'/9401/17912.html','true',[],''],
		['PAGE','17933',jdecode('Tuesday'),jdecode(''),'/9401/17933.html','true',[],''],
		['PAGE','17954',jdecode('Wedenesday'),jdecode(''),'/9401/17954.html','true',[],''],
		['PAGE','17975',jdecode('Thursday'),jdecode(''),'/9401/17975.html','true',[],''],
		['PAGE','17996',jdecode('Friday'),jdecode(''),'/9401/17996.html','true',[],'']
	],''],
	['PAGE','21045',jdecode('Acupuncture+Training'),jdecode(''),'/21045.html','true',[],''],
	['PAGE','22845',jdecode('Conferences+and+Publications'),jdecode(''),'/22845/index.html','true',[ 
		['PAGE','22945',jdecode('NADA+Conference'),jdecode(''),'/22845/22945.html','true',[],'']
	],''],
	['PAGE','9301',jdecode('Literature'),jdecode(''),'/9301/index.html','true',[ 
		['PAGE','19634',jdecode('Understanding+Acupuncture'),jdecode(''),'/9301/19634.html','true',[],''],
		['PAGE','21545',jdecode('The+Process+of+Withdrawal'),jdecode(''),'/9301/21545.html','true',[],''],
		['PAGE','21145',jdecode('The+Healing+Crisis'),jdecode(''),'/9301/21145.html','true',[],''],
		['PAGE','21245',jdecode('The+NADA+Protocol'),jdecode(''),'/9301/21245.html','true',[],'']
	],''],
	['PAGE','9422',jdecode('Program+Hours'),jdecode(''),'/9422.html','true',[],''],
	['PAGE','2636',jdecode('Address'),jdecode(''),'/2636.html','true',[],''],
	['PAGE','2678',jdecode('Contact+us'),jdecode(''),'/2678.html','true',[],''],
	['PAGE','9101',jdecode('Weather'),jdecode(''),'/9101.html','true',[],''],
	['PAGE','9701',jdecode('Links'),jdecode(''),'/9701.html','true',[],''],
	['PAGE','8901',jdecode('Guestbook'),jdecode(''),'/8901.html','true',[],'']];
var siteelementCount=41;
theSitetree.topTemplateName='Case';
theSitetree.paletteFamily='82C1DC';
theSitetree.keyvisualId='11060';
theSitetree.keyvisualName='kv_11060.jpg';
theSitetree.fontsetId='31939';
theSitetree.graphicsetId='13781';
theSitetree.contentColor='0280B4';
theSitetree.contentBGColor='F6FBFE';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Case',
				paletteFamily: 	'82C1DC',
				keyvisualId: 	'11060',
				keyvisualName: 	'kv_11060.jpg',
				fontsetId: 		'31939',
				graphicsetId: 	'13781',
				contentColor: 	'0280B4',
				contentBGColor: 'F6FBFE',
				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: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '2636',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['7008']=webappMappings['7008-14792']={
webappId:    '7008',
documentId:  '2678',
internalId:  '14792',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2501',
internalId:  '',
customField: '20090331-113124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2615',
internalId:  '',
customField: '20090321-100849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3122',
internalId:  '',
customField: '20090321-080938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3143',
internalId:  '',
customField: '20090319-095515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3164',
internalId:  '',
customField: '20090319-094736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3206',
internalId:  '',
customField: '20090319-094927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3227',
internalId:  '',
customField: '20090321-104203'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3311',
internalId:  '',
customField: '20090319-095448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2636',
internalId:  '',
customField: '20090319-104222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2573',
internalId:  '',
customField: '20090321-113916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2552',
internalId:  '',
customField: '20090321-081706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2594',
internalId:  '',
customField: '20090321-100546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2657',
internalId:  '',
customField: '20090319-093807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2801',
internalId:  '',
customField: '20090321-094821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3101',
internalId:  '',
customField: '20090319-094113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2901',
internalId:  '',
customField: '20090319-094205'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3001',
internalId:  '',
customField: '20090319-094302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3185',
internalId:  '',
customField: '20090319-094828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3248',
internalId:  '',
customField: '20090319-095050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3269',
internalId:  '',
customField: '20090319-095229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3290',
internalId:  '',
customField: '20090319-095354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2678',
internalId:  '',
customField: '20090319-120921'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2501',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-8901aendu0in3wza']={
webappId:    '1002',
documentId:  '8901',
internalId:  '8901aendu0in3wza',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8901',
internalId:  '',
customField: '20090319-111013'
};
webappMappings['7080']=webappMappings['7080-449']={
webappId:    '7080',
documentId:  '9101',
internalId:  '449',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9101',
internalId:  '',
customField: '20090321-112917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9301',
internalId:  '',
customField: '20090319-144305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9401',
internalId:  '',
customField: '20090319-144154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9422',
internalId:  '',
customField: '20090321-122721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17933',
internalId:  '',
customField: '20090323-122802'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17912',
internalId:  '',
customField: '20090323-122720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9701',
internalId:  '',
customField: '20090319-144740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22945',
internalId:  '',
customField: '20090402-092027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22845',
internalId:  '',
customField: '20090402-090501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21545',
internalId:  '',
customField: '20090401-105343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21245',
internalId:  '',
customField: '20090401-145829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21145',
internalId:  '',
customField: '20090401-105024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21045',
internalId:  '',
customField: '20090401-091309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19634',
internalId:  '',
customField: '20090401-114823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17996',
internalId:  '',
customField: '20090323-123019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17975',
internalId:  '',
customField: '20090323-123301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17954',
internalId:  '',
customField: '20090323-122834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12512',
internalId:  '',
customField: '20090321-081204'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0IN3WZA';
var companyName   = 'Lincoln+Recovery+Center';
var htmlTitle	  = 'Lincoln+Recovery+Center';
var metaKeywords  = 'Recovery%2C+drug+program%2C+group+theraphy%2C+drug+addiction%2C+substance+abuse%2C+chemical+dependency%2C+Lincoln+Hospital%2C+TeamOne%2C+oocaine%2C+alcohol%2C+beer%2C+crack%2C+crack+cocain%2C+opiates%2C+methadone%2C+jail%2C+acs%2C+parole%2C+probation%2C+police%2C+mariguana%2C+thc%2C+marijuana%2C+problems%2C+drunk+driving%2C+drunk%2C+AA%2C+NA';
var metaContents  = 'Lincoln+Recovery+is+a+chemical+dependency+outpatient+program+licensed+by+the+New+York+State+Office+of+Alcoholism+and+Substance+Abuse+Service+%28OASAS%29+as+an+outpatient+chemical+dependency+program+open+to+all+persons+who+are+in+need+of+chemical+dependency+services.+Lincoln+Recovery+Center+is+a+worldwide+pilot+program+in+auricular+acupuncture+for+the+detoxification+and+treatment+of+drug-addicted+persons.+Lincoln+Recovery+Center+has+used+auricular+acupuncture+as+the+primary+method+of+treatment+for+drug+addicted+persons+and+its+acupuncture+model+is+used+for+more+than+one+thousand+programs+worldwide.+';
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();
};

