/*
window.onresize=resize;
function resize(){
self.location.href=self.location.href;
}
*/
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
var imgdir = "../images/";
var sitedir = "";
var securedir = "";
var homedir = "../";
if(window.homepage)
{
imgdir="images/";
sitedir="site/";
securedir="site/";
homedir="";
}
else if(window.absolute)
{
imgdir="http://www.atholsb.com/images/"
sitedir="http://www.atholsb.com/site/"
securedir="http://www.atholsb.com/site/"
homedir="http://www.atholsb.com/"
}
else if(window.secure)
{
imgdir="https://www.atholsb.com/images/"
sitedir="http://www.atholsb.com/site/"
securedir="https://www.atholsb.com/site/"
homedir="http://www.atholsb.com/"
}
else if(window.calculators)
{
var imgdir = "../images/";
var sitedir = "../site/";
var securedir = "../site/";
var homedir = "../";
}
// 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["busbkg"] = new makeNavImage("busbkg",135,29);
navitems["eforms"] = new makeNavImage("eforms",59,29);
navitems["loans"] = new makeNavImage("loans",44,29);
navitems["persbkg"] = new makeNavImage("persbkg",141,29);
navitems["rates"] = new makeNavImage("rates",40,29);
navitems["serv"] = new makeNavImage("serv",115,29);

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)?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_discl(nameofdiscl){
	openWin(sitedir+nameofdiscl);
}

function open_apps(nameofapp){
	alert("Coming Soon!");
}

function open_pdf(nameofapp){
	openWin(sitedir+nameofapp+".pdf");
}

function warning(url){
	self.location.href=sitedir+"disclaimer.html?"+url
}

function showEmailWarning(email)
{
	var content = new Array();
	var index = 0;
	content[index++]	=	'<p style="color: red"><strong>We ask that you please</strong></p>';
	content[index++]	=	'<p style="color: red"><strong>do not</strong></p>';
	content[index++]	=	'<p style="color: red"><strong>send confidential information to us via email.</strong></p>';

	content[index++]	=	'<p><strong>E-mail is not necessarily secure against interception.</strong></p>';

	content[index++]	=	'<p>If your communication is very sensitive, or includes personal information such as</p>';
	content[index++]	=	'<p>account numbers, social security numbers, Login IDs, Passwords, or balance information,</p>';
	content[index++]	=	'<p>we suggest you call us at 978-249-3200 or toll free 888-830-3200</p>';
	
	content[index++]	=	'<p><a href="mailto:' + email + '">Continue</a> | <a href="#" onClick="javascript: document.getElementById(\'emailWarningDiv\').style.visibility = \'hidden\';">Decline</a></p>';

	document.getElementById("emailWarningDiv").innerHTML = content.join("");
	document.getElementById("emailWarningDiv").style.visibility = "visible";
}

function proceed(){
	var url = self.location.search.substring(1,self.location.search.length);
	if(url.indexOf('sbli.com')!=-1)
		self.location.href="http://www.sbli.com/partner_athol";
	else {
		openWin(url,'thirdParty','toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,status=1');
		history.go(-1);
	}
}

function openIB(page){
	if(page=="register"){
		openWin(homedir+"registrationDemoCheck.html");
	} else if (page=="demo") {
		self.location.href=homedir+"index.html?demo";
	} else {
		self.location.href=homedir+"index.html";
	}
}

function openCM(){
	alert("Coming Soon!");
}

function kids(){
	openWin(sitedir+"kids.html",null,800,520,null);
}
// OTHER FUNCTIONS ABOVE