/* [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','93',jdecode('Home'),jdecode(''),'/93.html','true',[],'',''],
	['PAGE','2547',jdecode('Disclaimer'),jdecode(''),'/2547.html','true',[],'',''],
	['PAGE','1630',jdecode('Contacting+us'),jdecode(''),'/1630.html','true',[],'',''],
	['PAGE','12395',jdecode('FREE+Consultation'),jdecode(''),'/12395.html','true',[],'',''],
	['PAGE','1187',jdecode('About+us'),jdecode(''),'/1187/index.html','true',[ 
		['PAGE','1814',jdecode('Our+Approach'),jdecode(''),'/1187/1814.html','true',[],'',''],
		['PAGE','2232',jdecode('Principles'),jdecode(''),'/1187/2232.html','true',[],'',''],
		['PAGE','7780',jdecode('Independence'),jdecode(''),'/1187/7780.html','true',[],'',''],
		['PAGE','7816',jdecode('Service+Level'),jdecode(''),'/1187/7816.html','true',[],'',''],
		['PAGE','7798',jdecode('Research'),jdecode(''),'/1187/7798.html','true',[],'',''],
		['PAGE','7771',jdecode('Technology+we+use'),jdecode(''),'/1187/7771.html','true',[],'',''],
		['PAGE','8191',jdecode('In+the+Press'),jdecode(''),'/1187/8191.html','true',[],'',''],
		['PAGE','1823',jdecode('Business+Forums'),jdecode(''),'/1187/1823.html','true',[],'',''],
		['PAGE','1196',jdecode('Case+Studies'),jdecode(''),'/1187/1196.html','true',[],'',''],
		['PAGE','1205',jdecode('Testimonials'),jdecode(''),'/1187/1205.html','true',[],'','']
	],'',''],
	['PAGE','1603',jdecode('Our+Services'),jdecode(''),'/1603/index.html','true',[ 
		['PAGE','1612',jdecode('Corporate+Services'),jdecode(''),'/1603/1612.html','true',[],'',''],
		['PAGE','2409',jdecode('Individual+Services'),jdecode(''),'/1603/2409.html','true',[],'',''],
		['PAGE','12404',jdecode('Medics+Service'),jdecode(''),'/1603/12404.html','true',[],'',''],
		['PAGE','3136',jdecode('Trustee+Services'),jdecode(''),'/1603/3136.html','true',[],'',''],
		['PAGE','11063',jdecode('Pension+Schemes+Service'),jdecode(''),'/1603/11063.html','true',[],'',''],
		['PAGE','10528',jdecode('Ethical+Investing'),jdecode(''),'/1603/10528.html','true',[],'',''],
		['PAGE','11517',jdecode('Charities+Service'),jdecode(''),'/1603/11517.html','true',[],'',''],
		['PAGE','8723',jdecode('Wellness+Management'),jdecode(''),'/1603/8723.html','true',[],'',''],
		['PAGE','2043',jdecode('Business+Exit+Planning'),jdecode(''),'/1603/2043.html','true',[],'',''],
		['PAGE','2910',jdecode('Conveyancing'),jdecode(''),'/1603/2910.html','true',[],'','']
	],'',''],
	['PAGE','1685',jdecode('The+Professionals+Alliance'),jdecode(''),'/1685.html','true',[],'',''],
	['PAGE','8209',jdecode('Technical+Resources'),jdecode(''),'/8209.html','true',[],'',''],
	['PAGE','12051',jdecode('Careers'),jdecode(''),'/12051.html','true',[],'',''],
	['PAGE','8200',jdecode('Useful+Links'),jdecode(''),'/8200.html','true',[],'',''],
	['PAGE','8508',jdecode('Log+in'),jdecode(''),'/8508.html','true',[],'','']];
var siteelementCount=31;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='555454';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10555';
theSitetree.graphicsetId='10892';
theSitetree.contentColor='0000A0';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Alpha',
				paletteFamily: 	'555454',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10555',
				graphicsetId: 	'10892',
				contentColor: 	'0000A0',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'555454',
				e_color: 		'555454',
				f_color: 		'555454',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '93',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-8644']={
webappId:    '7008',
documentId:  '12051',
internalId:  '8644',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-8645']={
webappId:    '7008',
documentId:  '1630',
internalId:  '8645',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93',
internalId:  '',
customField: '20090731-111928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2547',
internalId:  '',
customField: '20080212-202400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1630',
internalId:  '',
customField: '20090731-111250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12395',
internalId:  '',
customField: '20090731-111345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1187',
internalId:  '',
customField: '20090505-072505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1814',
internalId:  '',
customField: '20090216-181704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2232',
internalId:  '',
customField: '20090505-072546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7780',
internalId:  '',
customField: '20090216-182725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7816',
internalId:  '',
customField: '20090505-073707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7798',
internalId:  '',
customField: '20090216-182927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7771',
internalId:  '',
customField: '20090216-182106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8191',
internalId:  '',
customField: '20080212-194235'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1823',
internalId:  '',
customField: '20090216-183116'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1196',
internalId:  '',
customField: '20090216-181835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1205',
internalId:  '',
customField: '20090216-183247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1603',
internalId:  '',
customField: '20090320-092057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1612',
internalId:  '',
customField: '20090505-085230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2409',
internalId:  '',
customField: '20090505-085311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12404',
internalId:  '',
customField: '20090714-062445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3136',
internalId:  '',
customField: '20090505-085402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11063',
internalId:  '',
customField: '20090216-184050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10528',
internalId:  '',
customField: '20090505-085457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11517',
internalId:  '',
customField: '20090505-085547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8723',
internalId:  '',
customField: '20090216-184701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2043',
internalId:  '',
customField: '20090216-184803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2910',
internalId:  '',
customField: '20090505-085701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1685',
internalId:  '',
customField: '20090505-085726'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8209',
internalId:  '',
customField: '20090320-085752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12051',
internalId:  '',
customField: '20090731-111554'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8200',
internalId:  '',
customField: '20090320-090042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8508',
internalId:  '',
customField: '20080902-091441'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050IN37AM';
var companyName   = 'Abacus+Investment+Management';
var htmlTitle	  = 'Independent+Financial+Advisers+IFA+%7C+Abacus+Investment+Management';
var metaKeywords  = 'Independent+Financial+Adviser%2C+IFA%2C+pensions%2C+investments%2C+mortgage%2C+insurance%2C+corporate+planning%2C+wealth+management%2C+Brierley+Hill%2C+Midlands%2C+birmingham%2C+financial+advisers%2C+tax+advice';
var metaContents  = 'Independent+Financial+Advisers+to+Individuals%2C+Businesses+amp%3B+Trusts+%7C+IFA+Business+Planning+amp%3B+Tax+Advisers+%7C+Brierley+Hill+Birmingham+Midlands+%7C+0844+893+0068';
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();
};
