import java.applet.Applet;
import java.awt.Desktop;
import java.awt.Desktop.Action;
import java.net.URI;
import java.net.URL;

public class Class281 {

   static final int anInt3283 = 2;
   static String aString3284 = null;
   static final int anInt3285 = 3;
   static Applet anApplet3286 = null;
   static final int anInt3287 = 0;
   public static final int anInt3288 = 1;
   public static boolean aBool3289;


   static boolean method5063(String var0, int var1) {
      return Class67.method1433(var0, var1, "openjs", 323570109);
   }

   public static void method5064(String var0, boolean var1, boolean var2) {
      Class395.method6754(var0, var1, "openjs", var2, (short)19070);
   }

   static boolean method5065(String var0, int var1) {
      return Class67.method1433(var0, var1, "openjs", -728761588);
   }

   public static void method5066(String var0, boolean var1, String var2, boolean var3) {
      if(var1) {
         if(!var3 && Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Action.BROWSE)) {
            try {
               Desktop.getDesktop().browse(new URI(var0));
               return;
            } catch (Exception var5) {
               ;
            }
         }

         if(aString3284.startsWith("win") && !var3) {
            Class463_Sub2.method12784(var0, 0, (byte)127);
            return;
         }

         if(aString3284.startsWith("mac")) {
            Class67.method1433(var0, 1, var2, 245592794);
            return;
         }

         Class463_Sub2.method12784(var0, 2, (byte)127);
      } else {
         Class463_Sub2.method12784(var0, 3, (byte)127);
      }

   }

   public static void method5067(String var0, boolean var1, String var2, boolean var3) {
      if(var1) {
         if(!var3 && Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Action.BROWSE)) {
            try {
               Desktop.getDesktop().browse(new URI(var0));
               return;
            } catch (Exception var5) {
               ;
            }
         }

         if(aString3284.startsWith("win") && !var3) {
            Class463_Sub2.method12784(var0, 0, (byte)127);
            return;
         }

         if(aString3284.startsWith("mac")) {
            Class67.method1433(var0, 1, var2, 477122467);
            return;
         }

         Class463_Sub2.method12784(var0, 2, (byte)127);
      } else {
         Class463_Sub2.method12784(var0, 3, (byte)127);
      }

   }

   public static void method5068(String var0, boolean var1, boolean var2) {
      Class395.method6754(var0, var1, "openjs", var2, (short)3169);
   }

   Class281() throws Throwable {
      throw new Error();
   }

   public static boolean method5069(String var0, int var1, String var2) {
      if(var1 == 0) {
         try {
            if(!aString3284.startsWith("win")) {
               throw new Exception();
            } else if(!var0.startsWith("http://") && !var0.startsWith("https://")) {
               throw new Exception();
            } else {
               String var10 = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789?&=,.%+-_#:/*";

               for(int var4 = 0; var4 < var0.length(); ++var4) {
                  if(var10.indexOf(var0.charAt(var4)) == -1) {
                     throw new Exception();
                  }
               }

               Runtime.getRuntime().exec("cmd /c start \"j\" \"" + var0 + "\"");
               return true;
            }
         } catch (Throwable var5) {
            return false;
         }
      } else if(var1 == 1) {
         try {
            Object var3 = Class438.method7366(anApplet3286, var2, new Object[]{(new URL(anApplet3286.getCodeBase(), var0)).toString()}, 567184897);
            return null != var3;
         } catch (Throwable var6) {
            return false;
         }
      } else if(var1 == 2) {
         try {
            anApplet3286.getAppletContext().showDocument(new URL(anApplet3286.getCodeBase(), var0), "_blank");
            return true;
         } catch (Exception var7) {
            return false;
         }
      } else if(3 == var1) {
         try {
            Class438.method7363(anApplet3286, "loggedout", (byte)-88);
         } catch (Throwable var9) {
            ;
         }

         try {
            anApplet3286.getAppletContext().showDocument(new URL(anApplet3286.getCodeBase(), var0), "_top");
            return true;
         } catch (Exception var8) {
            return false;
         }
      } else {
         throw new IllegalArgumentException();
      }
   }

   public static boolean method5070(String var0, int var1, String var2) {
      if(var1 == 0) {
         try {
            if(!aString3284.startsWith("win")) {
               throw new Exception();
            } else if(!var0.startsWith("http://") && !var0.startsWith("https://")) {
               throw new Exception();
            } else {
               String var10 = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789?&=,.%+-_#:/*";

               for(int var4 = 0; var4 < var0.length(); ++var4) {
                  if(var10.indexOf(var0.charAt(var4)) == -1) {
                     throw new Exception();
                  }
               }

               Runtime.getRuntime().exec("cmd /c start \"j\" \"" + var0 + "\"");
               return true;
            }
         } catch (Throwable var5) {
            return false;
         }
      } else if(var1 == 1) {
         try {
            Object var3 = Class438.method7366(anApplet3286, var2, new Object[]{(new URL(anApplet3286.getCodeBase(), var0)).toString()}, 567184897);
            return null != var3;
         } catch (Throwable var6) {
            return false;
         }
      } else if(var1 == 2) {
         try {
            anApplet3286.getAppletContext().showDocument(new URL(anApplet3286.getCodeBase(), var0), "_blank");
            return true;
         } catch (Exception var7) {
            return false;
         }
      } else if(3 == var1) {
         try {
            Class438.method7363(anApplet3286, "loggedout", (byte)-59);
         } catch (Throwable var9) {
            ;
         }

         try {
            anApplet3286.getAppletContext().showDocument(new URL(anApplet3286.getCodeBase(), var0), "_top");
            return true;
         } catch (Exception var8) {
            return false;
         }
      } else {
         throw new IllegalArgumentException();
      }
   }

   public static boolean method5071(String var0, int var1, String var2) {
      if(var1 == 0) {
         try {
            if(!aString3284.startsWith("win")) {
               throw new Exception();
            } else if(!var0.startsWith("http://") && !var0.startsWith("https://")) {
               throw new Exception();
            } else {
               String var10 = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789?&=,.%+-_#:/*";

               for(int var4 = 0; var4 < var0.length(); ++var4) {
                  if(var10.indexOf(var0.charAt(var4)) == -1) {
                     throw new Exception();
                  }
               }

               Runtime.getRuntime().exec("cmd /c start \"j\" \"" + var0 + "\"");
               return true;
            }
         } catch (Throwable var5) {
            return false;
         }
      } else if(var1 == 1) {
         try {
            Object var3 = Class438.method7366(anApplet3286, var2, new Object[]{(new URL(anApplet3286.getCodeBase(), var0)).toString()}, 567184897);
            return null != var3;
         } catch (Throwable var6) {
            return false;
         }
      } else if(var1 == 2) {
         try {
            anApplet3286.getAppletContext().showDocument(new URL(anApplet3286.getCodeBase(), var0), "_blank");
            return true;
         } catch (Exception var7) {
            return false;
         }
      } else if(3 == var1) {
         try {
            Class438.method7363(anApplet3286, "loggedout", (byte)100);
         } catch (Throwable var9) {
            ;
         }

         try {
            anApplet3286.getAppletContext().showDocument(new URL(anApplet3286.getCodeBase(), var0), "_top");
            return true;
         } catch (Exception var8) {
            return false;
         }
      } else {
         throw new IllegalArgumentException();
      }
   }

   static final void method5072(Class508 var0, byte var1) {
      if(null == Class316.aClass459_3998) {
         var0.anIntArray6027[(var0.anInt6003 += 98312473) * -937710807 - 1] = -1;
      } else {
         var0.anIntArray6027[(var0.anInt6003 += 98312473) * -937710807 - 1] = 1300379885 * Class316.aClass459_3998.anInt5725;
      }

   }

   static final void method5073(Class508 var0, int var1) {
      var0.anIntArray6027[(var0.anInt6003 += 98312473) * -937710807 - 1] = Class243.anInt2927 * 1248873125;
   }
}
