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.hcsbankonline.com/images/"
sitedir="http://www.hcsbankonline.com/site/"
securedir="http://www.hcsbankonline.com/site/"
homedir="http://www.hcsbankonline.com/"
}
else if(window.securepage)
{
imgdir="https://www.hcsbankonline.com/images/"
sitedir="http://www.hcsbankonline.com/site/"
securedir="https://www.hcsbankonline.com/site/"
homedir="http://www.hcsbankonline.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 navitems = new Array();
navitems["home"] = new makeNavImage("home",29,16);
navitems["privacy"] = new makeNavImage("privacy",72,16);
navitems["security"] = new makeNavImage("security",42,16);
navitems["help"] = new makeNavImage("help",23,16);
navitems["products"] = new makeNavImage("products",168,24);
navitems["rates"] = new makeNavImage("rates",168,24);
navitems["contact"] = new makeNavImage("contact",168,24);
navitems["aboutus"] = new makeNavImage("aboutus",168,24);
navitems["links"] = new makeNavImage("links",168,24);

function img_act(imgName)
{
//alert(imgName + "\n\nCurrent: " + document[imgName].src + "\nNew: " + navitems[imgName].newimage_on.src);

	if (document.images)
	{
		document.images[imgName].src = navitems[imgName].newimage_on.src;
	}
	else
	{
		document[imgName].src = navitems[imgName].newimage_on.src;
	}
}

function img_inact(imgName)
{
window.status = "";
//alert(imgName + "\n\nCurrent: " + document[imgName].src + "\nNew: " + navitems[imgName].newimage_off.src);

	if (document.images)
	{
		document.images[imgName].src = navitems[imgName].newimage_off.src;
	}
	else
	{
		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.hcsbankonline.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") openWin("https://www.hcsbankonline.com/onlineserv/HB/demo.html");
//else openWin("https://www.hcsbankonline.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 Hancock County Savings Bank's website and entering a website hosted by another party. Hancock County Savings 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 Hancock County Savings 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 Hancock County Savings Bank'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>&nbsp;&nbsp;<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);
}

function emailWarning(url){
var content = new Array();
var index = 0;
content[index++] = "<h2>Non-Secure Email Warning</h2><br/>This is <strong>NOT</strong> a secure e-mail, please do <strong>not</strong> include personal/financial information such as your Social Security Number or account numbers in this e-mail.";
content[index++] = "<br /><br /><br />";
content[index++] = "<div align=\"center\"><a href=\""+url+"\" onclick=\"document.getElementById('ex_dis').style.display = 'none'\">Continue</a>&nbsp;&nbsp;<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);
}

function registrationMessage(){
var content = new Array();
var index = 0;
content[index++] = "<h2>Internet Banking Registration</h2><p>If you would like to access your accounts through our Online Banking system, please stop by one of our branch offices located in Chester, New Cumberland or Weirton.</p>";
content[index++] = "<!--p>Our Online Bill-Pay service is free for the first three months.  After that time, you will be charged a nominal service fee of $4.95 per month.</p--><p>For additional details about this product, please talk with one of our Customer Service representatives when you register for Online Banking.</p>";
content[index++] = "<br /><br /><br />";
content[index++] = "<div align=\"center\"><a href=\"javascript:void('0');\" onclick=\"document.getElementById('ex_dis').style.display = 'none'\">Close</a></div></div>";	
document.getElementById("ex_dis").innerHTML = content.join("");
document.getElementById("ex_dis").style.display = "block";
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; display: none; z-index: 100000; width:350px;"></div>');
// OTHER FUNCTIONS ABOVE
// OTHER FUNCTIONS ABOVE
