function FadeOut(id) {
    new Effect.Fade (
        id, {
            duration:2.0,
            afterFinish: function() {
                Effect.Appear (
                    'headnav', {
                        duration:1.0
                    }
                    ),
                Effect.Appear (
                    'player', {
                        duration:1.0
                    }
                    )
            }
        }
        );
}

function AppearIn(id) {
    new Effect.Appear (
        id, {
            duration:2.0,
            beforeStart: function() {
                document.getElementById("headnav").style.display = "none";
                document.getElementById("player").style.display = "none";
            }
        }
        );
}