/* [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','5001',jdecode('Home'),jdecode(''),'/5001.html','true',[],'',''],
	['PAGE','7501',jdecode('Will+Writing'),jdecode(''),'/7501/index.html','true',[ 
		['PAGE','7527',jdecode('Why+make+a+Will%3F'),jdecode(''),'/7501/7527.html','true',[],'',''],
		['PAGE','7553',jdecode('What+preparation%3F'),jdecode(''),'/7501/7553.html','true',[],'',''],
		['PAGE','7579',jdecode('Executors%2Fprobate'),jdecode(''),'/7501/7579.html','true',[],'',''],
		['PAGE','7605',jdecode('Asset+protection'),jdecode(''),'/7501/7605.html','true',[],'',''],
		['PAGE','7631',jdecode('Intestacy'),jdecode(''),'/7501/7631.html','true',[],'','']
	],'',''],
	['PAGE','7657',jdecode('Powers+of+Attorney'),jdecode(''),'/7657.html','true',[],'',''],
	['PAGE','7683',jdecode('Advance+Decisions'),jdecode(''),'/7683.html','true',[],'',''],
	['PAGE','7709',jdecode('Change+Your+Name'),jdecode(''),'/7709.html','true',[],'',''],
	['PAGE','5312',jdecode('Business+Services'),jdecode(''),'/5312/index.html','true',[ 
		['PAGE','5338',jdecode('Partnerships'),jdecode(''),'/5312/5338.html','true',[],'',''],
		['PAGE','5364',jdecode('Cross+options'),jdecode(''),'/5312/5364.html','true',[],'',''],
		['PAGE','5390',jdecode('Asset+protection'),jdecode(''),'/5312/5390.html','true',[],'','']
	],'',''],
	['PAGE','7735',jdecode('Document+Storage'),jdecode(''),'/7735.html','true',[],'',''],
	['PAGE','10601',jdecode('Funeral+Plans'),jdecode(''),'/10601.html','true',[],'',''],
	['PAGE','10301',jdecode('Partners'),jdecode(''),'/10301.html','true',[],'',''],
	['PAGE','5416',jdecode('Contact+Us'),jdecode(''),'/5416.html','true',[],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Disco';
theSitetree.paletteFamily='000066';
theSitetree.keyvisualId='1873';
theSitetree.keyvisualName='business.jpg';
theSitetree.fontsetId='307';
theSitetree.graphicsetId='363';
theSitetree.contentColor='30BEF5';
theSitetree.contentBGColor='000066';
var localeDef={
  language: 'en',
  country: 'GB'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Disco',
				paletteFamily: 	'000066',
				keyvisualId: 	'1873',
				keyvisualName: 	'business.jpg',
				fontsetId: 		'307',
				graphicsetId: 	'363',
				contentColor: 	'30BEF5',
				contentBGColor: '000066',
				a_color: 		'000066',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20090430-110110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7501',
internalId:  '',
customField: '20090209-105933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7527',
internalId:  '',
customField: '20090209-105959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7553',
internalId:  '',
customField: '20090209-115456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7579',
internalId:  '',
customField: '20090208-201900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7605',
internalId:  '',
customField: '20090208-210358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7631',
internalId:  '',
customField: '20090208-211038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7657',
internalId:  '',
customField: '20100203-130826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7683',
internalId:  '',
customField: '20090209-111058'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7709',
internalId:  '',
customField: '20090209-111121'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5312',
internalId:  '',
customField: '20090209-111136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5338',
internalId:  '',
customField: '20090209-111157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5364',
internalId:  '',
customField: '20090209-111212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10601',
internalId:  '',
customField: '20090209-104429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5390',
internalId:  '',
customField: '20090209-103756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7735',
internalId:  '',
customField: '20090209-103909'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5416',
internalId:  '',
customField: '20090208-215619'
};
webappMappings['7008']=webappMappings['7008-3858']={
webappId:    '7008',
documentId:  '5416',
internalId:  '3858',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10301',
internalId:  '',
customField: '20090209-105702'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5001',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'coucm4all01.netbenefit.co.uk';
var accountId     = 'ANBT20INE8RM';
var companyName   = 'WILLS+PLUS+LEGAL+SERVICES';
var htmlTitle	  = 'Wills+Plus+Legal+Services';
var metaKeywords  = 'Northamptonshire%2C+Leicestershire%2C+Warwickshire%2C+West+Midlands%2C+Nottinghamshire%2C+Derbyshire%2C+Buckinghamshire+and+Bedfordshire%2C+wills%2C+mirror+will%2C+wills+written%2C+mirror+wills%2C+lasting+powers+of+attorney%2C+intestacy%2C+funeral+plans%2C+deed+poll%2C+trusts%2C+discretionary+trusts%2C+property+trusts%2C+partnership+agreements%2C+cross+option+agreements%2C+secure+storage%2C+civil+partnership%2C+married%2C+single%2C+business%2C+family%2C+heirlooms%2C+children%2C+executors%2C+trustees%2C+guardians%2C+funeral+wishes%2C+inheritance+tax%2C+spouse%2C+partner++';
var metaContents  = 'Wills+written+in+Northampton%2C+Leicester%2C+Lutterworth%2C+Market+Harborough%2C+Rugby%2C+Warwick%2C+Birmingham%2C+Nottingham%2C+Derby%2C+Coventry%2C+Leamington%2C+Kettering';
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();
};
