function ponList(url_lista)
{
  //top.document.all.tags("IFRAME")[11].src=url_lista;
  parent.document.getElementById("IFList").src=url_lista;
  parent.MM_showHideLayers('LayerList','','show','LAvisos','','hide');
  //top.ponList0(url_lista);
  //return false;
}
function quitaList()
{
 parent.MM_showHideLayers('LayerList','','hide','LAvisos','','show');
 //parent.quitaList0();
 //return false;
}
function ponArticulo(url_articulo)
{
  window.top.document.all.tags("IFRAME")[12].src=url_articulo;
  top.MM_showHideLayers('LArticulo','','show','LAvisos','','hide');
  return false;
}
function quitaArticulo()
{
 top.MM_showHideLayers('LArticulo','','hide','LAvisos','','show');
 return false;
}

//
//  ============================================================================0
//
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 play(url)
{
 alert(url);
}
function play2(url)
{ 
  var playlist
  window.document.player.pressStop();
  window.document.player.loadMyPlaylist(url);
  g=getGain();
  b=getBalance();
  window.document.player.getPlaylistDump();
  window.document.player.pressNext();
  window.document.player.pressStart();
}
 function play_out(url)
{
	//document.player.pressStop();
	window.location=url;
}
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("#");
 with (document.frames.myiframe.document)
 {
  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();
  }
}
//
//
//

