function getCookie(ID) {
	if (document.cookie != "") {
		CookieName = "milmilbbs";
		CookieValue = document.cookie + ";";
		myCookie = "";

		start = CookieValue.indexOf(CookieName);
		if (start != -1) {
			end = CookieValue.indexOf(";", start);
			myCookie = CookieValue.substring(start + CookieName.length, end);
		}

		if (myCookie != "") {
			Cookie = new Array();
			Pairs = myCookie.split(",");

			for (i = 0; i < Pairs.length; i ++) {
				Cookie[i] = Pairs[i].split(":")[1];
			}

			flag = 0;

			switch (navigator.appName) {
				case "Microsoft Internet Explorer":
					if (eval(navigator.appVersion.substr(22, 3)) >= 5.5) flag = 1;
					break;
				case "Netscape":
					if (eval(navigator.appVersion.substr(0, 3)) >= 5) flag = 1;
					break;
			}

			if (flag == 1)  Cookie[0] = decodeURIComponent(Cookie[0]); else Cookie[0] = "";

			if (Cookie[0] != "") document.milmilbbs.name.value = Cookie[0];
			if (Cookie[1] != "") document.milmilbbs.mail.value = Cookie[1];
			if (Cookie[2] != "") document.milmilbbs.url.value = "http://" + Cookie[2];
			if (Cookie[3] != "") document.milmilbbs.key.value = Cookie[3];
		}
	}
}
