function current(str)
{
	//alert("start 5");
	//document.getElementById(str).innerHTML=str;
	//alert(str);
/*if (str=="")
  {
  document.getElementById("p_song").innerHTML="No Data...";
  //return;
  } */
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  //alert('object created 1');
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  //alert('object created 2');
  }
xmlhttp.onreadystatechange=function()
  {
	  
	  
	      if (xmlhttp.readyState==1 )
    {
    document.getElementById("p_song").innerHTML="at 1....";
	//document.getElementById("p_song").innerHTML="hello testing somgs";
	//alert(xmlhttp.status);
	
    }
	  
	  
	  
	  
	    if (xmlhttp.readyState==2 )
    {
    document.getElementById("p_song").innerHTML="at 2....";
	//document.getElementById("p_song").innerHTML="hello testing somgs";
	//alert(xmlhttp.status);
	
    }
	  
	  
	  if (xmlhttp.readyState==3 )
    {
    document.getElementById("p_song").innerHTML="at 3....";
	//document.getElementById("p_song").innerHTML="hello testing somgs";
	
    }
	  
	  
	  
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
		
		
		//alert(xmlhttp.status);
    document.getElementById("p_song").innerHTML=xmlhttp.responseText;
	//alert('next hello testing somgs');
	document.getElementById("p_song").innerHTML="hello testing somgs";
	//alert("end 5");
    }
  }
//xmlhttp.open("POST","current_curl.php?review="+str,true);
xmlhttp.open("GET","http://174.36.108.153:8000/currentsong?sid=1",true);
xmlhttp.send();
setTimeout("current()",10000);
setTimeout("next()",10000);
setTimeout("previous()",10000);
}


//=============================================================================


function next(str)
{
	//document.getElementById(str).innerHTML=str;
	//alert(str);
if (str=="")
  {
  document.getElementById(str).innerHTML="No Data...";
  return;
  } 
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("r_song").innerHTML=xmlhttp.responseText;
	//document.getElementById(str).innerHTML="bythe dish";
    }
  }
xmlhttp.open("POST","http://174.36.108.153:8000/nextsong? sid=1"+str,true);
xmlhttp.send();
setTimeout("next()",7000);
}




//===============================================================================



function previous(str)
{
	//document.getElementById(str).innerHTML=str;
	//alert(str);
if (str=="")
  {
  document.getElementById(str).innerHTML="No Data...";
  return;
  } 
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("q_song").innerHTML=xmlhttp.responseText;
	//document.getElementById(str).innerHTML="bythe dish";
    }
  }
xmlhttp.open("POST","previous_curl.php?review="+str,true);
xmlhttp.send();
setTimeout("previous()",8000);
}

