/* Class232 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
import java.applet.Applet;
import java.awt.Desktop;
import java.net.URI;
import java.net.URL;

public class Class232 {
	static String aString2720;
	static final int anInt2721 = 2;
	static final int anInt2722 = 0;
	static Applet anApplet2723 = null;
	public static final int anInt2724 = 1;
	static final int anInt2725 = 3;
	public static Interface12 anInterface12_2726;
	static int anInt2727;
	static int anInt2728;

	public static void method4634(Applet applet, String string) {
		anApplet2723 = applet;
		aString2720 = string;
	}

	public static void method4635(Applet applet, String string) {
		anApplet2723 = applet;
		aString2720 = string;
	}

	static {
		aString2720 = null;
	}

	public static void method4636(String string, boolean bool, boolean bool_0_) {
		Class159.method3458(string, bool, "openjs", bool_0_, (byte) 103);
	}

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

	public static void method4637(String string, boolean bool, boolean bool_1_) {
		Class159.method3458(string, bool, "openjs", bool_1_, (byte) 78);
	}

	public static void method4638(String string, boolean bool, boolean bool_2_) {
		Class159.method3458(string, bool, "openjs", bool_2_, (byte) 114);
	}

	public static void method4639(String string, boolean bool, boolean bool_3_) {
		Class159.method3458(string, bool, "openjs", bool_3_, (byte) 81);
	}

	public static void method4640(String string, boolean bool, boolean bool_4_) {
		Class159.method3458(string, bool, "openjs", bool_4_, (byte) 79);
	}

	public static void method4641(String string, boolean bool, String string_5_, boolean bool_6_) {
		if (bool) {
			do {
				if (!bool_6_ && Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {
					try {
						Desktop.getDesktop().browse(new URI(string));
					} catch (Exception exception) {
						break;
					}
					return;
				}
			} while (false);
			if (aString2720.startsWith("win") && !bool_6_)
				Class214.method4461(string, 0, (short) 9217);
			else if (aString2720.startsWith("mac"))
				Class401.method7184(string, 1, string_5_, 2028895127);
			else
				Class214.method4461(string, 2, (short) 9217);
		} else
			Class214.method4461(string, 3, (short) 9217);
	}

	public static boolean method4642(String string, int i) {
		return Class401.method7184(string, i, "openjs", 2028895127);
	}

	public static boolean method4643(String string, int i, String string_7_) {
		if (i == 0) {
			boolean bool;
			try {
				if (!aString2720.startsWith("win"))
					throw new Exception();
				if (!string.startsWith("http://") && !string.startsWith("https://"))
					throw new Exception();
				String string_8_ = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789?&=,.%+-_#:/*";
				for (int i_9_ = 0; i_9_ < string.length(); i_9_++) {
					if (string_8_.indexOf(string.charAt(i_9_)) == -1)
						throw new Exception();
				}
				Runtime.getRuntime().exec(new StringBuilder().append("cmd /c start \"j\" \"").append(string).append("\"").toString());
				bool = true;
			} catch (Throwable throwable) {
				return false;
			}
			return bool;
		}
		if (1 == i) {
			boolean bool;
			try {
				Object object = Class407.method7248(anApplet2723, string_7_, (new Object[] { new URL(anApplet2723.getCodeBase(), string).toString() }), (byte) 73);
				bool = null != object;
			} catch (Throwable throwable) {
				return false;
			}
			return bool;
		}
		if (i == 2) {
			boolean bool;
			try {
				anApplet2723.getAppletContext().showDocument(new URL(anApplet2723.getCodeBase(), string), "_blank");
				bool = true;
			} catch (Exception exception) {
				return false;
			}
			return bool;
		}
		if (i == 3) {
			try {
				Class407.method7247(anApplet2723, "loggedout", -1086319507);
			} catch (Throwable throwable) {
				/* empty */
			}
			boolean bool;
			try {
				anApplet2723.getAppletContext().showDocument(new URL(anApplet2723.getCodeBase(), string), "_top");
				bool = true;
			} catch (Exception exception) {
				return false;
			}
			return bool;
		}
		throw new IllegalArgumentException();
	}

	public static boolean method4644(String string, int i, String string_10_) {
		if (i == 0) {
			boolean bool;
			try {
				if (!aString2720.startsWith("win"))
					throw new Exception();
				if (!string.startsWith("http://") && !string.startsWith("https://"))
					throw new Exception();
				String string_11_ = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789?&=,.%+-_#:/*";
				for (int i_12_ = 0; i_12_ < string.length(); i_12_++) {
					if (string_11_.indexOf(string.charAt(i_12_)) == -1)
						throw new Exception();
				}
				Runtime.getRuntime().exec(new StringBuilder().append("cmd /c start \"j\" \"").append(string).append("\"").toString());
				bool = true;
			} catch (Throwable throwable) {
				return false;
			}
			return bool;
		}
		if (1 == i) {
			boolean bool;
			try {
				Object object = Class407.method7248(anApplet2723, string_10_, (new Object[] { new URL(anApplet2723.getCodeBase(), string).toString() }), (byte) -33);
				bool = null != object;
			} catch (Throwable throwable) {
				return false;
			}
			return bool;
		}
		if (i == 2) {
			boolean bool;
			try {
				anApplet2723.getAppletContext().showDocument(new URL(anApplet2723.getCodeBase(), string), "_blank");
				bool = true;
			} catch (Exception exception) {
				return false;
			}
			return bool;
		}
		if (i == 3) {
			try {
				Class407.method7247(anApplet2723, "loggedout", -1008444247);
			} catch (Throwable throwable) {
				/* empty */
			}
			boolean bool;
			try {
				anApplet2723.getAppletContext().showDocument(new URL(anApplet2723.getCodeBase(), string), "_top");
				bool = true;
			} catch (Exception exception) {
				return false;
			}
			return bool;
		}
		throw new IllegalArgumentException();
	}

	public static boolean method4645(String string, int i, String string_13_) {
		if (i == 0) {
			boolean bool;
			try {
				if (!aString2720.startsWith("win"))
					throw new Exception();
				if (!string.startsWith("http://") && !string.startsWith("https://"))
					throw new Exception();
				String string_14_ = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789?&=,.%+-_#:/*";
				for (int i_15_ = 0; i_15_ < string.length(); i_15_++) {
					if (string_14_.indexOf(string.charAt(i_15_)) == -1)
						throw new Exception();
				}
				Runtime.getRuntime().exec(new StringBuilder().append("cmd /c start \"j\" \"").append(string).append("\"").toString());
				bool = true;
			} catch (Throwable throwable) {
				return false;
			}
			return bool;
		}
		if (1 == i) {
			boolean bool;
			try {
				Object object = Class407.method7248(anApplet2723, string_13_, (new Object[] { new URL(anApplet2723.getCodeBase(), string).toString() }), (byte) 94);
				bool = null != object;
			} catch (Throwable throwable) {
				return false;
			}
			return bool;
		}
		if (i == 2) {
			boolean bool;
			try {
				anApplet2723.getAppletContext().showDocument(new URL(anApplet2723.getCodeBase(), string), "_blank");
				bool = true;
			} catch (Exception exception) {
				return false;
			}
			return bool;
		}
		if (i == 3) {
			try {
				Class407.method7247(anApplet2723, "loggedout", -779362809);
			} catch (Throwable throwable) {
				/* empty */
			}
			boolean bool;
			try {
				anApplet2723.getAppletContext().showDocument(new URL(anApplet2723.getCodeBase(), string), "_top");
				bool = true;
			} catch (Exception exception) {
				return false;
			}
			return bool;
		}
		throw new IllegalArgumentException();
	}

	public static String method4646(Class587_Sub34_Sub8 class587_sub34_sub8, int i) {
		if (Class16.aBool153 || class587_sub34_sub8 == null)
			return "";
		int[] is = Class171_Sub2.method15386(class587_sub34_sub8, 221499366);
		if (is == null)
			return "";
		return Class172.method3771(is, -941689695);
	}

	public static int method4647(int i, int i_16_, int i_17_, byte i_18_) {
		if (Class578_Sub1.anInt8522 * -1036903247 < 100)
			return -2;
		int i_19_ = -2;
		int i_20_ = 2147483647;
		int i_21_ = i_16_ - Class578_Sub1.anInt7393;
		int i_22_ = i_17_ - Class578_Sub1.anInt7407;
		for (Class587_Sub2 class587_sub2 = ((Class587_Sub2) Class578_Sub1.aClass413_7405.method7361(1517403297)); null != class587_sub2; class587_sub2 = (Class587_Sub2) Class578_Sub1.aClass413_7405.method7344(247869043)) {
			if (i == -243305725 * class587_sub2.anInt8428) {
				int i_23_ = -1842551841 * class587_sub2.anInt8429;
				int i_24_ = class587_sub2.anInt8430 * -875033889;
				int i_25_ = (i_23_ + Class578_Sub1.anInt7393 << 14 | Class578_Sub1.anInt7407 + i_24_);
				int i_26_ = ((i_21_ - i_23_) * (i_21_ - i_23_) + (i_22_ - i_24_) * (i_22_ - i_24_));
				if (i_19_ < 0 || i_26_ < i_20_) {
					i_19_ = i_25_;
					i_20_ = i_26_;
				}
			}
		}
		return i_19_;
	}
}
