IE4=(document.all);
NS6=(document.getElementById);
NS4=(document.layers);
var oldmenu="none";
var oldsub="none";

var b=0;
var z=0;
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;

function remove() {
	display('none');
	b=0;
	a='none';
}






function display(newmenu) {
	if (oldmenu != "none") {
	if (NS4) {document.layers[oldmenu].visibility = "hide";} 
    else if (IE4) {document.all[oldmenu].style.visibility = "hidden";}
    else if (NS6) {document.getElementById(oldmenu).style.visibility="hidden";}
	}
	if (newmenu != "none") {
    if (NS4) {document.layers[newmenu].visibility = "show";}
    else if (IE4) {document.all[newmenu].style.visibility = "visible";}
    else if (NS6) {document.getElementById(newmenu).style.visibility="visible";}
	}
	oldmenu=newmenu;
}

function hideme() {
	if (NS4) {document.layers["layer99"].visibility = "hide";}
    else if (IE4) {document.all["layer99"].style.visibility = "hidden";}
    else if (NS6) {document.getElementById("layer99").style.visibility="hidden";}
}

function showme() {
	if (NS4) {document.layers["layer99"].visibility = "show";}
    else if (IE4) {document.all["layer99"].style.visibility = "visible";}
    else if (NS6) {document.getElementById("layer99").style.visibility="visible";}
}

function PrintThisPage()
{
   var sOption="toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width=640,height=600,left=100,top=25";
   var sWinHTML = document.getElementById('printable_material').innerHTML;
   var winprint=window.open("","",sOption);
       winprint.document.open();
       winprint.document.write('<html><head><link href="css/print.css" rel="stylesheet" type="text/css" media="all" /></head><body marginheight=0 marginwidth=0 topmargin=0 leftmargin=10 onload="window.print();"><div id="masthead"><img src="images/PRINT_banner.jpg" width="612" height="120" border="0"></div>');
	   now = new Date();
       localtime = now.toString();
	   winprint.document.write(sWinHTML);
       winprint.document.write('<br><br><br><br><br>');
       winprint.document.write('<div id="siteInfo"><center>Printed from www.adb-air.com<br>'+localtime+'<br>&copy; ADB Airfield Solutions, Inc. 2009</center></div>');
       winprint.document.write('</body></html>');
       winprint.document.close();
       winprint.focus();
}

function findDOM(objectID) {
	if (NS4) {return (document.layers[objectID]);}
    else if (IE4) {return (document.all[objectID].style);}
    else if (NS6) {return (document.getElementById(objectID).style);}
}

/*
function closeAll() {
	domStyle = findDOM('menu0m');
	domStyle.display='none';
	domStyle = findDOM('menu1m');
	domStyle.display='none';
	domStyle = findDOM('menu2m');
	domStyle.display='none';
	domStyle = findDOM('menu3m');
	domStyle.display='none';
	domStyle = findDOM('menu4m');
	domStyle.display='none';
	domStyle = findDOM('menu5m');
	domStyle.display='none';
	domStyle = findDOM('menu6m');
	domStyle.display='none';
	domStyle = findDOM('menu7m');
	domStyle.display='none';
	domStyle = findDOM('menu8m');
	domStyle.display='none';
	domStyle = findDOM('menu9m');
	domStyle.display='none';
	domStyle = findDOM('menu10m');
	domStyle.display='none';
//	domStyle = findDOM('menu11m');
//	domStyle.display='none';
	return;
}
*/

function findArrow(objectID) {
	var isOP = navigator.userAgent.indexOf("Opera") > -1;
	var isIE = !isOP && navigator.userAgent.indexOf("MSIE") > -1;
	if (isIE) {
//	alert(document.all[objectID]);
		return document.all[objectID];
	} else if (isOP) {
		return window[objectID];
	} else {
		return document[objectID];
	}
//	if (NS4) {return (document.layers[objectID]);} 
//    else if (IE4) {return (document.all[objectID]);}
//    else if (NS6) {return (document.getElementById(objectID));} 
}

function toggleMenu(objectID) {
	closeAll();
	//alert(objectID);
	if(objectID!='none'){
	domStyle = findDOM(objectID);
//		if(domStyle.display == 'block') {domStyle.display='none';}
//		else {domStyle.display = 'block';}
	domStyle.display = 'block';
	}
	return;
}
