comSysStudent 1 Light Poster

Hi All,

hopefully someone can help me out, I'm using the below code to try and play sound and switch image on rollover, works perfectly in IE but intermittently with broken sound on firefox and not at all on chrome(image swap works fine on all)

I've already tried using an object tag and nesting the embed tag within and changing to a separate sound function using document.getElementByID but no luck. With any luck someone has dealt with this before. I've spent the last 2 hours on Google looking for a solution but so far no joy.

function rollover(img_name, img_src)  
{
    document.getElementById(img_name).src = img_src;
    document.click.Play();
}
</script>
<embed src="mouseover.mp3" height=0px width=0px autostart=false name=click text="audio/mpeg">
</embed>
<a onmouseover="rollover('homejpg', 'homein.jpg')" onmouseout="rollover('homejpg', 'homeout.jpg')" href=bbandhome.html>
<img class="sidebarimg" src="homeout.jpg" height=34 width=180 border=0 id="homejpg" alt=Broadband />
</a>