// JavaScript Document
function validateForm() {
with (document.login_time) {
var alertMsg = "The following REQUIRED fields\nhave been left empty:\n";
if (username.value == "") alertMsg += "\n Username";
if (password.value == "") alertMsg += "\n Password";
if (recaptcha_response_field.value == "") alertMsg += "\n CAPTCHA Response Field";
if (alertMsg != "The following REQUIRED fields\nhave been left empty:\n") {
alert(alertMsg);
return false;
} else {
return true;
} } }

function mySubmit() {
  // assign our form to object f
  var f = document.forms.login_time;
  // disable the submit button (not an actual submit button, but our button)
  f.submitButton.disabled = true;
  // submit the form
  f.submit();
}