﻿function openAudioPlayer (mp3_description, mp3_fileloc) {

mediaPlayer_window = window.open('',"playerWindow",'width=540,height=300,top=5,left=5,resizable=0,scrollbars=0,titlebar=0,toolbar=0,menubar=0,status=0,directories=0,personalbar=0');

mediaPlayer_documentInfo = 
"<html>\n" +
" <head>\n" +
" <title>" + mp3_description + " - Globe Radio</title>\n" +
" <style type='text/css'>\n" +
"  body {\n" +
"  background-color: #EDB21F;\n" +
"  font-family: Arial, Helvetica, sans-serif, MS Sans Serif;\n" +
"  font-size: 12pt;\n" +
"  color: #000000;\n" +
"  text-align: center;\n" +
"  }\n" +
"  div {\n" +
"  border: 2px solid #000000;\n" +
"  background-color: #FFFFFF;\n" +
"  width: 97%;\n" +
"  margin: 0.75% auto;\n" +
"  padding: 0.75%;\n" +
"  }\n" +
"  a, a:active, a:visited {\n" +
"  color: #6799C8;\n" +
"  }\n" +
"  a:hover {\n" +
"  color: #005288;\n" +
"  }\n" +
"  span {\n" +
"  font: 9pt;\n" +
"  }\n" +
" </style>\n" +
" </head>\n" +
" <body>\n" +
" <div>\n" +
"  <h1><img src='_images/globeradio-banner_468px.gif' alt='Globe Radio'></h1>\n" +
"  Now Playing:  " + mp3_description + "<br /><br />\n" +
"   <object id='MediaPlayer' width='468' height='45' classid='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95' standby='Loading Windows Media Player components...' type='application/x-oleobject'>\n" +
"    <param name='Filename' value='" + mp3_fileloc + "'>\n" +
"    <param name='ShowControls' value='true'>\n" +
"    <param name='ShowStatusBar' value='false'>\n" +
"    <param name='ShowDisplay' value='false'>\n" +
"    <param name='autostart' value='true'>\n" +
"   <embed type='application/x-mplayer2' src='" + mp3_fileloc + "' name='MediaPlayer' width='468' height='45' ShowControls='1' ShowStatusBar='0' ShowDisplay='0' autostart='1'> </embed>\n" +
"   </object>\n" +
"  <p><a href='" + mp3_fileloc + "'>Download this file</a><br />\n" +
"  <span>(Right-click the link and choose 'Save Target As...' or 'Save Link As...')</span></p>\n" +
"  <input type='button' value='Close this window' onClick='javascript:window.close();'>\n" +
" </div>\n" +
" </body>\n" +
"</html>";

mediaPlayer_window.document.write(mediaPlayer_documentInfo);
mediaPlayer_window.document.close();

} //open_mp3 function()