	//----------------------------------------------------------
	// 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 + '');
	}
