Swapping thumb for large image not working

I am having trouble getting thumbnail images to swap with the main image.

It’s a bit complicated as its embeded in asp, but I dont have an error, just the images arent swapping.

Here is an example:

http://www.pendulumofmayfair.co.uk/product/grandfather-clock-by-john-grantham-newbury-badminton-automaton-rare#

And the code in full:


<script type="text/javascript">
/*<=!=[=C=D=A=T=A=[*/
function Swap(obj,id){
 var main=document.getElementById(id).getElementsByTagName('IMG')[0],msrc=main.src,obj=obj.getElementsByTagName('IMG')[0],tsrc=obj.src;
 main.src=tsrc;
 obj.src=msrc;
 return false;
}
/*]=]=>*/
</script>

wr "<div class='ClockImg'>" & vbcrlf
wr "<table style='position:relative; width:100%; text-align:right'><tr><td>" & vbcrlf
wr "<div id='imgHolder'>" & vbcrlf
wr "<img src='/products/" & arr(0,i) & "/" & image & ".jpg' alt='" & arr(14,i) & "'/>" & vbcrlf
wr "</div>" & vbcrlf
wr "</td><td id='thumbz'>" & vbcrlf
For j = 1 To 6
Select Case j
Case 1 : filename = "a"
Case 2 : filename = "b"
Case 3 : filename = "c"
Case 4 : filename = "d"
Case 5 : filename = "e"
Case 6 : filename = "f"
End Select
If fs.FileExists(Server.MapPath(".") & "\\products\\" & pid & "\\" & filename & ".jpg")=true then
     
wr "<a href='#' class='showImg active' onmouseup=""<script>return Swap(this,'imgHolder');</script>""><img class='HomeFeaturedImages3' src='/products/" & arr(0,i) & "/" & filename & ".jpg' width='75' alt='" & Server.HtmlEncode(arr(13+j,i)) & "' /></a>" & vbcrlf
     
End If

wr "</tr></table>" & vbcrlf
wr "</div>" & vbcrlf


There no errors on the page, just the images wont swap.

Im guessing, its htis bit:


onmouseup=""<script>return Swap(this,'imgHolder');</script>""

As it just doesnt seem right, and when i view the code through view source the script bit around it doesnt hightlight to a different colour.

Will have a play with this, but really could do with a touch of help to finish this off

Well by the looks i was right, but silly me added the <script> bit in, took it out and it worked.


wr "<a href='#' class='showImg' onmouseup=""return Swap(this,'imgHolder');""><img class='HomeFeaturedImages3' src='/products/" & arr(0,i) & "/" & filename & ".jpg' width='75' alt='" & Server.HtmlEncode(arr(13+j,i)) & "' /></a>" & vbcrlf