Calling shaddowbox from AS2

I’m trying to call the Shaddowbox Image Viewer from a flash button without any success.

The normal instance for calling it would be:

<a rel="shadowbox" href="imageURL">Image Name</a>

I’ve tried to initialize w/ javascript using

<script type="text/javascript">
function SWFDelegate(url,width,height,caption) {
   var objLink = document.createElement('a');
   objLink.setAttribute('href',url);
   objLink.setAttribute('rel','shadowbox');
}
</script>

and this AS2 in my flash file:

on (release) {  getURL("javascript:SWFDelegate('images/TroddenWeed.jpg')");}

but nothing seems to work.

Any help would be much appreciated.