window.onerror  = null;
window.onerror = errorHandler;
function errorHandler() { return true;}


headURL = document.location.href;
first_split = headURL.split("/english");
headURL = first_split[0]+'/';

//alert(headURL);

function checkBrowser() {
	this.bname=navigator.appName;
	this.ver=navigator.appVersion; 
	this.agent=navigator.userAgent;
	this.dom=document.getElementById?1:0;
	this.parsedVer = parseInt(this.ver);
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6;
	this.mac=this.agent.indexOf("Mac")>-1;
	this.opera5=this.agent.indexOf("Opera 5")>-1;
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.ns3=(this.bname=="Netscape" && this.parsedVer <= 3)?1:0;
	this.others=(this.opera5);
	this.bw=(this.opera5 || this.ie6 || this.ie5 || this.ie4 || this.ns3 || this.ns4 || this.ns6 || this.others);
	return this;
}
var bw=new checkBrowser();

function bmark(){
url = "http://www.ipb.citibank.com";
title = "Citibank International Personal Banking Singapore";
if (bw.ie4==1 || bw.ie5==1 || bw.ie6==1) {
window.external.AddFavorite(url,title)
}
else {
        window.open(headURL+"consumer/english/bookmark.htm","Bookmark","width=740,height=500,menubar=no,scrollbars=yes,resizable=no");
}
}

//find object function
function AFfindObj(n, d) {
var p,i,x;  
if(!d) d=document; 
if((p=n.indexOf("?"))>0&&parent.frames.length) {d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; 
for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); 
return x;
}


if (bw.ie4==1 || bw.ie5==1 || bw.ie6==1)
    {document.write('<link rel=stylesheet type="text/css" href="'+headURL+'css/genfont.css">');}
else
    {document.write('<link rel=stylesheet type="text/css" href="'+headURL+'css/genfnet.css">');}

