function sound(soundfile) 
{
      sound(soundfile, (new Boolean(false)));
}

function soundEndless(soundfile) 
{
      sound(soundfile, (new Boolean(true)));
}

function sound(soundfile, loop) 
{
      var MSIE=navigator.userAgent.indexOf("MSIE");
      var NETS=navigator.userAgent.indexOf("Netscape");
      var OPER=navigator.userAgent.indexOf("Opera");

      if((MSIE>-1) || (OPER>-1)) {
          if (loop) {
             document.write("<BGSOUND SRC="+soundfile+" LOOP=INFINITE>");
          } else {
             document.write("<BGSOUND SRC="+soundfile+" LOOP=1>");
          }
      } else {
          document.write("<EMBED SRC='"+soundfile+"' AUTOSTART='TRUE' ");
          if (loop) {
             document.write("HIDDEN=false VOLUME=100 LOOP='TRUE'>");
          } else {
             document.write("HIDDEN=false VOLUME=100 LOOP='FALSE'>");
          }
      }
}

