Hi to all,

I am very much new to Javascript and learning in my University. So here I got a project on controlling background sound with javascript.

Although I was able to enable the play and stop button, I failed to make the pause button work.

Here is the code:
<html>
<head>
<title> Music Player</title>
<script language="javascript">
function m1()
{
s1.src=f1.value;
a1.style.visibility="hidden";
a2.style.visibility="visible";
}
function m2()
{

a1.style.visibility="visible";
a2.style.visibility="hidden";
}
function m3()
{
s1.src="";
a1.style.visibility="visible";
a2.style.visibility="hidden";
}
</script>
</head>
<body>
<bgsound src="" id="s1">
<input type="file" id="f1"><br/>
<!--Play button starts-->
<input type="button" value="Play" id="a1" onClick="m1()" style="position:absolute; visibility:visible">
<!--Pause button starts-->
<input type="button" value="Pause" id="a2" onClick="m2()" style="position:absolute; visibility:hidden">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<!--Stop button starts-->
<input type="button" value="Stop" id="a3" onClick="m3()">
</body>
</html>
I worked on numerous steps to enable the pause function but all failed.
Now please help me as I am extremely new to this and yet to learn how to work with embed src. So it may sound foolish working with bgsound but can't help as the project is based on bgsound only.

Thanks in anticipation. Any type of help will be highly regarded.