	if (IE4) {
		document.body.onload = initialize;
	} else {
		window.onload = initialize;
	}

	function initialize()
	{
		document.loginform.name.focus();
	}

	function validateForm()
	{
		form = document.loginform;
		for (var index = 0; index < form.length; index++) {
			var element = form.elements[index];
			if (element.type == "text" | element.type == "password") {
				if (isBlank(element.value)) {
					if (element.name == "name") {
						alert("You must enter a name.");
						form.name.focus();
					} else if (element.name == "tpshortname") {
						alert("You must enter an organization name. If you are a guest, enter 'guest' for the org name.");
						form.tpshortname.focus();
					} else if (element.name == "password") {
						alert("You must enter a password.");
						form.password.focus();
					}
					return;
				}
			}
		}
		form.submit();
	}

	function isBlank(value)
	{
		if (value == null || value == "")
			return true;
		for (var index = 0; index < value.length; index++) {
			var c = value.charAt(index);
			if (c != ' ' && c != '\n' && c != '\t')
				return false;
		}
		return true;
	}