      /* Change these values to configure the new window's position */
      var new_window_pos_x=200;
      var new_window_pos_y=0;

      /* Change these values to configure the amount of space right and below the window */
      var new_window_margin_x=20;
      var new_window_margin_y=20;

      /* These values will be set automatically */
      var new_window_border_x=0;
      var new_window_border_y=0;
      var new_window_offset_x=0;
      var new_window_offset_y=0;

      if (navigator.userAgent.indexOf("Linux") != -1) {
        /* OS is Linux */
	new_window_border_x=8;
	new_window_border_y=28;

        if (navigator.userAgent.indexOf("Opera") != -1) {
	  /* Browser is Opera */
          new_window_offset_x=0;
          new_window_offset_y=48;
        }
        else if (navigator.userAgent.indexOf("Konqueror") != -1) {
	  /* Browser is Konqueror */
          new_window_offset_x=6;
          new_window_offset_y=6 + 1; /* Konqueror includes the control bars in availHeight and leaves a border of 3 pixels around the viewable area */
        }
	else {
	  /* Assume Netscape Navigator 4 */
          new_window_offset_x=0;
          new_window_offset_y=85 + 26 + 48;
	}
      }
      else {
        /* Assume Windows */
	new_window_border_x=8 - 15;
	new_window_border_x=27 + 30;

	/* Opera is queried first because it often immitates other browsers */
        if (navigator.userAgent.indexOf("Opera") != -1 ) {
	  /* Browser is Opera */
          new_window_offset_x=0;
          new_window_offset_y=240;
        }
        else if (navigator.userAgent.indexOf("MSIE") != -1 ) {
	  /* Broser is MSIE */
          new_window_offset_x=4;
          new_window_offset_y=94 + 22 + 20; /* top controls + status bar + page height correction */
        }
        else if (navigator.userAgent.indexOf("Netscape6") != -1 ) {
	  /* Browser is Netscape 6 */
          new_window_offset_x=0;
          new_window_offset_y=66 + 19;
        }
        else {
	  /* Assume Netscape Navigator 4 */
          new_window_offset_x=4;
          new_window_offset_y=71 + 20;
	}
      }

      var w=screen.availWidth - new_window_pos_x - new_window_border_x - new_window_offset_x - new_window_margin_x;
      var h=screen.availHeight - new_window_pos_y - new_window_border_y - new_window_offset_y - new_window_margin_y;
      var options="dependent=no,hotkeys=yes,location=yes,menubar=yes,resizable=yes,scrollbars=yes,status=yes,toolbar=yes";

      function new_window(url, name) {
      	if (! name)
		name = "_blank";
        var win=window.open(url, name, "left="+new_window_pos_x+",top="+new_window_pos_y+",width="+w+",height="+h+","+options);
	win.focus();
	//return (win);
      }
