function vote(track,vote)
{

var count = document.getElementById("anzahl").value;
document.getElementById('votespan-'+track).innerHTML="<img src=http://www.enjoyfmradio.es/radio/wp-content/themes/enjoy/images/icons/loader.gif>";

if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp2=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp2=new ActiveXObject("Microsoft.XMLHTTP");
  }


xmlhttp2.open("GET","http://www.enjoyfmradio.es/radio/wp-content/plugins/usercharts/vote.php?track="+track+"&vote="+vote+"&count="+count, false);
xmlhttp2.send(null);

document.getElementById('table').innerHTML=xmlhttp2.responseText;

}

function showmore(count)
{

document.getElementById('showmore').innerHTML="<img src=http://www.enjoyfmradio.es/radio/wp-content/themes/enjoy/images/icons/loader.gif>";

if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp2=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp2=new ActiveXObject("Microsoft.XMLHTTP");
  }


xmlhttp2.open("GET","http://www.enjoyfmradio.es/radio/wp-content/plugins/usercharts/expand.php?show="+count, false);
xmlhttp2.send(null);

document.getElementById('table').innerHTML=xmlhttp2.responseText;

}


function addtrack()
{

document.getElementById('addtrack_button').innerHTML="<img src=http://www.enjoyfmradio.es/radio/wp-content/themes/enjoy/images/icons/loader.gif>";

if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp3=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp3=new ActiveXObject("Microsoft.XMLHTTP");
  }

var artist = document.getElementById("artist").value;
var title = document.getElementById("title").value;
param='artist=' + artist + '&title=' + title;

xmlhttp3.open("POST", "http://www.enjoyfmradio.es/radio/wp-content/plugins/usercharts/track.php", true); 

xmlhttp3.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp3.setRequestHeader("Content-length", param.length);
xmlhttp3.setRequestHeader("Connection", "close");

xmlhttp3.onreadystatechange = function() {
	if(xmlhttp3.readyState == 4 && xmlhttp3.status == 200) {
		document.getElementById('addtrack').innerHTML=xmlhttp3.responseText;
	}
}

xmlhttp3.send(param);

var anzahl = document.getElementById("anzahl").value;

}
