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



 var loc = document.location.toString();

 if (loc.indexOf("bofmonline2") < 0) {
       document.location.href = "https://www.bofmonline2.com";
}



// 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.bofmonline2.com/images/"
sitedir="http://www.bofmonline2.com/site/"
securedir="http://www.bofmonline2.com/site/"
homedir="http://www.bofmonline2.com/"
}
else if(window.securepage)
{
imgdir="https://www.bofmonline2.com/images/"
sitedir="http://www.bofmonline2.com/site/"
securedir="https://www.bofmonline2.com/site/"
homedir="http://www.bofmonline2.com/"
}

/**
 * showWarning(url) shows third party speed bump.
 */
function showWarning(url){

	var content = new Array();
	
	var index = 0;
	
	content[index++] = "<h2>Third Party Site Disclaimer</h2>By accessing the noted link you will be leaving Bank of Montgomery's website and entering a website hosted by another party. Bank of Montgomery has not approved this as a reliable partner site.  Please be advised that you will no longer be subject to, or under the protection of, the privacy and security policies of Bank of Montgomery's website. We encourage you to read and evaluate the privacy and security policies of the site you are entering, which may be different than those of Bank of Montgomery.";
	
	content[index++] = "<br /><br /><br />";
	
	content[index++] = "<div align=\"center\"><a href='"+url+"' target=\"_blank\" onclick=\"document.getElementById('ex_dis').style.display = 'none'\">Continue</a>  <a href=\"javascript:void('0');\" onclick=\"document.getElementById('ex_dis').style.display = 'none'\">Decline</a></div></div>";  
	
	document.getElementById("ex_dis").innerHTML = content.join("");
	
	document.getElementById("ex_dis").style.display = "block";
	
	scrollTo(0, 0);

}

 

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 #724234; padding: 15px; display: none; z-index: 3000; width:350px;"></div>');

 

function comingSoon(link){

var content = new Array();

	var index = 0;
	
	
	
	content[index++] = "<h2>Coming Soon</h2>You have attempted to access " + link + " on Bank of Montgomery's website.  This page is currently being developed.  Please check back soon for this online feature.";
	
	content[index++] = "<br /><br /><br />";
	
	content[index++] = "<div align=\"center\"><a href=\"#\" onclick=\"document.getElementById('cs_dis').style.display = 'none'\">Close</a>  </div></div>";  
	
	document.getElementById("cs_dis").innerHTML = content.join("");
	
	document.getElementById("cs_dis").style.display = "block";
	
	scrollTo(0, 0);

}

 

document.write('<div id="cs_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 #724234; padding: 15px; display: none; z-index: 3000; width:350px;"></div>');

 

function showEmailWarning(email){


	var content = new Array();
	
	var index = 0;
	
	content[index++] = "<h2>Email Security Warning</h2><p>E-mail messages sent over the Internet are not secure. Please do not include any account or personal information such as social security numbers in the message.</p>";
	
	content[index++] = "<br /><br /><br />";
	
	content[index++] = "<div align=\"center\"><a href=\"mailto:"+ email +"\" onclick=\"document.getElementById('email_dis').style.display = 'none'\">Continue</a>  <a href=\"#\" onclick=\"document.getElementById('email_dis').style.display = 'none'\">Decline</a></div></div>";  
	
	document.getElementById("email_dis").innerHTML = content.join("");
	
	document.getElementById("email_dis").style.display = "block";
	
	scrollTo(0, 0);

}

 

document.write('<div id="email_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 #724234; padding: 15px; display: none; z-index: 3000; width:350px;"></div>');

/**
 * opens the given online form
 */
function openApp(appName) {
	
	document.location.href = "https://www.bofmonline2.com/Forms/OnlineForm.cgi?form=" + appName + "&onweb=true";
	
}



/* functions for the login area */

var mouseOutTimeout = false;


/**
 * hides the login form and shows the more info div when the user mouses
 * over the more info link 
 */
function showInfoMenu(id) {

	if(mouseOutTimeout)
		clearTimeout(mouseOutTimeout);

	if(id == "loginnav")
		document.forms["Login"].style.display = "none";
	document.getElementById(id).style.display = "block";
}

function hideInfoMenu(id) {
	document.getElementById(id).style.display = "none";
	
	if(id == "loginnav")
		document.forms["Login"].style.display = "block";
}

function setMenuTimeout(id) { //alert("set timeout");
	mouseOutTimeout = setTimeout("hideInfoMenu('" +id +"')", 500);
}

function makeFooter() {
	var content = '';

	content += '<div class="footer">';
	content += '<div class="footerleft">';
	content += '<div class="logos">';
	content += '<img src="'+imgdir+'footer_left.gif" width="3" height="37" alt="" style="float:left;" />';
	content += '<a href="javascript:showWarning(\'http://www.fdic.gov\');"><img src="'+imgdir+'logo_fdic.gif" width="85" height="11" alt="Member FDIC" style="margin-top:7px;" /></a><a href="javascript:showWarning(\'http://www.hud.gov\');"><img src="'+imgdir+'logo_ehl.gif" width="123" height="11" alt="Equal Housing Lender" /></a>';
	content += '</div>';
	content += '<div id="fdic_insurance">&nbsp;** On October 3, 2008, FDIC deposit insurance temporarily increased from $100,000 to $250,000 per depositor through December 31, 2013.</div>';
	content += '</div><!--close footerleft-->';
	content += '<div class="footerright"><a href="javascript:showWarning(\'http://www.digitalinsight.com\');"><!--[if lt IE 7]><script type="text/javascript" src="/mstinc/web/js/png.js"></script><![endif]--><img src="/mstinc/web/images/di_91x22_1c_k.png" width="91" height="22" border="0" alt="Digital Insight, an Intuit company" /></a></div><!--close footerright-->';
	content += '</div><!--close footer-->';
	content += '</div><!--close rightcol-->';
						
	document.write(content);
}

function makeFooterNoFDIC() {
	var content = '';

	content += '<div class="footer">';
	content += '<div class="footerleft">';
	content += '<div class="logos">';
	content += '<img src="'+imgdir+'footer_left.gif" width="3" height="37" alt="" style="float:left;" />';
	//content += '<a href="javascript:showWarning(\'http://www.fdic.gov\');"><img src="'+imgdir+'logo_fdic.gif" width="85" height="11" alt="Member FDIC" style="margin-top:7px;" /></a><a href="javascript:showWarning(\'http://www.hud.gov\');"><img src="'+imgdir+'logo_ehl.gif" width="123" height="11" alt="Equal Housing Lender" /></a>';
	content += '</div>';
	//content += '<div id="fdic_insurance">&nbsp;** On October 3, 2008, FDIC deposit insurance temporarily increased from $100,000 to $250,000 per depositor through December 31, 2013.</div>';
	content += '</div><!--close footerleft-->';
	content += '<div class="footerright"><a href="javascript:showWarning(\'http://www.digitalinsight.com\');"><!--[if lt IE 7]><script type="text/javascript" src="/mstinc/web/js/png.js"></script><![endif]--><img src="/mstinc/web/images/di_91x22_1c_k.png" width="91" height="22" border="0" alt="Digital Insight, an Intuit company" /></a></div><!--close footerright-->';
	content += '</div><!--close footer-->';
	content += '</div><!--close rightcol-->';
						
	document.write(content);
}
