Variable no accesible cuando se inicializa fuera de la función

Cuando uso un código como este, funciona bien:

function removeWarning() {
    var systemStatus = document.getElementById("system-status");
    systemStatus.innerHTML = "";
}

function indicateInvalidUsername() {
    var systemStatus = document.getElementById("system-status");
    systemStatus.innerHTML = "Invalid username";
}

Sin embargo, cuando quiero mover elsystemStatus para ser una variable global, no funciona:

var systemStatus = document.getElementById("system-status");

function removeWarning() {
    systemStatus.innerHTML = "";
}

function indicateInvalidUsername() {
    systemStatus.innerHTML = "Invalid username";
}

¿Qué se supone que debo hacer aquí?

Respuestas a la pregunta(7)

Su respuesta a la pregunta