var url = self.location.href;
if (url.indexOf("#")!=-1)
	self.location.href=url.substring(url.indexOf('#'),url.length);


var newH = 36;
if(document.layers){
	document.write('<style type="text/css">.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="/images/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='/images/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)
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(147,20,"item_off","item_on",0,0,"clB",0,"right",0,0,imgdir+"tri.gif",10,10);
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',db+'Branch Information', sitedir+'about_branch.html');
	oM.makeMenu('menu1_2','menu1',db+'How to Join',sitedir+'about_join.html');
	oM.makeMenu('menu1_3','menu1',db+'News & Information',sitedir+'about_press.html');	
	oM.makeMenu('menu1_4','menu1',db+'Heritage Connections<br />'+db+'Newsletter', sitedir+'about_newsletter.html','','',newH);
	oM.makeMenu('menu1_5','menu1',db+'What&rsquo;s a Credit Union',sitedir+'about_cu.html');
	oM.makeMenu('menu1_6','menu1',db+'Our Mission', sitedir+'about_mission.html');
	oM.makeMenu('menu1_7','menu1',db+'Our History',sitedir+'about_history.html');
	oM.makeMenu('menu1_8','menu1',db+'Feedback Form','https://www.heritageccu.com/Forms/OnlineForm.cgi?form=survey&onweb=true');
	oM.makeMenu('menu1_9','menu1',db+'Employment', sitedir+'about_employment.html');			

oM.makeMenu('menu2');
	oM.makeMenu('menu2_1','menu2',db+'<em>e</em>hccu - online banking', sitedir+'eservices_online.html');
	oM.makeMenu('menu2_2','menu2',db+'<em>e</em>hccupay - bill payment <br />'+db+'&amp; presentment', sitedir+'eservices_billpay.html','','',newH);
	oM.makeMenu('menu2_3','menu2',db+'E-Statements', sitedir+'eservices_estatements.html');
	oM.makeMenu('menu2_4','menu2',db+'E-mail Sign Up', 'javascript:showWarning("https://campaigns2.documatix.com/campaign/webform.aspx?id=A40D9CDB8629A036");');
	oM.makeMenu('menu2_5','menu2',db+'Brochure Rack', sitedir+'eservices_brochure.html');
	oM.makeMenu('menu2_6','menu2',db+'Financial Calculators', sitedir+'calculators.html');
		
oM.makeMenu('menu3');
	oM.makeMenu('menu3_1','menu3',db+'Auto',sitedir+'loans_auto.html');		
	oM.makeMenu('menu3_2','menu3',db+'Personal',sitedir+'loans_personal.html');
	oM.makeMenu('menu3_3','menu3',db+'Real Estate Loans',sitedir+'loans_realestate.html');
	oM.makeMenu('menu3_4','menu3',db+'Insurance Solutions',sitedir+'loans_insurance.html');
	oM.makeMenu('menu3_5','menu3',db+'Visa Credit Cards',sitedir+'loans_visa.html');
	oM.makeMenu('menu3_6','menu3',db+'Web Loan',sitedir+'loans_webloan.html');
	oM.makeMenu('menu3_7','menu3',db+'Loan Rates',sitedir+'loans_rates.html');
	oM.makeMenu('menu3_8','menu3',db+'Financial Calculators', sitedir+'calculators.html');

oM.makeMenu('menu4');
	oM.makeMenu('menu4_1','menu4',db+'Checking',sitedir+'checking_checking.html');
	oM.makeMenu('menu4_2','menu4',db+'Visa Check Card',sitedir+'checking_visa.html');
	oM.makeMenu('menu4_3','menu4',db+'Reorder Checks',sitedir+'checking_reorder.html');
	oM.makeMenu('menu4_4','menu4',db+'Checking Rates',sitedir+'checking_rates.html');	
	oM.makeMenu('menu4_5','menu4',db+'Overdraft Protection',sitedir+'checking_overdraftprotection.html');	
									
oM.makeMenu('menu5');
	oM.makeMenu('menu5_1','menu5',db+'Basic Savings',sitedir+'savings_basic.html');
	oM.makeMenu('menu5_2','menu5',db+'Share Certificates',sitedir+'savings_share.html');
	oM.makeMenu('menu5_3','menu5',db+'Money Market Accounts',sitedir+'savings_money.html');
	oM.makeMenu('menu5_4','menu5',db+'IRAS',sitedir+'savings_iras.html');
	oM.makeMenu('menu5_5','menu5',db+'Investments',sitedir+'savings_investments.html');
	oM.makeMenu('menu5_6','menu5',db+'Holiday Club',sitedir+'savings_holiday.html');
	oM.makeMenu('menu5_7','menu5',db+'Youth Accounts',sitedir+'savings_youth.html');
	oM.makeMenu('menu5_8','menu5',db+'Savings Rates',sitedir+'savings_rates.html');
	oM.makeMenu('menu5_9','menu5',db+'Financial Calculators',sitedir+'calculators.html');
			
		
oM.makeMenu('menu6');
	oM.makeMenu('menu6_1','menu6',db+'Events & Promotions',sitedir+'member_events.html');
	oM.makeMenu('menu6_2','menu6',db+'Member Benefits',sitedir+'member_benefits.html');
	oM.makeMenu('menu6_3','menu6',db+'Direct Deposit',sitedir+'member_direct.html');
	oM.makeMenu('menu6_4','menu6',db+'Member Education',sitedir+'member_education.html');
	oM.makeMenu('menu6_5','menu6',db+'Other Services',sitedir+'member_other.html');
	oM.makeMenu('menu6_6','menu6',db+'Helpful Links', sitedir+'member_links.html');
	oM.makeMenu('menu6_7','menu6',db+'Fee Schedule',sitedir+'member_fees.html');
	oM.makeMenu('menu6_8','menu6',db+'Privacy & Security',sitedir+'member_privacy.html');
	
oM.makeMenu('menu7');
	oM.makeMenu('menu7_1','menu7',db+'Loan Rates',sitedir+'loans_rates.html');
	oM.makeMenu('menu7_2','menu7',db+'Deposit Rates','javascript:void(0);');
		oM.makeMenu('menu7_2_1','menu7_2',db+'Checking Rates',sitedir+'checking_rates.html');		
		oM.makeMenu('menu7_2_2','menu7_2',db+'Savings Rates',sitedir+'savings_rates.html');
		
oM.makeMenu('menu8');
	oM.makeMenu('menu8_1','menu8',db+'Address &amp; Phone Numbers',sitedir+'about_addresses.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("about");
var dropmenu2 = new  FindPosition("eserv");
var dropmenu3 = new  FindPosition("loans");
var dropmenu4 = new  FindPosition("chkng");
var dropmenu5 = new  FindPosition("savng");
var dropmenu6 = new  FindPosition("membr");
var dropmenu7 = new  FindPosition("rates");
var dropmenu8 = new  FindPosition("contact");

function showMenu(menu){
	switch(menu){
		case "menu1":
		oM.m["menu1"].b.moveIt(dropmenu1.xPos-2,dropmenu1.yPos+20);
		break;
		case "menu2":
		oM.m["menu2"].b.moveIt(dropmenu2.xPos+5,dropmenu2.yPos+20);
		break;		
		case "menu3":
		oM.m["menu3"].b.moveIt(dropmenu3.xPos+6,dropmenu3.yPos+20);
		break;		
		case "menu4":
		oM.m["menu4"].b.moveIt(dropmenu4.xPos+8,dropmenu4.yPos+20);
		break;
		case "menu5":
		oM.m["menu5"].b.moveIt(dropmenu5.xPos+7,dropmenu5.yPos+20);
		break;
		case "menu6":
		oM.m["menu6"].b.moveIt(dropmenu6.xPos+7,dropmenu6.yPos+20);
		break;
		case "menu7":		
		oM.m["menu7"].b.moveIt(dropmenu7.xPos-30,dropmenu7.yPos+5);
		break;		
		case "menu8":		
		oM.m["menu8"].b.moveIt(dropmenu8.xPos-30,dropmenu8.yPos+5);
		break;	
	} 
	oM.showsub(menu);
	
}
