var sessionID = "";

function setSessionID(id)
{
	sessionID = id;
}

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=85, finishopacity=85, style=3)";
oM.level[1]=new cm_makeLevel(190,25,"item_off","item_on",1,1,"clB",0,"right",0,0,0,0,0);//arrow-dhtml-off
oM.level[1].roundBorder=1;
oM.level[2]=new cm_makeLevel(230,25,"item_off","item_on",1,1,"clB",0,"right",0,0,0,0,0);//arrow-dhtml-off
oM.level[2].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','Personal Online Banking',sitedir+'online_banking_personal.html');
	
oM.makeMenu('menu1_1_1','menu1_1','Login','https://www.davistrust.com/index.html');
	
oM.makeMenu('menu1_1_2','menu1_1','Demo','https://www.davistrust.com/index.html?demo');
		oM.makeMenu('menu1_1_3','menu1_1','Register','https://www.davistrust.com/onlineserv/HB/STDReg.cgi');

oM.makeMenu('menu1_1_4','menu1_1','Reset Password','https://www.davistrust.com/onlineserv/HB/OnlineForm.cgi?form=passwordReset');
		
	oM.makeMenu('menu1_2','menu1','Personal Bill Pay',sitedir+'online_banking_billpay.html');

	oM.makeMenu('menu1_3','menu1','Small Business Online Banking',sitedir+'business_banking_small.html');
		oM.makeMenu('menu1_3_1','menu1_3','Login','https://www.davistrust.com/onlineserv/HB/Signon.cgi');
		oM.makeMenu('menu1_3_2','menu1_3','Demo','https://www.davistrust.com/onlineserv/HB/demo.html');
		oM.makeMenu('menu1_3_3','menu1_3','Register','https://www.davistrust.com/onlineserv/HB/STDReg.cgi');

oM.makeMenu('menu1_3_4','menu1_3','Reset Password','https://www.davistrust.com/onlineserv/HB/OnlineForm.cgi?form=passwordReset');

	oM.makeMenu('menu1_4','menu1','Online Cash Management',sitedir+'online_cash_management.html');
		oM.makeMenu('menu1_4_1','menu1_4','Login','https://www.davistrust.com/onlineserv/CM/');
		oM.makeMenu('menu1_4_2','menu1_4','Demo','http://www.cmdemo.com/');

	oM.makeMenu('menu1_5','menu1','FAQs',sitedir+'faqs.html');
		oM.makeMenu('menu1_5_1','menu1_5','Personal Online Banking FAQs',sitedir+'faqs_ib.html');
		oM.makeMenu('menu1_5_2','menu1_5','Personal Bill Pay FAQs','javascript:showWarning("https://billpaydemo.metavante.com/csp/ws/DI-4146/html/GlobalHelp/faq_top_seven.html")');
		oM.makeMenu('menu1_5_3','menu1_5','Small Business Online Banking FAQs',sitedir+'faqs_sb.html');
		oM.makeMenu('menu1_5_4','menu1_5','Online Cash Management FAQs',sitedir+'faqs_cm.html');

	oM.makeMenu('menu1_6','menu1','HELP','');
		oM.makeMenu('menu1_6_1','menu1_6','Online Cash Management Help','javascript:open_win_relative(sitedir + "Davis_Trust_Company_Users_Guide.pdf")');
		oM.makeMenu('menu1_6_2','menu1_6','Disclosures',sitedir + 'disclosures.html');
		oM.makeMenu('menu1_6_3','menu1_6','Online Security Tips','https://www.davistrust.com/onlineserv/HB/security_site/');

	oM.makeMenu('menu1_7','menu1','Customer Service',sitedir+'online_banking_cs.html');
		oM.makeMenu('menu1_7_1','menu1_7','Personal Online Banking',sitedir+'online_banking_cs.html');
		oM.makeMenu('menu1_7_2','menu1_7','Personal Bill Payment',sitedir+'online_banking_cs.html');
		oM.makeMenu('menu1_7_3','menu1_7','Small Business Online Banking',sitedir+'online_banking_cs.html');
		oM.makeMenu('menu1_7_4','menu1_7','Online Cash Management',sitedir+'online_banking_cs.html');

oM.makeMenu('menu2');
	oM.makeMenu('menu2_1','menu2','Checking Accounts',sitedir+'personal_banking_checking.html');
		oM.makeMenu('menu2_1_1','menu2_1','Regular Checking',sitedir+'personal_banking_checking.html#regular');
		oM.makeMenu('menu2_1_2','menu2_1','Checking Plus',sitedir+'personal_banking_checking.html#plus');
		oM.makeMenu('menu2_1_3','menu2_1','Money Market Hi-Fi Account',sitedir+'personal_banking_checking.html#market');
	oM.makeMenu('menu2_2','menu2','Savings Accounts',sitedir+'personal_banking_savings.html');
		oM.makeMenu('menu2_2_1','menu2_2','Davis Trust Regular Savings Account',sitedir+'personal_banking_savings.html#regular');
		oM.makeMenu('menu2_2_2','menu2_2','Certificates of Deposit',sitedir+'personal_banking_savings.html#cd');
		oM.makeMenu('menu2_2_3','menu2_2','Davis Trust IRA',sitedir+'personal_banking_savings.html#ira');
	oM.makeMenu('menu2_3','menu2','Personal Loans',sitedir+'personal_banking_loans.html');
		oM.makeMenu('menu2_3_1','menu2_3','Real Estate Loans',sitedir+'personal_banking_loans.html#realestate');
		oM.makeMenu('menu2_3_2','menu2_3','Home Equity Loans',sitedir+'personal_banking_loans.html#hequity');
		oM.makeMenu('menu2_3_3','menu2_3','Home Equity Line of Credit',sitedir+'personal_banking_loans.html#helc');
		oM.makeMenu('menu2_3_4','menu2_3','Personal Loans',sitedir+'personal_banking_loans.html#personal');
	oM.makeMenu('menu2_4','menu2','Trust Department',sitedir+'personal_banking_trust.html');
		oM.makeMenu('menu2_4_1','menu2_4','Estate Administration',sitedir+'personal_banking_trust.html#admin');
		oM.makeMenu('menu2_4_2','menu2_4','Trust Services',sitedir+'personal_banking_trust.html#trust');
		oM.makeMenu('menu2_4_3','menu2_4','Other Services',sitedir+'personal_banking_trust.html#other');
	oM.makeMenu('menu2_5','menu2','Other Services',sitedir+'personal_banking_other.html');
		oM.makeMenu('menu2_5_1','menu2_5','Online Banking',sitedir+'personal_banking_other.html#ob');
		oM.makeMenu('menu2_5_2','menu2_5','Online Bill Pay',sitedir+'personal_banking_other.html#bp');
		oM.makeMenu('menu2_5_3','menu2_5','Center-Voice Telephone Banking',sitedir+'personal_banking_other.html#cv');
		oM.makeMenu('menu2_5_4','menu2_5','ATM Cards',sitedir+'personal_banking_other.html#atm');
		oM.makeMenu('menu2_5_5','menu2_5','Other Personal Services',sitedir+'personal_banking_other.html#misc');

oM.makeMenu('menu3');
	oM.makeMenu('menu3_1','menu3','Business Deposit Accounts',sitedir+'business_banking_deposit.html');
		oM.makeMenu('menu3_1_1','menu3_1','Regular Checking',sitedir+'business_banking_deposit.html#regular');
		oM.makeMenu('menu3_1_2','menu3_1','Money Market Hi-Fi Account',sitedir+'business_banking_deposit.html#market');
		oM.makeMenu('menu3_1_3','menu3_1','Certificates of Deposit',sitedir+'business_banking_deposit.html#cd');
	oM.makeMenu('menu3_2','menu3','Business Loans',sitedir+'business_banking_loans.html');
		oM.makeMenu('menu3_2_1','menu3_2','Working Capital Line of Credit',sitedir+'business_banking_loans.html#wclc');
		oM.makeMenu('menu3_2_2','menu3_2','Investment Property Financing',sitedir+'business_banking_loans.html#ipf');
		oM.makeMenu('menu3_2_3','menu3_2','Commercial Owner-Occupied Mortgage Loans',sitedir+'business_banking_loans.html#cooml');
		oM.makeMenu('menu3_2_4','menu3_2','Other Commercial Loans',sitedir+'business_banking_loans.html#other');
	oM.makeMenu('menu3_3','menu3','Business Online Banking',sitedir+'business_banking_online.html');
		oM.makeMenu('menu3_3_1','menu3_3','Online Cash Management',sitedir+'online_cash_management.html');
		oM.makeMenu('menu3_3_2','menu3_3','Small Business Online Banking',sitedir+'business_banking_small.html');
	oM.makeMenu('menu3_4','menu3','Other Business Services',sitedir+'business_banking_other.html');
		oM.makeMenu('menu3_4_1','menu3_4','Merchant Card Services',sitedir+'business_banking_other.html#merch');
		oM.makeMenu('menu3_4_2','menu3_4','Wire Transfers',sitedir+'business_banking_other.html#wire');
		oM.makeMenu('menu3_4_3','menu3_4','Other Services',sitedir+'business_banking_other.html#misc');

oM.makeMenu('menu4');
	oM.makeMenu('menu4_1','menu4','Financial Calculators',sitedir+'calculators.html');
		oM.makeMenu('menu4_1_1','menu4_1','Kids Calculator',sitedir+'calculators_kids.html');
		oM.makeMenu('menu4_1_2','menu4_1','Loan Calculator',sitedir+'calculators_loan.html');
		oM.makeMenu('menu4_1_3','menu4_1','Loan Comparison Calculator' , sitedir+'calculators_loan_comp.html');
		oM.makeMenu('menu4_1_4','menu4_1','Mortgage Calculator',sitedir+'calculators_mortgage.html');
		oM.makeMenu('menu4_1_5','menu4_1','Retirement Calculator' , sitedir+'calculators_retirement.html');
		oM.makeMenu('menu4_1_6','menu4_1','Savings Calculator',sitedir+'calculators_savings.html');
	oM.makeMenu('menu4_2','menu4','Community Resources',sitedir+'info_communitylinks.html');

oM.makeMenu('menu5');
	oM.makeMenu('menu5_1','menu5','About Us',sitedir+'info_aboutus.html');
	oM.makeMenu('menu5_2','menu5','Location/Hours/ATMs',sitedir+'info_locations.html');
	oM.makeMenu('menu5_3','menu5','Bank Interest Rates',sitedir+'rates_deposit.html');
	oM.makeMenu('menu5_4','menu5','Bank Fees',sitedir+'fees.html');
	oM.makeMenu('menu5_5','menu5','Investor Information',sitedir+'investor.html');
	oM.makeMenu('menu5_6','menu5','Online Banking',sitedir+'online_banking.html');
	oM.makeMenu('menu5_7','menu5','Center-Voice Telephone Banking',sitedir+'personal_banking_centervoice.html');
	oM.makeMenu('menu5_8','menu5','Online Forms',sitedir+'info_online_forms.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("olb");
var dropmenu2 = new  FindPosition("pbk");
var dropmenu3 = new  FindPosition("bbk");
var dropmenu4 = new  FindPosition("resources");
var dropmenu5 = new  FindPosition("info");

function showMenu(menu){
	switch(menu){
		case "menu1":
		oM.m["menu1"].b.moveIt(dropmenu1.xPos+0,dropmenu1.yPos+30);
		break;
		case "menu2":
        oM.m["menu2"].b.moveIt(dropmenu2.xPos+0,dropmenu2.yPos+30);
		break;
		case "menu3":
		oM.m["menu3"].b.moveIt(dropmenu3.xPos+0,dropmenu3.yPos+30);
		break;
		case "menu4":
		oM.m["menu4"].b.moveIt(dropmenu4.xPos+0,dropmenu4.yPos+30);
		break;        		
		case "menu5":
		oM.m["menu5"].b.moveIt(dropmenu5.xPos+0,dropmenu5.yPos+30);
		break;        		
	} 
	oM.showsub(menu);
	
}
