window.onerror = function(){ return true; }

if(window.event + "" == "undefined") event = null;
// FOR HM_MENU BELOW
function HM_f_PopUp(){return false};
function HM_f_PopDown(){return false};
popUp = HM_f_PopUp;
popDown = HM_f_PopDown;
//FOR HM_MENU ABOVE
//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 language="JavaScript"> var homepage = "yes";</script> to make codework properly
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.myalliancebank.com/images/"
sitedir="http://www.myalliancebank.com/site/"
securedir="http://www.myalliancebank.com/site/"
homedir="http://www.myalliancebank.com/"
}
else if(window.securepage)
{
imgdir="https://www.myalliancebank.com/images/"
sitedir="http://www.myalliancebank.com/site/"
securedir="https://www.myalliancebank.com/site/"
homedir="http://www.myalliancebank.com/"
}
// CALL TO CORRECT DIRECTORY ABOVE

// ROLLOVER CODE BELOW
// 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 swapHome(myImage) {
divContent = "";
imgSrc = "";
lnkSrc = "";

imgSrc = "<img src=\"fiFiles/static/images/"+myImage+"\" width=\"290\" height=\"244\" alt=\"Where People Come First\" />";


divContent = imgSrc;
    

document.getElementById("key1").innerHTML = divContent;
document.getElementById("key1").style.display = "block";

}


function showCalc(calc){
openWin(calc,"calc",550,480,"resizable=1,scrollbars=1");
}

function open_apps(nameofapp){
location.href = ('https://www.myalliancebank.com/Forms/OnlineForm.cgi?form=' + nameofapp + '&onweb=true');
//openWin("https://www.myalliancebank.com/Forms/OnlineForm.cgi?form=" + nameofapp,"application",700,600,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,status=1");
}
/************************************************************************************************************
* This function is used in the onclick of the a tag to display the external site warning. 
* @param msg - Integer specifying the which message to display.
* @param lk - The a link object
* Usage: <a href="http://wwww.mysite.com" onclick="return displayThirdPartyAlert(1,this);">My Site</a>
**************************************************************************************************************/
function displayThirdPartyAlert(msg,lk){
	var description = lk.innerHTML;
	if(description.indexOf('alt="') != -1){
		var x = description.indexOf('alt="')+5;
		var temp = description.substring(x);
		description = temp.substring(0,temp.indexOf("\""));
	}
	showWarning(lk.href, description, lk.target, msg)
	return false;
}

/************************************************************************************************************
* This function is used in the href of the a tag to display the external site warning. 
* @param lk - The url of the site to be opened
* @param desc - The description of the site to be opened, i.e. the name of the site.
* @param target - Allows for the window to opened in a new window
* @param msg - Integer specifying the which message to display.
* Usage: <a href="javascript:('http://wwww.mysite.com');">My Site</a>
**************************************************************************************************************/
function showWarning(lk, desc, target, msg){
	desc = (desc) ? desc : "Third Party Site";
	target = (target) ? target : "";
	msg = (msg) ? msg : 0;
	
	if (msg == "") {
	dslk = "This Third Party Site";
	} else {
	dslk = lk;
	}
	
	var messages = new Array(6);
	
	messages[0] = '<h2>Third Party Site Disclaimer</h2><br/>By continuing you will be leaving the main Alliance Bank website. Even though you may have clicked on a link that takes you to another company\'s site that we have partnered with, we are not responsible for the accuracy, security, or content of their website. We encourage you to view privacy and security disclosures of all websites you visit.';
	
	messages[1] = '<h2>Third Party Site Disclaimer</h2><br/>By continuing you will be leaving the main Alliance Bank website. Even though you may have clicked on a link that takes you to another company\'s site that we have partnered with, we are not responsible for the accuracy, security, or content of their website. We encourage you to view privacy and security disclosures of all websites you visit.';
	
	messages[2] = '<h2>Third Party Site Disclaimer</h2><br/>By continuing you will be leaving the main Alliance Bank website. Even though you may have clicked on a link that takes you to another company\'s site that we have partnered with, we are not responsible for the accuracy, security, or content of their website. We encourage you to view privacy and security disclosures of all websites you visit.';
	
	messages[3] = '<h2>Third Party Site Disclaimer</h2><br/>By continuing you will be leaving the main Alliance Bank website. Even though you may have clicked on a link that takes you to another company\'s site that we have partnered with, we are not responsible for the accuracy, security, or content of their website. We encourage you to view privacy and security disclosures of all websites you visit.';
	
	messages[4] = '<h2>Third Party Site Disclaimer</h2><br/>By continuing you will be leaving the main Alliance Bank website. Even though you may have clicked on a link that takes you to another company\'s site that we have partnered with, we are not responsible for the accuracy, security, or content of their website. We encourage you to view privacy and security disclosures of all websites you visit.';
	
	messages[5] = '<h2>Non-Secure Email Disclaimer</h2><br/>As a convenience to you and to provide additional means of communications between you and Alliance Bank, you can use electronic mail (e-mail) to contact the bank regarding general inquiries and general access and maintenance issues. However communication via e-mail is not considered secure, and you agree that you will not use e-mail to transmit sensitive and/or confidential information such as account numbers, user IDs, or PINs, or to request or authorize any financial transaction.';
	
	var content = new Array();
	var index = 0;
	content[index++] = messages[msg];
	content[index++] = '<br /><br /><br />';
	content[index++] = '<div align="center"><a href="'+lk+'" target="'+target+'" onclick="document.getElementById(\'ex_dis\').style.display = \'none\'">Continue</a>&#160;&#160;<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 #12703E; padding: 15px; display: none; z-index: 3000; width:350px;"></div>');
// OTHER FUNCTIONS ABOVE
