oM=new makeCM("oM"); 
oM.resizeCheck=0; 
oM.rows=1;  
oM.onlineRoot=""
oM.offlineRoot=""
oM.pxBetween=0; 
oM.fillImg=imgdir+"clearpix.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="clB";
oM.barBorderX=0; 
oM.barBorderY=0;
db='<span class="bullet">&#149; </span>';

//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,"bordercolor","bordercolor",0,0,"clB",0,"bottom",0,0,0,0,0);
oM.level[0].filter="progid:DXImageTransform.Microsoft.Alpha(opacity=100, finishopacity=100, style=3)";
oM.level[1]=new cm_makeLevel(220,25,"item_off","item_on",0,0,"bordercolor",0,"right",0,0,imgdir+"tri.gif",8,8);
oM.level[1].roundBorder=1;
/******************************************
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','xxxxxxxxx',sitedir+'xxxxxxxxxxx');

oM.makeMenu('menu2');
oM.makeMenu('menu2_1','menu2','Online Banking and Bill Pay',sitedir+'convenience_services_ob_billpay.html');
oM.makeMenu('menu2_2','menu2','Telephone Banking',sitedir+'convenience_services_telephone.html');
oM.makeMenu('menu2_3','menu2','ATM and Debit Cards',sitedir+'convenience_services_atm_debit.html');
oM.makeMenu('menu2_4','menu2','Deposit Services',sitedir+'convenience_services_deposit.html');

oM.makeMenu('menu3');
oM.makeMenu('menu3_1','menu3','Checking',sitedir+'personal_banking_checking.html');
oM.makeMenu('menu3_2','menu3','Savings',sitedir+'personal_banking_savings.html');
oM.makeMenu('menu3_3','menu3','CDs and IRAs',sitedir+'personal_banking_cd_ira.html');
oM.makeMenu('menu3_4','menu3','Premier Plan',sitedir+'personal_banking_premier.html');
oM.makeMenu('menu3_5','menu3','Mortgages and Home Equity',sitedir+'personal_banking_mortgage_home_equity.html');
oM.makeMenu('menu3_6','menu3','Consumer Loans',sitedir+'personal_banking_consumer_loans.html');
oM.makeMenu('menu3_7','menu3','Credit Cards',sitedir+'personal_banking_credit_cards.html');

oM.makeMenu('menu4');
oM.makeMenu('menu4_1','menu4','Checking',sitedir+'business_banking_checking.html');
oM.makeMenu('menu4_2','menu4','Savings',sitedir+'business_banking_savings.html');
oM.makeMenu('menu4_3','menu4','Loans',sitedir+'business_banking_loans.html');
oM.makeMenu('menu4_4','menu4','Business Services',sitedir+'business_banking_business_services.html');

oM.makeMenu('menu5');
oM.makeMenu('menu5_1','menu5','Products and Services',sitedir+'trust_products_services.html');
oM.makeMenu('menu5_2','menu5','Investment Philosophy',sitedir+'trust_investment_philosophy.html');
oM.makeMenu('menu5_3','menu5','Choosing the Right Personal Representative',sitedir+'trust_choosing_representative.html');

oM.makeMenu('menu6');
oM.makeMenu('menu6_1','menu6','Rates');
		oM.makeMenu('menu6_1_1','menu6_1','Checking, Savings and Money Market',sitedir+'rates_calculators_rates_checking_savings.html');
		oM.makeMenu('menu6_1_2','menu6_1','CDs and IRAs',sitedir+'rates_calculators_rates_cds_iras.html');
		oM.makeMenu('menu6_1_3','menu6_1','Mortgage and Home Equity',sitedir+'rates_calculators_rates_mortgage_home.html');
		oM.makeMenu('menu6_1_4','menu6_1','Consumer Loans',sitedir+'rates_calculators_rates_consumer_loan.html');	
oM.makeMenu('menu6_2','menu6','Calculators');
		oM.makeMenu('menu6_2_1','menu6_2','Savings',sitedir+'rates_calculators_calc_savings.html');
		oM.makeMenu('menu6_2_2','menu6_2','Loan Comparison',sitedir+'rates_calculators_calc_loan_comp.html');
		oM.makeMenu('menu6_2_3','menu6_2','Loan',sitedir+'rates_calculators_calc_loan.html');
		oM.makeMenu('menu6_2_4','menu6_2','Mortgage',sitedir+'rates_calculators_calc_mortgage.html');
		oM.makeMenu('menu6_2_5','menu6_2','Retirement Planning',sitedir+'rates_calculators_calc_retirement.html');

oM.makeMenu('menu7');
oM.makeMenu('menu7_1','menu7','Bank Profile',sitedir+'about_bank_profile.html');
oM.makeMenu('menu7_2','menu7','Quick Facts',sitedir+'about_quick_facts.html');
oM.makeMenu('menu7_3','menu7','News Releases',sitedir+'about_news_releases.html');
oM.makeMenu('menu7_4','menu7','Employment',sitedir+'about_employment.html');
			//oM.makeMenu('menu7_4_1','menu7_4','Career Opportunities',sitedir+'about_employment_career.html');
			//oM.makeMenu('menu7_4_2','menu7_4','Benefits',sitedir+'about_employment_benefits.html');

			
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("home");
var dropmenu2 = new  FindPosition("convenience");
var dropmenu3 = new  FindPosition("personal");
var dropmenu4 = new  FindPosition("business");
var dropmenu5 = new  FindPosition("trust");
var dropmenu6 = new  FindPosition("rates");
var dropmenu7 = new  FindPosition("about");

function showMenu(menu){
	switch(menu){
		case "menu1":
		oM.m["menu1"].b.moveIt(dropmenu1.xPos+190,dropmenu1.yPos-1);
		break;
		case "menu2":
        oM.m["menu2"].b.moveIt(dropmenu2.xPos+190,dropmenu2.yPos-1);
		break;
		case "menu3":
		oM.m["menu3"].b.moveIt(dropmenu3.xPos+190,dropmenu3.yPos-1);
		break;
		case "menu4":
		oM.m["menu4"].b.moveIt(dropmenu4.xPos+190,dropmenu4.yPos-1);
		break;
        case "menu5":
		oM.m["menu5"].b.moveIt(dropmenu5.xPos+190,dropmenu5.yPos-1);
		break;
		case "menu6":
		oM.m["menu6"].b.moveIt(dropmenu6.xPos+190,dropmenu6.yPos-1);
		break;
		case "menu7":
		oM.m["menu7"].b.moveIt(dropmenu7.xPos-32,dropmenu7.yPos+22);
		break;
	} 
	oM.showsub(menu);
	
}



