var loginDisabled = 0; // true or false (0 or 1);
var alertMsg = "Login is currently disabled for system maintenance.";
var pageMsgTitle = "Rensselaer LMS Notice";
var pageMsg = "Rensselaer LMS is undergoing scheduled system maintenance.  Access to the system is disabled during this process and will be restored when servicing is complete.";

function loginTest() {
  if (loginDisabled) {
    alert(alertMsg);
  } else {
    submitLogin();
  }
}

function checkPageMsg() {
  var msgBox = document.getElementById("loginDisabledMsg");
  if (loginDisabled) {
    msgBox.innerHTML = '<h3>' + pageMsgTitle + '</h3><div id="loginDisabledMsgBox">' + pageMsg + '</div>';
  } else {
    msgBox.innerHTML = "";
  }
}

function checkLoginOk() {
  if (loginDisabled) {
    location.replace("http://rpilms.rpi.edu/");
  }
}
