/* window.onresize=resize;
function resize(){
self.location.href=self.location.href;
} */

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.bankofgc.com/images/"
sitedir="http://www.bankofgc.com/site/"
securedir="http://www.bankofgc.com/site/"
homedir="http://www.bankofgc.com/"
}
else if(window.securepage)
{
imgdir="https://www.bankofgc.com/images/"
sitedir="http://www.bankofgc.com/site/"
securedir="https://www.bankofgc.com/site/"
homedir="http://www.bankofgc.com/"
}
// CALL TO CORRECT DIRECTORY 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.bankofgc.com/Forms/OnlineForm.cgi?onweb=true&form=" + nameofapp;
}

function openIB(page){
if (page=="demo") self.location.href = homedir+"index.html?demo";
else if (page == "reg") openWin('https://www.bankofgc.com/onlineserv/HB/STDReg.cgi?STDRegStep1=yes&runmode=REGISTRATION', 'regWin', 800, 600, 'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=0');
else if (page == "resetPW") openWin('https://www.bankofgc.com/onlineserv/HB/ForgottenPW.html', 'resetPWWin', 800, 600, 'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=0');
else self.location.href = homedir+"index.html";
//if (page=="demo") openWin("https://www.bankofgc.com/onlineserv/HB/demo.html");
//else openWin("https://www.bankofgc.com/onlineserv/HB/")
}

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 Bank of Gibson City's website and entering a website hosted by another party. Bank of Gibson City 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 Bank of Gibson City'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 Bank of Gibson City's.";
content[index++] = "<br /><br /><br />";
content[index++] = "<div align=\"center\"><a href=\"" +url+"\" onclick=\"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);
}


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('ex_dis').style.visibility = 'hidden'\">Continue</a>  <a href=\"#\" 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);

}


function checkSize()
{
    var myWidth = 800;
	if( typeof( window.innerWidth ) == 'number' )
	{
		//Non-IE
		myWidth = window.innerWidth;
	}
	else if( document.documentElement && ( document.documentElement.clientWidth ) )
	{
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
	}
	else if( document.body && ( document.body.clientWidth ) )
	{
		//IE 4 compatible
		myWidth = document.body.clientWidth;
	}
    return myWidth;
}

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:' + (parseInt(checkSize()/2)-175) + 'px; border: thin solid #1A448E; padding: 15px; visibility: hidden; z-index: 100000; width:350px;"></div>');

// ---------------------------------------------------------------------------------------

function onlineBankingInfoBox()
{
	document.write('<sel' + 'ect name="onlineBankingInfo" onchange="if (this.value != \'\') document.location.href = this.value;" style="margin-top: 12px; width: 147px;">');
	document.write('<option value="">Online Banking Info...</option>');
	document.write('<option value="javascript:alert(\'Coming Soon\');">Temp Option 1</option>');
	document.write('<option value="javascript:alert(\'Coming Soon\');">Temp Option 2</option>');
	document.write('<option value="javascript:alert(\'Coming Soon\');">Temp Option 3</option>');
	document.write('</sel' + 'ect>');
}

// OTHER FUNCTIONS ABOVE
