/* [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','5101',jdecode('Home'),jdecode(''),'/5101.html','true',[],'',''],
	['PAGE','6569',jdecode('Our+Best+Seller'),jdecode(''),'/6569.html','true',[],'',''],
	['PAGE','6611',jdecode('On-line+Store++'),jdecode(''),'/6611.html','true',[],'',''],
	['PAGE','28801',jdecode('Testamonials'),jdecode(''),'/28801.html','true',[],'',''],
	['PAGE','13169',jdecode('Guestbook'),jdecode(''),'/13169.html','true',[],'',''],
	['PAGE','6464',jdecode('Consultation'),jdecode(''),'/6464.html','true',[],'',''],
	['PAGE','13148',jdecode('Education'),jdecode(''),'/13148.html','true',[],'',''],
	['PAGE','6401',jdecode('Meditation'),jdecode(''),'/6401.html','true',[],'',''],
	['PAGE','13022',jdecode('Healing'),jdecode(''),'/13022.html','true',[],'',''],
	['PAGE','13401',jdecode('Medicine+Wheel'),jdecode(''),'/13401.html','true',[],'',''],
	['PAGE','13001',jdecode('You'),jdecode(''),'/13001.html','true',[],'',''],
	['PAGE','6506',jdecode('Walkingbird'),jdecode(''),'/6506.html','true',[],'',''],
	['PAGE','13085',jdecode('Spirit'),jdecode(''),'/13085.html','true',[],'',''],
	['PAGE','13043',jdecode('Mind'),jdecode(''),'/13043.html','true',[],'',''],
	['PAGE','13064',jdecode('Emotion'),jdecode(''),'/13064.html','true',[],'',''],
	['PAGE','13106',jdecode('How+to+do+that'),jdecode(''),'/13106.html','true',[],'',''],
	['PAGE','13127',jdecode('How+to+make+that'),jdecode(''),'/13127.html','true',[],'',''],
	['PAGE','6485',jdecode('Contact'),jdecode(''),'/6485.html','true',[],'',''],
	['PAGE','13190',jdecode('Links+'),jdecode(''),'/13190.html','true',[],'',''],
	['PAGE','13211',jdecode('Dictionary'),jdecode(''),'/13211.html','true',[],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Court';
theSitetree.paletteFamily='9D9D9E';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='16442';
theSitetree.graphicsetId='12148';
theSitetree.contentColor='4C4C4C';
theSitetree.contentBGColor='D6D5D5';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Court',
				paletteFamily: 	'9D9D9E',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'16442',
				graphicsetId: 	'12148',
				contentColor: 	'4C4C4C',
				contentBGColor: 'D6D5D5',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5101',
internalId:  '',
customField: '20091107-131435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6401',
internalId:  '',
customField: '20091024-104226'
};
webappMappings['1002']=webappMappings['1002-13169ahw050inlv1i']={
webappId:    '1002',
documentId:  '13169',
internalId:  '13169ahw050inlv1i',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6464',
internalId:  '',
customField: '20091024-223232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6485',
internalId:  '',
customField: '20091024-105326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6506',
internalId:  '',
customField: '20091024-223108'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13022',
internalId:  '',
customField: '20091024-223313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13043',
internalId:  '',
customField: '20091024-104807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6569',
internalId:  '',
customField: '20100126-081211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13001',
internalId:  '',
customField: '20091023-183152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6611',
internalId:  '',
customField: '20091118-093534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13064',
internalId:  '',
customField: '20091024-104931'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5101',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13085',
internalId:  '',
customField: '20091024-104657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13106',
internalId:  '',
customField: '20091024-105003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13127',
internalId:  '',
customField: '20091023-151328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13148',
internalId:  '',
customField: '20091115-145626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13401',
internalId:  '',
customField: '20091025-220052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13169',
internalId:  '',
customField: '20091018-015327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13190',
internalId:  '',
customField: '20091023-143617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13211',
internalId:  '',
customField: '20091025-211148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28801',
internalId:  '',
customField: '20091023-141422'
};
webappMappings['1501']=webappMappings['1501-5746109']={
webappId:    '1501',
documentId:  '5101',
internalId:  '5746109',
customField: '1501'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INLV1I';
var companyName   = 'Essential+Apothecary';
var htmlTitle	  = 'Essential+Apothecary+Organic+herbs%2C+teas+and+more.';
var metaKeywords  = 'Organic+Herbs+and+Teas%2C+Ceremonial+Herbs%2C+Essential+Oils%2C+Classes%2C+Education%2C+Gift+Wrapping+and+Gift+Certificates.+Miami+++++++++++++++++++++++++++++++++++++FloridaFreeFair+Trade5-HealthHealingAlternative+MedicineApothecaryNatural+Pharmacy10-Preventive+MedicineEducation+ClassesBooksEssential+Oils15-PerfumeMassage+Oils+Organic+Herbs+Organic+Detox+Cleansing+TeaOrganic+Insomnia+TeaOrganic+Caf%C3%A9%E2%80%99Food+SupplementsWeight+LossDietOrganic+Teas25-Antioxidant+Organic+Green+TeasLavenderSea+SaltSoapAnti-bacterialAnti-fungleMiccosukeeNative+AmericanDream+CatcherMedicine+WheelCeremonial+Herbs36-White+SageSmudgingCandlesIncenseShaman+LoungeHappy+Hour+MonaviGift+CertificateYoga44-MidwifeExersizeSpa+Products';
var metaContents  = 'Available+on+line.+Organic+Herbs+and+Teas%2C+Essential+Oil+and+information+on+how+to+use+them.+Classes+available+in+Miami%2C+FL+including+education+on+shamanism%2C+Gift+Wrapping+and+Gift+Certificates.';
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();
};
