/* [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','23601',jdecode('Healthline+Bio.'),jdecode(''),'/23601.html','true',[],'',''],
	['PAGE','5601',jdecode('CS+for+Animals'),jdecode(''),'/5601.html','true',[],'',''],
	['PAGE','11401',jdecode('CS+History+%2F+Uses'),jdecode(''),'/11401.html','true',[],'',''],
	['PAGE','12701',jdecode('Professional+Quotes'),jdecode(''),'/12701.html','true',[],'',''],
	['PAGE','14201',jdecode('BYU+Report'),jdecode(''),'/14201.html','true',[],'',''],
	['PAGE','14401',jdecode('UpJohn+Labs+Report'),jdecode(''),'/14401.html','true',[],'',''],
	['PAGE','14901',jdecode('Testimonials'),jdecode(''),'/14901.html','true',[],'',''],
	['PAGE','15401',jdecode('Other+Uses'),jdecode(''),'/15401.html','true',[],'',''],
	['PAGE','15901',jdecode('FDA+Letters'),jdecode(''),'/15901.html','true',[],'',''],
	['PAGE','16901',jdecode('CS+%2F+Birds'),jdecode(''),'/16901.html','true',[],'',''],
	['PAGE','18201',jdecode('Restore+Probiotic+%28Pets%29'),jdecode(''),'/18201.html','true',[],'',''],
	['PAGE','18401',jdecode('Restore+Probiotic+Human'),jdecode(''),'/18401.html','true',[],'',''],
	['PAGE','18601',jdecode('Silver+Salve'),jdecode(''),'/18601.html','true',[],'',''],
	['PAGE','23101',jdecode('Digestive+Enzymes'),jdecode(''),'/23101.html','true',[],'',''],
	['PAGE','22301',jdecode('Animal+Labels'),jdecode(''),'/22301.html','true',[],'',''],
	['PAGE','22322',jdecode('Human+Labels'),jdecode(''),'/22322.html','true',[],'',''],
	['PAGE','24001',jdecode('Pain+Away'),jdecode(''),'/24001.html','true',[],'',''],
	['PAGE','24701',jdecode('Kidney+%26+Bladder'),jdecode(''),'/24701.html','true',[],'',''],
	['PAGE','25101',jdecode('Liver+Detox'),jdecode(''),'/25101.html','true',[],'',''],
	['PAGE','25601',jdecode('CS+Pet+Shampoo'),jdecode(''),'/25601.html','true',[],'',''],
	['PAGE','25622',jdecode('MSM+%2F+CS+Lotion+Human'),jdecode(''),'/25622.html','true',[],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Raster';
theSitetree.paletteFamily='ACC085';
theSitetree.keyvisualId='1307';
theSitetree.keyvisualName='rosen.jpg';
theSitetree.fontsetId='196';
theSitetree.graphicsetId='236';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='E6E6E6';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Raster',
				paletteFamily: 	'ACC085',
				keyvisualId: 	'1307',
				keyvisualName: 	'rosen.jpg',
				fontsetId: 		'196',
				graphicsetId: 	'236',
				contentColor: 	'000000',
				contentBGColor: 'E6E6E6',
				a_color: 		'00007F',
				b_color: 		'2E49EE',
				c_color: 		'000000',
				d_color: 		'E6E6E6',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5601',
internalId:  '',
customField: '20080624-151004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11401',
internalId:  '',
customField: '20080624-011046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12701',
internalId:  '',
customField: '20080624-012040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14201',
internalId:  '',
customField: '20080625-012757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14401',
internalId:  '',
customField: '20080625-013508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16901',
internalId:  '',
customField: '20080718-182918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14901',
internalId:  '',
customField: '20080718-183019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15401',
internalId:  '',
customField: '20080705-152643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15901',
internalId:  '',
customField: '20080713-223342'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18201',
internalId:  '',
customField: '20110624-135420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18401',
internalId:  '',
customField: '20110624-135340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18601',
internalId:  '',
customField: '20090512-130733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22301',
internalId:  '',
customField: '20100402-122846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22322',
internalId:  '',
customField: '20100402-122944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23101',
internalId:  '',
customField: '20100402-124322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23601',
internalId:  '',
customField: '20100407-123942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24001',
internalId:  '',
customField: '20100610-120556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24701',
internalId:  '',
customField: '20100817-015953'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25101',
internalId:  '',
customField: '20110304-153411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25601',
internalId:  '',
customField: '20110909-142326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25622',
internalId:  '',
customField: '20110909-142522'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0IN2EGO';
var companyName   = 'Healthline+Nutrition';
var htmlTitle	  = '';
var metaKeywords  = '';
var metaContents  = '';
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();
};

