/* [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('Home'),jdecode(''),'/901.html','true',[],'',''],
	['PAGE','18101',jdecode('Services'),jdecode(''),'/18101/index.html','true',[ 
		['PAGE','18143',jdecode('Hair+Styling'),jdecode(''),'/18101/18143.html','true',[],'',''],
		['PAGE','32001',jdecode('Esthetics'),jdecode(''),'/18101/32001.html','true',[],'',''],
		['PAGE','32022',jdecode('Manicure%2FPedicure'),jdecode(''),'/18101/32022.html','true',[],'',''],
		['PAGE','32043',jdecode('Massage'),jdecode(''),'/18101/32043.html','true',[],'',''],
		['PAGE','32085',jdecode('Waxing'),jdecode(''),'/18101/32085.html','true',[],'',''],
		['PAGE','32064',jdecode('Packages'),jdecode(''),'/18101/32064.html','true',[],'','']
	],'',''],
	['PAGE','1141',jdecode('Current+Offers'),jdecode(''),'/1141.html','true',[],'',''],
	['PAGE','1036',jdecode('Meet+Our+Staff'),jdecode(''),'/1036/index.html','true',[ 
		['PAGE','118137',jdecode('Not+Just+Hair%21++++++++++++++++++++++++++++++++++++++++++'),jdecode(''),'/1036/118137.html','true',[],'','']
	],'',''],
	['PAGE','5501',jdecode('How+to+find+us'),jdecode(''),'/5501.html','true',[],'',''],
	['PAGE','1078',jdecode('Contact'),jdecode(''),'/1078.html','true',[],'','']];
var siteelementCount=13;
theSitetree.topTemplateName='Enjoy';
theSitetree.paletteFamily='BB9C60';
theSitetree.keyvisualId='2231';
theSitetree.keyvisualName='hotels2.jpg';
theSitetree.fontsetId='365';
theSitetree.graphicsetId='417';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='BB9C60';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Enjoy',
				paletteFamily: 	'BB9C60',
				keyvisualId: 	'2231',
				keyvisualName: 	'hotels2.jpg',
				fontsetId: 		'365',
				graphicsetId: 	'417',
				contentColor: 	'FFFFFF',
				contentBGColor: 'BB9C60',
				a_color: 		'BB9C60',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '5501',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '901',
internalId:  '',
customField: '20100508-162648'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1036',
internalId:  '',
customField: '20090908-161210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18101',
internalId:  '',
customField: '20090414-183250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18143',
internalId:  '',
customField: '20091104-080016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32001',
internalId:  '',
customField: '20100508-165807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32022',
internalId:  '',
customField: '20080525-101741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32043',
internalId:  '',
customField: '20080911-173438'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32085',
internalId:  '',
customField: '20090414-183654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32064',
internalId:  '',
customField: '20080525-090128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1141',
internalId:  '',
customField: '20091104-080942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5501',
internalId:  '',
customField: '20080203-073919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1078',
internalId:  '',
customField: '20080830-072236'
};
webappMappings['7060']=webappMappings['7060-e9da80852ecc6360f2bf7dba5668c996']={
webappId:    '7060',
documentId:  '118137',
internalId:  'e9da80852ecc6360f2bf7dba5668c996',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118137',
internalId:  '',
customField: '20091104-074411'
};
webappMappings['7060']=webappMappings['7060-ca8067a29af4683a8fd6a2fcdd9d84bb']={
webappId:    '7060',
documentId:  '118137',
internalId:  'ca8067a29af4683a8fd6a2fcdd9d84bb',
customField: 'language:en;country:US;'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INEED6';
var companyName   = 'Elysian+Salon+%26+Spa';
var htmlTitle	  = 'European+owned+salon+in+Rochester+Hills+Michigan';
var metaKeywords  = 'Rochester+Hills+Michigan%2C++European+Facial%2C++Skin+care%2C++permanent+makeup%2C+Salon%2C++Beauty%2C++Hairstyle%2C++waxing%2C++massage%2C++massage+therapy%2C++hair%2C+manicure%2C++beautysalon%2C++spa%2C++pedicure%2C++nails%2C++hair+extensions%2C++hot+stone+therapy%2C++elysiansalon%2C++elysian%2C++elysiansalon.net%2C+elysian+salon%2C+make+up%2C+mirabella%2C+ultratress%2C+curly+hair%2C+ethnic+styling%2C+african+american+styling%2C+Acne%2C+Problem+skin%2C+extraction%2C+ultrasound%2C+permanent+make+up%2C+modeling+mask%2C+lifting++firming%2C+collagen+mask%2C+exfolliation%2C+deep+cleansing%2C+facial+massage+anti+age+program%2C+moisturizing%2C+anti+wrinkle+program%2C+bio+elements%2C+thermal+action+mask%2C+deep+clean%2C+chemical+peel%2C+dark+circles%2C+fine+lines+and+wrinkles%2C+enzyme+therapy%2C+parafin+mask%2C+complexion%2C+anti-inflamitory%2C+acne+treatment%2C+skin+resurfacing%2C+spa+pedicure%2C+spa+manicure%2C+up+do%2C+bridal+party%2C+wedding%2C+homecomming%2C+prom%2C+shampoo%2C+perm%2C+relaxer%2C+paraffin+dip%2C+polish%2C+french+manicure%2C+childrens+cut%2C+bridal+up+do+with+veil%2C++';
var metaContents  = 'European+owned+salon+in+Rochester+Hills+Michigan.';
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();
};
