function position( width, height ){
  resizeTo( width, height );
  moveTo( (screen.width - width) / 2, (screen.height - height) / 2 );
}

// サブウィンドウ
function subwin( file, width, height, resizable, scrollbars, menubar, toolbar ){
  var x = (screen.width - width) / 2;
  var y = (screen.height - height) / 2;
  var para = "resizable=";
  para += resizable;
  para += ",scrollbars=";
  para += scrollbars;
  para += ",menubar=";
  para += menubar;
  para +=",width=";
  para += width;
  para += ",height=";
  para += height;
  para += ",left=";
  para += x;
  para += ",top=";
  para += y;
  para += ",status=yes";
  var win = window.open( file, "_blank", para );
  win.focus();
}

function sub2win( file, width, height, resizable, scrollbars, menubar, toolbar ){
  var x = (screen.width - width) / 2;
  var y = (screen.height - height) / 2;
  var para = "resizable=";
  para += resizable;
  para += ",scrollbars=";
  para += scrollbars;
  para += ",menubar=";
  para += menubar;
  para +=",width=";
  para += width;
  para += ",height=";
  para += height;
  para += ",left=";
  para += x;
  para += ",top=";
  para += y;
  para += ",status=yes";
  var win = window.open( file, "ipman_sub2_window", para );
  win.focus();
}

// ヘルプウィンドウ
function helpwin( file ){
  width = 500;
  height = 300;
  resizable = 'yes';
  scrollbars = 'yes';
  menubar = 'yes';
  var x = (screen.width - width) / 2;
  var y = (screen.height - height) / 2;
  var para = "resizable=";
  para += resizable;
  para += ",scrollbars=";
  para += scrollbars;
  para += ",menubar=";
  para += menubar;
  para +=",width=";
  para += width;
  para += ",height=";
  para += height;
  para += ",left=";
  para += x;
  para += ",top=";
  para += y;
  para += ",status=yes";
  var win = window.open( file, "ipman_help_window", para );
  win.focus();
}
