// 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("contact").className = "hover";
		//changeImages('corporate', 'corporateOn'); 
		};
	menu5.ondeactivate = function() {
		document.getElementById("contact").className = "";
		//changeImages('corporate', 'corporateOff');
		};
/*	menu4.onactivate = function() {
		document.getElementById("security").className = "hover";
		//changeImages('toAndFrom', 'toAndFromOn'); 
		};
	menu4.ondeactivate = function() {
		document.getElementById("security").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("&#1578;&#1575;&#1585;&#1610;&#1582; &#1605;&#1591;&#1575;&#1585; &#1575;&#1604;&#1576;&#1581;&#1585;&#1610;&#1606; &#1575;&#1604;&#1583;&#1608;&#1604;&#1609;", "profile_ar.htm");
		
		menu1.addItem("&#1605;&#1593;&#1604;&#1608;&#1605;&#1575;&#1578; &#1593;&#1606;&#1575;", "profile_ar.htm");
		
		

		menu1.addItem("&#1581;&#1602;&#1575;&#1574;&#1602; &#1608; &#1575;&#1585;&#1602;&#1575;&#1605;", "facts_ar.htm");
		
		menu1.addItem("&#1582;&#1575;&#1585;&#1591;&#1577;  &#1575;&#1604;&#1605;&#1608;&#1602;&#1593;", "locationmap_ar.htm");
		
		menu1.addItem("&#1605;&#1606;&#1575;&#1602;&#1589;&#1600;&#1575;&#1578;", "tenders_ar.htm");
		
		menu1.addItem("&#1578;&#1575;&#1585;&#1610;&#1582; &#1605;&#1591;&#1575;&#1585; &#1575;&#1604;&#1576;&#1581;&#1585;&#1610;&#1606; &#1575;&#1604;&#1583;&#1608;&#1604;&#1609;", "history_ar.htm");
		
		
		
		/*
		
		menu1.addItem("&#1588;&#1585;&#1603;&#1575;&#1578; &#1575;&#1604;&#1591;&#1610;&#1585;&#1575;&#1606; &#1601;&#1609; &#1605;&#1591;&#1575;&#1585; &#1575;&#1604;&#1576;&#1581;&#1585;&#1610;&#1606; &#1575;&#1604;&#1583;&#1608;&#1604;&#1609;", "airlineslist_ar.htm");
		*/
		menu1.addItem("&#1588;&#1585;&#1603;&#1575;&#1578; &#1575;&#1604;&#1591;&#1610;&#1585;&#1575;&#1606;", "airlineslist_ar.htm");
		
		menu1.addItem("&#1605;&#1588;&#1575;&#1585;&#1610;&#1593; &#1580;&#1583;&#1610;&#1583;&#1577;", "newprojects_ar.htm");

		menu1.addItem("&#1587;&#1610;&#1575;&#1585;&#1575;&#1578; &#1575;&#1604;&#1575;&#1580;&#1585;&#1577; &#1608; &#1587;&#1610;&#1575;&#1585;&#1575;&#1578; &#1575;&#1604;&#1575;&#1610;&#1580;&#1575;&#1585;", "taxi_ar.htm");

		
				menu1.addItem("&#1575;&#1581;&#1589;&#1575;&#1574;&#1610;&#1575;&#1578;", "http://www.caa.gov.bh/statistics_2010.htm");
		

		
	var menu2 = ms.addMenu(document.getElementById("services"));
	
		menu2.addItem("&#1582;&#1583;&#1605;&#1575;&#1578; &#1605;&#1608;&#1575;&#1602;&#1601; &#1575;&#1604;&#1587;&#1610;&#1575;&#1585;&#1575;&#1578;", "carpark_ar.htm");
	
		//menu2.addItem("Taxis", "taxis.htm");
		
		menu2.addItem("&#1575;&#1604;&#1576;&#1606;&#1608;&#1603;   &#1608; &#1575;&#1604;&#1589;&#1585;&#1575;&#1601;&#1577;", "foreignexchange_ar.htm");
		
		menu2.addItem("&#1584;&#1608;&#1609;  &#1575;&#1604;&#1575;&#1581;&#1578;&#1610;&#1575;&#1580;&#1575;&#1578; &#1575;&#1604;&#1582;&#1575;&#1589;&#1577;", "specialneeds_ar.htm");

		menu2.addItem("&#1594;&#1585;&#1601;&#1577;  &#1575;&#1604;&#1589;&#1604;&#1575;&#1577;", "prayer_ar.htm");
		
		menu2.addItem("&#1575;&#1604;&#1571;&#1605;&#1606; &#1608; &#1575;&#1604;&#1587;&#1604;&#1575;&#1605;&#1577;", "security_ar.htm");
		
		menu2.addItem("&#1575;&#1604;&#1578;&#1587;&#1608;&#1602; &#1608;&#1575;&#1604;&#1605;&#1591;&#1575;&#1593;&#1605;", "shopping_ar.htm");
		
		menu2.addItem("&#1605;&#1587;&#1575;&#1601;&#1585;&#1608; &#1575;&#1604;&#1583;&#1585;&#1580;&#1577; &#1575;&#1604;&#1571;&#1608;&#1604;&#1609;", "premiumcheckin_ar.htm");		
		
		menu2.addItem("&#1602;&#1575;&#1593;&#1575;&#1578; &#1575;&#1604;&#1590;&#1610;&#1575;&#1601;&#1577; &#1604;&#1588;&#1585;&#1603;&#1575;&#1578; &#1575;&#1604;&#1591;&#1610;&#1585;&#1575;&#1606;", "airlinelounges_ar.htm");	
		
		menu2.addItem("&#1582;&#1583;&#1605;&#1575;&#1578;  &#1575;&#1582;&#1585;&#1609;", "otherservice_ar.htm");

		
	var menu3 = ms.addMenu(document.getElementById("media"));
	
		menu3.addItem("&#1578;&#1589;&#1585;&#1610;&#1581;&#1575;&#1578; &#1589;&#1581;&#1575;&#1601;&#1610;&#1577;", "pressreleases_ar.htm");
		
		//menu3.addItem("&#1605;&#1580;&#1604;&#1577;  &#1605;&#1591;&#1575;&#1585; &#1575;&#1604;&#1576;&#1581;&#1585;&#1610;&#1606; &#1575;&#1604;&#1583;&#1608;&#1604;&#1609;", "bia_magazine_ar.htm");
		
		menu3.addItem("&#1575;&#1604;&#1589;&#1581;&#1601;  &#1575;&#1604;&#1605;&#1581;&#1604;&#1610;&#1577;", "local_newspaper_ar.htm");
		
		menu3.addItem("&#1575;&#1604;&#1605;&#1593;&#1585;&#1590;  &#1575;&#1604;&#1601;&#1608;&#1578;&#1608;&#1594;&#1585;&#1575;&#1601;&#1609;", "photo_gallery_ar.htm");
		
				menu3.addItem("&#1575;&#1604;&#1575;&#1593;&#1604;&#1575;&#1606; &#1575;&#1604;&#1578;&#1604;&#1601;&#1586;&#1610;&#1608;&#1606;&#1609;", "airpot_video_ar.htm");
		
	var menu4 = ms.addMenu(document.getElementById("useful"));
	
		//menu4.addItem("&#1608;&#1589;&#1604;&#1575;&#1578;  &#1581;&#1603;&#1608;&#1605;&#1610;&#1577;", "govlinks_ar.htm");
		
		//menu4.addItem("&#1605;&#1593;&#1604;&#1608;&#1605;&#1575;&#1578; &#1587;&#1610;&#1575;&#1581;&#1610;&#1577;", "tourguide_ar.htm");

		//menu4.addItem("&#1608;&#1589;&#1604;&#1575;&#1578;  &#1571;&#1582;&#1585;&#1609;", "otherlinks_ar.htm");
		
		
			var menu5 = ms.addMenu(document.getElementById("contact"));
	

		menu5.addItem("&#1582;&#1583;&#1605;&#1575;&#1578; &#1575;&#1604;&#1605;&#1591;&#1575;&#1585;", "airport_service_ar.php");

		menu5.addItem("&#1575;&#1604;&#1605;&#1601;&#1602;&#1608;&#1583;&#1575;&#1578;", "lostfound_ar.htm");

		menu5.addItem("&#1575;&#1604;&#1593;&#1604;&#1575;&#1602;&#1575;&#1578; &#1575;&#1604;&#1593;&#1575;&#1605;&#1577;", "public_relations_ar.php");
		
		menu5.addItem("&#1575;&#1584;&#1606;  &#1575;&#1604;&#1607;&#1576;&#1608;&#1591;", "land_permission_ar.php");
		
		menu5.addItem("&#1575;&#1604;&#1578;&#1587;&#1608;&#1610;&#1602;", "marketing_ar.php");
		
		// menu5.addItem("&#1604;&#1604;&#1575;&#1578;&#1589;&#1575;&#1604; &#1576;&#1606;&#1575;", "contactus_ar.php");
		
/*		var submenu1 = menu4.addMenu(menu4.items[3]); 
		
				submenu1.addItem("Pronto Car Wash", "wash.html");
		
				submenu1.addItem("Pronto Valet", "valet.html");
		
*/		
		
/*	
		
		
	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();
}

