// menu structure


function init() {
if (TransMenu.isSupported()) {
	TransMenu.initialize();
	menu1.onactivate = function() { 
		document.getElementById("aboutus").className = "hover";
		//changeImages('flight', 'flightOn'); 
		};
	menu1.ondeactivate = function() {
		document.getElementById("aboutus").className = "";
		//changeImages('flight', 'flightOff');
		};

	
	menu2.onactivate = function() { 
		document.getElementById("services").className = "hover";
		//changeImages('terminal', 'terminalOn'); 
		};
	menu2.ondeactivate = function() {
		document.getElementById("services").className = "";
		//changeImages('terminal', 'terminalOff');
		};

	menu3.onactivate = function() { 
		document.getElementById("media").className = "hover";
		//changeImages('shopping', 'shoppingOn'); 
		};
	menu3.ondeactivate = function() { 
		document.getElementById("media").className = ""; 
		//changeImages('shopping', 'shoppingOff');
		};

	menu4.onactivate = function() { 
		document.getElementById("useful").className = "hover";
		//changeImages('shopping', 'shoppingOn'); 
		};
	menu4.ondeactivate = function() { 
		document.getElementById("useful").className = ""; 
		//changeImages('shopping', 'shoppingOff');
		};

	menu5.onactivate = function() {
		document.getElementById("contactus").className = "hover";
		//changeImages('toAndFrom', 'toAndFromOn'); 
		};
	menu5.ondeactivate = function() {
		document.getElementById("contactus").className = "";
		//changeImages('toAndFrom', 'toAndFromOff');
		};

/*	menu5.onactivate = function() {
		document.getElementById("corporate").className = "hover";
		changeImages('corporate', 'corporateOn'); 
		};
	menu5.ondeactivate = function() {
		document.getElementById("corporate").className = "";
		changeImages('corporate', 'corporateOff');
		};
	
	menu6.onactivate = function() {
		document.getElementById("travel").className = "hover";
		changeImages('travel', 'travelOn'); 
		};
	menu6.ondeactivate = function() {
		document.getElementById("travel").className = "";
		changeImages('travel', 'travelOff');
		
		};		*/
	}
}

// end menu structre






// JavaScript Document
// 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, 1, 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("aboutus"));
	
		menu1.addItem("About Us ", "profile.htm");
		
		menu1.addItem("Facts and Figures ", "facts.htm");
		
		menu1.addItem("Location ", "locationmap.htm");
		
		menu1.addItem("Tenders ", "tenders.htm");
		
		menu1.addItem("History ", "history.htm");

		menu1.addItem("Airlines at BIA ", "airlineslist.htm");
		
		menu1.addItem("New Projects", "newprojects.htm");
		
		menu1.addItem("Taxi and Rental", "taxi.htm");
		
		menu1.addItem("Statistics", "http://www.caa.gov.bh/air_stati/index.php");

		
	var menu2 = ms.addMenu(document.getElementById("services"));
	
		menu2.addItem("Car Parking", "carpark.htm");
	
		//menu2.addItem("Taxis", "taxis.htm");
		
		menu2.addItem("Banking and Foreign Exchange", "foreignexchange.htm");
		
		menu2.addItem("Special Needs", "specialneeds.htm");

		menu2.addItem("Prayer Room", "prayer.htm");
		
		menu2.addItem("Security and Safety", "security.htm");
		
		menu2.addItem("Shopping and Eating", "shopping.htm");
		
		menu2.addItem("Premium Check-In", "premiumcheckin.htm");		
		
		menu2.addItem("Airline Lounges", "airlinelounges.htm");
		
		menu2.addItem("Other Services", "otherservice.htm");


		
	var menu3 = ms.addMenu(document.getElementById("media"));
	
		menu3.addItem("Press Releases", "pressreleases.htm");
		
		//menu3.addItem("BIA Publications", "bia_magazine.htm");
		
		menu3.addItem("Local Newspapers", "local_newspaper.htm");
		
		menu3.addItem("Photo Gallery", "photo_gallery.htm");
		
		menu3.addItem("TV Commercial", "airport_ad.htm");		
		
	var menu4 = ms.addMenu(document.getElementById("useful"));
	
		menu4.addItem("Government Links", "govlinks.htm");
		
		menu4.addItem("Tour Guide", "tourguide.htm");

		menu4.addItem("Other Links", "otherlinks.htm");
		
/*		var submenu1 = menu4.addMenu(menu4.items[3]); 
		
				submenu1.addItem("Pronto Car Wash", "wash.html");
		
				submenu1.addItem("Pronto Valet", "valet.html");
		
*/		
		
	var menu5 = ms.addMenu(document.getElementById("contactus"));
	
	//	menu5.addItem("Airport Services and FAQ’s", "airport_service.php");
	
	menu5.addItem("Airport Services and FAQ’s", "faq.htm");
	

		menu5.addItem("Lost and Found", "lostfound.htm");
		
		menu5.addItem("Public Relations", "public_relations.php");
		
		menu5.addItem("Landing Permission", "land_permission.php");
		
		menu5.addItem("Marketing", "marketing.php");
		
		// menu5.addItem("Contact Us", "contactus.php");
		
/*		
	var menu6 = ms.addMenu(document.getElementById("travel"));
	
		menu6.addItem("Hotels", "index.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.
	//==================================================================================================
	TransMenu.renderAll();
}
