/* [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','3401',jdecode('Home'),jdecode(''),'/3401.html','true',[],'',''],
	['PAGE','3452',jdecode('Business+hours'),jdecode(''),'/3452.html','true',[],'',''],
	['PAGE','9501',jdecode('Special+Offers'),jdecode(''),'/9501.html','true',[],'',''],
	['PAGE','62001',jdecode('Gift+Certificates'),jdecode(''),'/62001.html','true',[],'',''],
	['PAGE','3578',jdecode('Massage+Rates'),jdecode(''),'/3578.html','true',[],'',''],
	['PAGE','58301',jdecode('Bowen+Rates'),jdecode(''),'/58301.html','true',[],'',''],
	['PAGE','16501',jdecode('Chair+Rates'),jdecode(''),'/16501.html','true',[],'',''],
	['PAGE','3494',jdecode('Contact+us'),jdecode(''),'/3494/index.html','true',[ 
		['PAGE','3515',jdecode('Address'),jdecode(''),'/3494/3515.html','true',[],'',''],
		['PAGE','3536',jdecode('How+to+find+us'),jdecode(''),'/3494/3536.html','true',[],'','']
	],'',''],
	['PAGE','16543',jdecode('Policies'),jdecode(''),'/16543.html','true',[],'',''],
	['PAGE','61701',jdecode('Office+view'),jdecode(''),'/61701.html','true',[],'',''],
	['PAGE','13506',jdecode('Testimonials'),jdecode(''),'/13506/index.html','true',[ 
		['PAGE','13501',jdecode('Read+'),jdecode(''),'/13506/13501.html','false',[],'','']
	],'',''],
	['PAGE','75101',jdecode('Classes'),jdecode(''),'/75101.html','true',[],'',''],
	['PAGE','83604',jdecode('Schedule+Now'),jdecode(''),'/83604.html','true',[],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Angkor';
theSitetree.paletteFamily='A5B351';
theSitetree.keyvisualId='6853';
theSitetree.keyvisualName='kv_6853.jpg';
theSitetree.fontsetId='11211';
theSitetree.graphicsetId='12031';
theSitetree.contentColor='657025';
theSitetree.contentBGColor='C1CF70';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Angkor',
				paletteFamily: 	'A5B351',
				keyvisualId: 	'6853',
				keyvisualName: 	'kv_6853.jpg',
				fontsetId: 		'11211',
				graphicsetId: 	'12031',
				contentColor: 	'657025',
				contentBGColor: 'C1CF70',
				a_color: 		'C1CF70',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '3401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3401',
internalId:  '',
customField: '20100513-145949'
};
webappMappings['1002']=webappMappings['1002-13506AHW050INX260']={
webappId:    '1002',
documentId:  '13506',
internalId:  '13506AHW050INX260',
customField: 'icq=false'
};
webappMappings['1501']=webappMappings['1501-124195']={
webappId:    '1501',
documentId:  '3401',
internalId:  '124195',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-0c27752c62df86c97dfd9ce6b40a61fd']={
webappId:    '7060',
documentId:  '61701',
internalId:  '0c27752c62df86c97dfd9ce6b40a61fd',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9501',
internalId:  '',
customField: '20090928-143154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3452',
internalId:  '',
customField: '20100513-150248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62001',
internalId:  '',
customField: '20080107-174601'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3578',
internalId:  '',
customField: '20090928-143011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83604',
internalId:  '',
customField: '20100513-115757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58301',
internalId:  '',
customField: '20090811-201137'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16501',
internalId:  '',
customField: '20100422-143956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3494',
internalId:  '',
customField: '20090928-143252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3515',
internalId:  '',
customField: '20080929-153331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3536',
internalId:  '',
customField: '20061210-141551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16543',
internalId:  '',
customField: '20090721-195414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61701',
internalId:  '',
customField: '20080121-163508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13506',
internalId:  '',
customField: '20070218-214052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13501',
internalId:  '',
customField: '20070304-155302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75101',
internalId:  '',
customField: '20080530-214016'
};
webappMappings['7008']=webappMappings['7008-1507']={
webappId:    '7008',
documentId:  '3494',
internalId:  '1507',
customField: 'language:en;country:US;'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INX260';
var companyName   = 'Elizabeth%27s+Massage+Therapy';
var htmlTitle	  = 'Hot+Stone+Massage%2C+Relaxation+Massage+or+Bowenwork%3A+Need+a+Massage+Gift+Certificate%3F+You+can+now+get+one+online+or+call+and+pick+one+up+from+my+office%21Forest+Grove%2C+Pacific+Uninersity';
var metaKeywords  = 'Forest+Grove+Oregon%2C+Hot+Stone+Massage%2Csidelying+massage%2C+relaxation+massage%2C+Elizabeth+Dimick+lmt%2C+cornelius%2C+Hillsboro%2C+Elizabeth+%2C+insurance+billing%2C+gift+certificates%2C+chair+massage%2C+onsite+massage%2C+banks+oregon%2C+gaston+oregon%2C+small+animal+massage%2C+forest+grove+chamber+memeber%2C+amta+memeber%2C+nationally+certified%2C+Certified+PreNatal+Massage%2C5033807753';
var metaContents  = 'Elizabeth+Dimick%2C+Elizabeths+massage+therapy%2C+cornelius%2C+forest+Grove%2C+Hot+stone%2C+relaxation%2C+insuarnce+billing%2C+massage%2C+side-lying+massage%2C+Hillsboro%2C+chair+massage%2C+onsite+massage.+small+animal+massage%2C+forest+grove+chamber+memeber%2C+amta+member%2C+Nationally+certified%2C+Certified+Prenatal+massage%2C5033807753';
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();
};
