function popNewWindow(name,width,height,featureList,leftAlign,topAlign,contentString)
{
//
// featureList can have any comma-delimited combination of the following
//   feature=value pairs:
// location=yes|no   controls whether browser should display location window
// menubar=yes|no    controls whether browser should display menu bar
// resizable=yes|no  controls whether or not user can resize window
// scrollbars=yes|no controls whether scrollbars are shown
// status=yes|no     controls whether browser displays status bar at bottom
// toolbar=yes|no    controls whether browser should display the toolbar
//
  var x,y;

  if (featureList != "" && (width > 0 || height > 0)) {
    featureList+=",";
    if (width > 0 && height > 0)
	featureList+=("width="+width+",height="+height);
    else if (width > 0)
	featureList+=("width="+width);
    else
	featureList+=("height="+height);
  }
  var new_win=window.open("",name,featureList);
  if (contentString.indexOf("http") == 0)
    new_win.location=contentString;

  if (leftAlign != null && topAlign != null) {
    if (document.layers || navigator.appName == "Netscape") {
	if (leftAlign == "center")
	  x=parent.screenX+parent.outerWidth/2-width/2;
	else if (leftAlign == "left")
	  x=parent.screenX;
	else if (leftAlign == "right")
	  x=parent.screenX+parent.outerWidth-width;
	else
	  x=0;
	if (topAlign == "middle")
	  y=parent.screenY+parent.outerHeight/2-height/2;
	else if (topAlign == "top")
	  y=parent.screenY;
	else if (topAlign == "bottom")
	  y=parent.screenY+parent.outerHeight-height;
	else
	  y=0;
	new_win.moveTo(x,y);
    }
    else if (document.all) {
	if (leftAlign == "center")
	  x=parent.screenLeft+document.body.offsetWidth/2-width/2;
	else if (leftAlign == "left")
	  x=parent.screenLeft;
	else if (leftAlign == "right")
	  x=parent.screenLeft+document.body.offsetWidth-width;
	else
	  x=0;
	if (topAlign == "middle")
	  y=parent.screenTop+document.body.offsetHeight/2-height/2;
	else if (topAlign == "top")
	  y=parent.screenTop;
	else if (topAlign == "bottom")
	  y=parent.screenTop+document.body.offsetHeight-height;
	else
	  y=0;
	new_win.moveTo(x,y);
    }
  }

  if (contentString.indexOf("http") != 0) {
    new_win.document.open();
    new_win.document.write(contentString);
//    if (contentString.indexOf("Close Window") < 0)
//	new_win.document.write("<p><center><a href=\"javascript:parent.close()\">Close Window</a></center></p>");
    new_win.document.close();
  }

  new_win.focus();
  return new_win;
}
