var S2FWindow = null;

function Send2Friend (Game, Title) {
  //позиция окна...
  var Width = 400;
  var Height = 180;
  var Left = 200;
  var Top = 200;
  if (null != screen) {
    Left = Math.round((screen.width - Width) / 2);
    Top = Math.round((screen.height - Height) / 2);
  };

  //закрытие старого окна...
  if (null != S2FWindow && !S2FWindow.closed) S2FWindow.close();

  //открытие нового окна...
  S2FWindow = open('/cgi-bin/games/send2friend.cgi?game='+Game+'&title='+Title, 'send2friend_window', 'menu=0,toolbar=0,status=0,scrollbars=no,width='+Width+',height='+Height+',top='+Top+',left='+Left);
  return false;
};

