	var mac_firefox = false;

 	function init(test_for_mac_firefox) {
		//==========================================================================================
		// if supported, initialize TransMenus
		//==========================================================================================
		// 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 (test_for_mac_firefox) {
			// firefox for mac hack -- turns off slider menu
			var ua = navigator.userAgent.toLowerCase();
			if (ua.indexOf("macintosh")>0 && ua.indexOf("firefox")>0) mac_firefox = true;
		}

		if (TransMenu.isSupported() && mac_firefox==false) {
			TransMenu.initialize();

			// hook all the highlight swapping of the main toolbar to menu activation/deactivation
			// instead of simple rollover to get the effect where the button stays hightlit until
			// the menu is closed.
			menu1.onactivate = function() { document.getElementById("menu_1").className = "menu_main the_school_over"; };
			menu1.ondeactivate = function() { document.getElementById("menu_1").className = "menu_main the_school"; };

			menu2.onactivate = function() { document.getElementById("menu_2").className = "menu_main winter_term_over"; };
			menu2.ondeactivate = function() { document.getElementById("menu_2").className = "menu_main winter_term"; };

			menu3.onactivate = function() { document.getElementById("menu_3").className = "menu_main summer_course_over"; };
			menu3.ondeactivate = function() { document.getElementById("menu_3").className = "menu_main summer_course"; };

			menu4.onactivate = function() { document.getElementById("menu_4").className = "menu_main career_planning_over"; };
			menu4.ondeactivate = function() { document.getElementById("menu_4").className = "menu_main career_planning"; };
			
			menu5.onactivate = function() { document.getElementById("menu_5").className = "menu_main parents_over"; };
			menu5.ondeactivate = function() { document.getElementById("menu_5").className = "menu_main parents"; };
			
			menu6.onactivate = function() { document.getElementById("menu_6").className = "menu_main alumni_over"; };
			menu6.ondeactivate = function() { document.getElementById("menu_6").className = "menu_main alumni"; };
			
			menu7.onactivate = function() { document.getElementById("menu_7").className = "menu_main supporting_sab_over"; };
			menu7.ondeactivate = function() { document.getElementById("menu_7").className = "menu_main supporting_sab"; };
			
			menu8.onactivate = function() { document.getElementById("menu_8").className = "menu_main news_events_over"; };
			menu8.ondeactivate = function() { document.getElementById("menu_8").className = "menu_main news_events"; };
			
			menu9.onactivate = function() { document.getElementById("menu_9").className = "menu_main store_over"; };
			menu9.ondeactivate = function() { document.getElementById("menu_9").className = "menu_main store"; };
			
			menu10.onactivate = function() { document.getElementById("menu_10").className = "menu_main contact_us_over"; };
			menu10.ondeactivate = function() { document.getElementById("menu_10").className = "menu_main contact_us"; };
		}
	}

	// 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 (TransMenu.isSupported() && mac_firefox==false) {

		//==================================================================================================
		// 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 TransMenuSet(TransMenu.direction.down, 1, 0, TransMenu.reference.bottomLeft);

		//==================================================================================================
		// create a dropdown menu
		//==================================================================================================
		// the first parameter should be the HTML element which will act actuator for the menu
		//==================================================================================================
		var menu1 = ms.addMenu(document.getElementById("menu_1"));

		menu1.addItem("Overview", "/school/overview.php");

		menu1.addItem("History", "/school/history/");

		menu1.addItem("The School & NYCB", "/school/nycballet.php");

		menu1.addItem("Faculty", "/school/faculty.php");

		menu1.addItem("Board & Staff", "/school/boardstaff/");

		menu1.addItem("Neighborhood", "/school/neighborhood.php");

		menu1.addItem("Virtual Tours", "/school/virtualtours.php");

		menu1.addItem("Visiting Us", "/school/visiting.php");

		menu1.addItem("FAQ", "/school/faq.php");

		menu1.addItem("Financials", "/school/annualreport.php");

		menu1.addItem("Job Openings", "/school/jop_openings.php");
		//==================================================================================================

		//==================================================================================================
		var menu2 = ms.addMenu(document.getElementById("menu_2"));

		menu2.addItem("Admission", "/winterterm/admission/");

		menu2.addItem("Calendar", "/winterterm/school_year_calendar.php");

		menu2.addItem("Curriculum", "/winterterm/curriculum.php");

		menu2.addItem("Class Schedule", "/winterterm/classschedule.php");

		menu2.addItem("Academics", "/winterterm/academics.php");

		menu2.addItem("Housing", "/winterterm/housing.php");

		menu2.addItem("Student Life", "/winterterm/student_life/");

		menu2.addItem("Performing", "/winterterm/performing/");

		menu2.addItem("Choreography Projects", "/winterterm/choreographyprojects.php");
		//==================================================================================================

		//==================================================================================================
		var menu3 = ms.addMenu(document.getElementById("menu_3"));

		menu3.addItem("Overview", "/summercourse/overview.php");

		menu3.addItem("Summer Admission", "/summercourse/admission/");

		menu3.addItem("National Auditions", "/summercourse/national_auditions/");

		menu3.addItem("International Auditions", "/summercourse/international_auditions/");

		menu3.addItem("Curriculum", "/summercourse/curriculum_summer.php");

		menu3.addItem("Class Schedule", "/summercourse/classschedule.php");

		menu3.addItem("Faculty", "/summercourse/faculty.php");

		menu3.addItem("Summer Housing", "/summercourse/summerhousing.php");

		menu3.addItem("Activities", "/summercourse/activities.php");

		menu3.addItem("Summer FAQ", "/summercourse/summerfaq.php");

		menu3.addItem("Los Angeles Workshop", "/summercourse/laworkshop/");
		//==================================================================================================

		//==================================================================================================
		var menu4 = ms.addMenu(document.getElementById("menu_4"));

		menu4.addItem("Career Guidance", "/careerplanning/careerguidance.php");

		menu4.addItem("Professional Employment", "/careerplanning/professional_employment/");

		menu4.addItem("NYCB Apprentice Program", "/careerplanning/nycbapprenticeprogram.php");
		//==================================================================================================

		//==================================================================================================
		var menu5 = ms.addMenu(document.getElementById("menu_5"));
		//==================================================================================================

		//==================================================================================================
		var menu6 = ms.addMenu(document.getElementById("menu_6"));

		menu6.addItem("Alumni Events", "/alumni/alumnievents_/");

		menu6.addItem("Online Community", "/alumni/online_community.php");
		//==================================================================================================

		//==================================================================================================
		var menu7 = ms.addMenu(document.getElementById("menu_7"));

		menu7.addItem("Membership", "/support/membership/");

		menu7.addItem("Planned Giving and Bequests", "/support/planned_giving_and_bequests/");

		menu7.addItem("Events", "/support/events.php");

		menu7.addItem("Corporate Support", "/support/corporatesupport.php");

		menu7.addItem("Foundation Gifts", "/support/foundationgifts.php");

		menu7.addItem("Endowment", "/support/endowment.php");
		//==================================================================================================

		//==================================================================================================
		var menu8 = ms.addMenu(document.getElementById("menu_8"));

		menu8.addItem("School News", "/news/school_news/");

		menu8.addItem("Newsletter", "/news/newsletter.php");

		menu8.addItem("Events", "/news/events.php");

		menu8.addItem("Workshop Performances", "/news/workshop_performances/");

		menu8.addItem("The Mae L. Wien Awards", "/news/wien/");

		menu8.addItem("Prix de Lausanne", "/news/prix_de_lausanne.php");
		//==================================================================================================

		//==================================================================================================
		var menu9 = ms.addMenu(document.getElementById("menu_9"));

		menu9.addItem("Products", "/store/products.php");

		menu9.addItem("Checkout", "/store/checkout.php");

		menu9.addItem("Store Help", "/store/help.php");

		menu9.addItem("Store Policy", "/store/policy_.php");
		//==================================================================================================

		//==================================================================================================
		var menu10 = ms.addMenu(document.getElementById("menu_10"));

		menu10.addItem("General Information", "/contact/general_information.php");

		menu10.addItem("Press Inquiries", "/contact/press_inquiries.php");

		menu10.addItem("Alumni Inquiries", "/contact/alumni_inquiries.php");

		menu10.addItem("SAB Association/Donor Circle Inquiries", "/contact/sab_inner_inq.php");

		menu10.addItem("Registrar's Inquiries", "/contact/registrars_inquiries.php");

		menu10.addItem("Student Life Inquiries", "/contact/student_life_inquiries.php");

		menu10.addItem("Events Mailing List", "/contact/events_mailing_list.php");
		//==================================================================================================

		//==================================================================================================
		// 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.
		//==================================================================================================
		TransMenu.renderAll();
	}

