
if(window.event + "" == "undefined") event = null;
//FOR COOLMENU BELOW
function showMenu(){return false};
function mout(){return false};
function dummyObject() {this.mout=mout};
oM = new dummyObject();
// FOR COOLMENU ABOVE

// CALL TO CORRECT DIRECTORY BELOW - if you are on homepage you need <script> var homepage = "yes";</script> to make codework properly

// Modified by BS on 6/16
var imgdir = "/Interactive/LookAndFeel/4076467/";
var sitedir = "http://www.eheritagebank.com/site/";
var securedir = "";
var homedir = "/";

//Commented out by BS on 6/16 becuase unecessary
/*
if(window.homepage)
{
imgdir="images/";
sitedir="site/";
securedir="site/";
homedir="";
}
else if(window.absolute)
{
imgdir="http://www.eheritagebank.com/images/"
sitedir="http://www.eheritagebank.com/site/"
securedir="http://www.eheritagebank.com/site/"
homedir="http://www.eheritagebank.com/"
}
else if(window.secure)
{
imgdir="http://www.eheritagebank.com/images/"
sitedir="http://www.eheritagebank.com/site/"
securedir="http://www.eheritagebank.com/site/"
homedir="http://www.eheritagebank.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=22;

var navitems = new Array();
navitems["online"] = new makeNavImage("online",104,nav_heights);
navitems["personal"] = new makeNavImage("personal",115,nav_heights);
navitems["commercial"] = new makeNavImage("commercial",134,nav_heights);
navitems["investment"] = new makeNavImage("investment",129,nav_heights);
navitems["about"] = new makeNavImage("about",71,nav_heights);
navitems["contact"] = new makeNavImage("contact",79,nav_heights);
navitems["sitemap"] = new makeNavImage("sitemap",65,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)?760:w;
h = (isNaN(h) || h==null)?350: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.eheritagebank.com/Forms/OnlineForm.cgi?form=" + nameofapp + "&onweb=true";
}

function goTo(url){
	self.location.href=sitedir+"disclaimer.html?"+url
}

function openIB(page){
	if(page=="signup"){
		openWin('https://www.eheritagebank.com/onlineserv/HB/OnlineForm.cgi?form=IB_enroll_app');
	} else if (page=="demo") {
		self.location.href=homedir+"index.html?demo";
	} else {
		self.location.href=homedir+"index.html";
	}
}

function openDemoWin(){
	demoWin=window.open("http://demo.netteller.com/eheritagebank/","demo", "resizable,scrollbars,toolbar,height=400,width=700");
	demoWin.focus();
}
// OTHER FUNCTIONS ABOVE
