I am new to javascript and cannot get the delay to work. In essence, I want to change an image (name="centerimg") when a user mouses over a link but I want a delay of 2 seconds before it occurs. The image swap is working but the delay does not. I have been staring at this for hours and cannot get it. Please help!

These are the two functions:

function wait(img_name,img_src,delay){

function changeimg(img_name,img_src){

This is the call to the function:

<p><a href="weddings.html" onmouseover="wait('centerimg','images/imagename.jpg',2000);">Link Text</a></p>