var movie   = window.document.plane;
var movie2  = window.document.plane2;
var playing = setInterval("destroyPlane()", 1);
var playing2;

function destroyPlane() {
    if (movie.IsPlaying() == false) {
        var x = document.getElementById('menuOverlay');
        x.parentNode.removeChild(x);

        movie.parentNode.removeChild(movie);
        clearInterval(playing);
        movie2.Play();
        playing2 = setInterval("destroyPlane2()", 1);
    }
}

function destroyPlane2() {
    if (movie2.IsPlaying() == false) {
        movie2.parentNode.removeChild(movie2);
        document.getElementById("plane-small").style.visibility = "visible";
        clearInterval(playing2);
    }
}
