/*
   Milonic DHTML Menu - Souond File Playback Function mm_playsound.js version 1.1 - August 16 2007
   This module is only compatible with the Milonic DHTML Menu version 5.764 or higher

   Copyright 2005 (c) Milonic Solutions Limited. All Rights Reserved.
   This is a commercial software product, please visit http://www.milonic.com/ for more information.

Syntax:

mm_playsouond(soundfile)

aI("text=Sound on Click;clickfunction=mm_playsouond('/sound.wav')");
aI("text=Sound on MouseOver;onfunction=mm_playsouond('/sound.wav')");

To get the menu item to link to another page you need to specify the url and also a delay relative to the length of the sound file sample
aI("text=Sound on MouseOver;onfunction=mm_playsouond('/sound.wav','http://www.milonic.com',800)");
*/

function mm_playsound(s,u,d){
	var obj=gmobj("mm_soundObject")
	if(_dB.appendChild && !obj){		
		obj=_d.createElement("span")
		obj.id="mm_soundObject"
		_dB.appendChild(obj) 
	}
	obj.innerHTML="<embed src='"+s+"' hidden=true autostart=true loop=false onload=alert()>";
	if(u&&d)setTimeout("redirect('"+u+"')",d)
}

function redirect(u){
	location.href=u;
}
