I am using a java banner rotator mod on my site. I would like to use a flash banner, which does not take but when i put in "embed" instead of the "img" it works but the image will not link then.

Here is the code, where something should be changed. i know it is something simply i just can not figure it out.

document.write('<center><a href="' + link1 + '" target="_blank">');
document.write('<embed src="' + adBanner1 + '" width=' + width1 + ' height=' + height1 + ' border=0 alt="' + alt1 + '"></a>');