/* [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(''), jdecode('%2F601.html'), 'true',[],'',''],
	['PAGE','2301',jdecode('96+Hour+Goals'),jdecode(''), jdecode('%2F2301.html'), 'true',[],'',''],
	['PAGE','56617',jdecode('Be+Young--sign+up+'),jdecode(''), jdecode('%2F56617.html'), 'true',[],'',''],
	['PAGE','799',jdecode('Classes'),jdecode(''), jdecode('%2F799%2Findex.html'), 'true',[ 
		['PAGE','56540',jdecode('Where%26%23x27%3Bs+Dana%3F'),jdecode(''), jdecode('%2F799%2F56540.html'), 'true',[],'',''],
		['PAGE','56549',jdecode('Other+Classes'),jdecode(''), jdecode('%2F799%2F56549.html'), 'true',[],'','']
	],'',''],
	['PAGE','55883',jdecode('Compass+Hand+Scanner'),jdecode(''), jdecode('%2F55883.html'), 'true',[],'',''],
	['PAGE','5301',jdecode('Essential+Oil+Quality'),jdecode(''), jdecode('%2F5301.html'), 'true',[],'',''],
	['PAGE','778',jdecode('Library'),jdecode(''), jdecode('%2F778%2Findex.html'), 'true',[ 
		['PAGE','12522',jdecode('Be+Young+Essential+Oils'),jdecode(''), jdecode('%2F778%2F12522.html'), 'true',[],'',''],
		['PAGE','47901',jdecode('Health+Topics'),jdecode(''), jdecode('%2F778%2F47901.html'), 'true',[],'',''],
		['PAGE','24601',jdecode('Newsletter+Archive'),jdecode(''), jdecode('%2F778%2F24601.html'), 'true',[],'',''],
		['PAGE','64823',jdecode('Smart+Nutritionals'),jdecode(''), jdecode('%2F778%2F64823.html'), 'true',[],'',''],
		['PAGE','73323',jdecode('Top+Ten+Uses'),jdecode(''), jdecode('%2F778%2F73323.html'), 'true',[],'','']
	],'',''],
	['PAGE','757',jdecode('Lymphatic+Massage'),jdecode(''), jdecode('%2F757.html'), 'true',[],'',''],
	['PAGE','1901',jdecode('Name+Histories'),jdecode(''), jdecode('%2F1901.html'), 'true',[],'',''],
	['PAGE','6601',jdecode('Newsletter'),jdecode(''), jdecode('%2F6601.html'), 'true',[],'',''],
	['PAGE','820',jdecode('About+us'),jdecode(''), jdecode('%2F820.html'), 'true',[],'',''],
	['PAGE','841',jdecode('Contact'),jdecode(''), jdecode('%2F841.html'), 'true',[],'',''],
	['PAGE','7001',jdecode('Shipping+Notes'),jdecode(''), jdecode('%2F7001.html'), 'true',[],'',''],
	['PAGE','60212',jdecode('Visit+Our+Blog'),jdecode(''), jdecode('%2F60212.html'), 'true',[],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Antigua';
theSitetree.paletteFamily='617F92';
theSitetree.keyvisualId='6906';
theSitetree.keyvisualName='kv_6906.jpg';
theSitetree.fontsetId='11214';
theSitetree.graphicsetId='12036';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='809DAF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'valueweb',
  product: 'WSCSYSSSSLYTCR7V'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Antigua',
				paletteFamily: 	'617F92',
				keyvisualId: 	'6906',
				keyvisualName: 	'kv_6906.jpg',
				fontsetId: 		'11214',
				graphicsetId: 	'12036',
				contentColor: 	'FFFFFF',
				contentBGColor: '809DAF',
				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: '20110706-182016'
};
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: '20111224-184019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5301',
internalId:  '',
customField: '20100621-204402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56549',
internalId:  '',
customField: '20110824-182047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56540',
internalId:  '',
customField: '20111224-184059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '778',
internalId:  '',
customField: '20110721-164201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12522',
internalId:  '',
customField: '20111018-143006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24601',
internalId:  '',
customField: '20101102-205631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47901',
internalId:  '',
customField: '20111118-212844'
};
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: '20101023-220427'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64823',
internalId:  '',
customField: '20110824-182450'
};
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:  '73323',
internalId:  '',
customField: '20120111-210847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60212',
internalId:  '',
customField: '20101019-220254'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker03.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();
};

