var ua = navigator.userAgent.toLowerCase();
var slide_timer;

function get_tab(box, tab, ct) {
	for(i=1; i<=ct; i++) {
		if ((document.getElementById(box+'_box_'+i)) && (i != tab)) {
			document.getElementById(box+'_box_'+i).style.display = 'none';
			document.getElementById(box+'_tab_'+i).className = 'box_tab_0';
		} else {
			document.getElementById(box+'_box_'+tab).style.display = 'block';
			document.getElementById(box+'_tab_'+tab).className = 'box_tab_1';			
		}
	}
}

function pop_imap() {
	open('http://www.dfwairport.com/imap/index.html','imap','width=800,height=636,toolbar=0,resize=0');	
}

function pop_lmap() {
	open('http://www.dfwairport.com/lmap/index.html','lmap','width=500,height=636,toolbar=0,resize=0');	
}

function pop_vast() {
	open('http://www.dfwairport.com/visitor/assist/index.html','vast','width=800,height=550,toolbar=0,resize=0');	
}

function put_mark(url) {
	if (ua.indexOf('msie') != -1) {
		window.external.AddFavorite(url);
	} else {
		alert('Please use (CTRL+D) to manually bookmark this page.');
	}		
}

function get_slide(id, ct) {
	for (i=1;i<=ct;i++) {
		document.getElementById('slide_'+i).style.display = 'none';	
		document.getElementById('slide_btn_'+i).className = '';	
	}	
	document.getElementById('slide_'+id).style.display = '';
	document.getElementById('slide_btn_'+id).className = 'current';	
}

function str_slideshow(ct) {
	var id;
	for (i=1;i<=ct;i++) {
		if (document.getElementById('slide_'+i).style.display == '') { 
			if ((i+1) > ct) {
				id = 1;
			} else {
				id = (i+1);	
			}
			i = (ct+1);
		}
	}
	get_slide(id, ct);	
}

function str_slides() {
	document.getElementById('slide_str_stp').innerHTML = '<a href="javascript:stp_slides();"><img src="./dfwucm1prd/fragments/frdef_dfwairport_global/images/home/slideshow_stop.gif" alt="" width="7" height="15" border="0" /></a>';
	slide_timer = setInterval('str_slideshow(5)',5000);
}

function stp_slides() {
	document.getElementById('slide_str_stp').innerHTML = '<a href="javascript:str_slides();"><img src="./dfwucm1prd/fragments/frdef_dfwairport_global/images/home/slideshow_play.gif" alt="" width="7" height="15" border="0" /></a>';
	clearInterval(slide_timer);
}

function start() {
	// emtpy initialization function.
}
