function stopError() {
  return true;
}

window.onerror = stopError;

// CALL TO CORRECT DIRECTORY BELOW - if you are on homepage you need <script> var homepage = "yes";</script> to make codework properly
var imgdir = "images/";
var imgdir = "../images/";
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://"
sitedir="http://"
securedir="http://"
homedir="http://"
}
else if(window.securepage)
{
imgdir="http://"
sitedir="http://"
securedir="http://"
homedir="http://"
}

// CALL TO CORRECT DIRECTORY ABOVE

// ROLLOVER CODE BELOW
function makeNavImage(name,width,height){
this.name_on="nav-" + name +"-on.gif";
this.name_off="nav-" + name +"-off.gif";
this.width=width;
this.height=height;
this.newimage_on = new Image(width,height);
this.newimage_on.src = imgdir + this.name_on;
this.newimage_off = new Image(width,height);
this.newimage_off.src = imgdir + this.name_off;
}

var nav_heights=23;

var navitems = new Array();
navitems["businessbanking"] = new makeNavImage("businessbanking",56,nav_heights);
navitems["onlineservices"] = new makeNavImage("onlineservices",76,nav_heights);
navitems["checking"] = new makeNavImage("checking",80,nav_heights);
navitems["savingsbusiness"] = new makeNavImage("savingsbusiness",120,nav_heights);
navitems["savings"] = new makeNavImage("savings",122,nav_heights);
navitems["loans&lines"] = new makeNavImage("loans&lines",120,nav_heights);
navitems["apply"] = new makeNavImage("apply",62,nav_heights);
navitems["businessresources"] = new makeNavImage("businessresources",62,nav_heights);
navitems["contact"] = new makeNavImage("contact",62,nav_heights);
function img_act(imgName){
document[imgName].src = navitems[imgName].newimage_on.src;
}

function img_inact(imgName){
window.status = "";
oM.mout();
document[imgName].src = navitems[imgName].newimage_off.src;
}
// ROLLOVER CODE ABOVE

// OTHER FUNCTIONS BELOW
  /****
  *useage: <a href="javascript:show_warning('http://');">Test Link</a>
  *
  *author:Erron Austin
  */
  function openLink(url){
/*  oM.mout();
	//content creation
	var content = new Array();
        var index = 0;
	content[index++] = '<h1>Third Party Site Disclaimer</h1>
<img src="../images/photo-iservices.jpg" width="160" height="200" alt="" align="right" class="contentPhoto" /><br />By accessing the noted link you will be leaving your financial institution\'s website and entering a website hosted by another party. Your financial institution 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 your financial institution\'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 your financial institution\'s.';
	content[index++] = '<br /><br /><br />';
	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);*/
	bWindow = window.open(url,'newWin');
	bWindow = null;
	return;
}
var posX = Math.ceil((parseInt(screen.width) - 350) / 2);
var posY = Math.ceil((parseInt(screen.height) - 400) / 2);
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; border: 2px solid #203A5D; padding: 15px; visibility: hidden; z-index: 300; width:350px;  top:'+posY+'px; left:'+posX+'px; FILTER: progid:DXImageTransform.Microsoft.dropShadow( Color=203A5D,offX=7,offY=8,positive=true); "></div>');


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 showCalc(calc){
openWin(calc,"calc",550,480,"resizable=1,scrollbars=1");
}

function open_apps(nameofapp){
    var issecure = nameofapp == "email_app" ? "" : "s";
    self.location.href = "http"+issecure+"" + nameofapp +"&onweb=true";
}

function openOnlineB(type){
    if(type == "reg"){
       window.open("https://hwt.usersonlnet.com/asp/USERS/Common/Login/NetLogin.asp");
    }
    else if(type == "pass"){
        window.open("https://hwt.usersonlnet.com/asp/USERS/Common/Login/NetLogin.asp");
    }
    else{
        window.open("https://hwt.usersonlnet.com/asp/USERS/Common/Login/NetLogin.asp");
    }
}
// OTHER FUNCTIONS ABOVE