/* [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','201',jdecode('Home'),jdecode(''),'/201/index.html','true',[ 
		['PAGE','8601',jdecode('Meet+Dr+Nicola'),jdecode(''),'/201/8601.html','true',[],'',''],
		['PAGE','212',jdecode('Naturopathic+Med'),jdecode(''),'/201/212.html','true',[],'',''],
		['PAGE','23901',jdecode('Supplements'),jdecode(''),'/201/23901.html','true',[],'',''],
		['PAGE','222',jdecode('FAQ'),jdecode(''),'/201/222.html','true',[],'',''],
		['PAGE','227',jdecode('Contact'),jdecode(''),'/201/227.html','true',[],'',''],
		['PAGE','35001',jdecode('Links'),jdecode(''),'/201/35001.html','true',[],'',''],
		['PAGE','35022',jdecode('Testimonials'),jdecode(''),'/201/35022.html','true',[],'','']
	],'',''],
	['PAGE','217',jdecode('Diagnostic+Testing'),jdecode(''),'/217/index.html','true',[ 
		['PAGE','30001',jdecode('Nutrient+Analysis'),jdecode(''),'/217/30001.html','true',[],'','']
	],'',''],
	['PAGE','11401',jdecode('Treatment+Modalities'),jdecode(''),'/11401.html','true',[],'',''],
	['PAGE','5901',jdecode('Autism'),jdecode(''),'/5901/index.html','true',[ 
		['PAGE','14001',jdecode('Testing'),jdecode(''),'/5901/14001.html','true',[],'',''],
		['PAGE','14006',jdecode('Chelation'),jdecode(''),'/5901/14006.html','true',[],'',''],
		['PAGE','18801',jdecode('Outreaches'),jdecode(''),'/5901/18801.html','true',[],'','']
	],'',''],
	['PAGE','5911',jdecode('Eating+Disorders'),jdecode(''),'/5911/index.html','true',[ 
		['PAGE','16301',jdecode('Testing'),jdecode(''),'/5911/16301.html','true',[],'','']
	],'',''],
	['PAGE','247',jdecode('Lyme+Disease'),jdecode(''),'/247/index.html','true',[ 
		['PAGE','17301',jdecode('Testing'),jdecode(''),'/247/17301.html','true',[],'',''],
		['PAGE','17306',jdecode('Protocols'),jdecode(''),'/247/17306.html','true',[],'',''],
		['PAGE','54623',jdecode('Burrascano+%26%23x27%3B08'),jdecode(''),'/247/54623.html','true',[],'','']
	],'',''],
	['PAGE','56434',jdecode('The+Lyme+Diet+book'),jdecode(''),'/56434/index.html','true',[ 
		['PAGE','57034',jdecode('Book+Excerpt+'),jdecode(''),'/56434/57034.html','true',[],'',''],
		['PAGE','57055',jdecode('Endorsements'),jdecode(''),'/56434/57055.html','true',[],'',''],
		['PAGE','57334',jdecode('Buy+Now%21%21'),jdecode(''),'/56434/57334.html','true',[],'','']
	],'',''],
	['PAGE','5906',jdecode('Hormones'),jdecode(''),'/5906/index.html','true',[ 
		['PAGE','14274',jdecode('Bio-Identical+HRT'),jdecode(''),'/5906/14274.html','true',[],'',''],
		['PAGE','14269',jdecode('Male+hormones'),jdecode(''),'/5906/14269.html','true',[],'',''],
		['PAGE','14731',jdecode('Testing'),jdecode(''),'/5906/14731.html','true',[],'','']
	],'',''],
	['PAGE','18806',jdecode('Pre-Conception+Care'),jdecode(''),'/18806/index.html','true',[ 
		['PAGE','20813',jdecode('Timeline'),jdecode(''),'/18806/20813.html','true',[],'',''],
		['PAGE','20106',jdecode('Testing'),jdecode(''),'/18806/20106.html','true',[],'',''],
		['PAGE','20111',jdecode('Nutrition'),jdecode(''),'/18806/20111.html','true',[],'',''],
		['PAGE','20116',jdecode('Detox'),jdecode(''),'/18806/20116.html','true',[],'',''],
		['PAGE','20121',jdecode('Chelation'),jdecode(''),'/18806/20121.html','true',[],'',''],
		['PAGE','20126',jdecode('Healthy+Home'),jdecode(''),'/18806/20126.html','true',[],'',''],
		['PAGE','20131',jdecode('Protocols'),jdecode(''),'/18806/20131.html','true',[],'',''],
		['PAGE','22301',jdecode('Costs'),jdecode(''),'/18806/22301.html','true',[],'','']
	],'','']];
var siteelementCount=38;
theSitetree.topTemplateName='Simple';
theSitetree.paletteFamily='EAD8C1';
theSitetree.keyvisualId='2570';
theSitetree.keyvisualName='genuss.jpg';
theSitetree.fontsetId='10346';
theSitetree.graphicsetId='10458';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='ead8c1';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Simple',
				paletteFamily: 	'EAD8C1',
				keyvisualId: 	'2570',
				keyvisualName: 	'genuss.jpg',
				fontsetId: 		'10346',
				graphicsetId: 	'10458',
				contentColor: 	'000000',
				contentBGColor: 'ead8c1',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'857157',
				e_color: 		'FFFFFF',
				f_color: 		'817E7E',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '201',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-846773']={
webappId:    '1501',
documentId:  '201',
internalId:  '846773',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '201',
internalId:  '',
customField: '20080822-141603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8601',
internalId:  '',
customField: '20080822-144415'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '212',
internalId:  '',
customField: '20050727-064743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23901',
internalId:  '',
customField: '20091011-090415'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '222',
internalId:  '',
customField: '20080822-144713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '227',
internalId:  '',
customField: '20081024-095604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35001',
internalId:  '',
customField: '20091011-084028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35022',
internalId:  '',
customField: '20091011-091941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '217',
internalId:  '',
customField: '20050728-151831'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30001',
internalId:  '',
customField: '20070827-143814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11401',
internalId:  '',
customField: '20050718-161154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5901',
internalId:  '',
customField: '20081024-100226'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14001',
internalId:  '',
customField: '20050721-173311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14006',
internalId:  '',
customField: '20050721-155743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18801',
internalId:  '',
customField: '20050728-125119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5911',
internalId:  '',
customField: '20081024-100911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16301',
internalId:  '',
customField: '20050721-173414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '247',
internalId:  '',
customField: '20081023-203545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17301',
internalId:  '',
customField: '20081023-210828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17306',
internalId:  '',
customField: '20091014-110031'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5906',
internalId:  '',
customField: '20081024-101009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14274',
internalId:  '',
customField: '20050721-162958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14269',
internalId:  '',
customField: '20050721-164534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14731',
internalId:  '',
customField: '20081024-101117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18806',
internalId:  '',
customField: '20080207-183711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20813',
internalId:  '',
customField: '20080207-183752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20106',
internalId:  '',
customField: '20080207-183851'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20111',
internalId:  '',
customField: '20080207-183928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20116',
internalId:  '',
customField: '20050810-093229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20121',
internalId:  '',
customField: '20050810-093305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20126',
internalId:  '',
customField: '20050810-090747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20131',
internalId:  '',
customField: '20080207-184110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22301',
internalId:  '',
customField: '20081024-101304'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54623',
internalId:  '',
customField: '20091014-105846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57034',
internalId:  '',
customField: '20091024-105804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56434',
internalId:  '',
customField: '20091024-104238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57055',
internalId:  '',
customField: '20091024-105804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57334',
internalId:  '',
customField: '20091024-111314'
};
var canonHostname = 'wscwrk02.ehost-services.com';
var accountId     = 'AEN010INXPOV';
var companyName   = 'Dr.+Nicola+McFadzean';
var htmlTitle	  = 'Dr.+Nicola+McFadzean%2C+Naturopathic+Doctor';
var metaKeywords  = 'Naturopathic+medicine%2C+holistic+medicine%2C+natural+medicine%2C+women%E2%80%99s+health%2C+natural+hormone+replacement%2C+bio-identical+hormones%2C+San+Diego%2C+lyme+disease%2C+Temecula%2C+California%2C+herbal+medicine%2C+nutrition%2C+eating+disorders%2C+anorexia%2C+bulimia%2C+compulsive+eating%2C+anxiety%2C+depression%2C+menopause%2C+PMS%2C+infertility%2C+PCOS%2C+endometriosis%2C+weight+management%2C+amino+acids%2C+weight+loss%2C+adrenal%2C+thyroid%2C+detoxification%2C+anti-aging%2C+functional+medicine%2C+autism%2C+biomedical%2C+autistic+spectrum%2C+lyme+disease';
var metaContents  = 'Naturopathic+medicine%2C+holistic+medicine%2C+natural+medicine%2C+women%E2%80%99s+health%2C+natural+hormone+replacement%2C+bio-identical+hormones%2C+San+Diego%2C+Lyme+disease%2C+Temecula%2C+California%2C+herbal+medicine%2C+nutrition%2C+eating+disorders%2C+anorexia%2C+bulimia%2C+compulsive+eating%2C+anxiety%2C+depression%2C+menopause%2C+PMS%2C+infertility%2C+PCOS%2C+endometriosis%2C+weight+management%2C+amino+acids%2C+weight+loss%2C+adrenal%2C+thyroid%2C+detoxification%2C+anti-aging%2C+functional+medicine%2C+autism%2C+biomedical%2C+autistic+spectrum%2C+lyme+disease';
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();
};
