// JavaScript Document
function embedPlayer() { 

   // Get Operating System 

   var isWin = navigator.userAgent.toLowerCase().indexOf("windows") != -1;

   // IE detection 

   var browser_type=navigator.appName

   var browser_version=parseInt(navigator.appVersion)

   

   if (isWin) 

   {  // to load curenly player of IE on Windows

      if (browser_type=="Microsoft Internet Explorer"&&browser_version>=4)

	  {

	// Width is the WMP minimum. Height = 45 (WMP controls) + 24 (WMP status bar)

   document.writeln("<object width='300' height='69'>");  

   document.writeln("<param name='src' value='satie.mid'>");

   document.writeln("<param name='autoplay' value='true'>");

   document.writeln("<param name='showstatusbar' value='1'>");

   // if QuickTime is insteled on IE Win require autoplay='true' without autostart='1'

   document.writeln("<embed src ='satie.mid' autoplay='true' width='300' height='69' showstatusbar='1'></embed>"); 

   document.writeln("</object>");

   document.close(); // Finalizes the document

	  }

	  else  // The MIME type to load the WMP plugin in non-IE browsers on Windows

	  {

   // Width is the WMP minimum. Height = 45 (WMP controls) + 24 (WMP status bar) 

   document.writeln("<object width='300' height='69'>"); 

   document.writeln("<param name='type' value='application/x-mplayer2'>");

   document.writeln("<param name='src' value='satie.mid'>");

   document.writeln("<param name='autostart' value='1'>");

   document.writeln("<param name='showcontrols' value='1'>");

   document.writeln("<param name='showstatusbar' value='1'>");

   // Firefox and Opera Win require both autostart and autoplay

   document.writeln("<embed src ='satie.mid' type='application/x-mplayer2' autoplay='true' autostart='1' width='300' height='69' controller='1' showstatusbar='1'></embed>"); 

   document.writeln("</object>");

   // Finalize the document

   document.close(); 

	  }

   } 

   else // The MIME type for Macs and Linux 

   {

   // Width is the WMP minimum. Height = 45 (WMP controls) + 24 (WMP status bar) 

   document.writeln("<object width='300' height='69'>"); 

   document.writeln("<param name='type' value='audio/mpeg'>");

   document.writeln("<param name='src' value='satie.mid'>");

   document.writeln("<param name='autostart' value='1'>");

   document.writeln("<param name='showcontrols' value='1'>");

   document.writeln("<param name='showstatusbar' value='1'>");

   // Firefox and Opera Win require both autostart and autoplay

   document.writeln("<embed src ='satie.mid' type='audio/mpeg' autoplay='true' autostart='1' width='300' height='69' controller='1' showstatusbar='1'></embed>"); 

   document.writeln("</object>");

   // Finalize the document

   document.close(); 

   }

   }


