function createRequestObject() {
var ro;
var browser = navigator.appName;
if(browser == "Microsoft Internet Explorer"){
ro = new ActiveXObject("Microsoft.XMLHTTP");
}else{
ro = new XMLHttpRequest();
}
return ro;
}
var http = createRequestObject();
function sndReq() {
http.open('get', 'cur_song.php');
http.onreadystatechange = handleResponse;
http.send(null);
setTimeout("sndReq()", 2000);
}
function handleResponse() {
if(http.readyState == 4){
var response = http.responseText;
if (response != responseold || responsecheck != 1) {
var responsecheck = 1;
document.getElementById("messages").innerHTML = http.responseText;
var responseold = response;
}
}
}
//if (detectWindowsMedia()==false) window.location.href= "http://www.microsoft.com/windows/windowsmedia/player/9series/default.aspx";
//alert("Error" + MediaPlayer.ErrorDescription);