/* [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','1901',jdecode('AML+Consultants'),jdecode(''), jdecode('%2F1901.html'), 'true',[],'',''],
	['PAGE','18912',jdecode('Money+Laundering'),jdecode(''), jdecode('%2F18912.html'), 'true',[],'',''],
	['PAGE','48412',jdecode('Terrorism+Financing'),jdecode(''), jdecode('%2F48412.html'), 'true',[],'',''],
	['PAGE','79812',jdecode('Codes+from+Regulators'),jdecode(''), jdecode('%2F79812%2Findex.html'), 'true',[ 
		['PAGE','80012',jdecode('Identity+Verification'),jdecode(''), jdecode('%2F79812%2F80012.html'), 'true',[],'','']
	],'',''],
	['PAGE','79712',jdecode('Guidance+from+Regulators'),jdecode(''), jdecode('%2F79712.html'), 'true',[],'',''],
	['PAGE','18954',jdecode('Economic+Sanctions'),jdecode(''), jdecode('%2F18954.html'), 'true',[],'',''],
	['PAGE','2141',jdecode('Risk+Based+Approach'),jdecode(''), jdecode('%2F2141%2Findex.html'), 'true',[ 
		['PAGE','19217',jdecode('Measuring+Risk'),jdecode(''), jdecode('%2F2141%2F19217.html'), 'true',[],'',''],
		['PAGE','19238',jdecode('Risk+Matrix'),jdecode(''), jdecode('%2F2141%2F19238.html'), 'true',[],'',''],
		['PAGE','19259',jdecode('Risk+Cycle'),jdecode(''), jdecode('%2F2141%2F19259.html'), 'true',[],'','']
	],'',''],
	['PAGE','1973',jdecode('AML+CFT+Risk+Assessment'),jdecode(''), jdecode('%2F1973%2Findex.html'), 'true',[ 
		['PAGE','4001',jdecode('Business+Risk'),jdecode(''), jdecode('%2F1973%2F4001.html'), 'true',[],'',''],
		['PAGE','1994',jdecode('Product+Risk'),jdecode(''), jdecode('%2F1973%2F1994.html'), 'true',[],'',''],
		['PAGE','2015',jdecode('Customer+Risk'),jdecode(''), jdecode('%2F1973%2F2015.html'), 'true',[],'',''],
		['PAGE','23212',jdecode('Politically+Exposed+Person'),jdecode(''), jdecode('%2F1973%2F23212.html'), 'true',[],'',''],
		['PAGE','23233',jdecode('Corporate+Customer'),jdecode(''), jdecode('%2F1973%2F23233.html'), 'true',[],'',''],
		['PAGE','2036',jdecode('Geography+Risk'),jdecode(''), jdecode('%2F1973%2F2036.html'), 'true',[],'',''],
		['PAGE','2057',jdecode('Delivery+Risk'),jdecode(''), jdecode('%2F1973%2F2057.html'), 'true',[],'','']
	],'',''],
	['PAGE','2078',jdecode('AML+CFT+Programme'),jdecode(''), jdecode('%2F2078%2Findex.html'), 'true',[ 
		['PAGE','2906',jdecode('Ongoing+Due+Diligence'),jdecode(''), jdecode('%2F2078%2F2906.html'), 'true',[],'',''],
		['PAGE','2864',jdecode('Reporting+Suspicious+Transactions'),jdecode(''), jdecode('%2F2078%2F2864.html'), 'true',[],'',''],
		['PAGE','2801',jdecode('Staff+Vetting'),jdecode(''), jdecode('%2F2078%2F2801.html'), 'true',[],'',''],
		['PAGE','2822',jdecode('Training'),jdecode(''), jdecode('%2F2078%2F2822.html'), 'true',[],'',''],
		['PAGE','2885',jdecode('Record+Keeping'),jdecode(''), jdecode('%2F2078%2F2885.html'), 'true',[],'',''],
		['PAGE','2948',jdecode('Third+Party+Agents'),jdecode(''), jdecode('%2F2078%2F2948.html'), 'true',[],'',''],
		['PAGE','2969',jdecode('Policies+%26+Procedures'),jdecode(''), jdecode('%2F2078%2F2969.html'), 'true',[],'','']
	],'',''],
	['PAGE','2162',jdecode('Designated+Business+Groups'),jdecode(''), jdecode('%2F2162.html'), 'true',[],'',''],
	['PAGE','87512',jdecode('Typologies+-+Red+Flags'),jdecode(''), jdecode('%2F87512.html'), 'true',[],'',''],
	['PAGE','1952',jdecode('About+AML+Consultants'),jdecode(''), jdecode('%2F1952.html'), 'true',[],'',''],
	['PAGE','35312',jdecode('Contact'),jdecode(''), jdecode('%2F35312.html'), 'true',[],'','']];
var siteelementCount=31;
theSitetree.topTemplateName='Office';
theSitetree.paletteFamily='727D9C';
theSitetree.keyvisualId='11163';
theSitetree.keyvisualName='kv_11163.jpg';
theSitetree.fontsetId='32062';
theSitetree.graphicsetId='13879';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'endurance',
  product: 'WSCSYSSSSLY0XRN4'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Office',
				paletteFamily: 	'727D9C',
				keyvisualId: 	'11163',
				keyvisualName: 	'kv_11163.jpg',
				fontsetId: 		'32062',
				graphicsetId: 	'13879',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1901',
internalId:  '',
customField: '20120108-034337'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1952',
internalId:  '',
customField: '20110326-215728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1973',
internalId:  '',
customField: '20120108-034502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1994',
internalId:  '',
customField: '20110721-223324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2969',
internalId:  '',
customField: '20110326-205826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2078',
internalId:  '',
customField: '20111206-004850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18912',
internalId:  '',
customField: '20111206-004500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2015',
internalId:  '',
customField: '20111101-203520'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2036',
internalId:  '',
customField: '20110721-223607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2057',
internalId:  '',
customField: '20110326-201048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18954',
internalId:  '',
customField: '20111206-004706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2801',
internalId:  '',
customField: '20110326-203116'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2822',
internalId:  '',
customField: '20110326-203351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2141',
internalId:  '',
customField: '20111206-004728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79812',
internalId:  '',
customField: '20111206-004603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4001',
internalId:  '',
customField: '20111122-184942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2864',
internalId:  '',
customField: '20100413-235726'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2885',
internalId:  '',
customField: '20110326-204112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2948',
internalId:  '',
customField: '20110326-205346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2162',
internalId:  '',
customField: '20111206-004913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79712',
internalId:  '',
customField: '20111206-004623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2906',
internalId:  '',
customField: '20110721-224537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48412',
internalId:  '',
customField: '20111206-004531'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19217',
internalId:  '',
customField: '20100121-032511'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19238',
internalId:  '',
customField: '20110326-193524'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19259',
internalId:  '',
customField: '20111102-170523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87512',
internalId:  '',
customField: '20111206-004952'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35312',
internalId:  '',
customField: '20111206-010559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23212',
internalId:  '',
customField: '20110326-200417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23233',
internalId:  '',
customField: '20110326-200628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80012',
internalId:  '',
customField: '20111102-165607'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0INVYU2';
var companyName   = 'AML+CFT+RISK+ASSESSMENTS+%28NZ%29';
var htmlTitle	  = 'Anti-Money+Laundering+New+Zealand+';
var metaKeywords  = 'anti+money+laundering%2C+anti+money+laundering+nz%2C+anti+money+laundering+training%2C+terrorism+new+zealand%2C+terrorism%2C+terrorism+financing+new+zealand%2C+terrorism+nz%2C+anti+money+laundering+legislation%2C+anti+money+laundering+legislation%2C+anti+money+laundering+policy%2C+aml+cft%2C+aml%2C+aml+risk+assessments%2C+aml+cft+risk+assessments%2C+aml+compliance+programmes%2C+aml+cft+compliance+programmes%2C+aml+consultants%2C+aml+consultant%2C+aml+new+zealand%2C+aml+cft+act%2C+aml+legislation%2C+anti-money+laundering%2C+kerry+grass%2C+money+laundering+risks%2C+money+laundering+compliance+programmes%2C+money+laundering+risk+assessments%2C+money+laundering+nz%2C+money+laundering+new+zealand%2C+anti+money+laundering+new+zealand';
var metaContents  = 'Anti-money+laundering+consultants+for+developing+or+reviewing+risk+assessments+and+compliance+programmes.++We+also+provide+tailored+training+designed+to+your+specific+risks.';
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();
};

