	//----------------------------------------------------------
	// Purpose	: Domain Name Redirect
	//----------------------------------------------------------
	//
	var sHost = location.hostname
	var sReferrer = document.referrer

	if ((sHost !="www.rbs.co.uk") && (sHost !="dev.rbs.co.uk") && (sHost !="test.rbs.co.uk") && (sHost !="stage.rbs.co.uk")) {
		var sURL = (location.pathname.charAt(0) == '../') ? location.pathname.substring(1) : location.pathname;	
		//location.href = 'http://www.rbs.co.uk/'+sURL
	}
	
	if (sHost == "www.rbsgroup.com") {
		location.href = 'http://www.rbs.co.uk/Group_Information/default.asp'
	}

	if (sHost == "www.rbskredit.de") {
		location.href = 'http://www.rbs.co.uk/rbskredit/default.htm'
	}

	if (sHost == "rbskredit.de") {
		location.href = 'http://www.rbs.co.uk/rbskredit/default.htm'
	}

	if (sHost == "www.rbs-kredit.de") {
		location.href = 'http://www.rbs.co.uk/rbskredit/default.htm'
	}

	if (sHost == "rbs-kredit.de") {
		location.href = 'http://www.rbs.co.uk/rbskredit/default.htm'
	}

	if (sHost == "www.rbos.fr") {
		location.href = 'http://www.rbs.co.uk/CBFM/Worldwide/Europe/France/default.asp'
	}

	if (sHost == "www.rbos.de") {
		location.href = 'http://www.rbs.co.uk/CBFM/Worldwide/Europe/Germany/default.asp'
	}

	if (sHost == "www.rbos.it") {
		location.href='http://www.rbs.co.uk/CBFM/Worldwide/Europe/Italy/rbos_it/default.asp'
	}

	if (sHost == "www.rbos.es") {
		location.href = 'http://www.rbs.co.uk/CBFM/Worldwide/Europe/Iberia/default.asp'
	}

	if (sHost == "www.rbsworldwide.com") {
		location.href = 'http://www.rbs.co.uk/CBFM/Worldwide/default.asp'
	}

	if (sHost == "www.rbs.de") {
		location.href = 'http://www.rbs.co.uk/rbs_de/default.htm'
	}

	if (sHost == "www.rbsbank.nl") {
		location.href = 'http://www.rbs.co.uk/rbsbank_nl/default.htm'
	}

	if (sHost == "www.successmaster.co.uk") {
		location.href = 'http://www.rbs.co.uk/CBFM/Successmaster/default.asp'
	}

	if (sHost == "www.northseaconference.com") {
		location.href = 'http://www.rbs.co.uk/CBFM/Oil_&_Gas_Conference/default.asp'
	}

	if (sHost == "www.rbsoilandgas.com") {
		location.href = 'http://www.rbs.co.uk/CBFM/Oil_&_Gas_Conference/default.asp'
	}


	if (sHost == "www.rbstradeflow.com") {
		location.href = 'http://www.rbs.co.uk/CBFM/International_Services/default.htm'
	}

	if (sHost == "www.rbstradeflowtest.com") {
		location.href = 'http://www.rbs.co.uk/CBFM/International_Services/default.htm'
	}

	if (sHost == "www.superground.co.uk") {
		location.href = 'http://www.rbs.co.uk/Group_Information/Corporate_Responsibility/Community_Investment/Helping_People/Into_Education/Supergrounds/default.htm'
	}

	if (sHost == "www.supergrounds.co.uk") {
		location.href = 'http://www.rbs.co.uk/Group_Information/Corporate_Responsibility/Community_Investment/Helping_People/Into_Education/Supergrounds/default.htm'
	}

	if (sHost == "www.supergrounds.com") {
		location.href = 'http://www.rbs.co.uk/Group_Information/Corporate_Responsibility/Community_Investment/Helping_People/Into_Education/Supergrounds/default.htm'
	}

	if (sHost == "www.natwestsupergrounds.com") {
		location.href = 'http://www.rbs.co.uk/Group_Information/Corporate_Responsibility/Community_Investment/Helping_People/Into_Education/Supergrounds/default.htm'
	}

	if (sHost == "www.natwestsupergrounds.co.uk") {
		location.href = 'http://www.rbs.co.uk/Group_Information/Corporate_Responsibility/Community_Investment/Helping_People/Into_Education/Supergrounds/default.htm'
	}

	if (sHost == "www.royalbanksupergrounds.co.uk") {
		location.href = 'http://www.rbs.co.uk/Group_Information/Corporate_Responsibility/Community_Investment/Helping_People/Into_Education/Supergrounds/default.htm'
	}

	if (sHost == "www.royalbanksupergrounds.com") {
		location.href = 'http://www.rbs.co.uk/Group_Information/Corporate_Responsibility/Community_Investment/Helping_People/Into_Education/Supergrounds/default.htm'
	}

	//----------------------------------------------------------
	// Name		: breadcrumb
	// Purpose	: Create Breadcrumb Trail
	//----------------------------------------------------------
	//
	function breadcrumb()
	{
		
		var sURL = escape(location.pathname.indexOf('?') != -1) ? location.pathname.substring(0, location.pathname.indexOf('?')) : location.pathname;
		sURL = (location.pathname.charAt(0) == '/') ? location.pathname.substring(1) : location.pathname;
		var aURL = sURL.split('/');

		if(aURL)
		{
			//var sOutput = '<a href="/default.htm" target="_top">Home</a>\n';
			//var sPath = '/';
		
			var sOutput = '<a href="/asset_finance/RBS_Asset_Finance/default.htm" target="_top">Home</a> ';
			var sPath = '/asset_finance/RBS_Asset_Finance/';

			for(var i = 2; i < aURL.length - 1; i++)
			{
				sPath += aURL[i] + '/';
				sOutput += '> <a href="' + sPath + 'default.htm"';
				var vPath = '';
				var vURL = '';
				vURL = aURL[i].split('_');
				if(vURL)
				{
					for(var n= 0; n < vURL.length; n++)
					{
						vPath += vURL[n].substr(0,1).toUpperCase() + vURL[n].substr(1) + ' ';
						//vPath += vURL[n] + ' ';
					}
				}
	
				if (i == aURL.length - 2)
				{
					//The highlighted item
					sOutput += ' target="_top"><span class=breadcrumb-highlight>' + vPath + '</span></a>';
				} else {
					sOutput += ' target="_top">' + vPath + '</a>';
				}
			}
			sOutput += '</ul>';
			document.write(unescape(sOutput));
		}
	}

	//----------------------------------------------------------
	// Name		: breadcrumbPromotions
	// Purpose	: Create Breadcrumb Trail
	//----------------------------------------------------------
	//
	function breadcrumbPromotions()
	{
		var sDelimiter = '>';
	
		var sURL = escape(location.pathname.indexOf('?') != -1) ? location.pathname.substring(0, location.pathname.indexOf('?')) : location.pathname;
		sURL = (location.pathname.charAt(0) == '../') ? location.pathname.substring(1) : location.pathname;
		var aURL = sURL.split('../');
	
		if(aURL)
		{
			var sOutput = '<a href="../" target="_top">Home</a> ';
			var sPath = '../';
		
			for(var i = 0; i < aURL.length - 3; i++)
			{
				sPath += aURL[i] + '../';						
				sOutput += ' ' + sDelimiter + ' ';
				sOutput += '<a href="' + sPath + '"';
				var vPath = '';
				var vURL = '';
				vURL = aURL[i].split('_');
				if(vURL)
				{
					for(var n= 0; n < vURL.length; n++)
					{
						vPath += vURL[n] + ' ';
					}
				}

				if (i == aURL.length - 2)
				{
					sOutput += ' target="_top"><span class=breadcrumb-highlight>' + vPath + '</span></a>';
				} else {
					sOutput += ' target="_top">' + vPath + '</a>';
				}
			}								
			document.write(unescape(sOutput));
		}
	}

	

	//----------------------------------------------------------
	// Name		: breadcrumbGeneric
	// Purpose	: Create Breadcrumb Trail
	//----------------------------------------------------------
	//
	function breadcrumbGeneric(path, startlevel)
	{
		var sDelimiter = '>';
	
		var sURL = escape(location.pathname.indexOf('?') != -1) ? location.pathname.substring(0, location.pathname.indexOf('?')) : location.pathname;
		sURL = (location.pathname.charAt(0) == '../') ? location.pathname.substring(1) : location.pathname;
		var aURL = sURL.split('../');
	
		if(aURL)
		{
			var sOutput = '<a href="'+path+'" target="_top">Home</a> ';
			var sPath = path;
		
			for(var i = startlevel; i < aURL.length - 1; i++)
			{
				sPath += aURL[i] + '../';						
				sOutput += ' ' + sDelimiter + ' ';
				sOutput += '<a href="' + sPath + '"';
				var vPath = '';
				var vURL = '';
				vURL = aURL[i].split('_');
				if(vURL)
				{
					for(var n= 0; n < vURL.length; n++)
					{
						vPath += vURL[n] + ' ';
					}
				}

				if (i == aURL.length - 2)
				{
					sOutput += ' target="_top"><span class=breadcrumb-highlight>' + vPath + '</span></a>';
				} else {
					sOutput += ' target="_top">' + vPath + '</a>';
				}
			}								
			document.write(unescape(sOutput));
		}
	}

	//----------------------------------------------------------
	// 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 = 550;
		}
		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		: createLink
	// Purpose	: Create Popup Window
	//----------------------------------------------------------
	//
	function createLink(url)
	{
		if (url == null)	
		{
			location.href="#";
		} else {
			location.href=url;
		}
	}

	//----------------------------------------------------------
	// Name		: setCookie
	// Purpose	: Set Client Cookie
	//----------------------------------------------------------
	//
	function setCookie(name, value, expires, path, domain, secure)
	{
		var curCookie = name + "=" + escape(value) +
		((expires) ? "; expires=" + expires.toGMTString() : "") +
		((path) ? "; path=" + path : "") +
		((domain) ? "; domain=" + domain : "") +
		((secure) ? "; secure" : "");
		document.cookie = curCookie;
	}

	//----------------------------------------------------------
	// Name		: getCookie
	// Purpose	: Get Client Cookie
	//----------------------------------------------------------
	//
	function getCookie(name)
	{
		var dc = document.cookie;
		var prefix = name + "=";
		var begin = dc.indexOf("; " + prefix);
		if (begin == -1) {
			begin = dc.indexOf(prefix);
			if (begin != 0) return null;
			} else {
				begin += 2;
				var end = document.cookie.indexOf(";", begin);
				if (end == -1)
				end = dc.length;
			}
		return unescape(dc.substring(begin + prefix.length, end));
	}

	//----------------------------------------------------------
	// Name		: promotion
	// Purpose	: Create Promotion Popup Window + Write Cookie
	//----------------------------------------------------------
	//
	function promotion(url, cookiename, name, width, height)
	{
		if (!getCookie(cookiename))
		{
			setCookie(cookiename, "True", "", "/")
			popwin(url, name, width, height)
		}
	}

	//----------------------------------------------------------
	// Name		: printerfriendly
	// Purpose	: Create Page Printer Friendly Version
	//----------------------------------------------------------
	//
	function printerfriendly(url, type)
	{
		if (type == null)
		{
			type = ''
		}

		if ((url == null) || (url == 0))
		{
			var url = (location.pathname)
			var title = (document.title)
			url = url.substring(0, url.length-4);
			url = "/utilities/printerfriendly.asp?type="+type+"&url=" + url + "_content.htm&title=" + escape(title);
		}
		popwin(url, 'printerfriendly', 550, 400)

	      	//popup = window.open(url,'printerfriendly','status=yes,width=550,height=400,scrollbars=yes,resizable=yes,menubar=yes,screenx=0,screeny=0,left=0,top=0');
		if (window.focus) setTimeout("popup.focus()",100);
	}

	//----------------------------------------------------------
	// Name		: disablelinks
	// Purpose	: Disable Links for Page Printer Friendly Version
	//----------------------------------------------------------
	//

	function disablelinks()
	{
		for (var i = 4; i < document.links.length; i++) 
		{
		document.links[i].href= "#"
		}
	}

	//----------------------------------------------------------
	// Name		: stylesheet select
	// Purpose	: Select appropriate stylesheet if not PC IE
	//----------------------------------------------------------
	//
	var ptype=navigator.userAgent.toLowerCase()+" ";

	win=ptype.indexOf("win")!=-1
	mac=ptype.indexOf("mac")!=-1

	opera=ptype.indexOf("opera")!=-1

	var netscape=navigator.appName.toLowerCase()+" ";
	netscape=netscape.indexOf("netscape")!=-1

	if ((netscape) && (mac))
	{
		if (parseInt(navigator.appVersion) < 5)
		{
			document.write("<link rel='stylesheet' href='../includes/css/styleNetscapeMAC4.css' type='text/css'>");
		} else {
			document.write("<link rel='stylesheet' href='../includes/css/styleNetscapeMAC6.css' type='text/css'>");
		}
	}

	if ((netscape) && (win))
	{
		if (parseInt(navigator.appVersion) < 5)
		{	
			document.write("<link rel='stylesheet' href='../includes/css/styleNetscapeWIN4.css' type='text/css'>");
		} else { 
			document.write("<link rel='stylesheet' href='../includes/css/styleNetscapeWIN6.css' type='text/css'>");
		}
	}

	if (opera)
	{
		document.write("<link rel='stylesheet' href='../includes/css/styleOpera.css' type='text/css'>");
	}

	//----------------------------------------------------------
	// Name		: checkNetscape4
	// Purpose	: Check for Netscape version 4.x or below
	//----------------------------------------------------------
	//

	function checkNetscape4()
	{
		if ((netscape) && (parseInt(navigator.appVersion) < 5))
		{
			return true;
		}
		return false;
	}

	//----------------------------------------------------------
	// Purpose	: Toptext Plugin Fix
	//----------------------------------------------------------
	//

	seconds = 5 * 1000

	data = unescape(document.cookie)
	trigger = data.split("="); trigger = trigger[1]
	if (data.length < 1 && navigator.appName == "Microsoft Internet Explorer") {
		date = new Date()
		currentdate = date.getTime() + 3000 + seconds
		date.setTime(currentdate)
		document.cookie = "visit=yes; expires=" + date.toGMTString()
		data = unescape(document.cookie)
		trigger = data.split("="); trigger = trigger[1]
	} else if (trigger == "yes" && navigator.appName == "Microsoft Internet Explorer") {
		trigger = "page is reloaded"
	}

	if (trigger == "yes" && navigator.appName == "Microsoft Internet Explorer") {
		setTimeout("ReloadPage()",seconds)
	}
	
	function ReloadPage() {
		location.reload()
	}

	//----------------------------------------------------------
	// Purpose	: Drop down web list popup
	//----------------------------------------------------------
	//

	function popDropDown() {
	if (window.document.form1.txtSelect.value != "") {

		popwin(window.document.form1.txtSelect.value, 'selectWin', 750, 550, 'yes')

		//popwin(window.document.form1.txtSelect.value, 'selectWin', 800, 600, 'yes')					'yes', 'yes', 'yes');
		}
	}	

	//----------------------------------------------------------
	// Purpose	: Management Information
	//----------------------------------------------------------
	//

	//if ((sHost !="dev.rbs.co.uk") && (sHost !="test.rbs.co.uk") && (sHost !="stage.rbs.co.uk")) {
		var _rsCI='royalbankofscotland';
		var _rsCG='0';
		var _rsDT=1;
		var _rsSI=escape(window.location);
		var _rsLP=location.protocol.indexOf('https')>-1?'https:':'http:';
		var _rsRP=escape(document.referrer);
		var _rsND=_rsLP+'..//secure-uk.rbs.com/';

		if (parseInt(navigator.appVersion)>=4) {
		var _rsRD=(new Date()).getTime();
		var _rsSE=0;
		var _rsSV='';
		var _rsSM=0;
		_rsCL='<scr'+'ipt language="JavaScript" type="text/javascript" src="'+_rsND+'v5.js"><\/scr'+'ipt>';
		} else {
		_rsCL='<img alt="This image is used for the collection of Management Information" src="'+_rsND+'cgi-bin/m?ci='+_rsCI+'&cg='+_rsCG+'&si='+_rsSI+'&rp='+_rsRP+'">';
		}
		//document.write(_rsCL);
	//}