/* [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','401',jdecode('Home'),jdecode(''),'/401.html','true',[],''],
	['PAGE','12601',jdecode('NLP'),jdecode(''),'/12601.html','true',[],''],
	['PAGE','494',jdecode('Hypnosis'),jdecode(''),'/494.html','true',[],''],
	['PAGE','12322',jdecode('Hypnosis+downloads'),jdecode(''),'/12322.html','true',[],''],
	['PAGE','12343',jdecode('Gifts+for+you'),jdecode(''),'/12343.html','true',[],''],
	['PAGE','11743',jdecode('How+does+this+work%3F'),jdecode(''),'/11743.html','true',[],''],
	['PAGE','11764',jdecode('Testimonials'),jdecode(''),'/11764.html','true',[],''],
	['PAGE','11785',jdecode('Credentials'),jdecode(''),'/11785.html','true',[],''],
	['PAGE','13501',jdecode('Louise+Goddard%26%23x27%3Bs+Blog'),jdecode(''),'/13501.html','true',[],''],
	['PAGE','12016',jdecode('Contact+Louise+Goddard'),jdecode(''),'/12016.html','true',[],'']];
var siteelementCount=10;
theSitetree.topTemplateName='Solid';
theSitetree.paletteFamily='8396BA';
theSitetree.keyvisualId='4356';
theSitetree.keyvisualName='kv_4356.jpg';
theSitetree.fontsetId='10800';
theSitetree.graphicsetId='11232';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='8396BA';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Solid',
				paletteFamily: 	'8396BA',
				keyvisualId: 	'4356',
				keyvisualName: 	'kv_4356.jpg',
				fontsetId: 		'10800',
				graphicsetId: 	'11232',
				contentColor: 	'FFFFFF',
				contentBGColor: '8396BA',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100224-000132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12601',
internalId:  '',
customField: '20100109-001342'
};
webappMappings['7008']=webappMappings['7008-1755']={
webappId:    '7008',
documentId:  '12016',
internalId:  '1755',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20080816-025256'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12322',
internalId:  '',
customField: '20100109-000432'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12343',
internalId:  '',
customField: '20100109-000432'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11743',
internalId:  '',
customField: '20100108-235126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11764',
internalId:  '',
customField: '20100108-235126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11785',
internalId:  '',
customField: '20100108-235126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13501',
internalId:  '',
customField: '20100109-004252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12016',
internalId:  '',
customField: '20100108-235126'
};
var canonHostname = 'wsc1.brinkster.com';
var accountId     = 'ABRI10INV3P6';
var companyName   = 'Louise+Goddard%2C+NLP+Success+Coach+%26+Hypnotist';
var htmlTitle	  = 'School+Your+Mind...FOR+SUCCESS';
var metaKeywords  = 'Master+Practitioner+of+NLP%2C+motivational+life+coaching%2C+weight+loss+coaching%2C+communication+skills+coaching%2C+NLP+related+strategies+for+releasing+oneself+from+negative+thought+patterns%2C+mental+blocks%2C+fears%2C+phobias%2C+lack+of+motivation%2C+making+changes+to+realise+your+potential%2C+Hypnosis%2C+Hypnotherapy%2C+timeline+therapy%2C+NLP+training';
var metaContents  = 'As+a+Master+Practitioner+of+NLP%2C+Louise+Goddard+of+School+Your+Mind+offers+the+following+services%3A+++%E2%80%A2+motivational+life+coaching++%E2%80%A2+weight+loss+coaching++%E2%80%A2+communication+skills+coaching++%E2%80%A2+NLP+related+strategies+for+releasing+oneself+from+negative+thought+patterns%2C+mental+blocks%2C+fears%2C+phobias%2C+lack+of+motivation%2C+making+changes+to+realise+your+potential%2C+the+list+goes+on.++%E2%80%A2+Hypnosis+for+any+of+the+above++';
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();
};
