var IE = /*@cc_on!@*/false; //check if browser is IE()
var soundfile="" //path to sound file, or pass in filename directly into playsound()

if (IE) document.write('<bgsound src="#" id="soundeffect" loop=1 autostart="true">');

function playSound(soundfile) {
	if(IE){
	playSoundIE(soundfile);
	}else{
	document.getElementById("dummy").innerHTML=
	"<embed src=\"../../sounds/"+soundfile+"\" hidden=\"true\" autostart=\"true\" loop=\"false\" />";
	}
}

function playSoundIE(soundfile){
if (document.all && document.getElementById){
document.getElementById("soundeffect").src="" //reset first in case of problems
document.getElementById("soundeffect").src="../../sounds/"+soundfile
}
}
