/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','825',jdecode('Contact+%26+Directions'),jdecode(''),'/825.html','true',[],'',''],
	['PAGE','79623',jdecode('Join+Our+Mailing+List'),jdecode(''),'/79623.html','true',[],'',''],
	['PAGE','552',jdecode('About+Us'),jdecode(''),'/552.html','true',[],'',''],
	['PAGE','6506',jdecode('Guestbook+%26++Feedback'),jdecode(''),'/6506.html','true',[],'',''],
	['PAGE','783',jdecode('Monthly+Special'),jdecode(''),'/783.html','true',[],'',''],
	['PAGE','82223',jdecode('Upcoming+Events'),jdecode(''),'/82223.html','true',[],'',''],
	['PAGE','122734',jdecode('HCG+Weight+Loss+Diet'),jdecode(''),'/122734.html','true',[],'',''],
	['PAGE','615',jdecode('Skin+Care%7EFace+%26+Body'),jdecode(''),'/615/index.html','true',[ 
		['PAGE','636',jdecode('Anti-Aging+Facials'),jdecode(''),'/615/636.html','true',[],'',''],
		['PAGE','657',jdecode('Microdermabrasion'),jdecode(''),'/615/657.html','true',[],'',''],
		['PAGE','678',jdecode('Peels'),jdecode(''),'/615/678.html','true',[],'',''],
		['PAGE','699',jdecode('Body+Treatments'),jdecode(''),'/615/699.html','true',[],'','']
	],'',''],
	['PAGE','741',jdecode('Beauty'),jdecode(''),'/741/index.html','true',[ 
		['PAGE','88223',jdecode('Eyelash+Perming'),jdecode(''),'/741/88223.html','true',[],'',''],
		['PAGE','762',jdecode('Tinting%3A+Brows+to+Goatees'),jdecode(''),'/741/762.html','true',[],'',''],
		['PAGE','909',jdecode('Teeth+Whitening'),jdecode(''),'/741/909.html','true',[],'','']
	],'',''],
	['PAGE','972',jdecode('Massage'),jdecode(''),'/972.html','true',[],'',''],
	['PAGE','110534',jdecode('Carbon+Infrared+Sauna'),jdecode(''),'/110534.html','true',[],'',''],
	['PAGE','720',jdecode('Full+Body+Waxing'),jdecode(''),'/720.html','true',[],'',''],
	['PAGE','112534',jdecode('Vinatherapy+Treatments'),jdecode(''),'/112534.html','true',[],'',''],
	['PAGE','91123',jdecode('Spa+Parties'),jdecode(''),'/91123.html','true',[],'',''],
	['PAGE','122834',jdecode('hair+by+jackie'),jdecode(''),'/122834.html','true',[],'',''],
	['PAGE','5901',jdecode('Products'),jdecode(''),'/5901.html','true',[],'',''],
	['PAGE','9001',jdecode('Spa+Etiquette'),jdecode(''),'/9001.html','true',[],'',''],
	['PAGE','13801',jdecode('Spa+Photo+Album'),jdecode(''),'/13801.html','true',[],'',''],
	['PAGE','23201',jdecode('Friends+%26+Neighbors'),jdecode(''),'/23201.html','true',[],'',''],
	['PAGE','57423',jdecode('Girls+Night+Out+'),jdecode(''),'/57423.html','true',[],'',''],
	['PAGE','115134',jdecode('Commercials'),jdecode(''),'/115134.html','true',[],'','']];
var siteelementCount=29;
theSitetree.topTemplateName='Weekend';
theSitetree.paletteFamily='61702D';
theSitetree.keyvisualId='4161';
theSitetree.keyvisualName='kv_4161.jpg';
theSitetree.fontsetId='10536';
theSitetree.graphicsetId='11177';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='87974E';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Weekend',
				paletteFamily: 	'61702D',
				keyvisualId: 	'4161',
				keyvisualName: 	'kv_4161.jpg',
				fontsetId: 		'10536',
				graphicsetId: 	'11177',
				contentColor: 	'000000',
				contentBGColor: '87974E',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-6506avec10infl9m']={
webappId:    '1002',
documentId:  '6506',
internalId:  '6506avec10infl9m',
customField: 'icq=false'
};
webappMappings['7060']=webappMappings['7060-c2dc73250697b7782337e5ba9295b7f3']={
webappId:    '7060',
documentId:  '13801',
internalId:  'c2dc73250697b7782337e5ba9295b7f3',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-fa5b607ac0dd46375dafbeafca1ec19e']={
webappId:    '7060',
documentId:  '57423',
internalId:  'fa5b607ac0dd46375dafbeafca1ec19e',
customField: 'language:en;country:US;'
};
webappMappings['1501']=webappMappings['1501-11932321']={
webappId:    '1501',
documentId:  '501',
internalId:  '11932321',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20100805-104545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88223',
internalId:  '',
customField: '20090902-163502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '615',
internalId:  '',
customField: '20100721-174730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '636',
internalId:  '',
customField: '20100708-111952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '657',
internalId:  '',
customField: '20100708-141315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '678',
internalId:  '',
customField: '20100708-112402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '699',
internalId:  '',
customField: '20100708-141612'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '720',
internalId:  '',
customField: '20100708-140333'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '741',
internalId:  '',
customField: '20100721-175213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '762',
internalId:  '',
customField: '20090826-184738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110534',
internalId:  '',
customField: '20100410-180731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '909',
internalId:  '',
customField: '20081219-111734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79623',
internalId:  '',
customField: '20100721-172335'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '972',
internalId:  '',
customField: '20100708-140623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '783',
internalId:  '',
customField: '20100805-093648'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20100721-172119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5901',
internalId:  '',
customField: '20100721-181315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9001',
internalId:  '',
customField: '20100527-122410'
};
webappMappings['7008']=webappMappings['7008-8674']={
webappId:    '7008',
documentId:  '79623',
internalId:  '8674',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '825',
internalId:  '',
customField: '20100721-171614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91123',
internalId:  '',
customField: '20100409-105135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6506',
internalId:  '',
customField: '20100721-172421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82223',
internalId:  '',
customField: '20100721-173420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13801',
internalId:  '',
customField: '20091213-181930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23201',
internalId:  '',
customField: '20100721-182000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57423',
internalId:  '',
customField: '20081119-193758'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '112534',
internalId:  '',
customField: '20100420-123408'
};
webappMappings['7060']=webappMappings['7060-8ffadac658d29226476234e7ffd94a10']={
webappId:    '7060',
documentId:  '115134',
internalId:  '8ffadac658d29226476234e7ffd94a10',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115134',
internalId:  '',
customField: '20100410-181414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122734',
internalId:  '',
customField: '20100828-170520'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '122834',
internalId:  '',
customField: '20100709-110048'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INFL9M';
var companyName   = 'New+Age+Skincare+Spa+';
var htmlTitle	  = 'New+Age+Skincare+Spa%2C+Excelsior+Springs%2C+MO+Historic+Downtown+Hall+of+Waters+District%2C+102+E.+Broadway%2C+816-637-6500';
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();
};
