	//----------------------------------------------------------
	// Purpose	: Domain Name Redirect for microsites and other html pages
	//----------------------------------------------------------
	//
	// var sHost = location.hostname
	// var sReferrer = document.referrer
	//
	// if ((sHost !="www.natwest.com") && (sHost !="dev.natwestcom.rbsgrp.net")) {
	//	var sQuery = location.href.split("?")
	//	var sTemplate = location.href.split("/")
	//	location.href = sTemplate[0]+'//www.natwest.com'+location.pathname+"?"+sQuery[1];
	//}
	//

	//----------------------------------------------------------
	// Name		: popwin
	// Purpose	: Create Popup Window
	//----------------------------------------------------------
	//
	function popwin(url, name, width, height, location, menubar, status, toolbar)
	{
		if (name == null)
		{
			name = "stdWin";
		}
		if (width == null)
		{
			width = 770;
		}
		if (height == null)
		{
			height = 500;
		}
		if (location == null)
		{
			location = "no"
		}
		if (menubar == null)
		{
			menubar = "yes"
		}
		if (status == null)
		{
			status = "yes"
		}
		if (toolbar == null)
		{
			toolbar = "yes"
		}

		popup = window.open(url, name, 'width=' + width + ',height=' + height + ',location=' + location + ',menubar=' + menubar + ',status=' + status + ',toolbar=' + toolbar +',scrollbars=yes,resizable=yes,screenx=0,screeny=0,left=0,top=0');
		if (window.focus) setTimeout("popup.focus()",100);
	} 

	//----------------------------------------------------------
	// Name		: popBankline
	// Purpose	: Create Popup Window
	//----------------------------------------------------------
	//
	function popBankline(url, name, width, height, location, menubar, status, toolbar)
	{
	
	
		cx = Math.min(1024, screen.availwidth) -12
		cy = Math.min(658, screen.availheight)-65
		x  = Math.max(0, (screen.availwidth  - 1024) / 2)
		y  = Math.max(0, (screen.availheight - 738) / 2)
		
		if (name == null)
		{
			name = "stdWin";
		}
		if (width == null)
		{
			width = cx;
		}
		if (height == null)
		{
			height = cy;
		}
		if (location == null)
		{
			location = "no"
		}
		if (menubar == null)
		{
			menubar = "yes"
		}
		if (status == null)
		{
			status = "yes"
		}
		if (toolbar == null)
		{
			toolbar = "no"
		}

		popup = window.open(url, name, 'width=' + width + ',height=' + height + ',location=' + location + ',menubar=' + menubar + ',status=' + status + ',toolbar=' + toolbar +',scrollbars=yes,resizable=yes,screenx=x,screeny=y,left=x,top=y');
		if (window.focus) setTimeout("popup.focus()",100);
	} 
	
	
	
	//----------------------------------------------------------
	// Name		: openKiosk
	// Purpose	: Used for Bankline Registration
	//----------------------------------------------------------
	//
	
	function openkiosk(url, name)
	{
	cx = Math.min(1024, screen.availwidth) -12
	cy = Math.min(658, screen.availheight)-65
	x  = Math.max(0, (screen.availwidth  - 1024) / 2)
	y  = Math.max(0, (screen.availheight - 738) / 2)
	windowName = window.open(url,name,"toolbar=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=" + cx + ",height=" + cy + ",top=" + y + ",left=" + x)
	windowName.focus();
	}


	//----------------------------------------------------------
	// Name		: loadPopup
	// Purpose	: Used for Bankline Dem
	//----------------------------------------------------------
	//

	function loadPopup(url,width,height) {
	
		w = window.screen.availWidth;
		h = window.screen.availHeight;

		var leftPos = (w-width)/2, topPos = (h-height)/2;

		if (w < width) {
			width = w;
			leftPos = 0;
		}

		if (h < height) {
			height = h;
			topPos = 0;
		}
	
		popup = window.open(url, 'nwBanklineDemo', 'width=' + width + ',height=' + height + ',location=no,menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes,screenx=' + leftPos + ',screeny=' + topPos + ',left=' + leftPos + ',top=' + topPos + '');
	}

	//----------------------------------------------------------
	// Purpose	: Proficient System, Inc. Release 4.0G START
	//----------------------------------------------------------
	//

	var strLocation = location.href;
	
	if ( ((strLocation.indexOf("https://www.nwolb.com/default.aspx", 0) + 1) > 0) || ((strLocation.indexOf("/tools/personal/world_currency_guide/default.asp", 0) + 1) > 0))
	{
		//Don't do anything
	
	} else {

		var SM="sm-rbs.proficient.com";
		SM_BASE=(SM==""?"":location.protocol+'//'+SM);
		_pI=new Array(),_pUa=navigator.userAgent.toLowerCase();
		function inA(s) {return _pUa.indexOf(s)!=-1;}

		function _pIsSup(){return ((inA('msie')||inA('gecko'))&&(!inA('msie')||(parseInt(parseFloat(_pUa.substring(_pUa.indexOf('msie ')+5)))>=5)&&!inA('mac')));}

		function _pLog(h,d) {
			var i=new Image(),u=SM_BASE+"/graphics/init/logSignal.gif?"+h;
			for (var p in d) u+="&"+p+"="+escape(d[p]);
			i.src=u;
			_pI[_pI.length]=i;}

		function _pEr(e,p,l){var m={e:e,p:p,l:l,v:(typeof vid!='undefined'?vid:""),u:_pUa};_pLog("J_ERR",m);}
		function _pLd(){
			var s=document.createElement('script');
			s.type='text/javascript';
			s.src=SM_BASE+'/cf/scripts/postLoadIwatch.js?c='+Math.round(new Date().getTime()/3600000);
			s.defer=true;
			((document.getElementsByTagName('head'))[0]).appendChild(s);}

		if (_pIsSup()) {
			if (window.attachEvent) {
				window.attachEvent('onload',_pLd);
				window.attachEvent('onerror',_pEr);
			} else {
				window.addEventListener('load', _pLd, false);
				window.addEventListener('error',_pEr, false);}
			} else _pLog('UNSUP',{u:_pUa});

		var vOn = "psys_rm_control_on", vOff = "psys_rm_control_off", eOn = null, eOff = null, eAvailOn = false, pss_v = "visible", pss_h = "hidden";
	
		function vCheckForElement() {
			if (document.getElementById(vOn)){eOn = document.getElementById(vOn); eAvailOn = true;}
				if (document.getElementById(vOff)){eOff = document.getElementById(vOff);}}

			function vPollForHelp() {
				if (typeof isHelpAvailable!= "undefined" && isHelpAvailable()) {
				if(!eAvailOn){vCheckForElement();}
				if (eOn){eOn.style.visibility=pss_v; if(typeof assistDisplayed!= "undefined"){assistDisplayed();}}
				if (eOff){eOff.style.visibility=pss_h;}
				}else {
					if (eOn){eOn.style.visibility=pss_h;}
					if (eOff){eOff.style.visibility=pss_v;}}
					setTimeout("vPollForHelp();", 500);}
	}