/* [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 theSitetree=[ 
	['PAGE','5801',jdecode('Home'),jdecode(''),'/5801.html','true',[],''],
	['PAGE','32401',jdecode('Products'),jdecode(''),'/32401/index.html','true',[ 
		['PAGE','5852',jdecode('Kona+Deep'),jdecode(''),'/32401/5852.html','true',[],''],
		['PAGE','12701',jdecode('The+Water+Process'),jdecode(''),'/32401/12701.html','true',[],''],
		['PAGE','28201',jdecode('Kona+Deep+Video'),jdecode(''),'/32401/28201.html','true',[],''],
		['PAGE','9401',jdecode('Organic+Kona+Coffee'),jdecode(''),'/32401/9401.html','true',[],''],
		['PAGE','12722',jdecode('The+Coffee+Process'),jdecode(''),'/32401/12722.html','true',[],''],
		['PAGE','19801',jdecode('Organic+Hawaiian+Honey'),jdecode(''),'/32401/19801.html','true',[],''],
		['PAGE','36501',jdecode('Nalo+Meli+Video'),jdecode(''),'/32401/36501.html','true',[],''],
		['PAGE','20301',jdecode('Ho%26%23x27%3Bola+Kai+'),jdecode(''),'/32401/20301.html','true',[],'']
	],''],
	['PAGE','32422',jdecode('Services'),jdecode(''),'/32422/index.html','true',[ 
		['PAGE','5936',jdecode('Our+team'),jdecode(''),'/32422/5936.html','true',[],''],
		['PAGE','22801',jdecode('International+Broker'),jdecode(''),'/32422/22801.html','true',[],'']
	],''],
	['PAGE','5978',jdecode('Markets'),jdecode(''),'/5978/index.html','true',[ 
		['PAGE','37101',jdecode('Military'),jdecode(''),'/5978/37101.html','true',[],''],
		['PAGE','38199',jdecode('GNC'),jdecode(''),'/5978/38199.html','true',[],''],
		['PAGE','38220',jdecode('MMA+Hawaii'),jdecode(''),'/5978/38220.html','true',[],'']
	],''],
	['PAGE','37122',jdecode('News%2FEvents'),jdecode(''),'/37122/index.html','true',[ 
		['PAGE','38241',jdecode('Shanghai+FineWaters+'),jdecode(''),'/37122/38241.html','true',[],'']
	],''],
	['PAGE','5915',jdecode('About+us'),jdecode(''),'/5915.html','true',[],''],
	['PAGE','44013',jdecode('Contact+Us'),jdecode(''),'/44013.html','true',[],'']];
var siteelementCount=21;
theSitetree.topTemplateName='Fields';
theSitetree.paletteFamily='FEFEFE';
theSitetree.keyvisualId='11286';
theSitetree.keyvisualName='kv_11286.jpg';
theSitetree.fontsetId='31968';
theSitetree.graphicsetId='13807';
theSitetree.contentColor='8E8C8C';
theSitetree.contentBGColor='FEFEFE';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Fields',
				paletteFamily: 	'FEFEFE',
				keyvisualId: 	'11286',
				keyvisualName: 	'kv_11286.jpg',
				fontsetId: 		'31968',
				graphicsetId: 	'13807',
				contentColor: 	'8E8C8C',
				contentBGColor: 'FEFEFE',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5801',
internalId:  '',
customField: '20100201-205321'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32422',
internalId:  '',
customField: '20100202-055547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5852',
internalId:  '',
customField: '20100206-030805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19801',
internalId:  '',
customField: '20100202-075708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12701',
internalId:  '',
customField: '20100202-210111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5915',
internalId:  '',
customField: '20100311-012515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5936',
internalId:  '',
customField: '20100202-052527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22801',
internalId:  '',
customField: '20100131-142336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5978',
internalId:  '',
customField: '20100201-204006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28201',
internalId:  '',
customField: '20100202-060851'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9401',
internalId:  '',
customField: '20100323-013613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32401',
internalId:  '',
customField: '20100323-013250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12722',
internalId:  '',
customField: '20080812-012425'
};
webappMappings['7060']=webappMappings['7060-faaf057e378c9b9546a7c4f1b543713d']={
webappId:    '7060',
documentId:  '12701',
internalId:  'faaf057e378c9b9546a7c4f1b543713d',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-86865f4ffbea54a7cf65deb5a0fd607d']={
webappId:    '7060',
documentId:  '12722',
internalId:  '86865f4ffbea54a7cf65deb5a0fd607d',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-29265']={
webappId:    '7008',
documentId:  '44013',
internalId:  '29265',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20301',
internalId:  '',
customField: '20100202-021457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44013',
internalId:  '',
customField: '20100627-232659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36501',
internalId:  '',
customField: '20100202-061142'
};
webappMappings['7060']=webappMappings['7060-56861e9e2feda9b2048f68a05ed7ae0b']={
webappId:    '7060',
documentId:  '37101',
internalId:  '56861e9e2feda9b2048f68a05ed7ae0b',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-073f7cea241071a7671014a1d0aa9754']={
webappId:    '7060',
documentId:  '38199',
internalId:  '073f7cea241071a7671014a1d0aa9754',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-8ae7b55ae14a51edd56bc76d24694029']={
webappId:    '7060',
documentId:  '38220',
internalId:  '8ae7b55ae14a51edd56bc76d24694029',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37101',
internalId:  '',
customField: '20100202-064905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38199',
internalId:  '',
customField: '20100202-065024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38220',
internalId:  '',
customField: '20100202-191542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37122',
internalId:  '',
customField: '20100202-210237'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38241',
internalId:  '',
customField: '20100202-072720'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0IN23OO';
var companyName   = 'Kona+Pure+International+';
var htmlTitle	  = 'Kona+Deep+Bottled+Water%2C100%25+Kona+Coffee%2C+Iced+Teas+%26+Organic+Honey';
var metaKeywords  = 'kona+deep%2C+deep+sea+water%2C+pure%2C+clean%2C+100%25%2C+mineral%2C+taste%2C+refreshing%2C+good%2C+healthy%2C+3000+feet%2C+hawaii%2C+kona%2C+water%2C+mineral+water%2C+cool%2C+blue%2C+deep+blue%2C+deep%2C+purify%2C+export%2C+honey%2C+coffee%2C+kona+coffee%2C+export%2C+unique%2C+island%2C+3000+feet%2C+coffee+grounds%2C+coffee+beans%2C+international%2C+hawaiis%2C+kona+coast%2C+refreshing%2C+new%2C+gifts%2C+specialty%2C+flavor%2C+taste%2C+soap%2C+soaps%2C+honey+soaps%2C+organic%2C+organically+cultivated%2C+pollution+free%2C+herbicide+free%2C+pesticide+free%2C+christmas+berry%2C+nalo-meli%2C+hooala+kai%2C+deep+sea+hand+cream%2C+hand+creams%2C+lotion%2C+bottled+waterdeep+sea+bottled+water%2C+konadeep%2C+kona+coffee%2C+kona%2C+100%25+kona+coffee%2C+pure+kona%2C+kona+pure%2C+kona+pure+international';
var metaContents  = 'kona+deep%2C+deep+sea+water%2C+pure%2C+clean%2C+100%25%2C+mineral%2C+taste%2C+refreshing%2C+good%2C+healthy%2C+3000+feet%2C+hawaii%2C+kona%2C+water%2C+mineral+water%2C+cool%2C+blue%2C+deep+blue%2C+deep%2C+purify%2C+export%2C+honey%2C+export%2C+international%2C+konadeep%2C+Organic+Kona+Coffee%2C+kona+coffee%2C+kona%2C+coffee%2C+kona+pure%2C+kona+pure+international';
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();
};
