function is_proxied() {
  if(document.location.hostname.match(/proxy.cvt.dk$/i)) {
    return true;
  } else {
    return false;
  }
}

function proxy_login() {
    var port = ((location.port) ? location.port : "80");

    if (is_proxied()) {
        /* HTML code displaying logged in message. */
        document.write("<b>logged in</b>");
    } else {
        /* HTML code displaying login option.*/
        document.write(
            '<a class=\"navigation\" href=http://'
            + port
            + '-'
            + location.hostname
            + '.globalproxy.cvt.dk:2048'
            + location.pathname
            + '><b>login</b></a>'
        );
    }
}
