var newH = 36;
if(document.layers){
	document.write('<style>.clS,.clSover{border: 0px;}</style>');
	newH += 1;
}

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="<img src='"+imgdir+"clearpix.gif' width='3' height='1' border='0' alt='' />";

//oM.level[0]=new cm_makeLevel(width,height,regClass,overClass,borderX,borderY,borderClass,rows,align,offsetX,offsetY,arrow,arrowWidth,arrowHeight)<img src="../images/menu_arrow.gif" width="14" height="10" alt="" border="0">
oM.level[0]=new cm_makeLevel(0,0,"clS","clS",0,0,"clB",0,"bottom",0,0,0,0,0);
oM.level[0].filter="PROGID:DXImageTransform.Microsoft.Alpha(opacity=95, finishopacity=95, style=1)"; 
oM.level[0].roundBorder=1;
oM.level[1]=new cm_makeLevel(235,20,"clS","clSover",0,0,"clB",0,"right",0,0,0,11,11);


/******************************************
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',db+'About Us',sitedir+'bank_about.html');
	oM.makeMenu('menu1_2','menu1',db+'Location and Hours',sitedir+'bank_location.html');
		oM.makeMenu('menu1_2_1','menu1_2',db+'Palatine Office',sitedir+'bank_location.html');
		oM.makeMenu('menu1_2_2','menu1_2',db+'Crystal Lake Office',sitedir+'bank_location.html#crystalLake');
		oM.makeMenu('menu1_2_3','menu1_2',db+'Lake Zurich Office',sitedir+'bank_location.html#lakeZurich');
	oM.makeMenu('menu1_3','menu1',db+'Staff',sitedir+'bank_staff.html');	
		oM.makeMenu('menu1_3_1','menu1_3',db+'Executive Officers',sitedir+'bank_staff.html#executive_officers');	
		//oM.makeMenu('menu1_3_2','menu1_3',db+'Crystal Lake Staff',sitedir+'bank_staff.html#crystalLake');	
	oM.makeMenu('menu1_4','menu1',db+'Board of Directors',sitedir+'bank_directors.html');
	oM.makeMenu('menu1_5','menu1',db+'Bank Overview','javascript:openPdf(\''+sitedir+'cnbtc_brochure.pdf\');');
	oM.makeMenu('menu1_6','menu1',db+'FDIC Deposit Insurance','javascript:showWarning(\'http://www2.fdic.gov/edie\');');
	oM.makeMenu('menu1_7','menu1',db+'ATM Locations',sitedir+'bank_atmlocations.html');
	oM.makeMenu('menu1_8','menu1',db+'Lost or Stolen ATM/VISA Debit Card',sitedir+'personal_checking_cards.html');
	
oM.makeMenu('menu2');
	oM.makeMenu('menu2_1','menu2',db+'Checking Accounts',sitedir+'personal_checking.html');
	oM.makeMenu('menu2_2','menu2',db+'Lost or Stolen ATM/VISA Debit Card',sitedir+'personal_checking_cards.html');
	oM.makeMenu('menu2_3','menu2',db+'Online Banking & Bill Payment',sitedir+'personal_billpay.html');
	oM.makeMenu('menu2_4','menu2',db+'Savings &amp; Money Market<br />'+db+'Accounts',sitedir+'personal_savings.html','','',newH);
	oM.makeMenu('menu2_5','menu2',db+'Individual Retirement<br />'+db+'Accounts',sitedir+'personal_iracd.html#ira','','',newH);	
	oM.makeMenu('menu2_6','menu2',db+'Certificates of Deposit',sitedir+'personal_iracd.html#cd');
	oM.makeMenu('menu2_7','menu2',db+'Residential Mortgages',sitedir+'personal_mortgage.html');
	oM.makeMenu('menu2_8','menu2',db+'Home Equity Lines',sitedir+'personal_homeequity.html');
	oM.makeMenu('menu2_9','menu2',db+'Loans',sitedir+'personal_lending.html');	
	oM.makeMenu('menu2_10','menu2',db+'Trust &amp; Investments',sitedir+'wealth_trust.html');	
	oM.makeMenu('menu2_11','menu2',db+'Safe Deposit Boxes',sitedir+'personal_safebox.html');
	oM.makeMenu('menu2_12','menu2',db+'Construction Lending',sitedir+'business_construction.html');
		
oM.makeMenu('menu3');
	oM.makeMenu('menu3_1','menu3',db+'Preferred Money Market',sitedir+'rates.html#moneymarket');
	oM.makeMenu('menu3_2','menu3',db+'Preferred IRA',sitedir+'rates.html#ira');	
	oM.makeMenu('menu3_3','menu3',db+'Savings',sitedir+'rates.html#savings');
	oM.makeMenu('menu3_4','menu3',db+'Interest/Now Accounts/Cornerstone 50',sitedir+'rates.html#now');	
	oM.makeMenu('menu3_5','menu3',db+'Minor Savings',sitedir+'rates.html#minor');	
	oM.makeMenu('menu3_6','menu3',db+'Certificates of Deposit',sitedir+'rates.html#cd');	
	oM.makeMenu('menu3_7','menu3',db+'Cash Management Sweep',sitedir+'rates.html#cash');	

oM.makeMenu('menu4');
	oM.makeMenu('menu4_1','menu4',db+'Business Checking Accounts',sitedir+'business_depository.html');
	oM.makeMenu('menu4_2','menu4',db+'Internet Cash Management',sitedir+'business_cash_management.html');
	oM.makeMenu('menu4_3','menu4',db+'Business Loans',sitedir+'business_lending.html');
	oM.makeMenu('menu4_4','menu4',db+'Construction Lending',sitedir+'business_construction.html');
	oM.makeMenu('menu4_5','menu4',db+'Business Money Market<br />'+db+'Accounts & CDs',sitedir+'rates.html#moneymarket','','',newH);
	oM.makeMenu('menu4_6','menu4',db+'Employer Retirement Plans',sitedir+'wealth_retire.html');
		
oM.makeMenu('menu5');
	oM.makeMenu('menu5_1','menu5',db+'Securities Custody Account',sitedir+'wealth_trust.html#securities');
	oM.makeMenu('menu5_2','menu5',db+'Investment Management',sitedir+'wealth_trust.html#investment');
	oM.makeMenu('menu5_3','menu5',db+'Trusts',sitedir+'wealth_trust.html#trusts');	
	oM.makeMenu('menu5_4','menu5',db+'Estate Administration Services',sitedir+'wealth_trust.html#estate');		
	oM.makeMenu('menu5_5','menu5',db+'Cornerstone Connect<br />'+ db+'&amp; Technology Services',sitedir+'wealth_trust.html#connect','','',newH);	
	oM.makeMenu('menu5_6','menu5',db+'Retirement Plans',sitedir+'wealth_retire.html');
	
	oM.makeMenu('menu6');
	oM.makeMenu('menu6_1','menu6',db+'Kids Calculator',sitedir+'calculators_kids.html');
	oM.makeMenu('menu6_2','menu6',db+'Loan Calculator',sitedir+'calculators_loan.html');
	oM.makeMenu('menu6_3','menu6',db+'Loan Comparison Calculator',sitedir+'calculators_loancomp.html');	
	oM.makeMenu('menu6_4','menu6',db+'Mortgage Calculator',sitedir+'calculators_mortgage.html');		
	oM.makeMenu('menu6_5','menu6',db+'Retirement Calculators',sitedir+'calculators_retirement.html');	
	oM.makeMenu('menu6_6','menu6',db+'Savings Calculator',sitedir+'calculators_savings.html');	
	
	oM.makeMenu('menu7');
	oM.makeMenu('menu7_1','menu7',db+'E-Mail the Bank','https://www.cornerstonenb.com/Forms/OnlineForm.cgi?form=guestbook');

		
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("bank");
var dropmenu2 = new  FindPosition("personal");
var dropmenu3 = new  FindPosition("interest");
var dropmenu4 = new  FindPosition("business");
var dropmenu5 = new  FindPosition("wealth");
var dropmenu6 = new  FindPosition("financial");
var dropmenu7 = new  FindPosition("contact");


function showMenu(menu){
	switch(menu){
		case "menu1":
		oM.m["menu1"].b.moveIt(dropmenu1.xPos+135,dropmenu1.yPos);
		break;
		case "menu2":
		oM.m["menu2"].b.moveIt(dropmenu2.xPos+135,dropmenu2.yPos);
		break;		
		case "menu3":
		oM.m["menu3"].b.moveIt(dropmenu3.xPos+135,dropmenu3.yPos);
		break;		
		case "menu4":
		oM.m["menu4"].b.moveIt(dropmenu4.xPos+135,dropmenu4.yPos);
		break;
		case "menu5":
		oM.m["menu5"].b.moveIt(dropmenu5.xPos+135,dropmenu5.yPos);
		break;		
		case "menu6":
		oM.m["menu6"].b.moveIt(dropmenu6.xPos+135,dropmenu6.yPos);
		break;
		case "menu7":
		oM.m["menu7"].b.moveIt(dropmenu7.xPos+135,dropmenu7.yPos);
		break;			
	}
	oM.showsub(menu);
}
//end of file

