function playNewStation(stationURL, stationName){
     try {PimbaFmToolkit.notifyNewStation(stationName);}catch(eee){}
	var player = document.getElementById("player_object");
	if(typeof (player.playStation) != "undefined"){
		player.playStation(stationURL, stationName);
	}else
		setTimeout(function(){playNewStation(stationURL, stationName);}, 100);
}

function stopCurrentStation(){
	var player = document.getElementById("player_object");
	if(typeof (player.stopStation) != "undefined"){
		player.stopStation();
	}else
		setTimeout(function(){stopCurrentStation();}, 100);
}
	
function showPlayIcon(currentStationName){
	var station = document.getElementById(currentStationName);
	if(typeof (station.showPlayIcon) != "undefined"){
		station.showPlayIcon();
	}else
		setTimeout(function(){showPlayIcon(currentStationName);}, 100);
}

function showStopIcon(currentStationName){
	var station = document.getElementById(currentStationName);
	if(typeof (station.showStopIcon) != "undefined"){
		station.showStopIcon();
	}else
		setTimeout(function(){showStopIcon(currentStationName);}, 100);
}

function loadStationError(){
	var message = "Error al cargar la radio";
	alert(message);
}

function closeStreamError(){
	var message = "Error al cerrar la radio anterior";
	alert(message);
}
