// Requires this code inserted into body
// <div id="sound" style="visibility:hidden;  height:10px"></div>

//*****************************
//changes content of a div 
function writeit(text,id)
{
   var x
	if (document.getElementById)
	{
		x = document.getElementById(id);
		if(!x)return;
		x.innerHTML = '';
		x.innerHTML = text;
	}
	else if (document.all)
	{
		x = document.all[id];
		if(!x)return;
		x.innerHTML = text;
	}
	else if (document.layers)
	{
		x = document.layers[id];
		if(!x)return;
		x.document.open();
		x.document.write(text);
		x.document.close();
	}
}

function playsound(filename)
{
	var html='<EMBED SRC="' + filename + '" WIDTH=10 HEIGHT=10 AUTOSTART="true">';  //initiate sound
	  stopsound();
	  writeit(html,"sound");  
	  return false;
}
function stopsound()
{
	  writeit("","sound");  
}	  