/*
window.onresize=resize;
function resize(){
self.location.href=self.location.href;
}
*/

function openRegNotice() {
	window.open('https://www.bankofkyhb.com/site/regNotice.html', 'notice' , 'width=460,height=410')
}

if(window.event + "" == "undefined") event = null;
function showMenu(){return false};
function mout(){return false};
function dummyObject() {this.mout=mout};
oM = new dummyObject();

// CALL TO CORRECT DIRECTORY BELOW
var imgdir = "../images/";
var sitedir = "";
var securedir = "";
var homedir = "../";
if(window.homepage)
{
imgdir="images/";
sitedir="site/";
securedir="site/";
homedir="";
}
else if(window.absolutepage)
{
imgdir="http://www.bankofkyhb.com/images/"
sitedir="http://www.bankofkyhb.com/site/"
securedir="http://www.bankofkyhb.com/site/"
homedir="http://www.bankofkyhb.com/"
}
else if(window.securepage)
{
imgdir="https://www.bankofkyhb.com/images/"
sitedir="http://www.bankofkyhb.com/site/"
securedir="https://www.bankofkyhb.com/site/"
homedir="http://www.bankofkyhb.com/"
}
// CALL TO CORRECT DIRECTORY ABOVE

// ROLLOVER CODE BELOW
function makeNavImage(name,width,height){
this.name_on="nav-" + name +"-on.gif";
this.name_off="nav-" + name +"-off.gif";
this.width=width;
this.height=height;
this.newimage_on = new Image(width,height);
this.newimage_on.src = imgdir + this.name_on;
this.newimage_off = new Image(width,height);
this.newimage_off.src = imgdir + this.name_off;
}

var nav_heights=26;

var navitems = new Array();
navitems["home"] = new makeNavImage("home",36,nav_heights);
navitems["olb"] = new makeNavImage("olb",97,nav_heights);
navitems["pbk"] = new makeNavImage("pbk",112,nav_heights);
navitems["bbk"] = new makeNavImage("bbk",112,nav_heights);
navitems["loans"] = new makeNavImage("loans",119,nav_heights);
navitems["locations"] = new makeNavImage("locations",62,nav_heights);
navitems["investor"] = new makeNavImage("investor",114,nav_heights);

function img_act(imgName){
document[imgName].src = navitems[imgName].newimage_on.src;
}

function img_inact(imgName){
window.status = "";
document[imgName].src = navitems[imgName].newimage_off.src;
}
// ROLLOVER CODE ABOVE

// OTHER FUNCTIONS BELOW
function openWin(url,name,width,height,options){
var n = name;
var w = width;
var h = height;
var o = options;
n = (n==null)?"_blank":n;
w = (isNaN(w) || w==null)?700:w;
h = (isNaN(h) || h==null)?600:h;
o = (o==null)?"toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1":(o.indexOf(",")!=0)?","+o:o;

var posX = Math.ceil((parseInt(screen.width) - w) / 2);
var posY = Math.ceil((parseInt(screen.height) - h) / 2);
aWindow = window.open(url,n,"width=" + w + ",height=" + h + ",left=" + posX + ",top=" + posY + o);
}

function open_apps(nameofapp){
self.location.href = "https://www.bankofkyhb.com/Forms/OnlineForm.cgi?onweb=true&form=" + nameofapp;
//alert('Coming Soon');
}

function openIB(page){
if (page=="demo") self.location.href = homedir+"index.html?demo";
else self.location.href = homedir+"index.html";
//if (page=="demo") openWin("https://www.bankofkyhb.com/index.html?demo");
//else openWin("https://www.bankofkyhb.com/onlineserv/HB/")
}

function showWarning(url){
var content = new Array();
var index = 0;
content[index++] = "<h2>Third Party Site Disclaimer</h2>Any web sites visited by link from this site are solely the responsibility of the organization(s) providing the site.  Links that may be accessed via this site are for the convenience of our customers.  The Bank of Kentucky is not responsible for, nor do we endorse the content of these sites and hereby disclaims any responsibility for such content.";
content[index++] = "<br /><br /><br />";
content[index++] = "<div align=\"center\"><a href=\"javascript:void('0');\" onclick=\"window.open('"+url+"');document.getElementById('ex_dis').style.display = 'none';showApplets();\">Continue</a>  <a href=\"javascript:void('0');\" onclick=\"document.getElementById('ex_dis').style.display = 'none'; showApplets();\">Decline</a></div></div>";	
document.getElementById("ex_dis").innerHTML = content.join("");
document.getElementById("ex_dis").style.display = "block";
scrollTo(0, 0);
// hide applets if applicable
//only run script if applets exist on the page:

var theApplets = document.getElementsByTagName("APPLET");

  if(theApplets.length >= 1)
	{
		
		// get Div dimensions:
		var theDiv = document.getElementById("ex_dis");
		var theDivTop = theDiv.offsetTop;
		var theDivLeft = theDiv.offsetLeft;
		var theDivBottom = theDivTop + theDiv.offsetHeight;
		var theDivRight = theDivLeft + theDiv.offsetWidth;
	
		var AppletLeft; var AppletTop; var AppletBottom; var AppletRight; // declare Applet Variables
		
		// for each applet element on page, :
		for(i=0; i<theApplets.length; i++)
		{
			//reset applet variables:
			AppletLeft = 0; AppletTop = 0; AppletBottom=0; AppletRight=0;
			var inside=false;	
			//set Applet top left point
			AppletLeft = theApplets[i].offsetLeft;
			AppletTop = theApplets[i].offsetTop;
			AppletBottom = AppletTop + theApplets[i].offsetHeight;
			AppletRight = AppletLeft + theApplets[i].offsetWidth;
					
			
			if(((AppletTop <= theDivBottom && theDivBottom <= AppletBottom) || (AppletTop <= theDivTop && theDivTop <= AppletBottom)) && ((AppletLeft<=theDivLeft && theDivLeft <= AppletRight)||(AppletLeft<=theDivRight && theDivRight<=AppletRight)))
			{
				inside=true;
			}
			else
			{
				inside=false;
			}
			
			if (inside)
			{
				theApplets[i].style.visibility="hidden";
			}
			else
			{
				theApplets[i].style.visibility="visible";
			}
		}
	}
}

function showApplets()
{
// to show hidden applets if they were turned off.
  var theApplets = document.getElementsByTagName("APPLET");

  if(theApplets.length >= 1)
	{
		for(i=0; i<theApplets.length; i++)
		{
			theApplets[i].style.visibility="visible";
		}
	}
}

document.write('<div id="ex_dis" style="background-color: #ffffff; font-family: Arial, Helvetica, sans-serif; font-size: 8pt; font-weight: normal; color: #000000; text-align: left; position:absolute; top:125px; left:300px; border: thin solid #1A448E; padding: 15px; display: none; z-index: 3000; width:350px;"></div>');


function openPDF(page)
{
/*bWindow = window.open(sitedir+page,'newWin');
	bWindow = null;
	return;*/
	document.location = sitedir + page;
}

function openPage(page)
{
self.location.href = page;
}

function showbuttons() {   

    var agt       = navigator.userAgent.toLowerCase();
    var IEMAC     = ((agt.indexOf("msie") != -1) && agt.indexOf("mac")!=-1);
    var N6        = (agt.indexOf("netscape6") != -1 || (agt.indexOf("netscape/6") !=-1 ));

    if ( N6 ) {
      return "Netscape 6 is unable to support our detailed reports.  Please upgrade to Nescape 7.<p>";
    }
    if ( IEMAC ) {
      return "<p>";
    }

    return "<p><FORM><INPUT TYPE='button' value='Calculate' Name='btnCallCalc' onClick='document.calculator.calculate()'><INPUT TYPE='button' value='View Report' Name='btnOpenNote' onClick='openNote()'></FORM>";
}

function openNote()
 { 
 
 var agt=navigator.userAgent.toLowerCase(); 
 var is_aol   = (agt.indexOf("aol") != -1);

 leftpos=0;
 if (screen) {
   leftpos=screen.width/2 - 300;
 } 

 if (is_aol) {
   var s = " ";
   s=document.calculator.sJavaScriptReport('html');
    document.write(s);
 }
 else {
  var OpenWindow=window.open("","newwin","toolbar=yes,menubar=yes,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=600,height=380,left="+leftpos+",top=20");/* */
//self.location.href = "blank.html";
   var s = " ";
   s=document.calculator.sJavaScriptReport('html');
   OpenWindow.document.write(s);
   OpenWindow.document.close(); 
   OpenWindow.focus();
 }
 }

 
 
// OTHER FUNCTIONS ABOVE