
   var agt=navigator.userAgent.toLowerCase();
    var is_major = parseInt(navigator.appVersion);
    var is_minor = parseFloat(navigator.appVersion);

    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    var is_nav2 = (is_nav && (is_major == 2));
    var is_nav3 = (is_nav && (is_major == 3));
    var is_nav4 = (is_nav && (is_major == 4));
    var is_nav4up = (is_nav && (is_major >= 4));
    var is_navonly = (is_nav && ((agt.indexOf(";nav") != -1) || (agt.indexOf("; nav") != -1)) );
    var is_nav6 = (is_nav && (is_major == 5));
    var is_nav6up = (is_nav && (is_major >= 5));

    var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    var is_ie3    = (is_ie && (is_major < 4));
    var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
    var is_ie4up  = (is_ie && (is_major >= 4));
    var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
    var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
    var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
    var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
    var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);

    var ieok = ((is_ie5)||(is_ie5_5up));
    var nsok = (is_nav4up);



//##################################           CLOSE WINDOW           ###############################

function closeWindow()
{
window.close();
}


//##################################           Break out of FRAMES           ###############################
function breakOut(url)
{
parent.location=url;
}


//##################################     CLOSE WINDOW AND REDIRECT     ##############################

function closeAndRedirect(where)
{
if (!(window.opener))
{
window.location = where;
}
else
{
window.close();
window.opener.location = where;
}
}



//##################################     POPUP WINDOW                 ################################

var newwin;
function launchwin(winurl,winname,winfeatures)
{
newwin = window.open(winurl,winname,winfeatures);

}


//#################################      DETECT SECURE CONNECTION      ###############################

function checkConnection(url, url2)
{
var url=self.location.href;
var clipUrl;
clipUrl = url.substring(0,5);
if (clipUrl=="http:")
{
window.location=url
}
else 
{
	if(!(url2=="stay"))
	{
	window.location=url2
	}
}
}


//#################################      ROTATE IMAGES                ###############################

function rotateImages(imagesL,textL,linksL)
{
var images = imagesL.split(';');
var alt = textL.split(';');
var links = linksL.split(';');

var random = Math.floor(Math.random()*images.length);

ranlinktr = links[random];
ranimagetr = images[random];
rantexttr = alt[random];

document.write('<a href=\"' +ranlinktr+ '\"><img src=\"'+ranimagetr+'\" border="0" alt=\"'+rantexttr+'\" height="70" width="136"></a>');
document.write('<font face="Verdana, Arial, Helvetica, sans-serif" size="1"> ');
document.write('</font> <font face="Verdana, Arial, helvetica" size="1">');
document.write("<br>");
document.write(rantexttr);
document.write('<a href=\"' +ranlinktr+ '\"><img src="http://www.bankofireland.ie/html/gws/images/homepage/arrows.gif" width=18 height=9 border="0" alt=\"'+rantexttr+'\"></a></font>');
}

//#################################      PRINTER FRIENDLY                ###############################


function ref() {
pop.history.go(0)

}
function PrinterFriendly()
{
pop = window.open ("","pop","width=400,height=445, scrollbars=yes, menubar=yes")
pop.document.write('<head>');
pop.document.write('<style>');
pop.document.write('td {font-family: verdana; font-size: 12px;}');
pop.document.write('body {font-family: verdana; font-size: 12px;}');
pop.document.write('p {font-family: verdana; font-size: 12px;}');
pop.document.write('</style>');
pop.document.write('<Title>');
pop.document.write('LOADING Printer Friendly Version of '+document.title);
pop.document.write('</Title>');
pop.document.write('</head>');
pop.document.write('<body  topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">');
pop.document.write('<img src=http://www.bankofireland.ie/html/gws/images/tracker.gif width=1 height=1>');
pop.document.write('<table>');
pop.document.write('<tr>');
pop.document.write('<td valign="top">');
pop.document.write("<h3><font face=verdana>"+document.title+"</font></h3>");
var temp="";
var y=0;
var bt=pop.document.title;
var cft=document.all['printerfriendly'].innerHTML;
for (var i=0; i<cft.length; i++) {
y++;
	if ((cft.charAt(i)+cft.charAt(i+1)+cft.charAt(i+2)+cft.charAt(i+3))=="href") {
	temp+=" onClick='return false' style='cursor: arrow;' ";

	}

temp+=cft.charAt(i);

}

pop.document.write("<font size=1 color=red face=verdana>Please note that links will not function on this page.<br>Select 'File' and 'Print' from the menu above to print this page.</font></font><hr><div id=prf>"+temp+"</div><hr>");
pop.document.write('</tr>');
pop.document.write('</table>');
pop.document.write('</body>');
pop.document.title=document.title;



}










function SendDocument()
{

var cft=document.location.href;

pop = window.open ("","pop","width=400,height=340, scrollbars=no, menubar=no, status=yes, address=no")
pop.document.write('<head>');
pop.document.write('<style>');
pop.document.write('td {font-family:verdana; font-size: 12px;}');
pop.document.write('</style>');
pop.document.write('<Title>\n');
pop.document.write('Send Document\n');
pop.document.write('</Title>\n');

pop.document.write('</head>\n');
pop.document.write('<body bgcolor=#ffffff  topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">\n');
pop.document.write('<img src=http://www.bankofireland.ie/html/gws/images/tracker.gif width=1 height=1>');
pop.document.write('<table bgcolor=#ffffff  width=100% border=0>\n');
pop.document.write('<tr>\n');
pop.document.write('<td valign="top">\n');
pop.document.write("<form name=f1 action=http://www.bankofireland.ie/gws/EmailReferralJWeb>\n");
pop.document.write("<input type=\"hidden\" name=\"topic.title\" value=\""+document.title+"\">");
pop.document.write("<input type=hidden name='topic.url' value='"+cft+"'>");
pop.document.write("<input type=hidden name='topic.owner' value='Bank of Ireland'>");
pop.document.write("<input type=hidden name='topic.line.1' value='Further Information your friend included:'>");
pop.document.write("<table>\n<tr>\n<td colspan=2><font size=3><b>Send this document</b></font><hr>Please type in the contact details of the person you wish to send this document to.<hr></td>\n</tr>\n");
pop.document.write("<tr><td>Friends Name:</td><td><input type=text name='friend.1.name' size=11></td></tr>");
pop.document.write("<tr><td>Friends Email:</td><td><input type=text name='friend.1.email' size=11></td>\n</tr>");
pop.document.write("<tr><td>Your Name:</td><td><input type=text name='referrer.name' size=11></td></tr>");
pop.document.write("<tr><td>Further information you may like to include in the email: </td><td><input type=text name='topic.line.2' ></td></tr>");
pop.document.write("<tr><td></td><td><input type=hidden  value='info@boie.ie' name='referrer.email'  size=11></td>\n</tr>");
pop.document.write("<tr>\n<td colspan=2><br><br><b>Hit send to email your friend the information:</b><hr> \n\n");
pop.document.write("<tr>\n<td colspan=2><hr><input type=submit value=Send></td>\n</tr>\n");
pop.document.write("\n</form>");
pop.document.write('\n</tr>');
pop.document.write('\n</table>');
pop.document.write('\n</body>');
setTimeout('ref()', 450);
}



function doTools() {
if (ieok) {
document.write('<a class="lhn" href="javascript:PrinterFriendly()"><img src=http://www.bankofireland.ie/html/gws/includes/general/tools/print.gif align=middle border=0>&nbsp;<font size=1 face=verdana>Printer ');
document.write('Friendly</font></a>&nbsp;&nbsp;&nbsp;&nbsp;<a class="lhn"  href="javascript:SendDocument()"><img src=http://www.bankofireland.ie/html/gws/includes/general/tools/mail.gif align=middle border=0>&nbsp;<font size=1 face=verdana>Email ');
document.write('this document</font></a> ');
}
}

function doChange(ss) {if (ss.value=="Search BOI") ss.value="";
}