var xhr;
function modifyPage(link) {
    try {
        xhr = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
        try {
            xhr = new ActiveXObject("Microsoft.XMLHTTP");
        } catch (E) {
            xhr = false;
        }
    }

    if (!xhr && typeof XMLHttpRequest != 'undefined') {
          xhr = new XMLHttpRequest();
    }

    xhr.open("GET", link);
    xhr.setRequestHeader("User-Agent", "my browser");
    xhr.onreadystatechange=function() {
        if (xhr.readyState != 4) return;

        document.getElementById("aktivcontent").innerHTML = xhr.responseText;
    }
    xhr.send(null);
}

function modifyHist(link) {
    try {
        xhr = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
        try {
            xhr = new ActiveXObject("Microsoft.XMLHTTP");
        } catch (E) {
            xhr = false;
        }
    }

    if (!xhr && typeof XMLHttpRequest != 'undefined') {
          xhr = new XMLHttpRequest();
    }

    xhr.open("GET", link);
    xhr.setRequestHeader("User-Agent", "my browser");
    xhr.onreadystatechange=function() {
        if (xhr.readyState != 4) return;

        document.getElementById("hist_activ").innerHTML = xhr.responseText;
    }
    xhr.send(null);
}

function addLoadEvent(func) {
    var oldonload = window.onload;
    if (typeof window.onload != 'function') {
        window.onload = func;
    } else {
        window.onload = function() {
            if (oldonload) {
                oldonload();
            }
            func();
        }
    }
}

function showdiv() { 
  if (document.getElementById) { // DOM3 = IE5, NS6 
    document.getElementById('hidden').style.visibility = 'visible'; 
  }else{ 
    if (document.layers) { // Netscape 4 
      document.hideshow.visibility = 'visible'; 
    }else{ // IE 4 
      document.all.hideshow.style.visibility = 'visible'; 
    } 
  } 
}

