Lose the target=blank from the link. Its messing with the javascript as it opens a new window before the link has a chance to execute the javascript.
<a href="..." [red]target='blank'[/red] ...>...</a>
Alternatively, use the OnClick event of the link instead of the HREF to execute your function. Remember to follow the function call with a return false; statement to avoid executing the blank HREF then.
----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.