// JavaScript Document

// Dropdown menu text before end body tag

	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

		//==================================================================================================

		//IE menu position

		if(navigator.appName == "Microsoft Internet Explorer")
			{
				var ms = new TransMenuSet(TransMenu.direction.down, 0, 27, TransMenu.reference.topLeft);
			}

			
		else

			{

				var ms = new TransMenuSet(TransMenu.direction.down, 0, 27, TransMenu.reference.topLeft);

			}


		//==================================================================================================
		// create a dropdown menu
		//==================================================================================================
		// the first parameter should be the HTML element which will act actuator for the menu
		//==================================================================================================

		/* sub menus
		var submenu1 = menu1.addMenu(menu1.items[0]);
		submenu1.addItem("Galeria", "");
		submenu1.addItem("Duomo", "");
		submenu1.addItem("Castle", "");
		*/
		
		//==================================================================================================
		//==================================================================================================


		var menu1 = ms.addMenu(document.getElementById("videos"));
		menu1.addItem("Upload a Magic Video", "http://www.magicianschool.com/uploader.php");
		menu1.addItem("Video Categories", "http://www.magicianschool.com/category.php");
		menu1.addItem("Featured Videos", "http://www.magicianschool.com/seemore.php?load=featured");
		menu1.addItem("Most Viewed Videos", "http://www.magicianschool.com/seemore.php?load=viewed");
		menu1.addItem("Most Recent Videos", "http://www.magicianschool.com/seemore.php?load=recent");
		menu1.addItem("Most Commented", "http://www.magicianschool.com/seemore.php?load=comments");

		var menu2 = ms.addMenu(document.getElementById("resources"));
		menu2.addItem("Donate", "http://www.magicianschool.com/forum/donate/");
		menu2.addItem("Chat", "http://www.magicianschool.com/forum/chat/");
		menu2.addItem("Magic Articles", "http://www.magicianschool.com/articles.php");
		menu2.addItem("Member Map", "http://www.magicianschool.com/forum/phoogle.php?mode=everyone");
		menu2.addItem("Biographies", "http://www.magicianschool.com/biographies.php");
		menu2.addItem("Terminology", "http://www.magicianschool.com/terminology.php");

		var menu3 = ms.addMenu(document.getElementById("info"));
		menu3.addItem("Contact Us", "#");
		menu3.addItem("Advertise with us", "http://www.magicianschool.com/ad_info.php");
		menu3.addItem("Donate", "http://www.magicianschool.com/forum/donate/");
		menu3.addItem("Links", "http://www.magicianschool.com/links.php");
		menu3.addItem("FAQ's", "http://www.magicianschool.com/forum/faq.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();

	}