/* [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','2101',jdecode('Home'),jdecode(''),'/2101.html','true',[],'',''],
	['PAGE','66301',jdecode('Application+Form+'),jdecode(''),'/66301.html','true',[],'',''],
	['PAGE','51401',jdecode('Online+Store'),jdecode(''),'/51401.html','true',[],'',''],
	['PAGE','30105',jdecode('Book+a+Course'),jdecode(''),'/30105.html','true',[],'',''],
	['PAGE','29801',jdecode('Course+Information'),jdecode(''),'/29801/index.html','true',[ 
		['PAGE','29827',jdecode('Course+Dates'),jdecode(''),'/29801/29827.html','true',[],'',''],
		['PAGE','30053',jdecode('Course+Content'),jdecode(''),'/29801/30053.html','true',[],'',''],
		['PAGE','29853',jdecode('Course+Location'),jdecode(''),'/29801/29853.html','true',[],'',''],
		['PAGE','29879',jdecode('Course+Directions'),jdecode(''),'/29801/29879.html','true',[],'','']
	],'',''],
	['PAGE','33127',jdecode('Home+Study+Guide+'),jdecode(''),'/33127.html','true',[],'',''],
	['PAGE','38701',jdecode('Police+Selection+Process'),jdecode(''),'/38701.html','true',[],'',''],
	['PAGE','32501',jdecode('The+Assessment+Centre'),jdecode(''),'/32501/index.html','true',[ 
		['PAGE','34001',jdecode('Core+Competencies'),jdecode(''),'/32501/34001.html','true',[],'',''],
		['PAGE','32527',jdecode('PIRT'),jdecode(''),'/32501/32527.html','true',[],'',''],
		['PAGE','32553',jdecode('Role-Play'),jdecode(''),'/32501/32553.html','true',[],'',''],
		['PAGE','32579',jdecode('Interview'),jdecode(''),'/32501/32579.html','true',[],'','']
	],'',''],
	['PAGE','2501',jdecode('About+Us'),jdecode(''),'/2501.html','false',[],'',''],
	['PAGE','32801',jdecode('Why+Do+A+Course'),jdecode(''),'/32801.html','false',[],'',''],
	['PAGE','30027',jdecode('Why+Do+A+Course+With+Us%3F'),jdecode(''),'/30027.html','false',[],'',''],
	['PAGE','30079',jdecode('Course+Guide%2FWorkbook'),jdecode(''),'/30079.html','false',[],'',''],
	['PAGE','33101',jdecode('Job+Related+Fitness+Test'),jdecode(''),'/33101.html','false',[],'',''],
	['PAGE','30901',jdecode('F.A.Q.'),jdecode(''),'/30901.html','true',[],'',''],
	['PAGE','33301',jdecode('Testimonials'),jdecode(''),'/33301.html','true',[],'',''],
	['PAGE','32001',jdecode('Links'),jdecode(''),'/32001.html','true',[],'',''],
	['PAGE','30927',jdecode('Contact+Us'),jdecode(''),'/30927.html','true',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Angkor';
theSitetree.paletteFamily='879ED6';
theSitetree.keyvisualId='6901';
theSitetree.keyvisualName='kv_6901.jpg';
theSitetree.fontsetId='11211';
theSitetree.graphicsetId='12030';
theSitetree.contentColor='354B86';
theSitetree.contentBGColor='94AAE1';
var localeDef={
  language: 'en',
  country: 'GB'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Angkor',
				paletteFamily: 	'879ED6',
				keyvisualId: 	'6901',
				keyvisualName: 	'kv_6901.jpg',
				fontsetId: 		'11211',
				graphicsetId: 	'12030',
				contentColor: 	'354B86',
				contentBGColor: '94AAE1',
				a_color: 		'94AAE1',
				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:  '2101',
internalId:  '',
customField: '20100723-173754'
};
webappMappings['1501']=webappMappings['1501-5565899']={
webappId:    '1501',
documentId:  '2101',
internalId:  '5565899',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2501',
internalId:  '',
customField: '20090509-145129'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2101',
internalId:  '1006',
customField: '1006'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '29853',
internalId:  'location',
customField: 'language:en;country:GB;isIncluded:true;'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '29879',
internalId:  'routing',
customField: 'en_GB'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29853',
internalId:  '',
customField: '20100423-235036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29879',
internalId:  '',
customField: '20081025-103853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29801',
internalId:  '',
customField: '20100425-093752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30927',
internalId:  '',
customField: '20100425-101446'
};
webappMappings['7008']=webappMappings['7008-934']={
webappId:    '7008',
documentId:  '30927',
internalId:  '934',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30053',
internalId:  '',
customField: '20100425-095058'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30079',
internalId:  '',
customField: '20081025-231319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32527',
internalId:  '',
customField: '20100425-100953'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32001',
internalId:  '',
customField: '20100425-101402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32501',
internalId:  '',
customField: '20100425-100414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30027',
internalId:  '',
customField: '20090116-210314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32553',
internalId:  '',
customField: '20100425-101101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32579',
internalId:  '',
customField: '20100425-101253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29827',
internalId:  '',
customField: '20110515-203046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30105',
internalId:  '',
customField: '20110515-202950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30901',
internalId:  '',
customField: '20100423-235623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32801',
internalId:  '',
customField: '20081026-175441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34001',
internalId:  '',
customField: '20081215-154934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33101',
internalId:  '',
customField: '20090116-210344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33127',
internalId:  '',
customField: '20100425-095357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33301',
internalId:  '',
customField: '20100423-235643'
};
webappMappings['7008']=webappMappings['7008-978']={
webappId:    '7008',
documentId:  '30105',
internalId:  '978',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38701',
internalId:  '',
customField: '20100723-174021'
};
webappMappings['4001']=webappMappings['4001-7827820']={
webappId:    '4001',
documentId:  '51401',
internalId:  '7827820',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51401',
internalId:  '',
customField: '20100425-092638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66301',
internalId:  '',
customField: '20100723-173833'
};
var canonHostname = 'coucm4all01.netbenefit.co.uk';
var accountId     = 'ANBT20IN2IDV';
var companyName   = 'Police+Assessment+Centre+Training+%28PACT%29';
var htmlTitle	  = 'PACT';
var metaKeywords  = '';
var metaContents  = '';
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();
};

