// 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.absolutepage)
{
imgdir="http://www.mca-bank.com/images/"
sitedir="http://www.mca-bank.com/site/"
securedir="http://www.mca-bank.com/site/"
homedir="http://www.mca-bank.com/"
}
else if(window.securepage)
{
imgdir="https://www.mca-bank.com/images/"
sitedir="http://www.mca-bank.com/site/"
securedir="https://www.mca-bank.com/site/"
homedir="http://www.mca-bank.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_widths=150;
var nav_heights=26;

var navitems = new Array();
navitems["products"] = new makeNavImage("products",nav_widths,nav_heights);
navitems["checking"] = new makeNavImage("checking",nav_widths,nav_heights);
navitems["savings"] = new makeNavImage("savings",nav_widths,nav_heights);
navitems["loans"] = new makeNavImage("loans",nav_widths,nav_heights);
navitems["calculators"] = new makeNavImage("calculators",nav_widths,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)?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 showCalc(calc){
openWin(calc,"calc",550,480,"resizable=1,scrollbars=1");
}

function open_apps(nameofapp){
openWin("https://www.mca-bank.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");
}

function openIB(f){
    if(f == "demo"){
        self.location.href = "https://www.mcs-bank.com/?demo";
    }
    else{
        self.location.href = "https://www.mcs-bank.com/";
    }
}



  function showWarning(url,lk){
	//content creation
	var content = new Array();
        var index = 0;
	content[index++] = '<h2>Third Party Site Disclaimer</h2><br/>MCS Bank has no control over information at any site hyperlinked to or from this Site.  MCS Bank makes no representation concerning and is not responsible for the quality, content, nature, or reliability of any hyperlinked site and is providing the hyperlink to you only as a convenience.  The inclusion of any hyperlink on this Site does not imply any endorsement, investigation, verification or monitoring by MCS Bank of the information contained in the hyperlinked site.  In no event shall MCS Bank be responsible for your use of a hyperlinked site.';
	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);
}
var posX = Math.ceil((parseInt(screen.width) - 400) / 2);
document.write('<div id="ex_dis" style="background-color: #ffffff; font-size: 8pt; font-weight: normal; color: #000000; text-align: left; position:absolute; border: 2px solid #003399; padding: 15px; visibility: hidden; z-index: 300; width:350px;  top:150px; left:'+posX+'px; FILTER: progid:DXImageTransform.Microsoft.dropShadow( Color=99CCFF,offX=7,offY=8,positive=true); "></div>');




var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
var mydate=new Date();
var year=mydate.getYear()
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var netdate= dayarray[day]+', '+montharray[month]+' '+daym+', '+year;    

