/* [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','1601',jdecode('Massage+Therapy'),jdecode(''),'/1601.html','true',[],''],
	['PAGE','3643',jdecode('About+Kate'),jdecode(''),'/3643.html','true',[],''],
	['PAGE','6201',jdecode('Testimonials+for+Kate'),jdecode(''),'/6201.html','true',[],''],
	['PAGE','3664',jdecode('About+Galen'),jdecode(''),'/3664/index.html','false',[ 
		['PAGE','18301',jdecode('Testimonials'),jdecode(''),'/3664/18301.html','true',[],'']
	],''],
	['PAGE','7101',jdecode('Can+Massage+Help+You%3F'),jdecode(''),'/7101.html','true',[],''],
	['PAGE','3601',jdecode('Services'),jdecode(''),'/3601.html','false',[],''],
	['PAGE','3622',jdecode('Massage+Therapy+Rates'),jdecode(''),'/3622.html','true',[],''],
	['PAGE','3685',jdecode('Current+Specials'),jdecode(''),'/3685.html','true',[],''],
	['PAGE','35223',jdecode('Purchase+Services+'),jdecode(''),'/35223.html','false',[],''],
	['PAGE','3748',jdecode('Office+Hours%2FContact'),jdecode(''),'/3748.html','true',[],''],
	['PAGE','4701',jdecode('How+to+Find+Us...'),jdecode(''),'/4701.html','true',[],''],
	['PAGE','2706',jdecode('Guestbook'),jdecode(''),'/2706.html','true',[],''],
	['PAGE','45748',jdecode('Email+me...'),jdecode(''),'/45748.html','false',[],''],
	['PAGE','46048',jdecode('Purchases'),jdecode(''),'/46048.html','false',[],'']];
var siteelementCount=15;
theSitetree.topTemplateName='Antigua';
theSitetree.paletteFamily='617F92';
theSitetree.keyvisualId='6906';
theSitetree.keyvisualName='kv_6906.jpg';
theSitetree.fontsetId='11214';
theSitetree.graphicsetId='12036';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='809DAF';
var theTemplate={
				name: 			'Antigua',
				paletteFamily: 	'617F92',
				keyvisualId: 	'6906',
				keyvisualName: 	'kv_6906.jpg',
				fontsetId: 		'11214',
				graphicsetId: 	'12036',
				contentColor: 	'FFFFFF',
				contentBGColor: '809DAF',
				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: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-2706ahw050invu1e']={
webappId:    '1002',
documentId:  '2706',
internalId:  '2706ahw050invu1e',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1601',
internalId:  '',
customField: '20091113-172501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1601',
internalId:  '1006',
customField: '1006'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '4701',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3643',
internalId:  '',
customField: '20091113-172535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6201',
internalId:  '',
customField: '20091113-172555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3664',
internalId:  '',
customField: '20081112-200332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18301',
internalId:  '',
customField: '20081027-184646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7101',
internalId:  '',
customField: '20091113-172621'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3601',
internalId:  '',
customField: '20081112-031236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3622',
internalId:  '',
customField: '20091113-172644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3685',
internalId:  '',
customField: '20091113-172709'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3748',
internalId:  '',
customField: '20091215-193419'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4701',
internalId:  '',
customField: '20091113-171453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2706',
internalId:  '',
customField: '20091113-172812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35223',
internalId:  '',
customField: '20090107-181648'
};
webappMappings['7008']=webappMappings['7008-4112']={
webappId:    '7008',
documentId:  '45748',
internalId:  '4112',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46048',
internalId:  '',
customField: '20090716-231215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45748',
internalId:  '',
customField: '20090716-223844'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INVU1E';
var companyName   = 'Anatomy+of+Massage+-+Services+with+your+Body+in+Mind%21';
var htmlTitle	  = 'Kate+Sullivan+++%7E+Certified+Massage+Therapist+%7E';
var metaKeywords  = 'massage+Sacramento%2C+massage+therapy+Sacramento%2C+massage+therapist+Sacramento%2C+neck+pain%2C+shoulder+pain%2C+back+pain%2C+hip+pain%2C+relaxation%2C+anxiety%2C+stress+reduction+kate+sullivan+therapeutic+massage+medical+massage+massage+therapist+injury+recovery+carpel+tunnel%2C+numb%2C+aching%2C+sciatic+pain+relief%2C+sciatica%2C+chronic+pain+relief%2C+surgery+recovery%2C+downtown+Sacramento%2C+midtown+Sacramento%2C+certified+massage+therapist%2C+CMT';
var metaContents  = 'Kate+is+passionate+about+providing+relaxation+and+therapeutic+treatment+massage+to+melt+away+your+tension%2C+aches+and+pains+so+you+can+move+through+your+day+with+increased+ease+and+comfort%2C+feeling+refreshed+and+rejuvenated.Kates+practice%2C+located+in+midtown+Sacramento%2C+resides+in+a+professional+office+building+and+has+free%2C+off+street+parking.++';
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();
};
