function setActiveStyleSheet(title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
}

function getActiveStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
  }
  return null;
}

function getPreferredStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1
       && a.getAttribute("rel").indexOf("alt") == -1
       && a.getAttribute("title")
       ) return a.getAttribute("title");
  }
  return null;
}

var n = 0
var ie = 0

// internet banking window
function openInternetBanking(clickPos){
if (ie) {
if (clickPos == "link") return
}
if (!ie && !n) {
if (clickPos == "link") return
}

//	Standard 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 ="https://citibankonline.ipb.citibank.co.uk"

var windowhref = ""
// determine which page to display - messages or directly to Citibank Online.
// 1 has seen message

switch (getCookie("ibmessagekey")) {

case "1" :
// show this next line for old CBOL 
windowhref = standardURL

// show this line during outage
windowhref = "/ipb/europe/globalpages/maintenance.htm"

// show this line after launch new CBOL
//windowhref = "/ipb/europe/cbol/changed.htm"
break;

case "2" :
// show this next line for old CBOL 
windowhref = standardURL

// show this line during outage
//windowhref = "/ipb/europe/globalpages/maintenance.htm"

// show this line after launch new CBOL
//windowhref = standardURL
break;	

default :
// show this next line for old CBOL 
windowhref = standardURL

// show this line during outage
//windowhref = "/ipb/europe/globalpages/maintenance.htm"

// show this line after launch new CBOL
//windowhref = "/ipb/europe/cbol/changed.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("customer", "true", 60);

}
<!-- 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");

// -->
