var newH = 36;

var imgdir = "../images/";

if (typeof(homepage) == "undefined") {
	sitedir = "../";
} else {
    sitedir = "";
}


var menWidth = 165;

oM=new makeCM("oM"); 
oM.resizeCheck=0; 
oM.rows=1;
oM.onlineRoot=""
oM.offlineRoot=""
oM.pxBetween=1; 
oM.fillImg= fiDir + "/images/clrgif.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=97, finishopacity=86, style=1)";
oM.level[1]=new cm_makeLevel(208,24,"item_off","item_on",0,0,"bordercolor",0,"right",0,0,imgdir+"main_expand_default.gif",5,9);
oM.level[1].roundBorder=1;



var dropmenu1 = new FindPosition("online");
var dropmenu2 = new FindPosition("products");
var dropmenu3 = new FindPosition("rates");
var dropmenu4 = new FindPosition("information");
var dropmenu5 = new FindPosition("about");

var xOff = 180;
var yOff = -13;

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

oM.makeMenu('menu1');
	oM.makeMenu('menu1_1','menu1','Home Banking',sitedir+'onlineserv/home_banking.html');
	oM.makeMenu('menu1_2','menu1','Check Ordering','javascript:void(window.open("https://reorder.libertysite.com/default.aspx"))');
	oM.makeMenu('menu1_3','menu1','Online Calculators',sitedir+'onlineserv/wizards.html');
	oM.makeMenu('menu1_4','menu1','Brokerage Service','javascript:void(window.open("https://members.cunamutual.com/brokernet/home.asp?10404081"))');
	oM.makeMenu('menu1_5','menu1','Tax Preparation',sitedir+'onlineserv/tax_planning.html');
	oM.makeMenu('menu1_6','menu1','Online Survey','https://www.lbcefcu.org/Forms/OnlineForm.cgi?form=survey');
	oM.makeMenu('menu1_7','menu1','Useful Web Links',sitedir+'onlineserv/links.html');

oM.makeMenu('menu2');
	oM.makeMenu('menu2_1','menu2','Regular Share Accounts',sitedir+'prodserv/savings.html');
	oM.makeMenu('menu2_2','menu2','Share Draft Accounts',sitedir+'prodserv/checking.html');
	oM.makeMenu('menu2_3','menu2','ATM/POS Card',sitedir+'prodserv/atm.html');
	oM.makeMenu('menu2_4','menu2','Credit Card - VisaŽ',sitedir+'prodserv/ccards.html');
	oM.makeMenu('menu2_5','menu2','Audio Response 24/7',sitedir+'prodserv/audio.html');
	oM.makeMenu('menu2_6','menu2','Home Financing',sitedir+'prodserv/home_financing.html');
	oM.makeMenu('menu2_7','menu2','Savings Protection Insurance',sitedir+'prodserv/ins.html');
	oM.makeMenu('menu2_8','menu2','Other Services',sitedir+'prodserv/services.html');
	
oM.makeMenu('menu3');
	oM.makeMenu('menu3_1','menu3','Dividend Rates',sitedir+'prodserv/div_loan.html');
	oM.makeMenu('menu3_2','menu3','Loan Rates',sitedir+'prodserv/div_loan.html#loan');
	oM.makeMenu('menu3_3','menu3','Interest Calculation',sitedir+'prodserv/loan_interest.html');

oM.makeMenu('menu4');
	oM.makeMenu('menu4_1','menu4','Annual Reports / Newsletters',sitedir+'infodesk/reports.html');
	oM.makeMenu('menu4_2','menu4','News and Events',sitedir+'infodesk/new.html');
	oM.makeMenu('menu4_3','menu4','Location / Hours',sitedir+'infodesk/locations.html');
	oM.makeMenu('menu4_4','menu4','Membership',sitedir+'infodesk/membership.html');
	oM.makeMenu('menu4_5','menu4','Holiday Schedule',sitedir+'infodesk/closed.html');
	oM.makeMenu('menu4_6','menu4','Schedule of Fees',sitedir+'infodesk/fees.html');
	oM.makeMenu('menu4_7','menu4','Employment',sitedir+'infodesk/employment.html');
	oM.makeMenu('menu4_8','menu4','Web Site Help',sitedir+'infodesk/help.html');
	
oM.makeMenu('menu5');
	oM.makeMenu('menu5_1','menu5','The Advantages',sitedir+'infodesk/advantages.html');
	oM.makeMenu('menu5_2','menu5','Mission Statement',sitedir+'ourcu/mission.html');
	oM.makeMenu('menu5_3','menu5','Credit Union History',sitedir+'ourcu/history.html');
	oM.makeMenu('menu5_4','menu5','Board of Directors',sitedir+'ourcu/board.html');
	oM.makeMenu('menu5_5','menu5','Supervisory Committee',sitedir+'ourcu/supervisory.html');
	oM.makeMenu('menu5_6','menu5','Management',sitedir+'ourcu/management.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;
}
/**
 * This function came from "Nice Titles"
 * http://www.kryogenix.org/code/browser/nicetitle/
 */
function findLinkPosition( oLink ) {
  if(!document.getElementById)return;
  oLink = document.getElementById(oLink);
  if( oLink.offsetParent ) {
    for( var posX = 0, posY = 0; oLink.offsetParent; oLink = oLink.offsetParent ) {
      posX += oLink.offsetLeft;
      posY += oLink.offsetTop;
    }
    return [ posX, posY ];
  } else {
    return [ oLink.x, oLink.y ];
  }
}
	
	

