<!--
var _info = navigator.userAgent;
var _ns = false;
var _ns6 = false;
var _ie = (_info.indexOf("MSIE") > 0 && _info.indexOf("Win") > 0 && _info.indexOf("Windows 3.1") < 0);
if (_info.indexOf("Opera") > 0) _ie = false;
var _ns = (navigator.appName.indexOf("Netscape") >= 0 && ((_info.indexOf("Win") > 0 && _info.indexOf("Win16") < 0) || (_info.indexOf("Sun") > 0) || (_info.indexOf("Linux") > 0) || (_info.indexOf("AIX") > 0) || (_info.indexOf("OS/2") > 0) || (_info.indexOf("IRIX") > 0)));
var _ns6 = ((_ns == true) && (_info.indexOf("Mozilla/5") >= 0));
if (_ie == true) {
  document.writeln('<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH="0" HEIGHT="0" NAME="player" codebase="http://java.sun.com/update/1.4.2/jinstall-1_4-windows-i586.cab#Version=1,4,0,0">');
}
else if (_ns == true && _ns6 == false) { 
  // BEGIN: Update parameters below for NETSCAPE 3.x and 4.x support.
  document.write('<EMBED ');
  document.write('type="application/x-java-applet;version=1.4" ');
  document.write('CODE="javazoom.jlgui.player.amp.PlayerApplet.class" ');
  document.write('JAVA_CODEBASE="./" ');
  document.write('ARCHIVE="lib/jlguiapplet2.3.2.jar,lib/jlgui2.3.2-light.jar,lib/tritonus_share.jar,lib/basicplayer2.3.jar,lib/mp3spi1.9.2.jar,lib/jl1.0.jar,lib/vorbisspi1.0.1.jar,lib/jorbis-0.0.13.jar,lib/jogg-0.0.7.jar,lib/commons-logging-api.jar" ');
  document.write('NAME="player" ');
  document.write('WIDTH="0" ');
  document.write('HEIGHT="0" ');
  document.write('song="http://www.educaradio.net:8000/stream.ogg" ');
  document.write('start="yes" ');
  document.write('skin="skins/bao.wsz" ');
  document.write('init="jlgui.ini" ');
  document.write('location="false" ');
  document.write('useragent="winampMPEG/2.7" ');
  document.write('scriptable=false ');
  document.writeln('pluginspage="http://java.sun.com/products/plugin/index.html#download"><NOEMBED>');
  // END
}
else {
  document.writeln('<APPLET CODE="javazoom.jlgui.player.amp.PlayerApplet.class" JAVA_CODEBASE="./" ARCHIVE="lib/jlguiapplet2.3.2.jar,lib/jlgui2.3.2-light.jar,lib/tritonus_share.jar,lib/basicplayer2.3.jar,lib/mp3spi1.9.2.jar,lib/jl1.0.jar,lib/vorbisspi1.0.1.jar,lib/jorbis-0.0.13.jar,lib/jogg-0.0.7.jar,lib/commons-logging-api.jar" WIDTH="0" HEIGHT="0" NAME="player">');
}
// BEGIN: Update parameters below for INTERNET EXPLORER, FIREFOX, SAFARI, OPERA, MOZILLA, NETSCAPE 6+ support.
document.writeln('<PARAM NAME=CODE VALUE="javazoom.jlgui.player.amp.PlayerApplet.class">');
document.writeln('<PARAM NAME=CODEBASE VALUE="./">');
document.writeln('<PARAM NAME=ARCHIVE VALUE="lib/jlguiapplet2.3.2.jar,lib/jlgui2.3.2-light.jar,lib/tritonus_share.jar,lib/basicplayer2.3.jar,lib/mp3spi1.9.2.jar,lib/jl1.0.jar,lib/vorbisspi1.0.1.jar,lib/jorbis-0.0.13.jar,lib/jogg-0.0.7.jar,lib/commons-logging-api.jar">');
document.writeln('<PARAM NAME=NAME VALUE="player">');
document.writeln('<PARAM NAME="type" VALUE="application/x-java-applet;version=1.4">');
document.writeln('<PARAM NAME="scriptable" VALUE="false">');
document.writeln('<PARAM NAME="song" VALUE="http://www.educaradio.net:8000/stream.ogg.m3u">');
document.writeln('<PARAM NAME="start" VALUE="yes">');
document.writeln('<PARAM NAME="skin" VALUE="skins/bao.wsz">');
document.writeln('<PARAM NAME="init" VALUE="jlgui.ini">');
document.writeln('<PARAM NAME="location" VALUE="false">');
document.writeln('<PARAM NAME="useragent" VALUE="winampMPEG/2.7">');
// END
if (_ie == true) {
  document.writeln('</OBJECT>');
}
else if (_ns == true && _ns6 == false) {
  document.writeln('</NOEMBED></EMBED>');
}
else {
  document.writeln('</APPLET>');
}


/* ------------------------------------ */

function pressStart()
{
	document.player.pressStart();
}
function pressPause()
{
	document.player.pressPause();
	/*if (document.panel.pause.value=="Resume/Pause") document.panel.pause.value="Pause/Resume";
	else document.panel.pause.value="Resume/Pause";*/
}
function pressStop()
{
	document.player.pressStop();
}
function pressShuffle()
{
	document.player.pressShuffle();
}
function pressRepeat()
{
	document.player.pressRepeat();
}

function pressNext()
{
	document.player.pressNext();
}
function pressPrevious()
{
	document.player.pressPrevious();
}
function loadSkin()
{
	var skinURL = document.panel.skinselect.options[document.panel.skinselect.selectedIndex].value;
	if (skinURL != "") document.player.loadMySkin(getBaseURL()+"skins/"+skinURL);
}
function loadPlaylist()
{
	var playlistURL = document.panel.playlist.value;
	if (playlistURL != "")
	{
	   document.player.loadMyPlaylist(playlistURL);
	   document.player.resetMyPlaylist();
	}
}
function getBaseURL()
{
	var baseURL = location.href;
	baseURL = baseURL.substring(0,(baseURL.lastIndexOf("/"))+1);
	return baseURL;
}
function getPlaylist()
{
	var playlist = document.player.getPlaylistDump();
	alert(playlist);
}
function getCurrentState()
{
	var state = document.player.getPlayerState();
	if (state == 0) state = "INIT";
	else if (state == 1) state = "OPEN";
	else if (state == 2) state = "PLAY";
	else if (state == 3) state = "PAUSE";
	else if (state == 4) state = "STOP";
	alert(state);
}
function getCurrentSong()
{
	var song = document.player.getCurrentSongName()+"\n"+document.player.getCurrentSongPath();
	alert(unescape(song));
}

function getGain()
{
	var gain = document.player.getGain();
	return gain;
}

function getBalance()
{
	var balance = document.player.getBalance();
	return balance;
}

function setBalance(val)
{
	document.player.setBalance(val);
}

function setGain(val)
{
	document.player.setGain(val);
}

function init()
{
  DumpPlaylist();
  document.panel.gainvalue.value=getGain();
  document.panel.balancevalue.value=getBalance();
}

function DumpPlaylist()
{
 var playlist=""+document.player.getPlaylistDump()+"";
 var playlist_array=playlist.split("#");
 var iframedoc = document.getElementById('myiframe').contentDocument;

 if (iframedoc==null) iframedoc=document.frames.myiframe.document;
 with (iframedoc)
 {
  open("text/html");
  clear();
  write("<html><head><title>Blank</title></head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>\n");
  for (var loop=0; loop < playlist_array.length; loop++)
  {
    var data_array = playlist_array[loop].split("|");
    var col = "#000000";
    for (var loopd=0; loopd < data_array.length; loopd++)
    {
     if (loopd == 0) col = "#000000";
     else col = "#AAAAAA";
     if (data_array[loopd].length > 0) writeln("<font face=Verdana size=-2 color="+col+">"+unescape(data_array[loopd])+"</font><br>");
    }
  }
  write("</body></html>\n");
  close();
  }

}


//-->

