// FlowBiz Research Inc. // http://www.flowbiz.jp/ // Contact info at flowbiz.jp for detail var Title = ""; var TAB = String.fromCharCode(9); function onLoad() { var xmlhttp = false; if(typeof ActiveXObject != "undefined"){ try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { xmlhttp = false; } } if(!xmlhttp && typeof XMLHttpRequest != "undefined") { xmlhttp = new XMLHttpRequest(); } xmlhttp.open("GET", "http://radio.churadio.com/data/parsedata.cgi"); xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4) { var contents = xmlhttp.responseText; var lines = contents.split("\n"); for (var i = 0; i< 4 ; i++) { Title = "Title" + i; Song = "Song" + i; Artist = "Artist" + i; Chan = "Chan" + i; Duration = "Duration" + i; Start = "Start" + i; End = "End" + i; Mora = "Mora" + i; line = new Array("","","","","","","",""); cont = decodeURIComponent( lines[i].split("+").join(" ")); var line = cont.split(TAB); if (line[7] != "") { document.getElementById("Date0").innerHTML=line[7]; } if (line[0] != "") { document.getElementById(Start).innerHTML=line[0]; } if (line[3] != "") { document.getElementById(Song).innerHTML=line[3]; } if (line[4] != "") { document.getElementById(Artist).innerHTML=line[4]; } if (line[6] != "") { var mora = line[6]; mora = mora.replace(/\r\n/g, ""); mora = mora.replace(/(\n|\r)/g, ""); } if ( i == 0 ) { if ( mora != "" ) { var moraurl = ''; } else { var moraurl = ' '; } document.getElementById(Mora).innerHTML=moraurl; } } } } xmlhttp.send(null); } setInterval( "onLoad()",2000 );