I have here a working fade out script:

Code:
function fadeOut(elem, time) {

    var startOpacity, elemId;

    elemId = document.getElementById(elem);

    startOpacity = elemId.style.opacity || 1;
    elemId.style.opacity = startOpacity;

    (function go() {
        elemId.style.opacity -= startOpacity / (time / 100);

        elemId.style.filter = 'alpha(opacity=' + elemId.style.opacity * 100 + ')';

        if (elemId.style.opacity > 0) {
            setTimeout(go, 100);
        } else {
            elemId.style.display = 'none';
        }

    })();
}
Below is the above but altered for fade in. It's not working but I'm sure I'm almost there:

Code:
function fadeIn(elem, time) {

    var startOpacity, elemId;

    elemId = document.getElementById(elem);

    startOpacity = elemId.style.opacity || 0;
    elemId.style.opacity = startOpacity;

    (function go() {

        elemId.style.opacity += startOpacity / (time / 100);

        //elemId.style.filter = 'alpha(opacity=' + elemId.style.opacity * 100 + ')';

        if (elemId.style.opacity < 1) {
            setTimeout(go, 100);
        } else {
            elemId.style.display = 'block';
        }

    })();
}