    function ToggleDisplay(ID, height) {
        var animation, open, from, to;
        var box = document.getElementById(ID);
        open = (box.offsetHeight == 0);
        height = (open)? height:0;
        // add additional height on firefox
        if (navigator.userAgent.indexOf('Gecko') != -1 && open) height += 16;
        from = (open)? 0:1;
        to = (open)? 1:0;
        var attributes = {
                height: {to: height }, opacity: { from: from, to: to }
            }; 
        var before = function() {
            box.style.display = 'block';
        }
        var after = function() {
            if (!open) box.style.display = 'none';
        }
        animation = new YAHOO.util.Anim(ID, attributes, 1, YAHOO.util.Easing.easeOut);
        animation.onStart.subscribe(before);
        animation.onComplete.subscribe(after);
        animation.animate();
    }    
