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


// 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.twsbank.com/images/"
sitedir="http://www.twsbank.com/site/"
securedir="http://www.twsbank.com/site/"
homedir="http://www.twsbank.com/"
}
else if(window.securepage)
{
imgdir="https://www.twsbank.com/images/"
sitedir="http://www.twsbank.com/site/"
securedir="https://www.twsbank.com/site/"
homedir="http://www.twsbank.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 Trego-WaKeeney State Bank's website and entering a website hosted by another party. Trego-WaKeeney State Bank 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 Trego-WaKeeney State Bank'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 Trego-WaKeeney State Bank.";
	
	content[index++] = "<br /><br /><br />";
	
	content[index++] = "<div align=\"center\"><a href='"+url+"' 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>');

 

function comingSoon(link){

var content = new Array();

	var index = 0;
	
	
	
	content[index++] = "<h2>Coming Soon</h2>You have attempted to access " + link + " on Trego-WaKeeney State Bank'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 #1A448E; 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 #1A448E; padding: 15px; display: none; z-index: 3000; width:350px;"></div>');

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