window.onresize=resize;
function resize(){
self.location.href=self.location.href;
}

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> 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.ccbankonline.com/images/"
sitedir="http://www.ccbankonline.com/site/"
securedir="http://www.ccbankonline.com/site/"
homedir="http://www.ccbankonline.com/"
}
else if(window.securepage)
{
imgdir="https://www.ccbankonline.com/images/"
sitedir="http://www.ccbankonline.com/site/"
securedir="https://www.ccbankonline.com/site/"
homedir="http://www.ccbankonline.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["personal"] = new makeNavImage("personal",150,26);
navitems["business"] = new makeNavImage("business",158,26);
navitems["rates"] = new makeNavImage("rates",125,26);
navitems["contact"] = new makeNavImage("contact",127,26);

function img_act(imgName){
document[imgName].src = navitems[imgName].newimage_on.src;
}

function img_inact(imgName){
oM.mout();
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.ccbankonline.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 showWarning(url){
	//content creation
	var content = new Array();
        var index = 0;
	content[index++] = '<span class="header">Third Party Site Disclaimer</span><br>By accessing the noted link you will be leaving your financial institution\'s website and entering a website hosted by another party. Please be advised that you will no longer be subject to, or under the protection of, the privacy and security policies of your financial institution\'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 your financial institution\'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.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); //used to make sure that the end user sees the disclaimer.

}
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: center; position:absolute; margin:25% 25%; border: thin solid #146559; padding: 15px; visibility: hidden;z-index: 300; width:350px; FILTER: progid:DXImageTransform.Microsoft.dropShadow( Color=2D776C,offX=7,offY=8,positive=true); "></div>');


function showWarning2(url){
	//content creation
	var content = new Array();
        var index = 0;
	content[index++] = '<span style="text-align: left"><strong>Disclaimer</strong></span><br><span style="text-align: left;">Please note that by clicking on the "Continue" button below you are leaving the web site of Connecticut Community Bank, N.A.<br /><br />The link is to a web site that is not affiliated with the Bank. Your use of hyperlinks to web sites of others is at your own risk. The Bank has no control or responsibility for the products and services offered through another entity\'s web site. The Bank assumes no liability for the failure of any products or services to be delivered or to perform in accordance with any description or specification provided, or for the information provided on a linked web site.<br /><br />Please be advised that you will no longer be subject to, or under the protection of, the privacy and security policies of the Bank.  Other web site operators may collect information about you and use that information in accordance with their policies and procedures. If you have questions about another entity\'s use of your personal information, we encourage you to review that entity\'s privacy policies and/or ask that entity directly. The Bank is not responsible for another entity\'s use or protection of your information.</span>';
	content[index++] = '<br><br><br>';
	content[index++] = '<div align="center"><a href="javascript:void(\'0\');" onclick="window.open(\''+url+'\');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); //used to make sure that the end user sees the disclaimer.

}
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: center; position:absolute; margin:25% 25%; border: thin solid #146559; padding: 15px; visibility: hidden;z-index: 300; width:350px; FILTER: progid:DXImageTransform.Microsoft.dropShadow( Color=2D776C,offX=7,offY=8,positive=true); "></div>');

function msnMoneyPopup() {
    var content = new Array();
    var index = 0;
    
    content[index++] = '<p><strong>Please choose your product:</strong></p>';
    content[index++] = '<select onchange="showWarning(this.options[this.selectedIndex].value)">';
    content[index++] = '<option>-- Select One --</option>';
    content[index++] = '<option value="http://store.digitalriver.com/servlet/ControllerServlet?Action=AddItemToRequisition&Locale=en_US&SiteID=money&pgm=14043700&productID=85781900&Env=BASE&OfferID=335033709&clientPartnerExternalReferenceID=DINSIGHT">Essentials</option>'
    content[index++] = '<option value="http://store.digitalriver.com/servlet/ControllerServlet?Action=AddItemToRequisition&Locale=en_US&SiteID=money&pgm=14043700&productID=85782000&Env=BASE&OfferID=335033709&clientPartnerExternalReferenceID=DINSIGHT">Deluxe</option>'
    content[index++] = '<option value="http://store.digitalriver.com/servlet/ControllerServlet?Action=AddItemToRequisition&Locale=en_US&SiteID=money&pgm=14043700&productID=85782100&Env=BASE&OfferID=335033709&clientPartnerExternalReferenceID=DINSIGHT">Premium</option>'
    content[index++] = '<option value="http://store.digitalriver.com/servlet/ControllerServlet?Action=AddItemToRequisition&Locale=en_US&SiteID=money&pgm=14043700&productID=85781800&Env=BASE&OfferID=335033709&clientPartnerExternalReferenceID=DINSIGHT">Home & Biz</option>'
    content[index++] = '</select>';
    
    content[index++] = '<br /><br />';
    
    content[index++] = '<div align="center"><a href="javascript:void(\'0\');" onclick="document.getElementById(\'ex_dis\').style.visibility = \'hidden\'">Cancel</a></div></div>';	
    
    document.getElementById("ex_dis").innerHTML = content.join("");
    document.getElementById("ex_dis").style.visibility = "visible";
}

// OTHER FUNCTIONS ABOVE
