function opacityChange(TransitionIDValue, opacityStartValue, opacityEndValue, millisec) {

        //this will dictate the spped for each frame of the transition
        var fadeSpeed = Math.round(millisec / 100);
        var internalTimer = 0;

        //determine the direction for the blending, if start and end are the same nothing happens
        if(opacityStartValue > opacityEndValue) {
                for(i = opacityStartValue; i >= opacityEndValue; i--) {
                        setTimeout("changeOpacity(" + i + ",'" + TransitionIDValue + "')",(internalTimer * fadeSpeed));
                        internalTimer++;
                }
        } else if(opacityStartValue < opacityEndValue) {
                for(i = opacityStartValue; i <= opacityEndValue; i++)
                        {
                        setTimeout("changeOpacity(" + i + ",'" + TransitionIDValue + "')",(internalTimer * fadeSpeed));
                        InternalTimer++;
                }
        }
}

//change the opacity for different browsers
function changeOpacity(opacity, id) {
        var object = document.getElementById(id).style;
        object.opacity = (opacity / 100);
        object.MozOpacity = (opacity / 100);
        object.KhtmlOpacity = (opacity / 100);
        object.filter = "alpha(opacity=" + opacity + ")";
}

