/* [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','401',jdecode('Home'),jdecode(''),'/401/index.html','true',[ 
		['PAGE','46401',jdecode('Family+Options+%28follow+up+page%29'),jdecode(''),'/401/46401.html','false',[],'']
	],''],
	['PAGE','6601',jdecode('Service+Summary'),jdecode(''),'/6601/index.html','true',[ 
		['PAGE','89212',jdecode('Family+Therapy'),jdecode(''),'/6601/89212.html','true',[],''],
		['PAGE','89233',jdecode('Group+Therapy'),jdecode(''),'/6601/89233.html','true',[],''],
		['PAGE','89254',jdecode('Evaluation'),jdecode(''),'/6601/89254.html','true',[],''],
		['PAGE','90412',jdecode('Marriage+counseling'),jdecode(''),'/6601/90412.html','true',[],'']
	],''],
	['PAGE','35001',jdecode('Parenting'),jdecode(''),'/35001.html','true',[],''],
	['PAGE','35022',jdecode('Marital+Problems'),jdecode(''),'/35022.html','true',[],''],
	['PAGE','35043',jdecode('Sexual+Problems'),jdecode(''),'/35043.html','true',[],''],
	['PAGE','82312',jdecode('Trauma+Survivors'),jdecode(''),'/82312.html','true',[],''],
	['PAGE','473',jdecode('Therapists'),jdecode(''),'/473.html','true',[],''],
	['PAGE','52601',jdecode('Resources'),jdecode(''),'/52601.html','true',[],''],
	['PAGE','82333',jdecode('FAQs'),jdecode(''),'/82333.html','true',[],''],
	['PAGE','89317',jdecode('Office+Location'),jdecode(''),'/89317.html','true',[],''],
	['PAGE','35085',jdecode('Contact+Us'),jdecode(''),'/35085/index.html','true',[ 
		['PAGE','82354',jdecode('Dr.+Tracy%26%23x27%3Bs+blog'),jdecode(''),'/35085/82354.html','true',[],'']
	],''],
	['PAGE','89296',jdecode('Your+forum'),jdecode(''),'/89296.html','true',[],''],
	['PAGE','89275',jdecode('Search'),jdecode(''),'/89275.html','true',[],'']];
var siteelementCount=19;
theSitetree.topTemplateName='cutout';
theSitetree.paletteFamily='BEDEB5';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10611';
theSitetree.graphicsetId='10477';
theSitetree.contentColor='43637C';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'cutout',
				paletteFamily: 	'BEDEB5',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10611',
				graphicsetId: 	'10477',
				contentColor: 	'43637C',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'FFFFFF',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20091008-192247'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20090823-125034'
};
webappMappings['1501']=webappMappings['1501-5651618']={
webappId:    '1501',
documentId:  '401',
internalId:  '5651618',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-443']={
webappId:    '7008',
documentId:  '401',
internalId:  '443',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46401',
internalId:  '',
customField: '20070715-134830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6601',
internalId:  '',
customField: '20090823-143625'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35001',
internalId:  '',
customField: '20090626-124616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35022',
internalId:  '',
customField: '20091018-164621'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35043',
internalId:  '',
customField: '20090823-125734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52601',
internalId:  '',
customField: '20090705-082925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35085',
internalId:  '',
customField: '20090802-174824'
};
webappMappings['7050']=webappMappings['7050-191']={
webappId:    '7050',
documentId:  '82354',
internalId:  '191',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82333',
internalId:  '',
customField: '20090802-174428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82354',
internalId:  '',
customField: '20090702-130944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82312',
internalId:  '',
customField: '20090823-141508'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '89275',
internalId:  'search',
customField: 'language:en;country:US;'
};
webappMappings['1003']=webappMappings['1003-aaplu0inxxvd122d294df34']={
webappId:    '1003',
documentId:  '89296',
internalId:  'aaplu0inxxvd122d294df34',
customField: 'en:US'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '89317',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89233',
internalId:  '',
customField: '20090803-124259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89212',
internalId:  '',
customField: '20090731-140249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89254',
internalId:  '',
customField: '20090823-125704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89296',
internalId:  '',
customField: '20090823-144305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89317',
internalId:  '',
customField: '20090731-143048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89275',
internalId:  '',
customField: '20090731-143722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '90412',
internalId:  '',
customField: '20090801-045816'
};
var canonHostname = 'cm4all.aplus.net';
var accountId     = 'AAPLU0INXXVD';
var companyName   = 'Family+Options+mental+health+counseling%2C+therapy%2C+and+evaluation';
var htmlTitle	  = 'Mental+health+counseling+services';
var metaKeywords  = 'family+therapy%2C+counseling%2C+psychotherapy%2C+depression%2C+anxiety%2C+sexual+trauma%2C+sexual+addiction%2C+sexual+abuse%2C+marital+counseling%2C+Tracy+Mallett%2C+Jason+Vinson%2C+Dr.+Tracy%2C+Dr.+Tracy+Mallett%2C+sexual+offender%2C+sexual+offender+treatment%2C+incest+treatment%2C+premarital+counseling%2C+Mental+health+counseling+broward%2C+Psychotherapy+broward%2C+Psychotherapy+broward%2C+Depression+help+broward%2C+Anxiety+help+broward%2C+Couples+therapy+broward%2C+Couples+counseling+broward%2C+Therapist+broward%2C+Counselor+broward';
var metaContents  = 'Mental+health+counseling%2C+evaluation%2C+and+psychotherapy+services+in+south+Florida%2C+addressing+relationship+problems%2C+parenting+challenges%2C+adoption+issues%2C+depression%2C+anxiety%2C+trauma+resolution%2C+sexual+abuse%2C+addiction%2C+and+infidelity.';
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();
};
