/*
META TAGS CONTENT AND DESCRIPTION BELOW
META TAGS CONTENT AND DESCRIPTION BELOW
META TAGS CONTENT AND DESCRIPTION BELOW
*/
document.write('<meta name="keywords" content="St. John National Bank, Bank, sjnbsjonline, 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.sjnbsjonline.com/images/"
sitedir="http://www.sjnbsjonline.com/site/"
securedir="http://www.sjnbsjonline.com/site/"
homedir="http://www.sjnbsjonline.com/"
}
else if(window.securepage)
{
imgdir="https://www.sjnbsjonline.com/images/"
sitedir="http://www.sjnbsjonline.com/site/"
securedir="https://www.sjnbsjonline.com/site/"
homedir="http://www.sjnbsjonline.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";
home_on = new Image(60,26);
home_on.src = imgdir + "nav-home-on.gif";

home_off = new Image(60,26);
home_off.src = imgdir + "nav-home-off.gif";

about_on = new Image(79,26);
about_on.src = imgdir + "nav-about-on.gif";

about_off = new Image(79,26);
about_off.src = imgdir + "nav-about-off.gif";

contact_on = new Image(84,26);
contact_on.src = imgdir + "nav-contact-on.gif";

contact_off = new Image(84,26);
contact_off.src = imgdir + "nav-contact-off.gif";

privacy_on = new Image(70,26);
privacy_on.src = imgdir + "nav-privacy-on.gif";

privacy_off = new Image(70,26);
privacy_off.src = imgdir + "nav-privacy-off.gif";

rates_on = new Image(55,26);
rates_on.src = imgdir + "nav-rates-on.gif";

rates_off = new Image(55,26);
rates_off.src = imgdir + "nav-rates-off.gif";

login_on = new Image(128,27);
login_on.src = imgdir + "nav-login-on.gif";

login_off = new Image(128,27);
login_off.src = imgdir + "nav-login-off.gif";

whatsnew_on = new Image(128,26);
whatsnew_on.src = imgdir + "nav-shop-on.gif";

whatsnew_off = new Image(128,26);
whatsnew_off.src = imgdir + "nav-shop-off.gif";

kidspage_on = new Image(128,26);
kidspage_on.src = imgdir + "nav-kidspage-on.gif";

kidspage_off = new Image(128,26);
kidspage_off.src = imgdir + "nav-kidspage-off.gif";

products_on = new Image(128,26);
products_on.src = imgdir + "nav-products-on.gif";

products_off = new Image(128,26);
products_off.src = imgdir + "nav-products-off.gif";

school_on = new Image(128,26);
school_on.src = imgdir + "nav-school-on.gif";

school_off = new Image(128,26);
school_off.src = imgdir + "nav-school-off.gif";

calendar_on = new Image(128,26);
calendar_on.src = imgdir + "nav-calendar-on.gif";

calendar_off = new Image(128,26);
calendar_off.src = imgdir + "nav-calendar-off.gif";

investments_on = new Image(128,39);
investments_on.src = imgdir + "nav-investments-on.gif";

investments_off = new Image(128,39);
investments_off.src = imgdir + "nav-investments-off.gif";

employ_on = new Image(128,39);
employ_on.src = imgdir + "nav-eo-on.gif";

employ_off = new Image(128,39);
employ_off.src = imgdir + "nav-eo-off.gif";

keyin_on = new Image(124,108);
keyin_on.src = imgdir + "nav-keyin-on.gif";

keyin_off = new Image(124,108);
keyin_off.src = imgdir + "nav-keyin-off.gif";

financial_on = new Image(128,26);
financial_on.src = imgdir + "nav-financial-on.gif";

financial_off = new Image(128,26);
financial_off.src = imgdir + "nav-financial-off.gif";

mystery_on = new Image(128,27);
mystery_on.src = imgdir + "nav-mystery-on.gif";

mystery_off = new Image(128,27);
mystery_off.src = imgdir + "nav-mystery-off.gif";

idprotector_on = new Image(128,26);
idprotector_on.src = imgdir + "nav-idprotector-on.gif";

idprotector_off = new Image(128,26);
idprotector_off.src = imgdir + "nav-idprotector-off.gif";

apply_on = new Image(82,23);
apply_on.src = imgdir + "nav-apply-on.gif";

apply_off = new Image(82,23);
apply_off.src = imgdir + "nav-apply-off.gif";

backtotop_on = new Image(82,23);
backtotop_on.src = imgdir + "nav-backtotop-on.gif";

backtotop_off = new Image(82,23);
backtotop_off.src = imgdir + "nav-backtotop-off.gif";

atm_on = new Image(82,23);
atm_on.src = imgdir + "nav-instakeyATM-on.gif";

atm_off = new Image(82,23);
atm_off.src = imgdir + "nav-instakeyATM-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
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)
aWindow = window.open('https://www.sjnbsjonline2.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 open_depositapp()
{
var pWidth = ( ((parseInt(screen.width) / 2)) - 350)
var pHeight = (((parseInt(screen.height) / 2)) - 300)
aWindow = window.open('https://www.sjnbsjonline2.com/Forms/OnlineForm.cgi?form=deposit_app&term1='+remove(entry0.value[2][0])+'&rate1='+remove(entry0.value[2][1])+'&apy1='+remove(entry0.value[2][2])+'&term2='+remove(entry0.value[3][0])+'&rate2='+remove(entry0.value[3][1])+'&apy2='+remove(entry0.value[3][2])+'&term3='+remove(entry0.value[4][0])+'&rate3='+remove(entry0.value[4][1])+'&apy3='+remove(entry0.value[4][2])+'&term4='+remove(entry0.value[5][0])+'&rate4='+remove(entry0.value[5][1])+'&apy4='+remove(entry0.value[5][2]),'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 open_puzzle(puzzle)
{
var pWidth = ( ((parseInt(screen.width) / 2)) - 350)
var pHeight = (((parseInt(screen.height) / 2)) - 300)
aWindow = window.open(puzzle,'game',"toolbar=0,location=0,directories=0,status=0,menubar=0,width=675,height=600,top=" + pHeight + ",left=" + pWidth + ",scrollbars=1,resizable=1,status=1");
}

function remove(string){
    var new_string = "";
    for(i=0;i<string.length;i++){
     if(string.charAt(i)=="%" || string.charAt(i)==" "){        
        if(string.charAt(i)=="%"){
            new_string += "";
        }
        else{
            new_string += "_";
        }     
     }
     else{
        new_string += string.charAt(i);
     }
    }
    
    return new_string;
}



function showWarning(url){
	//content creation
	var content = new Array();
        var index = 0;
	content[index++] = '<span class="header">Third Party Site Disclaimer</span><br /><br />Please be advised the website you are about to enter is not owned or controlled by us. St. John National Bank is not responsible for the availability or content of this site; we do not represent any parties if a transaction is entered into. Please take note that privacy and security policies may differ from those of St. John National Bank.';
	content[index++] = '<br /><br /><br />';
	content[index++] = '<div align="center"><a href="'+url+'">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); //used to make sure that the end user sees the disclaimer.

}
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: center; position:absolute; margin:25% 25%; border: thin solid #89162e; padding: 15px; visibility: hidden;z-index: 300; width:350px; FILTER: progid:DXImageTransform.Microsoft.dropShadow( Color=89162e,offX=2,offY=3,positive=true); "></div>');