var xmlhttp
function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}
function update_category(id)
{
	xmlhttp=GetXmlHttpObject();
	if (xmlhttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
	}
	var url="index.php?option=com_allarticleannounce&task=update_category&format=raw";
	url=url+"&q="+id;
	url=url+"&sid="+Math.random();
	xmlhttp.onreadystatechange=update_category_result;
	xmlhttp.open("POST",url,true);
	xmlhttp.send(null);
}
function update_category_result()
{
	if (xmlhttp.readyState==4)
	{
		response=xmlhttp.responseText;
		//alert(response);
		document.getElementById('category_option').innerHTML=response;
	}
}
function set_category_option(value,name)
{
	document.getElementById('category_option_'+name).disabled=value;
}
