/* [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','1310',jdecode('Home'),jdecode(''),'/1310.html','true',[],'',''],
	['PAGE','4401',jdecode('Difficulties+addressed'),jdecode(''),'/4401.html','true',[],'',''],
	['PAGE','12501',jdecode('Psychological+Therapy'),jdecode(''),'/12501.html','true',[],'',''],
	['PAGE','12527',jdecode('Psychosexual+Therapy'),jdecode(''),'/12527.html','true',[],'',''],
	['PAGE','12553',jdecode('CV'),jdecode(''),'/12553.html','true',[],'',''],
	['PAGE','12579',jdecode('Links'),jdecode(''),'/12579.html','true',[],'',''],
	['PAGE','12631',jdecode('FAQs+%26+Location'),jdecode(''),'/12631.html','true',[],'',''],
	['PAGE','18701',jdecode('Contact+us'),jdecode(''),'/18701.html','true',[],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Noble';
theSitetree.paletteFamily='7A3B9F';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='17225';
theSitetree.graphicsetId='12671';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='7A3B9F';
var localeDef={
  language: 'en',
  country: 'GB'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Noble',
				paletteFamily: 	'7A3B9F',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'17225',
				graphicsetId: 	'12671',
				contentColor: 	'FFFFFF',
				contentBGColor: '7A3B9F',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12631',
internalId:  '',
customField: '20110712-144336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12501',
internalId:  '',
customField: '20091004-221155'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12527',
internalId:  '',
customField: '20091013-090932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12553',
internalId:  '',
customField: '20110712-144111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1310',
internalId:  '',
customField: '20110712-143653'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1310',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12579',
internalId:  '',
customField: '20090916-200047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18701',
internalId:  '',
customField: '20110712-145234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4401',
internalId:  '',
customField: '20091013-090859'
};
var canonHostname = 'coucm4all01.netbenefit.co.uk';
var accountId     = 'ANBT10IN30VO';
var companyName   = 'Welcome+to+Sloane+Psychology+in+Chelsea';
var htmlTitle	  = 'Sloane+Psychology+in+Belgravia%2C+London';
var metaKeywords  = 'HEAD+META+name%3Dkeywords+content%3Dcomplementary+therapy+south+london+%2Ccbt+therapist+london+%2Clondon+psychology+consultants+%2Cpsychosexual+counsellors+in+london+%2Ccbt+tests+%2Ccbt+course+london+%2Ccbt+cognitive+behavioural+therapy+therapist+%2Ccbt+in+london+%2Clondon+cbt+training+%2Ccognitive+therapy+exercise+%2Ccognitive+behaviour+therapy+courses+%2Ccognitive+analytical+therapy+%2Ccognitive+therapy+for+depression+%2Ccognitive+behavioural+therapy+uk+%2Cpsychosexual+disorders+%2Cpsychosexual+disorder+course+%2Csex+therapy+training+%2Csex+therapy+uk+%2Cpsychosexual+advice+%2Cmindfulness+training+%2Cmindfulness+cbt+%2Cmindfulness+courses+%2Cmindfulness+practice+%2Cemdr+therapy+%2Cemdr+training+%2Cemdr+therapists+uk+%2Cemdr+therapists+%2C+www.sloanepsychology.co.ukpsychology+in+London%2C+psychology+in+Chelsea%2C+psychology+in+Belgravia%2C+psychosexual+therapy+in+London%2C+psychosexual+therapy+in+Chelsea%2C+sex+therapy+in+London%2C+sex+therapy+in+Chelsea%2C+sex+therapy+in+Belgravia%2C+psychologist+in+London%2C+psychotherapy+in+London%2C+therapy+in+London%2C+psychotherapist+in+London%2C+therapist+in+London%2C+therapist+in+Chelsea%2C+therapist+in+Belgravia%2C+sex+therapy%2C+sex+therapy+in+London%2C+sexual+difficulties%2C+sexual+problems%2C+psychosexual+therapy%2C+relationship+difficulties%2C+relationship+problems%2C+work+related+stress%2C+CBT+for+stress%2C+anxiety%2C+depression%2C+abuse%2C+therapy+for+stress%2C+therapy+for+obsessive+compulsive+disorder%2C+OCD%2C+panic+disorder%2C+CBT+for+panic+attacks%2C+ptsd%2C+CBT+for+post+traumatic+stress+disorder%2C+social+anxiety%2C+health+anxiety%2C+phobias%2C+eating+disorders%2C+anorexia%2C+bulimia%2C+binge+eating+disorder%2C+couple+therapy%2C+individual+therapy%2C+skills+training%2C+worry%2C+bereavement%2C+alcohol+abuse%2C+alcohol+misuse%2C+pink+therapy+in+London%2C+premature+ejaculation+treatment%2C+vaginisimus+treatment%2C+difficulties+with+orgasm%2C+unorgasmia+treatment%2C+difficulties+with+erection%2C+erectile+dysfunction+treatment%2C+unorgasmia%2C+painful+sex+treatment%2C+dyspareunia+treatment%2C+low+sex+desire+treatment%2C+psychology+in+Chelsea%2C+south+west+London%2C+accredited%2C+registered%2C+CBT+in+London%2C+CBT+in+Chelsea%2C+psychotherapy+in+Chelsea%2C+cognitiive+behavioural+therapy+in+London%2C+Schema+therapy+in+London%2C+schema+focused+therapy%2C+social+anxiety+treatment%2C+health+anxiety+treatment%2C+CBT+for+social+anxiety%2C+CBT+for+health+anxiety%2C+CBT+for+depression%2C+CBT+for+anxiety%2C+British+Psychological+Society+accredited+psychologist%2C+BPS%2C+personal+development%2C+performance+enhancement%2C+self+awareness%2C+CBT+for+anger%2C+sloanepsychology.co.uk%2C+Tina+Grigoriou%2C+psychologist+in+Chelsea%2C+psychologist+in+London%2C+psychologist+in+Belgravia%2C+sloane+psychology%2C+-beauty+therapist%2C+-physiotherapist%2C+EMDR+in+London%2C+EMDR+in+Chelsea%2C+EMDR+in+Belgravia%2C+9a+Wilbraham+Place%2C+META+name%3Dkeywords+content%3Dcomplementary+therapy+south+london+%2Ccbt+therapist+london+%2Clondon+psychology+consultants+%2Cpsychosexual+counsellors+in+london+%2Ccbt+tests+%2Ccbt+course+london+%2Ccbt+cognitive+behavioural+therapy+therapist+%2Ccbt+in+london+%2Clondon+cbt+training+%2Ccognitive+therapy+exercise+%2Ccognitive+behaviour+therapy+courses+%2Ccognitive+analytical+therapy+%2Ccognitive+therapy+for+depression+%2Ccognitive+behavioural+therapy+uk+%2Cpsychosexual+disorders+%2Cpsychosexual+disorder+course+%2Csex+therapy+training+%2Csex+therapy+uk+%2Cpsychosexual+advice+%2Cmindfulness+training+%2Cmindfulness+cbt+%2Cmindfulness+courses+%2Cmindfulness+practice+%2Cemdr+therapy+%2Cemdr+training+%2Cemdr+therapists+uk+%2Cemdr+therapists+%2Cbest+psychologist%2C+www.sloanepsychology.co.uk%2FHEAD+HTML';
var metaContents  = 'Psychology+and+psychosexual+therapy+service+in+Chelsea+providing+evidence+based+therapies+%28CBT%2C+EMDR%2C+Schema+focused+cognitive+therapy%2C+Mindfulness+cognitive+therapy+%29+for+a+range+of+psychological+and+psychosexual+difficulties+i.e.+anxiety%2C+depression%2C+panic+disorder%2C+post+traumatic+stress+disorder%2C+stress%2C+social+anxiety%2C+health+anxiety%2C+phobias%2C+sexual+problems+etc.+Confidential+service+provided+by+chartered+psychologists+trained+at+doctoral+level.+All+psychologists+are+accredited+by+the+British+Psychological+Society.';
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();
};

