script only works when alert() is unescaped?
<p>I got a script which works in IE and chrome but not in FF.. Or it works in all three if I unescape the line where 'x' is alerted!?</p>

<p>in FF 3.6 the div is first visible when the script is half done.. it just jumps to the middle of the "moving line"</p>

<pre><code>&lt;div id="tst" style="position:absolute; top:200px; left:200px; height:100px; width:100px; background:#ff0000"&gt;&lt;/div&gt;

&lt;script type="text/javascript"&gt;
    function Tween(){
        this.time = 0;
        this.duration = 800;
        this.x_start = 0;
        this.x_end = 0;

        this.target_func = null;

        this.method_func = null;
        this.loop = null;
        this.interval = 20;

        this.start = function(){
            if(!this.method_func){
                this.method_func = this.regularEaseOut;
            }

            var _this = this;
            this.loop = setInterval(function(){
                if(_this.set_time() &gt; 0){
                    var x = _this.method_func();
                    //alert(x);
                    _this.target_func(x);
                }
            }, this.interval);
        };

        this.set_time = function(){
            this.time += this.interval;
            if(this.time &gt; this.duration){
                clearInterval(this.loop);
                this.time = 0;
            }

            return this.time;
        };

        this.regularEaseInOut = function(){
            var t = this.time;
            var s = this.x_start;
            var e = this.x_end;
            var d = this.duration;

            if((t/=d/2) &lt; 1){
                return c/2*t*t + b;
            }
            else{
                return -c/2 * ((--t)*(t-2) - 1) + b;
            }
        };

        this.regularEaseIn = function(){
            var t = this.time;
            var s = this.x_start;
            var e = this.x_end;
            var d = this.duration;

            return c*(t/=d)*t + b;
        };

        this.regularEaseOut = function(){
            var t = this.time;
            var s = this.x_start;
            var e = this.x_end;
            var d = this.duration;

            return -e *(t/=d)*(t-2) + s;
        };
    }

    var Tween = new Tween();
    Tween.x_start = 200;
    Tween.x_end = 1200;
    Tween.target_func = function(x){
        document.getElementById('tst').style.left = x+'px';
    };
    Tween.start();
&lt;/script&gt;
</code></pre>
