// JavaScript Actions

function sendReport(eId,iId, tId)
{
	var xmlhttp;
	if (window.XMLHttpRequest)
	  {
	  xmlhttp=new XMLHttpRequest();
	  }
	else if (window.ActiveXObject)
	  {
	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	  }
	else
	  {
	  alert("Your browser does not support this functionality.");
	  }
	xmlhttp.onreadystatechange=function()
	{
	if(xmlhttp.readyState==4)
	  {
		var resp = xmlhttp.responseText;
		if (resp == "OK!") {
			document.getElementById(eId).innerHTML = '<a rel="noclick" alt="You have already reported this item" title="You have already reported this item"></a>';
		} else if (resp == "BANNED") {
			alert("You are banned from using this service. For more information please see: www.50hzgamer.co.uk/index.php?about=ban");
		} else {
			alert("An error has occured. Please try again later.");
		}
	  }
	}
	xmlhttp.open("GET","extact.php?report=" + iId + "&reason=" + tId,true);
	xmlhttp.send(null);
}