
// Pop-Up Embedder Script by David Battino, www.batmosphere.com
function PlayerOpen(soundfiledesc,soundfilepath, width, height) {
   winPadding = 130;//for the header and caption
   if (!width){
      winWidth=320;
      width   =300;
   }
   else{
   winWidth   = winPadding  + Number(width);
   }

   if(!height){
      winHeight=140;
      height = 42;
   }
   else{
      winHeight   = winPadding  + Number(height);                              
   }


	PlayWin = window.open('','Player','width=' + winWidth + ',height=' + winHeight + ',top=0,left=0,resizable=0,scrollbars=0,titlebar=0,toolbar=0,menubar=0,status=0,directories=0');

    PlayWin.focus();

    PlayWin.document.write("<html><head><title>" + soundfiledesc + "</title>");
	PlayWin.document.write("<link rel='stylesheet' type='text/css' href='star.css' /></head>");
	PlayWin.document.write("<body>");
    PlayWin.document.write("&nbsp;<br /><p style='text-align: center;'>" + soundfiledesc + "</p></div>");
    PlayWin.document.write("<div align='center'><object width='" + width + "' height='" + height + "' >");
    PlayWin.document.write("<param name='SRC' value='" +  soundfilepath + "'>");
    PlayWin.document.write("<param name='autoplay' value='true'>");
    PlayWin.document.write("<param name='controller' value='true'>");
    PlayWin.document.write("<embed src ='" + soundfilepath + "' autostart='true' loop='false' width='" + width + "' height='" + height + "' controller='true' bgcolor='#ffffff' >");
    PlayWin.document.write("</embed></object></div>");

 	PlayWin.document.write("<form><div align='center'><input type='button' value='Close this window' OnClick='javascript:window.close();'></div></form>");

    PlayWin.document.write("</body></html>");

    PlayWin.document.close(); // "Finalizes" new window
}
