/* [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','1901',jdecode('Home'),jdecode(''),'/1901.html','true',[],'',''],
	['PAGE','17701',jdecode('Referral+Form'),jdecode(''),'/17701.html','true',[],'',''],
	['PAGE','1952',jdecode('Our+Services'),jdecode(''),'/1952/index.html','true',[ 
		['PAGE','1973',jdecode('Hair+Services'),jdecode(''),'/1952/1973.html','true',[],'',''],
		['PAGE','1994',jdecode('Hand+%26+Nail+Care'),jdecode(''),'/1952/1994.html','true',[],'',''],
		['PAGE','2015',jdecode('Foot+%26+Nail+Care'),jdecode(''),'/1952/2015.html','true',[],'',''],
		['PAGE','2036',jdecode('Skin+Care+Services'),jdecode(''),'/1952/2036.html','true',[],'',''],
		['PAGE','2057',jdecode('Hair+Removal'),jdecode(''),'/1952/2057.html','true',[],'',''],
		['PAGE','2099',jdecode('Makeup+%26+Enhancements'),jdecode(''),'/1952/2099.html','true',[],'',''],
		['PAGE','2078',jdecode('Massage+Therapy'),jdecode(''),'/1952/2078.html','true',[],'','']
	],'',''],
	['PAGE','4501',jdecode('Gift+Packages'),jdecode(''),'/4501.html','true',[],'',''],
	['PAGE','5501',jdecode('Buy+5+Get+1+Free+Packages'),jdecode(''),'/5501.html','true',[],'',''],
	['PAGE','7401',jdecode('Shop+Online'),jdecode(''),'/7401.html','true',[],'',''],
	['PAGE','4543',jdecode('Community+Outreach'),jdecode(''),'/4543/index.html','true',[ 
		['PAGE','4564',jdecode('PAIGE+Foundation'),jdecode(''),'/4543/4564.html','true',[],'',''],
		['PAGE','4585',jdecode('Locks+of+Love'),jdecode(''),'/4543/4585.html','true',[],'','']
	],'',''],
	['PAGE','15301',jdecode('Sign+Up+For+Weekly+Specials'),jdecode(''),'/15301.html','true',[],'',''],
	['PAGE','4627',jdecode('Contact+Us'),jdecode(''),'/4627.html','true',[],'',''],
	['PAGE','4648',jdecode('Location'),jdecode(''),'/4648.html','true',[],'',''],
	['PAGE','4669',jdecode('Directions'),jdecode(''),'/4669.html','true',[],'',''],
	['PAGE','4690',jdecode('Career+Opportunities'),jdecode(''),'/4690.html','true',[],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Vita02';
theSitetree.paletteFamily='F0DCB8';
theSitetree.keyvisualId='11351';
theSitetree.keyvisualName='kv_11351.jpg';
theSitetree.fontsetId='32119';
theSitetree.graphicsetId='13934';
theSitetree.contentColor='644227';
theSitetree.contentBGColor='F6FBFE';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Vita02',
				paletteFamily: 	'F0DCB8',
				keyvisualId: 	'11351',
				keyvisualName: 	'kv_11351.jpg',
				fontsetId: 		'32119',
				graphicsetId: 	'13934',
				contentColor: 	'644227',
				contentBGColor: 'F6FBFE',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1901',
internalId:  '',
customField: '20100114-140826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1952',
internalId:  '',
customField: '20100427-112711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1973',
internalId:  '',
customField: '20090817-120235'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1994',
internalId:  '',
customField: '20091130-144440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2015',
internalId:  '',
customField: '20091130-144528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2036',
internalId:  '',
customField: '20091216-154054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2057',
internalId:  '',
customField: '20090817-121636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2078',
internalId:  '',
customField: '20090930-144346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2099',
internalId:  '',
customField: '20091110-142021'
};
webappMappings['7008']=webappMappings['7008-10456']={
webappId:    '7008',
documentId:  '4627',
internalId:  '10456',
customField: 'language:en;country:US;'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '4648',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '4669',
internalId:  'routing',
customField: 'en_US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4501',
internalId:  '',
customField: '20091130-110324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4669',
internalId:  '',
customField: '20090820-145117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4648',
internalId:  '',
customField: '20090820-144939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4627',
internalId:  '',
customField: '20090820-134744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7401',
internalId:  '',
customField: '20100102-113036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4543',
internalId:  '',
customField: '20090820-144742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4564',
internalId:  '',
customField: '20090820-153659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4585',
internalId:  '',
customField: '20091110-143911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4690',
internalId:  '',
customField: '20100427-113549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5501',
internalId:  '',
customField: '20091110-142703'
};
webappMappings['7008']=webappMappings['7008-14233']={
webappId:    '7008',
documentId:  '15301',
internalId:  '14233',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15301',
internalId:  '',
customField: '20100114-160017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17701',
internalId:  '',
customField: '20100621-115418'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHSJY';
var companyName   = 'Glow+Salon+%26+MedSpa';
var htmlTitle	  = '';
var metaKeywords  = 'day+spa%2C+day+spa+st.+louis%2C+day+spa%2C+missouri%2C+salon+st.+louis%2C+salon+missouri%2C+spa+st.+louis%2C+spa+missouri%2C+massage+st.+louis%2C+massage+missouri%2C+pedicure+st.+louis%2C+pedicure+missouri%2C+hair+salon+st.+louis%2C+glow%2C+glow+salon%2C+glow+spa%2C+glow+day+spa%2C+scandals+day+spa%2C+salon%2C+spa%2C+haircut%2C+massage%2C+facial%2C+waxing%2C+beauty%2C+pamper%2C+medspa%2C+med+spa%2C+medical+spa%2C+pedicure%2C+manicure%2C+hands%2C+feet%2C+glycolic+peel%2C+microdermabrasion';
var metaContents  = 'Glow+Salon+and+Med+Spa%2C+formerly+Scandals+Day+Spa%2C+offers+everything+from+massage%2C+facials%2C+chemical+peels+and+microdermabrasion+to+manicures%2C+pedicures+and+a+full+service+hair+salon.++Define+yourself+with+Glow+Salon+and+Med+Spa.';
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();
};
