	// 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.down, 0, 0, mtDropDown.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("menu1"));
		//==================================================================================================

		//==================================================================================================
		// add a sub-menu
		//==================================================================================================
		// to add a sub menu to an existing menu object, call it's addMenu method and pass it the item from
		// the parent menu which should act as it's actuator. To add a submenu to the fourth item of a menu
		// called "theMenu", you would do theMenu.addMenu(theMenu.items[3])
		//==================================================================================================



 // information	
var menu2 = ms.addMenu(document.getElementById("menu2"));
		
		menu2.addItem("Class", "http://thairailways.com/train-and-travel.intro.html");
		menu2.addItem("Eating", "http://thairailways.com/train-and-travel.food.html");
		menu2.addItem("Problems", "http://thairailways.com/train-and-travel.problem.html");
		menu2.addItem("Maps", "http://thairailways.com/train-and-travel.map.html"); 

 // destinations 
var menu3 = ms.addMenu(document.getElementById("menu3"));
	
        menu3.addItem("Cities", "http://thairailways.com/featured-travel.thailand-city.html");
        menu3.addItem("Beaches", "http://thairailways.com/featured-travel.thailand-beach.html");
        menu3.addItem("Nat. Parks", "http://thairailways.com/featured-travel.thailand-national-park.html");
        menu3.addItem("Visa Run", "http://thairailways.com/featured-travel.visa.html");
        menu3.addItem(">>More Destinations", "http://thairailways.com/featured-travel.intro.html");
        
 // accomodations    	
var menu4 = ms.addMenu(document.getElementById("menu4"));

		menu4.addItem("Bangkok Hotels & Resort", "http://thairailways.com/hotels/index.php?r=bangkok");	
		menu4.addItem("Chiangmai Hotels & Resorts", "http://thairailways.com/hotels/index.php?r=chiangmai");
		menu4.addItem("Chiangrai Hotels & Resorts", "http://thairailways.com/hotels/index.php?r=chiangrai");
		menu4.addItem("Hatyai Hotels & Resorts", "http://thairailways.com/hotels/index.php?r=hatyai");		
		menu4.addItem("Huahin Hotels & Resorts", "http://thairailways.com/hotels/index.php?r=huahin");
		menu4.addItem("Khao Lak Hotels & Resorts", "http://thairailways.com/hotels/index.php?r=khaolakphangnga");
		menu4.addItem("Koh Chang Hotels & Resorts", "http://thairailways.com/hotels/index.php?r=kohchang");
		menu4.addItem("Koh Lanta Hotels & Resorts", "http://thairailways.com/hotels/index.php?r=kohlanta");
		menu4.addItem("Krabi Hotels & Resorts", "http://thairailways.com/hotels/index.php?r=krabi");
		menu4.addItem("Koh Phi Phi Hotels & Resorts", "http://thairailways.com/hotels/index.php?r=kohphiphi");
		menu4.addItem("Koh Samui Hotels & Resorts", "http://thairailways.com/hotels/index.php?r=kohsamui");
		menu4.addItem("Pattaya Hotels & Resorts", "http://thairailways.com/hotels/index.php?r=pattaya");
		menu4.addItem("Phuket Hotels & Resorts", "http://thairailways.com/hotels/index.php?r=phuket");
		menu4.addItem("Trang Hotels & Resorts", "http://thairailways.com/hotels/index.php?r=trang");
		menu4.addItem("<b>All destinations Hotels & Resorts</b>", "http://thairailways.com/hotels/index.php?r=all");


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

		menu6.addItem("Bangkok", "http://thairailways.com/train-station.bangkok.html");
		menu6.addItem("Chiang Mai", "http://thairailways.com/train-station.chiangmai.html");
		menu6.addItem("Surrathani", "http://thairailways.com/train-station.suratthani.html");
		menu6.addItem("Hat Yai", "http://thairailways.com/train-station.hatyai.html");
		menu6.addItem("Udon Thanii", "http://thairailways.com/train-station.udonthani.html");

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