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
document.write('<meta name="keywords" content="Mountain Valley Bank, Bank, mtnvalleybankonline, 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

/*
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.mtnvalleybankonline.com/images/"
sitedir="http://www.mtnvalleybankonline.com/site/"
securedir="http://www.mtnvalleybankonline.com/site/"
homedir="http://www.mtnvalleybankonline.com/"
}
else if(window.securepage)
{
imgdir="https://www.mtnvalleybankonline.com/images/"
sitedir="http://www.mtnvalleybankonline.com/site/"
securedir="https://www.mtnvalleybankonline.com/site/"
homedir="http://www.mtnvalleybankonline.com/"
}
else
{
imgdir="../images/";
sitedir="";
securedir="";
homedir="../";
}

// 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";
onlinetop_on = new Image(183,36);
onlinetop_on.src = imgdir + "nav-onlinetop-on.gif";

onlinetop_off = new Image(183,36);
onlinetop_off.src = imgdir + "nav-onlinetop-off.gif";

onlinebottom_on = new Image(183,16);
onlinebottom_on.src = imgdir + "nav-onlinebottom-on.gif";

onlinebottom_off = new Image(183,16);
onlinebottom_off.src = imgdir + "nav-onlinebottom-off.gif";

product_on = new Image(183,28);
product_on.src = imgdir + "nav-product-on.gif";

product_off = new Image(183,28);
product_off.src = imgdir + "nav-product-off.gif";

branch_on = new Image(183,28);
branch_on.src = imgdir + "nav-branch-on.gif";

branch_off = new Image(183,28);
branch_off.src = imgdir + "nav-branch-off.gif";

atm_on = new Image(183,28);
atm_on.src = imgdir + "nav-atm-on.gif";

atm_off = new Image(183,28);
atm_off.src = imgdir + "nav-atm-off.gif";

calculators_on = new Image(183,28);
calculators_on.src = imgdir + "nav-calc-on.gif";

calculators_off = new Image(183,28);
calculators_off.src = imgdir + "nav-calc-off.gif";

community_on = new Image(183,28);
community_on.src = imgdir + "nav-community-on.gif";

community_off = new Image(183,28);
community_off.src = imgdir + "nav-community-off.gif";

about_on = new Image(183,28);
about_on.src = imgdir + "nav-about-on.gif";

about_off = new Image(183,28);
about_off.src = imgdir + "nav-about-off.gif";

stock_on = new Image(183,28);
stock_on.src = imgdir + "nav-stock-on.gif";

stock_off = new Image(183,28);
stock_off.src = imgdir + "nav-stock-off.gif";

applications_on = new Image(183,28);
applications_on.src = imgdir + "nav-applications-on.gif";

applications_off = new Image(183,28);
applications_off.src = imgdir + "nav-applications-off.gif";

home_on = new Image(183,28);
home_on.src = imgdir + "nav-home-on.gif";

home_off = new Image(183,28);
home_off.src = imgdir + "nav-home-off.gif";

login_on = new Image(232,36);
login_on.src = imgdir + "nav-login-on.gif";

login_off = new Image(232,36);
login_off.src = imgdir + "nav-login-off.gif";

onlinebottom_on = new Image(232,36);
onlinebottom_on.src = imgdir + "nav-onlinebottom-on.gif";

onlinebottom_off = new Image(232,36);
onlinebottom_off.src = imgdir + "nav-onlinebottom-off.gif";

onlinetop_on = new Image(232,36);
onlinetop_on.src = imgdir + "nav-onlinetop-on.gif";

onlinetop_off = new Image(232,36);
onlinetop_off.src = imgdir + "nav-onlinetop-off.gif";

online_on = new Image(232,36);
online_on.src = imgdir + "nav-online-on.gif";

online_off = new Image(232,36);
online_off.src = imgdir + "nav-online-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

//style sheet sniffer
document.write('<scr'+ 'ipt src="' + securedir + '_styles.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=600,height=520,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.mtnvalleybankonline.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");
window.open(sitedir+nameofapp+'app.pdf','application',"toolbar=1,location=0,directories=0,status=0,menubar=0,width=700,height=600,top=" + pHeight + ",left=" + pWidth + ",scrollbars=1,resizable=1,status=1");
}

function openIB(what)
{
	
	if (what=='demo'){
		location.href = 'site/onlinebanking.html';
		//window.open('https://www.mtnvalleybankonline.com/onlineserv/HB/demo.html');
	} else if (what=='faqs'){
		location.href = sitedir + 'onlinebanking.html';
	} else if (what=='register'){
		window.open('site/onlinebanking.html');
	} else {
		location.href = 'site/onlinebanking.html';
		//window.open('https://www.mtnvalleybankonline.com/onlineserv/HB/Signon.cgi');
	}
}

function extLink(url)
{
	var pWidth = ( ((parseInt(screen.width) / 2)) - 110);
	var pHeight = (((parseInt(screen.height) / 2)) - 160);
	var openLink = window.open('', 'newwin', 'height=220,width=320,top=' + pHeight + ',left=' + pWidth);
	openLink.document.write("<html>");
	openLink.document.write("<head>");
	openLink.document.write("<title>Mountain Valley Bank</title>");
	openLink.document.write("</head>");
	openLink.document.write("<body bgcolor=\"#035636\">");
	openLink.document.write("<form><div align=\"center\"><table border=\"0\" cellpadding=\"5\" cellspacing=\"0\"><tr><td><font face=\"Arial\" size=\"2\" color=\"#ffffff\">By continuing you will be leaving the Mountain Valley Bank website.  We are not responsible for accuracy, security, or content of other websites.  We encourage you to view privacy and security disclosures of all websites you visit.</font><p><div align=\"center\"><input type='button'  value='Continue to new website' onClick='window.open(\"" + url + "\"); window.close();'><p><input type='button' value='Return to previous page' onClick='window.close();'></div></td></tr></table></div></form>");
	openLink.document.write("</body>");
	openLink.document.write("</html>");
}

