home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2002 March / PCWMAR02.iso / software / windowsxp / ftgateoffice / ftgateoffice.exe / Main / webhelp.jar / WebHelp.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-11-07  |  17.9 KB  |  1,312 lines

  1. import hhapplet.AboutDialogBox;
  2. import hhapplet.BsscHelpCommandAdapter;
  3. import hhapplet.BsscHelpRedirector;
  4. import hhapplet.ButtonLauncher;
  5. import hhapplet.ButtonPushEvent;
  6. import hhapplet.ButtonPushEventListener;
  7. import hhapplet.DialogDoneTarget;
  8. import hhapplet.FTSPane;
  9. import hhapplet.FTSParser;
  10. import hhapplet.FTSSearcher;
  11. import hhapplet.IndexPane;
  12. import hhapplet.IndexSecondaryDialog;
  13. import hhapplet.IndexSecondaryEntry;
  14. import hhapplet.LabelLauncher;
  15. import hhapplet.PopupMenu;
  16. import hhapplet.ResourceLib;
  17. import hhapplet.SiteMapParserToContents;
  18. import hhapplet.SiteMapParserToIndex;
  19. import hhapplet.SplashScreen;
  20. import hhapplet.TabButton;
  21. import hhapplet.TabManagerAdaper;
  22. import hhapplet.TabPanel;
  23. import hhapplet.URLFileHandler;
  24. import java.applet.Applet;
  25. import java.awt.BorderLayout;
  26. import java.awt.CardLayout;
  27. import java.awt.Color;
  28. import java.awt.Component;
  29. import java.awt.Container;
  30. import java.awt.Event;
  31. import java.awt.Graphics;
  32. import java.awt.Image;
  33. import java.awt.Label;
  34. import java.awt.LayoutManager;
  35. import java.awt.Panel;
  36. import java.awt.Rectangle;
  37. import java.awt.Window;
  38. import java.io.IOException;
  39. import java.net.URL;
  40. import java.util.Vector;
  41. import netscape.javascript.JSObject;
  42. import sitemap.MyBufferedInputStream;
  43. import sitemap.SiteMapParser;
  44. import treeview.TreeViewImageSet;
  45.  
  46. public class WebHelp extends Applet implements ButtonPushEventListener, BsscHelpCommandAdapter, TabManagerAdaper, BsscHelpRedirector {
  47.    private static final String STR_APPLET_ID = "WebHelp Applet Version 2.00.000";
  48.    private static final String STR_COPYRIGHT = "Copyright (c) 1998-2000 eHelp Corporation. All rights reserved.";
  49.    private boolean m_bShowTab = true;
  50.    private Window m_winFrameToShow = null;
  51.    private String m_strContentsFile = null;
  52.    private String m_strIndexFile = null;
  53.    private String m_strSearchFile = null;
  54.    private String m_strHelpFile = null;
  55.    private boolean m_bContentsLoaded = false;
  56.    private boolean m_bIndexLoaded = false;
  57.    private boolean m_bSearchLoaded = false;
  58.    private boolean m_bHelpLoaded = false;
  59.    private String m_strCurrentCommand = null;
  60.    private Panel m_pnlNav = null;
  61.    private TabPanel m_pnlTabs = null;
  62.    private CardLayout m_clLayout = null;
  63.    private boolean m_bParsing = false;
  64.    private Image[] m_imgList = null;
  65.    private TreeViewImageSet m_tvisImages = null;
  66.    private SiteMapParser m_smpContents = null;
  67.    private SiteMapParser m_smpIndex = null;
  68.    private SiteMapParser m_smpHelp = null;
  69.    private IndexPane m_ipIndex = null;
  70.    private FTSPane m_spSearch = null;
  71.    private Thread contents_thread = null;
  72.    private Thread parser_thread = null;
  73.    private Thread search_thread = null;
  74.    private Thread sync_thread = null;
  75.    private TabButton m_tbtnToc = null;
  76.    private TabButton m_tbtnIndex = null;
  77.    private TabButton m_tbtnSearch = null;
  78.    private TabButton m_tbtnHelp = null;
  79.    private boolean m_bMustHaveSize = false;
  80.    private boolean m_bIsIE3 = false;
  81.    private long m_lnTimeCreated = System.currentTimeMillis();
  82.    private FTSParser m_ftsParser = null;
  83.    private FTSSearcher m_ftsSearcher = null;
  84.    boolean m_bCanAccessJSObject = false;
  85.    private boolean m_bCanAccessJSObjectChecked = false;
  86.  
  87.    public void stop() {
  88.       System.out.println("!!!Applet Stop!!!");
  89.       if (System.getProperty("java.vendor").indexOf("Netscape") != -1 && this.CanQueryHeighAndWidthForNS()) {
  90.          try {
  91.             JSObject var1 = JSObject.getWindow(this);
  92.             var1.setMember("gbLoading", "Phase1");
  93.          } catch (Exception var3) {
  94.             ((Throwable)var3).printStackTrace();
  95.          }
  96.       }
  97.  
  98.       try {
  99.          if (this.m_winFrameToShow != null) {
  100.             this.m_winFrameToShow.hide();
  101.          }
  102.  
  103.          System.gc();
  104.          Runtime.getRuntime().gc();
  105.       } catch (Exception var2) {
  106.          ((Throwable)var2).printStackTrace();
  107.       }
  108.    }
  109.  
  110.    public boolean gotFocus(Event var1, Object var2) {
  111.       ((Component)this).nextFocus();
  112.       return true;
  113.    }
  114.  
  115.    public void notifyButtonPushEvent(ButtonPushEvent var1) {
  116.       if (var1.getSource() == this.m_tbtnToc) {
  117.          this.DoContents(this.m_strContentsFile);
  118.       } else if (var1.getSource() == this.m_tbtnIndex) {
  119.          this.DoIndex(this.m_strIndexFile);
  120.       } else if (var1.getSource() == this.m_tbtnSearch) {
  121.          this.DoSearch(this.m_strSearchFile);
  122.       } else {
  123.          if (this.m_tbtnHelp != null && var1.getSource() == this.m_tbtnHelp) {
  124.             this.DoHelp(this.m_strHelpFile);
  125.          }
  126.  
  127.       }
  128.    }
  129.  
  130.    private void DoBadCommand(String var1) {
  131.       ((Container)this).add(new Label("The command \"" + var1 + "\" is unrecognised"));
  132.    }
  133.  
  134.    private void DoHHVersion(boolean var1) {
  135.       String var2 = null;
  136.       Object var3 = null;
  137.       String var4 = null;
  138.       if (!var1) {
  139.          var2 = ((Applet)this).getParameter("Button");
  140.          String var12 = ((Applet)this).getParameter("Text");
  141.          if (var2 == null && var12 == null) {
  142.             return;
  143.          }
  144.  
  145.          var4 = var2 != null ? var2 : var12;
  146.       }
  147.  
  148.       Vector var5 = new Vector();
  149.       var5.addElement("WebHelp Applet Version 2.00.000");
  150.       var5.addElement("Copyright (c) 1998-2000 eHelp Corporation. All rights reserved.");
  151.  
  152.       try {
  153.          var5.addElement("Java VM vendor: " + System.getProperty("java.vendor"));
  154.       } catch (Exception var11) {
  155.          ((Throwable)var11).printStackTrace();
  156.       }
  157.  
  158.       try {
  159.          var5.addElement("Java version: " + System.getProperty("java.version"));
  160.       } catch (Exception var10) {
  161.          ((Throwable)var10).printStackTrace();
  162.       }
  163.  
  164.       try {
  165.          var5.addElement("Java library version: " + System.getProperty("java.class.version"));
  166.       } catch (Exception var9) {
  167.          ((Throwable)var9).printStackTrace();
  168.       }
  169.  
  170.       try {
  171.          String var6 = "Operating System: " + System.getProperty("os.name") + " " + System.getProperty("os.version") + " (" + System.getProperty("os.arch") + ")";
  172.          var5.addElement(var6);
  173.       } catch (Exception var8) {
  174.          ((Throwable)var8).printStackTrace();
  175.       }
  176.  
  177.       AboutDialogBox var13 = new AboutDialogBox("About WebHelp Applet", var5);
  178.       if (var1) {
  179.          var13.show();
  180.       } else {
  181.          Object var7 = var2 != null ? new ButtonLauncher(var4, var13) : new LabelLauncher(var4, var13);
  182.          ((Container)this).setLayout(new BorderLayout());
  183.          ((Container)this).add("Center", (Component)var7);
  184.          this.m_winFrameToShow = var13;
  185.       }
  186.    }
  187.  
  188.    private void DoAutoSync(String var1) {
  189.       if (this.m_smpContents != null) {
  190.          if (this.sync_thread != null && this.sync_thread.isAlive()) {
  191.             this.sync_thread.stop();
  192.          }
  193.  
  194.          this.sync_thread = new DoSync(this.m_smpContents, var1, "SyncThread");
  195.          this.sync_thread.start();
  196.       }
  197.  
  198.    }
  199.  
  200.    public boolean CanQueryHeighAndWidthForNS() {
  201.       if (this.m_bCanAccessJSObjectChecked) {
  202.          return this.m_bCanAccessJSObject;
  203.       } else {
  204.          this.m_bCanAccessJSObjectChecked = true;
  205.          return this._checkAccess();
  206.       }
  207.    }
  208.  
  209.    public void start() {
  210.       System.out.println("!!!Applet Start!!!");
  211.  
  212.       try {
  213.          if (this.m_bMustHaveSize) {
  214.             this.checkSize();
  215.          }
  216.       } catch (Exception var2) {
  217.          ((Throwable)var2).printStackTrace();
  218.       }
  219.  
  220.       if (System.getProperty("java.vendor").indexOf("Netscape") == -1) {
  221.          this.myrun();
  222.       }
  223.  
  224.    }
  225.  
  226.    public String getAppletInfo() {
  227.       return "WebHelp Applet Version 2.00.000" + "\r\n" + "Copyright (c) 1998-2000 eHelp Corporation. All rights reserved.";
  228.    }
  229.  
  230.    private void DoHelp(String var1) {
  231.       boolean var2 = false;
  232.       if (this.m_tbtnSearch != null) {
  233.          this.m_tbtnSearch.enable();
  234.          this.m_tbtnSearch.SetDrawLeft(true);
  235.          if (!var2) {
  236.             var2 = true;
  237.             this.m_tbtnSearch.SetDrawRight(false);
  238.          } else {
  239.             this.m_tbtnSearch.SetDrawRight(true);
  240.          }
  241.  
  242.          this.m_tbtnSearch.repaint(0L);
  243.       }
  244.  
  245.       if (this.m_tbtnIndex != null) {
  246.          this.m_tbtnIndex.enable();
  247.          this.m_tbtnIndex.SetDrawLeft(true);
  248.          if (!var2) {
  249.             var2 = true;
  250.             this.m_tbtnIndex.SetDrawRight(false);
  251.          } else {
  252.             this.m_tbtnIndex.SetDrawRight(true);
  253.          }
  254.  
  255.          this.m_tbtnIndex.repaint(0L);
  256.       }
  257.  
  258.       if (this.m_tbtnToc != null) {
  259.          this.m_tbtnToc.enable();
  260.          this.m_tbtnToc.SetDrawLeft(true);
  261.          if (!var2) {
  262.             var2 = true;
  263.             this.m_tbtnToc.SetDrawRight(false);
  264.          } else {
  265.             this.m_tbtnToc.SetDrawRight(true);
  266.          }
  267.  
  268.          this.m_tbtnToc.repaint(0L);
  269.       }
  270.  
  271.       if (this.m_tbtnHelp != null) {
  272.          this.m_tbtnHelp.disable();
  273.          this.m_tbtnHelp.repaint(0L);
  274.       }
  275.  
  276.       this.RepaintTabs();
  277.    }
  278.  
  279.    public void reshape(int var1, int var2, int var3, int var4) {
  280.       System.out.println("!!!Applet Reshape!!!");
  281.  
  282.       try {
  283.          if (System.getProperty("java.vendor").startsWith("Netscape") && (System.getProperty("os.name").startsWith("Windows") || System.getProperty("os.name").startsWith("Mac"))) {
  284.             if (this.CanQueryHeighAndWidthForNS()) {
  285.                WebHelp$JavaScriptAccess var5 = new WebHelp$JavaScriptAccess(this, this);
  286.                var4 = var5.GetHeight(var4);
  287.                var3 = var5.GetWidth(var3);
  288.                if (!this.m_bShowTab) {
  289.                   try {
  290.                      if (System.getProperty("java.vendor").indexOf("Netscape") != -1) {
  291.                         ((Component)this).getParent().reshape(var1, var2, var3, var4);
  292.                      }
  293.                   } catch (Exception var7) {
  294.                      ((Throwable)var7).printStackTrace();
  295.                   }
  296.                }
  297.  
  298.                super.reshape(var1, var2, var3, var4);
  299.                ((Container)this).validate();
  300.             } else {
  301.                super.reshape(var1, var2, var3, var4);
  302.             }
  303.          } else {
  304.             super.reshape(var1, var2, var3, var4);
  305.             ((Container)this).validate();
  306.          }
  307.       } catch (Exception var8) {
  308.          ((Throwable)var8).printStackTrace();
  309.       }
  310.    }
  311.  
  312.    private void DoNavPane() {
  313.       ((Component)this).setBackground(new Color(192, 192, 192));
  314.       ((Container)this).setLayout(new BorderLayout());
  315.       this.m_strContentsFile = ((Applet)this).getParameter("ContentsFile");
  316.       this.m_strIndexFile = ((Applet)this).getParameter("IndexFile");
  317.       this.m_strSearchFile = ((Applet)this).getParameter("SearchFile");
  318.       this.m_strHelpFile = ((Applet)this).getParameter("HelpFile");
  319.       String var1 = ((Applet)this).getParameter("HideTabs");
  320.       if (var1 != null && var1.toUpperCase().compareTo("TRUE") == 0) {
  321.          this.m_bShowTab = false;
  322.       } else {
  323.          this.m_bShowTab = true;
  324.       }
  325.  
  326.       String var2 = null;
  327.       if (this.m_strContentsFile != null) {
  328.          var2 = ((Applet)this).getParameter("ContentsTab");
  329.          if (var2 == null) {
  330.             var2 = ResourceLib.GetRes("Contents");
  331.          }
  332.       }
  333.  
  334.       String var3 = null;
  335.       if (this.m_strIndexFile != null) {
  336.          var3 = ((Applet)this).getParameter("IndexTab");
  337.          if (var3 == null) {
  338.             var3 = ResourceLib.GetRes("Index");
  339.          }
  340.       }
  341.  
  342.       String var4 = null;
  343.       if (this.m_strSearchFile != null) {
  344.          var4 = ((Applet)this).getParameter("SearchTab");
  345.          if (var4 == null) {
  346.             var4 = ResourceLib.GetRes("Search");
  347.          }
  348.       }
  349.  
  350.       String var5 = null;
  351.       if (this.m_strHelpFile != null) {
  352.          var5 = ((Applet)this).getParameter("HelpTab");
  353.          if (var5 == null) {
  354.             var5 = "Help";
  355.          }
  356.       }
  357.  
  358.       this.m_pnlTabs = null;
  359.       this.m_pnlTabs = new TabPanel();
  360.       this.m_pnlTabs.setLayout((LayoutManager)null);
  361.       if (this.m_strContentsFile != null) {
  362.          this.m_tbtnToc = new TabButton(var2, this);
  363.          this.m_tbtnToc.addButtonPushEventListener(this);
  364.          this.m_pnlTabs.add(this.m_tbtnToc);
  365.       }
  366.  
  367.       if (this.m_strIndexFile != null) {
  368.          this.m_tbtnIndex = new TabButton(var3, this);
  369.          this.m_tbtnIndex.addButtonPushEventListener(this);
  370.          this.m_pnlTabs.add(this.m_tbtnIndex);
  371.       }
  372.  
  373.       if (this.m_strSearchFile != null) {
  374.          this.m_tbtnSearch = new TabButton(var4, this);
  375.          this.m_tbtnSearch.addButtonPushEventListener(this);
  376.          this.m_pnlTabs.add(this.m_tbtnSearch);
  377.       }
  378.  
  379.       if (this.m_strHelpFile != null) {
  380.          this.m_tbtnHelp = new TabButton(var5, this);
  381.          this.m_tbtnHelp.addButtonPushEventListener(this);
  382.          this.m_pnlTabs.add(this.m_tbtnHelp);
  383.       }
  384.  
  385.       if (this.m_bShowTab) {
  386.          ((Container)this).add("North", this.m_pnlTabs);
  387.       }
  388.  
  389.       Rectangle var6 = ((Component)this).bounds();
  390.       if (this.m_tbtnToc != null) {
  391.          this.rods_reshape(this.m_tbtnToc, 1, var6.y, this.m_tbtnToc.preferredSize().width, 25);
  392.       }
  393.  
  394.       if (this.m_tbtnIndex != null) {
  395.          int var7 = 1;
  396.          if (this.m_tbtnToc != null) {
  397.             var7 += this.m_tbtnToc.bounds().width;
  398.          }
  399.  
  400.          this.rods_reshape(this.m_tbtnIndex, var7, var6.y, this.m_tbtnIndex.preferredSize().width, 25);
  401.       }
  402.  
  403.       if (this.m_tbtnSearch != null) {
  404.          int var14 = 1;
  405.          if (this.m_tbtnToc != null) {
  406.             var14 += this.m_tbtnToc.bounds().width;
  407.          }
  408.  
  409.          if (this.m_tbtnIndex != null) {
  410.             var14 += this.m_tbtnIndex.bounds().width;
  411.          }
  412.  
  413.          this.rods_reshape(this.m_tbtnSearch, var14, var6.y, this.m_tbtnSearch.preferredSize().width, 25);
  414.       }
  415.  
  416.       if (this.m_tbtnHelp != null) {
  417.          int var15 = 1;
  418.          if (this.m_tbtnToc != null) {
  419.             var15 += this.m_tbtnToc.bounds().width;
  420.          }
  421.  
  422.          if (this.m_tbtnIndex != null) {
  423.             var15 += this.m_tbtnIndex.bounds().width;
  424.          }
  425.  
  426.          if (this.m_tbtnSearch != null) {
  427.             var15 += this.m_tbtnSearch.bounds().width;
  428.          }
  429.  
  430.          this.rods_reshape(this.m_tbtnHelp, var15, var6.y, this.m_tbtnHelp.preferredSize().width, 25);
  431.       }
  432.  
  433.       this.rods_reshape(this.m_pnlTabs, var6.x, var6.y, var6.width, 28);
  434.       this.m_pnlTabs.requestFocus();
  435.       if (this.m_tbtnIndex != null) {
  436.          this.m_tbtnIndex.active();
  437.       }
  438.  
  439.       if (this.m_tbtnToc != null) {
  440.          this.m_tbtnToc.active();
  441.       }
  442.  
  443.       if (this.m_tbtnSearch != null) {
  444.          this.m_tbtnSearch.active();
  445.       }
  446.  
  447.       if (this.m_tbtnHelp != null) {
  448.          this.m_tbtnHelp.active();
  449.       }
  450.  
  451.       if (this.m_tbtnToc != null) {
  452.          this.m_tbtnToc.disactive();
  453.       }
  454.  
  455.       if (this.m_tbtnIndex != null) {
  456.          this.m_tbtnIndex.disactive();
  457.       }
  458.  
  459.       if (this.m_tbtnSearch != null) {
  460.          this.m_tbtnSearch.disactive();
  461.       }
  462.  
  463.       if (this.m_tbtnHelp != null) {
  464.          this.m_tbtnHelp.disactive();
  465.       }
  466.  
  467.       boolean var16 = true;
  468.       boolean var8 = true;
  469.       String var9 = ((Applet)this).getParameter("CurrentTab");
  470.       if (var9 != null && (var9.equalsIgnoreCase("Index") || var9.equalsIgnoreCase("Search"))) {
  471.          var16 = false;
  472.       }
  473.  
  474.       if (var9 != null && (var9.equalsIgnoreCase("Contents") || var9.equalsIgnoreCase("Search"))) {
  475.          var8 = false;
  476.       }
  477.  
  478.       Object var10 = null;
  479.       ButtonPushEvent var17;
  480.       if (var16) {
  481.          var17 = new ButtonPushEvent(this.m_tbtnToc, 0, 0);
  482.       } else if (var8) {
  483.          var17 = new ButtonPushEvent(this.m_tbtnIndex, 0, 0);
  484.       } else {
  485.          var17 = new ButtonPushEvent(this.m_tbtnSearch, 0, 0);
  486.       }
  487.  
  488.       this.notifyButtonPushEvent(var17);
  489.       if (this.m_bShowTab) {
  490.          try {
  491.             String var11 = System.getProperty("java.vendor");
  492.             if (var11.startsWith("Netscape")) {
  493.                Panel var12 = new Panel();
  494.                ((Container)var12).setLayout((LayoutManager)null);
  495.                ((Component)var12).resize(((Component)this).bounds().width, 14);
  496.                ((Container)this).add("South", var12);
  497.                return;
  498.             }
  499.          } catch (Exception var13) {
  500.             ((Throwable)var13).printStackTrace();
  501.          }
  502.       }
  503.  
  504.    }
  505.  
  506.    public synchronized void Command(String var1, String var2) {
  507.       try {
  508.          if (var1 != null) {
  509.             if (var1.equalsIgnoreCase("SyncToc")) {
  510.                this.DoSync(var2);
  511.             } else if (var1.equalsIgnoreCase("AutoSync")) {
  512.                this.DoAutoSync(var2);
  513.             } else if (var1.equalsIgnoreCase("Contents")) {
  514.                this.DoContents(var2);
  515.             } else if (var1.equalsIgnoreCase("Index")) {
  516.                this.DoIndex(var2);
  517.             } else if (var1.equalsIgnoreCase("Search")) {
  518.                this.DoSearch(var2);
  519.             } else if (var1.equalsIgnoreCase("Version")) {
  520.                this.ShowVersion();
  521.             } else {
  522.                this.DoBadCommand("Command method does not support " + var1);
  523.             }
  524.          }
  525.       } catch (Exception var4) {
  526.          ((Throwable)var4).printStackTrace();
  527.       }
  528.    }
  529.  
  530.    public void paint(Graphics var1) {
  531.       System.out.println("!!!Applet paint!!!");
  532.       super.paint(var1);
  533.    }
  534.  
  535.    public void printVMInfo() {
  536.       try {
  537.          System.out.println(System.getProperty("java.version"));
  538.          System.out.println(System.getProperty("java.vendor"));
  539.          System.out.println(System.getProperty("java.vendor.url"));
  540.          System.out.println(System.getProperty("java.home"));
  541.          System.out.println(System.getProperty("java.class.path"));
  542.          System.out.println(System.getProperty("java.class.version"));
  543.          System.out.println(System.getProperty("os.name"));
  544.          System.out.println(System.getProperty("os.arch"));
  545.          System.out.println(System.getProperty("os.version"));
  546.          System.out.println(System.getProperty("user.name"));
  547.          System.out.println(System.getProperty("user.home"));
  548.          System.out.println(System.getProperty("user.dir"));
  549.       } catch (Exception var2) {
  550.          ((Throwable)var2).printStackTrace();
  551.       }
  552.    }
  553.  
  554.    public void destroy() {
  555.       System.out.println("!!!Applet Destroy!!!");
  556.  
  557.       try {
  558.          if (this.m_winFrameToShow != null) {
  559.             this.m_winFrameToShow.hide();
  560.             this.m_winFrameToShow.dispose();
  561.             this.m_winFrameToShow = null;
  562.          }
  563.  
  564.          if (this.m_smpContents != null) {
  565.             this.m_smpContents.closeFiles();
  566.             this.m_smpContents = null;
  567.          }
  568.  
  569.          if (this.m_smpIndex != null) {
  570.             this.m_smpIndex.closeFiles();
  571.             this.m_smpIndex = null;
  572.          }
  573.  
  574.          if (this.m_smpHelp != null) {
  575.             this.m_smpHelp.closeFiles();
  576.             this.m_smpHelp = null;
  577.          }
  578.  
  579.          if (this.m_ipIndex != null && this.m_ipIndex.getList() != null) {
  580.             this.m_ipIndex.getList().clear();
  581.          }
  582.  
  583.          if (this.m_ipIndex != null && this.m_ipIndex.getForAppleList() != null) {
  584.             this.m_ipIndex.getForAppleList().clear();
  585.          }
  586.  
  587.          if (this.m_ipIndex != null) {
  588.             this.m_ipIndex = null;
  589.          }
  590.  
  591.          if (this.m_spSearch != null && this.m_spSearch.getList() != null) {
  592.             this.m_spSearch.getList().clear();
  593.             this.m_spSearch = null;
  594.          }
  595.  
  596.          if (this.m_tvisImages != null) {
  597.             this.m_tvisImages.releaseImages(this.m_imgList);
  598.             this.m_tvisImages = null;
  599.          }
  600.  
  601.          if (this.contents_thread != null && this.contents_thread.isAlive()) {
  602.             this.contents_thread.stop();
  603.             this.contents_thread = null;
  604.          }
  605.  
  606.          if (this.parser_thread != null && this.parser_thread.isAlive()) {
  607.             this.parser_thread.stop();
  608.             this.parser_thread = null;
  609.          }
  610.  
  611.          if (this.search_thread != null && this.search_thread.isAlive()) {
  612.             this.search_thread.stop();
  613.             this.search_thread = null;
  614.          }
  615.  
  616.          if (this.sync_thread != null && this.sync_thread.isAlive()) {
  617.             this.sync_thread.stop();
  618.             this.sync_thread = null;
  619.          }
  620.  
  621.          System.gc();
  622.          Runtime.getRuntime().gc();
  623.       } catch (Exception var2) {
  624.          ((Throwable)var2).printStackTrace();
  625.       }
  626.    }
  627.  
  628.    protected void rods_reshape(Component var1, int var2, int var3, int var4, int var5) {
  629.       var1.move(var2, var3);
  630.       var1.resize(var4, var5);
  631.    }
  632.  
  633.    public boolean showDoc(URL var1, String var2) {
  634.       if (var2 != null) {
  635.          if (System.getProperty("java.vendor").indexOf("Netscape") == -1 && !System.getProperty("os.name").startsWith("MacOS")) {
  636.             this.redirect(var1, var2);
  637.          } else {
  638.             ((Applet)this).getAppletContext().showDocument(var1, var2);
  639.          }
  640.       } else {
  641.          ((Applet)this).getAppletContext().showDocument(var1, "_self");
  642.       }
  643.  
  644.       return true;
  645.    }
  646.  
  647.    private void DoContents(String var1) {
  648.       boolean var2 = false;
  649.       if (this.m_tbtnToc != null) {
  650.          this.m_tbtnToc.active();
  651.          this.m_tbtnToc.repaint(0L);
  652.       }
  653.  
  654.       if (this.m_tbtnIndex != null) {
  655.          this.m_tbtnIndex.disactive();
  656.          this.m_tbtnIndex.SetDrawRight(true);
  657.          if (!var2) {
  658.             var2 = true;
  659.             this.m_tbtnIndex.SetDrawLeft(false);
  660.          } else {
  661.             this.m_tbtnIndex.SetDrawLeft(true);
  662.          }
  663.  
  664.          this.m_tbtnIndex.repaint(0L);
  665.       }
  666.  
  667.       if (this.m_tbtnSearch != null) {
  668.          this.m_tbtnSearch.disactive();
  669.          this.m_tbtnSearch.SetDrawRight(true);
  670.          if (!var2) {
  671.             var2 = true;
  672.             this.m_tbtnSearch.SetDrawLeft(false);
  673.          } else {
  674.             this.m_tbtnSearch.SetDrawLeft(true);
  675.          }
  676.  
  677.          this.m_tbtnSearch.repaint(0L);
  678.       }
  679.  
  680.       if (this.m_tbtnHelp != null) {
  681.          this.m_tbtnHelp.disactive();
  682.          this.m_tbtnHelp.SetDrawRight(true);
  683.          if (!var2) {
  684.             var2 = true;
  685.             this.m_tbtnHelp.SetDrawLeft(false);
  686.          } else {
  687.             this.m_tbtnHelp.SetDrawLeft(true);
  688.          }
  689.  
  690.          this.m_tbtnHelp.repaint(0L);
  691.       }
  692.  
  693.       this.RepaintTabs();
  694.       if (var1 == null) {
  695.          ((Container)this).setLayout(new BorderLayout());
  696.       }
  697.  
  698.       if (this.m_pnlNav == null) {
  699.          this.m_clLayout = new CardLayout();
  700.          this.m_pnlNav = new Panel();
  701.          this.m_pnlNav.setLayout(this.m_clLayout);
  702.          ((Container)this).add("Center", this.m_pnlNav);
  703.       }
  704.  
  705.       if (this.m_tvisImages == null) {
  706.          this.m_tvisImages = new TreeViewImageSet();
  707.          this.m_imgList = new Image[14];
  708.          this.m_imgList = this.m_tvisImages.reallyGetImages();
  709.       }
  710.  
  711.       if (var1 == null) {
  712.          var1 = ((Applet)this).getParameter("Item1");
  713.       }
  714.  
  715.       if (this.m_bContentsLoaded && this.m_strContentsFile != null && this.m_strContentsFile.equals(var1)) {
  716.          this.m_clLayout.show(this.m_pnlNav, ResourceLib.GetRes("Contents"));
  717.          if (this.m_smpContents != null) {
  718.             ((SiteMapParserToContents)this.m_smpContents.getOutput()).getTree().requestFocus();
  719.          }
  720.  
  721.       } else {
  722.          this.m_strContentsFile = var1;
  723.          this.m_bContentsLoaded = true;
  724.          this.m_bMustHaveSize = true;
  725.          ((Component)this).repaint(0L);
  726.          this.RepaintTabs();
  727.          SiteMapParserToContents var3 = new SiteMapParserToContents(this, this.m_imgList, this);
  728.          if (this.m_smpContents != null) {
  729.             this.m_smpContents.closeFiles();
  730.          }
  731.  
  732.          ((Applet)this).showStatus(ResourceLib.GetRes("LoadingContents"));
  733.          this.m_pnlNav.add(ResourceLib.GetRes("Contents"), var3.getTree());
  734.          this.m_clLayout.show(this.m_pnlNav, ResourceLib.GetRes("Contents"));
  735.          var3.getTree().requestFocus();
  736.          ((Component)this).repaint(0L);
  737.          ((Component)this).show();
  738.          this.m_smpContents = new SiteMapParser(var3);
  739.          this.contents_thread = this.m_smpContents.parseInSeparateThread(var1, ((Applet)this).getDocumentBase(), this);
  740.          var3.getTree().requestFocus();
  741.       }
  742.    }
  743.  
  744.    public void resize(int var1, int var2) {
  745.       System.out.println("!!!Applet Resize!!!");
  746.       if (System.getProperty("java.vendor").indexOf("Netscape") != -1) {
  747.          if (this.CanQueryHeighAndWidthForNS()) {
  748.             try {
  749.                JSObject var3 = JSObject.getWindow(this);
  750.                var3.setMember("gbLoading", "Phase1");
  751.             } catch (Exception var6) {
  752.                ((Throwable)var6).printStackTrace();
  753.             }
  754.          }
  755.       } else if (System.getProperty("java.vendor").indexOf("Microsoft") != -1 && System.getProperty("java.version").startsWith("1.1")) {
  756.          try {
  757.             JSObject var7 = JSObject.getWindow(this);
  758.             var7.setMember("gbLoading", "Phase1");
  759.          } catch (Exception var5) {
  760.             ((Throwable)var5).printStackTrace();
  761.          }
  762.       }
  763.  
  764.       try {
  765.          if (this.CanQueryHeighAndWidthForNS()) {
  766.             WebHelp$JavaScriptAccess var8 = new WebHelp$JavaScriptAccess(this, this);
  767.             var2 = var8.GetHeight(var2);
  768.             var1 = var8.GetWidth(var1);
  769.          }
  770.  
  771.          super.resize(var1, var2);
  772.       } catch (Exception var4) {
  773.          ((Throwable)var4).printStackTrace();
  774.       }
  775.    }
  776.  
  777.    public synchronized boolean checkSize() {
  778.       if (((Component)this).bounds().width == 0 && ((Component)this).bounds().height == 0) {
  779.          String var1 = ((Applet)this).getDocumentBase().toString();
  780.          int var2 = var1.lastIndexOf(".");
  781.          String var3 = var1.substring(var2, var1.length());
  782.          var1 = var1.substring(0, var2);
  783.          var1 = var1 + "f" + var3;
  784.  
  785.          try {
  786.             URL var4 = new URL(var1);
  787.             ((Applet)this).getAppletContext().showDocument(var4, "_self");
  788.             return false;
  789.          } catch (Exception var5) {
  790.             ((Throwable)var5).printStackTrace();
  791.          }
  792.       }
  793.  
  794.       return true;
  795.    }
  796.  
  797.    private void DoSearch(String var1) {
  798.       boolean var2 = false;
  799.       boolean var3 = false;
  800.       if (this.m_tbtnIndex != null) {
  801.          this.m_tbtnIndex.disactive();
  802.          this.m_tbtnIndex.SetDrawLeft(true);
  803.          if (!var3) {
  804.             var3 = true;
  805.             this.m_tbtnIndex.SetDrawRight(false);
  806.          } else {
  807.             this.m_tbtnIndex.SetDrawRight(true);
  808.          }
  809.  
  810.          this.m_tbtnIndex.repaint(0L);
  811.       }
  812.  
  813.       if (this.m_tbtnToc != null) {
  814.          this.m_tbtnToc.disactive();
  815.          this.m_tbtnToc.SetDrawLeft(true);
  816.          if (!var3) {
  817.             var3 = true;
  818.             this.m_tbtnToc.SetDrawRight(false);
  819.          } else {
  820.             this.m_tbtnToc.SetDrawRight(true);
  821.          }
  822.  
  823.          this.m_tbtnToc.repaint(0L);
  824.       }
  825.  
  826.       if (this.m_tbtnSearch != null) {
  827.          this.m_tbtnSearch.active();
  828.          this.m_tbtnSearch.repaint(0L);
  829.       }
  830.  
  831.       if (this.m_tbtnHelp != null) {
  832.          this.m_tbtnHelp.disactive();
  833.          this.m_tbtnHelp.SetDrawRight(true);
  834.          if (!var2) {
  835.             var2 = true;
  836.             this.m_tbtnHelp.SetDrawLeft(false);
  837.          } else {
  838.             this.m_tbtnHelp.SetDrawLeft(true);
  839.          }
  840.  
  841.          this.m_tbtnHelp.repaint(0L);
  842.       }
  843.  
  844.       if (var1 == null) {
  845.          ((Container)this).setLayout(new BorderLayout());
  846.       }
  847.  
  848.       if (this.m_pnlNav == null) {
  849.          this.m_clLayout = new CardLayout();
  850.          this.m_pnlNav = new Panel();
  851.          this.m_pnlNav.setLayout(this.m_clLayout);
  852.          ((Container)this).add("Center", this.m_pnlNav);
  853.       }
  854.  
  855.       if (var1 == null) {
  856.          var1 = ((Applet)this).getParameter("Item1");
  857.       }
  858.  
  859.       if (this.m_bSearchLoaded && this.m_strSearchFile != null && this.m_strSearchFile.equals(var1)) {
  860.          this.m_clLayout.show(this.m_pnlNav, ResourceLib.GetRes("Search"));
  861.          if (this.m_spSearch != null) {
  862.             this.m_spSearch.getEditBox().requestFocus();
  863.          }
  864.  
  865.       } else {
  866.          this.m_strSearchFile = var1;
  867.          this.m_bSearchLoaded = true;
  868.          this.m_bMustHaveSize = true;
  869.          this.m_ftsParser = new FTSParser(this);
  870.          this.m_spSearch = this.m_ftsParser.getFTS();
  871.          this.m_ftsSearcher = this.m_ftsParser.getSearcher();
  872.          if (this.m_spSearch != null && this.m_spSearch.getList() != null) {
  873.             this.m_spSearch.getList().clear();
  874.             this.m_spSearch.getList().addItem(ResourceLib.GetRes("LoadingFTS"));
  875.          }
  876.  
  877.          this.m_pnlNav.add(ResourceLib.GetRes("Search"), this.m_spSearch);
  878.          this.m_clLayout.show(this.m_pnlNav, ResourceLib.GetRes("Search"));
  879.          ((Component)this).repaint();
  880.          this.RepaintTabs();
  881.          ((Applet)this).showStatus(ResourceLib.GetRes("LoadingFTS"));
  882.          ((Component)this).show();
  883.          this.search_thread = this.m_ftsParser.parseInSeparateThread(var1, ((Applet)this).getDocumentBase());
  884.       }
  885.    }
  886.  
  887.    private void DoSplash() {
  888.       ((Applet)this).showStatus("Loading Splash Image...");
  889.  
  890.       try {
  891.          Image var1 = null;
  892.          Object var2 = null;
  893.  
  894.          try {
  895.             var1 = ((Applet)this).getImage(URLFileHandler.makeURL(((Applet)this).getDocumentBase(), ((Applet)this).getParameter("Item1"), (String)null));
  896.          } catch (Exception var6) {
  897.             ((Throwable)var6).printStackTrace();
  898.          }
  899.  
  900.          int var3 = 2500;
  901.  
  902.          try {
  903.             var3 = new Integer(((Applet)this).getParameter("Item2"));
  904.          } catch (NumberFormatException var5) {
  905.             ((Throwable)var5).printStackTrace();
  906.          }
  907.  
  908.          SplashScreen var4 = new SplashScreen(this, var1, var3, (String)var2);
  909.          var4.show();
  910.       } catch (Exception var7) {
  911.          ((Throwable)var7).printStackTrace();
  912.          ((Container)this).add("Center", new Label(ResourceLib.GetRes("CantOpenURLorFile") + ((Throwable)var7).getMessage()));
  913.       }
  914.    }
  915.  
  916.    public void myrun() {
  917.       try {
  918.          System.gc();
  919.          Runtime.getRuntime().gc();
  920.          this.m_lnTimeCreated = System.currentTimeMillis();
  921.          if (System.getProperty("java.vendor").startsWith("Microsoft") && System.getProperty("java.version").startsWith("1.0")) {
  922.             this.m_bIsIE3 = true;
  923.          }
  924.  
  925.          ResourceLib.InitRes();
  926.          String var1 = ((Applet)this).getParameter("ResourceFile");
  927.          if (var1 != null) {
  928.             try {
  929.                MyBufferedInputStream var2 = new MyBufferedInputStream(URLFileHandler.makeURL(((Applet)this).getDocumentBase(), var1, (String)null).openStream());
  930.                ResourceLib.LoadResource(var2);
  931.                var2.close();
  932.             } catch (IOException var4) {
  933.             }
  934.          }
  935.  
  936.          String var6 = ((Applet)this).getParameter("Command");
  937.          if (var6 == null) {
  938.             return;
  939.          }
  940.  
  941.          if (var6.equalsIgnoreCase("Contents")) {
  942.             this.DoContents((String)null);
  943.          } else if (var6.equalsIgnoreCase("Index")) {
  944.             this.DoIndex((String)null);
  945.          } else if (var6.equalsIgnoreCase("Search")) {
  946.             this.DoSearch((String)null);
  947.          } else if (var6.equalsIgnoreCase("Splash")) {
  948.             this.DoSplash();
  949.          } else if (var6.equalsIgnoreCase("Help")) {
  950.             this.DoHelp((String)null);
  951.          } else if (var6.equalsIgnoreCase("Related Topics")) {
  952.             this.DoRelatedTopics(false);
  953.          } else if (var6.equalsIgnoreCase("Related Topics,MENU")) {
  954.             this.DoRelatedTopics(true);
  955.          } else if (var6.equalsIgnoreCase("HH Version")) {
  956.             this.DoHHVersion(false);
  957.          } else if (var6.equalsIgnoreCase("AboutBox")) {
  958.             this.DoAboutBox();
  959.          } else if (var6.equalsIgnoreCase("NavPane")) {
  960.             this.DoNavPane();
  961.          } else {
  962.             this.DoBadCommand(var6);
  963.          }
  964.  
  965.          this.m_strCurrentCommand = var6;
  966.          ((Component)this).show();
  967.          String var3 = ((Applet)this).getParameter("SyncContentTopic");
  968.          if (var3 != null) {
  969.             this.DoSync(var3);
  970.             return;
  971.          }
  972.       } catch (Exception var5) {
  973.          ((Throwable)var5).printStackTrace();
  974.       }
  975.  
  976.    }
  977.  
  978.    private void DoAboutBox() {
  979.       String var1 = ((Applet)this).getParameter("Button");
  980.       String var2 = ((Applet)this).getParameter("Text");
  981.       if (var1 != null || var2 != null) {
  982.          String var3 = var1 != null ? var1 : var2;
  983.          String var4 = ((Applet)this).getParameter("Item1");
  984.          Vector var5 = new Vector();
  985.  
  986.          String var7;
  987.          for(int var6 = 0; (var7 = ((Applet)this).getParameter("Item" + (var6 + 2))) != null; ++var6) {
  988.             var5.addElement(var7);
  989.          }
  990.  
  991.          AboutDialogBox var8 = new AboutDialogBox(var4, var5);
  992.          Object var9 = var1 != null ? new ButtonLauncher(var3, var8) : new LabelLauncher(var3, var8);
  993.          ((Container)this).setLayout(new BorderLayout());
  994.          ((Container)this).add("Center", (Component)var9);
  995.          this.m_winFrameToShow = var8;
  996.       }
  997.    }
  998.  
  999.    private void RepaintTabs() {
  1000.       if (this.m_bShowTab) {
  1001.          if (this.m_pnlNav != null) {
  1002.             this.m_pnlNav.paintAll(this.m_pnlNav.getGraphics());
  1003.          }
  1004.  
  1005.          if (this.m_tbtnToc != null) {
  1006.             this.m_tbtnToc.paint(this.m_tbtnToc.getGraphics());
  1007.          }
  1008.  
  1009.          if (this.m_tbtnIndex != null) {
  1010.             this.m_tbtnIndex.paint(this.m_tbtnIndex.getGraphics());
  1011.          }
  1012.  
  1013.          if (this.m_tbtnSearch != null) {
  1014.             this.m_tbtnSearch.paint(this.m_tbtnSearch.getGraphics());
  1015.          }
  1016.  
  1017.          if (this.m_tbtnHelp != null) {
  1018.             this.m_tbtnHelp.paint(this.m_tbtnHelp.getGraphics());
  1019.          }
  1020.       }
  1021.  
  1022.    }
  1023.  
  1024.    private void DoIndex(String var1) {
  1025.       boolean var2 = false;
  1026.       boolean var3 = false;
  1027.       if (this.m_tbtnToc != null) {
  1028.          this.m_tbtnToc.disactive();
  1029.          this.m_tbtnToc.SetDrawLeft(true);
  1030.          if (!var3) {
  1031.             var3 = true;
  1032.             this.m_tbtnToc.SetDrawRight(false);
  1033.          } else {
  1034.             this.m_tbtnToc.SetDrawRight(true);
  1035.          }
  1036.  
  1037.          this.m_tbtnToc.repaint(0L);
  1038.       }
  1039.  
  1040.       if (this.m_tbtnIndex != null) {
  1041.          this.m_tbtnIndex.active();
  1042.          this.m_tbtnIndex.repaint(0L);
  1043.       }
  1044.  
  1045.       if (this.m_tbtnSearch != null) {
  1046.          this.m_tbtnSearch.disactive();
  1047.          this.m_tbtnSearch.SetDrawRight(true);
  1048.          if (!var2) {
  1049.             var2 = true;
  1050.             this.m_tbtnSearch.SetDrawLeft(false);
  1051.          } else {
  1052.             this.m_tbtnSearch.SetDrawLeft(true);
  1053.          }
  1054.  
  1055.          this.m_tbtnSearch.repaint(0L);
  1056.       }
  1057.  
  1058.       if (this.m_tbtnHelp != null) {
  1059.          this.m_tbtnHelp.disactive();
  1060.          this.m_tbtnHelp.SetDrawRight(true);
  1061.          if (!var2) {
  1062.             var2 = true;
  1063.             this.m_tbtnHelp.SetDrawLeft(false);
  1064.          } else {
  1065.             this.m_tbtnHelp.SetDrawLeft(true);
  1066.          }
  1067.  
  1068.          this.m_tbtnHelp.repaint(0L);
  1069.       }
  1070.  
  1071.       if (var1 == null) {
  1072.          ((Container)this).setLayout(new BorderLayout());
  1073.       }
  1074.  
  1075.       if (this.m_pnlNav == null) {
  1076.          this.m_clLayout = new CardLayout();
  1077.          this.m_pnlNav = new Panel();
  1078.          this.m_pnlNav.setLayout(this.m_clLayout);
  1079.          ((Container)this).add("Center", this.m_pnlNav);
  1080.       }
  1081.  
  1082.       if (var1 == null) {
  1083.          var1 = ((Applet)this).getParameter("Item1");
  1084.       }
  1085.  
  1086.       if (this.m_bIndexLoaded && this.m_strIndexFile != null && this.m_strIndexFile.equals(var1)) {
  1087.          this.m_clLayout.show(this.m_pnlNav, ResourceLib.GetRes("Index"));
  1088.          if (this.m_ipIndex != null) {
  1089.             this.m_ipIndex.getEditBox().requestFocus();
  1090.          }
  1091.  
  1092.       } else {
  1093.          this.m_strIndexFile = var1;
  1094.          this.m_bIndexLoaded = true;
  1095.          this.m_bMustHaveSize = true;
  1096.          SiteMapParserToIndex var4 = new SiteMapParserToIndex(this, this);
  1097.          if (this.m_ipIndex != null && this.m_ipIndex.getList() != null) {
  1098.             this.m_ipIndex.getList().clear();
  1099.          }
  1100.  
  1101.          this.m_ipIndex = var4.getIndex();
  1102.          this.m_pnlNav.add(ResourceLib.GetRes("Index"), this.m_ipIndex);
  1103.          this.m_clLayout.show(this.m_pnlNav, ResourceLib.GetRes("Index"));
  1104.          this.m_pnlNav.paintAll(this.m_pnlNav.getGraphics());
  1105.          this.RepaintTabs();
  1106.          ((Applet)this).showStatus(ResourceLib.GetRes("LoadingIndex") + "...");
  1107.          if (this.m_smpIndex != null) {
  1108.             this.m_smpIndex.closeFiles();
  1109.          }
  1110.  
  1111.          if (this.m_ipIndex != null) {
  1112.             this.m_ipIndex.getEditBox().requestFocus();
  1113.          }
  1114.  
  1115.          ((Component)this).show();
  1116.          this.m_smpIndex = new SiteMapParser(var4);
  1117.          this.parser_thread = this.m_smpIndex.parseInSeparateThread(var1, ((Applet)this).getDocumentBase(), this);
  1118.       }
  1119.    }
  1120.  
  1121.    public boolean GoNext(Object var1) {
  1122.       if (this.m_pnlTabs == null) {
  1123.          return false;
  1124.       } else {
  1125.          for(int var2 = 0; var2 < this.m_pnlTabs.getComponentCount(); ++var2) {
  1126.             if (this.m_pnlTabs.getComponent(var2) == var1) {
  1127.                if (var2 != this.m_pnlTabs.getComponentCount() - 1) {
  1128.                   this.notifyButtonPushEvent(new ButtonPushEvent(this.m_pnlTabs.getComponent(var2 + 1), 0, 0));
  1129.                   return true;
  1130.                }
  1131.  
  1132.                return false;
  1133.             }
  1134.          }
  1135.  
  1136.          return false;
  1137.       }
  1138.    }
  1139.  
  1140.    public void Click() {
  1141.       if (this.m_winFrameToShow != null) {
  1142.          if (this.m_bIsIE3) {
  1143.             MethodRunner var1 = new MethodRunner(this.m_winFrameToShow, "ClickThread");
  1144.             ((Thread)var1).start();
  1145.             return;
  1146.          }
  1147.  
  1148.          this.m_winFrameToShow.show();
  1149.       }
  1150.  
  1151.    }
  1152.  
  1153.    private void ShowVersion() {
  1154.       this.DoHHVersion(true);
  1155.    }
  1156.  
  1157.    private void DoSync(String var1) {
  1158.       if (this.m_strContentsFile != null) {
  1159.          this.DoContents(this.m_strContentsFile);
  1160.  
  1161.          while(this.m_smpContents == null) {
  1162.             try {
  1163.                System.out.println("Wait for try DoSYnc!");
  1164.                Thread.sleep(100L);
  1165.             } catch (InterruptedException var3) {
  1166.                ((Throwable)var3).printStackTrace();
  1167.             }
  1168.          }
  1169.  
  1170.          if (this.sync_thread != null && this.sync_thread.isAlive()) {
  1171.             this.sync_thread.stop();
  1172.          }
  1173.  
  1174.          this.sync_thread = new DoSync(this.m_smpContents, var1, "SyncThread");
  1175.          this.sync_thread.start();
  1176.       }
  1177.    }
  1178.  
  1179.    public void init() {
  1180.       System.out.println("!!!Applet Init!!!");
  1181.       if (System.getProperty("java.vendor").indexOf("Netscape") != -1) {
  1182.          this.myrun();
  1183.       }
  1184.  
  1185.    }
  1186.  
  1187.    public boolean GoPrev(Object var1) {
  1188.       if (this.m_pnlTabs == null) {
  1189.          return false;
  1190.       } else {
  1191.          for(int var2 = 0; var2 < this.m_pnlTabs.getComponentCount(); ++var2) {
  1192.             if (this.m_pnlTabs.getComponent(var2) == var1) {
  1193.                if (var2 != 0) {
  1194.                   this.notifyButtonPushEvent(new ButtonPushEvent(this.m_pnlTabs.getComponent(var2 - 1), 0, 0));
  1195.                   return true;
  1196.                }
  1197.  
  1198.                return false;
  1199.             }
  1200.          }
  1201.  
  1202.          return false;
  1203.       }
  1204.    }
  1205.  
  1206.    public synchronized void resizeForNS(int var1, int var2) {
  1207.       try {
  1208.          if (System.getProperty("java.vendor").indexOf("Netscape") != -1) {
  1209.             ((Component)this).getParent().reshape(0, 0, var1, var2);
  1210.          }
  1211.  
  1212.          super.reshape(0, 0, var1, var2);
  1213.          ((Container)this).validate();
  1214.       } catch (Exception var4) {
  1215.          ((Throwable)var4).printStackTrace();
  1216.       }
  1217.    }
  1218.  
  1219.    private void DoRelatedTopics(boolean var1) {
  1220.       ((Applet)this).showStatus("Loading Related Topics Button...");
  1221.       String var2 = ((Applet)this).getParameter("Button");
  1222.       String var3 = ((Applet)this).getParameter("Text");
  1223.       String var4 = ((Applet)this).getParameter("Frame");
  1224.       if (var1 && System.getProperty("os.name").startsWith("SunOS")) {
  1225.          var1 = false;
  1226.       }
  1227.  
  1228.       boolean var5 = var2 == null && var3 == null;
  1229.       String var6 = "";
  1230.       if (!var5) {
  1231.          var6 = var2 != null ? var2 : var3;
  1232.       }
  1233.  
  1234.       Vector var7 = new Vector();
  1235.       int var8 = 0;
  1236.  
  1237.       String var9;
  1238.       while((var9 = ((Applet)this).getParameter("Item" + (var8 + 1))) != null) {
  1239.          IndexSecondaryEntry var10 = new IndexSecondaryEntry();
  1240.          int var11 = var9.indexOf(59);
  1241.          if (var11 != -1 && var11 != var9.length() - 1) {
  1242.             int var12 = var9.indexOf(59, var11 + 1);
  1243.             String var13 = var9.substring(0, var11);
  1244.             String var14 = var12 == -1 ? var9.substring(var11 + 1) : var9.substring(var11 + 1, var12);
  1245.             String var15 = var12 == -1 ? null : var9.substring(var11 + 1);
  1246.             var10.name = var13;
  1247.             var10.local = var14;
  1248.             var10.url = var15;
  1249.             var10.frame = var4;
  1250.             var7.addElement(var10);
  1251.             ++var8;
  1252.          }
  1253.       }
  1254.  
  1255.       if (var8 != 0) {
  1256.          if (var1) {
  1257.             PopupMenu var17 = new PopupMenu(this, var7);
  1258.             this.m_winFrameToShow = var17;
  1259.          } else {
  1260.             IndexSecondaryDialog var18 = new IndexSecondaryDialog(this, var7, (DialogDoneTarget)null, this);
  1261.             this.m_winFrameToShow = var18;
  1262.          }
  1263.  
  1264.          if (!var5) {
  1265.             Object var16;
  1266.             if (var2 != null) {
  1267.                var16 = new ButtonLauncher(var6, this.m_winFrameToShow);
  1268.             } else {
  1269.                var16 = new LabelLauncher(var6, this.m_winFrameToShow);
  1270.             }
  1271.  
  1272.             ((Container)this).setLayout(new BorderLayout());
  1273.             ((Container)this).add("Center", (Component)var16);
  1274.          }
  1275.  
  1276.       }
  1277.    }
  1278.  
  1279.    private boolean _checkAccess() {
  1280.       if (System.getProperty("java.vendor").startsWith("Netscape") && (System.getProperty("os.name").startsWith("Windows") || System.getProperty("os.name").startsWith("Mac"))) {
  1281.          try {
  1282.             if (((Applet)this).getParameter("BrowserVersion") == null || !((Applet)this).getParameter("BrowserVersion").equalsIgnoreCase("4.6")) {
  1283.                JSObject.getWindow(this);
  1284.                this.m_bCanAccessJSObject = true;
  1285.             }
  1286.          } catch (Exception var2) {
  1287.             System.gc();
  1288.             ((Throwable)var2).printStackTrace();
  1289.          }
  1290.       }
  1291.  
  1292.       return this.m_bCanAccessJSObject;
  1293.    }
  1294.  
  1295.    private void redirect(URL var1, String var2) {
  1296.       if (this.m_bCanAccessJSObject) {
  1297.          try {
  1298.             JSObject var3 = JSObject.getWindow(this);
  1299.             var3.eval("window.open(\"" + var1.toString() + "\", \"" + var2 + "\");");
  1300.          } catch (Exception var4) {
  1301.             ((Throwable)var4).printStackTrace();
  1302.          }
  1303.       } else {
  1304.          try {
  1305.             ((Applet)this).getAppletContext().showDocument(var1, var2);
  1306.          } catch (Exception var5) {
  1307.             ((Throwable)var5).printStackTrace();
  1308.          }
  1309.       }
  1310.    }
  1311. }
  1312.