/* META TAGS CONTENT AND DESCRIPTION BELOW */
document.write('<meta name="keywords" content="Bank of Old Monroe, Bank, bankofoldmonroe, 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.bankofoldmonroe.com/images/"
sitedir="http://www.bankofoldmonroe.com/site/"
securedir="http://www.bankofoldmonroe.com/site/"
homedir="http://www.bankofoldmonroe.com/"
}
else if(window.securepage)
{
imgdir="https://www.bankofoldmonroe.com/images/"
sitedir="http://www.bankofoldmonroe.com/site/"
securedir="https://www.bankofoldmonroe.com/site/"
homedir="http://www.bankofoldmonroe.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";
ibclogin_on = new Image(180,20);
ibclogin_on.src = imgdir + "nav-ibclogin-on.gif";

ibclogin_off = new Image(180,20);
ibclogin_off.src = imgdir + "nav-ibclogin-off.gif";

ibcdemo_on = new Image(146,20);
ibcdemo_on.src = imgdir + "nav-ibcdemo-on.gif";

ibcdemo_off = new Image(146,20);
ibcdemo_off.src = imgdir + "nav-ibcdemo-off.gif";

privacy_on = new Image(48,33);
privacy_on.src = imgdir + "nav-privacy-on.gif";

privacy_off = new Image(48,33);
privacy_off.src = imgdir + "nav-privacy-off.gif";

security_on = new Image(54,33);
security_on.src = imgdir + "nav-security-on.gif";

security_off = new Image(54,33);
security_off.src = imgdir + "nav-security-off.gif";

products_on = new Image(224,32);
products_on.src = imgdir + "nav-products-on.gif";

products_off = new Image(224,32);
products_off.src = imgdir + "nav-products-off.gif";

pers_on = new Image(224,44);
pers_on.src = imgdir + "nav-pers-on.gif";

pers_off = new Image(224,44);
pers_off.src = imgdir + "nav-pers-off.gif";

biz_on = new Image(224,44);
biz_on.src = imgdir + "nav-biz-on.gif";

biz_off = new Image(224,44);
biz_off.src = imgdir + "nav-biz-off.gif";

rates_on = new Image(224,32);
rates_on.src = imgdir + "nav-rates-on.gif";

rates_off = new Image(224,32);
rates_off.src = imgdir + "nav-rates-off.gif";

calcs_on = new Image(224,32);
calcs_on.src = imgdir + "nav-calcs-on.gif";

calcs_off = new Image(224,32);
calcs_off.src = imgdir + "nav-calcs-off.gif";

aboutus_on = new Image(224,32);
aboutus_on.src = imgdir + "nav-aboutus-on.gif";

aboutus_off = new Image(224,32);
aboutus_off.src = imgdir + "nav-aboutus-off.gif";

contactus_on = new Image(224,32);
contactus_on.src = imgdir + "nav-contactus-on.gif";

contactus_off = new Image(224,32);
contactus_off.src = imgdir + "nav-contactus-off.gif";

news_off = new Image(224,32);
news_off.src = imgdir + "nav-news-off.gif";

news_on = new Image(224,32);
news_on.src = imgdir + "nav-news-on.gif";

help_on = new Image(224,32);
help_on.src = imgdir + "nav-help-on.gif";

help_off = new Image(224,32);
help_off.src = imgdir + "nav-help-off.gif";

home_on = new Image(224,32);
home_on.src = imgdir + "nav-home-on.gif";

home_off = new Image(224,32);
home_off.src = imgdir + "nav-home-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=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)
if (document.URL.indexOf('skynet')!=-1) {
	path = 'https://skynet.diginsite.com/staging/bankofoldmonroe/bankofoldmonroedocs/Forms/OnlineForm.cgi?form=';
} else {
	path = 'https://www.bankofoldmonroe.com/Forms/OnlineForm.cgi?form=';
}
aWindow = window.open(path + 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 rateTable(n){
	var r = 1;
	var i = 0;
	var c = 0;
	//var nw = (w)? false : true;
	//var header = (h)? h : 0;
	var whole = '';
	var max_value = 0;
	
	for(var r=1; r<entryObjects[n].value.length; r++) {
		for(var i=0; i<entryObjects[n].value[r].length; i++) {
			if(entryObjects[n].value[r].length>max_value)
				max_value = entryObjects[n].value[r].length;
		}
	}

	for(var r=1; r<entryObjects[n].value.length; r++) {
		var text = "<tr>";
		var styleClass = (c%2==0) ? "tablecontent1" : "tablecontent2";
		if(r==1) {
			styleClass = "tableheader";
			c--;
		}
		for(var i=0; i<entryObjects[n].value[r].length; i++) {
			/*if(nw) {
				var nowrap = (i==0) ? "nowrap" : "";
			}*/
			var nowrap="";
			var colspan="";
			if(max_value>entryObjects[n].value[r].length && i==entryObjects[n].value[r].length-1) {
				var num = max_value - entryObjects[n].value[r].length + 1;
				colspan = ' colspan="' +num+'"';
			}
			text += '<td'+colspan+' class="'+styleClass+'" valign="top" '+nowrap+'>'+entryObjects[n].value[r][i]+'</td>';
		}
		text += "</tr>";
		whole += text;
		c++;
	}
	document.write(whole);
}

function openIB(page) {
	if (page=="demo") {
		//location.href = "https://www.bankofoldmonroe.com/onlineserv/HB/demo.html";
		location.href = "https://www.bankofoldmonroe.com/index_new.html?demo";
	} else {
		//location.href = "https://www.bankofoldmonroe.com/onlineserv/HB/Signon.cgi";
		location.href = "https://www.bankofoldmonroe.com/index.html";
	}
}


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 showDiv(url){
	
		document.getElementById("ex_dis").style.visibility = "visible";
		
		
	}
	
function hideDiv(){
	
		document.getElementById("ex_dis").style.visibility = "hidden";
		
		
	}	
	
function openExternal(url){
	openWin(url);
	setTimeout("window.location.reload()",2000);
	return;
}	

function showWarning(url){
	rs = false;
	var content = new Array();
	var index = 0;
	content[index++] = '<h2>Please be aware</h2><p>By accessing the noted link you will be leaving Bank of Old Monroe\'s website and entering a website hosted by another party. Although Bank of Old Monroe has 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 Old Monroe\'s website. We encourage you to read and evaluate the privacy and security policies on the site you are entering, which may be different than those of Bank of Old Monroe.</p>';
	content[index++] = '<div align="center"><a href="javascript:void(\'0\');" onclick="window.open(\''+url+'\');document.getElementById(\'ex_dis\').style.visibility = \'hidden\'">Continue</a>&nbsp;&nbsp;<a href="javascript:void(\'0\');" onclick="document.getElementById(\'ex_dis\').style.visibility = \'hidden\'">Decline</a></div></div>';
	document.getElementById("ex_dis").innerHTML = content.join("");
	document.getElementById("ex_dis").style.visibility = "visible";
	scrollTo(0, 0);
}

/*
 * Opens a PDF in a second window
 * Params:
 *  pdfname - either a full path to the pdf -or- the filename of the pdf in 'documents' folder of fiFiles
 *  isFullPath - DEPRECATED :: set this to true if you do not want the 'documents' folder path prepended to the pdf name
 *  fullscreen - set this to true if you want the new window to fill the user's screen instead of opening at 780 x 580
 * Usage:
 *  openPDF('filename.pdf')
 *  openPDF('//www.domain.com/pdfs/filename.pdf', true)
 *  etc...
 */
function openPDF(pdfname, fullscreen)
{
	pdfname = /^http/.test(pdfname) ? pdfname : RegExp('pdfs/').test(pdfname) ? pdfname : 'pdfs/'+pdfname;
	width = fullscreen ? screen.width : 780;
	height = fullscreen ? screen.height : 580;
	var domExp = new RegExp("^(http|https)\:\/\/(www\.)?(\w*\.)+(org|com|net|gov)"),
		domain = pdfname.match(domExp);
	if (domain && document.location.href.indexOf(domain[2]+domain[3]+domain[4]) == -1) {
		wcPopup(pdfname, height, width);
	} else {
		wcInternalPopup(pdfname, height, width);
	}
} // openPDF()

function wcInternalPopup(url, height, width, opts){
	var wide = parseInt(width);
	var tall = parseInt(height);
    var halfwide = (wide/2);
    var halftall = (tall/2);
    var pWidth = (((parseInt(screen.width) / 2)) - halfwide);
    var pHeight = (((parseInt(screen.height) / 2)) - halftall);
    var features = opts || 'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1';
	features += ',width='+wide+',height='+tall+',top='+pHeight+',left='+pWidth;
    window.open(url,'internalpopup',features);
}

function wcPopup(url, height, width, disclaimer){
	var disclaimer = parseInt(disclaimer);
	var wide = parseInt(width);
	var tall = parseInt(height);
	var halfwide = (wide/2);
	var halftall = (tall/2);
	var pWidth = (((parseInt(screen.width) / 2)) - halfwide);
	var pHeight = (((parseInt(screen.height) / 2)) - halftall);
	var features = 'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width='+wide+',height='+tall+',top='+pHeight+',left='+pWidth;
	if (disclaimer)
		showWarning("javascript:void(window.open('"+url+"','externalpopup','"+features+"'))", url, false, disclaimer)
	else
		window.open(url,'externalpopup',features);
}


document.write('<div id="ex_dis" style="background-color: #ffffff; font-family: Verdana, Arial, Helvetica, Geneva, Swiss, SunSans-Regular; font-size: 10px; font-weight: normal; color: #000000; text-align: left; position:absolute; left:25%; top:25%; margin:5% 5% 5% 5%; border: thin solid #C71425; padding: 10px; visibility: hidden;z-index: 500px; height: 250px; width:400px; FILTER: progid:DXImageTransform.Microsoft.dropShadow( Color=#CDCBCC,offX=7,offY=8,positive=true);"></div>');
// OTHER FUNCTIONS ABOVE