/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],''],
	['PAGE','552',jdecode('Facials'),jdecode(''),'/552.html','true',[],''],
	['PAGE','573',jdecode('Hair+Removal'),jdecode(''),'/573.html','true',[],''],
	['PAGE','594',jdecode('Foot+Care'),jdecode(''),'/594.html','true',[],''],
	['PAGE','615',jdecode('Spa+Extras'),jdecode(''),'/615.html','true',[],''],
	['PAGE','636',jdecode('Spa+Services'),jdecode(''),'/636.html','true',[],''],
	['PAGE','4501',jdecode('AHA+Exfoliation'),jdecode(''),'/4501.html','true',[],''],
	['PAGE','4522',jdecode('Packages+%26+Promotions'),jdecode(''),'/4522.html','true',[],''],
	['PAGE','4543',jdecode('Gift+Certificates'),jdecode(''),'/4543.html','true',[],''],
	['PAGE','2301',jdecode('Products'),jdecode(''),'/2301.html','true',[],''],
	['PAGE','657',jdecode('Contact+Me'),jdecode(''),'/657.html','true',[],''],
	['PAGE','6324',jdecode('Map'),jdecode(''),'/6324.html','true',[],''],
	['PAGE','6426',jdecode('Panache+Photos'),jdecode(''),'/6426.html','true',[],''],
	['PAGE','6475',jdecode('Massage+Therapy'),jdecode(''),'/6475.html','true',[],''],
	['PAGE','6484',jdecode('Hair+Design'),jdecode(''),'/6484.html','true',[],'']];
var siteelementCount=15;
theSitetree.topTemplateName='Antique';
theSitetree.paletteFamily='7C8EFE';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='11061';
theSitetree.graphicsetId='11838';
theSitetree.contentColor='D1C3A6';
theSitetree.contentBGColor='856A3B';
var theTemplate={
				name: 			'Antique',
				paletteFamily: 	'7C8EFE',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'11061',
				graphicsetId: 	'11838',
				contentColor: 	'D1C3A6',
				contentBGColor: '856A3B',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'664F23',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '6324',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['1501']=webappMappings['1501-2415952']={
webappId:    '1501',
documentId:  '501',
internalId:  '2415952',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-5e99ba32de67bb8c705a4397e03582cf']={
webappId:    '7060',
documentId:  '6426',
internalId:  '5e99ba32de67bb8c705a4397e03582cf',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20091221-153243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4522',
internalId:  '',
customField: '20100405-144558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6475',
internalId:  '',
customField: '20091221-154830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6484',
internalId:  '',
customField: '20081208-204500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6426',
internalId:  '',
customField: '20080729-231031'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20091221-153720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '573',
internalId:  '',
customField: '20091221-153954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '594',
internalId:  '',
customField: '20091221-154028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '615',
internalId:  '',
customField: '20090410-003934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '636',
internalId:  '',
customField: '20091221-154700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4501',
internalId:  '',
customField: '20080227-193638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4543',
internalId:  '',
customField: '20080728-164734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2301',
internalId:  '',
customField: '20100405-165842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '657',
internalId:  '',
customField: '20080728-164945'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6324',
internalId:  '',
customField: '20080728-170802'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INELTV';
var companyName   = 'Cheri+Bock%2C+++Owner+%26+Aesthetician';
var htmlTitle	  = 'panache+skincare';
var metaKeywords  = 'Panache+Salon++Bodyworks%2C+Inc+Cheri+Bock+Pevonia+Botanica+Skin+Care+European+Facials+Spa+Pedicures+Spa+Manicures+Waxing+Brazilian+Alexandria+Body+Sugar+AHA+exfoliation+glycolic+acid+gift+certificates+spa+packages+spa+services+bremerton+silverdale+massage';
var metaContents  = 'Panache+Salon++Bodyworks%2C+Inc+Skin+Care+Facials+Pedicures+Waxing+AHA+exfoliation+Cheri+Bockalexandria+body+sugar+spa+manicure+Pevonia+Botanica+Skin+Care+Products';
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();
};
