OSDN Git Service

Release3をマージ
authorgenyakun <genyakun>
Mon, 24 Oct 2005 02:29:58 +0000 (02:29 +0000)
committergenyakun <genyakun>
Mon, 24 Oct 2005 02:29:58 +0000 (02:29 +0000)
Editor.pas
GikoSystem.pas

index d7f78d6..fc96d08 100644 (file)
@@ -108,22 +108,22 @@ type
        SETTINGTXT2: TMenuItem;
        GetTitlePictureAction: TAction;
        OP1: TMenuItem;
-       GetHeadTXTAction: TAction;
-       HeadTXT1: TMenuItem;
-       RocalRuleTab: TTabSheet;
-       WebBrowser1: TWebBrowser;
-       CalcCapacityAction: TAction;
-       N4: TMenuItem;
-       N5: TMenuItem;
-       LocalRule: TMenuItem;
-       LocalEdit: TMemo;
-       N6: TMenuItem;
-       LocalRuleBrowse: TMenuItem;
-       ToolButton4: TToolButton;
-       ToolButton6: TToolButton;
-       SaveNameMailAction: TAction;
-       ToolButton7: TToolButton;
-       BeLogInOutEAction: TAction;
+    GetHeadTXTAction: TAction;
+    HeadTXT1: TMenuItem;
+    RocalRuleTab: TTabSheet;
+    WebBrowser1: TWebBrowser;
+    CalcCapacityAction: TAction;
+    N4: TMenuItem;
+    N5: TMenuItem;
+    LocalRule: TMenuItem;
+    LocalEdit: TMemo;
+    N6: TMenuItem;
+    LocalRuleBrowse: TMenuItem;
+    ToolButton4: TToolButton;
+    ToolButton6: TToolButton;
+    SaveNameMailAction: TAction;
+    ToolButton7: TToolButton;
+    BeLogInOutEAction: TAction;
 
                procedure EditorPageChange(Sender: TObject);
                procedure FormCreate(Sender: TObject);
@@ -168,14 +168,14 @@ type
        procedure GetSETTINGTXTActionExecute(Sender: TObject);
        procedure GetTitlePictureActionUpdate(Sender: TObject);
        procedure GetTitlePictureActionExecute(Sender: TObject);
-       procedure GetHeadTXTActionExecute(Sender: TObject);
+    procedure GetHeadTXTActionExecute(Sender: TObject);
        procedure CalcCapacityActionExecute(Sender: TObject);
-       procedure LocalRuleClick(Sender: TObject);
-       procedure FormDeactivate(Sender: TObject);
-       procedure LocalRuleBrowseClick(Sender: TObject);
-       procedure SaveNameMailActionExecute(Sender: TObject);
-       procedure BeLogInOutEActionExecute(Sender: TObject);
-       procedure BeLogInOutEActionUpdate(Sender: TObject);
+    procedure LocalRuleClick(Sender: TObject);
+    procedure FormDeactivate(Sender: TObject);
+    procedure LocalRuleBrowseClick(Sender: TObject);
+    procedure SaveNameMailActionExecute(Sender: TObject);
+    procedure BeLogInOutEActionExecute(Sender: TObject);
+    procedure BeLogInOutEActionUpdate(Sender: TObject);
        private
                FThreadItem: TThreadItem;
                FBoard: TBoard;
index e4adbb5..25c2739 100644 (file)
@@ -161,8 +161,12 @@ type
                procedure GetFileList(Path: string; Mask: string; var List: TStringList; IsPathAdd: Boolean); overload;//\83T\83u\83t\83H\83\8b\83_\82Í\8c\9f\8dõ\82µ\82È\82¢
                procedure GetDirectoryList(Path: string; Mask: string; List: TStringList; SubDir: Boolean);
 
-//             procedure CreateHTML3(var html: TStringList; ThreadItem: TThreadItem; var sTitle: string);
+               procedure CreateHTML2(doc: Variant; ThreadItem: TThreadItem; var sTitle: string);
+               procedure CreateHTML3(var html: TStringList; ThreadItem: TThreadItem; var sTitle: string);
+               function AddAnchorTag(s: string): string;
+
                function DivideSubject(Line: string): TSubjectRec;
+               function DivideStrLine(Line: string): TResRec;
 
                property Setting: TSetting read FSetting write FSetting;
                property Dolib: TDolib read FDolib write FDolib;
@@ -183,10 +187,14 @@ type
 
                procedure MenuFont(Font: TFont);
 
+               function RemoveToken(var s:string; const delimiter:string):string;
                function GetTokenIndex(s: string; delimiter: string; index: Integer): string;
                function DeleteLink(const s: string): string;
 
                function GetShortName(const LongName: string; ALength: integer): string;
+               function ConvRes(const Body, Bbs, Key,  ParamBBS, ParamKey, ParamStart, ParamTo, ParamNoFirst, ParamTrue : string; DatToHTML: boolean = false): string; overload;
+               function ConvRes(const Body, Bbs, Key,  ParamBBS, ParamKey, ParamStart, ParamTo, ParamNoFirst, ParamTrue, FullURL : string): string; overload;
+               function ConvertResAnchor(res: string): string;
                function BoolToInt(b: Boolean): Integer;
                function IntToBool(i: Integer): Boolean;
                function GzipDecompress(ResStream: TStream; ContentEncoding: string): string;
@@ -216,6 +224,12 @@ type
                function        GetUnknownBoard( inPlugIn : TBoardPlugIn; inURL : string ) : TBoard;
 
                procedure GetPopupResNumber(URL : string; var stRes, endRes : Int64);
+
+               // \83X\83L\83\93\82ð\93Ç\82Ý\8d\9e\82Ý\81A\92l\82ð\92u\8a·\82·\82é
+               function LoadFromSkin( fileName: string; ThreadItem: TThreadItem; SizeByte: Integer ): string;
+       // \83\8c\83X\82Ì\92l\82ð\92u\8a·\82·\82é
+               function SkinedRes( skin: string; Res: TResRec; No: string ): string;
+
                //Samba24\82Ì\83t\83@\83C\83\8b\82ª\91\8dÝ\82·\82é\82©\81B\91\8dÝ\82µ\82È\82¢\8fê\8d\87\81Adefault\83t\83@\83C\83\8b\82ðrename\82·\82é
                procedure SambaFileExists();
 
@@ -239,7 +253,7 @@ type
                function NotDateorTimeString(const AStr : string): boolean;
 
                //\88ø\90\94\82É\91\97\82ç\82ê\82Ä\82«\82½\93ú\95t/ID\95\94\82ÉBE\82Ì\95\8e\9a\97ñ\82ª\82 \82Á\82½\82ç\81A\83v\83\8d\83t\83@\83C\83\8b\82Ö\82Ì\83\8a\83\93\83N\82ð\92Ç\89Á
-//             function AddBeProfileLink(AID : string; ANum: Integer): string;
+               function AddBeProfileLink(AID : string; ANum: Integer): string;
                //\83o\81[\83W\83\87\83\93\8fî\95ñ\82Ì\8eæ\93¾
                function GetVersionInfo(KeyWord: TVerResourceKey): string;
                //Plugin\82Ì\8fî\95ñ\82Ì\8eæ\93¾
@@ -1027,7 +1041,879 @@ begin
        end;
 end;
 
+// \83X\83L\83\93\82ð\93Ç\82Ý\8d\9e\82Ý\81A\92l\82ð\92u\8a·\82·\82é
+function TGikoSys.LoadFromSkin(
+       fileName: string;
+       ThreadItem: TThreadItem;
+       SizeByte: Integer
+): string;
+var
+       Skin: TStringList;
+begin
+
+       Skin := TStringList.Create;
+       try
+               if FileExists( fileName ) then begin
+                       Skin.LoadFromFile( fileName );
+
+                       // \82â\82è\82©\82½\82ª\8bê\82µ\82¢\82¯\82Ç\81A\83I\83v\83V\83\87\83\93\83_\83C\83A\83\8d\83O\82Ì\83v\83\8c\83r\83\85\81[\97p try
+                       try
+                               if ThreadItem.ParentBoard <> nil then
+                                       if ThreadItem.ParentBoard.ParentCategory <> nil then
+                                               CustomStringReplace( Skin, '<BBSNAME/>', ThreadItem.ParentBoard.ParentCategory.ParenTBBS.Title);
+                                       CustomStringReplace( Skin, '<THREADURL/>', ThreadItem.URL);
+                       except end;
+                       CustomStringReplace( Skin, '<BOARDNAME/>', ThreadItem.ParentBoard.Title);
+                       CustomStringReplace( Skin, '<BOARDURL/>', ThreadItem.ParentBoard.URL);
+                       CustomStringReplace( Skin, '<THREADNAME/>', ThreadItem.Title);
+                       CustomStringReplace( Skin, '<SKINPATH/>', Setting.CSSFileName);
+                       CustomStringReplace( Skin, '<GETRESCOUNT/>', IntToStr( ThreadItem.Count - ThreadItem.NewResCount ));
+                                               CustomStringReplace( Skin, '<NEWRESCOUNT/>', IntToStr( ThreadItem.NewResCount ));
+                                               CustomStringReplace( Skin, '<ALLRESCOUNT/>', IntToStr( ThreadItem.Count ));
+
+                       CustomStringReplace( Skin, '<NEWDATE/>',FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate));
+                                               CustomStringReplace( Skin, '<SIZEKB/>', IntToStr( Floor( SizeByte / 1024 ) ));
+                                               CustomStringReplace( Skin, '<SIZE/>', IntToStr( SizeByte ));
+
+                       //----- \82Æ\82è\82 \82¦\82¸\82©\82¿\82ã\81`\82µ\82á\8cÝ\8a·\97p\81B\83R\83\81\83\93\83g\83A\83E\83g\82µ\82Ä\82à\82æ\82µ
+                       // \82â\82è\82©\82½\82ª\8bê\82µ\82¢\82¯\82Ç\81A\83I\83v\83V\83\87\83\93\83_\83C\83A\83\8d\83O\82Ì\83v\83\8c\83r\83\85\81[\97p try
+                       try
+                               if ThreadItem.ParentBoard <> nil then
+                                       if ThreadItem.ParentBoard.ParentCategory <> nil then
+                                               CustomStringReplace( Skin, '&BBSNAME', ThreadItem.ParentBoard.ParentCategory.ParenTBBS.Title);
+                                       CustomStringReplace( Skin, '&THREADURL', ThreadItem.URL);
+                       except end;
+                       CustomStringReplace( Skin, '&BOARDNAME', ThreadItem.ParentBoard.Title);
+                       CustomStringReplace( Skin, '&BOARDURL', ThreadItem.ParentBoard.URL);
+                       CustomStringReplace( Skin, '&THREADNAME', ThreadItem.Title);
+                       CustomStringReplace( Skin, '&SKINPATH', Setting.CSSFileName);
+                       CustomStringReplace( Skin, '&GETRESCOUNT', IntToStr( ThreadItem.NewReceive - 1 ));
+                       CustomStringReplace( Skin, '&NEWRESCOUNT', IntToStr( ThreadItem.NewResCount ));
+                       CustomStringReplace( Skin, '&ALLRESCOUNT', IntToStr( ThreadItem.AllResCount ));
+
+                       CustomStringReplace( Skin, '&NEWDATE', FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate));
+                       CustomStringReplace( Skin, '&SIZEKB', IntToStr( Floor( SizeByte / 1024 ) ));
+                       CustomStringReplace( Skin, '&SIZE', IntToStr( SizeByte ));
+                       //----- \82±\82±\82Ü\82Å
+               end;
+               Result := Skin.Text;
+       finally
+               Skin.Free;
+       end;
+end;
+
+// \83\8c\83X\82Ì\92l\82ð\92u\8a·\82·\82é
+function TGikoSys.SkinedRes(
+       skin: string;
+       Res: TResRec;
+       No: string
+): string;
+var
+       spamminess      : Extended;
+       wordCount               : TWordCount;
+begin
+
+       wordCount := TWordCount.Create;
+       try
+               spamminess := Floor( SpamParse(
+                       Res.FName + '<>' + Res.FMailTo + '<>' + Res.FBody, wordCount ) * 100 );
+
+               Skin := CustomStringReplace( Skin, '<NUMBER/>',
+                       '<a href="menu:' + No + '" name="' + No + '">' + No + '</a>');
+               Skin := CustomStringReplace( Skin, '<PLAINNUMBER/>', No);
+               Skin := CustomStringReplace( Skin, '<NAME/>', '<b>' + Res.FName + '</b>');
+               Skin := CustomStringReplace( Skin, '<MAILNAME/>',
+                       '<a href="mailto:' + Res.FMailTo + '"><b>' + Res.FName + '</b></a>');
+               Skin := CustomStringReplace( Skin, '<MAIL/>', Res.FMailTo);
+               Skin := CustomStringReplace( Skin, '<DATE/>', Res.FDateTime);
+               Skin := CustomStringReplace( Skin, '<MESSAGE/>', Res.FBody);
+               Skin := CustomStringReplace( Skin, '<SPAMMINESS/>', FloatToStr( spamminess ) );
+               Skin := CustomStringReplace( Skin, '<NONSPAMMINESS/>', FloatToStr( 100 - spamminess ) );
+
+               //----- \82©\82¿\82ã\81`\82µ\82á\8cÝ\8a·\97p\81B\83R\83\81\83\93\83g\83A\83E\83g\82µ\82Ä\82à\82æ\82µ
+               Skin := CustomStringReplace( Skin, '&NUMBER',
+                       '<a href="menu:' + No + '" name="' + No + '">' + No + '</a>');
+               Skin := CustomStringReplace( Skin, '&PLAINNUMBER', No);
+               Skin := CustomStringReplace( Skin, '&NAME', '<b>' + Res.FName + '</b>');
+               Skin := CustomStringReplace( Skin, '&MAILNAME',
+                       '<a href="mailto:' + Res.FMailTo + '"><b>' + Res.FName + '</b></a>');
+               Skin := CustomStringReplace( Skin, '&MAIL', Res.FMailTo);
+               Skin := CustomStringReplace( Skin, '&DATE', Res.FDateTime);
+               Skin := CustomStringReplace( Skin, '&MESSAGE', Res.FBody);
+               Skin := CustomStringReplace( Skin, '&SPAMMINESS', FloatToStr( spamminess ) );
+               Skin := CustomStringReplace( Skin, '&NONSPAMMINESS', FloatToStr( 100 - spamminess ) );
+               //----- \82±\82±\82Ü\82Å
+
+               Result := Skin;
+       finally
+               wordCount.Free;
+       end;
+
+end;
+
+procedure TGikoSys.CreateHTML2(doc: Variant; ThreadItem: TThreadItem; var sTitle: string);
+var
+       i: integer;
+       No: string;
+       //bufList : TStringList;
+       ReadList: TStringList;
+       SaveList: TStringList;
+       CSSFileName: string;
+       BBSID: string;
+       FileName: string;
+       NewReceiveNo: Integer;
+       Res: TResRec;
+       boardPlugIn : TBoardPlugIn;
+
+       UserOptionalStyle: string;
+       SkinHeader: string;
+       SkinNewRes: string;
+       SkinRes: string;
+
+       strTmp : string;
+//    threadURL : string;
+       function LoadSkin( fileName: string ): string;
+       begin
+               Result := LoadFromSkin( fileName, ThreadItem, ThreadItem.Size );
+       end;
+       function ReplaceRes( skin: string ): string;
+       begin
+               Result := SkinedRes( skin, Res, No );
+       end;
+begin
+       if ThreadItem <> nil then begin
+               //if ThreadItem.IsBoardPlugInAvailable then begin
+               if ThreadItem.ParentBoard.IsBoardPlugInAvailable then begin
+                       //===== \83v\83\89\83O\83C\83\93\82É\82æ\82é\95\\8e¦
+                       //boardPlugIn           := ThreadItem.BoardPlugIn;
+                       boardPlugIn             := ThreadItem.ParentBoard.BoardPlugIn;
+                       NewReceiveNo    := ThreadItem.NewReceive;
+                       // \83t\83H\83\93\83g\82â\83T\83C\83Y\82Ì\90Ý\92è
+                       UserOptionalStyle := SetUserOptionalStyle;
+                       SaveList := TStringList.Create;
+                       try
+                               doc.open;
+                               // \95\8e\9a\83R\81[\83h\82Í\83v\83\89\83O\83C\83\93\82É\94C\82¹\82é
+                               // doc.charset := 'Shift_JIS';
+
+                               // \83w\83b\83_
+                               SaveList.Add( boardPlugIn.GetHeader( DWORD( threadItem ),
+                                       '<style type="text/css">body {' + UserOptionalStyle + '}</style>' ) );
+
+                               SaveList.Add('<p id="idSearch"></p>');
+                               for i := 0 to threadItem.Count - 1 do begin
+                                       // 1 \82Í\95K\82¸\95\\8e¦
+                                       if i <> 0 then begin
+                                               // \95\\8e¦\94Í\88Í\82ð\8cÀ\92è
+                                               case ResRange of
+                                               Ord( grrKoko ):
+                                                       if ThreadItem.Kokomade > (i + 1) then
+                                                               Continue;
+                                               Ord( grrNew ):
+                                                       if NewReceiveNo > (i + 1) then
+                                                               Continue;
+                                               10..65535:
+                                                       if (threadItem.Count - i) > ResRange then
+                                                               Continue;
+                                               end;
+                                       end;
+
+                                       // \90V\92\85\83}\81[\83N
+                                       if (NewReceiveNo = (i + 1)) or ((NewReceiveNo = 0) and (i = 0)) then begin
+                                               try
+                                                       if GikoSys.Setting.UseSkin then begin
+                                                               if FileExists( GetSkinNewmarkFileName ) then
+                                                                       SaveList.Add( LoadSkin( GetSkinNewmarkFileName ) )
+                                                               else
+                                                                       SaveList.Add( '<a name="new"></a>' );
+                                                       end else if GikoSys.Setting.UseCSS then begin
+                                                               SaveList.Add('<a name="new"></a><div class="new">\90V\92\85\83\8c\83X <span class="newdate">' + FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate) + '</span></div>');
+                                                       end else begin
+                                                               SaveList.Add('</dl>');
+                                                               SaveList.Add('<a name="new"></a>');
+                                                               SaveList.Add('<table width="100%" bgcolor="#3333CC" cellpadding="0" cellspacing="1"><tr><td align="center" bgcolor="#6666FF" valign="middle"><font size="-1" color="#ffffff"><b>\90V\92\85\83\8c\83X ' + FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate) + '</b></font></td></tr></table>');
+                                                               SaveList.Add('<dl>');
+                                                       end;
+                                               except
+                                                       SaveList.Add( '<a name="new"></a>' );
+                                               end;
+                                       end;
+
+                                       // \83\8c\83X
+                                       SaveList.Add( boardPlugIn.GetRes( DWORD( threadItem ), i + 1 ) );
+
+                                       if ThreadItem.Kokomade = (i + 1) then begin
+                                               // \82±\82±\82Ü\82Å\93Ç\82ñ\82¾
+                                               try
+                                                       if GikoSys.Setting.UseSkin then begin
+                                                               if FileExists( GetSkinBookmarkFileName ) then
+                                                                       SaveList.Add( LoadSkin( GetSkinBookmarkFileName ) )
+                                                               else
+                                                                       SaveList.Add( '<a name="koko"></a>' );
+                                                       end else if GikoSys.Setting.UseCSS then begin
+                                                               SaveList.Add('<a name="koko"></a><div class="koko">\83R\83R\82Ü\82Å\93Ç\82ñ\82¾</div>');
+                                                       end else begin
+                                                               SaveList.Add('</dl>');
+                                                               SaveList.Add('<a name="koko"></a><table width="100%" bgcolor="#55AA55" cellpadding="0" cellspacing="1"><tr><td align="center" bgcolor="#77CC77" valign="middle"><font size="-1" color="#ffffff"><b>\83R\83R\82Ü\82Å\93Ç\82ñ\82¾</b></font></td></tr></table>');
+                                                               SaveList.Add('<dl>');
+                                                       end;
+                                               except
+                                                       SaveList.Add( '<a name="koko"></a>' );
+                                               end;
+                                       end;
+
+                                       doc.Write(SaveList.Text);
+                                       SaveList.Clear;
+                               end;
+
+
+                               // \83X\83L\83\93(\83t\83b\83^)
+                               SaveList.Add( boardPlugIn.GetFooter( DWORD( threadItem ), '<a name="bottom"></a>' ) );
+                               doc.Write(SaveList.Text);
+                       finally
+                               SaveList.Free;
+                               doc.Close;
+                       end;
+
+               //      Exit;
+               //end;
+               end else begin
+                       ShortDayNames[1] := '\93ú';               ShortDayNames[2] := '\8c\8e';
+                       ShortDayNames[3] := '\89Î';               ShortDayNames[4] := '\90\85';
+                       ShortDayNames[5] := '\96Ø';               ShortDayNames[6] := '\8bà';
+                       ShortDayNames[7] := '\93y';
+                       BBSID := ThreadItem.ParentBoard.BBSID;
+                       NewReceiveNo := ThreadItem.NewReceive;
+                       ReadList := TStringList.Create;
+
+                       try
+                               if ThreadItem.IsLogFile then begin
+                                       FileName := ThreadItem.GetThreadFileName;
+                                       ReadList.LoadFromFile(FileName);
+                                       FAbon.IndividualAbon(ReadList, ChangeFileExt(FileName,'.NG'));
+                                       FAbon.Execute(ReadList);                //       \82 \82Ú\81`\82ñ\82µ\82Ä
+                                       FSelectResFilter.Execute(ReadList); //\83\8c\83X\82Ì\83t\83B\83\8b\83^\83\8a\83\93\83O\82ð\82·\82é
+                                       if ThreadItem.Title = '' then begin
+                                               Res := DivideStrLine(ReadList[0]);
+                                               sTitle := Res.FTitle;
+                                       end else
+                                               sTitle := ThreadItem.Title
+                               end else begin
+                                       sTitle := CustomStringReplace(ThreadItem.Title, '\81\97\81M', ',');
+                               end;
+                               SaveList := TStringList.Create;
+                               //threadURL := CustomStringReplace(ThreadItem.URL, 'l50', '');
+                               try
+                                       doc.open;
+                                       doc.charset := 'Shift_JIS';
+
+                                       // \83t\83H\83\93\83g\82â\83T\83C\83Y\82Ì\90Ý\92è
+                                       UserOptionalStyle := SetUserOptionalStyle;
+                                       CSSFileName := GetStyleSheetDir + Setting.CSSFileName;
+                                       if GikoSys.Setting.UseSkin then begin
+                                               // \83X\83L\83\93\8eg\97p
+                                               // \83X\83L\83\93\82Ì\90Ý\92è
+                                               try
+                                                       SkinHeader := LoadSkin( GetSkinHeaderFileName );
+                                                       if Length( UserOptionalStyle ) > 0 then
+                                                               SkinHeader := CustomStringReplace( SkinHeader, '</head>',
+                                                                       '<style type="text/css">body {' + UserOptionalStyle + '}</style></head>');
+                                                       SaveList.Add( SkinHeader );
+                                               except
+                                               end;
+                                               try
+                                                       SkinNewRes := LoadSkin( GetSkinNewResFileName );
+                                               except
+                                                                               end;
+                                               try
+                                                       SkinRes := LoadSkin( GetSkinResFileName );
+                                               except
+                                               end;
+                                               SaveList.Add('<p id="idSearch"></p>');
+                                               SaveList.Add('<a name="top"></a>');
+
+                                               for i := 0 to ReadList.Count - 1 do begin
+                                                       // 1 \82Í\95K\82¸\95\\8e¦
+                                                       if i <> 0 then begin
+                                                               // \95\\8e¦\94Í\88Í\82ð\8cÀ\92è
+                                                               case ResRange of
+                                                               Ord( grrKoko ):
+                                                                       if ThreadItem.Kokomade > (i + 1) then
+                                                                               Continue;
+                                                               Ord( grrNew ):
+                                                                       if NewReceiveNo > (i + 1) then
+                                                                               Continue;
+                                                               10..65535:
+                                                                       if (threadItem.Count - i) > ResRange then
+                                                                               Continue;
+                                                               end;
+                                                       end;
+
+                                                       // \90V\92\85\83}\81[\83N
+                                                       if (NewReceiveNo = i + 1) or ((NewReceiveNo = 0) and (i = 0)) then begin
+                                                               try
+                                                                       if FileExists( GetSkinNewmarkFileName ) then
+                                                                               SaveList.Add( LoadSkin( GetSkinNewmarkFileName ) )
+                                                                       else
+                                                                               SaveList.Add( '<a name="new"></a>' );
+                                                               except
+                                                                       SaveList.Add( '<a name="new"></a>' );
+                                                               end;
+                                                       end;
+                                                       if (Trim(ReadList[i]) <> '') then begin
+                                                               No := IntToStr(i + 1);
+
+                                                               Res := DivideStrLine(ReadList[i]);
+                                                               Res.FBody := ConvRes(AddAnchorTag(Res.FBody), ThreadItem.ParentBoard.BBSID, ChangeFileExt(ThreadItem.FileName, ''), 'bbs', 'key', 'st', 'to', 'nofirst', 'true');
+                                                               Res.FDateTime := AddBeProfileLink(Res.FDateTime, i + 1);
+                                                               try
+                                                                       if NewReceiveNo <= (i + 1) then
+                                                                               // \90V\92\85\83\8c\83X
+                                                                               strTmp := ReplaceRes( SkinNewRes )
+                                                                       else
+                                                                               // \92Ê\8fí\82Ì\83\8c\83X
+                                                                               strTmp := ReplaceRes( SkinRes );
+
+                                                                       SaveList.Add( strTmp );
+                                                               except
+                                                               end;
+                                                       end;
+
+                                                       if ThreadItem.Kokomade = (i + 1) then begin
+                                                               // \82±\82±\82Ü\82Å\93Ç\82ñ\82¾
+                                                               try
+                                                                       if FileExists( GetSkinBookmarkFileName ) then
+                                                                               SaveList.Add( LoadSkin( GetSkinBookmarkFileName ) )
+                                                                       else
+                                                                               SaveList.Add( '<a name="koko"></a>' );
+                                                               except
+                                                                       SaveList.Add( '<a name="koko"></a>' );
+                                                               end;
+                                                       end;
+                                                       doc.Write(SaveList.Text);
+                                                       SaveList.Clear;
+                                               end;
+                                               SaveList.Add('<a name="bottom"></a>');
+                                               // \83X\83L\83\93(\83t\83b\83^)
+                                               try
+                                                       SaveList.Add( LoadSkin( GetSkinFooterFileName ) );
+                                               except
+                                               end;
+                                               doc.Write(SaveList.Text);
+                                       end else if GikoSys.Setting.UseCSS and FileExists(CSSFileName) then begin
+                                               //CSS\8eg\97p
+                                               //CSSFileName := GetAppDir + CSS_FILE_NAME;
+               //                              SaveList.Add('<html lang="ja"><head>');
+                                               SaveList.Add('<html><head>');
+                                               SaveList.Add('<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">');
+                                               SaveList.Add('<title>' + sTitle + '</title>');
+                                               SaveList.Add('<link rel="stylesheet" href="'+CSSFileName+'" type="text/css">');
+                                               if Length( UserOptionalStyle ) > 0 then
+                                                       SaveList.Add('<style type="text/css">body {' + UserOptionalStyle + '}</style>');
+                                               SaveList.Add('</head>');
+                                               SaveList.Add('<body>');
+                                               SaveList.Add('<a name="top"></a>');
+                                               SaveList.Add('<p id="idSearch"></p>');
+                                               SaveList.Add('<div class="title">' + sTitle + '</div>');
+                                               doc.Write(SaveList.Text);
+                                               SaveList.Clear;
+                                               //Application.ProcessMessages;
+                                               for i := 0 to ReadList.Count - 1 do begin
+                                                       // 1 \82Í\95K\82¸\95\\8e¦
+                                                       if i <> 0 then begin
+                                                               // \95\\8e¦\94Í\88Í\82ð\8cÀ\92è
+                                                               case ResRange of
+                                                               Ord( grrKoko ):
+                                                                       if ThreadItem.Kokomade > (i + 1) then
+                                                                               Continue;
+                                                               Ord( grrNew ):
+                                                                       if NewReceiveNo > (i + 1) then
+                                                                               Continue;
+                                                               10..65535:
+                                                                       if (threadItem.Count - i) > ResRange then
+                                                                               Continue;
+                                                               end;
+                                                       end;
+
+                                                       if (NewReceiveNo = (i + 1)) or ((NewReceiveNo = 0) and (i = 0)) then begin
+                                                               SaveList.Add('<a name="new"></a><div class="new">\90V\92\85\83\8c\83X <span class="newdate">' + FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate) + '</span></div>');
+                                                       end;
+                                                       if (Trim(ReadList[i]) <> '') then begin
+                                                               No := IntToStr(i + 1);
+                                                               Res := DivideStrLine(ReadList[i]);
+                                                               Res.FBody := ConvRes(AddAnchorTag(Res.FBody), ThreadItem.ParentBoard.BBSID, ChangeFileExt(ThreadItem.FileName, ''), 'bbs', 'key', 'st', 'to', 'nofirst', 'true');
+                                Res.FDateTime := AddBeProfileLink(Res.FDateTime, i + 1);
+                                                               if Res.FMailTo = '' then
+                                                                       SaveList.Add('<a name="' + No + '"></a>'
+                                                                                                       + '<div class="header"><span class="no"><a href="menu:' + No + '">' + No + '</a></span> '
+                                                                                                       + '<span class="name_label">\96¼\91O\81F</span> '
+                                                                                                       + '<span class="name"><b>' + Res.FName + '</b></span> '
+                                                                                                       + '<span class="date_label">\93\8a\8de\93ú\81F</span> '
+                                                                                                       + '<span class="date">' + Res.FDateTime+ '</span></div>'
+                                                                                                                                                                                               + '<div class="mes">' + Res.FBody + ' </div>')
+                                                               else if GikoSys.Setting.ShowMail then
+                                                                       SaveList.Add('<a name="' + No + '"></a>'
+                                                                                                       + '<div class="header"><span class="no"><a href="menu:' + No + '">' + No + '</a></span>'
+                                                                                                                                                                                               + '<span class="name_label"> \96¼\91O\81F </span>'
+                                                                                                       + '<a class="name_mail" href="mailto:' + Res.FMailTo + '">'
+                                                                                                       + '<b>' + Res.FName + '</b></a><span class="mail"> [' + Res.FMailTo + ']</span>'
+                                                                                                       + '<span class="date_label"> \93\8a\8de\93ú\81F</span>'
+                                                                                                       + '<span class="date"> ' + Res.FDateTime+ '</span></div>'
+                                                                                                       + '<div class="mes">' + Res.FBody + ' </div>')
+                                                               else
+                                                                       SaveList.Add('<a name="' + No + '"></a>'
+                                                                                                       + '<div class="header"><span class="no"><a href="menu:' + No + '">' + No + '</a></span>'
+                                                                                                       + '<span class="name_label"> \96¼\91O\81F </span>'
+                                                                                                       + '<a class="name_mail" href="mailto:' + Res.FMailTo + '">'
+                                                                                                       + '<b>' + Res.FName + '</b></a>'
+                                                                                                       + '<span class="date_label"> \93\8a\8de\93ú\81F</span>'
+                                                                                                       + '<span class="date"> ' + Res.FDateTime+ '</span></div>'
+                                                                                                                                                                                               + '<div class="mes">' + Res.FBody + ' </div>');
+                                                       end;
+                                                       if ThreadItem.Kokomade = (i + 1) then begin
+                                                               SaveList.Add('<a name="koko"></a><div class="koko">\83R\83R\82Ü\82Å\93Ç\82ñ\82¾</div>');
+                                                       end;
+
+                                                       doc.Write(SaveList.Text);
+                                                       SaveList.Clear;
+                                               end;
+                                               SaveList.Add('<a name="bottom"></a>');
+                                               //SaveList.Add('</body></html>');
+                                               SaveList.Add('<a name="last"></a>');
+                                               SaveList.Add('</body></html>');
+                                               doc.Write(SaveList.Text);
+                                       end else begin
+                                               //CSS\94ñ\8eg\97p
+               //                              SaveList.Add('<html lang="ja"><head>');
+                                               SaveList.Add('<html><head>');
+                                               SaveList.Add('<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">');
+                                               SaveList.Add('<title>' + sTitle + '</title></head>');
+                                               SaveList.Add('<body TEXT="#000000" BGCOLOR="#EFEFEF" link="#0000FF" alink="#FF0000" vlink="#660099">');
+                                               SaveList.Add('<a name="top"></a>');
+                                               SaveList.Add('<font size=+1 color="#FF0000">' + sTitle + '</font>');
+                                               SaveList.Add('<dl>');
+                                               SaveList.Add('<p id="idSearch"></p>');
+                                               doc.Write(SaveList.Text);
+                                               SaveList.Clear;
+                                               //Application.ProcessMessages;
+                                               for i := 0 to ReadList.Count - 1 do begin
+                                                       // 1 \82Í\95K\82¸\95\\8e¦
+                                                       if i <> 0 then begin
+                                                               // \95\\8e¦\94Í\88Í\82ð\8cÀ\92è
+                                                               case ResRange of
+                                                               Ord( grrKoko ):
+                                                                       if ThreadItem.Kokomade > (i + 1) then
+                                                                               Continue;
+                                                               Ord( grrNew ):
+                                                                       if NewReceiveNo > (i + 1) then
+                                                                               Continue;
+                                                               10..65535:
+                                                                       if (threadItem.Count - i) > ResRange then
+                                                                               Continue;
+                                                               end;
+                                                       end;
+
+                                                       if (NewReceiveNo = (i + 1)) or ((NewReceiveNo = 0) and (i = 0)) then begin
+                                                               SaveList.Add('</dl>');
+                                                               SaveList.Add('<a name="new"></a>');
+                                                               SaveList.Add('<table width="100%" bgcolor="#3333CC" cellpadding="0" cellspacing="1"><tr><td align="center" bgcolor="#6666FF" valign="middle"><font size="-1" color="#ffffff"><b>\90V\92\85\83\8c\83X ' + FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate) + '</b></font></td></tr></table>');
+                                                               SaveList.Add('<dl>');
+                                                       end;
+                                                       if (Trim(ReadList[i]) <> '') then begin
+                                                               No := IntToStr(i + 1);
+                                                               Res := DivideStrLine(ReadList[i]);
+                                                               Res.FBody := ConvRes(AddAnchorTag(Res.FBody), ThreadItem.ParentBoard.BBSID, ChangeFileExt(ThreadItem.FileName, ''), 'bbs', 'key', 'st', 'to', 'nofirst', 'true');
+                                Res.FDateTime := AddBeProfileLink(Res.FDateTime, i + 1);
+                                                               if Res.FMailTo = '' then
+                                                                       SaveList.Add('<a name="' + No + '"></a><dt><a href="menu:' + No + '">' + No + '</a> \96¼\91O\81F<font color="forestgreen"><b> ' + Res.FName + ' </b></font> \93\8a\8de\93ú\81F <span class="date">' + Res.FDateTime+ '</span><br><dd>' + Res.Fbody + ' <br><br><br>')
+                                                               else if GikoSys.Setting.ShowMail then
+                                                                       SaveList.Add('<a name="' + No + '"></a><dt><a href="menu:' + No + '">' + No + '</a> \96¼\91O\81F<a href="mailto:' + Res.FMailTo + '"><b> ' + Res.FName + ' </B></a> [' + Res.FMailTo + '] \93\8a\8de\93ú\81F <span class="date">' + Res.FDateTime+ '</span><br><dd>' + Res.Fbody + ' <br><br><br>')
+                                                               else
+                                                                       SaveList.Add('<a name="' + No + '"></a><dt><a href="menu:' + No + '">' + No + '</a> \96¼\91O\81F<a href="mailto:' + Res.FMailTo + '"><b> ' + Res.FName + ' </B></a> \93\8a\8de\93ú\81F <span class="date">' + Res.FDateTime+ '</span><br><dd>' + Res.Fbody + ' <br><br><br>');
+                                                       end;
+                                                       if ThreadItem.Kokomade = (i + 1) then begin
+                                                               SaveList.Add('</dl>');
+                                                               SaveList.Add('<a name="koko"></a><table width="100%" bgcolor="#55AA55" cellpadding="0" cellspacing="1"><tr><td align="center" bgcolor="#77CC77" valign="middle"><font size="-1" color="#ffffff"><b>\83R\83R\82Ü\82Å\93Ç\82ñ\82¾</b></font></td></tr></table>');
+                                                               SaveList.Add('<dl>');
+                                                       end;
+                                                       doc.Write(SaveList.Text);
+                                                       SaveList.Clear;
+                                               end;
+                                               SaveList.Add('</dl>');
+                                               SaveList.Add('<a name="bottom"></a>');
+                                               SaveList.Add('</body></html>');
+                                               doc.Write(SaveList.Text);
+                                       end;
+                               finally
+                                       SaveList.Free;
+                                       doc.Close;
+                               end;
+                       finally
+                               ReadList.Free;
+                       end;
+               end;
+       end;
+end;
+procedure TGikoSys.CreateHTML3(var html: TStringList; ThreadItem: TThreadItem; var sTitle: string);
+var
+       i: integer;
+       No: string;
+       //bufList : TStringList;
+       ReadList: TStringList;
+//     SaveList: TStringList;
+       CSSFileName: string;
+       BBSID: string;
+       FileName: string;
+       Res: TResRec;
+       boardPlugIn : TBoardPlugIn;
+
+       UserOptionalStyle: string;
+       SkinHeader: string;
+       SkinRes: string;
+       tmp, tmp1: string;
+       function LoadSkin( fileName: string ): string;
+       begin
+               Result := LoadFromSkin( fileName, ThreadItem, ThreadItem.Size );
+       end;
+       function ReplaceRes( skin: string ): string;
+       begin
+               Result := SkinedRes( skin, Res, No );
+       end;
+
+begin
+       if ThreadItem <> nil then begin
+               CSSFileName := GetStyleSheetDir + Setting.CSSFileName;
+               html.Clear;
+               html.BeginUpdate;
+               //if ThreadItem.IsBoardPlugInAvailable then begin
+        if ThreadItem.ParentBoard.IsBoardPlugInAvailable then begin
+                       //===== \83v\83\89\83O\83C\83\93\82É\82æ\82é\95\\8e¦
+                       //boardPlugIn           := ThreadItem.BoardPlugIn;
+            boardPlugIn                := ThreadItem.ParentBoard.BoardPlugIn;
+                       // \83t\83H\83\93\83g\82â\83T\83C\83Y\82Ì\90Ý\92è
+                       UserOptionalStyle := SetUserOptionalStyle;
+                       try
+                               // \95\8e\9a\83R\81[\83h\82Í\83v\83\89\83O\83C\83\93\82É\94C\82¹\82é
+                               // \83w\83b\83_
+                               tmp := boardPlugIn.GetHeader( DWORD( threadItem ),
+                                       '<style type="text/css">body {' + UserOptionalStyle + '}</style>' );
+                               //\90â\91Î\8eQ\8fÆ\82©\82ç\91\8a\91Î\8eQ\8fÆ\82Ö
+                               if Setting.UseSkin then begin
+                                       tmp1 := './' +Setting.CSSFileName;
+                                       tmp1 := CustomStringReplace(tmp1, GetConfigDir, '');
+                                       tmp1 := CustomStringReplace(tmp1, '\', '/');
+                                       tmp := CustomStringReplace(tmp, ExtractFilePath(Setting.CSSFileName),  tmp1);
+                               end else if Setting.UseCSS then begin
+                                       tmp1 := './' + CSSFileName;
+                                       tmp1 := CustomStringReplace(tmp1, GetConfigDir, '');
+                                       tmp1 := CustomStringReplace(tmp1, '\', '/');
+                                       tmp := CustomStringReplace(tmp, CSSFileName,  tmp1);
+                               end;
+                               html.Append( tmp );
+
+                               for i := 0 to threadItem.Count - 1 do begin
+
+                                       // \83\8c\83X
+                                       html.Append( ConvertResAnchor(boardPlugIn.GetRes( DWORD( threadItem ), i + 1 )) );
+
+                               end;
+                               // \83X\83L\83\93(\83t\83b\83^)
+                               html.Append( boardPlugIn.GetFooter( DWORD( threadItem ), '<a name="bottom"></a>' ) );
+                       finally
+                       end;
+                       html.EndUpdate;
+                       //Exit;
+               end else begin
+                       ShortDayNames[1] := '\93ú';               ShortDayNames[2] := '\8c\8e';
+                       ShortDayNames[3] := '\89Î';               ShortDayNames[4] := '\90\85';
+                       ShortDayNames[5] := '\96Ø';               ShortDayNames[6] := '\8bà';
+                       ShortDayNames[7] := '\93y';
+                       BBSID := ThreadItem.ParentBoard.BBSID;
+                       ReadList := TStringList.Create;
+                       try
+                               if ThreadItem.IsLogFile then begin
+                                       FileName := ThreadItem.GetThreadFileName;
+                                       ReadList.LoadFromFile(FileName);
+                                       FAbon.IndividualAbon(ReadList, ChangeFileExt(FileName,'.NG'));
+                                       FAbon.Execute(ReadList);                //       \82 \82Ú\81`\82ñ\82µ\82Ä
+                                       FSelectResFilter.Execute(ReadList); //\83\8c\83X\82Ì\83t\83B\83\8b\83^\83\8a\83\93\83O\82ð\82·\82é
+                                       Res := DivideStrLine(ReadList[0]);
+                                       //Res.FTitle := CustomStringReplace(Res.FTitle, '\81\97\81M', ',');
+                                       sTitle := Res.FTitle;
+                               end else begin
+                                       sTitle := CustomStringReplace(ThreadItem.Title, '\81\97\81M', ',');
+                               end;
+                               try
+                                       // \83t\83H\83\93\83g\82â\83T\83C\83Y\82Ì\90Ý\92è
+                                       UserOptionalStyle := SetUserOptionalStyle;
+
+                                       if GikoSys.Setting.UseSkin then begin
+                                               // \83X\83L\83\93\8eg\97p
+                                               // \83X\83L\83\93\82Ì\90Ý\92è
+                                               try
+                                                       SkinHeader := LoadSkin( GetSkinHeaderFileName );
+                                                       if Length( UserOptionalStyle ) > 0 then
+                                                               SkinHeader := CustomStringReplace( SkinHeader, '</head>',
+                                                                       '<style type="text/css">body {' + UserOptionalStyle + '}</style></head>');
+                                                       //\90â\91Î\8eQ\8fÆ\82©\82ç\91\8a\91Î\8eQ\8fÆ\82Ö
+                                                       tmp1 := './' +Setting.CSSFileName;
+                                                       tmp1 := CustomStringReplace(tmp1, GetConfigDir, '');
+                                                       tmp1 := CustomStringReplace(tmp1, '\', '/');
+                                                       SkinHeader := CustomStringReplace(SkinHeader, ExtractFilePath(Setting.CSSFileName),  tmp1);
+                                                       html.Append( SkinHeader );
+                                               except
+                                               end;
+                                               try
+                                                       SkinRes := LoadSkin( GetSkinResFileName );
+                                               except
+                                               end;
+                                               html.Append('<a name="top"></a>');
+                                               for i := 0 to ReadList.Count - 1 do begin
+                                                       if (Trim(ReadList[i]) <> '') then begin
+                                                               No := IntToStr(i + 1);
+
+                                                               Res := DivideStrLine(ReadList[i]);
+                                                               Res.FBody := AddAnchorTag(Res.FBody);
+                                                               Res.FBody := ConvertResAnchor(ConvRes(Res.FBody, ThreadItem.ParentBoard.BBSID, ChangeFileExt(ThreadItem.FileName, ''), 'bbs', 'key', 'st', 'to', 'nofirst', 'true', true));
+
+                                                               try
+                                                                       html.Append( ReplaceRes( SkinRes ) );
+                                                               except
+                                                               end;
+                                                       end;
+
+                                               end;
+                                               html.Append('<a name="bottom"></a>');
+                                               // \83X\83L\83\93(\83t\83b\83^)
+                                               try
+                                                       html.Append( LoadSkin( GetSkinFooterFileName ) );
+                                               except
+                                               end;
+                                       end else if GikoSys.Setting.UseCSS and FileExists(CSSFileName) then begin
+                                               //CSS\8eg\97p
+                                               //CSSFileName := GetAppDir + CSS_FILE_NAME;
+                                               html.Append('<html><head>');
+                                               html.Append('<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">');
+                                               html.Append('<title>' + sTitle + '</title>');
+                                               //\90â\91Î\8eQ\8fÆ\82©\82ç\91\8a\91Î\8eQ\8fÆ\82Ö
+                                               tmp1 := './' + CSSFileName;
+                                               tmp1 := CustomStringReplace(tmp1, GetConfigDir, '');
+                                               tmp1 := CustomStringReplace(tmp1, '\', '/');
+
+                                               html.Append('<link rel="stylesheet" href="'+tmp1+'" type="text/css">');
+                                               if Length( UserOptionalStyle ) > 0 then
+                                                       html.Append('<style type="text/css">body {' + UserOptionalStyle + '}</style>');
+                                               html.Append('</head>');
+                                               html.Append('<body>');
+                                               html.Append('<a name="top"></a>');
+                                               html.Append('<div class="title">' + sTitle + '</div>');
+                                               for i := 0 to ReadList.Count - 1 do begin
+                                                       if (Trim(ReadList[i]) <> '') then begin
+                                                               No := IntToStr(i + 1);
+                                                               Res := DivideStrLine(ReadList[i]);
+                                                               Res.FBody := AddAnchorTag(Res.FBody);
+                                                               Res.FBody := ConvertResAnchor(ConvRes(Res.FBody, ThreadItem.ParentBoard.BBSID, ChangeFileExt(ThreadItem.FileName, ''), 'bbs', 'key', 'st', 'to', 'nofirst', 'true', true));
+                                                               if Res.FMailTo = '' then
+                                                                       html.Append('<a name="' + No + '"></a>'
+                                                                                                       + '<div class="header"><span class="no"><a href="menu:' + No + '">' + No + '</a></span> '
+                                                                                                       + '<span class="name_label">\96¼\91O\81F</span> '
+                                                                                                       + '<span class="name"><b>' + Res.FName + '</b></span> '
+                                                                                                       + '<span class="date_label">\93\8a\8de\93ú\81F</span> '
+                                                                                                       + '<span class="date">' + Res.FDateTime+ '</span></div>'
+                                                                                                                                                                                               + '<div class="mes">' + Res.FBody + ' </div>')
+                                                               else if GikoSys.Setting.ShowMail then
+                                                                       html.Append('<a name="' + No + '"></a>'
+                                                                                                       + '<div class="header"><span class="no"><a href="menu:' + No + '">' + No + '</a></span>'
+                                                                                                                                                                                               + '<span class="name_label"> \96¼\91O\81F </span>'
+                                                                                                       + '<a class="name_mail" href="mailto:' + Res.FMailTo + '">'
+                                                                                                       + '<b>' + Res.FName + '</b></a><span class="mail"> [' + Res.FMailTo + ']</span>'
+                                                                                                       + '<span class="date_label"> \93\8a\8de\93ú\81F</span>'
+                                                                                                       + '<span class="date"> ' + Res.FDateTime+ '</span></div>'
+                                                                                                       + '<div class="mes">' + Res.FBody + ' </div>')
+                                                               else
+                                                                       html.Append('<a name="' + No + '"></a>'
+                                                                                                       + '<div class="header"><span class="no"><a href="menu:' + No + '">' + No + '</a></span>'
+                                                                                                       + '<span class="name_label"> \96¼\91O\81F </span>'
+                                                                                                       + '<a class="name_mail" href="mailto:' + Res.FMailTo + '">'
+                                                                                                       + '<b>' + Res.FName + '</b></a>'
+                                                                                                       + '<span class="date_label"> \93\8a\8de\93ú\81F</span>'
+                                                                                                       + '<span class="date"> ' + Res.FDateTime+ '</span></div>'
+                                                                                                                                                                                               + '<div class="mes">' + Res.FBody + ' </div>');
+                                                       end;
+                                               end;
+                                               html.Append('<a name="bottom"></a>');
+                                               html.Append('<a name="last"></a>');
+                                               html.Append('</body></html>');
+                                       end else begin
+                                               //CSS\94ñ\8eg\97p
+                                               html.Append('<html><head>');
+                                               html.Append('<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">');
+                                               html.Append('<title>' + sTitle + '</title></head>');
+                                               html.Append('<body TEXT="#000000" BGCOLOR="#EFEFEF" link="#0000FF" alink="#FF0000" vlink="#660099">');
+                                               html.Append('<a name="top"></a>');
+                                               html.Append('<font size=+1 color="#FF0000">' + sTitle + '</font>');
+                                               html.Append('<dl>');
+                                               for i := 0 to ReadList.Count - 1 do begin
+                                                       if (Trim(ReadList[i]) <> '') then begin
+                                                               No := IntToStr(i + 1);
+                                                               Res := DivideStrLine(ReadList[i]);
+                                                               Res.FBody := AddAnchorTag(Res.FBody);
+                                                               Res.FBody := ConvertResAnchor(ConvRes(Res.FBody, ThreadItem.ParentBoard.BBSID, ChangeFileExt(ThreadItem.FileName, ''), 'bbs', 'key', 'st', 'to', 'nofirst', 'true', true));
+                                                               if Res.FMailTo = '' then
+                                                                       html.Append('<a name="' + No + '"></a><dt><a href="menu:' + No + '">' + No + '</a> \96¼\91O\81F<font color="forestgreen"><b> ' + Res.FName + ' </b></font> \93\8a\8de\93ú\81F ' + Res.FDateTime+ '<br><dd>' + Res.Fbody + ' <br><br><br>')
+                                                               else if GikoSys.Setting.ShowMail then
+                                                                       html.Append('<a name="' + No + '"></a><dt><a href="menu:' + No + '">' + No + '</a> \96¼\91O\81F<a href="mailto:' + Res.FMailTo + '"><b> ' + Res.FName + ' </B></a> [' + Res.FMailTo + '] \93\8a\8de\93ú\81F ' + Res.FDateTime+ '<br><dd>' + Res.Fbody + ' <br><br><br>')
+                                                               else
+                                                                       html.Append('<a name="' + No + '"></a><dt><a href="menu:' + No + '">' + No + '</a> \96¼\91O\81F<a href="mailto:' + Res.FMailTo + '"><b> ' + Res.FName + ' </B></a> \93\8a\8de\93ú\81F ' + Res.FDateTime+ '<br><dd>' + Res.Fbody + ' <br><br><br>');
+                                                       end;
+                                               end;
+                                               html.Append('</dl>');
+                                               html.Append('<a name="bottom"></a>');
+                                               html.Append('</body></html>');
+                                       end;
+                               finally
+                                       html.EndUpdate;
+                               end;
+                       finally
+                               ReadList.Free;
+                       end;
+               end;
+       end;
+end;
+function TGikoSys.ConvertResAnchor(res: string): string;
+const
+       _HEAD : string = '<a href="../';
+       _TAIL : string = ' target="_blank">';
+       _ST: string = '&st=';
+       _TO: string = '&to=';
+       _STA: string = '&START=';
+       _END: string = '&END=';
+var
+       i, j, k: Integer;
+       tmp: string;
+begin
+       Result := '';
+       i := AnsiPos(_HEAD, res);
+       while i <> 0 do begin
+               Result := Result + Copy(res, 1, i -1);
+               Delete(res, 1, i - 1);
+               j := AnsiPos(_TAIL, res);
+               if j = 0 then begin
+                       Result := Result + res;
+                       Exit;
+               end;
+               tmp := Copy(res, 1, j - 1);
+               Delete(res, 1, j + 16);
+               if (AnsiPos(_ST, tmp) <> 0) and (AnsiPos(_TO, tmp) <> 0) then begin
+                       Delete(tmp, 1, AnsiPos(_ST, tmp) + 3);
+                       Delete(tmp, AnsiPos(_TO, tmp), Length(tmp));
+                       Result := Result + '<a href="#' + tmp + '">';
+               end else if (AnsiPos(_STA, tmp) <> 0) and (AnsiPos(_END, tmp) <> 0) then begin
+                       Delete(tmp, 1, AnsiPos(_STA, tmp) + 6);
+                       Delete(tmp, AnsiPos(_END, tmp), Length(tmp));
+                       Result := Result + '<a href="#' + tmp + '">';
+               end else begin
+                       k := LastDelimiter('/', tmp);
+                       Delete(tmp, 1, k);
+                       if AnsiPos('-', tmp) < AnsiPos('"', tmp) then
+                               Delete(tmp, AnsiPos('-', tmp), Length(tmp))
+                       else
+                               Delete(tmp, AnsiPos('"', tmp), Length(tmp));
+
+                       Result := Result + '<a href="#' + tmp + '">';
+               end;
+               i := AnsiPos(_HEAD, res);
+       end;
+       Result := Result + res;
 
+end;
+
+(*************************************************************************
+ *http://\82Ì\95\8e\9a\97ñ\82ðanchor\83^\83O\95t\82«\82É\82·\82é\81B
+ *************************************************************************)
+function TGikoSys.AddAnchorTag(s: string): string;
+const
+       URL_CHAR: string = '0123456789'
+                                                                        + 'abcdefghijklmnopqrstuvwxyz'
+                                                                        + 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+                                                                        + '#$%&()*+,-./:;=?@[]^_`{|}~!''\';
+       ANCHOR_REF      = 'href=';
+       RES_REF                 = '&gt;&gt;';
+       REF_MARK: array[0..9] of string = ('http://', 'ttp://', 'tp://',
+                                                                        'ms-help://','p://', 'https://',
+                                                                        'www.', 'ftp://','news://','rtsp://');
+
+var
+//     wkIdx: array[0..9] of Integer;
+       url: string;
+       href: string;
+       i, j, b: Integer;
+       tmp: Integer;
+       idx, idx2: Integer;
+       anchorLen : Integer;
+       pp, pe : PChar;
+       pURLCHARs : PChar;
+       pURLCHARe : PChar;
+begin
+       Result := '';
+       // + 3 \82Í 'href="' ('"'\82Â\82«)\82È\82Ç\82Ì\83o\83\8a\83G\81[\83V\83\87\83\93\82É\97]\97T\82ð\8e\9d\82½\82¹\82é\82½\82ß
+       anchorLen := Length( ANCHOR_REF ) + 3;
+       pURLCHARs := PChar(URL_CHAR);
+       pURLCHARe := pURLCHARs + Length(URL_CHAR);
+       while True do begin
+               idx  := MaxInt;
+               idx2 := MaxInt;
+               for j := 0 to 9 do begin
+                       tmp :=  AnsiPos(REF_MARK[j], s);
+                       if tmp <> 0 then idx := Min(tmp, idx);
+                       if idx = tmp then idx2 := j;   //\82Ç\82Ì\83}\81[\83N\82Å\88ø\82Á\82©\82©\82Á\82½\82©\82ð\95Û\91
+               end;
+               if idx = MaxInt then begin
+                       //\83\8a\83\93\83N\82ª\96³\82¢\82æ\81B
+                       Result := Result + s;
+                       Break;
+               end;
+
+               if (idx > 1) and
+                       (Pos( ANCHOR_REF, Copy(s, idx - anchorLen, anchorLen ) ) > 0) then begin
+                       //\8aù\82É\83\8a\83\93\83N\83^\83O\82ª\82Â\82¢\82Ä\82¢\82é\82Á\82Û\82¢\82Æ\82«\82Í\83\80\83V
+                       href := Copy( s, idx, Length( s ) );
+                       Result := Result + Copy( s, 1, idx + Pos( '</a>', href ) + Length( '</a>' ) - 2 );
+                       s := href;
+                       s := Copy( s, Pos( '</a>', s ) + Length( '</a>' ), Length( s ) );
+
+                       Continue;
+               end;
+
+               Result := Result + Copy(s, 1, idx - 1);
+
+               Delete(s, 1, idx - 1);
+               b := Length( s ) + 1;
+               pp      := PChar(s);
+               for i := 1 to b do begin
+                       pe := AnsiStrPosEx(pURLCHARs, pURLCHARe, pp, pp + 1);
+
+                       if pe = nil then begin
+                               //URL\82\82á\82È\82¢\95\8e\9a\94­\8c©\81I\82Æ\82©\81A\95\8e\9a\82ª\82È\82­\82È\82Á\82½\81B
+                               url := Copy(s, 1, i - 1);
+                               case idx2 of
+                                       1 : href := 'h' + url;
+                                       2 : href := 'ht' + url;
+                                       4 : href := 'htt' + url;
+                                       6 : href := 'http://' + url;
+                               else
+                                       href := url;
+                end;
+
+                               Result := Result + '<a href="' + href + '" target="_blank">' + url + '</a>';
+                               Delete(s, 1, i - 1);
+                               Break;
+                       end;
+            //\88ê\95\8e\9a\90i\82ß\82é\81B
+                       Inc(pp);
+               end;
+       end;
+end;
 
 (*************************************************************************
  *\83T\83u\83W\83F\83N\83g\88ê\8ds\82ð\95ª\8a\84
@@ -1072,6 +1958,39 @@ begin
        end;
 end;
 
+(*************************************************************************
+ * dat\83t\83@\83C\83\8b\82Ì\88ê\83\89\83C\83\93\82ð\95ª\89ð
+ *************************************************************************)
+function TGikoSys.DivideStrLine(Line: string): TResRec;
+var
+       Delim: string;
+begin
+       if AnsiPos('<>', Line) = 0 then begin
+               //Delim := ',';
+               //Result.FType := glt2chOld;
+        Line := CustomStringReplace(Line, '<>', '&lt;&gt;');
+               Line := CustomStringReplace(Line, ',', '<>');
+               Line := CustomStringReplace(Line, '\81\97\81M', ',');
+       end;
+       Delim := '<>';
+       Result.FType := glt2chNew;
+       //Trim\82µ\82Ä\82Í\82¢\82¯\82È\82¢\8bC\82ª\82·\82é\81@by\82à\82\82ã
+       Result.FName := RemoveToken(Line, Delim);
+       Result.FMailTo := RemoveToken(Line, Delim);
+       Result.FDateTime := RemoveToken(Line, Delim);
+       Result.FBody := RemoveToken(Line, Delim);
+       //\8bó\82¾\82Æ\96â\91è\82ª\8bN\82«\82é\82©\82ç\81A\8bó\94\92\82ð\90Ý\92è\82·\82é
+       if Result.FBody = '' then begin
+               Result.FBody := '&nbsp;';
+       end else if ( Result.FBody[1] = ' ' ) then begin
+               //\82Q\82¿\82á\82ñ\82Ë\82é\82Æ\82©\82¾\82Æ\81A\96{\95\82Ì\90æ\93ª\82É\82P\82Â\94¼\8ap\8bó\94\92\82ª\93ü\82Á\82Ä\82¢\82é\82Ì\82Å\8dí\8f\9c\82·\82é
+               //\91¼\82Ì\8cf\8e¦\94Â\82Å\81A\83\8c\83X\8e©\91Ì\82Ì\8bó\94\92\82©\82à\82µ\82ê\82È\82¢\82¯\82Ç\82»\82ê\82Í\92ú\82ß\82é
+               Delete(Result.FBody, 1, 1);
+       end;
+       //Result.FTitle := Trim(RemoveToken(Line, Delim));
+       Result.FTitle := RemoveToken(Line, Delim);
+
+end;
 
 (*************************************************************************
  * URL\82©\82çBBSID\82ð\8eæ\93¾
@@ -1277,6 +2196,21 @@ begin
                Font.Style := Font.Style + [fsItalic];
 end;
 
+(*************************************************************************
+ *
+ *\82Ç\82±\82©\82Ì\83T\83C\83g\82©\82ç\82Ì\83p\83N\83\8a
+ *************************************************************************)
+function TGikoSys.RemoveToken(var s: string;const delimiter: string): string;
+var
+       p: Integer;
+begin
+       p := AnsiPos(delimiter, s);
+       if p = 0 then
+               Result := s
+       else
+               Result := Copy(s, 1, p - 1);
+       Delete(s, 1, Length(Result) + Length(delimiter));
+end;
 
 (*************************************************************************
  *
@@ -1383,6 +2317,391 @@ begin
        end;
 end;
 
+(*************************************************************************
+ *
+ * from HotZonu
+ *************************************************************************)
+function TGikoSys.ConvRes(const Body, Bbs, Key,
+       ParamBBS, ParamKey, ParamStart, ParamTo, ParamNoFirst, ParamTrue : string;
+       DatToHTML: boolean = false): string;
+type
+       PIndex = ^TIndex;
+       TIndex = record
+               FIndexFrom      : integer;
+               FIndexTo                : integer;
+               FNo                              : string;
+       end;
+const
+       GT      = '&gt;';
+       SN      = '0123456789-';
+       ZN      = '\82O\82P\82Q\82R\82S\82T\82U\82V\82W\82X\81|';
+var
+       i : integer;
+       s,r : string;
+       b : TMbcsByteType;
+       sw: boolean;
+       sp: integer;
+       No: string;
+       sx: string;
+       List: TList;
+       oc      : string;
+       st, et: string;
+       chk : boolean;
+       al : boolean;
+       procedure Add(IndexFrom, IndexTo: integer; const No: string);
+       var
+               FIndex : PIndex;
+       begin
+               New(FIndex);
+               FIndex.FIndexFrom       := IndexFrom;
+               FIndex.FIndexTo         := IndexTo;
+               FIndex.FNo                               := No;
+               List.Add(FIndex);
+       end;
+       function ChooseString(const Text, Separator: string; Index: integer): string;
+       var
+               S : string;
+               i, p : integer;
+       begin
+               S :=    Text;
+               for i :=        0 to    Index - 1 do    begin
+                       if      (AnsiPos(Separator, S) = 0) then        S :=    ''
+                       else    S :=    Copy(S, AnsiPos(Separator, S) + Length(Separator), Length(S));
+               end;
+               p :=    AnsiPos(Separator, S);
+               if      (p > 0) then    Result  :=      Copy(S, 1, p - 1) else Result :=        S;
+       end;
+begin
+       { v1.0 b2 - 03 }
+       s        :=     Body;
+       r        :=     Body;
+       i        :=     1;
+       sw      :=      False;
+       No      :=      '';
+       List:=  TList.Create;
+       oc      :=      '';
+       sp      :=      0;
+       chk :=  False;
+       al      :=      False;
+       while true      do      begin
+               b :=    ByteType(s, i);
+               case    b of
+                       mbSingleByte    : begin
+                               if      (not sw) and (Copy(s,i,8) = GT + GT) then       begin
+                                       if      (AnsiPos('<A HREF', AnsiUpperCase(oc)) = 0) then        begin
+                                               sw      :=      True;
+                                               sp      :=      i;
+                                               i :=    i + 7;
+                                               oc:='';
+                                               chk :=  True;
+                                       end;
+                               end else
+                               if      (not sw) and (Copy(s,i,8) = GT + GT) then       begin
+                                       if      (AnsiPos('<A HREF', AnsiUpperCase(oc)) = 1) then        begin
+                                               i :=    i + 7;
+                                               oc:='';
+                                               chk :=  True;
+                                       end;
+                               end else
+                               if      (not sw) and (Copy(s,i,4) = GT) then    begin
+                                       if      (AnsiPos('<A HREF', AnsiUpperCase(oc)) = 0) then        begin
+                                               sw      :=      True;
+                                               sp      :=      i;
+                                               i :=    i + 3;
+                                               oc:='';
+                                               chk :=  True;
+                                       end;
+                               end else
+                               if      ((not sw) and (Copy(s,i,1) = ',')) or
+                                               ((not sw) and (Copy(s,i,1) = '=')) then begin
+                                       if      ((not Chk) and (AnsiLowerCase(oc) = '</a>')) or
+                                                       ((Chk) and      (oc = '')) or
+                                                       ((not Chk) and (al)) then
+                                       begin
+                                               sw      :=      True;
+                                               sp      :=      i;
+                                               //i :=  i + 1;
+                                               oc:='';
+                                       end;
+                               end else
+                               if      (sw) then begin
+                                       sx      :=      Copy(s,i,1);
+                                       if      (AnsiPos(sx, SN) > 0)   then    begin
+                                               No      :=      No      + sx;
+                                       end else begin
+                                               if      (No <> '') and (No <> '-')       then   begin
+                                                       Add(sp, i, No);
+                                                       al := True;
+                                               end;
+                                               sw      :=      False;
+                                               //
+                                               i := i - 1;
+                                               //
+                                               No      := '';
+                                               oc:='';
+                                               //chk :=        False;
+                                       end;
+                               end else begin
+                                       if      Copy(s,i,1) = '<' then  oc      :=      '';
+                                       oc      :=      oc + Copy(s,i,1);
+                                       chk :=  False;
+                                       al      :=      False;
+                               end;
+                       end;
+                       mbLeadByte      : begin
+                               if      (not sw) and (Copy(s,i,4) = '\81\84\81\84') then        begin
+                                       sw      :=      True;
+                                       sp      :=      i;
+                                       i :=    i + 3;
+                                       chk :=  True;
+                               end else
+                               if      (not sw) and (Copy(s,i,2) = '\81\84') then  begin
+                                       sw      :=      True;
+                                       sp      :=      i;
+                                       i :=    i + 1;
+                                       chk :=  True;
+                               end else
+                               if      (sw) then begin
+                                       sx      :=      Copy(s,i,2);
+                                       if      (AnsiPos(sx, ZN) > 0)   then    begin
+                                               No      :=      No      + ZenToHan(sx);
+                                       end else begin
+                                               if      (No <> '') and (No <> '-')      and (No <> '\81|') then   begin
+                                                       Add(sp, i, No);
+                                               end;
+                                               sw      :=      False;
+                                               i := i - 1;
+                                               No      :=      '';
+                                       end;
+                               end else begin
+                                       oc      :=      '';
+                                       chk :=  False;
+                               end;
+                               al      :=      False;
+                       end;
+               end;
+               inc(i);
+               if      (i > Length(Body))      then    begin
+                       if      (sw)    then    begin
+                               if      (No <> '')      then    Add(sp, i, No);
+                       end;
+                       Break;
+               end;
+       end;
+       for i :=        List.Count - 1  downto  0 do    begin
+               if      (AnsiPos('-', PIndex(List[i]).FNo) > 0) then    begin
+                       st      :=      ChooseString(PIndex(List[i]).FNo, '-', 0);
+                       et      :=      ChooseString(PIndex(List[i]).FNo, '-', 1);
+               end else begin
+                       st      :=      PIndex(List[i]).FNo;
+                       et      :=      PIndex(List[i]).FNo;
+               end;
+               if not DatToHTML then
+               r :=    Copy(r,0, PIndex(List[i]).FIndexFrom - 1) +
+                                       Format('<a href="../test/read.cgi?%s=%s&%s=%s&%s=%s&%s=%s&%s=%s" target="_blank">',
+                                                               [ParamBBS, Bbs, ParamKey, Key, ParamStart, st, ParamTo, et, ParamNoFirst, ParamTrue]) +
+                                       Copy(r,PIndex(List[i]).FIndexFrom, PIndex(List[i]).FIndexTo - PIndex(List[i]).FIndexFrom) + '</A>' +
+                                       Copy(r,PIndex(List[i]).FIndexTo,Length(r))
+               else
+               r :=    Copy(r,0, PIndex(List[i]).FIndexFrom - 1) +
+                                       Format('<a href="#%s">', [st]) +
+                                       Copy(r,PIndex(List[i]).FIndexFrom, PIndex(List[i]).FIndexTo - PIndex(List[i]).FIndexFrom) + '</A>' +
+                                       Copy(r,PIndex(List[i]).FIndexTo,Length(r));
+
+               Dispose(PIndex(List[i]));
+       end;
+       List.Free;
+       Result  :=      r;
+end;
+
+function TGikoSys.ConvRes(
+       const Body, Bbs, Key, ParamBBS, ParamKey,
+    ParamStart, ParamTo, ParamNoFirst,
+       ParamTrue, FullURL : string
+): string;
+type
+       PIndex = ^TIndex;
+       TIndex = record
+               FIndexFrom      : integer;
+               FIndexTo                : integer;
+               FNo                              : string;
+       end;
+const
+       GT      = '&gt;';
+       SN      = '0123456789-';
+       ZN      = '\82O\82P\82Q\82R\82S\82T\82U\82V\82W\82X\81|';
+var
+       i : integer;
+       s,r : string;
+       b : TMbcsByteType;
+       sw: boolean;
+       sp: integer;
+       No: string;
+       sx: string;
+       List: TList;
+       oc      : string;
+       st, et: string;
+       chk : boolean;
+       al : boolean;
+       procedure Add(IndexFrom, IndexTo: integer; const No: string);
+       var
+               FIndex : PIndex;
+       begin
+               New(FIndex);
+               FIndex.FIndexFrom       := IndexFrom;
+               FIndex.FIndexTo         := IndexTo;
+               FIndex.FNo                               := No;
+               List.Add(FIndex);
+       end;
+       function ChooseString(const Text, Separator: string; Index: integer): string;
+       var
+               S : string;
+               i, p : integer;
+       begin
+               S :=    Text;
+               for i :=        0 to    Index - 1 do    begin
+                       if      (AnsiPos(Separator, S) = 0) then        S :=    ''
+                       else    S :=    Copy(S, AnsiPos(Separator, S) + Length(Separator), Length(S));
+               end;
+               p :=    AnsiPos(Separator, S);
+               if      (p > 0) then    Result  :=      Copy(S, 1, p - 1) else Result :=        S;
+       end;
+begin
+       { v1.0 b2 - 03 }
+       s        :=     Body;
+       r        :=     Body;
+       i        :=     1;
+       sw      :=      False;
+       No      :=      '';
+       List:=  TList.Create;
+       oc      :=      '';
+       sp      :=      0;
+       chk :=  False;
+       al      :=      False;
+       while true      do      begin
+               b :=    ByteType(s, i);
+               case    b of
+                       mbSingleByte    : begin
+                               if      (not sw) and (Copy(s,i,8) = GT + GT) then       begin
+                                       if      (AnsiPos('<A HREF', AnsiUpperCase(oc)) = 0) then        begin
+                                               sw      :=      True;
+                                               sp      :=      i;
+                                               i :=    i + 7;
+                                               oc:='';
+                                               chk :=  True;
+                                       end;
+                               end else
+                               if      (not sw) and (Copy(s,i,8) = GT + GT) then       begin
+                                       if      (AnsiPos('<A HREF', AnsiUpperCase(oc)) = 1) then        begin
+                                               i :=    i + 7;
+                                               oc:='';
+                                               chk :=  True;
+                                       end;
+                               end else
+                               if      (not sw) and (Copy(s,i,4) = GT) then    begin
+                                       if      (AnsiPos('<A HREF', AnsiUpperCase(oc)) = 0) then        begin
+                                               sw      :=      True;
+                                               sp      :=      i;
+                                               i :=    i + 3;
+                                               oc:='';
+                                               chk :=  True;
+                                       end;
+                               end else
+                               if      ((not sw) and (Copy(s,i,1) = ',')) or
+                                               ((not sw) and (Copy(s,i,1) = '=')) then begin
+                                       if      ((not Chk) and (AnsiLowerCase(oc) = '</a>')) or
+                                                       ((Chk) and      (oc = '')) or
+                                                       ((not Chk) and (al)) then
+                                       begin
+                                               sw      :=      True;
+                                               sp      :=      i;
+                                               //i :=  i + 1;
+                                               oc:='';
+                                       end;
+                               end else
+                               if      (sw) then begin
+                                       sx      :=      Copy(s,i,1);
+                                       if      (AnsiPos(sx, SN) > 0)   then    begin
+                                               No      :=      No      + sx;
+                                       end else begin
+                                               if      (No <> '') and (No <> '-')       then   begin
+                                                       Add(sp, i, No);
+                                                       al := True;
+                                               end;
+                                               sw      :=      False;
+                                               //
+                                               i := i - 1;
+                                               //
+                                               No      := '';
+                                               oc:='';
+                                               //chk :=        False;
+                                       end;
+                               end else begin
+                                       if      Copy(s,i,1) = '<' then  oc      :=      '';
+                                       oc      :=      oc + Copy(s,i,1);
+                                       chk :=  False;
+                                       al      :=      False;
+                               end;
+                       end;
+                       mbLeadByte      : begin
+                               if      (not sw) and (Copy(s,i,4) = '\81\84\81\84') then        begin
+                                       sw      :=      True;
+                                       sp      :=      i;
+                                       i :=    i + 3;
+                                       chk :=  True;
+                               end else
+                               if      (not sw) and (Copy(s,i,2) = '\81\84') then  begin
+                                       sw      :=      True;
+                                       sp      :=      i;
+                                       i :=    i + 1;
+                                       chk :=  True;
+                               end else
+                               if      (sw) then begin
+                                       sx      :=      Copy(s,i,2);
+                                       if      (AnsiPos(sx, ZN) > 0)   then    begin
+                                               No      :=      No      + ZenToHan(sx);
+                                       end else begin
+                                               if      (No <> '') and (No <> '-')      and (No <> '\81|') then   begin
+                                                       Add(sp, i, No);
+                                               end;
+                                               sw      :=      False;
+                                               i := i - 1;
+                                               No      :=      '';
+                                       end;
+                               end else begin
+                                       oc      :=      '';
+                                       chk :=  False;
+                               end;
+                               al      :=      False;
+                       end;
+               end;
+               inc(i);
+               if      (i > Length(Body))      then    begin
+                       if      (sw)    then    begin
+                               if      (No <> '')      then    Add(sp, i, No);
+                       end;
+                       Break;
+               end;
+       end;
+       for i :=        List.Count - 1  downto  0 do    begin
+        //plName := Copy(PluginName, LastDelimiter('\',PluginName) + 1, Length(PluginName) - LastDelimiter('/',PluginName) -1 );
+               if      (AnsiPos('-', PIndex(List[i]).FNo) > 0) then    begin
+                       st      :=      ChooseString(PIndex(List[i]).FNo, '-', 0);
+                       et      :=      ChooseString(PIndex(List[i]).FNo, '-', 1);
+               end else begin
+                       st      :=      PIndex(List[i]).FNo;
+                       et      :=      PIndex(List[i]).FNo;
+               end;
+               r :=    Copy(r,0, PIndex(List[i]).FIndexFrom - 1) +
+                                       Format('<a href="%s&%s=%s&%s=%s&%s=%s" target="_blank">',
+                                                               [FullURL, ParamStart, st, ParamTo, et, ParamNoFirst, ParamTrue]) +
+                                       Copy(r,PIndex(List[i]).FIndexFrom, PIndex(List[i]).FIndexTo - PIndex(List[i]).FIndexFrom) + '</A>' +
+                                       Copy(r,PIndex(List[i]).FIndexTo,Length(r));
+               Dispose(PIndex(List[i]));
+       end;
+       List.Free;
+       Result  :=      r;
+end;
 
 
 function TGikoSys.BoolToInt(b: Boolean): Integer;
@@ -2840,6 +4159,27 @@ begin
                1:  Result := Result + 'font-style:italic;';
        end;
 end;
+//\88ø\90\94\81AAID\81F\91Î\8fÛ\82Æ\82È\82é\93ú\95tID\95\8e\9a\97ñ\81AANum:\83\8c\83X\94Ô AURL\81F\82»\82Ì\83X\83\8c\83b\83h\82ÌURL
+function TGikoSys.AddBeProfileLink(AID : string; ANum: Integer):string ;
+var
+       p : integer;
+       BNum, BMark : string;
+begin
+       p := AnsiPos('BE:', AnsiUpperCase(AID));
+       if p > 0 then begin
+               BNum := Copy(AID, p, Length(AID));
+               AID := Copy(AID, 1, p - 1);
+               p := AnsiPos('-', BNum);
+               if p > 0 then begin
+                       BMark := '?' + Trim(Copy(BNum, p + 1, Length(BNum)));
+                       BNum := Copy(BNum, 1, p - 1);
+               end;
+               BNum := Trim(BNum);
+               Result := AID + ' <a href="'  + BNum + '/' + IntToStr(ANum)
+                       + '" target=_blank>' + BMark + '</a>';
+       end else
+               Result := AID;
+end;
 // \83o\81[\83W\83\87\83\93\8fî\95ñ\82ð\8eæ\93¾
 function TGikoSys.GetVersionInfo(KeyWord: TVerResourceKey): string;
 const