diff -r fc9762553a3c -r 8f532d8ab5f5 includes/clientside/static/faders.js --- a/includes/clientside/static/faders.js Fri Jul 06 11:45:50 2007 -0400 +++ b/includes/clientside/static/faders.js Tue Jul 10 00:40:52 2007 -0400 @@ -380,6 +380,32 @@ } } +var opacityDOMCache = new Object(); +function domOpacity(obj, opacStart, opacEnd, millisec) { + //speed for each frame + var speed = Math.round(millisec / 100); + var timer = 0; + + // unique ID for this animation + var uniqid = Math.floor(Math.random() * 1000000); + opacityDOMCache[uniqid] = obj; + + //determine the direction for the blending, if start and end are the same nothing happens + if(opacStart > opacEnd) { + for(i = opacStart; i >= opacEnd; i--) { + setTimeout("var obj = opacityDOMCache["+uniqid+"]; domObjChangeOpac(" + i + ",obj)",(timer * speed)); + timer++; + } + } else if(opacStart < opacEnd) { + for(i = opacStart; i <= opacEnd; i++) + { + setTimeout("var obj = opacityDOMCache["+uniqid+"]; domObjChangeOpac(" + i + ",obj)",(timer * speed)); + timer++; + } + } + setTimeout("delete(opacityDOMCache["+uniqid+"]);",(timer * speed)); +} + //change the opacity for different browsers function changeOpac(opacity, id) { var object = document.getElementById(id).style;