// JavaScript Document

// default audio directory - to make links on the referring page shorter.
var audioFolder = "http://www.pickwickpwd.com/music/"; 	

function embedPlayer(audioTitle,audioURL) { 

   var audioURL = audioFolder + audioURL;
   var objTypeTag = "application/x-mplayer2"; // The MIME type to load the WMP plugin in non-IE browsers on Windows
//   var objTypeTag = "audio/mid";		//  MIME type for mid   
//   var objTypeTag = "audio/mpeg";		//  MIME type for MP3
  
   document.writeln("<div align='center' class='music'><div>");
   document.writeln("<p>" + audioTitle + "</p>");  
   document.writeln("<object width='280' height='25'>"); 
   // Width is the WMP minimum. Height = 45 (WMP controls) + 24 (WMP status bar) 
   document.writeln("<param name='type' value='" + objTypeTag + "'>");
   document.writeln("<param name='src' value='" + audioURL + "'>");
   document.writeln("<param name='autostart' value='0'>");
   document.writeln("<param name='loop' value='0'>");   
   document.writeln("<param name='showcontrols' value='1'>");
   document.writeln("<param name='showstatusbar' value='0'>");
   document.writeln("<param name='bgcolor' value='#A6C790'>");  
	// Firefox and Opera Win require both autostart and autoplay   
   document.writeln("<embed src ='" + audioURL + "' type='" + objTypeTag + "' autoplay='true' autostart='1' loop='1' width='280' height='25' controller='1' showstatusbar='0' bgcolor='#A6C790' pluginspage='/quicktime/download/'></embed>"); 

   document.writeln("</object>");
   document.writeln("</div>");
   document.writeln("</div>");   
   document.close(); // Finalizes the document
}

