/* [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','64',jdecode('About+Max+'),jdecode(''), jdecode('%2F64.html'), 'true',[],'',''],
	['PAGE','56912',jdecode('My+NEW+Book+2012'),jdecode(''), jdecode('%2F56912.html'), 'true',[],'',''],
	['PAGE','62623',jdecode('Target+Your+Fat+Spots+'),jdecode(''), jdecode('%2F62623.html'), 'true',[],'',''],
	['PAGE','61523',jdecode('Fat+Spot+BOOTCAMP'),jdecode(''), jdecode('%2F61523.html'), 'true',[],'',''],
	['PAGE','20148',jdecode('My+Inspiration+'),jdecode(''), jdecode('%2F20148.html'), 'true',[],'',''],
	['PAGE','58712',jdecode('HELP+Jaspar+WALK'),jdecode(''), jdecode('%2F58712.html'), 'true',[],'',''],
	['PAGE','11884',jdecode('What+is+Naturopathy%3F'),jdecode(''), jdecode('%2F11884.html'), 'true',[],'',''],
	['PAGE','12117',jdecode('Clinic++Address+%2B+Fees'),jdecode(''), jdecode('%2F12117.html'), 'true',[],'',''],
	['PAGE','52301',jdecode('First+Line+Therapy'),jdecode(''), jdecode('%2F52301.html'), 'true',[],'',''],
	['PAGE','14100',jdecode('My+Method+-+VIP'),jdecode(''), jdecode('%2F14100.html'), 'false',[],'',''],
	['PAGE','14310',jdecode('Online+or+Phone+Consults'),jdecode(''), jdecode('%2F14310.html'), 'false',[],'',''],
	['PAGE','82',jdecode('Max%26%23x27%3Bs+Fab+Book+'),jdecode(''), jdecode('%2F82.html'), 'true',[],'',''],
	['PAGE','14939',jdecode('Breakthrough+Program'),jdecode(''), jdecode('%2F14939.html'), 'true',[],'',''],
	['PAGE','13998',jdecode('Bikini+Boot+Camp%21%21'),jdecode(''), jdecode('%2F13998.html'), 'true',[],'',''],
	['PAGE','38501',jdecode('Detox+ICELAND+with+Max'),jdecode(''), jdecode('%2F38501.html'), 'true',[],'',''],
	['PAGE','28101',jdecode('Detox+LONDON+with+Max'),jdecode(''), jdecode('%2F28101.html'), 'true',[],'',''],
	['PAGE','53201',jdecode('DANGER+-+EU+Laws%21'),jdecode(''), jdecode('%2F53201.html'), 'true',[],'',''],
	['PAGE','39701',jdecode('CompareTheSpa.com'),jdecode(''), jdecode('%2F39701.html'), 'true',[],'',''],
	['PAGE','39722',jdecode('CompareTheDetox.com'),jdecode(''), jdecode('%2F39722.html'), 'true',[],'',''],
	['PAGE','29401',jdecode('Biological+Age+Reduction'),jdecode(''), jdecode('%2F29401.html'), 'true',[],'',''],
	['PAGE','91',jdecode('Easy+Detox+Program'),jdecode(''), jdecode('%2F91%2Findex.html'), 'true',[ 
		['PAGE','12349',jdecode('Menu+plan'),jdecode(''), jdecode('%2F91%2F12349.html'), 'true',[],'',''],
		['PAGE','12358',jdecode('Detox+supplements'),jdecode(''), jdecode('%2F91%2F12358.html'), 'true',[],'','']
	],'',''],
	['PAGE','11893',jdecode('Free+Weight+Loss+Program'),jdecode(''), jdecode('%2F11893%2Findex.html'), 'true',[ 
		['PAGE','12265',jdecode('Express+10+day+program+guide'),jdecode(''), jdecode('%2F11893%2F12265.html'), 'true',[],'',''],
		['PAGE','12340',jdecode('10+day+Express+Menu+plan'),jdecode(''), jdecode('%2F11893%2F12340.html'), 'true',[],'',''],
		['PAGE','12274',jdecode('Weight+loss+supplements'),jdecode(''), jdecode('%2F11893%2F12274.html'), 'true',[],'','']
	],'',''],
	['PAGE','20617',jdecode('Free+kids+Clinic'),jdecode(''), jdecode('%2F20617.html'), 'true',[],'',''],
	['PAGE','13085',jdecode('Nutrition+Coaching+Service'),jdecode(''), jdecode('%2F13085%2Findex.html'), 'true',[ 
		['PAGE','13192',jdecode('Nutrition+Coaching+service+%28follow+up+page%29'),jdecode(''), jdecode('%2F13085%2F13192.html'), 'false',[],'',''],
		['PAGE','13198',jdecode('Coaching+fees'),jdecode(''), jdecode('%2F13085%2F13198.html'), 'true',[],'','']
	],'',''],
	['PAGE','13823',jdecode('Healthy+Cooking+Coaching'),jdecode(''), jdecode('%2F13823%2Findex.html'), 'true',[ 
		['PAGE','13953',jdecode('Healthy+Cooking+Coaching+%28follow+up+page%29'),jdecode(''), jdecode('%2F13823%2F13953.html'), 'false',[],'',''],
		['PAGE','13832',jdecode('Coaching+fees'),jdecode(''), jdecode('%2F13823%2F13832.html'), 'true',[],'','']
	],'',''],
	['PAGE','41601',jdecode('Swine+flu+-+protection'),jdecode(''), jdecode('%2F41601.html'), 'false',[],'',''],
	['PAGE','43301',jdecode('Fake+pandemic%3F'),jdecode(''), jdecode('%2F43301%2Findex.html'), 'false',[ 
		['PAGE','13017',jdecode('Contact+Max+%2B+Press+%28follow+up+page%29'),jdecode(''), jdecode('%2F43301%2F13017.html'), 'false',[],'','']
	],'',''],
	['PAGE','46001',jdecode('EU+kills+supplements'),jdecode(''), jdecode('%2F46001.html'), 'false',[],'',''],
	['PAGE','34301',jdecode('Vitality+at+any+Age'),jdecode(''), jdecode('%2F34301%2Findex.html'), 'true',[ 
		['PAGE','34322',jdecode('In+your+Twenties'),jdecode(''), jdecode('%2F34301%2F34322.html'), 'true',[],'',''],
		['PAGE','34343',jdecode('In+your+Thirties'),jdecode(''), jdecode('%2F34301%2F34343.html'), 'true',[],'',''],
		['PAGE','34364',jdecode('In+your+Forties'),jdecode(''), jdecode('%2F34301%2F34364.html'), 'true',[],'',''],
		['PAGE','34385',jdecode('In+your+Fifties'),jdecode(''), jdecode('%2F34301%2F34385.html'), 'true',[],'','']
	],'',''],
	['PAGE','47201',jdecode('Heart+disease'),jdecode(''), jdecode('%2F47201.html'), 'true',[],'',''],
	['PAGE','14531',jdecode('Candida'),jdecode(''), jdecode('%2F14531.html'), 'true',[],'',''],
	['PAGE','29001',jdecode('IBS+Clinic'),jdecode(''), jdecode('%2F29001.html'), 'true',[],'',''],
	['PAGE','15192',jdecode('Fertility+clinic'),jdecode(''), jdecode('%2F15192.html'), 'true',[],'',''],
	['PAGE','14522',jdecode('Polycystic+Ovaries+PCO%2FS'),jdecode(''), jdecode('%2F14522.html'), 'true',[],'',''],
	['PAGE','14540',jdecode('Adrenal+Fatigue+and+Stress'),jdecode(''), jdecode('%2F14540.html'), 'true',[],'',''],
	['PAGE','19791',jdecode('Food+Allergies+and+Testing'),jdecode(''), jdecode('%2F19791.html'), 'true',[],'',''],
	['PAGE','11902',jdecode('Buy+Max%26%23x27%3Bs+Health+Products'),jdecode(''), jdecode('%2F11902.html'), 'false',[],'',''],
	['PAGE','12210',jdecode('Max+in+the+Press'),jdecode(''), jdecode('%2F12210.html'), 'true',[],'',''],
	['PAGE','43',jdecode('Contact+Max+'),jdecode(''), jdecode('%2F43.html'), 'true',[],'',''],
	['PAGE','13651',jdecode('Press'),jdecode(''), jdecode('%2F13651.html'), 'true',[],'','']];
var siteelementCount=54;
theSitetree.topTemplateName='Antigua';
theSitetree.paletteFamily='797979';
theSitetree.keyvisualId='6917';
theSitetree.keyvisualName='kv_6917.jpg';
theSitetree.fontsetId='11214';
theSitetree.graphicsetId='12040';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='979797';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'hostway',
  product: 'WSCSYSSSSLYTC245'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Antigua',
				paletteFamily: 	'797979',
				keyvisualId: 	'6917',
				keyvisualName: 	'kv_6917.jpg',
				fontsetId: 		'11214',
				graphicsetId: 	'12040',
				contentColor: 	'FFFFFF',
				contentBGColor: '979797',
				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:  '62623',
internalId:  '',
customField: '20120123-094300'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '64',
internalId:  '1501',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56912',
internalId:  '',
customField: '20111214-064051'
};
webappMappings['7008']=webappMappings['7008-8873']={
webappId:    '7008',
documentId:  '43',
internalId:  '8873',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-8874']={
webappId:    '7008',
documentId:  '13085',
internalId:  '8874',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58712',
internalId:  '',
customField: '20111214-074133'
};
webappMappings['7008']=webappMappings['7008-8875']={
webappId:    '7008',
documentId:  '13823',
internalId:  '8875',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52301',
internalId:  '',
customField: '20110613-072939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47201',
internalId:  '',
customField: '20120105-095446'
};
webappMappings['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC245']={
webappId:    '5003',
documentId:  '43',
internalId:  'tid:1;pid:WSCSYSSSSLYTC245',
customField: 'en:US:'
};
webappMappings['1501']=webappMappings['1501-376756']={
webappId:    '1501',
documentId:  '64',
internalId:  '376756',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64',
internalId:  '',
customField: '20120123-090408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43301',
internalId:  '',
customField: '20100213-050915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20617',
internalId:  '',
customField: '20101014-041726'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11884',
internalId:  '',
customField: '20111214-073217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20148',
internalId:  '',
customField: '20111214-064140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14100',
internalId:  '',
customField: '20090904-035735'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12117',
internalId:  '',
customField: '20120123-090532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14310',
internalId:  '',
customField: '20101014-045055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13085',
internalId:  '',
customField: '20090106-051912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13192',
internalId:  '',
customField: '20080317-165741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13198',
internalId:  '',
customField: '20110602-073751'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13823',
internalId:  '',
customField: '20080319-135543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13953',
internalId:  '',
customField: '20080319-135204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13832',
internalId:  '',
customField: '20101014-042146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14939',
internalId:  '',
customField: '20111214-073649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13998',
internalId:  '',
customField: '20080320-174130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39701',
internalId:  '',
customField: '20110602-073840'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11893',
internalId:  '',
customField: '20090302-123559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12265',
internalId:  '',
customField: '20100213-051037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12340',
internalId:  '',
customField: '20080317-165348'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12274',
internalId:  '',
customField: '20090302-123722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91',
internalId:  '',
customField: '20101014-041300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12349',
internalId:  '',
customField: '20090106-043357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12358',
internalId:  '',
customField: '20100713-070513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15192',
internalId:  '',
customField: '20110712-144624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14522',
internalId:  '',
customField: '20110712-144657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14540',
internalId:  '',
customField: '20090106-044123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19791',
internalId:  '',
customField: '20101014-042710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14531',
internalId:  '',
customField: '20101014-042414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11902',
internalId:  '',
customField: '20090106-044233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82',
internalId:  '',
customField: '20111212-094318'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12210',
internalId:  '',
customField: '20080311-143122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34301',
internalId:  '',
customField: '20090319-064243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43',
internalId:  '',
customField: '20110906-071646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13017',
internalId:  '',
customField: '20080311-201605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13651',
internalId:  '',
customField: '20080318-092549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41601',
internalId:  '',
customField: '20100116-065840'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28101',
internalId:  '',
customField: '20110602-073558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29001',
internalId:  '',
customField: '20101014-042445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29401',
internalId:  '',
customField: '20090828-044804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39722',
internalId:  '',
customField: '20100407-095135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34322',
internalId:  '',
customField: '20090319-062936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34343',
internalId:  '',
customField: '20090319-070033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34364',
internalId:  '',
customField: '20090319-070848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34385',
internalId:  '',
customField: '20090319-071458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38501',
internalId:  '',
customField: '20110602-074714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46001',
internalId:  '',
customField: '20100329-084731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53201',
internalId:  '',
customField: '20110711-092209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61523',
internalId:  '',
customField: '20120105-123251'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050IN2CZE';
var companyName   = 'Max+Tomlinson+ND%3A+%27Nature+Doctor%27+%2B+Naturopath+%2B+Herbalist';
var htmlTitle	  = 'Max+Tomlinson+ND%3A+%27The+Nature+Doctor%27%2C+Naturopath%2C+Nutritionist%2C+Coach+and+%27Natural+GP%27';
var metaKeywords  = 'naturopath%2C+++nutritionist%2C+++medical+herbalist%2C+++homeopath%2C++detox%2C+++Australian%2C++Harley+street+%2C++London%2C+max+tomlinson%2C++grazia%2C+inspa%2C++tatler%2C++Patrick+Holford%2C++Ian+marber%2C++food+doctor%2C++nutri%2C++solgar%2C++CNM%2C++FX+Mayr%2C++IWDL%2C+nutrition+coach%2C+Wayne%2C+Espa+Life%2C+naturecare%2C+Espa%2C+Corinthia%2C+Genova%2C+GDX%2C+First+Line+Therapy%2C+Nutri%2C+nutri-link%2C+Antony+Hanes%2C+Matagenics';
var metaContents  = 'The+United+Kingdom%27s+leading+naturopath+and+nutritionist.';
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();
};

