oM=new makeCM("oM"); 
oM.resizeCheck=1; 
oM.rows=1;  
oM.onlineRoot=""
oM.offlineRoot=""
oM.pxBetween=0; 
oM.fillImg=imgdir+"cm_fill.gif"; 
oM.fromTop=0; 
oM.fromLeft=0; 
oM.wait=300; 
oM.zIndex=400;
oM.useBar=0; 
oM.barWidth="0"; 
oM.barHeight="menu"; 
oM.barX=0;
oM.barY="menu"; 
oM.barClass="clBar";
oM.barBorderX=0; 
oM.barBorderY=0;

//oM.level[0]=new cm_makeLevel(width,height,regClass,overClass,borderX,borderY,borderClass,rows,align,offsetX,offsetY,arrow,arrowWidth,arrowHeight)
oM.level[0]=new cm_makeLevel(0,0,"clT","clTover",0,0,"clB",0,"bottom",0,0,0,0,0);
//oM.level[0].filter="progid:DXImageTransform.Microsoft.Fade(duration=0.5)" 
oM.level[1]=new cm_makeLevel(175,25,"clS","clSover",1,1,"clB",0,"right",0,0,imgdir+"menu_arrow.gif",8,8);

var myimages=new Array()
var offimages = new Array();
var onimages = new Array();
function preloadimages(){
for (i=0;i<preloadimages.arguments.length;i++){
offimages[i]=new Image()
offimages[i].src=imgdir+"dhtml/"+preloadimages.arguments[i]+".gif";
onimages[i]=new Image()
onimages[i].src=imgdir+"dhtml/"+preloadimages.arguments[i]+"_on.gif";
}
}
preloadimages("online_login","online_demo","online_more","product_checking","product_savings","product_consumer","product_new","product_calculators","rate_deposit","rate_cd","rate_loan","about_history","about_board","about_locations","about_financial","about_privacy","help_internet","help_billpay","help_security","help_contactus");
/******************************************
Menu item creation:
myCoolMenu.makeMenu(name, parent_name, text, link, target, width, height, regImage, overImage, regClass, overClass , align, rows, nolink, onclick, onmouseover, onmouseout) 
*************************************/
oM.makeMenu('menu1');
	oM.makeMenu('menu1_1','menu1','','javascript:openIB();','_self',196,21,offimages[0].src,onimages[0].src);
	oM.makeMenu('menu1_2','menu1','','javascript:openIB("demo");','_self',196,21,offimages[1].src,onimages[1].src);
	oM.makeMenu('menu1_3','menu1','',sitedir+'more.html','_self',196,21,offimages[2].src,onimages[2].src);
oM.makeMenu('menu2');
	oM.makeMenu('menu2_1','menu2','',sitedir+'products_checking.html','_self',196,21,offimages[3].src,onimages[3].src);
	oM.makeMenu('menu2_2','menu2','',sitedir+'products_savings.html','_self',196,21,offimages[4].src,onimages[4].src);
	oM.makeMenu('menu2_3','menu2','',sitedir+'products_loans.html','_self',196,21,offimages[5].src,onimages[5].src);
	oM.makeMenu('menu2_4','menu2','','javascript:getWorksheet();','_self',196,21,offimages[6].src,onimages[6].src);
	oM.makeMenu('menu2_5','menu2','',sitedir+'calculators.html','_self',196,21,offimages[7].src,onimages[7].src);	
oM.makeMenu('menu3');
	oM.makeMenu('menu3_1','menu3','',sitedir+'rates_personal.html','_self',196,21,offimages[8].src,onimages[8].src);
	oM.makeMenu('menu3_2','menu3','',sitedir+'rates_cd.html','_self',196,21,offimages[9].src,onimages[9].src);
	oM.makeMenu('menu3_3','menu3','',sitedir+'rates_loan.html','_self',196,21,offimages[10].src,onimages[10].src);
oM.makeMenu('menu4');
	oM.makeMenu('menu4_1','menu4','',sitedir+'about_history.html','_self',196,21,offimages[11].src,onimages[11].src);
	oM.makeMenu('menu4_2','menu4','',sitedir+'about_officers.html','_self',196,21,offimages[12].src,onimages[12].src);
	oM.makeMenu('menu4_3','menu4','',sitedir+"about_locations.html",'_self',196,21,offimages[13].src,onimages[13].src);
	oM.makeMenu('menu4_4','menu4','',sitedir+"about_financial.html",'_self',196,21,offimages[14].src,onimages[14].src);
	oM.makeMenu('menu4_5','menu4','',sitedir+"about_privacy.html",'_self',196,21,offimages[15].src,onimages[15].src);
oM.makeMenu('menu5');
	oM.makeMenu('menu5_1','menu5','',sitedir+'help_internetbanking.html','_self',196,21,offimages[16].src,onimages[16].src);
	oM.makeMenu('menu5_2','menu5','',sitedir+'help_billpay.html','_self',196,21,offimages[17].src,onimages[17].src);
	oM.makeMenu('menu5_3','menu5','',sitedir+'help_securitytips.html','_self',196,21,offimages[18].src,onimages[18].src);
	oM.makeMenu('menu5_4','menu5','','javascript:open_apps("email_app");','_self',196,21,offimages[19].src,onimages[19].src);
oM.menuPlacement=new Array(0);
oM.construct();

function FindPosition(image_name){
    if(!document.images[image_name]){
        return null;
    }
    this.image_name = image_name;
    this.xPos = 500;
    this.yPos = 500;
    this.ref_image = document.images[image_name];
    this.getRealLeft = getRealLeft;
    this.getRealTop = getRealTop;
    this.getRealLeft();
    this.getRealTop();
}

function getRealLeft(move) {
   if(!move){
        move = 0;
    }
   if(document.layers){
     this.xPos = this.ref_image.x + move;    
     return this.xPos;
   }
	this.xPos = this.ref_image.offsetLeft;
	tempEl = this.ref_image.offsetParent;
  	while (tempEl != null) {
  		this.xPos += tempEl.offsetLeft;
  		tempEl = tempEl.offsetParent;
  	}
    this.xPos = this.xPos + move;
	return this.xPos;
}

function getRealTop(move) {
    if(!move){
        move = 0;
    }
    if(document.layers){
     this.yPos = this.ref_image.y + move; 
     return this.yPos
   }
	this.yPos = this.ref_image.offsetTop;
	tempEl = this.ref_image.offsetParent;
	while (tempEl != null) {
  		this.yPos += tempEl.offsetTop;
  		tempEl = tempEl.offsetParent;
  	}
    this.yPos = this.yPos + move;
	return this.yPos;
}

var dropmenu1 = new  FindPosition("olb");
var dropmenu2 = new  FindPosition("products");
var dropmenu3 = new  FindPosition("rates");
var dropmenu4 = new  FindPosition("aboutus");
var dropmenu5 = new  FindPosition("help");


function showMenu(menu){
	
	switch(menu){
		case "menu1":
		oM.m["menu1"].b.moveIt(dropmenu1.xPos+162,dropmenu1.yPos);
		break;
		case "menu2":
		oM.m["menu2"].b.moveIt(dropmenu2.xPos+162,dropmenu2.yPos);
		break;
		case "menu3":
		oM.m["menu3"].b.moveIt(dropmenu3.xPos+162,dropmenu3.yPos);
		break;
		case "menu4":
		oM.m["menu4"].b.moveIt(dropmenu4.xPos+162,dropmenu4.yPos);
		break;
		case "menu5":
		oM.m["menu5"].b.moveIt(dropmenu5.xPos+162,dropmenu5.yPos);
		break;
	}
	
	oM.showsub(menu);

	
}

	
