// JavaScript Document

function pageClose(){
	document.write("</div></div><div id='p_footer'>");
	document.write("<div id='divider'></div><table id='disclaimers'>");
	document.write("<tr><td class='imageHold_Left'>");
	document.write("<img src='/build/images/layout/ncua.png' />");
	document.write("</td>");
	document.write("<td class='imageHold_Center'>&copy; 2010 Members 1st Federal Credit Union<br />Mechanicsburg, Pennsylvania");
	document.write("<div id='p_footer_links'><a href=''>Internet Terms of Usage</a>&nbsp;|&nbsp;");
	document.write("<a href=''>Privacy Statement</a>&nbsp;|&nbsp;<a href=''>Fraud &amp; Security Center</a></div>");
	document.write("</td><td class='imageHold_Right'>");
	document.write("<img src='/build/images/layout/equal-housing.png' /></td></tr></table></div></div>");
	
	setupAds();
}

function pageOpen(){
	document.write("<div id='p_container'><div id='p_header'><div id='p_nav_upper'>");
	document.write("<a href='/Index.aspx' target='_parent' class='custText'>Home</a>");
	document.write("<a href='/AboutM1st.aspx' target='_parent' class='custText'>About Us</a>");
	document.write("<a href='/ContactUs.aspx' target='_parent' class='custText'>Contact Us</a>");
	document.write("<a href='/News.aspx' target='_parent' class='custText'>News &amp; Events</a>");
	document.write("<a href='/Publications.aspx' target='_parent' class='custText'>Publications</a>");
	document.write("<a href='/Resources.aspx' target='_parent' class='custText'>Resources</a>");
	document.write("<a href='/BranchLocator/Default.aspx' target='_parent' class='custText'>Locations</a>");
	document.write("</div></div>");
	//Navigation
	document.write("<div id='p_nav'>");
	buildNav();
	//document.write("JIM");
	document.write("</div>");
	//End Navigation
	document.write("<div id='p_cols'>");
	document.write("<div id='p_left'>");
	document.write("<img src='/build/images/layout/olb.png'/>");
	document.write("</div>");
	document.write("<div id='p_right'>");
	//setupAds();
	document.write("</div>");
	document.write("<div id='p_content'>");
	
	// Page Messages : Urgent and Open an Account
	document.write("<div id='msgHeader'>");
	document.write("<div id=msg_join><a href='https://m1online.members1st.org/OnlineBanking/OpenNewAccount/createnewaccount.px'><img src='/Images/PAGES/home/open_an_account.gif' border='0' alt='Open an account today' /></a></div>");
	document.write("<div id=msg_alert><a href='https://m1online.members1st.org/OnlineBanking/OpenNewAccount/createnewaccount.px'><img src='/Images/PAGES/home/alert.gif' border='0' alt='Open an account today' /></a></div>");
	document.write("</div>");
}

function buildNav(){
document.write("<ul id='MenuBar1' class='MenuBarHorizontal'>");
	//Electronic Services
	addSubSec("/M1Online.aspx","Electronic Services");
		addOpt("/M1OnlineAcctSum.aspx","Account Summary");
		addOpt("/M1OnlineBillPayer.aspx","Bill Payer");
		addOpt("/M1onlineEStatements.aspx","eStatements");
			addSubSec("/M1onlineFAQ.aspx","FAQS");
				addOpt("/M1OnlineFAQ.aspx?M1stOnline#M1stOnline","Members 1st Online FAQ");
				addOpt("/M1OnlineFAQ.aspx?Security#Security","Security Enhancement FAQ");
			endSubSec();
		addOpt("/M1onlineLoanApplications.aspx","Loan Application");
		addOpt("/M1onlineMessages.aspx","Messages");
		addOpt("/M1onlineMyProfile.aspx","My Profile");
		addOpt("/M1onlineServices.aspx","Services");
		addOpt("/M1onlineVisa.aspx","Visa");
	endSubSec();
	
	
	//Deposit Accounts
	addSubSec("/DepositAccounts.aspx","Deposit Accounts");
		addSubSec("/DepABANumber.aspx","ABA Routing/Transit Number");
			addOpt("/DepDirectDeposit.aspx","Direct Deposit");
			addOpt("/DepElectronicPayments.aspx","Electronic Payments");
		endSubSec();
		addOpt("/DA_Checking.aspx","Checking Account");
		addOpt("/ClubAccounts.aspx","Club Accounts");
		addOpt("/DisclosuresTerms.aspx","Disclosures / Terms");
		addOpt("/DepForms.aspx","Forms");
		addOpt("/healthsavings.aspx","Health Savings Account");
		addOpt("/IncomingWireInstructions.aspx","Incoming Wire Instructions");
		addOpt("/ezforex.aspx","Foreign Currency Exchange");
		addOpt("/IRAAccounts.aspx","IRA Accounts");
		addOpt("/depositBoxes.aspx","Self-Service Security &amp; Safe Deposit Boxes");
		addOpt("/SavingsCertificates.aspx","Savings / Certificates");
		addSubSec("/YouthClub.aspx","Youth Club");
			addOpt("/youthclubs/kids1st/index.htm","Kids 1st");
			addOpt("/youthclubs/imember/index.htm","iMember");
		endSubSec();
	endSubSec();
	
	// Card Services
	addSubSec("/CS_CardServices.aspx","Visa Credit Cards");
		addSubSec("CS_VisaPlatinumChoiceRewards.aspx","Visa Credit Cards");
			addOpt("/Visa_Disclosure.aspx","Apply Now");
			addOpt("/Documents/visa/Members1stVisaBalanceTransfer_2010.pdf","Visa Balance Transfer");
			addOpt("Rates_Visa.aspx","Rate Information");
			addOpt("/VisaCardServices.aspx","Visa Card Services");
		endSubSec();
		addOpt("/CS_VisaPlatinumChoiceRewards.aspx","Visa Platinum Choice Rewards");
		addOpt("/CS_VisaCheckCard.aspx","Visa Debit Cards");
		addOpt("/ReloadableVisa.aspx","Reloadable / Prepaid Visa Cards");
		addOpt("/CS_ATMCards.aspx","ATM Cards");
	endSubSec();
	
	//Loans
	addSubSec("/Loans.aspx","Loans");
		addOpt("/FinancialCalculators.aspx?Loans","Calculators");
		addSubSec("/ConsumerLoans.aspx","Consumer Loans");
			addOpt("/ConsumerAutoLoans.aspx","Auto Loans");
			addOpt("/ConsumerBoatRVLoans.aspx","Boat RV Loans");
			addOpt("/ConsumerPSL.aspx","PSL");
			addOpt("/ConsumerVacation.aspx","Vacation");
			addOpt("/ConsumerFreshStart.aspx","Fresh Start Loans");
			addOpt("/MemberValueProtection.aspx","Member Value Protection");
			addOpt("/ConsumerMemberTips.aspx","Vehicle Loan Tips");
			addOpt("/ConsumerGAP.aspx","Vehicle Protection");
		endSubSec();
		addOpt("/CreditReport.aspx","Credit Report");
		addOpt("/DisclosuresTerms.aspx?Loans","Disclosures");
		addOpt("/LoanApplication.aspx","Loan Applications");
		addOpt("/MemberValueProtection.aspx","Member Value Protection");
		addOpt("/Mortgages.aspx","Home Equity");
		addSubSec("/StudentServices.aspx","Student Services");
			addOpt("/StudentSvcsCoverdell.aspx","Coverdell Education Savings Account");
			addOpt("/StudentSvcsLoans.aspx","Educational Loans");
			addOpt("/StudentSvcsLinks.aspx","Financial Aid Links");
			addOpt("/ChildLIFE.aspx","Financial Education");
			addOpt("/Events.aspx","Financial Aid Seminars");
			addOpt("/EducationAward.aspx","Members 1st FCU Education Award");
			addSubSec("/StudentSvcsTools.aspx","Tools for School");
				addOpt("/SchoolSpeaker.aspx","School Speaker");
			endSubSec();
		endSubSec();
	endSubSec();
	
	//Mortgages
	addSubSec("/Mortgages.aspx","Mortgages");
		addOpt("/MortgageProducts.aspx","Mortgage Products");
		addOpt("/MortgageEquity.aspx","Home Equity");
	endSubSec();
	
	//Rates
	addSubSec("/Rates.aspx","Rates");
		addOpt("/FinancialCalculators.aspx?Rates","Calculators");
		addSubSec("/Rates_Deposits.aspx'","Deposit Account Rates");
			addOpt("/Rates_Certificates.aspx","Certificate Rates");
			addOpt("/Rates_IRA.aspx","IRA Certificate Account");
			addOpt("/Rates_SavingsChecking.aspx","Savings and Checking");
		endSubSec();
		addOpt("/DisclosuresTerms.aspx?Rates","Disclosures");
		addSubSec("Rates_Loans.aspx'","Loan Rates");
			addOpt("/Rates_HomeEquity.aspx","Home Equity");
			addOpt("/Rates_LuxuryLoans.aspx","Luxury Loans");
			addOpt("/Rates_MiscellaneousLoans.aspx","Miscellaneous Loans");
			addOpt("http://mortgageservices.members1st.org/home.asp","Mortgages");
			addOpt("/Rates_StudentLoans.aspx","Student Loans");
			addOpt("/Rates_VariableRateLoans.aspx","Variable Rate Loans");
			addOpt("/Rates_VehicleLoans.aspx","Vehicle Loans");
		endSubSec();
		addOpt("/Rates_Mortgages.aspx","Mortgage Rates");
		addOpt("/Rates_VISA.asp","Visa Card Rates");
	endSubSec();
	
	// Business Services
	addSubSec("/Business.aspx","Business Services");
		addOpt("/BusinessLending.aspx","Business Lending");
		addOpt("/BusinessSavingChecking.aspx","Business Deposits");
		addOpt("/BusinessCreditCards.aspx","Credit/Debit Cards");
		addOpt("/BusinessMerchantServices.aspx","Payment Processing Services");
		addOpt("/ach.aspx","ACH Origination");
	endSubSec();
	
	//Investment Services
	addSubSec("/InvestmentServices.aspx","Investing");
		addOpt("/InvestmentServicesFreeConsult.aspx","FREE Consultation");
	endSubSec();
	
	//Insurance Services
	addSubSec("/Services_Insurance.aspx","Insurance Services");
		addOpt("/Services_Insurance.aspx","Get a FREE quote");
	endSubSec();
	
	//Membership Info
	addSubSec_final("/Membership.aspx","Membership");
		addSubSec("MembershipJoin.aspx","Become A Member");
			addOpt("/MakeTheSwitch.aspx","Make The Switch");
		endSubSec();
		addOpt("/MembershipEligibilityRequirements.aspx","Eligibility Requirements");
		addOpt("/MemberLoyaltyRewards.aspx?index=6","Member Loyalty Rewards");
		addSubSec("/SelectEmployerGroups.aspx","Select Employer Group");
			addOpt("/LetterOfIntent.aspx","Sample Letter");
		endSubSec();
		addOpt("/MembershipPatriotAct.aspx","Patriot Act");
	endSubSec();
	
	
			
			
	//addSubSec("","");
	//addOpt("","");
	//endSubSec();
document.write("</ul>");


var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});

	



// Add an LI to the menu
function addOpt(optLink,optText){
	document.write("<li><a href='"+optLink+"'>"+optText+"</a></li>");
}

function addSubSec(optLink,optText){
	document.write("<li><a class='MenuBarItemSubmenu' href='"+optLink+"'>"+optText+"</a>");
	document.write("<ul>");
}

function addSubSec_final(optLink,optText){
	document.write("<li><a class='MenuBarItemSubmenu' id='noBorder' href='"+optLink+"'>"+optText+"</a>");
	document.write("<ul>");
}

function endSubSec(){
	document.write("</ul></li>");	
}

}


