/* [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','1801',jdecode('Home'),jdecode(''),'/1801.html','true',[],''],
	['PAGE','1852',jdecode('Bodywork'),jdecode(''),'/1852/index.html','true',[ 
		['PAGE','1873',jdecode('Massage'),jdecode(''),'/1852/1873.html','true',[],''],
		['PAGE','1894',jdecode('Craniosacral'),jdecode(''),'/1852/1894.html','true',[],''],
		['PAGE','1915',jdecode('Touch+Therapy'),jdecode(''),'/1852/1915.html','true',[],''],
		['PAGE','1936',jdecode('Ten+Zo'),jdecode(''),'/1852/1936.html','true',[],''],
		['PAGE','6201',jdecode('Pricing'),jdecode(''),'/1852/6201.html','true',[],'']
	],''],
	['PAGE','1957',jdecode('Special+Needs'),jdecode(''),'/1957.html','true',[],''],
	['PAGE','1978',jdecode('Health+%26+Fitness'),jdecode(''),'/1978/index.html','true',[ 
		['PAGE','1999',jdecode('Training'),jdecode(''),'/1978/1999.html','true',[],''],
		['PAGE','9201',jdecode('Nutrition'),jdecode(''),'/1978/9201.html','true',[],''],
		['PAGE','6222',jdecode('Pricing'),jdecode(''),'/1978/6222.html','true',[],''],
		['PAGE','2020',jdecode('Fitness+Store'),jdecode(''),'/1978/2020.html','true',[],'']
	],''],
	['PAGE','14201',jdecode('Spa+Services'),jdecode(''),'/14201.html','true',[],''],
	['PAGE','2041',jdecode('Advice+Column'),jdecode(''),'/2041.html','true',[],''],
	['PAGE','2062',jdecode('About+Us'),jdecode(''),'/2062.html','true',[],''],
	['PAGE','2083',jdecode('Contact+Us'),jdecode(''),'/2083.html','true',[],''],
	['PAGE','2104',jdecode('Guest+Book'),jdecode(''),'/2104.html','true',[],''],
	['PAGE','2125',jdecode('Resource+Links'),jdecode(''),'/2125.html','true',[],'']];
var siteelementCount=19;
theSitetree.topTemplateName='Holz';
theSitetree.paletteFamily='C239A1';
theSitetree.keyvisualId='8817';
theSitetree.keyvisualName='KV_03.swf';
theSitetree.fontsetId='17181';
theSitetree.graphicsetId='12652';
theSitetree.contentColor='FFBEEF';
theSitetree.contentBGColor='262626';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Holz',
				paletteFamily: 	'C239A1',
				keyvisualId: 	'8817',
				keyvisualName: 	'KV_03.swf',
				fontsetId: 		'17181',
				graphicsetId: 	'12652',
				contentColor: 	'FFBEEF',
				contentBGColor: '262626',
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'C039A3',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-2104aendu0in32xm']={
webappId:    '1002',
documentId:  '2104',
internalId:  '2104aendu0in32xm',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1801',
internalId:  '',
customField: '20090913-175150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1852',
internalId:  '',
customField: '20090912-170248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1873',
internalId:  '',
customField: '20090912-180158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1894',
internalId:  '',
customField: '20090729-161901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1915',
internalId:  '',
customField: '20090729-165940'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1936',
internalId:  '',
customField: '20090729-171647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1957',
internalId:  '',
customField: '20090912-134347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1978',
internalId:  '',
customField: '20090912-155733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1999',
internalId:  '',
customField: '20090912-181327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2020',
internalId:  '',
customField: '20090912-215833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2041',
internalId:  '',
customField: '20100329-192727'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6201',
internalId:  '',
customField: '20100329-195326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6222',
internalId:  '',
customField: '20100329-195352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2062',
internalId:  '',
customField: '20100329-192825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2083',
internalId:  '',
customField: '20090912-135110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2125',
internalId:  '',
customField: '20100329-195438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2104',
internalId:  '',
customField: '20090912-133500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9201',
internalId:  '',
customField: '20090912-221901'
};
webappMappings['1501']=webappMappings['1501-22323777']={
webappId:    '1501',
documentId:  '1801',
internalId:  '22323777',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14201',
internalId:  '',
customField: '20100329-195413'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0IN32XM';
var companyName   = 'TOTAL+BODY+FITNESS';
var htmlTitle	  = 'Total+Body+Fitness';
var metaKeywords  = 'health%2C+fitness%2C+bodywork%2C+practitioner%2C+massage%2C+fitness+training%2C+personal+training%2C+wellness%2C+ten+zo%2C+craniosacral%2C+therapy%2C+nutrition%2C+cancer%2C+pregnancy%2C+special+needs%2C+special+populations%2C+autism%2C+parkinsons%2C+cerebral+palsy%2C+spinal+cord+injuries%2C+fibromyalgia%2C+arthritis%2C+athletes%2C+injury+management%2C+rehabilitation%2C+body+mechanics%2C+posture%2C+seniors%2C+weight+management%2C+body+mechanics%2C+structural+bodywork';
var metaContents  = 'Total+Body+Fitness+provides+various+healing+modalities+to+assist+individuals+in+their+physical%2C+emotional%2C+mental+and+spiritual+inner+healing.+Services+include+massage+therapy%2C+myotherapy%2C+craniosacral+therapy%2C+touch+therapy%2C+ten+zo%2C+structural+balancing%2C+postural+retraining+and+fitness+training%2C+with+each+service+based+upon+individual+needs%2C+including+our+special+needs+population.';
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();
};
