var isNN = (navigator.appName == "Netscape") ? true : false; // determine browser type at load
var currentPopUp = null;

function doPopUp(url, width, height, ref, resize) {	
	var myURL    = url ? url : "http://www.iosea.com/"; //default url	
	var myWidth  = width ? width : 620;                 //default width	
	var myHeight = height ? height : 480;               //default height	
	var myName   = ref ? ref : "PopUp";                 //default reference name - this is not the title!	
	var myResize = resize ? true : false;                 

	// Set window properties per browser type	
	if (isNN) {		
		var myProps = "outerWidth="+myWidth+",outerHeight="+myHeight;	
	} else {		
		var myProps = "WIDTH="+myWidth+",HEIGHT="+myHeight;	
	}

	if (myResize) {		
		myProps += ",MENUBAR,TOOLBAR,SCROLLBARS,STATUS,RESIZABLE";	
	} else {		
		myProps += ",SCROLLBARS,STATUS";	
	}

	// Close existing window if one is open. 	
	// Necessary to set new height and width.	
	if (currentPopUp != null && !currentPopUp.closed) { currentPopUp.close(); }

	// Open new window and save ref at current page level	
	currentPopUp = window.open(myURL,myName,myProps); 

	// Return required so that current page doesn't move	
	return;
}

function doRedirect(url) {	
	var myURL    = url ? url : "http://bioinformatics.ualr.edu/"; //default url
	document.href.location = url;
}

function setNavHeight() {
	var height, width;
	var headHeight;
	
	if (document.all) {
		height = document.body.offsetHeight;
	} else if (document.layers) {
		height = window.innerHeight; 
	}
	
	document.getElementById('nav').style.height = height - (75 + document.getElementById('heading').offsetHeight);
}

