/* [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 theSitetree=[ 
	['PAGE','6101',jdecode('Home'),jdecode(''),'/6101.html','true',[],''],
	['PAGE','6152',jdecode('About+me'),jdecode(''),'/6152.html','true',[],''],
	['PAGE','6953',jdecode('Massage+Therapy'),jdecode(''),'/6953.html','true',[],''],
	['PAGE','6901',jdecode('MLD'),jdecode(''),'/6901.html','true',[],''],
	['PAGE','10301',jdecode('CDT'),jdecode(''),'/10301.html','true',[],''],
	['PAGE','7005',jdecode('Clinics+%26+Fees'),jdecode(''),'/7005.html','true',[],''],
	['PAGE','6979',jdecode('Testimonials'),jdecode(''),'/6979.html','true',[],''],
	['PAGE','6308',jdecode('Contact'),jdecode(''),'/6308.html','true',[],''],
	['PAGE','10101',jdecode('Links'),jdecode(''),'/10101.html','true',[],''],
	['PAGE','22701',jdecode('Printable+format'),jdecode(''),'/22701.html','true',[],'']];
var siteelementCount=10;
theSitetree.topTemplateName='Ragtime';
theSitetree.paletteFamily='B3CA99';
theSitetree.keyvisualId='3581';
theSitetree.keyvisualName='kv_3581.jpg';
theSitetree.fontsetId='10452';
theSitetree.graphicsetId='10852';
theSitetree.contentColor='5D6B55';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Ragtime',
				paletteFamily: 	'B3CA99',
				keyvisualId: 	'3581',
				keyvisualName: 	'kv_3581.jpg',
				fontsetId: 		'10452',
				graphicsetId: 	'10852',
				contentColor: 	'5D6B55',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'B3CA99',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'747475',
				e_color: 		'899D75',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6101',
internalId:  '',
customField: '20080825-194814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6152',
internalId:  '',
customField: '20080825-195223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6901',
internalId:  '',
customField: '20080825-193111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6308',
internalId:  '',
customField: '20080722-001355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10101',
internalId:  '',
customField: '20080723-105912'
};
webappMappings['1501']=webappMappings['1501-6355858']={
webappId:    '1501',
documentId:  '6101',
internalId:  '6355858',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '6101',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7005',
internalId:  '',
customField: '20080719-153811'
};
webappMappings['7008']=webappMappings['7008-1972']={
webappId:    '7008',
documentId:  '6308',
internalId:  '1972',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10301',
internalId:  '',
customField: '20080719-171411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6953',
internalId:  '',
customField: '20080719-181025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6979',
internalId:  '',
customField: '20080719-174613'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '6101',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '6152',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '6901',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '10301',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '6953',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '6979',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '7005',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22701',
internalId:  '',
customField: '20080825-195958'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '6308',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '10101',
internalId:  '',
customField: 'language:en;country:GB;'
};
var canonHostname = 'coucm4all02.netbenefit.co.uk';
var accountId     = 'ANBT20IN231V';
var companyName   = 'www.sussex-mld-therapy.co.uk';
var htmlTitle	  = 'Kelly+Dean+-+Adv.+MLD';
var metaKeywords  = 'Manual+Lymphatic+Drainage%2C+MLD%2C+Vodder%2C+Combined+Decongestive+Therapy%2C+CDT%2C+Sports+Massage%2C+Therapeutic+Massage%2C+swedish+massage%2C+massage+therapist+in+worthing%2C+west+sussex%2C+Kelly+Dean%2C+Lymphoedema%2C+lymphodema%2C+palliative+care%2C+lymph+nodes%2C+lymph+system%2C+sore+muscles%2C+muscular+aches+and+pains%2C+how+to+reduce+swelling+and+oedema%2C+post-operative+care%2C+';
var metaContents  = 'Kelly+Dean+-+Sports+Therapist%2C+Advanced+Massage+Practitioner%2C+Manual+Lymphatic+Drainage+%28MLD%29%2C+Combined+Decongestive+Therapy+%28CDT%29';
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();
};
