dataUpdate();
 // let radio_server = xxx.info;
function dataUpdate(){
  d3.json(radio_server+"/status-json.xsl",function(d){
    if (d.icestats.source != undefined){
      d3.select("#now").text(d.icestats.source.title); 
      d3.select("#onAir").style("background-color","green"); 
      d3.select("#onmax").text(d.icestats.source.listener_peak);
      d3.select("#online").text(d.icestats.source.listeners); 
    }
    else{
      d3.select("#now").text("offline"); 
      d3.select("#onAir").style("background-color","red"); 
      d3.select("#onmax").text("--");
      d3.select("#online").text("--"); 
  } });
  d3.select("#onAir").transition().on("end",dataUpdate).delay(60000);
};

