/* [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','401',jdecode('HOME'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','5201',jdecode('About+Us'),jdecode(''),'/5201/index.html','true',[ 
		['PAGE','5243',jdecode('Qualifications'),jdecode(''),'/5201/5243.html','true',[],'',''],
		['PAGE','5222',jdecode('Testimonials'),jdecode(''),'/5201/5222.html','true',[],'',''],
		['PAGE','5264',jdecode('Locations'),jdecode(''),'/5201/5264.html','true',[],'','']
	],'',''],
	['PAGE','5285',jdecode('WINDOVER+FITNESS'),jdecode(''),'/5285.html','true',[],'',''],
	['PAGE','5306',jdecode('GROUPS'),jdecode(''),'/5306.html','true',[],'',''],
	['PAGE','5327',jdecode('NUTRITION'),jdecode(''),'/5327.html','true',[],'',''],
	['PAGE','5390',jdecode('ARTICLES'),jdecode(''),'/5390/index.html','true',[ 
		['PAGE','5348',jdecode('Maintaining+BALANCE'),jdecode(''),'/5390/5348.html','true',[],'',''],
		['PAGE','11801',jdecode('Active+Living'),jdecode(''),'/5390/11801.html','true',[],'',''],
		['PAGE','11822',jdecode('Water+and+Hydration'),jdecode(''),'/5390/11822.html','true',[],'',''],
		['PAGE','5411',jdecode('Meal+Timing'),jdecode(''),'/5390/5411.html','true',[],'',''],
		['PAGE','15501',jdecode('Glycaemic+Index'),jdecode(''),'/5390/15501.html','true',[],'',''],
		['PAGE','5369',jdecode('Marathon+Preparation'),jdecode(''),'/5390/5369.html','true',[],'',''],
		['PAGE','15522',jdecode('Lat+Pulldown+Controversy'),jdecode(''),'/5390/15522.html','true',[],'','']
	],'',''],
	['PAGE','5432',jdecode('Links'),jdecode(''),'/5432.html','true',[],'',''],
	['PAGE','5453',jdecode('Contact+Us'),jdecode(''),'/5453.html','true',[],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Transluszent';
theSitetree.paletteFamily='333333';
theSitetree.keyvisualId='9240';
theSitetree.keyvisualName='kv2.swf';
theSitetree.fontsetId='17363';
theSitetree.graphicsetId='12757';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'GB'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Transluszent',
				paletteFamily: 	'333333',
				keyvisualId: 	'9240',
				keyvisualName: 	'kv2.swf',
				fontsetId: 		'17363',
				graphicsetId: 	'12757',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'FFFFFF',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-939735']={
webappId:    '1501',
documentId:  '401',
internalId:  '939735',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-3243']={
webappId:    '7008',
documentId:  '5453',
internalId:  '3243',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100107-182632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5201',
internalId:  '',
customField: '20100103-211256'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5453',
internalId:  '',
customField: '20100103-215003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5306',
internalId:  '',
customField: '20100103-213723'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5432',
internalId:  '',
customField: '20100103-221118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5285',
internalId:  '',
customField: '20100103-213313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5243',
internalId:  '',
customField: '20100103-211740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5222',
internalId:  '',
customField: '20100103-212141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5264',
internalId:  '',
customField: '20100103-212548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5327',
internalId:  '',
customField: '20100103-214501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5390',
internalId:  '',
customField: '20100103-221631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5348',
internalId:  '',
customField: '20100103-222202'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11801',
internalId:  '',
customField: '20100103-222724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11822',
internalId:  '',
customField: '20100103-223122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5411',
internalId:  '',
customField: '20100103-223510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15501',
internalId:  '',
customField: '20100103-223826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5369',
internalId:  '',
customField: '20100103-224235'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15522',
internalId:  '',
customField: '20100103-224844'
};
var canonHostname = 'coucm4all01.netbenefit.co.uk';
var accountId     = 'ANBT10INXVWO';
var companyName   = 'LIFEafterFORTY.com+CONSULTING';
var htmlTitle	  = 'LIFEafterFORTY.com+CONSULTING+%7E+Fitness+and+Nutrition+specialists+in+East+Sussex';
var metaKeywords  = 'Fitness%2C+Personal%2C+training%2C+trainer%2C+food%2C+nutrition%2C+diet%2C+exercise%2C+Surrey%2C+Sussex%2C+East%2C+east%2C+England%2C+United+Kingdom%2C+Great+Britain%2C+Circuit+classes%2C+Training%2C+cycling%2C+spinning%2C+health%2C+middle%2C+age%2C+middle-age%2C+middle-aged%2C+lifestyle%2C+Windover%2C+studio%2C+Power-Plate%2C+Power+Plate%2C+Powerplate%2C+Oakleafe%2C+rambling%2C+walking%2C+anywhere%2C+nordic%2C+life%2C+forty%2C+fifty%2C+sixty%2C+older%2C+adult+Alfriston%2C+Cuckmere%2C+Seaford%2C+Wealden%2C+Eastbourne';
var metaContents  = 'Is+there+Life+after+Forty+%3F++YES+and+WINDOVER+FITNESS%2C+our+Personal+Training+and+Weight+Management+consultancy+based+in+East+Sussex%2C+UK%2C+aims+to+help+you+achieve+the+most+from+the+years+in+your+life+%7E+to+achieve+health+and+fitness+and+to+maximise+self+image%2Freduce+stress.++Exercise+anywhere+...+but+above+all%2C+using+our+stunning+Windover+Personal+Training+Studio+and+Training+Park.++The+Gym+of+the+Outdoors+for+exclusive+indoor+and+outdoor+facilities+including+Power-Plate';
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();
};
