//document.write("<LINK title=4 href='/personal/css/style3.css' type=text/css rel='alternate stylesheet'>");
document.write("<script language='JavaScript' src='/personals/js/https.js'></scr" + "ipt>");
document.write("<script language='JavaScript' src='/personals/js/source.js'></scr" + "ipt>");
document.write("<link rel='shortcut icon' href='/favicon.ico' type='image/x-icon'>");

	document.write("<div id='container'>");
	
<!--
// pre-load nav images
var nv2 = new Image(); nv2.src = path + "/personal/img/nav/nav_2_over.gif"
var nv3 = new Image(); nv3.src = path + "/personal/img/nav/nav_3_over.gif"
var nv4 = new Image(); nv4.src = path + "/personal/img/nav/nav_4_over.gif"
var nv5 = new Image(); nv5.src = path + "/personal/img/nav/nav_5_over.gif"
var nv6 = new Image(); nv6.src = path + "/personal/img/nav/nav_6_over.gif"

// top navigation rollovers
function navRoll(navPos,status,source) {
if (navPos == topNavHighlight) { return }
	switch (status) {
		case 1: // mouse over
			if (source == 1)
				if (tab == 5)
				{
					document.images["nav_" + navPos].src = path + "/personal/img/goldnav/nav_" + navPos + "_over.gif";
				}
				else
				{
					document.images["nav_" + navPos].src = path + "/personal/img/nav/nav_" + navPos + "_over.gif";
				}
			else
				if (tab == 5)
				{
					document.images["nav_" + navPos].src = path + "/personal/img/goldnav/nav_" + navPos + "_over.gif";
				}
				else
				{
					document.images["nav_" + navPos].src = path + "/personal/img/nav/nav_" + navPos + "_over.gif";
				}
		break;
		case 0: // mouse out
			if (source == 1)
				if (tab == 5)
				{
					document.images["nav_" + navPos].src = path + "/personal/img/goldnav/nav_" + navPos + "_off.gif";

				}
				else
				{
					document.images["nav_" + navPos].src = path + "/personal/img/nav/nav_" + navPos + "_off.gif";
				}
			else
				if (tab == 5)
				{
					document.images["nav_" + navPos].src = path + "/personal/img/nav/nav_" + navPos + "_off.gif";
				}
				else
				{
					document.images["nav_" + navPos].src = path + "/personal/img/nav/nav_" + navPos + "_off.gif";
				}
		break;
	}
}

function navRollHome(navPos,status,source) {
if (navPos == topNavHighlight) { return }
	switch (status) {
		case 1: // mouse over
			if (source == 1)
				document.images["nav_" + navPos].src = path + "/personal/img/nav/nav_" + navPos + "_over.gif";
			else
				document.images["nav_" + navPos].src = path + "/personal/img/nav/nav_" + navPos + "_over.gif";
		break;
		case 0: // mouse out
			if (source == 1)
				document.images["nav_" + navPos].src = path + "/personal/img/nav/nav_" + navPos + "_off.gif";
			else
				document.images["nav_" + navPos].src = path + "/personal/img/nav/nav_" + navPos + "_off.gif";
		break;
	}
}

function topNavHighlightSelect() {
	if (topNavHighlight > 0) {
		document.images["nav_" + topNavHighlight].src = path + "/personal/img/nav/nav_" + topNavHighlight + "_active.gif";
	}
}

function pageLoaded() {
	// page loaded functions
	topNavHighlightSelect()
}

function swapImg(imageName,fileName) {
	if (ie || n || ns7) {
		document.images[imageName].src = fileName
	}
}

function openWindow(URL, clickPos){
	if (ie) {
		if (clickPos == "link") return
	}
	if (!ie && !n) {
		if (clickPos == "link") return
	}
	var windowhref = URL;
	var now = new Date();
	var windowname = "DA" + now.getTime();
	var leftpos=((window.screen.width/2)-400);
	var toppos=((window.screen.height/2)-275);
	window.open(windowhref,windowname,"toolbar=no,directories=no,location=yes,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left="+leftpos+",top="+toppos+",height=550,width=800");
}

function openWin(URL,winName) {
	var winFeatures = "toolbar=no,directories=no,location=yes,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,height=530,width=780";
	var winOpen = window.open(URL,winName,winFeatures);
	if (winOpen.focus) { winOpen.focus() }
}

// internet banking window
function openInternetBanking(clickPos){
	if (ie) {
		if (clickPos == "link") return
	}
	if (!ie && !n) {
		if (clickPos == "link") return
	}
//	Standard Citibank Online URL non JFP
//	var standardURL = "http://cuk.cd.citibank.co.uk/HomeBankingSec/StartSession.asp?LANGNAME=English_(United_Kingdom)&LANG=1&DEVICEMODE=HTMLGPH&SRCT=10&MODE=2&BUSCODE=gb&SERVICECODE=SIGNON"
//	Standard JFP Citibank Online URL
var xyz=location.href;
var url;

var abc= new Array();
var wq=new Array();
 abc= xyz.split("//");
  wq= abc[1].split("/");
 abc[0]= "https:"
 
 url=abc[0]+"//"+wq[0]
 

var standardURL ="/GBGCB/JPS/portal/Index.do"

var windowhref = ""
// determine which page to display - messages or directly to Citibank Online.
	// 3 has seen Fraud message 
	// 4 has seen Screen Keyboard message
	// 5 has seen Exclusive Mortgage message	
	switch (getCookie("ibmessagekey")) {






case "17" :
windowhref = "/personal/banking/oneclicksignin/ib_message.htm"
break;	

case "18" :
windowhref = "/personal/banking/oneclicksignin/ib_message.htm"
break;	

case "19" :
windowhref = "/personal/banking/oneclicksignin/ib_message.htm"
break;	

case "20" :
windowhref = url+standardURL
break;	





default :

windowhref = "/personal/banking/oneclicksignin/ib_message.htm"

break;

}


	var now = new Date();
	var windowname = "DA" + now.getTime();
	var winWidth = screen.width
	var winHeight = screen.height
	if (winWidth <= 800) {
		winWidth = 760; winHeight = 515
	} else {
		winWidth = 900; winHeight = 550
	}
	var leftpos=((window.screen.width/2)-(winWidth/2));
	var toppos=((window.screen.height/2)-(winHeight/2));
	//window.open(windowhref,windowname,"toolbar=no,directories=no,location=yes,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left="+leftpos+",top="+toppos+",height="+winHeight+",width="+winWidth);
	top.location=windowhref
	// make customer / prospect determination - set a cookie
	var today = new Date()
	var expires = new Date()
	expires.setTime(today.getTime() + (1000*60*60*24*60))
	//setCookie("customer","true",expires)
	//Added on 20-Jan-2005 For Random image in Home page
	createCookie("customer", "true", 60);
}
var sActualLayer='';
var sActualClicked='';



// internet iCard window
function openInternetiCard(clickPos){
	if (ie) {
		if (clickPos == "link") return
	}
	if (!ie && !n) {
		if (clickPos == "link") return
	}
//	Standard iCard URL 

var xyz=location.href;
var url;

var abc= new Array();
var wq=new Array();
 abc= xyz.split("//");
  wq= abc[1].split("/");
 abc[0]= "https:"
 
 url=abc[0]+"//"+wq[0]
 

var standardURL = "https://service.citicards.co.uk/ICardServlet?F=SEC_SIG"
	var windowhref = ""
// determine which page to display - messages or directly to iCard.

	switch (getCookie("iCardmessage")) {
		
		case "0" :
			windowhref = "/personal/banking/oneclicksignin/icard_message.htm"
			break;
			
		case "1" :
			windowhref = "/personal/banking/oneclicksignin/icard_message.htm"
			break;
			
		case "2" :
			windowhref = "/personal/banking/oneclicksignin/icard_message.htm"
			break;
			
		case "3" :
			windowhref = standardURL
		break;
		
		default :
			windowhref = "/personal/banking/oneclicksignin/icard_message.htm"
		break;
	}
	var now = new Date();
	var windowname = "DA" + now.getTime();
	var winWidth = screen.width
	var winHeight = screen.height
	if (winWidth <= 800) {
		winWidth = 760; winHeight = 515
	} else {
		winWidth = 900; winHeight = 550
	}
	var leftpos=((window.screen.width/2)-(winWidth/2));
	var toppos=((window.screen.height/2)-(winHeight/2));
	
	top.location=windowhref
	// make customer / prospect determination - set a cookie
	var today = new Date()
	var expires = new Date()
	expires.setTime(today.getTime() + (1000*60*60*24*60))
	//setCookie("customer","true",expires)
	//Added on 20-Jan-2005 For Random image in Home page
	createCookie("iCardcustomer", "true", 60);
}





function showhide_layer(id,status,clicked)  {
  	var flip;
    //alert('status:'+status+'\nclicked:'+clicked+'\nsActualClicked:'+sActualClicked);
    if (sActualLayer == '' || (status == 0 && sActualClicked == '') || (status == 1 && clicked == 1 && sActualClicked == '') || (status == 0 && clicked == 1 && sActualClicked != '')) {
    	if (status==0)  {
    		flip="hidden";
        if (document.layers) {flip="hide"}
        sActualLayer = "";
        if (clicked) sActualClicked = "";
    	}
    	else  {
    		flip="visible";
    		if (document.layers) {flip="show"}
        sActualLayer = id;
        if (clicked) sActualClicked = id;
    	}
      if (document.getElementById)  {
        if(document.getElementById(id)) {
          eval("document.getElementById(id).style.visibility = \"" + flip + "\"");
        }
      } 
    	else  {
        if (document.layers) {
    		  if(document.layers[id]) { 
            document.layers[id].visibility = flip;
          }
        } 
    		else  {
          if (document.all)  {
            if(document.all[id]) {
              eval("document.all." + id + ".style.visibility = \"" + flip + "\"");
            }
          }
        }
      }
    }
  }

function beginApplication() {
	
	var appWinRef = "/personal/banking/applynow/app_start.htm"
	var now = new Date();
	var winName = "app" + now.getTime();
	var winWidth = screen.width
	var winHeight = screen.height
	if (winWidth <= 800) {
		winWidth = 760; winHeight = 515
	} else {
		winWidth = 900; winHeight = 650
	}
	var strURL;
	if (getType() == 'cards')
		strURL = appWinRef 
	else
		strURL = appWinRef + strSource;
     
		var win = window.open(strURL,winName,"toolbar=no,directories=no,location=yes,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,height="+winHeight+",width="+winWidth);
	win.focus()
}

function getType(){
	var strType;
	var searchString = "type="
	if (parent.location.search.length > 0) {
		offset = parent.location.search.indexOf(searchString)
		if (offset != -1) {
			offset += searchString.length
			end = parent.location.search.indexOf("&", offset)
			if (end == -1) { end = parent.location.search.length }
			strType = parent.location.search.substring(offset, end)
		}else{strType = ''}
	}else{strType = ''}
	return strType;
}

function beginDirectApplication() {
	var xyz=location.href;
	var url;
	var abc= new Array();
	var wq=new Array();
 	abc= xyz.split("//");
  	wq= abc[1].split("/");
 	abc[0]= "https:"
 	url=abc[0]+"//"+wq[0]

	var appWinRef = url+"/GBGCB/wba/dbonline/Index.do?PRODCODE=101&CROSSSELL1=N&SOURCE="
	var now = new Date();
	var winName = "app" + now.getTime();
	var winWidth = screen.width
	var winHeight = screen.height
	if (winWidth <= 800) {
		winWidth = 760; winHeight = 515
	} else {
		winWidth = 900; winHeight = 650
	}
	var strURL;
	if (getType() == 'cards')
		strURL = appWinRef 

   	else if(strSource.indexOf("source")>0)
	{
       strURL = appWinRef + strSource.substr(8);
	}
    else
	 {
       var str= new Array();
		strSource = strSource.substring(strSource.indexOf("?"), strSource.length);
		str=strSource.split("?");
      strURL = appWinRef+"&"+str[1];
	}

	var win = window.open(strURL,winName,"toolbar=no,directories=no,location=yes,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,height="+winHeight+",width="+winWidth);
	win.focus()		
}

var _hbEC=0,_hbE=new Array;function _hbEvent(a,b){b=_hbE[_hbEC++]=new Object();b._N=a;b._C=0;return b;}
var hbx=_hbEvent("pv");hbx.vpc="HBX0200u";hbx.gn="vendorweb.citibank.com";

//BEGIN EDITABLE SECTION
//CONFIGURATION VARIABLES
hbx.acct="DM57061446AB;DM5707193LEW;DM570712KADA";//ACCOUNT NUMBER(S)
hbx.pn="PUT+PAGE+NAME+HERE";//PAGE NAME(S)
hbx.mlc="CONTENT+CATEGORY";//MULTI-LEVEL CONTENT CATEGORY
hbx.pndef="index.html";//DEFAULT PAGE NAME
hbx.ctdef="full";//DEFAULT CONTENT CATEGORY
function _hbOnPrePVR(){
if(_mlc != 0){
_mlc = "/EMEA/UK/Citibank" + _mlc
}
}

//OPTIONAL PAGE VARIABLES
//ACTION SETTINGS
hbx.fv="";//FORM VALIDATION MINIMUM ELEMENTS OR SUBMIT FUNCTION NAME
hbx.lt="auto";//LINK TRACKING
hbx.dlf="n";//DOWNLOAD FILTER
hbx.dft="n";//DOWNLOAD FILE NAMING
hbx.elf="n";//EXIT LINK FILTER

//SEGMENTS AND FUNNELS
hbx.seg="*;*;1";//VISITOR SEGMENTATION
hbx.fnl="";//FUNNELS

//CUSTOM VARIABLES
hbx.ci="";//CUSTOMER ID
hbx.hc1="";//CUSTOM 1
hbx.hc2="";//CUSTOM 2
hbx.hc3="";//CUSTOM 3
hbx.hc4="";//CUSTOM 4
hbx.hrf="";//CUSTOM REFERRER
hbx.pec="";//ERROR CODES

//INSERT CUSTOM EVENTS

//END EDITABLE SECTION

//REQUIRED SECTION. CHANGE "YOURSERVER" TO VALID LOCATION ON YOUR WEB SERVER (HTTPS IF FROM SECURE SERVER)
document.write("<script language='JavaScript' src='/personals/js/hbx.js'></scr" + "ipt>");
<!--END -->



// -->


<!-- Cookie Scripts

function setCookie(name, value, expire) {
	document.cookie = name + "=" + escape(value) + "; expires=" + expire.toGMTString() + ";path=/personal/"
}

function getCookie(Name) {
	var searchString = Name + "="
	if (document.cookie.length > 0) {
		offset = document.cookie.indexOf(searchString)
		if (offset != -1) {
			offset += searchString.length
			end = document.cookie.indexOf(";", offset)
			if (end == -1) { end = document.cookie.length }
			return unescape(document.cookie.substring(offset, end))
		}
	}
	return false
}


function createCookie(name,value,days) {

if (days) {

var date = new Date();

date.setTime(date.getTime()+(days*24*60*60*1000));

var expires = "; expires="+date.toGMTString();

}

else expires = "";

document.cookie = name+"="+value+expires+"; path=/";

}

function getInfo(Name) {
	var searchString = Name + "="
	if (location.search.length > 0) {
		offset = location.search.indexOf(searchString)
		if (offset != -1) {
			offset += searchString.length
			end = location.search.indexOf("&", offset)
			if (end == -1) { end = location.search.length }
			return unescape(location.search.substring(offset, end))
		}
	}
	return false
}


function checkForCookie() {

var defaultCookie = "none";

var defaultRedirect = "none";

//	var server = "../"

var cookieValue = getInfo("source")

if (cookieValue == "") { cookieValue = getCookie("partner") }

if ((cookieValue == "") || (cookieValue == undefined)) { return false }

if (cookieValue.length > 4) {cookieValue = cookieValue.substring(0,4) }

if ((cookieValue < 999) || (cookieValue > 9999)) { return false }

// make sure its a number

var invalidChars = " /:,;abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"

for (i=0; i<invalidChars.length; i++) {

badCharr = invalidChars.charAt(i)

if (cookieValue.indexOf(badCharr,0) > -1) {

return false

}

}

// write cookie - fourteen day sticky period

// -----------------------------------------

var today = new Date()

var expires = new Date()

expires.setTime(today.getTime() + (1000*60*60*24*14))

// if no default exists, then don't set or rewrite a cookie

//setCookie("partner",cookieValue,expires) - commented for a cookie less sourcetracking

if (getInfo("tduid") != false) { setCookie("tduid",getInfo("tduid"),expires) }

var directAcc = ""

if (getInfo("acc") == "direct") {

setCookie("acc","true",expires)

}

}

checkForCookie()

// customer / prospect determination

var custPros = getCookie("customer");

var directAcc = getCookie("acc");

// -->
var str1;
if (getCookie("query"))
{
str1=document.location.href;

  if(str1.indexOf("?") <=0)
   {
   document.location.href=str1;
   }
}



// server variables
var coImpTyp = "";
var coImpSou = "";
var coImpOff = "";
var coImpCus = "";
var coFound = false;
var comImpTyp = "";
var comImpSou = "";
var comImpOff = "";
var comImpCus = "";
var comFound = false;


// -->
