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=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)
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=90, finishopacity=90, style=3)";
oM.level[1]=new cm_makeLevel(140,25,"item_off","item_on",1,1,"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)
*************************************/


                /*Rates*/
oM.makeMenu('menu1');
	oM.makeMenu('menu1_1','menu1',db+'All Rates',sitedir+'rates.html');
	oM.makeMenu('menu1_2','menu1',db+'Consumer Loan Rates',sitedir+'rates_loans.html');
	oM.makeMenu('menu1_3','menu1',db+'Real Estate Rates',sitedir+'rates_realestate.html');
    oM.makeMenu('menu1_4','menu1',db+'Savings Rates',sitedir+'rates_savings.html');
    
    
    

                /*Checking*/
oM.makeMenu('menu2');
    oM.makeMenu('menu2_1','menu2',db+'Checking Choices',sitedir+'checking_choices.html');
    oM.makeMenu('menu2_2','menu2',db+'Debit/ATM Card',sitedir+'checking_debit.html');
    oM.makeMenu('menu2_3','menu2',db+'Open a Checking Account','https://www.redwoodcu.org/Forms/OnlineForm.cgi?form=new_checking_app&onweb=true');
	oM.makeMenu('menu2_4','menu2',db+'Ready to Switch?',sitedir+'about_tguide.html');
    oM.makeMenu('menu2_5','menu2',db+'Youth Accounts','http://www.redwoodcu.org/youth/youth.html');


                /*Savings & Investment*/
oM.makeMenu('menu3');
	oM.makeMenu('menu3_1','menu3',db+'Health Saving Accounts',sitedir+'savings_hsa.html');
	oM.makeMenu('menu3_2','menu3',db+'Investments &amp; Retirement',sitedir+'savings_retirement.html');
	oM.makeMenu('menu3_3','menu3',db+'IRAs',sitedir+'savings_iras.html');
    oM.makeMenu('menu3_4','menu3',db+'Savings Choices',sitedir+'savings_choices.html');
	oM.makeMenu('menu3_5','menu3',db+'Youth Accounts','http://www.redwoodcu.org/youth/youth.html');


            /*Loans & Credit*/
oM.makeMenu('menu4');
	oM.makeMenu('menu4_1','menu4',db+'Apply for a Loan',sitedir+'applications.html');
	oM.makeMenu('menu4_2','menu4',db+'Home Equity',sitedir+'loans_heloan.html');
    oM.makeMenu('menu4_3','menu4',db+'Mortgage Loans',sitedir+'loans_mortgage.html');
    oM.makeMenu('menu4_4','menu4',db+'Personal &amp; Lines of Credit',sitedir+'loans_personal.html');
    oM.makeMenu('menu4_5','menu4',db+'Vehicle',sitedir+'loans_vehicle.html');
    oM.makeMenu('menu4_6','menu4',db+'VISA Credit Cards',sitedir+'loans_personal.html#visa');
	oM.makeMenu('menu4_7','menu4',db+'Easy Onsite Financing',sitedir+'merchant_loan.html');
	oM.makeMenu('menu4_8','menu4',db+'Convenient Payment &nbsp;Options',sitedir+'loans_payoptions.html', '', 140, 48);
   


            /*eServices*/
oM.makeMenu('menu5');
	oM.makeMenu('menu5_1','menu5',db+'Convenience Services',sitedir+'eservices_convenience.html');
    oM.makeMenu('menu5_2','menu5',db+'RCU Online Banking',sitedir+'eservices_online.html');
    oM.makeMenu('menu5_3','menu5',db+'RCU Bill Pay',sitedir+'eservices_billpay.html');
    oM.makeMenu('menu5_4','menu5',db+'VISA Online',sitedir+'eservices_visa.html');
    


        /*Insurance*/
oM.makeMenu('menu6');
    oM.makeMenu('menu6_1','menu6',db+'Auto and RV',sitedir+'insurance_auto.html');
    oM.makeMenu('menu6_2','menu6',db+'Business Insurance',sitedir+'insurance_bus.html');
    oM.makeMenu('menu6_3','menu6',db+'Home Insurance',sitedir+'insurance_home.html');
    oM.makeMenu('menu6_4','menu6',db+'Life Insurance',sitedir+'insurance_life.html');
	 oM.makeMenu('menu6_5','menu6',db+'Pet Insurance',sitedir+'insurance_pet.html');
    oM.makeMenu('menu6_6','menu6',db+'And More…',sitedir+'insurance_more.html');


    /*Tools & Resources*/
oM.makeMenu('menu7');
    oM.makeMenu('menu7_1','menu7',db+'Applications &amp; Forms',sitedir+'applications.html');
    oM.makeMenu('menu7_2','menu7',db+'Calculators',sitedir+'calculators.html');
    oM.makeMenu('menu7_3','menu7',db+'Committed to Community',sitedir+'community.html');
    oM.makeMenu('menu7_4','menu7',db+'Current Promotions',sitedir+'tools_promotions.html');
	 oM.makeMenu('menu7_5','menu7',db+'Financial Assistance',sitedir+'tools_member_finassist.html');
	 oM.makeMenu('menu7_6','menu7',db+'Foreclosure Prevention',sitedir+'tools_member_preventforeclosure.html');
	
	oM.makeMenu('menu7_7','menu7',db+'Green Tips/Info',sitedir+'green_main.html');
	 oM.makeMenu('menu7_8','menu7',db+'Links of Interest',sitedir+'tools_member_links.html');
    oM.makeMenu('menu7_9','menu7',db+'Member Education/Tips',sitedir+'tools_member.html');
    oM.makeMenu('menu7_10','menu7',db+'Member Help',sitedir+'help.html');
    oM.makeMenu('menu7_11','menu7',db+'Member Newsletter',sitedir+'tools_newsletter.html');
    oM.makeMenu('menu7_12','menu7',db+'Move Your Money',sitedir+'move_your_money.html');
    oM.makeMenu('menu7_13','menu7',db+'News Room',sitedir+'tools_press.html');
		oM.makeMenu('menu7_14','menu7',db+'Political Action',sitedir+'leg_advocacymain.html');
	oM.makeMenu('menu7_15','menu7',db+'Security &amp; Privacy',sitedir+'mis_main.html');
	oM.makeMenu('menu7_16','menu7',db+'Tips for Traveling',sitedir+'travel_tips.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("ratesbp");
var dropmenu2 = new  FindPosition("checkingbp");
var dropmenu3 = new  FindPosition("savingsbp");
var dropmenu4 = new  FindPosition("loans");
var dropmenu5 = new  FindPosition("eservices");
var dropmenu6 = new  FindPosition("insurance");
var dropmenu7 = new  FindPosition("tools");



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

    }
    oM.showsub(menu);

}
