
function goDemo(){};


if(window.event + "" == "undefined") event = null;
function HM_f_PopUp(){return false};
function HM_f_PopDown(){return false};
popUp = HM_f_PopUp;
popDown = HM_f_PopDown;


/*
META TAGS CONTENT AND DESCRIPTION BELOW
META TAGS CONTENT AND DESCRIPTION BELOW
META TAGS CONTENT AND DESCRIPTION BELOW
*/
document.write('<meta name="keywords" content="Union Bank and Trust, Bank, unionbankandtrust, A financial institution of excellence, featuring secure Internet-based services including Home Banking, Bill Payment, Bill Presentment, Quicken and Money interfaces, Stock Quotes, on-line applications, financial calculators, useful links and a wealth of financial information">');


document.write('<meta name="description" content="ATM, ATM Locations, Account Access, Account Transfer, Automobile Loans, AutoVantage, Bank, Bank Account, Banking, Bill Payment, Bill Presentment, Brokerage, Cash, CDs, Certificates of Deposit, Checks, Checking Accounts, Consumer Loans, Convenience Services, Credit, Credit Card, Credit Card Applications, Credit Union, Digital Insight, Finance, Financial Calculator, Financial Institution, Financial Wizard, Loans, Home Loans, IRA, Money, Term Investment, Online Banking, Order Checks, Personal Financial Management, Rates, Mortgage Rates, Loan Rates, Terms, Retirement, Savings Accounts, Savings, Savings and Loan, Stock Quotes, Stocks, Student Loans, Student, Term Share Certificates, Thrifts, Visa Credit Cards">');
/*
META TAGS CONTENT AND DESCRIPTION ABOVE
META TAGS CONTENT AND DESCRIPTION ABOVE
META TAGS CONTENT AND DESCRIPTION ABOVE
*/


/*
CALL TO CORRECT DIRECTORY
CALL TO CORRECT DIRECTORY
CALL TO CORRECT DIRECTORY
CALL TO CORRECT DIRECTORY
*/


//if you are on homepage you need <script> var homepage = "yes";</script> to make codework properly

var imgdir;
var sitedir;
var securedir;
var homedir;

if(window.homepage)
{
imgdir="images/";
sitedir="site/";
securedir="site/";
homedir="../";
}
else if(window.absolutepage)
{
imgdir="http://www.baycommunitybank.com/images/"
sitedir="http://www.baycommunitybank.com/site/"
securedir="http://www.baycommunitybank.com/site/"
homedir="http://www.baycommunitybank.com/"
}
else if(window.securepage)
{
imgdir="https://www.baycommunitybank.com/images/"
sitedir="https://www.baycommunitybank.com/site/"
securedir="https://www.baycommunitybank.com/site/"
homedir="https://www.baycommunitybank.com/"
}
else
{
imgdir="../images/";
sitedir="";
securedir="";
homedir="../";
}


// ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW
// ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW
// ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW


browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
if (((browserName == "Netscape") && (browserVer >= 3)) || ((browserName =="Microsoft Internet Explorer") && (browserVer >= 4)))
{
version = "ok";
personal_on = new Image(159,18);
personal_on.src = imgdir + "nav-personal-on.gif";

personal_off = new Image(159,18);
personal_off.src = imgdir + "nav-personal-off.gif";

business_on = new Image(159,18);
business_on.src = imgdir + "nav-business-on.gif";

business_off = new Image(159,18);
business_off.src = imgdir + "nav-business-off.gif";

online_on = new Image(159,18);
online_on.src = imgdir + "nav-online-on.gif";

online_off = new Image(159,18);
online_off.src = imgdir + "nav-online-off.gif";

mortgages_on = new Image(159,18);
mortgages_on.src = imgdir + "nav-mortgages-on.gif";

mortgages_off = new Image(159,18);
mortgages_off.src = imgdir + "nav-mortgages-off.gif";

investments_on = new Image(159,18);
investments_on.src = imgdir + "nav-investments-on.gif";

investments_off = new Image(159,18);
investments_off.src = imgdir + "nav-investments-off.gif";

insurance_on = new Image(159,18);
insurance_on.src = imgdir + "nav-insurance-on.gif";

insurance_off = new Image(159,18);
insurance_off.src = imgdir + "nav-insurance-off.gif";

creditcards_on = new Image(159,18);
creditcards_on.src = imgdir + "nav-creditcards-on.gif";

creditcards_off = new Image(159,18);
creditcards_off.src = imgdir + "nav-creditcards-off.gif";

infocenter_on = new Image(159,18);
infocenter_on.src = imgdir + "nav-infocenter-on.gif";

infocenter_off = new Image(159,18);
infocenter_off.src = imgdir + "nav-infocenter-off.gif";

healthsavings_on = new Image(159,18);
healthsavings_on.src = imgdir + "nav-healthsavings-on.gif";

healthsavings_off = new Image(159,18);
healthsavings_off.src = imgdir + "nav-healthsavings-off.gif";

college_off = new Image(159,18);
college_off.src = imgdir + "nav-college-off.gif";

college_on = new Image(159,18);
college_on.src = imgdir + "nav-college-on.gif";

fraud_on = new Image(159,18);
fraud_on.src = imgdir + "nav-fraud-on.gif";

fraud_off = new Image(159,18);
fraud_off.src = imgdir + "nav-fraud-off.gif";

home_on = new Image(42,17);
home_on.src = imgdir + "nav-home-on.gif";

home_off = new Image(42,17);
home_off.src = imgdir + "nav-home-off.gif";

about_on = new Image(56,17);
about_on.src = imgdir + "nav-about-on.gif";

about_off = new Image(56,17);
about_off.src = imgdir + "nav-about-off.gif";

contact_on = new Image(66,17);
contact_on.src = imgdir + "nav-contact-on.gif";

contact_off = new Image(66,17);
contact_off.src = imgdir + "nav-contact-off.gif";

sitemap_on = new Image(58,17);
sitemap_on.src = imgdir + "nav-sitemap-on.gif";

sitemap_off = new Image(58,17);
sitemap_off.src = imgdir + "nav-sitemap-off.gif";

terms_on = new Image(74,30);
terms_on.src = imgdir + "nav-terms-on.gif";

terms_off = new Image(74,30);
terms_off.src = imgdir + "nav-terms-off.gif";

privacy_on = new Image(76,30);
privacy_on.src = imgdir + "nav-privacy-on.gif";

privacy_off = new Image(76,30);
privacy_off.src = imgdir + "nav-privacy-off.gif";

nav_one_on = new Image(23,34);
nav_one_on.src = imgdir + "nav-1-on.gif";

nav_one_off = new Image(23,34);
nav_one_off.src = imgdir + "nav-1-off.gif";

nav_two_on = new Image(23,30);
nav_two_on.src = imgdir + "nav-2-on.gif";

nav_two_off = new Image(23,30);
nav_two_off.src = imgdir + "nav-2-off.gif";

nav_three_on = new Image(23,32);
nav_three_on.src = imgdir + "nav-3-on.gif";

nav_three_off = new Image(23,32);
nav_three_off.src = imgdir + "nav-3-off.gif";

security_on = new Image(159,18);
security_on.src = imgdir + "nav-security-on.gif";

security_off = new Image(159,18);
security_off.src = imgdir + "nav-security-off.gif";

sir_on = new Image(159,18);
sir_on.src = imgdir + "nav-sir-on.gif";

sir_off = new Image(159,18);
sir_off.src = imgdir + "nav-sir-off.gif";

}
else
version = "x";

function img_act(imgName)
{
if (version == "ok")
{
imgOn = eval(imgName + "_on.src");
document [imgName].src = imgOn;
}
}

function img_inact(imgName)
{
window.status = "";
 if (version == "ok")
{
imgOff = eval(imgName + "_off.src");
document [imgName].src = imgOff;
}
}

// ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE
// ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE
// ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE

//style sheet sniffer
// HA HA .. BUH BYE -->  document.write('<scr'+ 'ipt src="' + securedir + '_styles.js"></scr' + 'ipt>');
document.write('<scr'+ 'ipt type="text/javascript" src="' + sitedir + '_global.js"></scr' + 'ipt>');

function showCalc(calc)
{
var pWidth = ( ((parseInt(screen.width) / 2)) - 275)
var pHeight = (((parseInt(screen.height) / 2)) -240)
window.open(calc,"hello","width=550,height=480,left=" + pWidth + ",top=" + pHeight + ",resizable=1,scrollbars=1");

}
function tabover(howmuch)
{
var farover = '';
farover += '<img src="../images/clearpix.gif" width="' + howmuch + '" height="1" alt="" border="0">';
document.write(farover);
}

function open_apps(nameofapp)
{
var pWidth = ( ((parseInt(screen.width) / 2)) - 350)
var pHeight = (((parseInt(screen.height) / 2)) - 300)
aWindow = window.open('https://www.baycommunitybank.com/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");
}

 function showMFAPopup(){
	//content creation
	var content = new Array();
        var index = 0;
	content[index++] = '<span class="pageheader">ENHANCED LOGIN SECURITY</span><br /><br /><a href="'+sitedir+'faq-mfa-personal.html" onclick="document.getElementById(\'ex_dis\').style.display = \'none\'">Personal Internet Banking</a><br /><br /><a href="'+sitedir+'faq-mfa-business.html" onclick="document.getElementById(\'ex_dis\').style.display = \'none\'">Business Internet Banking</a>';
	content[index++] = '<br /><br /><br />';
	content[index++] = '<div align="center"><a href="javascript:void(\'0\');" onclick="document.getElementById(\'ex_dis\').style.display = \'none\'">close</a></div></div>';	
	document.getElementById("ex_dis").innerHTML = content.join("");
	document.getElementById("ex_dis").style.display = "block";
	scrollTo(0,0); //used to make sure that the end user sees the disclaimer.

}


function checkSize()
{
    var width = 800; // Default window width is 800px

    if ( typeof(window.innerWidth) == 'number' ) { width = window.innerWidth; } //Non-IE
    else if ( document.documentElement && ( document.documentElement.clientWidth ) ) { width = document.documentElement.clientWidth; } //IE 6+ in 'standards compliant mode'
    else if ( document.body && ( document.body.clientWidth ) ) { width = document.body.clientWidth; } //IE 4 compatible

    return width;
}

function openWindow(url,options)
{
	if (options)
	{
		window.open(url,"new_win",options);
	}
	
	else
	{
		window.open(url,"new_win","width=700,height=500,resizable=1,scrollbars=1");
	}
}

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:' + (parseInt(checkSize()/2)-175) + 'px; border: thin solid #1A448E; padding: 15px; display: none; z-index: 100000; width:350px; overflow: hidden;"></div>');
