// 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()) {

		//==================================================================================================
		// 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("nav_home"));
		menu1.addItem("Message from the Mayor", ""); 
		menu1.addItem("Mayor and Town Council", ""); 
		menu1.addItem("Town Manager", ""); 
		menu1.addItem("Treasurer", ""); 
		menu1.addItem("Meetings & Agendas", ""); 
		menu1.addItem("Engineering & Public Works", ""); 
		menu1.addItem("Office of Zoning & Planning", ""); // send no URL if nothing should happen onclick

		var submenu0 = menu1.addMenu(menu1.items[6]);
		submenu0.addItem("Planning Commision", "http://youngpup.net/italy/photos/cinqueterre/104_0458.jpg");
		submenu0.addItem("Board of Zoning Appeals", "http://youngpup.net/italy/photos/cinqueterre/thumb/104_0474.jpg");
		submenu0.addItem("Forms", "http://youngpup.net/italy/photos/cinqueterre/104_0472.jpg");
		submenu0.addItem("Ordinances", "http://youngpup.net/italy/photos/cinqueterre/105_0522.jpg");
	*/
    //var submenu00 = submenu0.addMenu(submenu0.items[0]);
    //submenu00.addItem("foo");
    //submenu00.addItem("bar");
		//==================================================================================================

		//==================================================================================================
		var menu1 = ms.addMenu(document.getElementById("nav_government"));
		menu1.addItem("Message from the Mayor", "government/frommayor.php"); 
		menu1.addItem("Mayor and Town Council", "government/towncouncil.php"); 
		menu1.addItem("Town Manager", "government/townmanager.php"); 
		menu1.addItem("Treasurer's Office", "government/treasurer.php"); 
		menu1.addItem("Meetings & Agendas", "agendas/"); 
		menu1.addItem("Zoning & Planning", ""); // send no URL if nothing should happen onclick
		menu1.addItem("Building & Property Maintenance", "permits/permits.php");
		menu1.addItem("Engineering & Public Works", "government/publicworks.php"); 

		var submenu0 = menu1.addMenu(menu1.items[5]);
		var submenu2 = menu1.addMenu(menu1.items[6]);
		
		submenu0.addItem("Zoning Administration", "");
		submenu0.addItem("Planning Commision", "government/planningcom.php");
		submenu0.addItem("Board of Zoning Appeals", "government/zoneappeals.php");
		submenu0.addItem("Town Ordinance", "government/ordinance.php");
		submenu0.addItem("Map & Definitions", "government/zonemapdef.php");

		submenu2.addItem("Building Permits & Inspections", "permits/permits.php");
		submenu2.addItem("Certificate of Occupancy", "permits/permits.php#occupancy");
		submenu2.addItem("Demolition Permit", "permits/permits.php#demolition");
		submenu2.addItem("Driveway Permits", "permits/permits.php#driveway");
		submenu2.addItem("Electrical Permit Requirements", "permits/permits.php#electrical");
		submenu2.addItem("Elevator Permit Requirements", "permits/permits.php#elevator");
		submenu2.addItem("Fire Permit Requirements", "permits/permits.php#fire");
		submenu2.addItem("Gas Permit Requirements", "permits/permits.php#gas");
		submenu2.addItem("Mechanical Permit Requirements", "permits/permits.php#mechanical");
		submenu2.addItem("Plumbing Permit Requirements", "permits/permits.php#plumbing");
		submenu2.addItem("Pool Permit", "permits/permits.php#pool");
		submenu2.addItem("Signs Permit", "permits/permits.php#signs");
		submenu2.addItem("Special Permit Requirements", "permits/permits.php#special");
		submenu2.addItem("Storage Tank Permit", "permits/permits.php#tank");
		submenu2.addItem("Tent Permit", "permits/permits.php#tent");
    var submenu05 = submenu0.addMenu(submenu0.items[0]);
    submenu05.addItem("Forms", "zoneforms/");
    var submenu04 = submenu0.addMenu(submenu0.items[1]);
    submenu04.addItem("P.C. Agendas & Minutes", "planningMA/");
    //submenu00.addItem("bar");
		//==================================================================================================

		//==================================================================================================
		var menu2 = ms.addMenu(document.getElementById("nav_residents"));
		menu2.addItem("Parks & Recreation");
		menu2.addItem("Services & Utilites");
		menu2.addItem("Maple Hill Cemetary", "residents/services/maplehill.php");

		var submenu1 = menu2.addMenu(menu2.items[0]);
		var submenu3 = menu2.addMenu(menu2.items[1]);

		submenu1.addItem("Graham Recreation Park", "residents/recreation/recpark.php");
		submenu1.addItem("Harmony Acres Swimming Pool", "residents/recreation/harmonyacres.php");
		//submenu1.addItem("Autumn Jamboree", "residents/recreation/jamboree.php");
		//submenu1.addItem("Graham Square", "residents/recreation/square.php");
		submenu1.addItem("Special Events", "residents/recreation/events.php");
		
		submenu3.addItem("Graham Transit", "residents/services/transit.php");
		submenu3.addItem("Water System", "residents/services/water.php");
		submenu3.addItem("Sanitary Sewer", "residents/services/waste.php");
		submenu3.addItem("Recycling", "residents/services/recycling.php");
		submenu3.addItem("Electric, Gas & Phone", "residents/services/egp.php");
		submenu3.addItem("Household & Commercial Garbage", "residents/services/Garbage.php");
		//==================================================================================================

		//==================================================================================================
		var menu3 = ms.addMenu(document.getElementById("nav_businesses"));
		menu3.addItem("Job Postings", "business/jobs.php");
		menu3.addItem("Bids", "business/bids.php");
		menu3.addItem("RFP", "business/rfp.php");
		//==================================================================================================

		//==================================================================================================//==================================================================================================
		var menu4 = ms.addMenu(document.getElementById("nav_news"));
		menu4.addItem("Town News", "news/town.php");
		//menu4.addItem("Press Releases", "news/press/index.php");
		menu4.addItem("Important Documents", "news/important");
		menu4.addItem("Community Calendar", "news/community.php");
		//==================================================================================================

		//==================================================================================================
		var menu5 = ms.addMenu(document.getElementById("nav_emergencies"));
		menu5.addItem("911 Center", "emergency/911.php");
		menu5.addItem("Police Department", "emergency/police.php");
		menu5.addItem("Fire Department", "emergency/fire.php");
		menu5.addItem("EMS/Rescue Squad", "emergency/ems.php");
		menu5.addItem("Hazard Mitigation", "emergency/mitigation.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();
	}

