/* [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','110901',jdecode('Home'),jdecode(''), jdecode('%2F110901.html'), 'true',[],'',''],
	['PAGE','9601',jdecode('Reward+services'),jdecode(''), jdecode('%2F9601%2Findex.html'), 'true',[ 
		['PAGE','11101',jdecode('Pay+benchmarking'),jdecode(''), jdecode('%2F9601%2F11101.html'), 'true',[],'',''],
		['PAGE','10901',jdecode('Executive+pay'),jdecode(''), jdecode('%2F9601%2F10901.html'), 'true',[],'',''],
		['PAGE','115001',jdecode('Pay+Review+Reports'),jdecode(''), jdecode('%2F9601%2F115001.html'), 'true',[],'',''],
		['PAGE','40201',jdecode('Reward+Reviews'),jdecode(''), jdecode('%2F9601%2F40201.html'), 'true',[],'',''],
		['PAGE','13301',jdecode('Job+sizing'),jdecode(''), jdecode('%2F9601%2F13301.html'), 'true',[],'',''],
		['PAGE','13501',jdecode('Grade+structure+design'),jdecode(''), jdecode('%2F9601%2F13501.html'), 'true',[],'',''],
		['PAGE','13801',jdecode('Incentive+schemes'),jdecode(''), jdecode('%2F9601%2F13801.html'), 'true',[],'',''],
		['PAGE','16327',jdecode('Equal+pay+assessments'),jdecode(''), jdecode('%2F9601%2F16327.html'), 'true',[],'',''],
		['PAGE','10301',jdecode('Pay+review+support'),jdecode(''), jdecode('%2F9601%2F10301.html'), 'true',[],'',''],
		['PAGE','40601',jdecode('Employee+benefits'),jdecode(''), jdecode('%2F9601%2F40601.html'), 'true',[],'','']
	],'',''],
	['PAGE','14001',jdecode('Benchmarking+surveys'),jdecode(''), jdecode('%2F14001%2Findex.html'), 'true',[ 
		['PAGE','14801',jdecode('Pay+rise+surveys'),jdecode(''), jdecode('%2F14001%2F14801.html'), 'true',[],'',''],
		['PAGE','81501',jdecode('HR+survey+for+housing'),jdecode(''), jdecode('%2F14001%2F81501.html'), 'true',[],'',''],
		['PAGE','83701',jdecode('Surveying+employee+opinion'),jdecode(''), jdecode('%2F14001%2F83701.html'), 'true',[],'',''],
		['PAGE','15301',jdecode('Reward+surveys'),jdecode(''), jdecode('%2F14001%2F15301.html'), 'true',[],'',''],
		['PAGE','21001',jdecode('Survey+completed'),jdecode(''), jdecode('%2F14001%2F21001.html'), 'false',[],'','']
	],'',''],
	['PAGE','79301',jdecode('News+and+views'),jdecode(''), jdecode('%2F79301.html'), 'true',[],'',''],
	['PAGE','71901',jdecode('Testimonials'),jdecode(''), jdecode('%2F71901.html'), 'true',[],'',''],
	['PAGE','15901',jdecode('About+EBRS'),jdecode(''), jdecode('%2F15901.html'), 'true',[],'',''],
	['PAGE','6401',jdecode('Contact+us'),jdecode(''), jdecode('%2F6401.html'), 'true',[],'',''],
	['PAGE','88201',jdecode('Downloads'),jdecode(''), jdecode('%2F88201.html'), 'false',[],'',''],
	['PAGE','89301',jdecode('Wow%21+Gorillas'),jdecode(''), jdecode('%2F89301.html'), 'true',[],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Sportfan2';
theSitetree.paletteFamily='D4E8AB';
theSitetree.keyvisualId='10139';
theSitetree.keyvisualName='kv_10139.jpg';
theSitetree.fontsetId='21087';
theSitetree.graphicsetId='13184';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'GB'
};
var prodDef={
  wl_name: 'easily_co_uk',
  product: 'WSCSYSSSSLY0XVDH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Sportfan2',
				paletteFamily: 	'D4E8AB',
				keyvisualId: 	'10139',
				keyvisualName: 	'kv_10139.jpg',
				fontsetId: 		'21087',
				graphicsetId: 	'13184',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-6327']={
webappId:    '7008',
documentId:  '6401',
internalId:  '6327',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6401',
internalId:  '',
customField: '20111105-133738'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '6401',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9601',
internalId:  '',
customField: '20111217-161631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10301',
internalId:  '',
customField: '20100817-154619'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10901',
internalId:  '',
customField: '20111215-180054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11101',
internalId:  '',
customField: '20111219-131106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13301',
internalId:  '',
customField: '20110921-110629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13501',
internalId:  '',
customField: '20100628-162125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13801',
internalId:  '',
customField: '20100914-130724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14001',
internalId:  '',
customField: '20111217-153104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14801',
internalId:  '',
customField: '20120118-095841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15301',
internalId:  '',
customField: '20101117-162806'
};
webappMappings['7008']=webappMappings['7008-8153']={
webappId:    '7008',
documentId:  '81501',
internalId:  '8153',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15901',
internalId:  '',
customField: '20111105-132754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16327',
internalId:  '',
customField: '20101210-160707'
};
webappMappings['7008']=webappMappings['7008-8702']={
webappId:    '7008',
documentId:  '11101',
internalId:  '8702',
customField: 'language:en;country:GB;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '14001',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '15301',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '14801',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['7008']=webappMappings['7008-9417']={
webappId:    '7008',
documentId:  '110901',
internalId:  '9417',
customField: 'language:en;country:GB;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '9601',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '13301',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '11101',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '10901',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '13501',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '13801',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '16327',
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:  '15901',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40201',
internalId:  '',
customField: '20101015-181738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21001',
internalId:  '',
customField: '20101215-110516'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '21001',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88201',
internalId:  '',
customField: '20120109-120447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40601',
internalId:  '',
customField: '20101203-111437'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89301',
internalId:  '',
customField: '20111001-124105'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115001',
internalId:  '',
customField: '20120118-095743'
};
webappMappings['7008']=webappMappings['7008-7045']={
webappId:    '7008',
documentId:  '40201',
internalId:  '7045',
customField: 'language:en;country:GB;'
};
webappMappings['7008']=webappMappings['7008-8465']={
webappId:    '7008',
documentId:  '14801',
internalId:  '8465',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79301',
internalId:  '',
customField: '20101021-155915'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '40201',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '40601',
internalId:  '',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83701',
internalId:  '',
customField: '20101117-161434'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71901',
internalId:  '',
customField: '20111105-132022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81501',
internalId:  '',
customField: '20120123-134123'
};
webappMappings['7050']=webappMappings['7050-3043']={
webappId:    '7050',
documentId:  '79301',
internalId:  '3043',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110901',
internalId:  '',
customField: '20120123-134054'
};
webappMappings['7008']=webappMappings['7008-9555']={
webappId:    '7008',
documentId:  '115001',
internalId:  '9555',
customField: 'language:en;country:GB;'
};
var webAppHostname = 'cgi.easily.co.uk:80';
var canonHostname = 'coucm4all01.netbenefit.co.uk';
var accountId     = 'ANBT10IN35EJ';
var companyName   = 'Essential+benchmarking+%26+reward+solutions';
var htmlTitle	  = 'EBRS+%7C+Employee+Pay+and+Reward+Specialists';
var metaKeywords  = 'Consulting%2C+Consultant%2C+Consultancy%2C+Reward%2C+Pay%2C+HR%2C+Human+Resources%2C+Surveys%2C+Benchmarking%2C+Executive%2C+Bonus%2C+Incentives%2C+Bristol%2C+SW%2C+South+West%2C+UK%2C+grade%2C+national%2C+housing%2C+not+for+profit%2C+charity%2C+pay+rise%2C+job+evaluation%2C+levelling%2C+pay+review%2C+APR%2C+pay+rise+survey%2C+small+business%2C++small+housing+associations%2C+executive+pay+benchmarking%2C+equal+pay%2C+equal+pay+audit%2C+grade+structure%2C+Salary+Benchmarking';
var metaContents  = 'EBRS+provides+practical+benchmarking%2C+pay+and+reward+solutions.+Essential+Benchmarking++Reward+Solutions+has+the+HR+consulting+experience+to+deliver+the+results+you+need.+Based+in+Bristol%2C+we+advise+organisations+nationally++in+the+South+West.';
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();
};

