function MuhusStuff() {
    // ugly hack to see if the user is logged in
    if (document.getElementById('username')) {
      if (document.getElementById('username').firstChild.firstChild.firstChild.nodeValue == 'Log ind') {
        var foo = document.createElement('li');
        foo.innerHTML = '<a href="/BrugerProfil">Opret konto</a>'
        document.getElementById('username').appendChild(foo);
      }
    }

    var foo = document.createElement('li');
    foo.innerHTML = '<a href="javascript:ToggleEditBars();">Vis/skjul v&aelig;rkt&oslash;jslinje</a>'
    document.getElementById('username').appendChild(foo);
    if (window.sessionStorage) {
      if (sessionStorage.editBars == 'block') {
        ToggleEditBars();
      }
    }

    if (top.location != self.location) {
      top.location.replace(self.location);
    }
}

function ToggleEditBars() {
    if (document.all) {
      location.replace('/static/msieedit.html');
    } else {
      elm = document.getElementById('muhusmod_editbar_more');
      if (elm.style.display == 'block') {
        displayStyle = 'none';
      } else {
        displayStyle = 'block';
      }
      if (window.sessionStorage) sessionStorage.editBars = displayStyle;
      elm.style.display = displayStyle;
      // ugly ugly ugly ugly ugly hack
      elm.previousSibling.previousSibling.lastChild.previousSibling.style.display = displayStyle;
      if (document.getElementById('pageinfo')) document.getElementById('pageinfo').style.display = displayStyle;
    }
}
