Sorry it was late, and I was tired....
<a name="mypopuplink" id="mypopuplink" href="javascript
:void(0);" onclick="javascript
: return !popupOpen(xcart_web_dir + '/popup_ask.php?productid=2'); return false;"><img src="{ImagesDir}/mypopupimage.jpg" /></a>
Still haven't tested it, but it should work fine.
Edit: I have since tested this and it does work in at least IE9.