var newWin = null;

function popUp(strURL, strType, strWidth, strHeight) {
	// Determine if Window is Already Open...  Will Close and Re-open New Window if Already Open
	if (newWin != null && !newWin.closed)
		newWin.close();
		
	// Set Parameters for Window Depending on Type
	var strOptions="";
	if (strType=="console")
		strOptions="scrollbars,resizable,width="+strWidth+",height="+strHeight;
	if (strType=="fixed")
		strOptions="status,width="+strWidth+",height="+strHeight;
	if (strType=="elastic")
		strOptions="toolbar,menubar,scrollbars,resizable,location,width="+strWidth+",height="+strHeight;
	
	// Position Window Depending on Browser
	if (document.layers) { // Netscape Browser
		var strXCoord = window.screenX + ((window.outerWidth - strWidth) / 2);
		var strYCoord = window.screenY + ((window.outerHeight - strHeight) / 2);
		var strAttr = 'screenX='+strXCoord+',screenY='+strYCoord+','+strOptions;
	}
	else { // Internet Explorer Browser
		var strXCoord = (screen.width - strWidth) / 2;
		var strYCoord = (screen.height - strHeight) / 2;
		var strAttr = 'left='+strXCoord+',top='+strYCoord+','+strOptions;
	}
	
	// Open Popup Window
	newWin = window.open(strURL, 'newWin', strAttr);
	newWin.focus()
}