/* [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','42',jdecode('Home'),jdecode(''),'/42.html','true',[],'',''],
	['PAGE','3236',jdecode('Massage+Services'),jdecode(''),'/3236/index.html','true',[ 
		['PAGE','2423',jdecode('Swedish'),jdecode(''),'/3236/2423.html','true',[],'',''],
		['PAGE','2432',jdecode('Deep+Tissue'),jdecode(''),'/3236/2432.html','true',[],'',''],
		['PAGE','2441',jdecode('Sports'),jdecode(''),'/3236/2441.html','true',[],'',''],
		['PAGE','2450',jdecode('Pregnancy'),jdecode(''),'/3236/2450.html','true',[],'',''],
		['PAGE','5020',jdecode('Neuromuscular'),jdecode(''),'/3236/5020.html','true',[],'',''],
		['PAGE','2459',jdecode('CranioSacral'),jdecode(''),'/3236/2459.html','true',[],'',''],
		['PAGE','5029',jdecode('Myofascial+Release'),jdecode(''),'/3236/5029.html','true',[],'',''],
		['PAGE','5084',jdecode('Post-Injury'),jdecode(''),'/3236/5084.html','true',[],'',''],
		['PAGE','2468',jdecode('Reflexology'),jdecode(''),'/3236/2468.html','true',[],'',''],
		['PAGE','2477',jdecode('Geriatric'),jdecode(''),'/3236/2477.html','true',[],'',''],
		['PAGE','2915',jdecode('Executive+'),jdecode(''),'/3236/2915.html','true',[],'',''],
		['PAGE','4076',jdecode('Events+%26+Parties'),jdecode(''),'/3236/4076.html','true',[],'','']
	],'',''],
	['PAGE','2331',jdecode('Massage+Benefits'),jdecode(''),'/2331.html','true',[],'',''],
	['PAGE','2340',jdecode('Contact+Us'),jdecode(''),'/2340/index.html','true',[ 
		['PAGE','2811',jdecode('Contact+Us+%28follow+up+page%29'),jdecode(''),'/2340/2811.html','false',[],'','']
	],'',''],
	['PAGE','2258',jdecode('About+us'),jdecode(''),'/2258.html','true',[],'',''],
	['PAGE','4182',jdecode('Service+Policies'),jdecode(''),'/4182.html','true',[],'',''],
	['PAGE','2486',jdecode('Rates+%26+Offers'),jdecode(''),'/2486.html','true',[],'',''],
	['PAGE','3620',jdecode('Gift+Certificates'),jdecode(''),'/3620.html','true',[],'',''],
	['PAGE','3479',jdecode('Service+Areas'),jdecode(''),'/3479.html','true',[],'',''],
	['PAGE','3680',jdecode('Hours'),jdecode(''),'/3680.html','true',[],'',''],
	['PAGE','4690',jdecode('Testimonials'),jdecode(''),'/4690.html','true',[],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Caribic';
theSitetree.paletteFamily='8A652A';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10579';
theSitetree.graphicsetId='10713';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='B63636';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Caribic',
				paletteFamily: 	'8A652A',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10579',
				graphicsetId: 	'10713',
				contentColor: 	'FFFFFF',
				contentBGColor: 'B63636',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '42',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2486',
internalId:  '',
customField: '20100605-005626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42',
internalId:  '',
customField: '20100604-234908'
};
webappMappings['7008']=webappMappings['7008-8433']={
webappId:    '7008',
documentId:  '2340',
internalId:  '8433',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3236',
internalId:  '',
customField: '20080522-035405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2423',
internalId:  '',
customField: '20070814-184731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2432',
internalId:  '',
customField: '20070814-184822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2441',
internalId:  '',
customField: '20100605-001339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2450',
internalId:  '',
customField: '20100605-000728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5020',
internalId:  '',
customField: '20070815-023711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2459',
internalId:  '',
customField: '20100605-001942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5029',
internalId:  '',
customField: '20100605-002344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5084',
internalId:  '',
customField: '20080116-144512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2468',
internalId:  '',
customField: '20070814-233241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2477',
internalId:  '',
customField: '20100605-002751'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2915',
internalId:  '',
customField: '20080116-144802'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4076',
internalId:  '',
customField: '20100605-003023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2331',
internalId:  '',
customField: '20100605-003134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2340',
internalId:  '',
customField: '20080415-214245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2258',
internalId:  '',
customField: '20100605-004853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2811',
internalId:  '',
customField: '20061023-033933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4182',
internalId:  '',
customField: '20100605-005050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3620',
internalId:  '',
customField: '20100605-010534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3479',
internalId:  '',
customField: '20100605-010630'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3680',
internalId:  '',
customField: '20080116-135720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4690',
internalId:  '',
customField: '20100806-152919'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050IN3GID';
var companyName   = 'Healing+Hands+Massage';
var htmlTitle	  = 'healinghandsmassageaz.com';
var metaKeywords  = '';
var metaContents  = '';
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();
};

