// FlightSafety Global Javascript Library
// Shawn Chittle 
// June 2006

//nav menu

if (document.all) {
	// Define standards for Internet Explorer
	// alert('Debug Tracer: Using Internet Explorer'); // Debug: Tracer: Test Browser Application & Version
	global_layerCallPrefix = "document.all.";
	global_layerCallSuffixLeft = ".style.left";
	global_layerCallSuffixTop = ".style.top";
	global_layerCallSuffixWidth = ".style.width";
	global_layerCallSuffixHeight = ".style.height";
	global_layerCallSuffixVisibility = ".style.visibility";
	global_layerCallVisibilityVisible = "visible";
	global_layerCallVisibilityHide = "hidden";
	global_offsetWidth = "36";
	global_offsetHeight = "15";
}
else if (document.getElementById&&!document.all) {
	// Define standards for Netscape 6.x + 
	// alert('Debug Tracer: Using Netscape 6.x + '); // Debug: Tracer: Test Browser Application & Version
	global_layerCallPrefix = "window.document.getElementById('";
	global_layerCallSuffixLeft = "').style.left";
	global_layerCallSuffixTop = "').style.top";
	global_layerCallSuffixWidth = "').style.width";
	global_layerCallSuffixHeight = "').style.height";
	global_layerCallSuffixVisibility = "').style.visibility";
	global_layerCallVisibilityVisible = "visible";
	global_layerCallVisibilityHide = "hidden";
	global_offsetWidth = "15";
	global_offsetHeight = "20";
}
else {
	//invalid_browser_type();
}

function layerShow(layerName) {
		eval(global_layerCallPrefix + layerName + global_layerCallSuffixVisibility + " =  '" + global_layerCallVisibilityVisible + "';");
}

function layerHide(layerName) {
		eval(global_layerCallPrefix + layerName + global_layerCallSuffixVisibility + " =  '" + global_layerCallVisibilityHide + "';");
}

//clears default values from text boxes

function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
} 


//standard popup
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){
LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
}
if(pos=="center"){
LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;
}
else if((pos!="center" && pos!="random") || pos==null){
LeftPosition=0;TopPosition=20
}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=yes,directories=yes,status=yes,menubar=yes,toolbar=yes,resizable=yes';
win=window.open(mypage,myname,settings);}




