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

var navitems = new Array();
navitems["onlineservices"] = new makeNavImage("onlineservices",91,nav_heights);
navitems["personalbanking"] = new makeNavImage("personalbanking",104,nav_heights);
navitems["commercialbanking"] = new makeNavImage("commercialbanking",120,nav_heights);
navitems["cashmanagement"] = new makeNavImage("cashmanagement",157,nav_heights);
navitems["calculators"] = new makeNavImage("calculators",74,nav_heights);

function img_act(imgName){
document[imgName].src = navitems[imgName].newimage_on.src;
}

function img_inact(imgName){
window.status = "";
document[imgName].src = navitems[imgName].newimage_off.src;
}
// ROLLOVER CODE ABOVE

// OTHER FUNCTIONS BELOW
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 open_apps(nameofapp){
self.location.href = "https://www.triadbanking.com/Forms/OnlineForm.cgi?onweb=true&form=" + nameofapp;
}

function openIB(page){
/*if (page=="demo") self.location.href = homedir+"index.html?demo";
else self.location.href = homedir+"index.html";*/

if (page=="demo") self.location.href = "https://www.triadbanking.com/onlineserv/HB/demo.html";
else self.location.href = "https://www.triadbanking.com/onlineserv/HB/";

//if (page=="demo") openWin("https://www.triadbanking.com/onlineserv/HB/demo.html");
//else openWin("https://www.triadbanking.com/onlineserv/HB/")
}
function openCM(page){

if (page=="demo") self.location.href = "http://www.cmdemo.com/customer_demo/index.html";
else self.location.href = "https://www.triadbanking.com/onlineserv/CM/";

}

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 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.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 #1A448E; padding: 15px; display: none; z-index: 3000; width:350px;"></div>');
// OTHER FUNCTIONS ABOVE


/*::::::::::::::::::       EMAIL WARNING        :::::::::::::::::::::::::::*/




function show_email_warning(email)
{
var content = new Array();
var index = 0;
content[index++] = "<h2>E-mail Security Warning</h2><br>This warning is intended as a notification that this e-mail address is not secure. It is recommended that private or secure information not be sent thru e-mail. Our financial institution will not be held responsible for information transmitted thru this web address.";
content[index++] = "<br /><br /><br />";
content[index++] = "<div align=\"center\"><a href=\"mailto:"+email+"\" 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 #1A448E; padding: 15px; display: none; z-index: 3000; width:350px;"></div>');
// OTHER FUNCTIONS ABOVE
//
//
// Includes
//
//  make Footer()
function makeFooter() {
	var footerArray = "";
	footerArray +=		'<div class="footer">';
	footerArray +=		'<div class="footerRight">';
	footerArray +=		'<a href="'+sitedir+'disclosures.html" style="font-weight: bold; color: #dddddd;text-decoration: none;">Policy/Disclosures</a><br />';
	footerArray +=		'<img src="'+imgdir+'/footer-address.gif" id="footer_address" width="249" height="14" alt="2030 Altom Court, St Louis Missouri, 62146" border="0" /></div><!--close footerRight-->';
	footerArray +=		'<a href="javascript:showWarning(\'http://www.digitalinsight.com\');" class="di_logo"><!--[if lt IE 7]><script type="text/javascript" src="https://www.triadbanking.com/mstinc/web/js/png.js"></script><![endif]--><img src="https://www.triadbanking.com/mstinc/web/images/di_91x22_1c_w.png" width="91" height="22" border="0" class="footerLogo" alt="Digital Insight, an Intuit company" /></a>';
	footerArray +=		'<a href="javascript:showWarning(\'http://www.hud.gov\');" class="ehl_logo"><img src="'+imgdir+'/footer-ehl.gif" width="40" height="35" alt="equal housing lender" class="footerLogo" border="0" /></a> <a href="javascript:showWarning(\'http://www.fdic.gov\');" class="fdic_logo"><img src="'+imgdir+'/footer-fdic.gif" width="74" height="25" alt="fdic insured" class="footerLogo" border="0" /></a>';
	footerArray +=		'</div><!--close footer-->';

	document.write(footerArray);
}

