function open_apps(nameofapp)
{
var pWidth = ( ((parseInt(screen.width) / 2)) - 350)
var pHeight = (((parseInt(screen.height) / 2)) - 300)
aWindow = window.open(dir+'Forms/OnlineForm.cgi?form=' + nameofapp,'application',"toolbar=0,location=0,directories=0,status=0,menubar=0,width=700,height=600,top=" + pHeight + ",left=" + pWidth + ",scrollbars=1,resizable=1,status=1");
}


var timer;
NS4=(document.layers);
IE4=(document.all);

layerText=new Array(
//home
'<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr align="center"><td><img src="'+dir+'images/spacer.gif" width=1 height=17></td><td><a href="'+dir+'home/aboutus.html" class="subnav" target="content">About Us</a></td><td class="divider">|</td><td><a href="'+dir+'home/calendar.html" class="subnav" target="content">Community Calendar</a></td><td class="divider">|</td><td><a href="'+dir+'home/newsletter.html" class="subnav" target="content">F&amp;M Newsletter</a></td><td class="divider">|</td><td><a href="'+dir+'home/hours_locations.html" class="subnav" target="content">Hours &amp; Locations</a></td><td class="divider">|</td><td><a href="'+dir+'home/privacy.html" class="subnav" target="content">Privacy Notice</a></td><td class="divider">|</td><td><a href="https://www.bushnellbankhb.com/home/contactus.html" class="subnav" target="_blank">Contact Us</a></td></tr></table>',
//loans
'<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr align="center"><td><img src="'+dir+'images/spacer.gif" width=1 height=17></td><td><a href="'+dir+'loans/loans.html#home" class="subnav" target="content">Home</a></td><td class="divider">|</td><td><a href="'+dir+'loans/loans.html#consumer" class="subnav" target="content">Auto</a></td><td class="divider">|</td><td><a href="'+dir+'loans/loans.html#farm" class="subnav" target="content">Farm</a></td><td class="divider">|</td><td><a href="'+dir+'loans/loans.html#commerical" class="subnav" target="content">Commercial</a></td><td class="divider">|</td><td><a href="javascript:open_apps(\'loan_app\');" class="subnav">Loan Application</a></td><td class="divider">|</td><td><a href="'+dir+'calcs/loan_calc.html" class="subnav" target="content">Loan Calculator</a></td></tr></table>',
//depserv
'<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr align="center"><td><img src="'+dir+'images/spacer.gif" width=1 height=17></td><td><a href="'+dir+'depserv/depserv.html#ib" class="subnav" target="content">Internet Banking</a></td><td class="divider">|</td><td><a href="'+dir+'depserv/depserv.html#tb" class="subnav" target="content">Telephone Banking</a></td><td class="divider">|</td><td><a href="'+dir+'depserv/depserv.html#cds" class="subnav" target="content">CD\'s</a></td><td class="divider">|</td><td><a href="'+dir+'depserv/depserv.html#checking" class="subnav" target="content">Checking</a></td><td class="divider">|</td><td><a href="'+dir+'depserv/depserv.html#mm" class="subnav" target="content">Money Market & Savings</a></td><td class="divider">|</td><td><a href="'+dir+'depserv/depserv.html#atm" class="subnav" target="content">ATM & VISA Cards</a></td></tr></table>',
//trustmart
'<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr align="center"><td><img src="'+dir+'images/spacer.gif" width=1 height=17></td><td><a href="'+dir+'trustmart/trustmart.html#iras" class="subnav" target="content">IRA\'s & Rollovers</a></td><td class="divider">|</td><td><a href="'+dir+'trustmart/trustmart.html#living_trusts" class="subnav" target="content">Living Trusts</a></td><td class="divider">|</td><td><a href="'+dir+'trustmart/trustmart.html#taxprep" class="subnav" target="content">Tax Prep</a></td><td class="divider">|</td><td><a href="'+dir+'trustmart/trustmart.html#smaccts" class="subnav" target="content">Accounting Services</a></td></tr></table>',
//homecenter
'<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr align="center"><td><img src="'+dir+'images/spacer.gif" width=1 height=17></td><td><a href="'+dir+'loans/loans.html#home" class="subnav" target="_top">Home Loans</a></td><td class="divider">|</td><td><a href="javascript:showWarningFrame(\'http://qspace.iplace.com/cobrands/51/default.asp?sc=15033640\', \'\', \'_blank\', 1);" class="subnav">Credit Reports</a></td><td class="divider">|</td><td><a href="'+dir+'calcs/mort_calc.html" class="subnav" target="content">Mortgage Calculator</a></td></tr></table>',
//auto
'<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr align="center"><td><img src="'+dir+'images/spacer.gif" width=1 height=17></td><td><a href="'+dir+'loans/loans.html#consumer" class="subnav" target="_top">Car Loans</a></td><td class="divider">|</td><td><a href="'+dir+'calcs/loan_calc.html" class="subnav" target="content">Loan Calculator</a></td><td class="divider">|</td><td><a href="javascript:open_apps(\'loan_app\');" class="subnav">Loan Application</a></td></tr></table>',
//onlineserv
'<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr align="center"><td><img src="'+dir+'images/spacer.gif" width=1 height=17></td><td nowrap><a href="javascript:open_apps(\'loan_app\');" class="subnav">Loan Application</a></td><td class="divider">|</td><td><a href="https://www.bushnellbankhb.com/onlineserv/HB/Signon.cgi" class="subnav" target="_blank">Check Ordering</a></td><td class="divider">|</td><td><a href="https://www.bushnellbankhb.com/onlineserv/HB/Signon.cgi" class="subnav" target="_blank">Change of Address</a></td><td class="divider">|</td><td><a href="'+dir+'calcs/index.html" class="subnav" target="content">Financial Calculators</a></td></tr></table>',
//otherserv
'<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr align="center"><td><img src="'+dir+'images/spacer.gif" width=1 height=17></td><td><a href="'+dir+'otherserv/hall_of_fame.html" class="subnav" target="content">Hall of Fame</a></td><td class="divider">|</td><td><a href="'+dir+'otherserv/links.html" class="subnav" target="content">Our Favorite Links</a></td><td class="divider">|</td><td><a href="'+dir+'otherserv/otherserv.html#tb" class="subnav" target="content">Telephone Banking</a></td><td class="divider">|</td><td><a href="'+dir+'otherserv/otherserv.html#dd" class="subnav" target="content">Direct Deposit</a></td><td class="divider">|</td><td><a href="'+dir+'otherserv/otherserv.html#debit" class="subnav" target="content">Auto Debit</a></td></tr></table>',
//shoptravel
'<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr align="center"><td><img src="'+dir+'images/spacer.gif" width=1 height=17></td><td><a href="'+dir+'otherserv/hall_of_fame.html" class="subnav" target="content">Hall of Fame</a></td><td class="divider">|</td><td><a href="http://www.bushnellbankhb.com/portal/marketplace.html" class="subnav" target="content">Marketplace</a></td></tr></table>'
);

textStyle = '<style type="text/css">';
textStyle += '.swaptext {';
textStyle += 'position:absolute;';
textStyle += 'top:126;';
textStyle += 'left:-1;';
textStyle += 'visibility:hidden;';
textStyle += '}';
textStyle += '.subnav {';
textStyle += 'font-family:Verdana, Arial;';
textStyle += 'font-size:8pt;';
textStyle += 'font-weight:bold;';
textStyle += 'color:#666666;';
textStyle += 'text-decoration: none;';
textStyle += '}';
textStyle += '.divider {';
textStyle += 'font-family:Verdana, Arial;';
textStyle += 'font-size:8pt;';
textStyle += 'font-weight:bold;';
textStyle += 'color:#000000;';
textStyle += 'text-decoration: none;';
textStyle += '}';
textStyle += '</style>';
document.write(textStyle);

for (i=0;i<layerText.length;++i) {
  eval("text"+i+"='<div id=\"swaptext'+i+'\" class=\"swaptext\">'+layerText[i]+'</div>'");
  document.write(eval("text"+i));
}

function hideText(n) {
  if (NS4) {
    for (i=0;i<layerText.length;++i) {
      if (i!=n)	document.layers["swaptext"+i].visibility="hide";
	}
  }
  if (IE4) {
    for (i=0;i<layerText.length;++i) {
      if (i!=n) document.all["swaptext"+i].style.visibility="hidden";
    }
  }
  clearTimeout(timer);
}

function showText(n) {
  if (NS4) {
    document.layers["swaptext"+n].visibility="show";
  }
  if (IE4) {
    document.all["swaptext"+n].style.visibility="visible";
  }
  
  timer = setTimeout("resetText()", 10000);
}

function resetText() {
	hideText(defaultText);
	showText(defaultText);
}

if (NS4) {
  origWidth=innerWidth;
  origHeight=innerHeight;
  onresize=DHTMLfix;
}

function DHTMLfix() {
	if (origWidth != innerWidth || origHeight != innerHeight)
		location.reload();
}
