String.prototype.trim = function() {
	a = this.replace(/^\s+/, '');
	return a.replace(/\s+$/, '');
}

function validate_form() {
	if (document.thisform.username.value.trim() == "") {
		alert ("Please enter your username.");
		document.thisform.username.focus();
		return false;
	}
	if (document.thisform.password.value.trim() == "") {
		alert ("Please enter your password.");
		document.thisform.password.focus();
		return false;
	}
	return true;
}

