/* [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','2801',jdecode('Home'),jdecode(''),'/2801.html','true',[],'',''],
	['PAGE','2873',jdecode('Massage+Techniques'),jdecode(''),'/2873.html','true',[],'',''],
	['PAGE','6401',jdecode('Massage+Modalities'),jdecode(''),'/6401.html','false',[],'',''],
	['PAGE','2894',jdecode('Hours+%26+Rates'),jdecode(''),'/2894.html','true',[],'',''],
	['PAGE','3101',jdecode('Contact+Us'),jdecode(''),'/3101.html','true',[],'',''],
	['PAGE','2852',jdecode('Living+Healthy'),jdecode(''),'/2852.html','true',[],'',''],
	['PAGE','5701',jdecode('Community+Connections'),jdecode(''),'/5701.html','true',[],'','']];
var siteelementCount=7;
theSitetree.topTemplateName='Odd';
theSitetree.paletteFamily='DCE5FA';
theSitetree.keyvisualId='12126';
theSitetree.keyvisualName='kv_12126.jpg';
theSitetree.fontsetId='33321';
theSitetree.graphicsetId='14195';
theSitetree.contentColor='5C657A';
theSitetree.contentBGColor='DCE5FA';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Odd',
				paletteFamily: 	'DCE5FA',
				keyvisualId: 	'12126',
				keyvisualName: 	'kv_12126.jpg',
				fontsetId: 		'33321',
				graphicsetId: 	'14195',
				contentColor: 	'5C657A',
				contentBGColor: 'DCE5FA',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Palatino Linotype, Book Antiqua, Palatino, serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2801',
internalId:  '',
customField: '20110817-183319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2852',
internalId:  '',
customField: '20101122-121447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2873',
internalId:  '',
customField: '20101122-125322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2894',
internalId:  '',
customField: '20110817-183458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3101',
internalId:  '',
customField: '20110817-183552'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5701',
internalId:  '',
customField: '20101122-105515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6401',
internalId:  '',
customField: '20101122-125157'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0INZ790';
var companyName   = 'Utah+Medical+Massage';
var htmlTitle	  = 'Utah+Medical+Massage+-+Massage+Therapy+in+Downtown+Provo';
var metaKeywords  = 'massage%2C+medical%2C+therapy%2C+therapist%2C+chiropractor%2C+hand%2C+foot%2C+feet%2C+wrist%2C+arm%2C+shoulder%2C+knee%2C+hip%2C+leg%2C+toes%2C+fingers%2C+carpal+tunnel%2C+back%2C+neck%2C+low%2C+pain%2C+hurt%2C+muscle%2C+ligament%2C+acl%2C+mcl%2C+scar%2C+tissue%2C+aromatherapy%2C+oil%2C+lotion%2C+shiatsu%2C+accupressure%2C+accupuncture%2C+doctor%2C+fibromyalgia%2C+plantar+fasciitis%2C+problems%2C+sleep%2C+relax%2C+relaxing%2C+relaxation%2C+circulation%2C+lymphatic%2C+cancer%2C+lymph%2C+node%2C+swelling%2C+injury%2C+sports%2C+athletic%2C+athlete%2C+professional%2C+thai%2C+kitchen%2C+asian%2C+market%2C+las+tinajas%2C+provo%2C+utah%2C+downtown%2C+teacher%2C+school%2C+health%2C+fair%2C+appreciation%2C+free%2C+discount%2C+special%2C+hour%2C+trained%2C+licensed%2C+surgery%2C+recovery%2C+fragile%2C+healthy%2C+happy%2C+live%2C+price%2C+chair%2C+table%2C+stretch%2C+insurance%2C+work%2C+accident%2C+car%2C+injury%2C+fall%2C+christmas%2C+gift%2C+certificates%2C+family%2C+mom%2C+dad%2C+anniversary%2C+birthday%2C+long%2C+relief%2C+gluteal%2C+hip%2C+butt%2C+buttocks%2C+piriformis%2C+chest%2C+pectoralis%2C+pecs%2C+strength%2C+stretch%2C+motion%2C+rom%2C+range%2C+of%2C+tmj%2C+temporomandibular%2C+joint%2C+craniosacral%2C+pregnancy%2C+maternity%2C+prenatal%2C+baby%2C+infant%2C+elderly%2C+geriatric%2C+diabetes%2C+discoloration%2C+heel%2C+bone%2C+blade%2C+ear%2C+elbow%2C+abdomen%2C+stomach%2C+refer%2C+off%2C+repair%2C+recover%2C+deep%2C+tissue%2C+sports%2C+swedish%2C+do+terra%2C+walmart%2C+yozone';
var metaContents  = 'Utah+Medical+Massage+275+East+300+South+in+downtown+Provo+offers+medical-based+massage+therapy+services+such+as%3A+deep+tissue%2C+sports%2C+Swedish%2C+geriatric%2C+circulatory%2C+lymphatic%2C+pregnancy+and+post-pregnancy+massage+therapies%2C+as+well+as+injury+and+accident+therapy%2C+trigger+point+therapy%2C+and+assisted+PNF+stretching+in+a+relaxed+professional+setting.';
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();
};

