/* [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','901',jdecode('Waxing+%26+Skin+Care'),jdecode(''),'/901/index.html','true',[ 
		['PAGE','14601',jdecode('Chemical+Peels'),jdecode(''),'/901/14601.html','true',[],'',''],
		['PAGE','15401',jdecode('Facials'),jdecode(''),'/901/15401.html','true',[],'',''],
		['PAGE','14622',jdecode('Microdermabrasion'),jdecode(''),'/901/14622.html','true',[],'',''],
		['PAGE','37808',jdecode('Tint+Brow+%26+Lash'),jdecode(''),'/901/37808.html','true',[],'',''],
		['PAGE','5464',jdecode('Waxing+'),jdecode(''),'/901/5464.html','true',[],'','']
	],'',''],
	['PAGE','38138',jdecode('+Makeup'),jdecode(''),'/38138.html','true',[],'',''],
	['PAGE','38147',jdecode('Massage'),jdecode(''),'/38147.html','true',[],'',''],
	['PAGE','37574',jdecode('Hair+Salon'),jdecode(''),'/37574/index.html','true',[ 
		['PAGE','38517',jdecode('Makin+Waves+Hair+'),jdecode(''),'/37574/38517.html','true',[],'',''],
		['PAGE','38526',jdecode('Kellys+Hair+Studio'),jdecode(''),'/37574/38526.html','true',[],'','']
	],'',''],
	['PAGE','37029',jdecode('Online+Appointment'),jdecode(''),'/37029.html','true',[],'',''],
	['PAGE','29101',jdecode('Gift+Certificates'),jdecode(''),'/29101.html','true',[],'',''],
	['PAGE','5485',jdecode('Contact+Us'),jdecode(''),'/5485.html','true',[],'',''],
	['PAGE','36413',jdecode('Map'),jdecode(''),'/36413.html','true',[],'','']];
var siteelementCount=15;
theSitetree.topTemplateName='Enjoy';
theSitetree.paletteFamily='FF9F21';
theSitetree.keyvisualId='2251';
theSitetree.keyvisualName='reise1.jpg';
theSitetree.fontsetId='365';
theSitetree.graphicsetId='418';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='FF9F21';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Enjoy',
				paletteFamily: 	'FF9F21',
				keyvisualId: 	'2251',
				keyvisualName: 	'reise1.jpg',
				fontsetId: 		'365',
				graphicsetId: 	'418',
				contentColor: 	'FFFFFF',
				contentBGColor: 'FF9F21',
				a_color: 		'FF9F21',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '901',
internalId:  '1006',
customField: '1006'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '36413',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '901',
internalId:  '',
customField: '20100805-121831'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5485',
internalId:  '',
customField: '20090818-113347'
};
webappMappings['1501']=webappMappings['1501-1275634']={
webappId:    '1501',
documentId:  '901',
internalId:  '1275634',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37029',
internalId:  '',
customField: '20100807-195400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15401',
internalId:  '',
customField: '20100228-202848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37574',
internalId:  '',
customField: '20100807-195135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14601',
internalId:  '',
customField: '20100228-202738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14622',
internalId:  '',
customField: '20100228-203006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5464',
internalId:  '',
customField: '20100228-203121'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38517',
internalId:  '',
customField: '20100807-112020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38526',
internalId:  '',
customField: '20100807-195222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37808',
internalId:  '',
customField: '20100228-203304'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38147',
internalId:  '',
customField: '20100228-191936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29101',
internalId:  '',
customField: '20080606-025139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38138',
internalId:  '',
customField: '20100805-121225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36413',
internalId:  '',
customField: '20081008-171852'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INELS6';
var companyName   = 'BODY+CLOCK';
var htmlTitle	  = 'Skin+Care%2C+Waxing%2C+Massage%2C++Makeup%2C+Hair+';
var metaKeywords  = 'skin+care%2C+eyelash+extensions%2C+permanent+makeup%2C+piercing%2C+tatooing%2C+gift+certificates%2C+relax%2C+cosmeceutical%2C+microdermabrasion%2C+chemical+peels%2C+raindrop+therapy%2C+colour+therapy%2C+chakras%2C+mens+facials%2C+facials%2C+waxing%2C+colorado+%2C+relaxation%2C++massage%2C++skin+care%2C++beauty+products%2C++mineral+makeup%2C++acne+treatments+%2C+spray+tanning+%2C+waxing+%2C+facials%2C++scars+%2C+wrinkles+%2C+ageless++%2Ctanning+%2C+hair+removal+%2C+brazilian+waxing%2C++day+spa++%2Ccellulite+treatment+%2C+aviva+%2C+bella+lucce%2C++blinc+mascara++%2Cbody+treatments+%2C+chemical+peels%2C++chocolate+bath+products+%2C+clinical+results+%2C+dermacia+%2C+face+makeup+%2C+hemp+products%2C++hypermpigmentation+%2C%2C+image+skin+care%2C++longmont++%2Cmicrocurrent+%2C+microdermabrasion+%2C+organic+bath+products++%2Craindrop+therapy+%2C+revitalash++%2Cskin+lightening+%2C+sun+block+%2C+sun+damage+%2C+wrinkle%2C+serives+under+%2450%2C+spray+tan%2C+image+skin+care%2C+treatments%2C80501%2C80502%2C80503%2C80504%2Cfirestone%2Cfrederick%2C+niwot%2C+mead%2C+erie%2C+longmont%2C+boulder%2Cwestminster%2C+';
var metaContents  = 'colorado++relaxation++massage++skin+care++beauty+products++mineral+makeup++acne+treatments++spray+tanning++waxing++facials++scars++wrinkles++ageless++tanning++hair+removal++brazilian+waxing++day+spa++cellulite+treatment++aviva++bella+lucce++blinc+mascara++body+treatments++chemical+peels++chocolate+bath+products++clinical+results++dermacia++face+makeup++hemp+products++hypermpigmentation++image+skin+care++longmont++microcurrent++microdermabrasion++organic+bath+products++raindrop+therapy++revitalash++skin+lightening++sun+block++sun+damage++wrinkle+treatments80501+80502+80503+80504+longmont+erie+niwot+boulder+berthoud+%2C+services+under+%2450%2C+';
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();
};
