/* [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','3001',jdecode('Home'),jdecode(''), jdecode('%2F3001.html'), 'true',[],'',''],
	['PAGE','6301',jdecode('ADVANCED+AESTHETICS'),jdecode(''), jdecode('%2F6301%2Findex.html'), 'true',[ 
		['PAGE','19301',jdecode('Total+Skin+Rejuvenation'),jdecode(''), jdecode('%2F6301%2F19301.html'), 'true',[],'',''],
		['PAGE','6322',jdecode('WAVE+HydraFacial'),jdecode(''), jdecode('%2F6301%2F6322.html'), 'true',[],'',''],
		['PAGE','6343',jdecode('WAVE+Diamondabrasion'),jdecode(''), jdecode('%2F6301%2F6343.html'), 'true',[],'',''],
		['PAGE','6364',jdecode('WAVE+HydraPeel'),jdecode(''), jdecode('%2F6301%2F6364.html'), 'true',[],'',''],
		['PAGE','6385',jdecode('DermAware+VITal+Peels'),jdecode(''), jdecode('%2F6301%2F6385.html'), 'true',[],'',''],
		['PAGE','31301',jdecode('Reflections+Bio-Targeted+Facial'),jdecode(''), jdecode('%2F6301%2F31301.html'), 'true',[],'',''],
		['PAGE','6448',jdecode('Cool+Copper+Regenerating+Facial'),jdecode(''), jdecode('%2F6301%2F6448.html'), 'true',[],'',''],
		['PAGE','6427',jdecode('Bare+Fruit+Enzyme+Facial'),jdecode(''), jdecode('%2F6301%2F6427.html'), 'true',[],'',''],
		['PAGE','6406',jdecode('SkinCeuticals+Micropeels'),jdecode(''), jdecode('%2F6301%2F6406.html'), 'true',[],'',''],
		['PAGE','20601',jdecode('Dermaplaning'),jdecode(''), jdecode('%2F6301%2F20601.html'), 'true',[],'',''],
		['PAGE','13201',jdecode('Heavenly+Body+Peel'),jdecode(''), jdecode('%2F6301%2F13201.html'), 'true',[],'',''],
		['PAGE','6469',jdecode('Back+Treatment'),jdecode(''), jdecode('%2F6301%2F6469.html'), 'true',[],'',''],
		['PAGE','13222',jdecode('Make-up+Application'),jdecode(''), jdecode('%2F6301%2F13222.html'), 'true',[],'',''],
		['PAGE','13264',jdecode('Lash+and+Brow+Services'),jdecode(''), jdecode('%2F6301%2F13264.html'), 'true',[],'',''],
		['PAGE','13243',jdecode('Waxing'),jdecode(''), jdecode('%2F6301%2F13243.html'), 'true',[],'',''],
		['PAGE','21301',jdecode('OBAGI+Blue+Peel'),jdecode(''), jdecode('%2F6301%2F21301.html'), 'true',[],'','']
	],'',''],
	['PAGE','3901',jdecode('COSMETIC+DERMATOLOGY'),jdecode(''), jdecode('%2F3901%2Findex.html'), 'true',[ 
		['PAGE','3922',jdecode('LASER+HAIR+REDUCTION'),jdecode(''), jdecode('%2F3901%2F3922.html'), 'true',[],'',''],
		['PAGE','5501',jdecode('%7E+Hair+Removal+FAQs'),jdecode(''), jdecode('%2F3901%2F5501.html'), 'true',[],'',''],
		['PAGE','3943',jdecode('LIMELIGHT+FACIAL'),jdecode(''), jdecode('%2F3901%2F3943.html'), 'true',[],'',''],
		['PAGE','21101',jdecode('LASER+GENESIS'),jdecode(''), jdecode('%2F3901%2F21101.html'), 'true',[],'',''],
		['PAGE','3964',jdecode('SKIN+TIGHTENING'),jdecode(''), jdecode('%2F3901%2F3964.html'), 'true',[],'',''],
		['PAGE','3985',jdecode('VEIN+THERAPY'),jdecode(''), jdecode('%2F3901%2F3985.html'), 'true',[],'',''],
		['PAGE','7601',jdecode('%7E+Vein+Therapy+FAQs'),jdecode(''), jdecode('%2F3901%2F7601.html'), 'true',[],'',''],
		['PAGE','4006',jdecode('BOTOX'),jdecode(''), jdecode('%2F3901%2F4006.html'), 'true',[],'',''],
		['PAGE','18101',jdecode('JUVEDERM'),jdecode(''), jdecode('%2F3901%2F18101.html'), 'true',[],'',''],
		['PAGE','4027',jdecode('SKIN+LESION+REMOVAL'),jdecode(''), jdecode('%2F3901%2F4027.html'), 'true',[],'','']
	],'',''],
	['PAGE','9301',jdecode('PRODUCTS'),jdecode(''), jdecode('%2F9301%2Findex.html'), 'true',[ 
		['PAGE','29601',jdecode('DermAware'),jdecode(''), jdecode('%2F9301%2F29601.html'), 'true',[],'',''],
		['PAGE','10064',jdecode('SkinCeuticals'),jdecode(''), jdecode('%2F9301%2F10064.html'), 'true',[],'',''],
		['PAGE','10022',jdecode('Latisse'),jdecode(''), jdecode('%2F9301%2F10022.html'), 'true',[],'',''],
		['PAGE','10001',jdecode('Jane+Iredale+Mineral+Makeup'),jdecode(''), jdecode('%2F9301%2F10001.html'), 'true',[],'',''],
		['PAGE','40601',jdecode('PRO+Clarisonic'),jdecode(''), jdecode('%2F9301%2F40601.html'), 'true',[],'',''],
		['PAGE','26822',jdecode('Revision+Skincare'),jdecode(''), jdecode('%2F9301%2F26822.html'), 'true',[],'',''],
		['PAGE','10043',jdecode('OBAGI+Medical'),jdecode(''), jdecode('%2F9301%2F10043.html'), 'true',[],'',''],
		['PAGE','26801',jdecode('Renova'),jdecode(''), jdecode('%2F9301%2F26801.html'), 'true',[],'','']
	],'',''],
	['PAGE','9322',jdecode('In+the+News'),jdecode(''), jdecode('%2F9322.html'), 'true',[],'',''],
	['PAGE','14201',jdecode('About+Us'),jdecode(''), jdecode('%2F14201.html'), 'true',[],'',''],
	['PAGE','17901',jdecode('New%21'),jdecode(''), jdecode('%2F17901.html'), 'true',[],'','']];
var siteelementCount=41;
theSitetree.topTemplateName='Tendril';
theSitetree.paletteFamily='E4EBF5';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33096';
theSitetree.graphicsetId='14057';
theSitetree.contentColor='255092';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp35-attweb',
  product: 'WSCSYSSSSLY0X9RC'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Tendril',
				paletteFamily: 	'E4EBF5',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33096',
				graphicsetId: 	'14057',
				contentColor: 	'255092',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3001',
internalId:  '',
customField: '20111114-133704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3901',
internalId:  '',
customField: '20110419-174229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3922',
internalId:  '',
customField: '20100616-154815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3943',
internalId:  '',
customField: '20110412-113954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3964',
internalId:  '',
customField: '20110412-114950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3985',
internalId:  '',
customField: '20110412-115155'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4006',
internalId:  '',
customField: '20110419-174333'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4027',
internalId:  '',
customField: '20100616-155832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5501',
internalId:  '',
customField: '20100616-155212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6301',
internalId:  '',
customField: '20110602-144840'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6322',
internalId:  '',
customField: '20110328-170041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6343',
internalId:  '',
customField: '20110518-164527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6364',
internalId:  '',
customField: '20110517-160729'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6385',
internalId:  '',
customField: '20110517-161457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6406',
internalId:  '',
customField: '20110328-165925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6427',
internalId:  '',
customField: '20110517-175327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6448',
internalId:  '',
customField: '20110517-174942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6469',
internalId:  '',
customField: '20110517-174655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7601',
internalId:  '',
customField: '20100616-155704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9301',
internalId:  '',
customField: '20110606-142857'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9322',
internalId:  '',
customField: '20110321-170531'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10043',
internalId:  '',
customField: '20100616-163946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10001',
internalId:  '',
customField: '20100616-163829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10022',
internalId:  '',
customField: '20100616-163909'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10064',
internalId:  '',
customField: '20100616-164010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13201',
internalId:  '',
customField: '20110602-160503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13222',
internalId:  '',
customField: '20100616-161157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13243',
internalId:  '',
customField: '20110518-165004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13264',
internalId:  '',
customField: '20110518-164923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14201',
internalId:  '',
customField: '20110823-140845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17901',
internalId:  '',
customField: '20100616-164332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18101',
internalId:  '',
customField: '20100706-173432'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19301',
internalId:  '',
customField: '20100706-175148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26822',
internalId:  '',
customField: '20110606-153526'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20601',
internalId:  '',
customField: '20110518-165843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21101',
internalId:  '',
customField: '20110412-114737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21301',
internalId:  '',
customField: '20110328-160813'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26801',
internalId:  '',
customField: '20110606-134224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29601',
internalId:  '',
customField: '20110518-171827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31301',
internalId:  '',
customField: '20110517-174546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40601',
internalId:  '',
customField: '20111114-135136'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I7CZ6T';
var companyName   = 'REFLECTIONS+MedSpa';
var htmlTitle	  = '';
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();
};

