/* 
 * Script decompiled by jagdecs2 v3.2
 * Decompiler opts:
 * --------------
 * t1LocalAnalyzer:true
 * t2LocalAnalyzer:true
 * beautifier:true
 * --------------
 * Made by mgi125 ;)
 */


void script_7831() {
	if (cs2method_10962() == -3 || cs2method_10856() == -3) {
		return;
	}
	int v0 = 1;
	if (cs2_configs['cfg3688'] == 0) {
		v0 = 0;
	}
	if (cs2_configs['cfg3690'] == 0) {
		v0 = 0;
	}
	if (cs2_configs['cfg3689'] == 0) {
		v0 = 0;
	}
	if (cs2_configs['cfg3691'] == 0) {
		v0 = 0;
	}
	if (v0 == 1) {
		if (cs2_configs['cfg1407'] < 13 || cs2method_10572() == 1) {
			if (cs2method_10572() == 0) {
				cs2method_10753();
			}
			script_7846(93061559);
			script_7911();
			script_7847();
			cs2method_20162(new function<none>() {
			}, "", new WidgetPointer(1420,328));
			return;
		}
		cs2method_10095(cs2_configs['cfg1407'], cs2_configs['cfg1411'], cs2_configs['cfg2555'], cs2_configs['cfg2559'], cs2_configs['cfg2563']);
		cs2method_20162(new function<script_3220>() {
			int v3 = cs2method_10742();
			if (v3 == -3) {
				return;
			}
			cs2method_20162(new function<none>() {
			}, "", new WidgetPointer(1420,328));
			int v4 = 0;
			object v2 = "accountappeal";
			object v0 = "passwordchoice.ws";
			if (v3 == 2) {
				cs2_configs['cfg3681'] = 0;
				cs2_configs['cfg3683'] = "";
				cs2method_10743();
				cs2method_10118(16);
				script_7886();
			} else {
				switch (v3) {
					default:
						script_3213("Unexpected server response.", 93061190);
						break;
					case 3:
						script_3213("Error contacting server.", 93061190);
						break;
					case 4:
						script_7846(93061559);
						script_7911();
						script_7847();
						return;
					case 38:
					case 9:
						script_3213("You cannot create an account at this time. Please try again later.", 93061190);
						break;
					case 20:
						script_3213("Email already in use. Try a different email or click " + "<u=ebe0bc>" + "here" + "</u>" + " to recover this account.", 93061190);
						break;
					case 21:
						script_3213("Please enter a valid Email address.", 93061190);
						break;
					case 30:
						int v1 = cs2method_10265(cs2_configs['cfg2559']);
						if (v1 < 5) {
							script_3213("Passwords must be at least 5 characters long.", 93061188);
						} else if (v1 > 20) {
							script_3213("Passwords must be no more than " + (string)cs2method_10379(20) + " characters long.", 93061188);
						} else {
							script_3213("Please supply a valid password.", 93061188);
						}
						break;
					case 34:
						script_3213("Please supply a valid password.", 93061188);
						break;
					case 31:
						script_3213("Passwords may only contain letters and numbers.", 93061188);
						break;
					case 32:
					case 33:
						script_3213("Your password is too easy to guess.", 93061188);
						break;
					case 5:
						script_3213("Please enter a valid display name.", 93061194);
						break;
					case 6:
						script_3213("Your password is too easy to guess.", 93061188);
						break;
					case 10:
						script_3213("Please supply a valid age.", 93061192);
				}
			}
			script_7911();
			script_7848();
			return;
		}, "", new WidgetPointer(1420,328));
		cs2method_10467(0, 93061448);
	} else {
		script_7911();
		script_7848();
		cs2method_20162(new function<none>() {
		}, "", new WidgetPointer(1420,328));
	}
	return;
}
