opacity = 1;
function setOpacities(op)
{
    opacity = op;
    var t = Math.pow(1 - op, 2); // Raise this number to make more of the transition occur towards the end of the interval.
    document.getElementById("photo2").style.opacity = t;
 
    // HACK for IE:
    if(document.getElementById("photo2").filters)
    {
        document.getElementById("photo2").filters.alpha.opacity = t * 100;
    }
}
function fader()
{
    var op = opacity - 1.0 / fadeIntervalCount;
    if(op <= 0)
    {
        setOpacities(0);
        whenDone();
    }
    else
    {
        setOpacities(op);
        timer = setTimeout("fader()", fadeInterval);
    }
}

