/* [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','1001',jdecode('Home'),jdecode(''),'/1001.html','true',[],'',''],
	['PAGE','1052',jdecode('Products'),jdecode(''),'/1052/index.html','true',[ 
		['PAGE','1073',jdecode('Lotions'),jdecode(''),'/1052/1073.html','true',[],'',''],
		['PAGE','1094',jdecode('Bath+products'),jdecode(''),'/1052/1094.html','true',[],'',''],
		['PAGE','1136',jdecode('Gift+ideas'),jdecode(''),'/1052/1136.html','true',[],'',''],
		['PAGE','1157',jdecode('Special+Deals'),jdecode(''),'/1052/1157.html','true',[],'',''],
		['PAGE','19195',jdecode('Scent+list'),jdecode(''),'/1052/19195.html','true',[],'',''],
		['PAGE','19449',jdecode('Check+Out'),jdecode(''),'/1052/19449.html','true',[],'','']
	],'',''],
	['PAGE','4306',jdecode('Guestbook'),jdecode(''),'/4306/index.html','true',[ 
		['PAGE','4301',jdecode('Read+Guestbook'),jdecode(''),'/4306/4301.html','false',[],'','']
	],'',''],
	['PAGE','18428',jdecode('Contact'),jdecode(''),'/18428.html','true',[],'','']];
var siteelementCount=11;
theSitetree.topTemplateName='Blossom';
theSitetree.paletteFamily='AC2E53';
theSitetree.keyvisualId='7103';
theSitetree.keyvisualName='kv_7103.jpg';
theSitetree.fontsetId='16394';
theSitetree.graphicsetId='12128';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='E5E2E2';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Blossom',
				paletteFamily: 	'AC2E53',
				keyvisualId: 	'7103',
				keyvisualName: 	'kv_7103.jpg',
				fontsetId: 		'16394',
				graphicsetId: 	'12128',
				contentColor: 	'000000',
				contentBGColor: 'E5E2E2',
				a_color: 		'000000',
				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:  '1001',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1052',
internalId:  '',
customField: '20100801-143307'
};
webappMappings['1002']=webappMappings['1002-4306AHW050INEAEW']={
webappId:    '1002',
documentId:  '4306',
internalId:  '4306AHW050INEAEW',
customField: 'icq=false'
};
webappMappings['1501']=webappMappings['1501-945261']={
webappId:    '1501',
documentId:  '1001',
internalId:  '945261',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1001',
internalId:  '',
customField: '20100801-144522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1073',
internalId:  '',
customField: '20100801-144226'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1094',
internalId:  '',
customField: '20080509-235727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18428',
internalId:  '',
customField: '20091113-204444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1136',
internalId:  '',
customField: '20070119-151512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1157',
internalId:  '',
customField: '20080911-051159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19449',
internalId:  '',
customField: '20100801-101834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19195',
internalId:  '',
customField: '20100801-140104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4306',
internalId:  '',
customField: '20070110-224157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4301',
internalId:  '',
customField: '20070110-224157'
};
webappMappings['7008']=webappMappings['7008-5510']={
webappId:    '7008',
documentId:  '18428',
internalId:  '5510',
customField: 'language:en;country:US;'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INEAEW';
var companyName   = 'Simply+Luscious';
var htmlTitle	  = 'Simply+Luscious';
var metaKeywords  = 'Lotion%2C++Scented++Bath+Products%2C++Hand+Sanitizer%2C++Gift+Baskets%2C+++Bath+Salts%2C++Moisturizing+Body+Spray%2C++Hand+lotion%2C++Dry+Skin+Lotion%2C++Custom+scents%2C+Essential+Oil%2C++Fragrance+Oil%2C++Glycerin+Lotion%2C++Spa+products%2C++Spa+Scrubs%2C++Foot+Scrubs%2C++Simply+Luscious%2C+Soy+oil%2C+Glycerin%2C+Massage+Oil%2C+made+in+Washington%2C+profits+to+charity%2C+custom+scents+for+your+business%2C+Susan+G.Komen%2C+breast+cancer+donation%2C+Hemp+Seed+Oil%2C+Soy+Oil%2C+petroelum+free%2C+';
var metaContents  = 'Bath++Body+products++Spa+products++Lotion++Bath+Salts++Moisturizing+Body+Spray++Hand+Sanitizer++Gifts+for+Her++Gifts+for+Him+Simply+Luscious+';
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();
};
