Start/Stop timer with alarm

Hi there, i have two button here first one is working for an alarm (the sound file is on my pc)
please can u find out why the second button is not working here:(can`t use it to stop the alarm)

Timer stop
	var the_timer;
            function sound(){
		var audio = new Audio("alarm/alarm.mp3");;

	function timer(){
		var answer = prompt("set the waiting time in seconds please");
		var period = answer*1000;
		the_timer = setTimeout(sound,period);

	function stop(){


Can you please post the HTML for your buttons, as well as the event handler code you have bound to them. Thanks.