private void initPage() {

		autoSelectEncoding();

		if (runOnCD) {
			navigator.visitLocation(startingURL != null ? startingURL : getStaticRoot() + "index.cml");
			return;
		}

		String proxyAddress = preference.get("Proxy Address", null);
		if (proxyAddress != null) {
			int proxyPort = preference.getInt("Proxy Port", -1);
			if (proxyPort != -1) {
				System.setProperty("http.proxyHost", proxyAddress);
				System.setProperty("http.proxyPort", proxyPort + "");
				System.setProperty("proxySet", "true");
				String proxyUserName = preference.get("Proxy Username", null);
				String proxyPassword = preference.get("Proxy Password", null);
				if (proxyUserName != null && proxyPassword != null) {
					Authenticator.setDefault(new MyAuthenticator(proxyUserName, proxyPassword));
				}
			}
		}

		String spt = preference.get("Start From", null);

		if (startingURL == null && PreferencesDialog.DEFAULT_HOME_PAGE.equals(spt)) {
			String s = getStaticRoot();
			Locale l = Locale.getDefault();
			if (l != null) {
				if (Locale.PRC.equals(l))
					navigator.visitLocation(s + "cn/index.cml");
				else if (Locale.TAIWAN.equals(l))
					navigator.visitLocation(s + "tw/index.cml");
				else {
					String language = l.getLanguage();
					if (sameLanguage(language, "ru")) {
						navigator.visitLocation(s + "ru/index.cml");
					}
					else if (sameLanguage(language, "es")) {
						navigator.visitLocation(s + "es/index.cml");
					}
					else if (sameLanguage(language, "no")) {
						navigator.visitLocation(s + "no/index.cml");
					}
					else {
						navigator.visitLocation(s + "index.cml");
					}
				}
			}
		}
		else {
			if (startingURL == null) {
				if (PreferencesDialog.HOME_PAGE.equals(spt)) {
					String hp = Initializer.sharedInstance().getSystemProperty(PreferencesDialog.HOME_PAGE);
					navigator.visitLocation(hp != null ? hp : navigator.getHomePage());
				}
				else if (PreferencesDialog.LAST_VISITED_PAGE.equals(spt)) {
					String lpv = Initializer.sharedInstance().getSystemProperty(PreferencesDialog.LAST_VISITED_PAGE);
					if (lpv != null)
						navigator.visitLocation(lpv);
				}
				else {
					navigator.visitLocation(navigator.getHomePage());
				}
			}
			else {
				navigator.visitLocation(startingURL);
			}
		}

		Debugger.print("Load starting page");
		LogDumper.sharedInstance().dump(new Date() + ": Starting page loaded.");

	}