Put this in the body of your page (not in the <body tag>):
<bgsound src="#" id=music loop=1 autostart="true">
Put the following code in the <a> tag:
onClick="document.all.music.src='http://www.groovything.com/userWAV/laughsmall.wav';">
You can see it work here(click on the forum avatar):
http://www.groovything.com/default.php?menu=c&subM=d_f&css=06&page=forum&action=view&topicID=2
This will only work for ie as far as I know. for netscape, I just do this:
href="<? echo $WAVpath ?>" onClick="NewWindow(this.href,'wav','100','100','no','center');return false" onFocus="this.blur()
looks like this:
<a <? if (eregi("MSIE",$HTTP_USER_AGENT)){ ?>style="cursor:hand" onClick="document.all.music.src='<? echo $WAVpath ?>';"<?}else{?>href="<? echo $WAVpath ?>" onClick="NewWindow(this.href,'wav','100','100','no','center');return false" onFocus="this.blur()"<?}?>><img src="<? echo $IMGpath ?>" border="0" width="60" height="60" align="right"></a>