/* [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','1901',jdecode('Chico+Holistic+Healthcare'),jdecode(''),'/1901.html','true',[],'',''],
	['PAGE','7201',jdecode('Massage'),jdecode(''),'/7201/index.html','true',[ 
		['PAGE','7222',jdecode('Pricing'),jdecode(''),'/7201/7222.html','true',[],'','']
	],'',''],
	['PAGE','1952',jdecode('Peripheral+Neuropathy'),jdecode(''),'/1952/index.html','true',[ 
		['PAGE','10018',jdecode('Nerve+ReBuilder%E2%84%A2'),jdecode(''),'/1952/10018.html','true',[],'',''],
		['PAGE','10918',jdecode('Anodyne'),jdecode(''),'/1952/10918.html','true',[],'',''],
		['PAGE','10960',jdecode('Whole+Body+Vibration'),jdecode(''),'/1952/10960.html','true',[],'',''],
		['PAGE','17118',jdecode('Supplements'),jdecode(''),'/1952/17118.html','true',[],'',''],
		['PAGE','17939',jdecode('Oxygen+Therapy'),jdecode(''),'/1952/17939.html','true',[],'',''],
		['PAGE','4101',jdecode('Symptoms'),jdecode(''),'/1952/4101.html','true',[],'',''],
		['PAGE','4122',jdecode('Causes'),jdecode(''),'/1952/4122.html','true',[],'',''],
		['PAGE','4143',jdecode('Treatment'),jdecode(''),'/1952/4143.html','true',[],'','']
	],'',''],
	['PAGE','5501',jdecode('Contact'),jdecode(''),'/5501/index.html','true',[ 
		['PAGE','7411',jdecode('Map'),jdecode(''),'/5501/7411.html','true',[],'','']
	],'',''],
	['PAGE','24718',jdecode('Calendar'),jdecode(''),'/24718.html','true',[],'',''],
	['PAGE','22018',jdecode('Acu-Koryo+Hand+Therapy'),jdecode(''),'/22018.html','true',[],'',''],
	['PAGE','10060',jdecode('Links'),jdecode(''),'/10060.html','true',[],'',''],
	['PAGE','16018',jdecode('Testimonials'),jdecode(''),'/16018.html','true',[],'',''],
	['PAGE','27597',jdecode('Incredisocks+and+Insoles'),jdecode(''),'/27597.html','true',[],'',''],
	['PAGE','29697',jdecode('Homeoopathic+Products'),jdecode(''),'/29697.html','true',[],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Dispose';
theSitetree.paletteFamily='EDE051';
theSitetree.keyvisualId='9696';
theSitetree.keyvisualName='kv_9696.gif';
theSitetree.fontsetId='10658';
theSitetree.graphicsetId='11184';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='CCCACA';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Dispose',
				paletteFamily: 	'EDE051',
				keyvisualId: 	'9696',
				keyvisualName: 	'kv_9696.gif',
				fontsetId: 		'10658',
				graphicsetId: 	'11184',
				contentColor: 	'000000',
				contentBGColor: 'CCCACA',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1901',
internalId:  '',
customField: '20100823-115418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1952',
internalId:  '',
customField: '20100821-110250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7201',
internalId:  '',
customField: '20100821-105531'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4101',
internalId:  '',
customField: '20100824-094203'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22018',
internalId:  '',
customField: '20091110-132801'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4122',
internalId:  '',
customField: '20090731-150225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4143',
internalId:  '',
customField: '20100824-095227'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10018',
internalId:  '',
customField: '20100329-153241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5501',
internalId:  '',
customField: '20090903-134926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7222',
internalId:  '',
customField: '20100821-110121'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7411',
internalId:  '',
customField: '20090731-154812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24718',
internalId:  '',
customField: '20100215-134646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10060',
internalId:  '',
customField: '20091211-100227'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16018',
internalId:  '',
customField: '20100415-180159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17118',
internalId:  '',
customField: '20091229-144908'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10918',
internalId:  '',
customField: '20091125-100132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27597',
internalId:  '',
customField: '20100326-182627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10960',
internalId:  '',
customField: '20100824-093509'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29697',
internalId:  '',
customField: '20100420-154523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17939',
internalId:  '',
customField: '20090924-174945'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INLWHV';
var companyName   = 'CHICO+HOLISTIC+HEALTHCARE+%7E+530-892-1930';
var htmlTitle	  = 'Chico+Holistic+Healthcare';
var metaKeywords  = 'Holistic+Health%2C+health+care%2C+healthcare%2C+neuropathy%2C+Idiopathic+Peripheral+Neuropathy%2C+autonomic%2C+natural+treatment%2C+home+remedies%2C+rebuilder%2C+nerves%2C+nerve+rebuilding%2C+diabetes%2C+ms%2C+stroke%2C+rehabilitation%2C+pain+relief%2C+tingling%2C+numbness%2C+burning%2C+feet%2C+Dr.+David+Phillips%2C+Dr.+Di+Duro%2C+Reflexology+by+Sherry%2C+Chico+Reflexology%2C+neuropathy+treatment+center+of+Chico%2C+north+state+diaper+Bank';
var metaContents  = 'Chico+Holistic+Healthcare%3A+specializing+in+the+successful+treatment+of+Peripheral+Neuropathy+due+to+diabetes%2C+chemotherapy%2C+alcoholism+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();
};
