OSDN Git Service

スレを表示していない状態で、最小化でタスクトレイに格納されない不具合の修正
[gikonavigoeson/gikonavi.git] / Giko.pas
index 61b7c61..aaca970 100644 (file)
--- a/Giko.pas
+++ b/Giko.pas
@@ -18,15 +18,20 @@ uses
        Editor, RoundData, GikoPanel, Favorite, HTMLDocumentEvent,
        HintWindow, GikoCoolBar, GikoListView, Search, ExternalBoardManager,
        ExternalBoardPlugInMain, StdActns, Variants, ExtActns,IdTCPConnection,
-       IdBaseComponent, IdTCPClient, AppEvnts;
+       IdBaseComponent, IdTCPClient, AppEvnts, BrowserRecord, MoveHistoryItem,
+    ShellAPI;
 
+const
+       NGWORDNAME_PANEL = 3;
+       THREADSIZE_PANEL = 2;
+       
 type
        TGikoTreeType = (gttNone, gtt2ch, gttHistory, gttFavorite);
        TToolBarSettingSenderType = (tssNone, tssMain, tssList, tssBrowser);
        TMinimizeType = (mtNone, mtMinimizing, mtMinimized);
        TResizeType = (rtNone, rtResizing);
 
-       TBrowserRecord = class;
+//     TBrowserRecord = class;
 
        TGikoForm = class(TForm)
                StatusBar: TStatusBar;
@@ -354,7 +359,7 @@ type
        N63: TMenuItem;
     N64: TMenuItem;
     dummy1: TMenuItem;
-    TreeSelectLogDeletePopupMenu: TMenuItem;
+       TreeSelectLogDeletePopupMenu: TMenuItem;
        N65: TMenuItem;
     BBSSelectPopupMenu: TPopupMenu;
                PlugInMenu: TMenuItem;
@@ -370,11 +375,11 @@ type
     TabSave: TMenuItem;
        TabOpen: TMenuItem;
     ResRangePopupMenu: TPopupMenu;
-    N1001: TMenuItem;
-       N501: TMenuItem;
-    N22: TMenuItem;
-    A14: TMenuItem;
-    BrowsBoradHeadAction1: TMenuItem;
+    ResRangeHundPMenuItem: TMenuItem;
+    ResRangeKokoPMenuItem: TMenuItem;
+    ResRangeNewPMenuItem: TMenuItem;
+    ResRangeAllPMenuItem: TMenuItem;
+       BrowsBoradHeadAction1: TMenuItem;
     ThreadRangePopupMenu: TPopupMenu;
     A15: TMenuItem;
     L8: TMenuItem;
@@ -382,7 +387,7 @@ type
     N68: TMenuItem;
     S6: TMenuItem;
     N69: TMenuItem;
-    S7: TMenuItem;
+    ResRangeSelectPMenuItem: TMenuItem;
     ListColumnPopupMenu: TPopupMenu;
     N70: TMenuItem;
     ID1: TMenuItem;
@@ -394,10 +399,19 @@ type
     N73: TMenuItem;
     SelectComboBoxPanel: TPanel;
     SelectComboBoxSplitter: TImage;
-    ToolButton1: TToolButton;
+       ToolButton1: TToolButton;
     N74: TMenuItem;
     WikiFAQ: TMenuItem;
     GikoApplicationEvents: TApplicationEvents;
+    N22: TMenuItem;
+    N42: TMenuItem;
+    DAT2: TMenuItem;
+    N75: TMenuItem;
+    DAT3: TMenuItem;
+    N76: TMenuItem;
+    FavoriteTreeItemNameCopyPopupMenu: TMenuItem;
+    N77: TMenuItem;
+    N78: TMenuItem;
                                procedure FormCreate(Sender: TObject);
                procedure FormDestroy(Sender: TObject);
                procedure BrowserStatusTextChange(Sender: TObject;
@@ -419,7 +433,6 @@ type
                procedure TreeViewCustomDrawItem(Sender: TCustomTreeView;
                        Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
                procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode);
-               procedure TreeViewDblClick(Sender: TObject);
                procedure ListViewCustomDraw(Sender: TCustomListView;
                        const ARect: TRect; var DefaultDraw: Boolean);
                procedure ListViewMouseDown(Sender: TObject; Button: TMouseButton;
@@ -491,7 +504,6 @@ type
                procedure FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
                        Shift: TShiftState);
                procedure FavoriteTreePopupMenuPopup(Sender: TObject);
-               procedure FavoriteTreeViewDblClick(Sender: TObject);
                procedure LinkToolBarDragDrop(Sender, Source: TObject; X, Y: Integer);
                procedure BrowserTabMouseUp(Sender: TObject; Button: TMouseButton;
                        Shift: TShiftState; X, Y: Integer);
@@ -499,26 +511,17 @@ type
                        State: TDragState; var Accept: Boolean);
                procedure FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
                        Y: Integer);
-               procedure ListCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
-                       var Handled: Boolean);
-               procedure MainCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
-                       var Handled: Boolean);
-               procedure BrowserCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
-                       var Handled: Boolean);
                procedure FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
     procedure BrowserTabContextPopup(Sender: TObject; MousePos: TPoint;
       var Handled: Boolean);
     procedure BrowserTabPopupMenuPopup(Sender: TObject);
     procedure BrowserTabResize(Sender: TObject);
-       procedure TreeViewClick(Sender: TObject);
     procedure TreeViewKeyDown(Sender: TObject; var Key: Word;
       Shift: TShiftState);
     procedure FavoriteTreeViewMouseDown(Sender: TObject;
                        Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
     procedure MessagePanelResize(Sender: TObject);
                procedure OnResized;
-    procedure FavoriteTreeViewMouseUp(Sender: TObject;
-         Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
        procedure SelectTimerTimer(Sender: TObject);
                procedure ListViewColumnRightClick(Sender: TObject;
       Column: TListColumn; Point: TPoint);
@@ -530,21 +533,23 @@ type
     procedure ListToolBarResize(Sender: TObject);
     procedure BrowserToolBarResize(Sender: TObject);
        procedure KokoPopupMenuPopup(Sender: TObject);
-       procedure BeLogInOutActionUpdate(Sender: TObject);
        procedure ListViewKeyUp(Sender: TObject; var Key: Word;
          Shift: TShiftState);
     procedure FavoriteTreeViewEditing(Sender: TObject; Node: TTreeNode;
       var AllowEdit: Boolean);
-    procedure CabinetCloseSpeedButtonClick(Sender: TObject);
+       procedure CabinetCloseSpeedButtonClick(Sender: TObject);
     procedure FavoriteArrangeToolButtonClick(Sender: TObject);
     procedure GikoApplicationEventsMessage(var Msg: tagMSG;
          var Handled: Boolean);
     procedure GikoApplicationEventsDeactivate(Sender: TObject);
     procedure GikoApplicationEventsException(Sender: TObject; E: Exception);
+    procedure TreeViewMouseDown(Sender: TObject; Button: TMouseButton;
+      Shift: TShiftState; X, Y: Integer);
+    procedure GetResURLMenuClick(Sender: TObject);
+    procedure MainCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
+      var Handled: Boolean);
        private
                { Private \90é\8c¾ }
-               FSortIndex: Integer;
-               FSortOrder: Boolean;
                FEnabledCloseButton: Boolean;
                FClickNode: TTreeNode;
                FHttpState: Boolean;
@@ -589,7 +594,10 @@ type
                FStartUp : Boolean;
                FIsHandledWheel : Boolean;                      ///< \8aù\82É\8eó\82¯\8eæ\82Á\82½ WM_MOUSEWHEEL \82©\82Ç\82¤\82©
                                DiffComp: Boolean;                      //Add by Genyakun \83X\83\8c\82ª\8dX\90V\82³\82ê\82½\82Æ\82«\82ÉTrue\82É\82È\82é
-               FOrigenCaption: String;                         //\82¨\8bC\82É\93ü\82è\83c\83\8a\81[\82Ì\83A\83C\83e\83\80\95Ò\8fW\8e\9e\82Ì\95Ò\8fW\91O\82Ì\95\8e\9a\97ñ                              
+               FOrigenCaption: String;                         //\82¨\8bC\82É\93ü\82è\83c\83\8a\81[\82Ì\83A\83C\83e\83\80\95Ò\8fW\8e\9e\82Ì\95Ò\8fW\91O\82Ì\95\8e\9a\97ñ
+               FPreviewBrowserRect: TRect;                     ///< \83v\83\8c\83r\83\85\81[\82Ì\95\\8e¦\88Ê\92u\82ð\8bL\89¯\82·\82é
+               FActionListGroupIndexes: array of Integer;      ///<GikoDM\8fã\82Ì\83A\83N\83V\83\87\83\93\83\8a\83X\83g\82Ì\8ae\83A\83N\83V\83\87\83\93\82É\90Ý\92è\82³\82ê\82½GroupIndex\82ð\95Û\91\82·\82é\94z\97ñ
+
                procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
                procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
                procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string);
@@ -639,18 +647,30 @@ type
                procedure TreeDoubleClick( Node : TTreeNode );
                /// \8ae\8f\8a\82É\82 \82é\83L\83\83\83r\83l\83b\83g\81E BBS \83\81\83j\83\85\81[\82ð\83Z\83b\83g\81^\8dX\90V
                procedure SetBBSMenu;
-               /// \83^\83u\8eæ\93¾
-               function GetTabURLs(AStringList: TStringList) : Boolean;
                /// ListColumnPopupMenu \83A\83C\83e\83\80\82Ì\83N\83\8a\83b\83N\83C\83x\83\93\83g
                procedure       ListColumnPopupMenuOnClick( Sender : TObject );
-               // BrowserRecord\82É\82Â\82¢\82Ä\82¢\82éFBrowser\82ð\8aO\82·
-               procedure ReleaseBrowser( BRecord: TBrowserRecord);
                //! \8di\82è\8d\9e\82Ý\95\8e\9a\97ñ\90Ý\92è
                procedure SetSelectWord( const text : string );
                //\8c»\8dÝ\82Ì\83J\81[\83\\83\8b\82ð\8eæ\93¾\82·\82é
                function GetScreenCursor(): TCursor;
                //\83J\81[\83\\83\8b\82ð\90Ý\92è\82·\82é
                procedure SetScreenCursor(Cursor : TCursor);
+               //! \83_\83E\83\93\83\8d\81[\83h\83R\83\93\83g\83\8d\81[\83\8b\83X\83\8c\83b\83h\82Ì\90\90¬
+               procedure CreateControlThread();
+               //! \83u\83\89\83E\83U\82Ì\90\90¬
+               procedure CreateBrowsers(count: Integer);
+               //! ActionList\82ÌGroupIndex\82Ì\95Û\91
+               procedure GetGroupIndex(ActionList: TActionList);
+               //! ActionList\82ÌGroupIndex\82Ì\90Ý\92è
+               procedure SetGroupIndex(ActionList: TActionList);
+               //! \8ew\92è\82³\82ê\82½\83X\83\8c\83b\83h\82ð\8aJ\82­(\83\8d\83O\82ª\96³\82¢\82Æ\82« or \8ew\92èJUMP\82Ü\82Å\91«\82è\82È\82¢\82Æ\82«\82ÍDL\82·\82é)
+               procedure OpenThreadItem(Thread: TThreadItem; URL: String);
+               //! ListView\81i\83X\83\8c\83b\83h\88ê\97\97\81j\82ð\8dX\90V\82·\82é
+               procedure RefreshListView(Thread: TThreadItem);
+               //! \83X\83\8c\83b\83h\88ê\97\97\82Ì\95\\8e¦\94Í\88Í\90Ý\92è\83`\83F\83b\83N\83N\83\8a\83A
+               procedure ClearThreadRengeAction;
+        //! \83^\83X\83N\83g\83\8c\83C\82Ì\83A\83C\83R\83\93\8dí\8f\9c\81\95\83t\83H\81[\83\80\95\\8e¦
+        procedure UnStoredTaskTray;
        protected
                procedure CreateParams(var Params: TCreateParams); override;
                procedure WndProc(var Message: TMessage); override;
@@ -663,6 +683,7 @@ type
                LastRoundTime: TDateTime;
                BrowserNullTab: TBrowserRecord;
                FControlThread: TThreadControl;
+        FIconData : TNotifyIconData;
                procedure MoveToURL(const inURL: string);
                function InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True) : TBrowserRecord;
                procedure ReloadBBS;
@@ -686,8 +707,6 @@ type
                property ToolBarSettingSender : TToolBarSettingSenderType
                                                 read FToolBarSettingSender write FToolBarSettingSender;
                property ScreenCursor : TCursor read GetScreenCursor write SetScreenCursor;
-               property SortIndex: Integer read FSortIndex write FSortIndex;
-               property SortOrder: Boolean read FSortOrder write FSortOrder;
                property ActiveBBS : TBBS read FActiveBBS write FActiveBBS;
                property WorkCount: Integer read FWorkCount write FWorkCount;
                procedure SetContent(inThread: TBrowserRecord);
@@ -727,8 +746,6 @@ type
                procedure IndividualAbonID(Atype : Integer);
                //\82±\82Ì\83\8c\83X\82 \82Ú\81`\82ñ
                procedure IndividualAbon(Atag, Atype : Integer);
-               //ID\83A\83\93\83J\81[\92Ç\89Á
-               procedure IDAnchorPopup(Abody :string);
                //\83u\83\89\83E\83U\82Ì\8dÄ\95`\89æ true:\91S\82Ä\82Ì\83^\83u false:\83A\83N\83e\83B\83u\82È\83^\83u\82Ì\82Ý
                procedure RepaintAllTabsBrowser();
                //\83\8a\83\93\83N\83o\81[\90Ý\92è
@@ -740,13 +757,14 @@ type
                procedure DownloadList(Board: TBoard; ForceDownload: Boolean = False);
                //\97\9a\97ð\82©\82ç\8dí\8f\9c
                procedure DeleteHistory( threadItem: TThreadItem );
-               //\83^\83u\82ð\8dí\8f\9c
+               //\83^\83u\82ð\8dí\8f\9c \83X\83\8c\83b\83h\8ew\92è
                procedure DeleteTab(ThreadItem: TThreadItem); overload;
+               //\83^\83u\82ð\8dí\8f\9c \83u\83\89\83E\83U\83\8c\83R\81[\83h\81i\83^\83u\81j\8ew\92è
                procedure DeleteTab(BrowserRecord: TBrowserRecord); overload;
+        // \83^\83u\8dí\8f\9c\81i\8eÀ\91\95\95\94\81j
+        procedure DeleteTab(index, selectIndex: Integer); overload;
                //\8c»\8dÝ\95\\8e¦\82µ\82Ä\82¢\82é\83X\83\8c\83b\83h\82ð\83X\83N\83\8d\81[\83\8b
-               procedure BrowserMovement(const AName: string); overload;
-               //\8ew\92è\82µ\82½\83u\83\89\83E\83U\82ð\83X\83N\83\8d\81[\83\8b
-               procedure BrowserMovement(const AName: string; BrowserRecord: TBrowserRecord); overload;
+               procedure BrowserMovement(const AName: string);
                //Application\82ÌMainForm\82ð\8eæ\93¾\82·\82é
                function GetMainForm(): TComponent;
                procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
@@ -758,18 +776,8 @@ type
                procedure OnGestureEnd(Sender: TObject);
                /// \83o\83\93\83h\95\9d\82ð\8dÄ\8cv\8eZ\81E\8dÄ\90Ý\92è\82·\82é
                procedure ResetBandInfo( bar : TGikoCoolBar; band : TToolBar );
-               //\83X\83N\83\8a\81[\83\93\8fã\82ÉEditorForm\82ª\82¢\82é\82©
-               function EditorFormExists(): boolean;
-               //\83X\83N\83\8a\81[\83\93\8fã\82É\82¢\82é\82·\82×\82Ä\82ÌEditorForm\82©\82ç\96¼\91O\97\9a\97ð\82ð\8dí\8f\9c\82·\82é
-               procedure AllEditroFormNameTextClearClear();
-               //\83X\83N\83\8a\81[\83\93\8fã\82É\82¢\82é\82·\82×\82Ä\82ÌEditorForm\82©\82ç\83\81\81[\83\8b\97\9a\97ð\82ð\8dí\8f\9c\82·\82é
-               procedure AllEditroFormMailTextClearClear();
                //ListView\82Å\91I\91ð\82³\82ê\82Ä\82¢\82é\83A\83C\83e\83\80\82ð\8eæ\93¾\82·\82é
                procedure SelectListItem(List: TList);
-               /// \83^\83u\95Û\91
-               function SaveTabURLs : Boolean;
-               /// \83^\83u\93Ç\82Ý\8fo\82µ
-               function LoadTabURLs : Boolean;
                //\8ew\92è\82µ\82½\83\8c\83X\82ð\83R\83s\81[\82·\82é
                procedure KonoresCopy(Number: Integer; ReplaceTag : Boolean);
                //
@@ -784,6 +792,13 @@ type
                function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
                //
                function WebBrowserClick(Sender: TObject): WordBool;
+               //! \83c\81[\83\8b\83o\81[\82É\83X\83\8c\8di\8d\9e\82Ý\83R\83\93\83{\83{\83b\83N\83X\82ð\90Ý\92è\82·\82é
+               procedure SetSelectComboBox();
+
+        //! \83^\83X\83N\83g\83\8c\83C\82É\8ai\94[\82µ\82½\83A\83C\83R\83\93\82ð\83N\83\8a\83b\83N\82µ\82½\82Æ\82«\82Ì\8f\88\97\9d
+        procedure TaskTrayIconMessage(var Msg : TMsg); message WM_USER + 2010;
+        //! \83^\83X\83N\83g\83\8c\83C\82É\83A\83C\83R\83\93\93o\98^\81\95\83t\83H\81[\83\80\89B\82µ
+        procedure StoredTaskTray;
        published
                property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
        end;
@@ -809,23 +824,6 @@ type
                property Data: Pointer read FData write FData;
        end;
 
-       TBrowserRecord = class( TObject )
-       private
-               FBrowser        : TWebBrowser;
-               FEvent: THTMLDocumentEventSink; ///< \83u\83\89\83E\83U\83h\83L\83\85\83\81\83\93\83g\83C\83x\83\93\83g
-               FThread         : TThreadItem;
-               FLastSize       : Integer;
-               FRepaint        : Boolean;
-               FMovement       : string;                                                       ///< \83X\83N\83\8d\81[\83\8b\90æ\83A\83\93\83J\81[
-       public
-               destructor      Destroy; override;
-               property        Browser : TWebBrowser   read FBrowser   write FBrowser;
-               property        Thread  : TThreadItem   read FThread    write FThread;
-               property        LastSize        : Integer               read FLastSize  write FLastSize;
-               property        Repaint         : Boolean               read FRepaint   write FRepaint;
-               property        Movement        : string                read FMovement  write FMovement;
-       end;
-
 var
        GikoForm: TGikoForm;
 
@@ -833,42 +831,30 @@ implementation
 
 uses
        GikoUtil, IndividualAbon, Math, Kotehan, KeySetting,
-       YofUtils, ShellAPI, ToolBarUtil, ToolBarSetting,
+       YofUtils, ToolBarUtil, ToolBarSetting,
        GikoXMLDoc, RoundName, IniFiles, FavoriteAdd,
        FavoriteArrange, AddressHistory, Preview, Gesture,
        About, Option, Round, Splash, Sort, ListSelect, Imm,
        NewBoard, MojuUtils, Clipbrd, GikoBayesian,Y_TextConverter,
-       HTMLCreate, ListViewUtils, GikoDataModule;
+       HTMLCreate, ListViewUtils, GikoDataModule, GikoMessage,
+  InputAssistDataModule;
 
 const
-       CAPTION_NAME: string = '\83M\83R\83i\83r';
        BLANK_HTML: string = 'about:blank';
        BROWSER_COUNT           = 5;    //\83u\83\89\83E\83U\82Ì\90\94
        //D&D臒l
        DandD_THRESHOLD = 5;    //D&D\82Ìè\87\92l\81ipixcel)
        //\83v\83\8c\83r\83\85\81[\83t\83@\83C\83\8b\96¼
        HTML_FILE_NAME  = 'temp_preview.html';
-       //\83X\83\8c\83b\83h\8di\8d\9e\82Ý\83{\83b\83N\83X
-       SELECTCOMBOBOX_NAME: string = ''; // '\83X\83\8c\83b\83h\8di\8d\9e\8c\9f\8dõ';
-       SELECTCOMBOBOX_COLOR: TColor = clWindow;
-       //\83c\81[\83\8b\83o\81[\83A\83C\83R\83\93
-       TOOL_ICON_HEIGHT_MAX            = 16;           //\8d\82\82³\8dÅ\91å\83A\83C\83R\83\93
-       TOOL_ICON_HEIGHT_MIN            = 17;           //\8d\82\82³\8dÅ\8f¬\83A\83C\83R\83\93
-       TOOL_ICON_HEIGHT_NORMAL = 18;           //\8d\82\82³\95W\8f\80\83A\83C\83R\83\93
-       TOOL_ICON_WIDTH_MAX             = 19;           //\95\9d\8dÅ\91å\83A\83C\83R\83\93
-       TOOL_ICON_WIDTH_MIN             = 20;           //\95\9d\8dÅ\8f¬\83A\83C\83R\83\93
-       TOOL_ICON_WIDTH_NORMAL  = 21;           //\95\9d\95W\8f\80\83A\83C\83R\83\93
        ITEM_ICON_THREADLOG1            = 6;            //\83X\83\8c\83A\83C\83R\83\93\81i\83\8d\83O\82 \82è\81j
        ITEM_ICON_THREADLOG2            = 7;            //\83X\83\8c\83A\83C\83R\83\93\81i\83\8d\83O\82 \82è\81j
-       TOOL_ICON_FAV_FOLDER            = 30;           //\82¨\8bC\82É\93ü\82è\83t\83H\83\8b\83_\83A\83C\83R\83\93
-       TOOL_ICON_FAV_BOARD                     = 31;           //\82¨\8bC\82É\93ü\82è\94Â\83A\83C\83R\83\93
-       TOOL_ICON_FAV_THREAD            = 32;           //\82¨\8bC\82É\93ü\82è\83X\83\8c\83A\83C\83R\83\93
        //\83\81\83b\83Z\81[\83WID
        USER_TREECLICK                                  = WM_USER + 2000;
        USER_RESIZED            = WM_USER + 2001;
        USER_MINIMIZED                                  = WM_USER + 2002;
        USER_SETLINKBAR                                 = WM_USER + 2003;
        USER_DOCUMENTCOMPLETE           = WM_USER + 2004;       ///< wParam : TWebBrowser
+    USER_TASKTRAY               = WM_USER + 2010;
 {$R *.DFM}
 
 procedure TGikoForm.CreateParams(var Params: TCreateParams);
@@ -891,9 +877,6 @@ var
        msg: string;
        i: Integer;
        wp: TWindowPlacement;
-       s: string;
-       newbrowser: TWebBrowser;
-       ToolButton: TToolButton;
 begin
 {$IFDEF DEBUG}
        AllocConsole;
@@ -904,35 +887,22 @@ begin
        Writeln(' \8fI\97¹\8e\9e\82Í\81A\83M\83R\83i\83r\83E\83B\83\93\83h\83E\82ð\95Â\82\82Ä\82­\82¾\82³\82¢');
        Writeln('============================================================');
 {$ENDIF}
+//try
+       Sort.SetSortDate(Now());
+       
        FTreeType := gttNone;
        // \8bN\93®\8e\9e\82É\95Û\91\82³\82ê\82Ä\82µ\82Ü\82¤\91Î\8dô
        FStartUp := true;
        Application.HookMainWindow(Hook);
        FIsIgnoreResize := rtResizing;
-
+       //ActionList\82ÌGuoupIndex\82ð\95Û\91\82µ\82Ä\81A0\82É\83N\83\8a\83A\82·\82é\81B
+       //(\8bN\93®\8e\9e\82É\83c\81[\83\8b\83{\83^\83\93\82ÌDown\83v\83\8d\83p\83e\83B\82ð\94½\89f\82³\82¹\82é\93s\8d\87\8fãGroupIndex\82Í\90Ý\92è\82Å\82«\82È\82¢)
+       //\82±\82ê\88È\8cãSet\81`\82Å\8dÄ\90Ý\92è\82·\82é\82Ü\82Å\81AAction\82ÌChecked\82ð\82¢\82\82é\82Æ\82«\82Í\92\8d\88Ó\81I
+       GetGroupIndex(GikoDM.GikoFormActionList);
        FSearchDialog := nil;
-       BrowserNullTab := TBrowserRecord.Create;
-       BrowserNullTab.Browser := Browser;
-       BrowserNullTab.Browser.Navigate(BLANK_HTML);
-       FBrowsers := TList.Create;
-       for i := 0 to BROWSER_COUNT -1 do begin
-               FBrowsers.Add(TWebBrowser.Create(BrowserPanel));
-               newBrowser := FBrowsers[FBrowsers.Count - 1];
-               TOleControl(newBrowser).Parent := BrowserPanel;
-               TOleControl(newBrowser).Align := alNone;
-               TOleControl(newBrowser).Left    := 0;
-               TOleControl(newBrowser).Top     := 0;
-               newBrowser.OnDocumentComplete   := BrowserDocumentComplete;
-               newBrowser.OnBeforeNavigate2    := BrowserBeforeNavigate2;
-               newBrowser.OnEnter                              := BrowserEnter;
-               newBrowser.OnNewWindow2                 := BrowserNewWindow2;
-               newBrowser.OnStatusTextChange   := BrowserStatusTextChange;
-               newBrowser.Navigate(BLANK_HTML);
-               ShowWindow(newBrowser.Handle, SW_HIDE);
-       end;
-       BrowserNullTab.Browser.BringToFront;
-       ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW);
-
+       CreateBrowsers(BROWSER_COUNT);
+    FIconData.uID := 0;
+    
        //\83\81\83j\83\85\81[\83t\83H\83\93\83g
        SetMenuFont;
 
@@ -940,7 +910,6 @@ begin
        Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
 
        //\83A\83h\83\8c\83X\97\9a\97ð\93Ç\82Ý\8d\9e\82Ý
-       //AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
        AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.MaxRecordCount);
 
        EnabledCloseButton := True;
@@ -1000,6 +969,59 @@ begin
        //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
        GikoDM.ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
 
+       //\83~\83\85\81[\83g\82Ì\8fó\91Ô\82ð\90Ý\92è
+       GikoDM.MuteAction.Checked := GikoSys.Setting.Mute;
+
+       // \83\8c\83X\95\\8e¦\94Í\88Í
+       FResRangeMenuSelect := GikoSys.ResRange;
+       case GikoSys.ResRange of
+       Ord( grrAll ):
+               begin
+                       GikoDM.AllResAction.Execute;
+               end;
+       Ord( grrSelect ):
+               begin
+                       SelectComboBox.Text := SelectComboBox.Items[ 1 ];
+                       GikoDM.SelectResAction.Checked := True;
+               end;
+       else
+               case FResRangeMenuSelect of
+               Ord( grrKoko ): GikoDM.OnlyKokoResAction.Checked        := True;
+               Ord( grrNew ):  GikoDM.OnlyNewResAction.Checked := True;
+               100:                    GikoDM.OnlyAHundredResAction.Checked            := True;
+               end;
+       end;
+
+       // \83X\83\8c\83b\83h\88ê\97\97\95\\8e¦\94Í\88Í
+       case GikoSys.Setting.ThreadRange of
+       gtrAll:
+               begin
+                       GikoDM.AllItemAction.Checked := True;
+                       ViewType := gvtAll;
+               end;
+       gtrLog:
+               begin
+                       GikoDM.LogItemAction.Checked := True;
+                       ViewType := gvtLog;
+               end;
+       gtrNew:
+               begin
+                       GikoDM.NewItemAction.Checked := True;
+                       ViewType := gvtNew;
+               end;
+       gtrLive:
+               begin
+                       GikoDM.LiveItemAction.Checked := True;
+                       ViewType := gvtLive;
+               end;
+       gtrArch:
+               begin
+                       GikoDM.ArchiveItemAction.Checked := True;
+                       ViewType := gvtArch;
+               end;
+       end;
+
+
        //\83u\83\89\83E\83U\83^\83u\83t\83H\83\93\83g
        BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
        BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
@@ -1008,9 +1030,27 @@ begin
                BrowserTab.Font.Style := [fsBold];
        if GikoSys.Setting.BrowserTabFontItalic then
                BrowserTab.Font.Style := GikoForm.BrowserTab.Font.Style + [fsItalic];
+       BrowserTab.DoubleBuffered := True;
        FDragWFirst := false;
        SetContent(BrowserNullTab);                                                                                                     //\83u\83\89\83E\83U\82ð\8bó\94\92\95\\8e¦
 
+       //\83u\83\89\83E\83U\83^\83u
+       GikoDM.BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
+
+       if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
+               GikoDM.BrowserTabTopAction.Checked := True;
+       end else begin
+               GikoDM.BrowserTabBottomAction.Checked := True;
+       end;
+
+       if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
+               GikoDM.BrowserTabTabStyleAction.Checked := True;
+       end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
+               GikoDM.BrowserTabButtonStyleAction.Checked := True;
+       end else begin
+               GikoDM.BrowserTabFlatStyleAction.Checked := True;
+       end;
+
        //\83v\83\8d\83O\83\8c\83X\83o\81[\82Ì\8f\89\8aú\89»
        ProgressBar.Parent := StatusBar;
        ProgressBar.Top := 2;
@@ -1024,10 +1064,14 @@ begin
 
        // \83{\81[\83h\83t\83@\83C\83\8b\97ñ\8b\93(ReadFavorite \82æ\82è\90æ\82É\8ds\82¤\82±\82Æ)
        GikoSys.ListBoardFile;
-
+       //\81@\98A\91±\8bN\93®\8e\9e\82É\83X\83v\83\89\83b\83V\83\85\83E\83B\83\93\83h\83E\82Ì\83\81\83\82\83\8a\82ª\95s\92è\82É
+       try
        // \83X\83v\83\89\83b\83V\83\85\83E\83B\83\93\83h\83E\82Ì\83v\83\8d\83O\83\8c\83X\83o\81[\82Ì\90Ý\92è
-       SplashWindow.ProgressBar.Max := Length(BBSs) * 20;
-
+               if (SplashWindow <> nil) then begin
+                       SplashWindow.ProgressBar.Max := Length(BBSs) * 20;
+               end;
+       except
+       end;
        // \82·\82×\82Ä\82ÌBBS\82ð\93Ç\82Ý\8d\9e\82ñ\82Å\82¨\82­
        for i := Length(BBSs) - 1 downto 0 do begin
                if not BBSs[i].IsBoardFileRead then
@@ -1038,6 +1082,7 @@ begin
                        SplashWindow.Update;
                end;
        end;
+
        //\8f\84\89ñ\83f\81[\83^\93Ç\82Ý\8d\9e\82Ý
        RoundList := TRoundList.Create;
        RoundList.LoadRoundBoardFile;
@@ -1081,10 +1126,6 @@ begin
        FNameCookie := '';
        FMailCookie := '';
 
-       //\83X\83\8c\91S\95\94\95\\8e¦\83{\83^\83\93\82ð\89\9f\82³\82ê\82½\8fó\91Ô\82É\82·\82é
-       GikoDM.AllItemAction.Checked := True;
-       GikoDM.AllResAction.Checked := True;
-
        //\83u\83\89\83E\83U\83T\83C\83Y\95Ï\8dX\82Ì\8f\89\8aú\89»
        FBrowserSizeHeight := GikoSys.Setting.ListHeight;
        FBrowserSizeWidth := GikoSys.Setting.ListWidth;
@@ -1107,50 +1148,42 @@ begin
                case GikoSys.Setting.ListWidthState of
                        glsMax: begin
                                ViewPanel.Width := 1;
-                               GikoDM.BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
-                               GikoDM.BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
+                               GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_NORMAL;
+                               GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MIN;
                        end;
                        glsMin: begin
                                ViewPanel.Width := GikoSys.Setting.ListWidth;
-                               GikoDM.BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
-                               GikoDM.BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
+                               GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MAX;
+                               GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_NORMAL;
                        end;
                        else begin
                                ViewPanel.Width := GikoSys.Setting.ListWidth;
-                               GikoDM.BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
-                               GikoDM.BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
+                               GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MAX;
+                               GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MIN;
                        end;
                end;
        end else begin
                case GikoSys.Setting.ListHeightState of
                        glsMax: begin
                                ViewPanel.Height := 1;
-                               GikoDM.BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
-                               GikoDM.BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
+                               GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_NORMAL;
+                               GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MIN;
                        end;
                        glsMin: begin
                                ViewPanel.Height := GikoSys.Setting.ListHeight;
-                               GikoDM.BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
-                               GikoDM.BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
+                               GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MAX;
+                               GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_NORMAL;
                        end;
                        else begin
                                ViewPanel.Height := GikoSys.Setting.ListHeight;
-                               GikoDM.BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
-                               GikoDM.BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
+                               GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MAX;
+                               GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MIN;
                        end;
                end;
        end;
 
        //\83_\83E\83\93\83\8d\81[\83h\83I\83u\83W\83F\83N\83g
-       FControlThread := TThreadControl.Create(True);
-       FControlThread.MaxThreadCount := 1;
-       FControlThread.Resume;
-       FControlThread.OnDownloadEnd := DownloadEnd;
-       FControlThread.OnDownloadMsg := DownloadMsg;
-       FControlThread.OnWork := Work;
-       FControlThread.OnWorkBegin := WorkBegin;
-       FControlThread.OnWorkEnd := WorkEnd;
-//     ProgressPanel.Width := FControlThread.MaxThreadCount * 12;
+       CreateControlThread();
 
        // \8di\8d\9e\8c\9f\8dõ\97\9a\97ð
        SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
@@ -1176,97 +1209,13 @@ begin
        SetToolBarPopup;
 
        //ListToolBar\82É\82¢\82é\82©\82à\82µ\82ê\82È\82¢\8di\8d\9e\82ÝComboBox\82ð\94z\92u
-       SelectComboBoxPanel.Visible := False;
-       try
-               for i := ListToolBar.ControlCount - 1 downto 0 do
-               begin
-                       if ListToolBar.Controls[ i ].Action = GikoDM.SelectItemAction then
-                       begin
-                               SelectComboBoxPanel.Left := ListToolBar.Controls[ i ].Left;
-                               SelectComboBoxPanel.Width := GikoSys.Setting.SelectComboBoxWidth;
-                               SelectComboBoxPanel.Parent := ListToolBar;
-                               SelectComboBoxPanel.Visible := True;
-
-                               SelectComboBox.Left := 0;
-                               SelectComboBox.Top  := 0;
-                               SelectComboBox.Height := SelectComboBoxPanel.ClientHeight;
-                               SelectComboBox.Width := SelectComboBoxPanel.Width -
-                                                                               SelectComboBoxSplitter.Width;
-
-                               //\88ê\82Â\8c©\82¦\82È\82¢\83{\83^\83\93\82ð\93Ë\82Á\8d\9e\82Þ
-                               ToolButton := TToolButton.Create(ListToolBar);
-                               ToolButton.Name := 'SelectComboBoxDummy';
-                               ToolButton.Style := tbsSeparator;
-                               ToolButton.Width := 0;
-                               ToolButton.Left  := ListToolBar.Controls[ i ].Left;
-                               ListToolBar.InsertControl(ToolButton);
-                               ToolButton.Visible := False;
-
-                               // \83X\83\8c\83b\83h\8di\8d\9e\82Ì\97×\82É\83Z\83p\83\8c\81[\83^\82ª\82 \82é\8fê\8d\87\82Í\89B\82·
-                               if (i + 1) < ListToolBar.ControlCount then
-                                       if ListToolBar.Controls[ i + 1 ] is TToolButton then
-                                               if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
-                                                       ListToolBar.Controls[ i + 1 ].Visible := False;
-
-
-                               // \83X\83\8c\83b\83h\8di\8d\9e\83{\83^\83\93\82ð\89B\82·
-                               ListToolBar.Controls[ i ].Visible := False;
-
-                               break;
-                       end;
-               end;
-       except
-       end;
-
+       SetSelectComboBox();
 
        //\83A\83h\83\8c\83X\83o\81[
        AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
 
        //\83\8a\83\93\83N\83o\81[
        SetLinkBar;
-
-       // \83\8c\83X\95\\8e¦\94Í\88Í
-       FResRangeMenuSelect := GikoSys.ResRange;
-       case GikoSys.ResRange of
-       Ord( grrAll ):
-               begin
-                       GikoDM.AllResAction.Execute;
-               end;
-       Ord( grrSelect ):
-               begin
-                       SelectComboBox.Text := SelectComboBox.Items[ 1 ];
-                       GikoDM.SelectResAction.Checked := True;
-               end;
-       else
-//             ResRangeAction.Execute;
-               case FResRangeMenuSelect of
-               Ord( grrKoko ): GikoDM.OnlyKokoResAction.Checked        := True;
-               Ord( grrNew ):  GikoDM.OnlyNewResAction.Checked := True;
-               100:                    GikoDM.OnlyAHundredResAction.Checked            := True;
-               end;
-       end;
-
-       // \83X\83\8c\83b\83h\88ê\97\97\95\\8e¦\94Í\88Í
-//     ThreadRangeAction.Execute;
-       case GikoSys.Setting.ThreadRange of
-       gtrAll:
-               begin
-                       GikoDM.AllItemAction.Checked := True;
-                       ViewType := gvtAll;
-               end;
-       gtrLog:
-               begin
-                       GikoDM.LogItemAction.Checked := True;
-                       ViewType := gvtLog;
-               end;
-       gtrNew:
-               begin
-                       GikoDM.NewItemAction.Checked := True;
-                       ViewType := gvtNew;
-               end;
-       end;
-
-
        //\83N\81[\83\8b\83o\81[\95\9c\8c³\82ÍFormShow\82É\88Ú\93®\82µ\82½
 
        //\83{\81[\83h\83t\83@\83C\83\8b\82ª\96³\82¢\8fê\8d\87\82Í\83\81\83b\83Z\81[\83W\95\\8e¦
@@ -1279,7 +1228,7 @@ begin
        end;
 
        //\83L\81[\90Ý\92è\93Ç\82Ý\8d\9e\82Ý
-       GikoSys.LoadKeySetting(GikoDM.GikoFormActionList);
+       GikoSys.LoadKeySetting(GikoDM.GikoFormActionList, GikoSys.GetMainKeyFileName);
 
        //\8dÅ\8fI\8f\84\89ñ\8e\9e\8aÔ
 //     FLastRoundTime := 0;
@@ -1287,7 +1236,7 @@ begin
        //ResHint
        FHint := TResPopup.Create(Self);
 
-    ListView.OnData := TListViewUtils.ListViewData;
+       ListView.OnData := TListViewUtils.ListViewData;
 
        // \8dÅ\8cã\82É\91I\91ð\82³\82ê\82½\83L\83\83\83r\83l\83b\83g\82Ì\95\9c\8c³
        CabinetVisible( False );
@@ -1314,17 +1263,12 @@ begin
                MoveToURL(ParamStr(i));
        end;
 
-       s := GikoSys.FAbon.NGwordname;
-       StatusBar.Panels[2].Text := s;
-       StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
+       GikoDM.RepaintStatusBar;
        StatusBarResize(Sender);
 
        dummy1.Caption  := ItemReservPMenu.Caption;
        dummy1.Hint     := ItemReservPMenu.Hint;
 
-       //Samba24\82Ì\83t\83@\83C\83\8b\83`\83F\83b\83N
-       GikoSys.SambaFileExists();
-
 {$IFDEF SPAM_FILTER_ENABLED}
        // \83X\83p\83\80\83t\83B\83\8b\83^\8aw\8fK\97\9a\97ð
        GikoSys.Bayesian.LoadFromFile( GikoSys.Setting.GetSpamFilterFileName );
@@ -1342,19 +1286,20 @@ begin
                MouseGesture.SetHook( Handle );
 
        //2ch\8c¾\8cê\93Ç\82Ý\8fo\82µ
-       GikoSys.Setting.SetMessages;
+       GikoSys.SetGikoMessage;
 
        //\83I\81[\83g\83\8d\83O\83C\83\93
        if GikoSys.Setting.AutoLogin then
                GikoDM.LoginAction.Execute;
 
-       GikoDM.MuteAction.Checked := GikoSys.Setting.Mute;
-
        GikoSys.Setting.BeLogin := GikoSys.Setting.BeAutoLogin;
 
        //\83L\83\83\83v\83V\83\87\83\93\82ª\8fã\8f\91\82«\82³\82ê\82Ä\82µ\82Ü\82¤\82Ì\82Å\81A\82±\82±\82Å\8dÄ\90Ý\92è
        FavoriteAddToolButton.Caption := '\92Ç\89Á...';
-    AntiIndivAbonMenuItem.Caption := '\8cÂ\95Ê\82 \82Ú\81`\82ñ\89ð\8f\9c';
+       AntiIndivAbonMenuItem.Caption := '\8cÂ\95Ê\82 \82Ú\81`\82ñ\89ð\8f\9c';
+
+       //\93ü\97Í\83A\83V\83X\83g\8b@\8d\\82Ì\8f\89\8aú\89»
+       InputAssistDM.Init(GikoSys.GetInputAssistFileName);
 
 end;
 
@@ -1496,32 +1441,6 @@ begin
                GikoDM.BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
                GikoDM.BrowserNameBarVisibleActionExecute( nil );
 
-               //\83u\83\89\83E\83U\83^\83u
-               GikoDM.BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
-               GikoDM.BrowserTabVisibleActionExecute(nil);
-
-               if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
-                       GikoDM.BrowserTabTopAction.Checked := True;
-                       GikoDM.BrowserTabTopActionExecute(nil);
-               end else begin
-                       GikoDM.BrowserTabBottomAction.Checked := True;
-                       GikoDM.BrowserTabBottomActionExecute(nil);
-               end;
-
-               if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
-                       GikoDM.BrowserTabTabStyleAction.Checked := True;
-                       GikoDM.BrowserTabTabStyleActionExecute(nil);
-               end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
-                       GikoDM.BrowserTabButtonStyleAction.Checked := True;
-                       GikoDM.BrowserTabButtonStyleActionExecute(nil);
-               end else begin
-                       GikoDM.BrowserTabFlatStyleAction.Checked := True;
-                       GikoDM.BrowserTabFlatStyleActionExecute(nil);
-               end;
-
-               // ListView \82Ì\83w\83b\83_\83h\83\89\83b\83O
-//             ListView.FullDrag := True;
-
                // CoolBar \95\9c\8c³
                LoadCoolBarSettings;
 
@@ -1529,16 +1448,16 @@ begin
 //             ResetBandInfo( ListCoolBar, ListToolBar );
                FIsIgnoreResize := rtNone;
 
-               //TabAutoLoad
                //FormCrete\82©\82ç\88Ú\93®\81B
                if GikoSys.Setting.TabAutoLoadSave then begin
-                       GikoDM.TabAutoLoadAction.Execute;
+            GikoDM.TabsOpenAction.Tag := 1;
+                       GikoDM.TabsOpenAction.Execute;
+            GikoDM.TabsOpenAction.Tag := 0;
                end;
-                               //\82É\82¿\82á\82ñ\8cê\88Ä\93à\83T\83|\81[\83g\8b@\94\
-                               if GikoSys.Setting.GengoSupport then begin
-                               //\97\\92è\92n
-                               //Test\8cü\82¯
-                               end;
+
+        //ActionList\82ÌGroupIndex\82ð\8c³\82É\96ß\82·
+               SetGroupIndex(GikoDM.GikoFormActionList);
+
                FStartUp := false;
        end;
 end;
@@ -1547,21 +1466,31 @@ procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
 begin
 //     if GikoForm.WindowState <> wsMinimized then
 //             SaveCoolBarSettings;
+       CanClose := True;
        if ( GikoSys.Setting.ShowDialogForEnd ) and
                        (MessageDlg('\83M\83R\83i\83r\82ð\8fI\97¹\82µ\82Ä\82æ\82ë\82µ\82¢\82Å\82·\82©\81H', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then begin
                CanClose := false;
                        Exit;
-       end else begin
-               CanClose := True;
-               if GikoSys.Setting.TabAutoLoadSave then begin
-                       GikoDM.TabAutoSaveAction.Execute;
+       end;
+
+       if GikoSys.Setting.TabAutoLoadSave then begin
+               GikoDM.TabsSaveAction.Execute;
+       end;
+
+       if (SearchDialog <> nil) then begin
+               if (SearchDialog.Visible) then begin
+                       SearchDialog.Close;
+                       try
+                               SearchDialog.Release;
+                       except
+                       end;
+                       SearchDialog := nil;
                end;
        end;
-    {    //2ch\8c¾\8cȩ̂²ÙFree
-               if GikoSys.Setting.Gengo <> nil then begin
-                               GikoSys.Setting.Gengo.Free;
-        end;
-    }
+
+       //\83X\83N\83\8a\81[\83\93\8fã\82Ì\91S\82Ä\82Ì\83t\83H\81[\83\80\82©\82ç\81AEditorForm\82ð\95Â\82\82é
+    GikoDM.CloseAllEditorAction.Execute;
+
        Application.UnhookMainWindow(Hook);
        Application.Terminate;
 end;
@@ -1626,6 +1555,8 @@ begin
        // CoolBar \95Û\91
        //if (GikoForm.WindowState <> wsMinimized) and (GikoForm.WindowState <> wsMaximized) then
 
+       //\93ü\97Í\83A\83V\83X\83g\8b@\8d\\82Ì\90Ý\92è\82Ì\95Û\91
+       InputAssistDM.SaveToFile(GikoSys.GetInputAssistFileName);
 
        //\82¨\8bC\82É\93ü\82è\95Û\91
        try
@@ -1673,7 +1604,6 @@ begin
        //\83A\83h\83\8c\83X\97\9a\97ð\95Û\91
        try
                //AddressHistoryDM\82Í\8e©\93®\90\90¬\83t\83H\81[\83\80\82È\82Ì\82Å\81A\89ð\95ú\82Í\8e©\93®\93I\82É\82³\82ê\82é\81B
-               //AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
                AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.MaxRecordCount);
        except
        end;
@@ -1715,14 +1645,20 @@ begin
        finally
                FControlThread.Free;
        end;
+    // \83v\83\89\83O\83C\83\93\82É\82æ\82Á\82Ä\92Ç\89Á\82³\82ê\82½\83\81\83j\83\85\81[\82ð\8aJ\95ú\82·\82é
+    for i := GikoForm.PlugInMenu.Count - 1 downto 0 do begin
+               GikoForm.PlugInMenu.items[i].Free;
+       end;
+    GikoForm.PlugInMenu.Clear;
+
 
        // TBBS \82Í\95Û\8e\9d\82µ\82Ä\82¢\82é TCategory, TBoard, TThreadItem \82·\82×\82Ä\82ð\8aJ\95ú\82·\82é
        // TBoard, TThreadItem \82Ì\83f\83X\83g\83\89\83N\83^\82Í\83v\83\89\83O\83C\83\93\82É\94j\8aü\82ð\93`\82¦\82é\82Ì\82Å
        // BoardPluteIns \82Ì\8aJ\95ú\82æ\82è\90æ\82É\8ds\82¤\82±\82Æ
-    for i := Length(BoardGroups) - 1 downto 0 do begin
+       for i := Length(BoardGroups) - 1 downto 0 do begin
                //BoardGroups[i].Clear;
                BoardGroups[i].Free;
-    end;
+       end;
 
        try
                for i := Length( BBSs ) - 1 downto 0 do begin
@@ -1750,7 +1686,7 @@ begin
                end;
        except
        end;
-    LockWindowUpdate(0);
+       LockWindowUpdate(0);
 end;
 
 // \8ae\8f\8a\82É\82 \82é\83L\83\83\83r\83l\83b\83g\81E BBS \83\81\83j\83\85\81[\82ð\83Z\83b\83g\81^\8dX\90V
@@ -1808,7 +1744,6 @@ begin
        GikoSys.Setting.ShowDialogForAllTabClose := false;
        GikoDM.AllTabCloseAction.Execute;
        GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
-
        SetContent(BrowserNullTab);
        //TreeView\83N\83\8a\83A\81iBBS2ch.Free\82Ì\8cã\82É\83N\83\8a\83A\82·\82é\82ÆXP\83X\83^\83C\83\8b\8e\9e\82É\83G\83\89\81[\8fo\82é\81j
        TreeView.Items.Clear;
@@ -1890,11 +1825,13 @@ begin
        RoundList.LoadRoundThreadFile;
 
        LockWindowUpdate(0);
-       //
-       GikoDM.TabsOpenAction.Execute;
 end;
 
-
+{!
+\todo \89½\8cÌ IE 7 \82Å\82Í about:.. \82É\82È\82é\82Ì\82©
+      (IE 7 \82ª about:.. \82ð\92Ç\89Á\82µ\82Ä\82¢\82é\82Ì\82©\81A\83M\83R\83i\83r\82ª\92Ç\89Á\82µ\82Ä\82¢\82é\82Ì\82©)
+      \92²\8d¸\82·\82é\82±\82Æ
+}
 procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
 var
        p: TPoint;
@@ -1914,7 +1851,14 @@ var
        e: IHTMLElement;
        Ext: string;
        PathRec: TPathRec;
-begin
+  Text2: string;
+begin
+       // \83M\83R\83i\83r\82Í\83\8c\83X\83A\83\93\83J\81[\82ª about:blank.. \82Å\8en\82Ü\82é\82±\82Æ\82ð\8aú\91Ò\82µ\82Ä\82¢\82é\82ª
+  // IE 7 \82Å\82Í about:blank.. \82Å\82Í\82È\82­ about:.. \82É\82È\82é\82Ì\82Å\81A\92u\8a·\82·\82é(\93\8a\82°\82â\82è)
+       if Pos('about:..', Text) = 1 then
+       Text2 := 'about:blank..' + Copy( Text, Length('about:..')+1, Length(Text) )
+  else
+       Text2 := Text;
        if not( TObject(Sender) is TWebBrowser )then
                Exit;
        try
@@ -1941,7 +1885,7 @@ begin
                Exit;
        end;
 
-       StatusBar.Panels[1].Text := Text;
+       StatusBar.Panels[1].Text := Text2;
 
        if FHint <> nil then begin
                FHint.ReleaseHandle;
@@ -1958,8 +1902,8 @@ begin
 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
 
        s := '';
-       Ext := AnsiLowerCase(ExtractFileExt(Text));
-       if (Pos('http://', Text) = 1) and (GikoSys.Setting.PreviewVisible) and
+       Ext := AnsiLowerCase(ExtractFileExt(Text2));
+       if (Pos('http://', Text2) = 1) and (GikoSys.Setting.PreviewVisible) and
                        ((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) then begin
                if FPreviewBrowser = nil then begin
                        FPreviewBrowser := TPreviewBrowser.Create(Self);
@@ -1967,12 +1911,12 @@ begin
                        TOleControl(FPreviewBrowser).Parent := nil;
                end;
                FPreviewBrowser.Navigate(BLANK_HTML);//\91O\89ñ\82Ì\83v\83\8c\83r\83\85\81[\89æ\91\9c\8fÁ\8b\8e\97p
-               FPreviewURL := Text;
+               FPreviewURL := Text2;
                PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
                PreviewTimer.Enabled := True;
-       end else if (Pos('about:blank', Text) = 1) or (Pos('http://', Text) = 1) or (Pos('mailto:', Text) = 1) then begin
-               if Pos('mailto:', Text) = 1 then begin
-                       s := StringReplace(Text, 'mailto:', '', [rfIgnoreCase]);
+       end else if (Pos('about:blank', Text2) = 1) or (Pos('http://', Text2) = 1) or (Pos('mailto:', Text2) = 1) then begin
+               if Pos('mailto:', Text2) = 1 then begin
+                       s := StringReplace(Text2, 'mailto:', '', [rfIgnoreCase]);
                        //\83M\83R\83i\83r\83X\83\8c \83p\81[\83g3\82Ì466\8e\81\82É\8a´\8eÓ
                        GetCursorPos(p);
                        p.x := p.x - TWebBrowser(Sender).ClientOrigin.x;
@@ -1982,8 +1926,8 @@ begin
                                tmp2 := ZenToHan(e.Get_outerText);
                                if (GikoSys.IsNumeric(tmp2)) then begin
                                        //\82\93\82Í\83\8c\83X\94Ô\8d\86\82Á\82Û\82¢\82Á\82·\81B
-                                       wkIntSt := StrToInt(tmp2);
-                                       wkIntTo := StrToInt(tmp2);
+                                       wkIntSt := StrToInt64(tmp2);
+                                       wkIntTo := StrToInt64(tmp2);
                                                //s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
                                        FHint.PopupType := gptThread;
                                        HTMLCreater.SetResPopupText(FHint, GetActiveContent, wkIntSt, wkIntTo, False, False);
@@ -1994,7 +1938,7 @@ begin
                        end;
                end else begin
                        threadItem := GetActiveContent;
-                       URL := THTMLCreate.GetRespopupURL(Text, threadItem.URL);
+                       URL := THTMLCreate.GetRespopupURL(Text2, threadItem.URL);
                        PathRec := Gikosys.Parse2chURL2(URL);
                        if (PathRec.FNoParam) then begin
                                PathRec.FSt := 1;
@@ -2139,27 +2083,35 @@ procedure TGikoForm.ListViewColumnClick(Sender: TObject;
 var
        id, idx                 : Integer;
        orderList               : TList;
+       vSortIndex              : Integer;
+       vSortOrder              : Boolean;
 begin
        idx := TListViewUtils.ActiveListTrueColumn( Column ).Tag;
-
-       if TObject( FActiveList ) is TBBS then
-               orderList := GikoSys.Setting.BBSColumnOrder
-       else if TObject( FActiveList ) is TCategory then
-               orderList := GikoSys.Setting.CategoryColumnOrder
-       else if TObject( FActiveList ) is TBoard then
-               orderList := GikoSys.Setting.BoardColumnOrder
-       else
+       if TObject( FActiveList ) is TBBS then begin
+               orderList := GikoSys.Setting.BBSColumnOrder;
+               vSortIndex := GikoSys.Setting.BBSSortIndex;
+               vSortOrder := GikoSys.Setting.BBSSortOrder;
+       end else if TObject( FActiveList ) is TCategory then begin
+               orderList := GikoSys.Setting.CategoryColumnOrder;
+               vSortIndex := GikoSys.Setting.CategorySortIndex;
+               vSortOrder := GikoSys.Setting.CategorySortOrder;
+       end else if TObject( FActiveList ) is TBoard then begin
+               orderList := GikoSys.Setting.BoardColumnOrder;
+               vSortIndex := GikoSys.Setting.BoardSortIndex;
+               vSortOrder := GikoSys.Setting.BoardSortOrder;
+       end else
                Exit;
 
        id := Integer( orderList[ idx ] );
 
-       if FSortIndex = id then
-               FSortOrder := not FSortOrder
+
+       if vSortIndex = id then
+               vSortOrder := not vSortOrder
        else begin
-               FSortOrder := id = 0;
+               vSortOrder := id = 0;
        end;
 
-       TListViewUtils.ListViewSort(Sender, ListView, Column, GikoDM.ListNumberVisibleAction.Checked, FSortOrder, FSortIndex );
+       TListViewUtils.ListViewSort(Sender, ListView, Column, GikoDM.ListNumberVisibleAction.Checked, vSortOrder);
 end;
 
 procedure TGikoForm.MenuToolBarCustomDrawButton(Sender: TToolBar;
@@ -2353,44 +2305,25 @@ begin
        end;
 end;
 
-{procedure TGikoForm.CabinetPanelVisible(PanelVisible: Boolean);
-begin
-       TreeSplitter.Visible := PanelVisible;
-       CabinetPanel.Visible := PanelVisible;
-       CabinetToolButton.Down := PanelVisible;
-end;}
-
 procedure TGikoForm.ListViewAllSelect;
 begin
        ListView.SetFocus;
        ListView.SelectAll;
 end;
-
-procedure TGikoForm.TreeViewDblClick(Sender: TObject);
-var
-       APoint: TPoint;
-       HitTest: THitTests;
-begin
-       GetCursorPos(APoint);
-       APoint := TreeView.ScreenToClient(APoint);
-       HitTest := TreeView.GetHitTestInfoAt(APoint.x, APoint.y);
-       if not (htOnLabel in HitTest) then Exit;
-
-       TreeDoubleClick( TreeView.Selected );
-end;
-
 procedure TGikoForm.DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
 begin
        AddMessageList(Msg, nil, Icon);
 end;
-
+// *************************************************************************
+//! \83_\83E\83\93\83\8d\81[\83h\82ª\8a®\97¹\82µ\82½\82Æ\82«\82É\94­\90\82·\82é\83C\83x\83\93\83g
+// *************************************************************************
 procedure TGikoForm.DownloadEnd(Sender: TObject; Item: TDownloadItem);
 var
        ATitle: string;
        s: string;
        boardPlugIn : TBoardPlugIn;
        i: Integer;
-       browserRec      : TBrowserRecord;
+       Res : TResRec;
 begin
        try
                if Item.DownType = gdtBoard then
@@ -2398,21 +2331,28 @@ begin
                else
                        ATitle := Item.ThreadItem.Title;
                if ATitle = '' then
-                       ATitle := GikoSys.Setting.GetMessage(Ord(gmUnKnown));
+                       ATitle := GikoSys.GetGikoMessage(gmUnKnown);
 
                if Item.State in [gdsComplete, gdsDiffComplete] then begin
                        //\90³\8fí\8fI\97¹
                        if Item.DownType = gdtBoard then begin
                                //\94Â
                                Item.SaveListFile;
-                               AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmSureItiran)), nil, gmiOK);
+                               AddMessageList(ATitle + ' ' + GikoSys.GetGikoMessage(gmSureItiran), nil, gmiOK);
                                if GetActiveList = Item.Board then begin
                                        FActiveList := nil;
+                                       //\8e©\93®\83\\81[\83g\82Ì\8fê\8d\87\94Â\88ê\97\97\82Ì\83\\81[\83g\8f\87\82ð\83N\83\8a\83A\82·\82é
+                                       if (GikoSys.Setting.AutoSortThreadList) then begin
+                                               GikoSys.Setting.BoardSortIndex := 0;
+                                               GikoSys.Setting.BoardSortOrder := True;
+                                       end;
+                                       Sort.SetSortDate(Now());
                                        SetActiveList(Item.Board);
                                end;
                                Item.Board.Modified := True;
                                Item.Board.IsThreadDatRead := True;
                                PlaySound('New');
+                               ListView.Refresh;
                        end else if Item.DownType = gdtThread then begin
                                //\83X\83\8c
                                Item.SaveItemFile;
@@ -2421,10 +2361,12 @@ begin
                                if (Item.ThreadItem.ParentBoard.IsBoardPlugInAvailable) and (Item.ThreadItem.Title = '') then begin
                                        //boardPlugIn           := Item.ThreadItem.BoardPlugIn;
                                        boardPlugIn             := Item.ThreadItem.ParentBoard.BoardPlugIn;
-                                       Item.ThreadItem.Title := DivideStrLine(boardPlugIn.GetDat( DWORD( Item.ThreadItem ), 1 )).FTitle;
+                                       THTMLCreate.DivideStrLine(boardPlugIn.GetDat( DWORD( Item.ThreadItem ), 1 ), @Res);
+                                       Item.ThreadItem.Title := Res.FTitle;
                                        ATitle := Item.ThreadItem.Title;
                                end else if ATitle = '\81i\96¼\8fÌ\95s\96¾\81j' then begin
-                                       ATitle := DivideStrLine(GikoSys.ReadThreadFile(Item.ThreadItem.GetThreadFileName, 1)).FTitle;
+                                       THTMLCreate.DivideStrLine(GikoSys.ReadThreadFile(Item.ThreadItem.GetThreadFileName, 1), @Res);
+                                       ATitle := Res.FTitle;
                                end;
                                for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
                                        if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = Item.ThreadItem then begin
@@ -2434,15 +2376,12 @@ begin
                                end;
                                if GikoSys.Setting.BrowserTabVisible then begin
                                        if GetActiveContent = Item.ThreadItem then
-                                               browserRec := InsertBrowserTab(Item.ThreadItem)
+                                               InsertBrowserTab(Item.ThreadItem)
                                        else if (ListView.Selected <> nil ) and ( TObject(ListView.Selected.Data) is TThreadItem ) and ( Item.ThreadItem = TThreadItem(ListView.Selected.Data)) then
-                                               browserRec := InsertBrowserTab(Item.ThreadItem, True)
+                                               InsertBrowserTab(Item.ThreadItem, True)
                                        else
-                                               browserRec := InsertBrowserTab(Item.ThreadItem, False);
-                                       if browserRec.Thread = BrowserNullTab.Thread then begin
-                                               browserRec.Movement := BrowserNullTab.Movement;
-                                               BrowserNullTab.Movement := '';
-                                       end;
+                                               InsertBrowserTab(Item.ThreadItem, False);
+
                                end else begin
                                        if (GetActiveContent = Item.ThreadItem) or (FActiveContent = nil) or(FActiveContent.Browser = BrowserNullTab.Browser) then
                                                                                                InsertBrowserTab(Item.ThreadItem);
@@ -2452,12 +2391,12 @@ begin
 
                                if Item.State = gdsComplete then begin
                                        PlaySound('New');
-                                                                               AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmSureSyutoku)), nil, gmiOK);
+                                                                               AddMessageList(ATitle + ' ' + GikoSys.GetGikoMessage(gmSureSyutoku), nil, gmiOK);
                                                                                //Add by Genyakun
                                                                                DiffComp := True;
                                end else begin
                                        PlaySound('NewDiff');
-                                                                               AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmSureDiff)), nil, gmiOK);
+                                                                               AddMessageList(ATitle + ' ' + GikoSys.GetGikoMessage(gmSureDiff), nil, gmiOK);
                                                                                //Add by Genyakun
                                                                                DiffComp := True;
                                end;
@@ -2479,29 +2418,32 @@ begin
                                                gvtAll: ListView.Items.Count := TBoard(ActiveList).Count;
                                                gvtLog: ListView.Items.Count := TBoard(ActiveList).LogThreadCount;
                                                gvtNew: ListView.Items.Count := TBoard(ActiveList).NewThreadCount;
+                                               gvtArch: ListView.Items.Count := TBoard(ActiveList).ArchiveThreadCount;
+                                               gvtLive: ListView.Items.Count := TBoard(ActiveList).LiveThreadCount;
                                                gvtUser: ListView.Items.Count := TBoard(ActiveList).UserThreadCount;
                                        end;
                                end;
+                               RefreshListView(Item.ThreadItem);
                        end;
-                       ListView.Refresh;
+
                end else if Item.State = gdsNotModify then begin
                        //\95Ï\8dX\83i\83V
 {                      if (Item.DownType = gdtThread) and (AddHistory(Item.ThreadItem)) then begin
                                //SetContent(Item.ThreadItem);
                                InsertBrowserTab(Item.ThreadItem);
                        end;}
-                                               AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmNotMod)), nil, gmiSAD);
+                                               AddMessageList(ATitle + ' ' + GikoSys.GetGikoMessage(gmNotMod), nil, gmiSAD);
                        PlaySound('NoChange');
                        Screen.Cursor := crDefault;
                end else if Item.State = gdsAbort then begin
                        //\92\86\92f
-                                               AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmAbort)), nil, gmiOK);
+                                               AddMessageList(ATitle + ' ' + GikoSys.GetGikoMessage(gmAbort), nil, gmiOK);
                end else if Item.State = gdsError then begin
                        //\83G\83\89\81[
                        s := Item.ErrText;
                        if s <> '' then
                                s := ':' + s;
-                        AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmError)) + ' (' + IntToStr(Item.ResponseCode) + ')' + s, nil, gmiNG);
+                        AddMessageList(ATitle + ' ' + GikoSys.GetGikoMessage(gmError) + ' (' + IntToStr(Item.ResponseCode) + ')' + s, nil, gmiNG);
 //                     if Item.ResponseCode = 302 then
 //                             AddMessageList('\94Â\82ª\88Ú\93]\82µ\82½\82©\82à\82µ\82ê\82È\82¢\82Ì\82Å\94Â\8dX\90V\82ð\8ds\82Á\82Ä\82­\82¾\82³\82¢\81B', nil, gmiNG);
                        PlaySound('Error');
@@ -2546,24 +2488,9 @@ begin
        StatusBar.Panels[1].Text := FDownloadTitle + ' - \83_\83E\83\93\83\8d\81[\83h\92\86 (' + IntToStr(AWorkCount) + '/' + IntToStr(FDownloadMax) + ')';
 end;
 
-{
-procedure TGikoForm.SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
+procedure TGikoForm.AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
 var
-       Component: TComponent;
-begin
-       Component := FindComponent('ProgressBar' + IntToStr(Number + 1));
-       if Component <> nil then begin
-               if not (Component is TProgressBar) then Exit;
-               if Max <> -1 then
-                       TProgressBar(Component).Max := Max;
-               TProgressBar(Component).Position := Value;
-       end;
-end;
-}
-
-procedure TGikoForm.AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
-var
-       ListItem: TListItem;
+       ListItem: TListItem;
 begin
        MessageListView.Items.BeginUpdate;
        try
@@ -2599,9 +2526,9 @@ begin
        if ThreadItem.IsLogFile then begin
                //\82¨\8bC\82É\93ü\82è\82Ì\91S\82Ä\8aJ\82­\82Æ\82©\82â\82é\82Æ\81A\8d¡\8aJ\82¢\82Ä\82é\83X\83\8c\82Ìbrowser\82ð\95t\82¯\91Ö\82¦\82é\8b°\82ê\82ª\82 \82é
                //\8fí\82É\82S\94Ô\96Ú\82ÉActive\82Ì\83u\83\89\83E\83U\82ª\97\88\82È\82¢\82æ\82¤\82É\88Ú\93®\82³\82¹\82é
-               if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil) and
-                       (FActiveContent.FBrowser <> BrowserNullTab.Browser)then begin
-                       j := FBrowsers.IndexOf(FActiveContent.FBrowser);
+               if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) and
+                       (FActiveContent.Browser <> BrowserNullTab.Browser)then begin
+                       j := FBrowsers.IndexOf(FActiveContent.Browser);
                        if j = BROWSER_COUNT - 1 then
                                FBrowsers.Move(BROWSER_COUNT - 1, 0);
                end;
@@ -2613,14 +2540,14 @@ begin
                        if TObject(BrowserTab.Tabs.Objects[i]) is TBrowserRecord then begin
                                if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin
                                        Result := TBrowserRecord( BrowserTab.Tabs.Objects[i] );
-                                       if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser = nil then begin
+                                       if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = nil then begin
                                                for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
-                                                       if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
+                                                       if TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
                                                                ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[j]));
                                                                break;
                                                        end;
                                                end;
-                                               TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
+                                               TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
                                                TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
                                                FBrowsers.Move(BROWSER_COUNT - 1, 0);
                                        end;
@@ -2637,7 +2564,7 @@ begin
                if GikoSys.Setting.BrowserTabAppend = gtaFirst then begin
                        newBrowser := TBrowserRecord.Create;
                        for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
-                               if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
+                               if TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
                                        ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[j]));
                                        break;
                                end;
@@ -2662,7 +2589,7 @@ begin
                end else begin
                        newBrowser := TBrowserRecord.Create;
                        for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
-                               if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
+                               if TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
                                        ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[j]));
                                        break;
                                end;
@@ -2696,6 +2623,9 @@ begin
                        BrowserNullTab := TBrowserRecord.Create;
                        BrowserNullTab.Browser := Browser;
                end;
+//             if BrowserNullTab.thread <> ThreadItem then begin
+//                     BrowserNullTab.Movement := '';
+//             end;
                BrowserNullTab.thread := ThreadItem;
                Result := BrowserNullTab;
                BrowserTab.TabIndex := -1;
@@ -2712,7 +2642,7 @@ var
        BBSID: string;
        FileName: string;
        sTitle: string;
-       doc:  Variant;
+       doc: Variant;
        s: string;
        i: Integer;
        idx: Integer;
@@ -2725,10 +2655,10 @@ begin
        idx := BrowserTab.TabIndex;
        if (FActiveContent <> nil) and
                (FActiveContent.Thread <> Thread.Thread) and
+               (FActiveContent.Browser <> nil) and
                (Assigned(FActiveContent.Browser.Document)) then begin
                try
                try
-                       Sleep(1);
                        FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document).Body).ScrollTop;
                except
                        on E: Exception do
@@ -2743,7 +2673,7 @@ begin
                ItemBoardImage.Picture := nil;
                BrowserNameLabel.Caption := '';
                ItemImage.Picture := nil;
-               BrowserNullTab.Thread := nil;
+        BrowserNullTab.Thread := nil;
                //TOleControl(BrowserNullTab.Browser).Visible := true;
                ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW);
                FActiveContent := nil;
@@ -2752,7 +2682,7 @@ begin
                if FActiveContent.Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then
                        FBrowsers.Move(BROWSER_COUNT - 1, 0);
                for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
-                       if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
+                       if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
                                ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[i]));
                                break;
                        end;
@@ -2782,11 +2712,10 @@ begin
                        if (FActiveContent.Browser <> BrowserNullTab.Browser) then
                                ShowWindow(FActiveContent.Browser.Handle, SW_HIDE);
                end;
-               ShowWindow(Thread.FBrowser.Handle, SW_SHOW);
+               ShowWindow(Thread.Browser.Handle, SW_SHOW);
                if (not Assigned(Thread.Browser.Document)) then begin
                        Thread.Browser.Navigate('about:blank');
                end;
-
                while (Thread.Browser.ReadyState <> READYSTATE_COMPLETE) and
                                (Thread.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
                        Application.ProcessMessages;
@@ -2795,12 +2724,32 @@ begin
                        end;
                end;
 
+               if (Thread <> nil) and (ThreadItem <>nil) then begin
+                       BrowserBoardNameLabel.Caption := ThreadPTitle;
+                       ItemIcon16.GetBitmap(4, ItemBoardImage.Picture.Bitmap);
+                       BrowserNameLabel.Caption := ThreadTitle;
+                       ItemImage.Picture := nil;
+                       if ThreadIsLog then
+                               if ThreadNewArraical then
+                                       ItemImageList.GetBitmap(2, ItemImage.Picture.Bitmap)
+                               else
+                                       ItemImageList.GetBitmap(0, ItemImage.Picture.Bitmap)
+                       else
+                               ItemImageList.GetBitmap(1, ItemImage.Picture.Bitmap);
+
+                       ItemImage.Left := BrowserBoardNameLabel.Left + BrowserBoardNameLabel.Width + 8;
+                       BrowserNameLabel.Left := ItemImage.Left + 20;
+
+               end;
                //ActiveContent\81@\82Ì\8dX\90V
                FActiveContent := Thread;
 
                if not ThreadIsLog then begin
-                       Self.Caption := CAPTION_NAME ;
+                       Self.Caption := GikoDataModule.CAPTION_NAME ;
+                       //\83X\83e\81[\83^\83X\83o\81[\82É\95\\8e¦\82µ\82Ä\82¢\82é\83X\83\8c\82Ì\97e\97Ê\82ð\8fÁ\8b\8e
+                       StatusBar.Panels[THREADSIZE_PANEL].Text := '';
                        try
+                               Thread.Browser.BringToFront;
                                s := '<HTML><BODY><CENTER>\82±\82Ì\83X\83\8c\83b\83h\82Í\8eæ\93¾\82µ\82Ä\82¢\82Ü\82¹\82ñ</CENTER></BODY></HTML>';
                                doc := Idispatch( olevariant(Thread.Browser.ControlInterface).Document) as IHTMLDocument2;
                                doc.open;
@@ -2808,51 +2757,28 @@ begin
                                doc.Write(s);
                                doc.Close;
                        finally
+                               
                        end;
                end else begin
-                       Self.Caption := CAPTION_NAME + ' - [' + ThreadTitle + ']';
+                       Self.Caption := GikoDataModule.CAPTION_NAME + ' - [' + ThreadTitle + ']';
+                       //\83X\83e\81[\83^\83X\83o\81[\82É\95\\8e¦\82µ\82Ä\82¢\82é\83X\83\8c\82Ì\97e\97Ê\82ð\95\\8e¦
+                       StatusBar.Panels[THREADSIZE_PANEL].Text := Format('%6.2f kB', [ThreadItem.Size / 1024]);
+                       StatusBar.Panels[THREADSIZE_PANEL].Width :=
+                               Max(StatusBar.Canvas.TextWidth(StatusBar.Panels[THREADSIZE_PANEL].Text), 70);
                        //Thread.Repaint\82Í\81A\83X\83L\83\93\93\99\82Ì\90Ý\92è\82ð\95Ï\8dX\82µ\82½\82Æ\82«\81AThread\82ð\83_\83E\83\93\83\8d\81[\83h\82µ\82½\82Æ\82«
                        //\90V\8bK\82ÉThread\82ð\8aJ\82¢\82½\82Æ\82«\82É\90^\82É\82È\82Á\82Ä\82¢\82é\81B
                        if Thread.Repaint then begin
                                Thread.Repaint := false;
 
                                Thread.Browser.OnStatusTextChange := nil;
-                               doc := Idispatch( olevariant(Thread.Browser.ControlInterface).Document) as IHTMLDocument2;
-
-                               //GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
-                               HTMLCreater.CreateHTML2(doc, ThreadItem, sTitle);
+                               LockWindowUpdate(Thread.Browser.ParentWindow);
+                               HTMLCreater.CreateHTML2(Thread.Browser, ThreadItem, sTitle);
                                Thread.Browser.OnStatusTextChange := BrowserStatusTextChange;
-                               
-                               if ThreadItem = nil then begin
-                                       FActiveContent := nil;
-                                       BrowserTab.Repaint;
-                                       Exit;
-                               end;
                                PostMessage( Handle, USER_DOCUMENTCOMPLETE, Integer( Thread.Browser ), 0 );
                        end;
                end;
-               if (Thread <> nil) and (ThreadItem <>nil) then begin
-                       BrowserBoardNameLabel.Caption := ThreadPTitle;
-                       ItemIcon16.GetBitmap(4, ItemBoardImage.Picture.Bitmap);
-                       BrowserNameLabel.Caption := ThreadTitle;
-                       ItemImage.Picture := nil;
-                       if ThreadIsLog then
-                               if ThreadNewArraical then
-                                       ItemImageList.GetBitmap(2, ItemImage.Picture.Bitmap)
-                               else
-                                       ItemImageList.GetBitmap(0, ItemImage.Picture.Bitmap)
-                       else
-                               ItemImageList.GetBitmap(1, ItemImage.Picture.Bitmap);
 
-                       ItemImage.Left := BrowserBoardNameLabel.Left + BrowserBoardNameLabel.Width + 8;
-                       BrowserNameLabel.Left := ItemImage.Left + 20;
-
-                       //Thread\82Ì\94Â\82Æ\95\\8e¦\82µ\82Ä\82¢\82é\94Â\82ª\93¯\82\82È\82ç\95`\89æ\82ð\8dX\90V\82·\82é
-                       if (FActiveList is TBoard) and (TBoard(ActiveList) = ThreadItem.ParentBoard) then
-                               ListView.Refresh;
-               end else begin
-                       FActiveContent := nil;
-               end;
+               RefreshListView(ThreadItem);
        finally
                Screen.Cursor := crDefault;
        end;
@@ -2890,10 +2816,20 @@ begin
                ListView.Selected := nil;
 //     ListView.Columns.Clear;
                if (FActiveContent <> nil) and (FActiveContent.Thread <> nil)
-                       and (FActiveContent.Thread.IsLogFile) then
-                       Self.Caption := CAPTION_NAME + ' - [' + FActiveContent.Thread.Title + ']'
-               else
-                       Self.Caption := CAPTION_NAME;
+                       and (FActiveContent.Thread.IsLogFile) then begin
+                       try
+                               Self.Caption := GikoDataModule.CAPTION_NAME + ' - [' + FActiveContent.Thread.Title + ']'
+                       except
+                               on E: Exception do begin
+                                       //\83X\83\8c\88ê\97\97DL\8cã\82È\82Ç\82ÉFActiveContent\82Ì\8e\9d\82ÂThread\82ª
+                                       //\8dí\8f\9c\82³\82ê\82Ä\82¢\82é\8fê\8d\87\82ª\82 \82é\82Ì\82Å\82±\82±\82Ä\8f\88\97\9d\82·\82é
+                                       ReleaseBrowser(FActiveContent);
+                                       FActiveContent.Thread := nil;
+                                       Self.Caption := GikoDataModule.CAPTION_NAME;
+                               end;
+                       end;
+               end else
+                       Self.Caption := GikoDataModule.CAPTION_NAME;
                //Application.Title := CAPTION_NAME;
 
 //             ActiveListColumnSave;
@@ -2901,14 +2837,11 @@ begin
                Screen.Cursor := crHourGlass;
                try
                        if Obj is TBBS then begin
-                               TListViewUtils.SetCategoryListItem(TBBS(obj), ListView, GikoDM.ListNumberVisibleAction.Checked,
-                                                               FSortIndex, FSortOrder);
+                               TListViewUtils.SetCategoryListItem(TBBS(obj), ListView, GikoDM.ListNumberVisibleAction.Checked);
                        end else if Obj is TCategory then begin
-                               TListViewUtils.SetBoardListItem(TCategory(Obj), ListView, GikoDM.ListNumberVisibleAction.Checked,
-                                                               FSortIndex, FSortOrder);
+                               TListViewUtils.SetBoardListItem(TCategory(Obj), ListView, GikoDM.ListNumberVisibleAction.Checked);
                        end else if Obj is TBoard then begin
-                               TListViewUtils.SetThreadListItem(TBoard(Obj), ListView,  GikoDM.ListNumberVisibleAction.Checked,
-                                                               FSortIndex, FSortOrder);
+                               TListViewUtils.SetThreadListItem(TBoard(Obj), ListView,  GikoDM.ListNumberVisibleAction.Checked);
                        end;
                finally
                        Screen.Cursor := crDefault;
@@ -2952,7 +2885,10 @@ begin
                        //gvtAll: ListView.Items.Count := Board.Count;
                        gvtLog: Board.LogThreadCount := Board.GetLogThreadCount;
                        gvtNew: Board.NewThreadCount := Board.GetNewThreadCount;
+                       gvtArch: Board.ArchiveThreadCount := Board.GetArchiveThreadCount;
+                       gvtLive: Board.LiveThreadCount := Board.GetLiveThreadCount;
                        gvtUser: Board.UserThreadCount:= Board.GetUserThreadCount;
+
                end;
 
                SetActiveList(Board);
@@ -2984,6 +2920,14 @@ begin
                                ListView.Canvas.Font.Color := clGreen;
                                s := '\82±\82Ì\83r\83\85\81[\82É\82Í\90V\92\85\83A\83C\83e\83\80\82ª\82 \82è\82Ü\82¹\82ñ\81B';
                        end;
+                       gvtArch: begin
+                               ListView.Canvas.Font.Color := clFuchsia;
+                               s := '\82±\82Ì\83r\83\85\81[\82É\82ÍDAT\97\8e\82¿\83A\83C\83e\83\80\82ª\82 \82è\82Ü\82¹\82ñ\81B';
+                       end;
+                       gvtLive: begin
+                               ListView.Canvas.Font.Color := clMaroon;
+                               s := '\82±\82Ì\83r\83\85\81[\82É\82Í\90\91\83A\83C\83e\83\80\82ª\82 \82è\82Ü\82¹\82ñ\81B';
+                       end;
                        gvtUser: begin
                                ListView.Canvas.Font.Color := clNavy;
                                s := '\82±\82Ì\83r\83\85\81[\82É\82Í\83^\83C\83g\83\8b\82ª\81u%s\81v\82ð\8aÜ\82Þ\83A\83C\83e\83\80\82ª\82 \82è\82Ü\82¹\82ñ\81B';
@@ -3141,12 +3085,27 @@ end;
 procedure TGikoForm.DeleteHistory( threadItem: TThreadItem );
 var
        i: Integer;
-begin
+       node: TTreeNode;
+begin
+       // \83L\83\83\83r\83l\83b\83g\82É\97\9a\97ð\82ª\95\\8e¦\82³\82ê\82Ä\82¢\82½\82ç\81A
+       // \83L\83\83\83r\83l\83b\83g\93à\82Ì\83A\83C\83e\83\80\82à\8dí\8f\9c\82·\82é\81B
+       if (FTreeType = gttHistory) then begin
+               node := TreeView.Items.GetFirstNode;
+               while (node <> nil) do begin
+                       if ( TFavoriteThreadItem(node.Data).Item  = threadItem ) then begin
+                               TreeView.Items.Delete(node);
+                               TreeView.Refresh;
+                               node := nil;
+                       end else begin
+                               node := node.GetNext;
+                       end;
+               end;
+       end;
        for i := 0 to FHistoryList.Count - 1 do begin
-               if threadItem.URL = TFavoriteThreadItem( FHistoryList.Items[i] ).URL then begin
+               if threadItem = TFavoriteThreadItem( FHistoryList.Items[i] ).Item then begin
                        TFavoriteThreadItem( FHistoryList.Items[ i ] ).Free;
                        FHistoryList.Delete(i);
-            FHistoryList.Capacity := FHistoryList.Count;
+                       FHistoryList.Capacity := FHistoryList.Count;
                        Break;
                end;
        end;
@@ -3192,7 +3151,7 @@ begin
                        // title \82Í\8d¡\82Ì\82Æ\82±\82ë\8eg\82Á\82Ä\82¢\82È\82¢
                        saveList.Add(
                                '<history url="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).URL ) + '"' +
-                               ' title="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).Title ) + '"/>');
+                               ' title="' + HtmlEncode( MojuUtils.Sanitize(TFavoriteThreadItem( FHistoryList[ i ] ).Title )) + '"/>');
                end;
                saveList.Add('</address>');
                saveList.SaveToFile( GikoSys.GetConfigDir + 'History.xml' );
@@ -3211,15 +3170,21 @@ var
        HistoryNode     : IXMLNode;
        s                                               : string;
        favItem                 : TFavoriteThreadItem;
+{$IFDEF DEBUG}
+       st, rt : Cardinal;
+{$ENDIF}
 begin
+{$IFDEF DEBUG}
+       st := GetTickCount;
+{$ENDIF}
 
        fileName := GikoSys.GetConfigDir + 'History.xml';
 
        if FileExists( fileName ) then begin
                try
-            XMLDoc := IXMLDocument.Create;
+                       XMLDoc := IXMLDocument.Create;
                        //XMLDoc := LoadXMLDocument(FileName);
-            LoadXMLDocument(FileName, XMLDoc);
+                       LoadXMLDocument(FileName, XMLDoc);
                        try
                                XMLNode := XMLDoc.DocumentElement;
 
@@ -3232,9 +3197,9 @@ begin
                                                                s := Trim(HistoryNode.Attributes['url']);
                                                                if s <> '' then begin
                                                                        favItem := TFavoriteThreadItem.Create(
-                                                                               s, HistoryNode.Attributes[ 'title' ] );
+                                                                               s, MojuUtils.UnSanitize(HistoryNode.Attributes[ 'title' ]) );
                                                                        if not AddHistory( favItem ) then
-                                       favItem.Free;
+                                                                               favItem.Free;
                                                                end;
                                                        //end;
                                                end;
@@ -3246,6 +3211,10 @@ begin
                except
                end;
        end;
+{$IFDEF DEBUG}
+       rt := GetTickCount - st;
+       Writeln('Runtime(Load Histroy) : ' + IntToStr(rt) + ' ms');
+{$ENDIF}
 
 end;
 
@@ -3340,10 +3309,11 @@ begin
                GikoDM.CabinetHistoryAction.Checked := False;
                GikoDM.CabinetFavoriteAction.Checked := False;
 
-               if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS) then begin
+               if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS)
+                       or (not (CabinetPanel.Visible)) then begin
                        FTreeType := gtt2ch;
                        HistoryToolBar.Hide;
-            FActiveBBS := inBBS;
+                       FActiveBBS := inBBS;
                        TListViewUtils.SetBoardTreeNode(inBBS, TreeView);
                        TreeView.Items.GetFirstNode.Expanded := True;                           //\83c\83\8a\81[\83g\83b\83v\8d\80\96Ú\82¾\82¯\82ð\8aJ\82­
                        //\83c\83\8a\81[\82Ì\83g\83b\83v\8d\80\96Ú\82ð\91I\91ð\82·\82é
@@ -3492,7 +3462,6 @@ begin
        end else begin
                if Item <> FActiveList then begin
                        ActiveListColumnSave;
-
                        if (Item is TBBS) or (Item is TCategory) then begin
                                ListView.Columns.Clear;
                                SetActiveList( Item );
@@ -3506,6 +3475,7 @@ begin
                                                Screen.Cursor := crDefault;
                                        end;
                                end;
+                               Sort.SetSortDate(Now());
                                SetActiveList( Item );
                        end;
                end;
@@ -3632,61 +3602,13 @@ begin
                end;
        end;
 end;
-procedure TGikoForm.BrowserMovement(const AName: string; BrowserRecord: TBrowserRecord);
-var
-       top: Integer;
-       item: OleVariant;
-       nm: OleVariant;
-       activeBrower :TWebBrowser;
-begin
-       //
-       while (BrowserRecord.Browser.ReadyState <> READYSTATE_COMPLETE) and
-                               (BrowserRecord.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
-               Sleep(1);
-               Application.ProcessMessages;
-       end;
-
-       // Access Violation \82ª\8bN\82«\82é\8e\96\82ª\82 \82é\82Ì\82Å\8d¡\8cã\97v\83`\83F\83b\83N
-       if(BrowserRecord <> nil) and (BrowserRecord.FBrowser <> nil) then begin
-               activeBrower := BrowserRecord.FBrowser;
-               try
-                       top := 0;
-                       nm := AName;
-                       item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm);
-                       item.focus();
-                       repeat
-                               top := top + item.offsetTop;
-                               item := item.offsetParent;
-                       until AnsiCompareText(item.tagName, 'body' ) = 0;
-                       OleVariant(activeBrower.Document as IHTMLDocument2).body.scrollTop := top;
-               except
-               end;
-       end;
-end;
 
 procedure TGikoForm.BrowserMovement(const AName: string);
-var
-       top: Integer;
-       item: OleVariant;
-       nm: OleVariant;
-       activeBrower :TWebBrowser;
 begin
        // Access Violation \82ª\8bN\82«\82é\8e\96\82ª\82 \82é\82Ì\82Å\8d¡\8cã\97v\83`\83F\83b\83N
-       if(BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex >= 0) then begin
-               activeBrower := FActiveContent.Browser;
-               try
-                       top := 0;
-                       nm := AName;
-                       item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm);
-                       item.focus();
-                       repeat
-                               top := top + item.offsetTop;
-                               item := item.offsetParent;
-                       until AnsiCompareText(item.tagName, 'body' ) = 0;
-
-                       OleVariant(activeBrower.Document as IHTMLDocument2).body.scrollTop := top;
-               except
-               end;
+       if(BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex >= 0)
+               and (FActiveContent <> nil) then begin
+               FActiveContent.Move(AName);
        end;
 end;
 
@@ -3699,6 +3621,9 @@ begin
        end else if TObject(Node.Data) is TBoard then begin
                TBoard(Node.Data).NodeExpand := False;
        end;
+       if (TreeView.Selected <> nil) and (TreeView.Selected = Node) then begin
+       TreeClick(TreeView.Selected);
+       end;
 end;
 
 procedure TGikoForm.MessageListViewResize(Sender: TObject);
@@ -3752,123 +3677,90 @@ end;
 
 procedure TGikoForm.DeleteTab(BrowserRecord: TBrowserRecord);
 var
-       i, j, idx: Integer;
-       doc: Variant;
+       i: Integer;
 begin
-       idx := BrowserTab.TabIndex;
        FTabHintIndex := -1;
        for i := 0 to BrowserTab.Tabs.Count - 1 do begin
                if TBrowserRecord(BrowserTab.Tabs.Objects[i]) = BrowserRecord then begin
-                       BrowserTab.Tabs.BeginUpdate;
-                       try
-                               if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
-                                       doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document;
-                                       TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := doc.Body.ScrollTop;
-                               end;
-                       except
-                               TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := 0;
-                       end;
-                       if( FActiveContent = TBrowserRecord(BrowserTab.Tabs.Objects[i]) ) then
-                               FActiveContent := nil;
-                       if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
-                               j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser);
-                               if j <> -1 then
-                                       FBrowsers.Move(j, BROWSER_COUNT - 1);
-                       end;
-                       TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
-                       BrowserTab.Tabs.Delete(i);
-                       if idx > i then begin
-                               BrowserTab.TabIndex := idx - 1;
-                       end else begin
-                               if BrowserTab.Tabs.Count -1 >= idx then
-                                       BrowserTab.TabIndex := idx
-                               else
-                                       BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
-                       end;
-                       if BrowserTab.Tabs.Count = 0 then begin
-                               BrowserNullTab.Thread := nil;
-                       end;
-                       if(BrowserTab.TabIndex <> -1) and
-                               ( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin
-                               for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
-                                       if(TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser
-                                                = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) )then
-                                       begin
-                                               ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[j]));
-                                               break;
-                                       end;
-                               end;
-                               TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser
-                                        :=  TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
-                               TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Repaint := true;
-                               FBrowsers.Move(BROWSER_COUNT - 1, 0);
-                       end;
-                       BrowserTab.Tabs.EndUpdate;
-                       if( FActiveContent = nil) then
-                               BrowserTab.OnChange(nil);
-                       Exit;
+            DeleteTab(i, BrowserTab.TabIndex);
+                       Break;
                end;
        end;
 end;
 procedure TGikoForm.DeleteTab(ThreadItem: TThreadItem);
 var
-       i, j, idx: Integer;
-       doc: Variant;
+       i: Integer;
 begin
-       idx := BrowserTab.TabIndex;
        FTabHintIndex := -1;
        for i := 0 to BrowserTab.Tabs.Count - 1 do begin
                if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin
-                       BrowserTab.Tabs.BeginUpdate;
-                       try
-                               if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
-                                       doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document;
-                                       TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := doc.Body.ScrollTop;
-
-                               end;
-                       except
-                               TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := 0;
-                       end;
-                       if(FActiveContent = TBrowserRecord(BrowserTab.Tabs.Objects[i])) then
-                               FActiveContent := nil;
-                       if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
-                               j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser);
-                               if j <> -1 then
-                                       FBrowsers.Move(j, BROWSER_COUNT - 1);
-                       end;
-                       TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
-                       BrowserTab.Tabs.Delete(i);
-                       if idx > i then begin
-                               BrowserTab.TabIndex := idx - 1;
-                       end else begin
-                               if BrowserTab.Tabs.Count -1 >= idx then
-                                       BrowserTab.TabIndex := idx
-                               else
-                                       BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
-                       end;
-                       if(BrowserTab.TabIndex <> -1) and
-                               ( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin
-                               for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
-                                       if(TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser
-                                                = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) )then
-                                       begin
-                                               ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[j]));
-                                               break;
-                                       end;
-                               end;
-                               TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser
-                                        :=  TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
-                               TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Repaint := true;
-                               FBrowsers.Move(BROWSER_COUNT - 1, 0);
-                       end;
-
-                       BrowserTab.Tabs.EndUpdate;
-                       if( FActiveContent = nil) then
-                               BrowserTab.OnChange(nil);
-                       Exit;
+            DeleteTab(i, BrowserTab.TabIndex);
+                       Break;
                end;
        end;
 end;
+procedure TGikoForm.DeleteTab(index, selectIndex: Integer);
+var
+    doc: Variant;
+    j: Integer;
+begin
+    try
+        if TBrowserRecord(BrowserTab.Tabs.Objects[index]).Browser <> nil then begin
+            doc := TBrowserRecord(BrowserTab.Tabs.Objects[index]).Browser.Document;
+            TBrowserRecord(BrowserTab.Tabs.Objects[index]).Thread.ScrollTop := doc.Body.ScrollTop;
+        end;
+    except
+        TBrowserRecord(BrowserTab.Tabs.Objects[index]).Thread.ScrollTop := 0;
+    end;
+    if(FActiveContent = TBrowserRecord(BrowserTab.Tabs.Objects[index])) then
+        FActiveContent := nil;
+    if TBrowserRecord(BrowserTab.Tabs.Objects[index]).Browser <> nil then begin
+        j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[index]).Browser);
+        if j <> -1 then
+            FBrowsers.Move(j, BROWSER_COUNT - 1);
+    end;
+    BrowserTab.Tabs.BeginUpdate;
+    try
+        TBrowserRecord(BrowserTab.Tabs.Objects[index]).Free;
+        if ( BrowserTab.Tabs.Count - 1 = index ) and
+            ( BrowserTab.TabRect(index).Left
+                <= BrowserTab.DisplayRect.Left ) then begin
+            BrowserTab.ScrollTabs(-1);
+        end;
+        BrowserTab.Tabs.Delete(index);
+        if selectIndex > index then begin
+            BrowserTab.TabIndex := selectIndex - 1;
+        end else begin
+            if BrowserTab.Tabs.Count -1 >= selectIndex then
+                BrowserTab.TabIndex := selectIndex
+            else
+                BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
+        end;
+    finally
+        BrowserTab.Tabs.EndUpdate;
+    end;
+    if BrowserTab.Tabs.Count = 0 then begin
+        BrowserNullTab.Thread := nil;
+    end;
+    if(BrowserTab.TabIndex <> -1) and
+        ( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin
+        for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
+            if(TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser
+                 = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) )then
+            begin
+                ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[j]));
+                break;
+            end;
+        end;
+        TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser
+             :=  TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
+        TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Repaint := true;
+        FBrowsers.Move(BROWSER_COUNT - 1, 0);
+    end;
+
+    if( FActiveContent = nil) then
+        BrowserTab.OnChange(nil);
+end;
 function TGikoForm.Hook(var Message: TMessage): Boolean;
 begin
        //\83T\83u\83t\83H\81[\83\80\82ª\83\81\83C\83\93\83\81\83j\83\85\81[\82ð\8e\9d\82½\82È\82¢\82Æ\82«\82É\81A\83\81\83C\83\93\83t\83H\81[\83\80\82Ì
@@ -3883,30 +3775,32 @@ begin
 end;
 
 procedure TGikoForm.ListPopupMenuPopup(Sender: TObject);
-begin
-       ItemRoundPMenu.Visible := (GetActiveList is TBoard);
-       ItemReservPMenu.Visible := (GetActiveList is TBoard);
-       LPMSep01.Visible := (GetActiveList is TBoard);
-       ListRoundPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
-       ListReservPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
-       LPMSep02.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
-       KidokuPMenu.Visible := (GetActiveList is TBoard);
-       MidokuPMenu.Visible := (GetActiveList is TBoard);
-       UrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
-       NameUrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
-       AllSelectPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
-       LPMSep05.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
-       DeletePMenu.Visible := (GetActiveList is TBoard);
-       LPMSep06.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
-       BoardFavoriteAddMenu.Visible := (GetActiveList is TCategory);
-       ThreadFavoriteAddMenu.Visible := (GetActiveList is TBoard);
+var
+    bBoard, bCategory : Boolean;
+begin
+    bBoard := (GetActiveList is TBoard);
+    bCategory := (GetActiveList is TCategory);
+       ItemRoundPMenu.Visible := bBoard;
+       ItemReservPMenu.Visible := bBoard;
+       LPMSep01.Visible := bBoard;
+       ListRoundPMenu.Visible := bCategory;// or (GetActiveList is TBoard);
+       ListReservPMenu.Visible := bCategory;// or (GetActiveList is TBoard);
+       LPMSep02.Visible := bCategory or bBoard;
+       KidokuPMenu.Visible := bBoard;
+       MidokuPMenu.Visible := bBoard;
+       UrlCopyPMenu.Visible := bCategory or bBoard;
+       NameUrlCopyPMenu.Visible := bCategory or bBoard;
+       AllSelectPMenu.Visible := bCategory or bBoard;
+       LPMSep05.Visible := bCategory or bBoard;
+       DeletePMenu.Visible := bBoard;
+       LPMSep06.Visible := bCategory or bBoard;
+       BoardFavoriteAddMenu.Visible := bCategory;
+       ThreadFavoriteAddMenu.Visible := bBoard;
 
        AddRoundNameMenu(ItemReservPMenu);
        AddRoundNameMenu(ListReservPMenu);
 end;
 
-
-//ActiveList\82ªTBoard\82©TCategory\82Å\83X\83\8c\88ê\97\97\82Å\82P\82Â\88È\8fã\91I\91ð\82µ\82Ä\82¢\82é\82Æ\97L\8cø\82É\82È\82éActionde\8b¤\92Ê
 procedure TGikoForm.TreePopupMenuPopup(Sender: TObject);
 begin
        FClickNode := TreeView.Selected;
@@ -4002,19 +3896,20 @@ var
        idx: Integer;
        wkIntSt: Integer;
        wkIntTo: Integer;
-       document: IHTMLDocument2;
     BNum, BRes: string;
     threadItem: TThreadItem;
+    aElement : IHTMLElement;
 begin
-
        Cancel := True;
-       if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
-               Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
-               Html := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
+    aElement := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement;
+       if ( aElement <> nil) then begin
+               Text := aElement.Get_outerText;
+               Html := aElement.Get_outerHTML;
                if(AnsiPos('>>', Text) = 1) or (AnsiPos('>', Text) = 1)
                        or (AnsiPos('\81\84\81\84', Text) = 1) or (AnsiPos('\81\84', Text) = 1) then begin
                        if GikoSys.Setting.ResAnchorJamp then begin
-                               Text := ZenToHan(Text);
+
+                               Text := ZenToHan(Trim(Text));
 
                                if(AnsiPos('>>', Text) = 1) then begin
                                        //Text := Copy(Text, 3, Length(Text) - 2);
@@ -4023,18 +3918,20 @@ begin
                                        //Text := Copy(Text, 2, Length(Text) - 1);
                                        Delete(Text, 1, 1);
                                end;
+
                                if AnsiPos('-', Text) <> 0 then begin
                                        wkIntSt := StrToIntDef(Copy(Text, 1, AnsiPos('-', Text) - 1), 0);
                                        Text := Copy(Text, AnsiPos('-', Text) + 1, Length(Text));
                                        wkIntTo := StrToIntDef(Text, 0);
                                        if wkIntTo < wkIntSt then
                                                wkIntSt := wkIntTo;
-                               end else
+                               end else begin
                                        wkIntSt := StrToIntDef(Text, 0);
+                               end;
 
                                if wkIntSt <> 0 then begin
-                                       document := FActiveContent.Browser.Document as IHTMLDocument2;
-                    IDAnchorPopup('');
+                                       FActiveContent.IDAnchorPopup('');
+                    MoveHisotryManager.pushItem(FActiveContent);
                                        BrowserMovement(IntToStr(wkIntSt));
                                end;
 
@@ -4068,6 +3965,7 @@ begin
                                                AddressComboBox.Items.Insert(0, URL);
                                        end;
                                end;
+                MoveHisotryManager.pushItem(FActiveContent);
                                MoveToURL( URL );
                        end;
                end;
@@ -4089,31 +3987,31 @@ begin
        if GikoSys.Setting.ListOrientation = gloHorizontal then begin
                if ViewPanel.Width < 2 then begin
                        ViewPanel.Width := 1;
-                       GikoDM.BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
-                       GikoDM.BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
+                       GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_NORMAL;
+                       GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MIN;
                        GikoSys.Setting.ListWidthState := glsMax;
                end else if ViewPanel.Width > (ThreadMainPanel.Width - 80) then begin
-                       GikoDM.BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
-                       GikoDM.BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
+                       GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MAX;
+                       GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_NORMAL;
                        GikoSys.Setting.ListWidthState := glsMin;
                end else begin
-                       GikoDM.BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
-                       GikoDM.BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
+                       GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MAX;
+                       GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MIN;
                        GikoSys.Setting.ListWidthState := glsNormal;
                end;
        end else begin
                if ViewPanel.Height < 2 then begin
                        ViewPanel.Height := 1;
-                       GikoDM.BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
-                       GikoDM.BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
+                       GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_NORMAL;
+                       GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MIN;
                        GikoSys.Setting.ListHeightState := glsMax;
                end else if ViewPanel.Height > (ThreadMainPanel.Height - BrowserCoolBar.Height - 7) then begin
-                       GikoDM.BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
-                       GikoDM.BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
+                       GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MAX;
+                       GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_NORMAL;
                        GikoSys.Setting.ListHeightState := glsMin;
                end else begin
-                       GikoDM.BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
-                       GikoDM.BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
+                       GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MAX;
+                       GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MIN;
                        GikoSys.Setting.ListHeightState := glsNormal;
                end;
        end;
@@ -4128,57 +4026,53 @@ var
        i, j: Integer;
        idx: Integer;
 begin
+       BrowserTab.Tabs.BeginUpdate;
+       try
+               if not BrowserTab.Dragging then begin
+                       FTabHintIndex := -1;
+                       BrowserTab.Hint := '';
+                       idx := BrowserTab.TabIndex;
+                       if idx = -1 then begin
+                               SetContent(BrowserNullTab);
+
+                       end else if(BrowserTab.Tabs.Objects[idx] <> nil) and (BrowserTab.Tabs.Objects[idx] is TBrowserRecord) then begin
+                               if TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser <> nil then begin
+                                       j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser);
+                                       if j <> -1 then
+                                               FBrowsers.Move(j ,0);
+                               end else begin
+                                       if( FActiveContent <> nil ) and (FActiveContent.Browser <> nil) and
+                                               (FActiveContent.Browser <> BrowserNullTab.Browser) and
+                                               (FActiveContent.Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1])) then
+                                               FBrowsers.Move(BROWSER_COUNT - 1, 0);
 
-//     if NewTab = -1 then
-//     ThreadItem := nil;
-       if not BrowserTab.Dragging then begin
-               FTabHintIndex := -1;
-               BrowserTab.Hint := '';
-               idx := BrowserTab.TabIndex;
-               if idx = -1 then begin
-                       BrowserNullTab.Thread := nil;
-                       SetContent(BrowserNullTab);
-
-               end else if(BrowserTab.Tabs.Objects[idx] <> nil) and (BrowserTab.Tabs.Objects[idx] is TBrowserRecord) then begin
-                       if TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser <> nil then begin
-                               j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser);
-                               if j <> -1 then
-                                       FBrowsers.Move(j ,0);
-                       end else begin
-                               if( FActiveContent <> nil ) and (FActiveContent.Browser <> nil) and
-                                       (FActiveContent.Browser <> BrowserNullTab.Browser) and
-                                       (FActiveContent.Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1])) then
-                                       FBrowsers.Move(BROWSER_COUNT - 1, 0);
-
-                               for i := 0 to BrowserTab.Tabs.Count - 1 do begin
-                                       if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
-                                               ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[i]));
-                                               break;
+                                       for i := 0 to BrowserTab.Tabs.Count - 1 do begin
+                                               if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
+                                                       ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[i]));
+                                                       break;
+                                               end;
                                        end;
+                                       TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
+                                       TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Repaint := true;
+                                       FBrowsers.Move(BROWSER_COUNT - 1, 0);
                                end;
-                               TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
-                               TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Repaint := true;
-                               FBrowsers.Move(BROWSER_COUNT - 1, 0);
-                       end;
-                       MoveWindow(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser.Handle, 0, 0, BrowserPanel.Width, BrowserPanel.Height, false);
-                       TOleControl(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser).BringToFront;
-//                     GikoSys.OnlyAHundredRes := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).OnlyHundred;
-//                     OnlyAHundredRes.Checked := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).OnlyHundred;
-                       SetContent(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
-
-                       if (GikoSys.Setting.URLDisplay) and (GetActiveContent <> nil) then
-                               AddressComboBox.Text := GetActiveContent.URL;
+                               MoveWindow(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser.Handle, 0, 0, BrowserPanel.Width, BrowserPanel.Height, false);
+                               TOleControl(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser).BringToFront;
+                               SetContent(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
 
-                       if ((TreeView.Visible) and (TreeView.Focused)) or ((FavoriteTreeView.Visible) and (FavoriteTreeView.Focused)) or
-                               (ListView.Focused) or (SelectComboBox.Focused) or (AddressComboBox.Focused)
-                       then
-                       else
-                               GikoDM.SetFocusForBrowserAction.Execute;
+                               if (GikoSys.Setting.URLDisplay) and (GetActiveContent <> nil) then
+                                       AddressComboBox.Text := GetActiveContent.URL;
 
+                               if ((TreeView.Visible) and (TreeView.Focused)) or ((FavoriteTreeView.Visible) and (FavoriteTreeView.Focused)) or
+                                       (ListView.Focused) or (SelectComboBox.Focused) or (AddressComboBox.Focused)
+                               then
+                               else
+                                       GikoDM.SetFocusForBrowserAction.Execute;
+                       end;
                end;
-
+       finally
+               BrowserTab.Tabs.EndUpdate;
        end;
-
 end;
 
 
@@ -4207,54 +4101,51 @@ end;
 
 procedure TGikoForm.SetBrowserTabState;
 var
-//     i: Integer;
        CoolBand: TCoolBand;
 begin
        BrowserBottomPanel.AutoSize := False;
        if GikoSys.Setting.BrowserTabVisible then begin
-               if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
-                       BrowserTab.Style := tsTabs;
-                       if GikoSys.Setting.BrowserTabPosition = gtpTop then
-                               BrowserTab.TabPosition := tpTop
-                       else
-                               BrowserTab.TabPosition := tpBottom;
-               end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
-                       BrowserTab.TabPosition := tpTop;
-                       BrowserTab.Style := tsButtons;
-               end else begin
-                       BrowserTab.TabPosition := tpTop;
-                       BrowserTab.Style := tsFlatButtons
-               end;
-
-               if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
-                       BrowserTab.Parent := BrowserTabToolBar;
-                       BrowserBottomPanel.Hide;
-                       CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
-                       if CoolBand <> nil then
-                               CoolBand.Visible := True;
-//                     BrowserTab.Parent := BrowserTopPanel;
-//                     BrowserTab.Parent := BrowserCoolBar;
-//                     BrowserTab.Top := 26;
-//                     BrowserTopPanel.Height := 44;
+               BrowserTab.Hide;
+               BrowserTab.Tabs.BeginUpdate;
+               try
+                       if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
+                               BrowserTab.Style := tsTabs;
+                               if GikoSys.Setting.BrowserTabPosition = gtpTop then
+                                       BrowserTab.TabPosition := tpTop
+                               else
+                                       BrowserTab.TabPosition := tpBottom;
+                       end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
+                               BrowserTab.TabPosition := tpTop;
+                               BrowserTab.Style := tsButtons;
+                       end else begin
+                               BrowserTab.TabPosition := tpTop;
+                               BrowserTab.Style := tsFlatButtons
+                       end;
 
-               end else begin
-                       BrowserTab.Parent := BrowserBottomPanel;
-                       BrowserTab.Top := 0;
-                       BrowserTab.Left := 0;
-                       BrowserBottomPanel.Show;
-                       CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
-                       if CoolBand <> nil then
-                               CoolBand.Visible := False;
-//                     BrowserTopPanel.Height := 26;
-               end;
-               BrowserTab.Show;
+                       if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
+                               BrowserTab.Parent := BrowserTabToolBar;
+                               BrowserBottomPanel.Hide;
+                               CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
+                               if CoolBand <> nil then
+                                       CoolBand.Visible := True;
+                       end else begin
+                               BrowserTab.Parent := BrowserBottomPanel;
+                               BrowserTab.Top := 0;
+                               BrowserTab.Left := 0;
+                               BrowserBottomPanel.Show;
+                               CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
+                               if CoolBand <> nil then
+                                       CoolBand.Visible := False;
+                       end;
+               finally
+                       BrowserTab.Tabs.EndUpdate;
+                       BrowserTab.Show;
+               end;
        end else begin
                CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
                if CoolBand <> nil then
                        CoolBand.Visible := False;
                BrowserBottomPanel.Visible := False;
-//             BrowserTab.Visible := False;
-//             BrowserTopPanel.Height := 26;
                GikoDM.AllTabCloseAction.Execute;
        end;
 end;
@@ -4324,7 +4215,6 @@ var
        doc                                     : Variant;
        threadItem      : TThreadItem;
 begin
-//     AddMessageList('DocumentComplete', nil, gmiWhat);
        if TObject(Sender) is TWebBrowser then begin
                BrowserRecord := nil;
                if TWebBrowser(Sender) <> Browser then begin
@@ -4335,12 +4225,12 @@ begin
                                end;
                        end;
                        if BrowserRecord <> nil then begin
-                               if BrowserRecord.FEvent <> nil then
-                                       BrowserRecord.FEvent.Free;
+                               if BrowserRecord.Event <> nil then
+                                       BrowserRecord.Event.Free;
                                FDispHtmlDocument := Idispatch(OleVariant(BrowserRecord.Browser.ControlInterface).Document) as DispHTMLDocument;
-                               BrowserRecord.FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
-                               BrowserRecord.FEvent.OnContextMenu := OnDocumentContextMenu;
-                               BrowserRecord.FEvent.OnClick := WebBrowserClick;  //\92Ç\89Á\82µ\82½OnClick\83C\83x\83\93\83g
+                               BrowserRecord.Event := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
+                               BrowserRecord.Event.OnContextMenu := OnDocumentContextMenu;
+                               BrowserRecord.Event.OnClick := WebBrowserClick;  //\92Ç\89Á\82µ\82½OnClick\83C\83x\83\93\83g
                        end;
                end else begin
                        if GetActiveContent <> nil then begin
@@ -4350,31 +4240,39 @@ begin
                                FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
                                FEvent.OnContextMenu := OnDocumentContextMenu;
                                FEvent.OnClick := WebBrowserClick;  //\92Ç\89Á\82µ\82½OnClick\83C\83x\83\93\83g
+                       end else begin
+                               if FEvent <> nil then begin
+                                       FEvent.Free;
+                                       FEvent := nil;
+                               end;
                        end;
-                       
+
                end;
 
                if (BrowserRecord <> nil) and
                         Assigned( BrowserRecord.Thread ) then begin
                        threadItem := BrowserRecord.Thread;
 
-                       if (BrowserRecord <> nil) and (Length( BrowserRecord.Movement ) > 0) then begin
+                       if (threadItem.JumpAddress > 0) then begin
                                if threadItem.UnRead then begin
                                        threadItem.UnRead := False;
-                                       threadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
-                                       if threadItem.ParentBoard.UnRead < 0 then threadItem.ParentBoard.UnRead := 0;
                                        TreeView.Refresh;
-                                       ListView.Refresh;
+                                       RefreshListView(threadItem);
                                end;
-                               BrowserMovement( BrowserRecord.Movement, BrowserRecord );
-                               BrowserRecord.Movement := '';
+                               // \83X\83N\83\8d\81[\83\8b\90æ\82ª\8eæ\93¾\8aO\82Ì\83\8c\83X\82Ì\8e\9e\82Í\8fI\92[\82É\88Ú\93®
+                               //if (StrToIntDef(BrowserRecord.Movement, 0) <= BrowserRecord.Thread.Count) then begin
+                               if (threadItem.JumpAddress <= BrowserRecord.Thread.Count) then begin
+                                       BrowserRecord.Move(IntToStr(threadItem.JumpAddress));
+                                       threadItem.JumpAddress := 0;
+                               end else begin
+                                       BrowserRecord.Move(IntToStr(BrowserRecord.Thread.Count));
+                               end;
+
                        end else if threadItem.UnRead then begin
                                threadItem.UnRead := False;
-                               threadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
-                               if threadItem.ParentBoard.UnRead < 0 then threadItem.ParentBoard.UnRead := 0;
                                TreeView.Refresh;
-                               BrowserMovement( 'new', BrowserRecord );
-                               ListView.Refresh;
+                               BrowserRecord.Move('new');
+                               RefreshListView(threadItem);
                        end else if threadItem.ScrollTop <> 0 then begin
                                try
                                        doc := Idispatch( OleVariant( BrowserRecord.Browser.ControlInterface ).Document ) as IHTMLDocument2;
@@ -4386,6 +4284,7 @@ begin
                        end;
                end;
        end;
+       LockWindowUpdate(0);
 end;
 
 procedure TGikoForm.RoundNamePopupMenuPopup(Sender: TObject);
@@ -4421,7 +4320,6 @@ end;
 procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string);
 var
        threadItem : TThreadItem;
-       i: Integer;
 begin
        if ParentName <> 'dummy1' then begin
                SetSelectItemRound(RoundFlag, RoundName);
@@ -4522,50 +4420,58 @@ procedure TGikoForm.FavoriteMenuClick(Sender: TObject);
 var
        NewMenu: TMenuItem;
 begin
-       FavoriteMenu.Clear;
+       if FavoriteDM.Modified then begin
+               FavoriteMenu.Clear;
 
-       //\82¨\8bC\82É\93ü\82è\82Ì\92Ç\89Á
-       NewMenu := TMenuItem.Create(MainMenu);
-       NewMenu.Action := GikoDM.FavoriteAddAction;
-       FavoriteMenu.Add(NewMenu);
-       //\82¨\8bC\82É\93ü\82è\82Ì\90®\97\9d
-       NewMenu := TMenuItem.Create(FavoriteMenu);
-       NewMenu.Action := GikoDM.FavoriteArrangeAction;
-       FavoriteMenu.Add(NewMenu);
-       //\83Z\83p\83\8c\81[\83^
-       NewMenu := TMenuItem.Create(FavoriteMenu);
-       NewMenu.Caption := '-';
-       FavoriteMenu.Add(NewMenu);
-
-       CreateFavMenu(FavoriteDM.TreeView.Items.GetFirstNode, FavoriteMenu);
+               //\82¨\8bC\82É\93ü\82è\82Ì\92Ç\89Á
+               NewMenu := TMenuItem.Create(MainMenu);
+               NewMenu.Action := GikoDM.FavoriteAddAction;
+               FavoriteMenu.Add(NewMenu);
+               //\82¨\8bC\82É\93ü\82è\82Ì\90®\97\9d
+               NewMenu := TMenuItem.Create(FavoriteMenu);
+               NewMenu.Action := GikoDM.FavoriteArrangeAction;
+               FavoriteMenu.Add(NewMenu);
+               //\83Z\83p\83\8c\81[\83^
+               FavoriteMenu.InsertNewLineAfter(NewMenu);
+               CreateFavMenu(FavoriteDM.TreeView.Items.GetFirstNode, FavoriteMenu);
+               FavoriteDM.Modified := false;
+       end;
 end;
 
 procedure TGikoForm.CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
 var
        i: Integer;
-       NewMenu: TMenuItem;
+       NewMenu: array of TMenuItem;
 begin
-       for i := 0 to Node.Count - 1 do begin
-               NewMenu := TFavoriteMenuItem.Create(Self);
-               NewMenu.AutoHotkeys := maAutomatic;
-               NewMenu.Caption := CustomStringReplace(Node.Item[i].Text, '&', '&&');
-               TFavoriteMenuItem(NewMenu).Data := Node.Item[i].Data;
-               MenuItem.Add(NewMenu);
+       SetLength(NewMenu, Node.Count);
+       Node := Node.getFirstChild;
+       i := 0;
+       while ( Node <> nil ) do begin
+               NewMenu[i] := TFavoriteMenuItem.Create(nil);
+               NewMenu[i].AutoHotkeys := maAutomatic;
+               NewMenu[i].Caption := CustomStringReplace(Node.Text, '&', '&&');
+               TFavoriteMenuItem(NewMenu[i]).Data := Node.Data;
 
-               if TObject(Node.Item[i].Data) is TFavoriteFolder then begin
-                       NewMenu.ImageIndex := TOOL_ICON_FAV_FOLDER;
-                       CreateFavMenu(Node.Item[i], NewMenu);
-               end else if TObject(Node.Item[i].Data) is TFavoriteBoardItem then begin
-                       NewMenu.ImageIndex := TOOL_ICON_FAV_BOARD;
-                       NewMenu.OnClick := FavoriteClick;
-               end else if TObject(Node.Item[i].Data) is TFavoriteThreadItem then begin
-                       NewMenu.ImageIndex := TOOL_ICON_FAV_THREAD;
-                       NewMenu.OnClick := FavoriteClick;
+               if TObject(Node.Data) is TFavoriteFolder then begin
+                       NewMenu[i].ImageIndex := GikoDataModule.TOOL_ICON_FAV_FOLDER;
+                       CreateFavMenu(Node, NewMenu[i]);
+               end else if TObject(Node.Data) is TFavoriteBoardItem then begin
+                       NewMenu[i].ImageIndex := GikoDataModule.TOOL_ICON_FAV_BOARD;
+                       NewMenu[i].OnClick := FavoriteClick;
+               end else if TObject(Node.Data) is TFavoriteThreadItem then begin
+                       NewMenu[i].ImageIndex := GikoDataModule.TOOL_ICON_FAV_THREAD;
+                       NewMenu[i].OnClick := FavoriteClick;
                end;
+        Inc(i);
+               Node := Node.getNextSibling;
        end;
+       MenuItem.Add(NewMenu);
 end;
 
 procedure TGikoForm.ShowFavoriteAddDialog( Item : TObject );
+const
+       MsgAdd : String = '\8aù\82É\82¨\8bC\82É\93ü\82è\82É\93o\98^\82³\82ê\82Ä\82¢\82Ü\82·\81B\82»\82ê\82Å\82à\92Ç\89Á\82µ\82Ü\82·\82©\81H';
+       TitleAdd: String =  '\82¨\8bC\82É\93ü\82è\82Ì\92Ç\89Á';
 var
        Dlg                     : TFavoriteAddDialog;
        ItemURL : string;
@@ -4585,7 +4491,7 @@ begin
                        Data := Node.Data;
                        if TObject( Data ) is TFavoriteBoardItem then begin
                                if ItemURL = TFavoriteBoardItem( Data ).URL then begin
-                                       if Application.MessageBox( '\8aù\82É\82¨\8bC\82É\93ü\82è\82É\93o\98^\82³\82ê\82Ä\82¢\82Ü\82·\81B\82»\82ê\82Å\82à\92Ç\89Á\82µ\82Ü\82·\82©\81H', '\82¨\8bC\82É\93ü\82è\82Ì\92Ç\89Á', MB_YESNO ) = IDNO then
+                                       if Application.MessageBox(PChar(MsgAdd) , PChar(TitleAdd), MB_YESNO ) = IDNO then
                                                Exit;
                                        Break;
                                end;
@@ -4605,7 +4511,7 @@ begin
                        Data := Node.Data;
                        if TObject( Data ) is TFavoriteThreadItem then begin
                                if ItemURL = TFavoriteThreadItem( Data ).URL then begin
-                                       if Application.MessageBox( '\8aù\82É\82¨\8bC\82É\93ü\82è\82É\93o\98^\82³\82ê\82Ä\82¢\82Ü\82·\81B\82»\82ê\82Å\82à\92Ç\89Á\82µ\82Ü\82·\82©\81H', '\82¨\8bC\82É\93ü\82è\82Ì\92Ç\89Á', MB_YESNO ) = IDNO then
+                                       if Application.MessageBox( PChar(MsgAdd), PChar(TitleAdd), MB_YESNO ) = IDNO then
                                                Exit;
                                        Break;
                                end;
@@ -4626,9 +4532,7 @@ end;
 
 procedure TGikoForm.FavoriteClick(Sender: TObject);
 begin
-
        FavoriteClick( Sender, True );
-
 end;
 
 procedure TGikoForm.FavoriteClick(Sender: TObject; ActiveTab: Boolean);
@@ -4692,6 +4596,47 @@ begin
        TopPanel.Height := Max(MainCoolBar.Height, AnimePanel.Height);
 
 end;
+//! \8ew\92è\82³\82ê\82½\83X\83\8c\83b\83h\82ð\8aJ\82­(\83\8d\83O\82ª\96³\82¢\82Æ\82« or \8ew\92èJUMP\82Ü\82Å\91«\82è\82È\82¢\82Æ\82«\82ÍDL\82·\82é)
+procedure TGikoForm.OpenThreadItem(Thread: TThreadItem; URL: String);
+var
+       stRes, edRes : Int64;
+       browserRec : TBrowserRecord;
+       threadNumber : String;
+       doc : Variant;
+begin
+       stRes := 0;
+       edRes := 0;
+       Thread.JumpAddress := 0;
+       // \83^\83u\82ð\90\90¬
+       browserRec := InsertBrowserTab(Thread);
+       if (browserRec <> nil) then begin
+               // JUMP\82·\82×\82«\83\8c\83X\94Ô\8d\86\82ª\82 \82é\82©\83`\83F\83b\83N\82·\82é
+               threadNumber := ChangeFileExt(Thread.FileName, '');
+               GikoSys.GetPopupResNumber( URL, stRes, edRes );
+               // \83X\83\8c\82Ì\94Ô\8d\86\82ð\83\8c\83X\94Ô\82Æ\8cë\82Á\82Ä\94F\8e¯\82µ\82Ä\82¢\82é\82Ì\82ð\83N\83\8a\83A
+               if (StrToInt64(threadNumber) = stRes) then begin
+                       if not (AnsiEndsText(threadNumber + '/' + threadNumber, URL))
+                               and (Pos('&st=' + threadNumber , URL) = 0) then begin
+                               stRes := 0;
+                       end;
+               end;
+               if ( stRes > 0 ) then begin
+                       Thread.JumpAddress := stRes;
+               end;
+               // \83\8d\83O\82ð\8e\9d\82Á\82Ä\82¢\82È\82¢\82© JUMP\82·\82×\82«\83\8c\83X\94Ô\8d\86\82Ü\82Å\8eæ\93¾\82µ\82Ä\82¢\82È\82¢\82Æ\82«\82ÍDL\82·\82é
+               if (not Thread.IsLogFile) or (stRes > Thread.Count) then begin
+                       DownloadContent(Thread);
+               end else if (not browserRec.Repaint) and (stRes > 0) then begin
+                       browserRec.Move(IntToStr(stRes));
+                       Thread.JumpAddress := 0;
+                       try
+                               doc := Idispatch( OleVariant( browserRec.Browser.ControlInterface ).Document ) as IHTMLDocument2;
+                               Thread.ScrollTop := doc.Body.ScrollTop;
+                       except
+                       end;
+               end;
+       end;
+end;
 
 procedure TGikoForm.MoveToURL(const inURL: string);
 var
@@ -4704,13 +4649,8 @@ var
        i, bi                                   : Integer;
        boardURL                        : string;
        tmpThread                       : TThreadItem;
-//     category                        : TCategory;
-//     categoryNode    : TTreeNode;
-//     boardNode                       : TTreeNode;
        shiftDown                       : Boolean;
        ctrlDown                        : Boolean;
-       stRes, edRes    : Int64;
-       browserRec              : TBrowserRecord;
 begin
 
        GikoSys.ParseURI( inURL, protocol, host, path, document, port, bookmark );
@@ -4730,11 +4670,8 @@ begin
        //===== \83v\83\89\83O\83C\83\93
        try
                //\8dì\8bÆ\92\86//
-               //bi := High( BoardPlugIns );
                bi := Length(BoardGroups) - 1;
-               //for i := Low( BoardPlugIns ) to bi do begin
                for i := 1 to bi do begin
-                       //if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin
                        if (BoardGroups[i].BoardPlugIn <> nil) and (Assigned(Pointer(BoardGroups[i].BoardPlugIn.Module))) then begin
                                case BoardGroups[i].BoardPlugIn.AcceptURL( inURL ) of
                                atThread:
@@ -4769,26 +4706,11 @@ begin
                                                                        if TBoard(ActiveList) = Board then
                                                                                ListView.Items.Count := ListView.Items.Count + 1;
                                                                end;
-                                                               GikoSys.GetPopupResNumber( inURL, stRes, edRes );
-                                                               browserRec := InsertBrowserTab( ThreadItem );
-                                                               if (browserRec <> nil) and (stRes > 0) then
-                                                                       browserRec.Movement := IntToStr( stRes );
-                                                               DownloadContent( ThreadItem );
-                                                               Exit;
                                                        end else begin
                                                                tmpThread.Free;
-                                                               GikoSys.GetPopupResNumber( inURL, stRes, edRes );
-                                                               browserRec := InsertBrowserTab( ThreadItem );
-                                                               if ThreadItem.IsLogFile then begin
-                                                                       if (browserRec <> nil) and (stRes > 0) then
-                                                                               BrowserMovement( IntToStr( stRes ), browserRec );
-                                                               end else begin
-                                                                       if (browserRec <> nil) and (stRes > 0) then
-                                                                               browserRec.Movement := IntToStr( stRes );
-                                                                       DownloadContent( ThreadItem );
-                                                               end;
-                                                               Exit;
                                                        end;
+                                                       OpenThreadItem(ThreadItem, inURL);
+                                                       Exit;
                                                end;
                                        end;
 
@@ -4815,15 +4737,6 @@ begin
        if (Length( Trim(BBSKey) ) > 0) and (Length( Trim(BBSID) ) > 0) then begin
                boardURL := GikoSys.Get2chThreadURL2BoardURL( inURL );
                Board := BBSsFindBoardFromURL( boardURL );
-               //if Board = nil then
-               //      Board := BBSsFindBoardFromBBSID( BBSID );
-               { \82±\82Ì\95\94\95ª\82àBBS\82\93FindBoardFromURL\82É\8e\9d\82½\82¹\82½\81@20050523
-               if Board = nil then begin
-                       // \81¦\8dì\82Á\82Ä\82à\92Ç\89Á\82·\82é\82Æ\82±\82ë\82ª\96³\82¢\82Ì\82Å\8c\83\82µ\82­\95Û\97¯
-                       //\81@\89ß\8b\8e\83\8d\83O\91q\8cÉ\82©\82ç\81A\83_\83E\83\\82µ\82½\83X\83\8c\82ª\94­\8c©\82Å\82«\82È\82¢\82Ì\82Å\82±\82±\82Å\92T\82·\82æ\82¤\82É\82·\82é (2004/01/22)
-                       Board := BBSs[ 0 ].FindBBSID( BBSID );
-               end;
-               }
                if Board = nil then begin
                         // \93ü\82é\82×\82«\94Â\82ª\8c©\82Â\82©\82ç\82È\82©\82Á\82½\82Ì\82Å\81A\95\81\92Ê\82Ì\83u\83\89\83E\83U\82Å\8aJ\82­
                         GikoSys.OpenBrowser(inURL, gbtUserApp);
@@ -4848,51 +4761,26 @@ begin
                if ThreadItem = nil then begin
                        ThreadItem := Board.FindThreadFromFileName( BBSKey + '.dat' );
                end;
-               if ThreadItem = nil then begin
-                       //shift -> \90Ý\92è\83u\83\89\83E\83U\81i\96³\82¯\82ê\82ÎIE\81j
-                       //ctrl  -> IE
-                       {shiftDown      := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
-                       ctrlDown        := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
-                       if shiftDown then
-                               GikoSys.OpenBrowser(URL1, gbtUserApp)
-                       else if ctrlDown then
-                               GikoSys.OpenBrowser(URL1, gbtIE)
-                       else begin
-                       }
-                       ThreadItem := TThreadItem.Create( nil, Board, URL );
-                       ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat');
-                       if AnsiPos(Host, Board.URL) = 0 then
-                               ThreadItem.DownloadHost := Host
-                       else
-                               ThreadItem.DownloadHost := '';
-                       Board.Insert(0, ThreadItem);
-                       if ActiveList is TBoard then begin
-                               if TBoard(ActiveList) = Board then
-                                       ListView.Items.Count := ListView.Items.Count + 1;
-                       end;
-                       GikoSys.GetPopupResNumber( inURL, stRes, edRes );
-                       browserRec := InsertBrowserTab(ThreadItem);
-                       if (browserRec <> nil) and (stRes > 0) then
-                               browserRec.Movement := IntToStr( stRes );
-                       DownloadContent(ThreadItem);
-                       {end;}
-               end else begin
-                       if ThreadItem.IsLogFile then begin
-                               GikoSys.GetPopupResNumber( inURL, stRes, edRes );
-                               browserRec := InsertBrowserTab(ThreadItem);
-                               if (browserRec <> nil) and (stRes > 0) then
-                                       browserRec.Movement := IntToStr( stRes );
-                       end else begin
+               try
+                       // \83X\83\8c\83b\83h\83A\83C\83e\83\80\82ª\82È\82¢\82È\82ç\90\90¬\82·\82é\81B
+                       if ThreadItem = nil then begin
+                               ThreadItem := TThreadItem.Create( nil, Board, URL );
+                               ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat');
+                               Board.Insert(0, ThreadItem);
+                               if ActiveList is TBoard then begin
+                                       if TBoard(ActiveList) = Board then
+                                               ListView.Items.Count := ListView.Items.Count + 1;
+                               end;
+                       end;
+                       // \83\8d\83O\82È\82µ\83X\83\8c\83b\83h\82Ì\82Æ\82«\82Í\81A\83z\83X\83g\96¼\82Ì\83`\83F\83b\83N\82ð\82·\82é
+                       if (not ThreadItem.IsLogFile) then begin
                                if AnsiPos(Host, Board.URL) = 0 then
                                        ThreadItem.DownloadHost := Host
                                else
                                        ThreadItem.DownloadHost := '';
-                               GikoSys.GetPopupResNumber( inURL, stRes, edRes );
-                               browserRec := InsertBrowserTab(ThreadItem);
-                               if (browserRec <> nil) and (stRes > 0) then
-                                       browserRec.Movement := IntToStr( stRes );
-                               DownloadContent(ThreadItem);
                        end;
+                       OpenThreadItem(ThreadItem, inURL);
+               except
                end;
        end else begin
                Board := BBSsFindBoardFromURL( inURL );
@@ -4902,7 +4790,7 @@ begin
                        if FActiveBBS <> Board.ParentCategory.ParenTBBS then
                                ShowBBSTree( Board.ParentCategory.ParenTBBS );
                        SelectTreeNode( Board, True );
-       end;
+               end;
        end;
 end;
 
@@ -4953,14 +4841,21 @@ begin
                        if not (ssAlt in KeyDataToShiftState(TWMChar(Message).KeyData)) then
                                Exit;
                WM_SYSCOMMAND:
-                       if Message.WParam = SC_MINIMIZE then
+                       if Message.WParam = SC_MINIMIZE then begin
                                OnMinimize;
+                PostMessage(Handle, USER_MINIMIZED, 0, 0);
+            end;
                USER_TREECLICK:
                        TreeClick( TreeView.Selected );
                USER_RESIZED:
                        OnResized;
                USER_MINIMIZED:
-                       OnMinimized;
+            begin
+                if (GikoSys.Setting.StoredTaskTray) then begin
+                    StoredTaskTray;
+                end;
+                OnMinimized;
+            end;
                USER_SETLINKBAR:
                        SetLinkBar;
                USER_DOCUMENTCOMPLETE:
@@ -5142,26 +5037,42 @@ begin
 
        SetWindowPos(FPreviewBrowser.Handle, HWND_TOPMOST, ARect.Left, ARect.Top, WindowWidth, WindowHeight, SWP_NOACTIVATE or SWP_HIDEWINDOW);
        ShowWindow(FPreviewBrowser.Handle, SW_SHOWNOACTIVATE);
-
+       FPreviewBrowserRect := ARect;
 //     Style := GetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE);
 //     SetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE, Style xor WS_EX_APPWINDOW);
 
 end;
 
 procedure TGikoForm.WMSetCursor(var Message: TWMSetCursor);
+var
+       Pos : TPoint;
 begin
+
        if PreviewTimer.Enabled then
                PreviewTimer.Enabled := False;
        if (FHint <> nil) and (IsWindowVisible(FHint.Handle)) then begin
                FHint.ReleaseHandle;
                FHint.ClearAllRes;
        end;
-       if (FPreviewBrowser <> nil) and (IsWindowVisible(FPreviewBrowser.Handle)) then
-               ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
+
+       if (FPreviewBrowser <> nil)
+               and (IsWindowVisible(FPreviewBrowser.Handle)) then begin
+        //\82±\82±\82Å\8fÁ\82³\82ê\82é\82Ì\82ª\96â\91è
+        //\82½\82Ô\82ñ\82±\82ê\82Å\95\\8e¦\94Í\88Í\94»\92è\82Å\82«\82Ä\82¢\82é\82Í\82¸
+               Pos := Mouse.CursorPos;
+               Pos.X := Pos.X + Left;
+               Pos.Y := Pos.Y + Top;
+               if (FPreviewBrowserRect.Left > Pos.X) or
+                       (FPreviewBrowserRect.Right < Pos.X) or
+                       (FPreviewBrowserRect.Top > Pos.Y) or
+                       (FPreviewBrowserRect.Bottom < Pos.Y) then begin
+                       ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
+               end;
+       end;
+
        Message.Result := 1;
        inherited;
 end;
-
 procedure TGikoForm.MessageHideButtonClick(Sender: TObject);
 begin
        GikoDM.MsgBarCloseAction.Execute;
@@ -5176,8 +5087,8 @@ var
        ThreadItem: TThreadItem;
 begin
        Result := False;
-    IDAnchorPopup('');
-       Doc := FactiveContent.FBrowser.Document as IHtmlDocument2;
+       FactiveContent.IDAnchorPopup('');
+       Doc := FactiveContent.Browser.Document as IHtmlDocument2;
        if Assigned(Doc) then begin
                Range := Doc.selection.createRange as IHTMLTxtRange;
                s := CustomStringReplace(Range.text, '\81@', ' ');//\91S\8ap\8bó\94\92\82ð\94¼\8ap\8bó\94\92\82É
@@ -5186,7 +5097,7 @@ begin
 
                        ThreadItem := GetActiveContent;
                        if ThreadItem <> nil then begin
-                               Num := StrToInt(s);
+                               Num := StrToInt64(s);
                                FHint.PopupType := gptThread;
                                HTMLCreater.SetResPopupText(FHint, ThreadItem, Num, Num, False, False);
                                if FHint.ResCount <> 0 then
@@ -5281,12 +5192,12 @@ begin
                                                CreateFavMenu(FavoriteTreeView.Items[i].Item[j], MenuItem);
                                                LinkBarPopupMenu.Items.Add(MenuItem);
                                                ToolButton.MenuItem := MenuItem;
-                                               ToolButton.ImageIndex := TOOL_ICON_FAV_FOLDER;
+                                               ToolButton.ImageIndex := GikoDataModule.TOOL_ICON_FAV_FOLDER;
                                        end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteBoardItem then begin
-                                               ToolButton.ImageIndex := TOOL_ICON_FAV_BOARD;
+                                               ToolButton.ImageIndex := GikoDataModule.TOOL_ICON_FAV_BOARD;
                                                ToolButton.OnClick := FavoriteClick;
                                        end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteThreadItem then begin
-                                               ToolButton.ImageIndex := TOOL_ICON_FAV_THREAD;
+                                               ToolButton.ImageIndex := GikoDataModule.TOOL_ICON_FAV_THREAD;
                                                ToolButton.OnClick := FavoriteClick;
                                        end;
                                        ToolButton.Caption := FavoriteTreeView.Items[i].Item[j].Text;
@@ -5834,16 +5745,13 @@ function TGikoForm.FindToolBarButton( bar : TToolBar; action : TAction ) : TTool
 var
        i : Integer;
 begin
-
+       Result := nil;
        for i := bar.ButtonCount - 1 downto 0 do begin
                if bar.Buttons[ i ].Action = action then begin
                        Result := bar.Buttons[ i ];
-                       Exit;
+                       Break;
                end;
        end;
-
-       Result := nil;
-
 end;
 
 procedure TGikoForm.SetToolBarPopup;
@@ -5914,28 +5822,17 @@ end;
 
 procedure TGikoForm.SetSelectWord( const text : string );
 begin
+       // \83X\83\8c\88ê\97\97\82Ì\94Í\88Í\8ew\92è\82ð\89ð\8f\9c
+       ClearThreadRengeAction;
 
        if Length( text ) = 0 then
        begin
                GikoDM.AllItemAction.Checked := True;
-               GikoDM.LogItemAction.Checked := False;
-               GikoDM.NewItemAction.Checked := False;
+               SetListViewType( gvtAll )
        end else begin
-               // \83`\83\89\82Â\82­\82Æ\8c\99\82¾\82©\82ç\81A\88ê\89\9e\89\9f\82µ\82Ä\82 \82é\82Æ\82«\82¾\82¯\8f\88\97\9d\82·\82é
-               if GikoDM.AllItemAction.Checked then
-                       GikoDM.AllItemAction.Checked := False;
-               if GikoDM.LogItemAction.Checked then
-                       GikoDM.LogItemAction.Checked := False;
-               if GikoDM.NewItemAction.Checked then
-                       GikoDM.NewItemaction.Checked := False;
+               SetListViewType( gvtUser, text, false );
        end;
-
-       if Length( text ) = 0 then
-               SetListViewType( gvtAll )
-       else
-               SetListViewType( gvtUser, text, false );
-
-end;
+end;
 
 procedure TGikoForm.SelectComboBoxChange(Sender: TObject);
 begin
@@ -5970,7 +5867,9 @@ begin
                        end else
                                Str := SelectComboBox.Text + Str;
 
-                       SetSelectWord(Str);
+                       if (Length(Str) > 0) then begin
+                               SetSelectWord(Str);
+                       end;
                end;
        end else if Length( SelectComboBox.Text ) = 0 then
        begin
@@ -5979,16 +5878,27 @@ begin
                 * \81i\82±\82±\82Å\82Í\89½\82à\82µ\82È\82¢\81j
                 *}
        end else begin
-               // \83`\83\89\82Â\82­\82Æ\8c\99\82¾\82©\82ç\81A\88ê\89\9e\89\9f\82µ\82Ä\82 \82é\82Æ\82«\82¾\82¯\8f\88\97\9d\82·\82é
-               if GikoDM.AllItemAction.Checked then
-                       GikoDM.AllItemAction.Checked := False;
-               if GikoDM.LogItemAction.Checked then
-                       GikoDM.LogItemAction.Checked := False;
-               if GikoDM.NewItemAction.Checked then
-                       GikoDM.NewItemaction.Checked := False;
+        // \83X\83\8c\88ê\97\97\82Ì\94Í\88Í\8ew\92è\82ð\89ð\8f\9c
+               ClearThreadRengeAction;
        end;
 
 end;
+//! \83X\83\8c\83b\83h\88ê\97\97\82Ì\95\\8e¦\94Í\88Í\90Ý\92è\83`\83F\83b\83N\83N\83\8a\83A
+procedure TGikoForm.ClearThreadRengeAction;
+begin
+       // \83`\83\89\82Â\82­\82Æ\8c\99\82¾\82©\82ç\81A\88ê\89\9e\89\9f\82µ\82Ä\82 \82é\82Æ\82«\82¾\82¯\8f\88\97\9d\82·\82é
+       if GikoDM.AllItemAction.Checked then
+               GikoDM.AllItemAction.Checked := False;
+       if GikoDM.LogItemAction.Checked then
+               GikoDM.LogItemAction.Checked := False;
+       if GikoDM.NewItemAction.Checked then
+               GikoDM.NewItemaction.Checked := False;
+       if GikoDM.LiveItemAction.Checked then
+               GikoDM.LiveItemAction.Checked := False;
+       if GikoDM.ArchiveItemAction.Checked then
+               GikoDM.ArchiveItemAction.Checked := False;
+
+end;
 
 procedure TGikoForm.SelectComboBoxExit(Sender: TObject);
 begin
@@ -5997,8 +5907,8 @@ begin
 
        if Length( SelectComboBox.Text ) = 0 then
        begin
-               SelectComboBox.Text := SELECTCOMBOBOX_NAME;
-               SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
+               SelectComboBox.Text := GikoDataModule.SELECTCOMBOBOX_NAME;
+               SelectComboBox.Color := GikoDataModule.SELECTCOMBOBOX_COLOR;
        end;
 
 end;
@@ -6033,7 +5943,6 @@ begin
 end;
 
 
-// \91S\82Ä\82Ì\83\8c\83X\82ð\95\\8e¦
 procedure TGikoForm.SelectComboBoxSplitterMouseMove(Sender: TObject;
        Shift: TShiftState; X, Y: Integer);
 var
@@ -6093,14 +6002,15 @@ end;
 procedure TGikoForm.StatusBarResize(Sender: TObject);
 begin
        StatusBar.Panels[1].Width := StatusBar.Width -
-                                                                                                                        StatusBar.Panels[0].Width -
-                                                                                                                        StatusBar.Panels[2].Width;
+                                       StatusBar.Panels[0].Width -
+                                       StatusBar.Panels[THREADSIZE_PANEL].Width -
+                                       StatusBar.Panels[NGWORDNAME_PANEL].Width;
 end;
 procedure TGikoForm.SelectComboBoxEnter(Sender: TObject);
 begin
 
        if (Length( SelectComboBox.Text ) = 0) or
-               (SelectComboBox.Text = SELECTCOMBOBOX_NAME) then
+               (SelectComboBox.Text = GikoDataModule.SELECTCOMBOBOX_NAME) then
        begin
                SelectComboBox.Text := '';
                SelectComboBox.Color := clWindow;
@@ -6108,7 +6018,6 @@ begin
 
 end;
 
-//\94Â\96¼\8c\9f\8dõ
 procedure TGikoForm.FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
 begin
 
@@ -6164,7 +6073,7 @@ begin
                Node.ImageIndex := 16;
                Node.SelectedIndex := 16;
        end else if Source is TBrowserRecord then begin
-               ThreadItem := TBrowserRecord( Source ).FThread;
+               ThreadItem := TBrowserRecord( Source ).Thread;
                FavoThreadItem                          := TFavoriteThreadItem.CreateWithItem( ThreadItem );
                Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
                Node.ImageIndex := 16;
@@ -6233,6 +6142,8 @@ begin
                        FDropSpaceNode := nil;
                end;
        end;
+       //\8dX\90V\82µ\82½\82±\82Æ\82ð\8b³\82¦\82é
+       FavoriteDM.Modified := true;
 
        SetLinkBar;
 
@@ -6241,6 +6152,8 @@ end;
 procedure TGikoForm.FavoriteTreeViewEdited(Sender: TObject;
        Node: TTreeNode; var S: String);
 begin
+       //\8dX\90V\82µ\82½\82±\82Æ\82ð\8b³\82¦\82é
+       FavoriteDM.Modified := true;
 
        FavoriteTreeView.ReadOnly := True;
        SetLinkBar;
@@ -6268,7 +6181,10 @@ begin
                        FavoriteTreeView.Selected.Expanded := not FavoriteTreeView.Selected.Expanded;
                        end;
                VK_SPACE:
-                       FavoriteTreeViewDblClick( Sender );
+                       begin
+                       FClickNode := FavoriteTreeView.Selected;
+                       GikoDM.FavoriteTreeViewReloadActionExecute( Sender );
+                       end;
                end;
        end else begin
                //\95Ò\8fW\92\86\82ÉESC\82ð\89\9f\82µ\82½\82ç\81A\95Ò\8fW\82ð\8fI\97¹\82µ\82Ä\81A\8c³\82Ì\95\8e\9a\97ñ\82É\96ß\82·
@@ -6320,26 +6236,29 @@ begin
                FavoriteTreeNameURLCopyPopupMenu.Visible := False;
                FavoriteTreeReloadPopupMenu.Visible := False;
                FavoriteTreeLogDeletePopupMenu.Visible := False;
+               FavoriteTreeItemNameCopyPopupMenu.Visible := False;
        end else if FClickNode.IsFirstNode then begin
                FavoriteTreeBrowseFolderPopupMenu.Visible := True;
                FavoriteTreeDeletePopupMenu.Visible := False;
                FavoriteTreeRenamePopupMenu.Visible := False;
                FavoriteTreeNewFolderPopupMenu.Visible := True;
                FavoriteTreeURLCopyPopupMenu.Visible := False;
-               FavoriteTreeNameCopyPopupMenu.Visible := True;
+               FavoriteTreeNameCopyPopupMenu.Visible := False;
                FavoriteTreeNameURLCopyPopupMenu.Visible := False;
                FavoriteTreeReloadPopupMenu.Visible := False;
                FavoriteTreeLogDeletePopupMenu.Visible := False;
+               FavoriteTreeItemNameCopyPopupMenu.Visible := True;
        end else if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
                FavoriteTreeBrowseFolderPopupMenu.Visible := True;
                FavoriteTreeDeletePopupMenu.Visible := True;
                FavoriteTreeRenamePopupMenu.Visible := False;
                FavoriteTreeNewFolderPopupMenu.Visible := True;
                FavoriteTreeURLCopyPopupMenu.Visible := False;
-               FavoriteTreeNameCopyPopupMenu.Visible := True;
+               FavoriteTreeNameCopyPopupMenu.Visible := False;
                FavoriteTreeNameURLCopyPopupMenu.Visible := False;
                FavoriteTreeReloadPopupMenu.Visible := False;
                FavoriteTreeLogDeletePopupMenu.Visible := False;
+               FavoriteTreeItemNameCopyPopupMenu.Visible := True;
        end else if TObject(FClickNode.Data) is TFavoriteFolder then begin
                FavoriteTreeBrowseFolderPopupMenu.Visible := True;
                FavoriteTreeDeletePopupMenu.Visible := True;
@@ -6350,6 +6269,7 @@ begin
                FavoriteTreeNameURLCopyPopupMenu.Visible := False;
                FavoriteTreeReloadPopupMenu.Visible := False;
                FavoriteTreeLogDeletePopupMenu.Visible := False;
+               FavoriteTreeItemNameCopyPopupMenu.Visible := True;
        end else if TObject(FClickNode.Data) is TFavoriteThreadItem then begin
                FavoriteTreeBrowseFolderPopupMenu.Visible := False;
                FavoriteTreeDeletePopupMenu.Visible := True;
@@ -6360,6 +6280,7 @@ begin
                FavoriteTreeNameURLCopyPopupMenu.Visible := True;
                FavoriteTreeReloadPopupMenu.Visible := True;
                FavoriteTreeLogDeletePopupMenu.Visible := True;
+               FavoriteTreeItemNameCopyPopupMenu.Visible := True;
        end else if TObject(FClickNode.Data) is TFavoriteBoardItem then begin
                FavoriteTreeBrowseFolderPopupMenu.Visible := False;
                FavoriteTreeDeletePopupMenu.Visible := True;
@@ -6370,6 +6291,7 @@ begin
                FavoriteTreeNameURLCopyPopupMenu.Visible := True;
                FavoriteTreeReloadPopupMenu.Visible := True;
                FavoriteTreeLogDeletePopupMenu.Visible := False;
+               FavoriteTreeItemNameCopyPopupMenu.Visible := True;
        end else begin
                FavoriteTreeBrowseFolderPopupMenu.Visible := False;
                FavoriteTreeDeletePopupMenu.Visible := False;
@@ -6380,6 +6302,7 @@ begin
                FavoriteTreeNameURLCopyPopupMenu.Visible := False;
                FavoriteTreeReloadPopupMenu.Visible := False;
                FavoriteTreeLogDeletePopupMenu.Visible := False;
+               FavoriteTreeItemNameCopyPopupMenu.Visible := False;
        end;
 
 end;
@@ -6401,30 +6324,6 @@ begin
        end;
 
 end;
-
-procedure TGikoForm.FavoriteTreeViewDblClick(Sender: TObject);
-var
-       mousePoint : TPoint;
-       item : TTreeNode;
-       rect : TRect;
-begin
-       mousePoint := Mouse.CursorPos;
-       mousePoint := FavoriteTreeView.ScreenToClient(mousePoint);
-       item := FavoriteTreeView.GetNodeAt(mousePoint.X, mousePoint.Y);
-       //\91I\91ð\82µ\82½\83A\83C\83e\83\80\82Æ\93¯\82\82©\83`\83F\83b\83N
-       if item = FavoriteTreeView.Selected then begin
-               //\95\\8e¦\82µ\82Ä\82¢\82é\94Í\88Í\82Æ\93¯\82\82Æ\82±\82ë\82©\83`\83F\83b\83N
-               rect := item.DisplayRect(true);
-               //\83C\83\81\81[\83W\95ª\8d\82É\90L\82Î\82·
-               rect.Left := rect.Left - FavoriteTreeView.Images.Width;
-               if ((mousePoint.X >= rect.Left) and (mousePoint.X <= rect.Right)) and
-                       ((mousePoint.Y >= rect.Top) and (mousePoint.Y <= rect.Bottom)) then begin
-                       FClickNode := FavoriteTreeView.Selected;
-                       GikoDM.FavoriteTreeViewReloadActionExecute( Sender );
-               end;
-       end;
-end;
-
 function TGikoForm.TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
 var
        Found: TTreeNode;
@@ -6510,40 +6409,13 @@ begin
                finally
                        FDropSpaceNode := nil;
                end;
+               //\8dX\90V\82µ\82½\82±\82Æ\82ð\8b³\82¦\82é
+               FavoriteDM.Modified := true;
                SetLinkBar;
        end;
 
 end;
 
-procedure TGikoForm.ListCoolBarContextPopup(Sender: TObject;
-       MousePos: TPoint; var Handled: Boolean);
-begin
-
-       FToolBarSettingSender := tssList;
-       MousePos := ListCoolBar.ClientToScreen( MousePos );
-       MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
-
-end;
-
-procedure TGikoForm.MainCoolBarContextPopup(Sender: TObject;
-       MousePos: TPoint; var Handled: Boolean);
-begin
-
-       FToolBarSettingSender := tssMain;
-       MousePos := MainCoolBar.ClientToScreen( MousePos );
-       MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
-
-end;
-
-procedure TGikoForm.BrowserCoolBarContextPopup(Sender: TObject;
-       MousePos: TPoint; var Handled: Boolean);
-begin
-
-       FToolBarSettingSender := tssBrowser;
-       MousePos := BrowserCoolBar.ClientToScreen( MousePos );
-       MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
-
-end;
 procedure TGikoForm.SetListViewBackGroundColor(value: TColor);
 begin
        if FListViewBackGroundColor <> value then begin
@@ -6618,7 +6490,7 @@ begin
       tmp := GikoSys.ReadThreadFile(FileName, Number);
                end;
                if tmp <> '' then begin
-                       Res := DivideStrLine(tmp);
+                       THTMLCreate.DivideStrLine(tmp, @Res);
 
                        Header := IntToStr(Number) + ' \81F' + Res.FName + ' \81F' + Res.FDateTime + #13#10;
                        if ReplaceTag then begin
@@ -6640,7 +6512,7 @@ begin
                        end;
                        Body := CustomStringReplace(Body, '</a>', '',true);
 
-                       Body := GikoSys.DeleteLink(Body);
+                       Body := HTMLCreater.DeleteLink(Body);
                        if ReplaceTag then begin
                                Body := CustomStringReplace(Body, '&lt;', '<');
                                Body := CustomStringReplace(Body, '&gt;', '>');
@@ -6788,6 +6660,9 @@ begin
                                        FavoriteClick( Node );
                Exit;
        end;
+    //\8c»\8dÝ\95\\8e¦\82µ\82Ä\82¢\82é\82Ì\82Æ\93¯\82\82È\82ç\8dÄ\95`\89æ\82µ\82È\82¢
+       if ActiveList = Node.Data then
+               Exit;
 
        ActiveListColumnSave;
 
@@ -6799,12 +6674,13 @@ begin
                if not TBoard(Node.Data).IsThreadDatRead then begin
                        Screen.Cursor := crHourGlass;
                        try
-        if not TBoard(Node.Data).IsThreadDatRead then
+               if not TBoard(Node.Data).IsThreadDatRead then
                                        GikoSys.ReadSubjectFile(Node.Data);
                        finally
                                Screen.Cursor := crDefault;
                        end;
                end;
+               Sort.SetSortDate(Now());
                SetActiveList(Node.data);
        end;
 
@@ -6849,12 +6725,9 @@ begin
        end;
 
 end;
-
-procedure TGikoForm.TreeViewClick(Sender: TObject);
-begin
-       TreeClick( TreeView.Selected );
-end;
-
+// *************************************************************************
+//! \83c\83\8a\81[\83r\83\85\81[\82ÌKeyDown\83C\83x\83\93\83g
+// *************************************************************************
 procedure TGikoForm.TreeViewKeyDown(Sender: TObject; var Key: Word;
        Shift: TShiftState);
 begin
@@ -6867,19 +6740,34 @@ begin
                TreeView.Selected.Expanded := not TreeView.Selected.Expanded;
        end;
 end;
-
+//! \82¨\8bC\82É\93ü\82è\82ÌMouseDown\83C\83x\83\93\83g
 procedure TGikoForm.FavoriteTreeViewMouseDown(Sender: TObject;
        Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 var
        favItem                         : TTreeNode;
        favThreadItem   : TFavoriteThreadItem;
+       rect: TRect;
 begin
-
        case Button of
        mbLeft:
                begin
-                       FMouseDownPos.X := X;
-                       FMouseDownPos.Y := Y;
+                       if not (ssAlt in Shift) and (FavoriteTreeView.Selected <> nil) and 
+                               (FavoriteTreeView.Selected = FavoriteTreeView.GetNodeAt(X, Y)) then begin
+                               //\83}\83E\83X\82ªnode\82Ì\8fã\82É\82¢\82é\82©
+                               rect := FavoriteTreeView.Selected.DisplayRect(true);
+                               // \83A\83C\83R\83\93\95ª\8d\82É\82¸\82ç\82·
+                               if ((rect.Left - FavoriteTreeView.Indent <= X) and (rect.Right >= X)) and
+                                       ((rect.Bottom >= Y) and (rect.Top <= Y)) then begin
+                                       if ssDouble in Shift then begin
+                                               FClickNode := FavoriteTreeView.Selected;
+                                               GikoDM.FavoriteTreeViewReloadActionExecute(Sender);
+                                               FClickNode := nil;
+                                       end else begin
+                                               FavoriteClick(
+                                                       TObject(FavoriteTreeView.Selected));
+                                       end;
+                               end;
+                       end;
                end;
        mbMiddle:
                begin
@@ -6938,50 +6826,9 @@ begin
        end;
 
 end;
-
-procedure TGikoForm.FavoriteTreeViewMouseUp(Sender: TObject;
-  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
-var
-       item : TTreeNode;
-       rect : TRect;
-begin
-       if (abs( X - FMouseDownPos.X ) < Mouse.DragThreshold) and
-                (abs( Y - FMouseDownPos.Y ) < Mouse.DragThreshold) then begin
-               item := FavoriteTreeView.GetNodeAt(X, Y);
-               if item = FavoriteTreeView.Selected then begin
-                       //\83C\83\81\81[\83W\94Í\88Í\82ð\8eæ\93¾
-                       rect := FavoriteTreeView.Selected.DisplayRect(true);
-                       //\83A\83C\83R\83\93\95ª\8d\82É\90L\82Î\82·
-                       rect.Left := rect.Left - FavoriteTreeView.Images.Width;
-                       if ((X >= rect.Left) and (X <= rect.Right)) and
-                               ((Y >= rect.Top) and (Y <= rect.Bottom)) then begin
-                               FavoriteClick( TObject( FavoriteTreeView.Selected ) );
-                       end;
-               end;
-       end;
-end;
-
-destructor     TBrowserRecord.Destroy;
-var
-       doc :OleVariant;
-begin
-       if Self.FEvent <> nil then
-               Self.FEvent.Free;
-       if Self.FBrowser <> nil then begin
-               if Self.Thread <> nil then begin
-                       //\83^\83u\82Ì\95\9c\8c³\82Å\95\9c\8c³\82³\82ê\82½\83X\83\8c\82Í\81A\95`\89æ\82³\82ê\82Ä\82¢\82È\82¢\82Æ\82«\82ª\82 \82é\82Ì\82Å
-                       //\82»\82Ì\82Æ\82«\82Ì\83X\83N\83\8d\81[\83\8b\97Ê\82ð\95Û\91\82µ\82Ä\82µ\82Ü\82¤\82Æ\83g\83b\83v\82É\96ß\82Á\82Ä\82µ\82Ü\82¤\81B
-                       if Self.FBrowser.OleObject.Document.documentElement.innerText <> '' then begin
-                               doc := Idispatch( olevariant(Self.FBrowser.ControlInterface).Document) as IHTMLDocument2;
-                               Self.Thread.ScrollTop := doc.Body.ScrollTop;
-                       end;
-               end;
-               //TOleControl(Self.FBrowser).Visible := false;
-               ShowWindow(Self.FBrowser.Handle, SW_HIDE);
-       end;
-
-end;
-
+// *************************************************************************
+//! \82¨\8bC\82É\93ü\82è\83c\83\8a\81[\82Ì\83}\83E\83X\83A\83b\83v\83C\83x\83\93\83g
+// *************************************************************************
 function TGikoForm.WebBrowserClick(Sender: TObject): WordBool;
 var
        p : TPoint;
@@ -7031,11 +6878,11 @@ begin
                         rc := GikoUtil.MsgBox(Handle,
                                 '20\8cÂ\88È\8fã\82 \82è\82Ü\82·\82ª\81A\82·\82×\82Ä\95\\8e¦\82µ\82Ü\82·\82©\81H',
                                 'ID\83|\83b\83v\83A\83b\83v\8cx\8d\90',
-                                MB_YESNO or MB_ICONQUESTION);
+                                                               MB_YESNO or MB_ICONQUESTION);
                         limited := rc <> ID_YES;
                     end;
-                    body := GikoSys.GetSameIDResAnchor(AID, FActiveContent.Thread, limited);
-                    IDAnchorPopup(body);
+                                       body := GikoSys.GetSameIDResAnchor(AID, FActiveContent.Thread, limited);
+                                       FActiveContent.IDAnchorPopup(body);
                                end;
                        end;
                except
@@ -7044,8 +6891,6 @@ begin
   end;
 end;
 
-
-
 //\83X\83\8c\83b\83h\88ê\97\97\82ð\8dÅ\91å\89»\82µ\82Ä\83t\83H\81[\83J\83X\82ð\93\96\82Ä\82é
 procedure TGikoForm.SelectTimerTimer(Sender: TObject);
 begin
@@ -7057,103 +6902,6 @@ begin
                end;
 end;
 
-function TGikoForm.GetTabURLs(AStringList: TStringList) : Boolean;
-var
-  rec : TBrowserRecord;
-  i, bound : Integer;
-begin
-  bound := BrowserTab.Tabs.Count -1;
-       if bound = -1 then begin
-               Result := False;
-               Exit; //for\82É\94ò\82Î\82È\82¢\82Å\91\80\8dì\82ð\94²\82¯\82é
-  end;
-
-  for i := 0 to bound do begin
-       rec := TBrowserRecord( BrowserTab.Tabs.Objects[ i ] );
-       if( rec <> nil) and (rec.Thread <> nil) then
-               AStringList.Add( rec.Thread.URL );
-  end;
-  Result := True;
-end;
-
-function TGikoForm.SaveTabURLs : Boolean;
-const
-       Filename = 'tab.sav';
-       bFilename = '~tab.sav';
-var
-       SaveStringList: TStringList;
-begin
-       Result := false;
-
-       SaveStringList := TStringList.Create;
-       try
-               if GetTabURLs(SaveStringList) then begin
-                       if FileExists( GikoSys.GetAppDir + Filename) then begin
-                               if FileExists( GikoSys.GetAppDir + bFilename) then
-                                       DeleteFile(GikoSys.GetAppDir + bFilename);
-
-                               //\83o\83b\83N\83A\83b\83v\82ð\8dì\82é\81B
-                               RenameFile(GikoSys.GetAppDir + Filename, GikoSys.GetAppDir + bFilename);
-                       end;
-                       SaveStringList.SaveToFile(GikoSys.GetAppDir + Filename);
-                       Result := true;
-               end;
-       finally
-               SaveStringList.Free;
-       end;
-end;
-
-function TGikoForm.LoadTabURLs : Boolean;
-var
-       i, bound    : Integer;
-       item        : TThreadItem;
-       URLs                            : TStringList;
-       GikoTab                 : TGikoTabAppend;
-       fileName                : string;
-begin
-       if FStartUp then begin
-               //\8bN\93®\8e\9e\82É\83^\83u\8e©\93®\95\9c\8c³\82ð\93ü\82ê\82Ä\82¢\82é\82Æ\81A\8bó\83y\81[\83W\97p\82ÌBrowser\82Ì
-               //\95`\89æ\82ª\8fI\82í\82Á\82Ä\82¢\82È\82­\82Ä\81A\83N\83\8a\83b\83N\83C\83x\83\93\83g\82Ì\90Ý\92è\93\99\82É\93Ë\93ü\82·\82é\82Ì\82Å
-               //\82±\82±\82Å\8fI\82í\82ç\82¹\82Ä\82¨\82­
-               while (Browser.ReadyState <> READYSTATE_COMPLETE) and
-                               (Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
-                       Application.ProcessMessages;
-               end;
-       end;
-
-       fileName := ExtractFilePath(Application.ExeName) + 'tab.sav';
-       URLs := TStringList.Create();
-       GikoTab := GikoSys.Setting.BrowserTabAppend;
-       try
-               try
-                       Result := True;
-                       if FileExists(fileName) then begin
-                               URLs.LoadFromFile(fileName);
-                               bound    := URLs.Count - 1;
-                               if bound > -1 then begin
-                                       GikoSys.Setting.BrowserTabAppend := gtpLast;//TGikoTabAppend(1);
-                                       for i := 0 to bound do begin
-                                               item := BBSsFindThreadFromURL( URLs[ i ] );
-                                               if item <> nil then
-                                                       InsertBrowserTab( item, false );
-                                       end;
-                               end else
-                                       Result := False;
-                       end else
-                               Result := False;
-               except
-                       on EFOpenError do begin
-                               ShowMessage('\83^\83u\83t\83@\83C\83\8b\82ª\8aJ\82¯\82Ü\82¹\82ñ');
-                       end;
-               end;
-       finally
-               GikoSys.Setting.BrowserTabAppend := GikoTab;
-               URLs.Free;
-       end;
-
-end;
-
-
 /// ListView \82Ì\83J\83\89\83\80\95\9d\82¨\82æ\82Ñ\88Ê\92u\82Ì\95Û\91
 procedure TGikoForm.ActiveListColumnSave;
 var
@@ -7334,18 +7082,6 @@ begin
        SetActiveList( FActiveList );
 
 end;
-//\8ew\92è\82µ\82½\94Ô\8d\86\82Ì\83\8c\83X\82Éjump\82·\82éAction
-procedure TGikoForm.ReleaseBrowser( BRecord: TBrowserRecord);
-begin
-       if BRecord <> nil then begin
-               BRecord.Browser := nil;
-               if BRecord.FEvent <> nil then begin
-                       BRecord.FEvent.Free;
-                       BRecord.FEvent := nil;
-               end;
-               BRecord.Repaint := true;
-       end;
-end;
 
 procedure TGikoForm.OnGestureStart(Sender: TObject);
 begin
@@ -7536,42 +7272,6 @@ begin
        CoolBarResized( Sender, BrowserCoolBar );
 end;
 
-//ID\83A\83\93\83J\81[\92Ç\89Á
-procedure TGikoForm.IDAnchorPopup(Abody :string);
-var
-       firstElement: IHTMLElement;
-       document: IHTMLDocument2;
-       docAll: IHTMLElementCollection;
-       doc : Variant;
-       nCSS : string;
-begin
-       try
-               document := FActiveContent.Browser.Document as IHTMLDocument2;
-
-               if Assigned(document) then begin
-                       docAll := document.all;
-                       firstElement := docAll.item('idSearch', 0) as IHTMLElement;
-                       if (Assigned(firstElement)) then begin
-                               if Length(Abody) > 0 then begin
-                                       doc := Idispatch( olevariant(FActiveContent.Browser.ControlInterface).Document) as IHTMLDocument2;
-                                       nCSS := '<p id="idSearch" style="position:absolute;top:' + IntToStr(doc.Body.ScrollTop + 10) + 'px;right:5px;' //
-                                               + 'background-color:window; border:outset 1px infobackground; z-index:10; overflow-y:auto; border-top:none">'
-                                               + Abody + '</p>';
-                                       firstElement.outerHTML := nCSS;
-                                       firstElement.style.visibility := 'visible';
-                               end else begin
-                                       firstElement.outerHTML := '<p id="idSearch"></p>';
-                                       firstElement.style.visibility := 'hidden';
-                               end;
-                       end else if (Assigned(firstElement)) then begin
-                               firstElement.outerHTML := '<p id="idSearch"></p>';
-                               firstElement.style.visibility := 'hidden';
-                       end;
-               end;
-       except
-       end;
-end;
-
 //\82±\82Ì\83\8c\83X\82 \82Ú\81`\82ñ
 procedure TGikoForm.IndividualAbon(Atag, Atype : Integer);
 var
@@ -7677,9 +7377,6 @@ begin
 
 end;
 
-procedure TGikoForm.BeLogInOutActionUpdate(Sender: TObject);
-begin
-end;
 //ListView\82Ì\91I\91ð\8fó\91Ô\82ð\89ð\8f\9c\82·\82é
 procedure TGikoForm.ListViewKeyUp(Sender: TObject; var Key: Word;
   Shift: TShiftState);
@@ -7698,7 +7395,9 @@ begin
                end;
        end;
 end;
-
+// *************************************************************************
+//! \82¨\8bC\82É\93ü\82è\82Ì\95Ò\8fW\8aJ\8en\83C\83x\83\93\83g
+// *************************************************************************
 procedure TGikoForm.FavoriteTreeViewEditing(Sender: TObject;
   Node: TTreeNode; var AllowEdit: Boolean);
 begin
@@ -7728,46 +7427,6 @@ begin
                Screen.Cursor := Cursor;
 end;
 // *************************************************************************
-//! \83X\83N\83\8a\81[\83\93\8fã\82ÉEditorForm\82ª\82¢\82é\82©
-// *************************************************************************
-function TGikoForm.EditorFormExists(): boolean;
-var
-       i : Integer;
-begin
-       Result := false;
-       //\83X\83N\83\8a\81[\83\93\8fã\82Ì\91S\82Ä\82Ì\83t\83H\81[\83\80\82©\82ç\81AEditorForm\82ð\92T\82·
-       for i := 0 to Screen.CustomFormCount - 1 do begin
-               if TObject(Screen.CustomForms[i]) is TEditorForm then begin
-                       Result := true;
-                       Break;
-               end;
-       end;
-end;
-// *************************************************************************
-//! \83X\83N\83\8a\81[\83\93\8fã\82É\82¢\82é\82·\82×\82Ä\82ÌEditorForm\82©\82ç\96¼\91O\82Ì\97\9a\97ð\82ð\8dí\8f\9c\82·\82é
-// *************************************************************************
-procedure TGikoForm.AllEditroFormNameTextClearClear();
-var
-       i : Integer;
-begin
-       for i := 0 to Screen.CustomFormCount - 1 do begin
-               if TObject(Screen.CustomForms[i]) is TEditorForm then
-                       TEditorForm(Screen.CustomForms[i]).NameComboBox.Items.Clear;
-       end;
-end;
-// *************************************************************************
-//! \83X\83N\83\8a\81[\83\93\8fã\82É\82¢\82é\82·\82×\82Ä\82ÌEditorForm\82©\82ç\83\81\81[\83\8b\97\9a\97ð\82ð\8dí\8f\9c\82·\82é
-// *************************************************************************
-procedure TGikoForm.AllEditroFormMailTextClearClear();
-var
-       i : Integer;
-begin
-       for i := 0 to Screen.CustomFormCount - 1 do begin
-               if TObject(Screen.CustomForms[i]) is TEditorForm then
-                       TEditorForm(Screen.CustomForms[i]).MailComboBox.Items.Clear;
-       end;
-end;
-// *************************************************************************
 //! \83L\83\83\83r\83l\83b\83g\82ð\95Â\82\82é\81~\83{\83^\83\93\82Ì\83N\83\8a\83b\83N\83C\83x\83\93\83g
 // *************************************************************************
 procedure TGikoForm.CabinetCloseSpeedButtonClick(Sender: TObject);
@@ -7801,11 +7460,14 @@ begin
                        //\83L\81[\93ü\97Í\82·\82×\82Ä
                        WM_KEYFIRST..WM_KEYLAST :
                        begin
-                               wmMsg.Msg := Msg.message;
-                               wmMsg.CharCode := Word(Msg.wParam);
-                               wmMsg.KeyData := Msg.lParam;
-                               //\83t\83H\81[\83\80\82Ì\83V\83\87\81[\83g\83J\83b\83g\82Ì\8f\88\97\9d\82É\93]\91\97
-                               Self.OnShortCut(wmMsg, Handled);
+                               //\83L\81[\83A\83b\83v\82Í\96³\8e\8b\82·\82é\81@KeyDown\82Æ\8d\87\82í\82¹\82Ä\82Q\89ñ\8cÄ\82Î\82ê\82é\82©\82ç
+                               if (Msg.message <> WM_KEYUP) and (Msg.message <> WM_CHAR) then begin
+                                       wmMsg.Msg := Msg.message;
+                                       wmMsg.CharCode := Word(Msg.wParam);
+                                       wmMsg.KeyData := Msg.lParam;
+                                       //\83t\83H\81[\83\80\82Ì\83V\83\87\81[\83g\83J\83b\83g\82Ì\8f\88\97\9d\82É\93]\91\97
+                                       Self.OnShortCut(wmMsg, Handled);
+                               end;
                        end;
                end;
        end;
@@ -7846,6 +7508,265 @@ begin
        s := s + E.Message;
        MsgBox(Handle, s, '\8f\88\97\9d\82³\82ê\82È\82©\82Á\82½\97á\8aO', MB_OK or MB_ICONSTOP);
 end;
+// *************************************************************************
+//! \83_\83E\83\93\83\8d\81[\83h\83R\83\93\83g\83\8d\81[\83\8b\83X\83\8c\83b\83h\82Ì\90\90¬
+// *************************************************************************
+procedure TGikoForm.CreateControlThread();
+begin
+       //\83_\83E\83\93\83\8d\81[\83h\83I\83u\83W\83F\83N\83g
+       FControlThread := TThreadControl.Create(True);
+       FControlThread.MaxThreadCount := 1;
+       FControlThread.Resume;
+       FControlThread.OnDownloadEnd := DownloadEnd;
+       FControlThread.OnDownloadMsg := DownloadMsg;
+       FControlThread.OnWork := Work;
+       FControlThread.OnWorkBegin := WorkBegin;
+       FControlThread.OnWorkEnd := WorkEnd;
+end;
+// *************************************************************************
+//! \83u\83\89\83E\83U\82Ì\90\90¬
+// *************************************************************************
+procedure TGikoForm.CreateBrowsers(count: Integer);
+var
+       i: Integer;
+       newBrowser: TWebBrowser;
+begin
+       BrowserNullTab := TBrowserRecord.Create;
+       BrowserNullTab.Browser := Browser;
+       BrowserNullTab.Browser.Navigate(BLANK_HTML);
+       FBrowsers := TList.Create;
+       for i := 0 to count -1 do begin
+               FBrowsers.Add(TWebBrowser.Create(BrowserPanel));
+               newBrowser := FBrowsers[FBrowsers.Count - 1];
+               TOleControl(newBrowser).Parent := BrowserPanel;
+               TOleControl(newBrowser).Align := alNone;
+               TOleControl(newBrowser).Left    := 0;
+               TOleControl(newBrowser).Top     := 0;
+               newBrowser.RegisterAsDropTarget := False;
+               newBrowser.OnDocumentComplete   := BrowserDocumentComplete;
+               newBrowser.OnBeforeNavigate2    := BrowserBeforeNavigate2;
+               newBrowser.OnEnter                              := BrowserEnter;
+               newBrowser.OnNewWindow2                 := BrowserNewWindow2;
+               newBrowser.OnStatusTextChange   := BrowserStatusTextChange;
+               newBrowser.Navigate(BLANK_HTML);
+               ShowWindow(newBrowser.Handle, SW_HIDE);
+       end;
+       BrowserNullTab.Browser.BringToFront;
+       ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW);
+       //\8bN\93®\8e\9e\82É\83^\83u\8e©\93®\95\9c\8c³\82ð\93ü\82ê\82Ä\82¢\82é\82Æ\81A\8bó\83y\81[\83W\97p\82ÌBrowser\82Ì
+       //\95`\89æ\82ª\8fI\82í\82Á\82Ä\82¢\82È\82­\82Ä\81A\83N\83\8a\83b\83N\83C\83x\83\93\83g\82Ì\90Ý\92è\93\99\82É\93Ë\93ü\82·\82é\82Ì\82Å
+       //\82±\82±\82Å\8fI\82í\82ç\82¹\82Ä\82¨\82­
+       while (Browser.ReadyState <> READYSTATE_COMPLETE) and
+               (Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
+               Application.ProcessMessages;
+       end;
+end;
+// *************************************************************************
+//! \83c\81[\83\8b\83o\81[\82É\83X\83\8c\8di\8d\9e\82Ý\83R\83\93\83{\83{\83b\83N\83X\82ð\90Ý\92è\82·\82é
+// *************************************************************************
+procedure TGikoForm.SetSelectComboBox();
+const
+       DUMMYCOMPNAME = 'SelectComboBoxDummy';
+var
+       i: Integer;
+       ToolButton: TToolButton;
+begin
+       //ListToolBar\82É\82¢\82é\82©\82à\82µ\82ê\82È\82¢\8di\8d\9e\82ÝComboBox\82ð\94z\92u
+       SelectComboBoxPanel.Visible := False;
+       try
+               for i := ListToolBar.ControlCount - 1 downto 0 do
+               begin
+                       if ListToolBar.Controls[ i ].Action = GikoDM.SelectItemAction then
+                       begin
+                               SelectComboBoxPanel.Left := ListToolBar.Controls[ i ].Left;
+                               SelectComboBoxPanel.Width := GikoSys.Setting.SelectComboBoxWidth;
+                               SelectComboBoxPanel.Parent := ListToolBar;
+                               SelectComboBoxPanel.Visible := True;
+
+                               SelectComboBox.Left := 0;
+                               SelectComboBox.Top  := 0;
+                               SelectComboBox.Height := SelectComboBoxPanel.ClientHeight;
+                               SelectComboBox.Width := SelectComboBoxPanel.Width -
+                                                                               SelectComboBoxSplitter.Width;
+
+                               //\88ê\82Â\8c©\82¦\82È\82¢\83{\83^\83\93\82ð\93Ë\82Á\8d\9e\82Þ
+                               ToolButton := TToolButton(ListToolBar.FindComponent(DUMMYCOMPNAME));
+                               if ToolButton = nil then begin
+                                       ToolButton := TToolButton.Create(ListToolBar);
+                                       ToolButton.Name := DUMMYCOMPNAME;
+                               end;
+                               ToolButton.Style := tbsSeparator;
+                               ToolButton.Width := 0;
+                               ToolButton.Left  := ListToolBar.Controls[ i ].Left;
+                               ListToolBar.InsertControl(ToolButton);
+                               ToolButton.Visible := False;
+
+                               // \83X\83\8c\83b\83h\8di\8d\9e\82Ì\97×\82É\83Z\83p\83\8c\81[\83^\82ª\82 \82é\8fê\8d\87\82Í\89B\82·
+                               if (i + 1) < ListToolBar.ControlCount then
+                                       if ListToolBar.Controls[ i + 1 ] is TToolButton then
+                                               if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
+                                                       ListToolBar.Controls[ i + 1 ].Visible := False;
+
+
+                               // \83X\83\8c\83b\83h\8di\8d\9e\83{\83^\83\93\82ð\89B\82·
+                               ListToolBar.Controls[ i ].Visible := False;
+
+                               break;
+                       end;
+               end;
+       except
+       end;
+end;
+//! \83L\83\83\83r\83l\83b\83g\82Ì\83}\83E\83X\83_\83E\83\93\83C\83x\83\93\83g
+procedure TGikoForm.TreeViewMouseDown(Sender: TObject;
+  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+var
+       rect : TRect;
+begin
+       case Button of
+       mbLeft:
+               begin
+                       if (TreeView.Selected <> nil) and
+                               (TreeView.Selected = TreeView.GetNodeAt(X, Y)) then begin
+                               //\83}\83E\83X\82ªnode\82Ì\8fã\82É\82¢\82é\82©
+                               rect := TreeView.Selected.DisplayRect(true);
+                               // \83A\83C\83R\83\93\95ª\82¾\82¯\8d\82É\82¸\82ç\82·
+                               if ((rect.Left - TreeView.Indent <= X) and (rect.Right >= X)) and
+                                       ((rect.Bottom >= Y) and (rect.Top <= Y)) then begin
+                                       // \83N\83\8a\83b\83N\82Æ\83_\83u\83\8b\83N\83\8a\83b\83N\82ð\83R\83R\82Å\94»\92è
+                                       if ssDouble in Shift then begin
+                                               TreeDoubleClick( TreeView.Selected );
+                                       end else begin
+                                               TreeClick(TreeView.Selected);
+                                       end;
+                               end;
+                       end;
+               end;
+       end;
+end;
+//! ActionList\82ÌGroupIndex\82Ì\95Û\91
+procedure TGikoForm.GetGroupIndex(ActionList: TActionList);
+var
+       i: Integer;
+begin
+       if ActionList <> nil then begin
+               SetLength(FActionListGroupIndexes, ActionList.ActionCount);
+
+               for i := 0 to ActionList.ActionCount - 1 do begin
+                       try
+                               FActionListGroupIndexes[i] :=
+                                       TCustomAction(ActionList.Actions[i]).GroupIndex;
+                               TCustomAction(ActionList.Actions[i]).GroupIndex
+                                       := 0;
+                       except
+                               ;//Cast\82Å\82«\82È\82¢\82Æ\82«\91Î\8dô
+                       end;
+               end;
+
+       end;
+end;
+//! ActionList\82ÌGroupIndex\82Ì\90Ý\92è
+procedure TGikoForm.SetGroupIndex(ActionList: TActionList);
+var
+       i: Integer;
+begin
+       if ActionList <> nil then begin
+               if Length( FActionListGroupIndexes ) = ActionList.ActionCount then begin
+                       for i := 0 to ActionList.ActionCount - 1 do begin
+                               try
+                                       TCustomAction(ActionList.Actions[i]).GroupIndex
+                                               := FActionListGroupIndexes[i];
+                               except
+                                       ;//Cast\82Å\82«\82È\82¢\82Æ\82«\91Î\8dô
+                               end;
+                       end;
+               end;
+       end;
+end;
+//! \82±\82Ì\83\8c\83X\82ÌURL\8eæ\93¾
+procedure TGikoForm.GetResURLMenuClick(Sender: TObject);
+begin
+;
+end;
+//! ListView\81i\83X\83\8c\83b\83h\88ê\97\97\81j\82ð\8dX\90V\82·\82é
+procedure TGikoForm.RefreshListView(Thread: TThreadItem);
+begin
+       //Thread\82Ì\94Â\82Æ\95\\8e¦\82µ\82Ä\82¢\82é\94Â\82ª\93¯\82\82È\82ç\95`\89æ\82ð\8dX\90V\82·\82é
+       if (FActiveList is TBoard) and (TBoard(ActiveList) = Thread.ParentBoard) then begin
+               ListView.Refresh;
+       end;
+end;
+
+procedure TGikoForm.MainCoolBarContextPopup(Sender: TObject;
+  MousePos: TPoint; var Handled: Boolean);
+var
+    pos : TPoint;
+    coolBar: TGikoCoolBar;
+begin
+    Handled := False;
+    if (Sender <> nil) and (Sender is TGikoCoolBar) then begin
+        coolBar := TGikoCoolBar(Sender);
+        if (coolBar = MainCoolBar) then begin
+            FToolBarSettingSender := tssMain;
+        end else if (coolBar = ListCoolBar) then begin
+            FToolBarSettingSender := tssList;
+        end else if (coolBar = BrowserCoolBar) then begin
+            FToolBarSettingSender := tssBrowser;
+        end else begin
+            FToolBarSettingSender := tssNone;
+        end;
+        pos := coolBar.ClientToScreen( MousePos );
+        MainCoolBarPopupMenu.Popup( pos.X, pos.Y );
+        Handled := True;
+    end;
+end;
+
+procedure TGikoForm.TaskTrayIconMessage(var Msg: TMsg);
+begin
+    //  \8d\83N\83\8a\83b\83N\82È\82ç\95\9c\8c³\82·\82é
+    if  (Msg.wParam = WM_LBUTTONUP) then  begin
+        UnStoredTaskTray;
+    end;
+end;
+//! \83^\83X\83N\83g\83\8c\83C\82É\83A\83C\83R\83\93\93o\98^\81\95\83t\83H\81[\83\80\89B\82µ
+procedure TGikoForm.StoredTaskTray;
+begin
+    try
+        if (FIconData.uID = 0) then begin
+            FIconData.cbSize  :=  SizeOf(TNotifyIconData);
+            FIconData.uID     :=  Self.Handle;
+            FIconData.Wnd     :=  Handle;
+            FIconData.uFlags  :=  NIF_MESSAGE or NIF_ICON or NIF_TIP;
+            FIconData.uCallbackMessage  :=  USER_TASKTRAY;
+            FIconData.hIcon   :=  Application.Icon.Handle;  {\83A\83C\83R\83\93\8ew\92è}
+            FIconData.szTip   :=  '\83M\83R\83i\83r';      {\83q\83\93\83g\95\8e\9a\97ñ}
+            Shell_NotifyIcon(NIM_ADD, @FIconData);
+
+            ShowWindow(Self.Handle, SW_HIDE);
+        end;
+    except
+    end;
+end;
+//! \83^\83X\83N\83g\83\8c\83C\82Ì\83A\83C\83R\83\93\8dí\8f\9c\81\95\83t\83H\81[\83\80\95\\8e¦
+procedure TGikoForm.UnStoredTaskTray;
+begin
+    try
+        try
+            Shell_NotifyIcon(NIM_DELETE, @FIconData);
+            SetForegroundWindow(Application.Handle);
+        except
+        end;
+    finally
+        FIconData.uID := 0;
+        // Action\82©\82ç\8ai\94[\82µ\82½\82Æ\82«\82ÍTag\82Ì\92l\82Í0\88È\8aO
+        if (GikoDM.StoredTaskTrayAction.Tag = 0) then begin
+            ShowWindow(Self.Handle, SW_RESTORE);
+        end else begin
+            ShowWindow(Self.Handle, SW_SHOW);
+        end;
+        GikoDM.StoredTaskTrayAction.Tag := 0;
+    end;
+end;
 
 initialization
                                OleInitialize(nil);