/* [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','701',jdecode('Home'),jdecode(''),'/701.html','true',[],'',''],
	['PAGE','752',jdecode('About+us'),jdecode(''),'/752.html','true',[],'',''],
	['PAGE','815',jdecode('Chinese+Medicine'),jdecode(''),'/815/index.html','true',[ 
		['PAGE','836',jdecode('Acupuncture'),jdecode(''),'/815/836.html','true',[],'',''],
		['PAGE','857',jdecode('Massage'),jdecode(''),'/815/857.html','true',[],'',''],
		['PAGE','878',jdecode('Patent+Herbs'),jdecode(''),'/815/878.html','true',[],'','']
	],'',''],
	['PAGE','21501',jdecode('Conditions+Treated'),jdecode(''),'/21501.html','true',[],'',''],
	['PAGE','71201',jdecode('Osteopathic+Medicine'),jdecode(''),'/71201/index.html','false',[ 
		['PAGE','75601',jdecode('Conditions+Treated'),jdecode(''),'/71201/75601.html','true',[],'','']
	],'',''],
	['PAGE','8401',jdecode('FAQ%26%23x27%3Bs'),jdecode(''),'/8401.html','true',[],'',''],
	['PAGE','32901',jdecode('Qi+Gong'),jdecode(''),'/32901.html','true',[],'',''],
	['PAGE','49201',jdecode('Martial+Arts'),jdecode(''),'/49201.html','false',[],'',''],
	['PAGE','80901',jdecode('Classes'),jdecode(''),'/80901.html','true',[],'',''],
	['PAGE','51001',jdecode('Find+Us'),jdecode(''),'/51001/index.html','true',[ 
		['PAGE','5901',jdecode('Find+us+in+Flitwick'),jdecode(''),'/51001/5901.html','true',[],'',''],
		['PAGE','7101',jdecode('Driving+to+Flitwick'),jdecode(''),'/51001/7101.html','true',[],'','']
	],'',''],
	['PAGE','899',jdecode('Contact+Us'),jdecode(''),'/899.html','true',[],'',''],
	['PAGE','62401',jdecode('Prices'),jdecode(''),'/62401.html','true',[],'',''],
	['PAGE','78401',jdecode('Links+%26+Resources'),jdecode(''),'/78401.html','true',[],'',''],
	['PAGE','61901',jdecode('Shop'),jdecode(''),'/61901.html','false',[],'',''],
	['PAGE','79401',jdecode('Events%2FSeminars'),jdecode(''),'/79401.html','false',[],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Aeskulap';
theSitetree.paletteFamily='C00405';
theSitetree.keyvisualId='2497';
theSitetree.keyvisualName='naturheiler.jpg';
theSitetree.fontsetId='434';
theSitetree.graphicsetId='487';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'GB'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Aeskulap',
				paletteFamily: 	'C00405',
				keyvisualId: 	'2497',
				keyvisualName: 	'naturheiler.jpg',
				fontsetId: 		'434',
				graphicsetId: 	'487',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '701',
internalId:  '1006',
customField: '1006'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '5901',
internalId:  'location',
customField: 'language:en;country:GB;isIncluded:false;'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '7101',
internalId:  'routing',
customField: 'en_GB'
};
webappMappings['1501']=webappMappings['1501-680922']={
webappId:    '1501',
documentId:  '701',
internalId:  '680922',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-664']={
webappId:    '7008',
documentId:  '899',
internalId:  '664',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20090314-170727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49201',
internalId:  '',
customField: '20091101-082210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32901',
internalId:  '',
customField: '20091101-082035'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '752',
internalId:  '',
customField: '20100105-113631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '815',
internalId:  '',
customField: '20081110-131037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '836',
internalId:  '',
customField: '20071214-214836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '857',
internalId:  '',
customField: '20080903-135859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '878',
internalId:  '',
customField: '20071214-215139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21501',
internalId:  '',
customField: '20090314-155319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8401',
internalId:  '',
customField: '20100105-113421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '899',
internalId:  '',
customField: '20080212-222100'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5901',
internalId:  '',
customField: '20080603-230915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7101',
internalId:  '',
customField: '20070412-161252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51001',
internalId:  '',
customField: '20091229-121640'
};
webappMappings['4001']=webappMappings['4001-5933122']={
webappId:    '4001',
documentId:  '61901',
internalId:  '5933122',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61901',
internalId:  '',
customField: '20080511-141826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62401',
internalId:  '',
customField: '20100225-081212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75601',
internalId:  '',
customField: '20081102-200811'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78401',
internalId:  '',
customField: '20100315-201837'
};
webappMappings['7060']=webappMappings['7060-5fc7d7f02513d65b5013578c944f1224']={
webappId:    '7060',
documentId:  '79401',
internalId:  '5fc7d7f02513d65b5013578c944f1224',
customField: 'language:en;country:GB;'
};
webappMappings['7060']=webappMappings['7060-3801e9278507b9de0e691877dd3cb992']={
webappId:    '7060',
documentId:  '71201',
internalId:  '3801e9278507b9de0e691877dd3cb992',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71201',
internalId:  '',
customField: '20081110-131022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79401',
internalId:  '',
customField: '20100222-113417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80901',
internalId:  '',
customField: '20100707-084625'
};
var canonHostname = 'coucm4all01.netbenefit.co.uk';
var accountId     = 'ANBT10INX2KD';
var companyName   = 'Oriental+Health+Treatments';
var htmlTitle	  = '';
var metaKeywords  = 'Acupuncture%2C+Flitwick%2C+Ampthill%2C+Bedfordshire%2C+Deep+Tissue+Massage%3A+Tui+Na%2C+British+Acupuncture+Council%2C+Qi+Gong+classes%2C+Wuzuquan+classes%2C+Qi+Gong+classes+in+Bedford%2C+Acupuncture+in+Bedfordshire%2C+Acupuncture+near+Bedford%2C+Acupuncture+in+Ampthill%2C+Acupuncture+in+Flitwick%2C+Acupuncture+in+Luton%2C+Acupuncturists+in+Bedfordshire%2C+Acupuncturists+near+Bedford%2C+Acupuncturist+near+Ampthill%2C+Acupunctursit+near+Flitwick%2C+Acupuncturist+near+Luton%2C+Qi+Gong+classes+near+Bedford%2C+Qi+Gong+classes+in+Bedfordshire%2C+Kung+fu+classes+in+Bedfordshire%2C+Kung+fu+classes+near+Bedford%2C+Kung+fu+Classes+near+Ampthill%2C+Kung+fu+Classeses+near+Flitwick%2C+Kung+Fu+Classes+in+Steppingley%2C+Wuzuquan+classes+in+Steppingley%2C+Wzuquan+classes+in+Ampthill%2C+OSteopaths+Ampthill%2C+Osteopaths+Flitwick%2C+Osteopaths%2C+Bedford%2C+Osteopaths%2C+Milton+Keynes%2C+Osteopaths+Luton';
var metaContents  = 'Acupuncture++Osteopathy+in+Ampthill%2C+Flitwick+and+Luton+in+Bedfordshire';
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();
};
