var ua = navigator.userAgent.toLowerCase();

function openWindow(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
}

function showHide(id) { // added by jshelton (2005-08-25)
	sel = document.getElementById(id);
	if (sel.style.display == 'block') {
		sel.style.display = 'none';
	} else {
		sel.style.display = 'block';
	}	
}

function get_drop_menu(id, menu) {
	var x = 0;
	var y = 0;
	var div = document.getElementById(id);
	if (div.offsetParent) {
		while (div.offsetParent) {
			x += div.offsetLeft
			y += div.offsetTop
			div = div.offsetParent;
		}
	} else if (div.x) {
		x += div.x;
		y += div.y;
	}	
	if (id == 'business') {
		MM_showMenu(menu,x-5,y+19,null,'');	
	} else {
		MM_showMenu(menu,x-11,y+19,null,'');	
	}
}

function get_tab(box, tab, ct) {
	for(i=1; i<=ct; i++) {
		if (document.getElementById(box+'_'+i+'_1').style.display == '') {
			document.getElementById(box+'_'+i+'_1').style.display = 'none';
			document.getElementById(box+'_'+i+'_0').style.display = '';	
			if (document.getElementById(box+'_tab_'+i)) {
				document.getElementById(box+'_tab_'+i).style.display = 'none';
			}
		} else {
			document.getElementById(box+'_'+i+'_0').style.display = '';
			if (document.getElementById(box+'_tab_'+i)) {
				document.getElementById(box+'_tab_'+i).style.display = 'none';
			}
		}
		if (i < (tab-1)) {
			document.getElementById(box+'_'+i+'_c').src = '/images/tab_rc0.gif';
		} else if (i == (tab-1)) {
			document.getElementById(box+'_'+i+'_c').src = '/images/tab_rc2.gif';
		} else if ((i == (tab+1)) && (i != ct)) {
			document.getElementById(box+'_'+i+'_c').src = '/images/tab_rc0.gif';		
		}
	}
	document.getElementById(box+'_'+tab+'_0').style.display = 'none';	
	document.getElementById(box+'_'+tab+'_1').style.display = '';	
	if (document.getElementById(box+'_tab_'+tab)) {
		document.getElementById(box+'_tab_'+tab).style.display = '';
	}
}

function pop_imap() {
	open('/imap/launch.php','imap','width=800,height=636,toolbar=0,resize=0');	
}

function pop_lmap() {
	open('/terminals/lmap.html','lmap','width=500,height=636,toolbar=0,resize=0');	
}

function set_drop_menu() {
	if (window.menu_0) return;
	window.menu_0 = new Menu("root",200,21,"Arial, Helvetica, sans-serif",11,"#FFFFFF","#FFFFFF","#074987","#074987","#074987","#074987","#074987","left","middle",3,0,1000,-5,7,true,true,true,3,true,true,"menu");
	menu_0.addMenuItem("Arrivals","location='/flights/index.php?type=a'");
	menu_0.addMenuItem("Departures","location='/flights/index.php?type=d'");	
	menu_0.addMenuItem("Airlines","location='/airlines/index.php'");
	menu_0.hideOnMouseOut=true;
	
	window.menu_1 = new Menu("root",200,21,"Arial, Helvetica, sans-serif",11,"#FFFFFF","#FFFFFF","#074987","#074987","#074987","#074987","#074987","left","middle",3,0,1000,-5,7,true,true,true,3,true,true,"menu");
	menu_1.addMenuItem("Interactive&nbsp;Map","location='javascript:pop_imap();'");
	menu_1.addMenuItem("Airlines","location='/airlines/index.php'");
	menu_1.addMenuItem("Terminals","location='/terminals/index.php'");
	menu_1.addMenuItem("Parking","location='/parking/index.php'");
	menu_1.addMenuItem("Connecting/Transfers","location='/connect/index.php'");
	menu_1.addMenuItem("Ground&nbsp;Transportation","location='/transport/index.php'");
	menu_1.addMenuItem("On&minus;Airport&nbsp;Hotels","location='/hotels/index.php'");	
	menu_1.addMenuItem("Art&nbsp;Program","location='/art/index.php'");	
	menu_1.hideOnMouseOut=true;
	
	window.menu_2 = new Menu("root",200,21,"Arial, Helvetica, sans-serif",11,"#FFFFFF","#FFFFFF","#074987","#074987","#074987","#074987","#074987","left","middle",3,0,1000,-5,7,true,true,true,3,true,true,"menu");
	menu_2.addMenuItem("Interactive&nbsp;Map","location='javascript:pop_imap();'");
	menu_2.addMenuItem("Shops","location='/shops/index.php'");
	menu_2.addMenuItem("Restaurants","location=''");
	menu_2.addMenuItem("Services","location=''");
	menu_2.hideOnMouseOut=true;
	
	window.menu_3 = new Menu("root",200,21,"Arial, Helvetica, sans-serif",11,"#FFFFFF","#FFFFFF","#074987","#074987","#074987","#074987","#074987","left","middle",3,0,1000,-5,7,true,true,true,3,true,true,"menu");
	menu_3.addMenuItem("Parking&nbsp;Recommendations","location='/parking/recommend.php'");
	menu_3.addMenuItem("Maps&nbsp;&amp;&nbsp;Directions","location='/maps/index.php'");
	menu_3.addMenuItem("Security","location='/travel/security.php'");
	menu_3.addMenuItem("Technology&nbsp;Services","location='/travel/tech.php'");	
	menu_3.addMenuItem("U.S.&nbsp;Airports&nbsp;&minus;&nbsp;Status","window.open('/travel/airports.html', '_blank');");
	menu_3.addMenuItem("Visitors&nbsp;Guide","location='/visitor/index.php'");
	menu_3.addMenuItem("Weather","window.open('http://www.weather.com/weather/local/75261?lswe=75261&lwsa=WeatherLocalUndeclared&from=whatwhere', '_blank');");
	menu_3.addMenuItem("Podcasts","location='/podcasts/index.php'");	
	menu_3.hideOnMouseOut=true;	

	if (ua.indexOf('msie') != -1) {
		window.menu_4 = new Menu("root",207,21,"Arial, Helvetica, sans-serif",11,"#FFFFFF","#FFFFFF","#AEB9C3","#AEB9C3","#AEB9C3","#AEB9C3","#AEB9C3","left","middle",35,0,1000,-5,7,true,true,true,3,true,true,"buso");
	} else {
		window.menu_4 = new Menu("root",209,21,"Arial, Helvetica, sans-serif",11,"#FFFFFF","#FFFFFF","#AEB9C3","#AEB9C3","#AEB9C3","#AEB9C3","#AEB9C3","left","middle",35,0,1000,-5,7,true,true,true,3,true,true,"buso");
	}	
	menu_4.addMenuItem("Advertising","location='/advertising/index.php'");
	menu_4.addMenuItem("Cargo","location='/cargo/index.php'");
	menu_4.addMenuItem("Commercial&nbsp;Development","location=''");
	menu_4.addMenuItem("Concessions","location='/concessions/index.php'");	
	menu_4.addMenuItem("Procurement","location='/pmm/index.php'");
	menu_4.addMenuItem("Small&nbsp;&amp;&nbsp;Emerging&nbsp;Business","location='/seb/index.php'");
	menu_4.addMenuItem("Solicitation&nbsp;Schedule","location=''");
	menu_4.hideOnMouseOut=true;	

}  	
set_drop_menu();

function start() {
	// emtpy initialization function.
}