// set up drop downs anywhere in the body of the page. I think the bottom of the page is better.. 
// but you can experiment with effect on loadtime.
if (mtDropDown.isSupported()) {

    //==================================================================================================
    // create a set of dropdowns
    //==================================================================================================
    // the first param should always be down, as it is here
    //
    // The second and third param are the top and left offset positions of the menus from their actuators
    // respectively. To make a menu appear a little to the left and bottom of an actuator, you could use
    // something like -5, 5
    //
    // The last parameter can be .topLeft, .bottomLeft, .topRight, or .bottomRight to inidicate the corner
    // of the actuator from which to measure the offset positions above. Here we are saying we want the 
    // menu to appear directly below the bottom left corner of the actuator
    //==================================================================================================

    var ms = new mtDropDownSet(mtDropDown.direction.right, 1, -3, mtDropDown.reference.topRight);
    
    //==================================================================================================
    var menu1 = ms.addMenu(document.getElementById("menu1"));

    menu1.addItem("- History of Our Firm", "about_us.php?content_block=about_us");
	menu1.addItem("- Mission Statement", "about_us.php?content_block=mission_statement");
	menu1.addItem("- Meet Our Staff", "meet_our_staff.php?content_block=gus_bates_3");
	menu1.addItem("- Corporate Brochure", "about_us.php?content_block=corporate_brochure");
	menu1.addItem("- Professional Associations", "about_us.php?content_block=professional_associations");
	menu1.addItem("- Organizations We Support", "about_us.php?content_block=organizations_we_support");
  
    //==================================================================================================	
    var menu2 = ms.addMenu(document.getElementById("menu2"));
	menu2.addItem("- Group Medical", "group_products_services.php?content_block=group_medical");
	menu2.addItem("- Group Dental & Vision", "group_products_services.php?content_block=group_dental_vision");
	menu2.addItem("- Group Life, AD&D, and Voluntary Life", "group_products_services.php?content_block=group_life");
	menu2.addItem("- Group Disability", "group_products_services.php?content_block=group_disability");
	menu2.addItem("- Group Long-Term Care", "group_products_services.php?content_block=group_long_term_care");
	menu2.addItem("- Voluntary Supplemental Products", "group_products_services.php?content_block=voluntary_supplemental_products");
	menu2.addItem("- COBRA & HIPAA Administration", "group_products_services.php?content_block=cobra");
	menu2.addItem("- Section 125, 105, and 223 Administration", "group_products_services.php?content_block=section");
	menu2.addItem("- PEO Relationships", "group_products_services.php?content_block=peo");
	menu2.addItem("- Property & Casualty Services", "group_products_services.php?content_block=property_casualty_services");
	menu2.addItem("- Retirement Plans", "group_products_services.php?content_block=retirement_plans");
	menu2.addItem("- Executive Compensation", "group_products_services.php?content_block=executive_compensation");
	menu2.addItem("- Buy / Sell Agreements", "group_products_services.php?content_block=buy_sell");
    
	//==================================================================================================	
    var menu3 = ms.addMenu(document.getElementById("menu3"));
	menu3.addItem("- Individual Health Plans", "individual_products_services.php?content_block=individual_health_plans");
	menu3.addItem("- Individual Life Insurance", "individual_products_services.php?content_block=individual_life_insurance");
	menu3.addItem("- Individual Disability Income Protection", "individual_products_services.php?content_block=individual_disability_income_protection");
	menu3.addItem("- Long-Term Care Insurance", "individual_products_services.php?content_block=long_term_care_insurance");
	//menu3.addItem("- Annuities", "individual_products_services.php?content_block=mutual_funds");
	menu3.addItem("- Wealth Transfer ", "individual_products_services.php?content_block=estate_planning");
	menu3.addItem("- Educational Savings Plans", "individual_products_services.php?content_block=educational_savings_plans");
    
	//==================================================================================================	
    var menu4 = ms.addMenu(document.getElementById("menu4"));
	menu4.addItem("- Group Products/Services", "request_a_quote_group.php");
	menu4.addItem("- Individual Products/Services", "page.php?s=new_lead");

    //==================================================================================================		

    // write drop downs into page
    //==================================================================================================
    // this method writes all the HTML for the menus into the page with document.write(). It must be
    // called within the body of the HTML page.
    //==================================================================================================

    mtDropDown.renderAll();

}

function init() {
    // whatever stuff you need to do onload goes here.

    //==========================================================================================
    // if supported, initialize mtdropdowns
    //==========================================================================================
    // Check isSupported() so that menus aren't accidentally sent to non-supporting browsers.
    // This is better than server-side checking because it will also catch browsers which would
    // normally support the menus but have javascript disabled.
    //
    // If supported, call initialize() and then hook whatever image rollover code you need to do
    // to the .onactivate and .ondeactivate events for each menu.
    //==========================================================================================
    if (mtDropDown.isSupported()) {
        mtDropDown.initialize();

        // hook all the image swapping of the main toolbar to menu activation/deactivation
        // instead of simple rollover to get the effect where the button stays highlighted until
        // the menu is closed.
        //menu1.onactivate = function() { swapImage("button1", preloaded[1][1].src) };
        //menu1.ondeactivate = function() { swapImage("button1", preloaded[1][0].src) };

    }
}
