> Javascript pop up image after complete function?

Javascript pop up image after complete function?

Posted at: 2014-12-18 






????

????Mid Term Project

????





????


????????tie
???????????? height="20">

????????


????????xwing
???????????? width="40" height="20">

????


????







Like it says, after I have a function finish I want an image to pop up. I put an alert on it which when the function is done the alert shows. I want it to pop up an image instead. Heres my code

function fly() {

var racer = racers[ Math.floor(Math.random() * racers.length) ];

var newPos = parseInt( racer.style.left || 0 ) + 25;

racer.style.left = newPos + "px";

if( (newPos + racer.clientWidth) >= window.innerWidth){

clearInterval( interval );

alert( "And the winner is " + racer.id );

once the images get to the right side of the page, I want to pop up an image