/* [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','601',jdecode('Home'),jdecode(''),'/601.html','true',[],'',''],
	['PAGE','59032',jdecode('Blog'),jdecode(''),'/59032.html','false',[],'',''],
	['PAGE','2301',jdecode('96+Hour+Goals'),jdecode(''),'/2301.html','true',[],'',''],
	['PAGE','56617',jdecode('Be+Young--sign+up+'),jdecode(''),'/56617.html','true',[],'',''],
	['PAGE','799',jdecode('Classes'),jdecode(''),'/799/index.html','true',[ 
		['PAGE','56540',jdecode('Where%26%23x27%3Bs+Dana%3F'),jdecode(''),'/799/56540.html','true',[],'',''],
		['PAGE','56549',jdecode('Other+Classes'),jdecode(''),'/799/56549.html','true',[],'','']
	],'',''],
	['PAGE','55883',jdecode('Compass+Hand+Scanner'),jdecode(''),'/55883.html','true',[],'',''],
	['PAGE','5301',jdecode('Essential+Oil+Quality'),jdecode(''),'/5301.html','true',[],'',''],
	['PAGE','778',jdecode('Library'),jdecode(''),'/778/index.html','true',[ 
		['PAGE','12522',jdecode('Be+Young+Essential+Oils'),jdecode(''),'/778/12522.html','true',[],'',''],
		['PAGE','24601',jdecode('Newsletter+Archive'),jdecode(''),'/778/24601.html','true',[],'',''],
		['PAGE','47901',jdecode('Health+Topics'),jdecode(''),'/778/47901.html','true',[],'','']
	],'',''],
	['PAGE','757',jdecode('Lymphatic+Massage'),jdecode(''),'/757.html','true',[],'',''],
	['PAGE','1901',jdecode('Name+Histories'),jdecode(''),'/1901.html','true',[],'',''],
	['PAGE','715',jdecode('Personal+Care'),jdecode(''),'/715.html','true',[],'',''],
	['PAGE','6601',jdecode('Newsletter'),jdecode(''),'/6601.html','true',[],'',''],
	['PAGE','820',jdecode('About+us'),jdecode(''),'/820.html','true',[],'',''],
	['PAGE','841',jdecode('Contact'),jdecode(''),'/841.html','true',[],'',''],
	['PAGE','7001',jdecode('Shipping+Notes'),jdecode(''),'/7001.html','true',[],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Antigua';
theSitetree.paletteFamily='68638F';
theSitetree.keyvisualId='6906';
theSitetree.keyvisualName='kv_6906.jpg';
theSitetree.fontsetId='11214';
theSitetree.graphicsetId='12038';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='8782AC';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Antigua',
				paletteFamily: 	'68638F',
				keyvisualId: 	'6906',
				keyvisualName: 	'kv_6906.jpg',
				fontsetId: 		'11214',
				graphicsetId: 	'12038',
				contentColor: 	'FFFFFF',
				contentBGColor: '8782AC',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20091102-153836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55883',
internalId:  '',
customField: '20100220-193614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2301',
internalId:  '',
customField: '20090504-151845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '799',
internalId:  '',
customField: '20100818-182017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5301',
internalId:  '',
customField: '20100621-204402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56549',
internalId:  '',
customField: '20100818-182350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56540',
internalId:  '',
customField: '20100818-182310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '778',
internalId:  '',
customField: '20100512-151229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12522',
internalId:  '',
customField: '20100811-204754'
};
webappMappings['1003']=webappMappings['1003-ahw050inx2mb129f166d5cd']={
webappId:    '1003',
documentId:  '59032',
internalId:  'ahw050inx2mb129f166d5cd',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24601',
internalId:  '',
customField: '20100714-182410'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47901',
internalId:  '',
customField: '20100818-181942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '757',
internalId:  '',
customField: '20080326-200441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1901',
internalId:  '',
customField: '20080305-225736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56617',
internalId:  '',
customField: '20091222-124922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '715',
internalId:  '',
customField: '20090216-150829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6601',
internalId:  '',
customField: '20090318-172519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '820',
internalId:  '',
customField: '20090103-201858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '841',
internalId:  '',
customField: '20080924-174531'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7001',
internalId:  '',
customField: '20090826-210605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59032',
internalId:  '',
customField: '20100720-155031'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INX2MB';
var companyName   = 'Traces+Etc';
var htmlTitle	  = 'Traces+Etc+Essential+Oils+and+Health';
var metaKeywords  = 'Be+Young+EOBBD+Guaranteed+therapeutic+grade+essential+oils%2C+Masaji%2C+name+meanings%2C+lymphatic+massage%2C+Dana+Clay+Young';
var metaContents  = 'Lymphatic+massage%2C+Be+Young+EOBBD+Guaranteed+100%25+pure%2C+therapeutic+grade+essential+oils+by+Dana+Clay+Young%2C+Masaji%2C+natural+health+products%2C+96+hour+emergency+essential+oil+kit%2C+name+histories%2C+and+more.';
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();
};
